summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/dialog')
-rw-r--r--src/ui/dialog/clonetiler.cpp10
-rw-r--r--src/ui/dialog/document-properties.cpp10
-rw-r--r--src/ui/dialog/export.cpp4
-rw-r--r--src/ui/dialog/guides.cpp2
4 files changed, 13 insertions, 13 deletions
diff --git a/src/ui/dialog/clonetiler.cpp b/src/ui/dialog/clonetiler.cpp
index b3675440b..87c399339 100644
--- a/src/ui/dialog/clonetiler.cpp
+++ b/src/ui/dialog/clonetiler.cpp
@@ -1107,7 +1107,7 @@ CloneTiler::CloneTiler (void) :
#endif
double value = prefs->getDouble(prefs_path + "fillwidth", 50.0);
- Inkscape::Util::Unit const unit = unit_menu->getUnit();
+ Inkscape::Util::Unit const *unit = unit_menu->getUnit();
gdouble const units = Inkscape::Util::Quantity::convert(value, "px", unit);
fill_width->set_value (units);
@@ -1140,7 +1140,7 @@ CloneTiler::CloneTiler (void) :
#endif
double value = prefs->getDouble(prefs_path + "fillheight", 50.0);
- Inkscape::Util::Unit const unit = unit_menu->getUnit();
+ Inkscape::Util::Unit const *unit = unit_menu->getUnit();
gdouble const units = Inkscape::Util::Quantity::convert(value, "px", unit);
fill_height->set_value (units);
@@ -2948,7 +2948,7 @@ void CloneTiler::clonetiler_switch_to_fill(GtkToggleButton * /*tb*/, GtkWidget *
void CloneTiler::clonetiler_fill_width_changed(GtkAdjustment *adj, Inkscape::UI::Widget::UnitMenu *u)
{
gdouble const raw_dist = gtk_adjustment_get_value (adj);
- Inkscape::Util::Unit const unit = u->getUnit();
+ Inkscape::Util::Unit const *unit = u->getUnit();
gdouble const pixels = Inkscape::Util::Quantity::convert(raw_dist, unit, "px");
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
@@ -2958,7 +2958,7 @@ void CloneTiler::clonetiler_fill_width_changed(GtkAdjustment *adj, Inkscape::UI:
void CloneTiler::clonetiler_fill_height_changed(GtkAdjustment *adj, Inkscape::UI::Widget::UnitMenu *u)
{
gdouble const raw_dist = gtk_adjustment_get_value (adj);
- Inkscape::Util::Unit const unit = u->getUnit();
+ Inkscape::Util::Unit const *unit = u->getUnit();
gdouble const pixels = Inkscape::Util::Quantity::convert(raw_dist, unit, "px");
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
@@ -2971,7 +2971,7 @@ void CloneTiler::clonetiler_unit_changed()
gdouble width_pixels = prefs->getDouble(prefs_path + "fillwidth");
gdouble height_pixels = prefs->getDouble(prefs_path + "fillheight");
- Inkscape::Util::Unit unit = unit_menu->getUnit();
+ Inkscape::Util::Unit const *unit = unit_menu->getUnit();
gdouble width_value = Inkscape::Util::Quantity::convert(width_pixels, "px", unit);
gdouble height_value = Inkscape::Util::Quantity::convert(height_pixels, "px", unit);
diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp
index 37d0ce213..a6019c55c 100644
--- a/src/ui/dialog/document-properties.cpp
+++ b/src/ui/dialog/document-properties.cpp
@@ -1441,7 +1441,7 @@ void DocumentProperties::update()
_rum_deflt.setUnit (nv->doc_units->abbr);
double doc_w = sp_desktop_document(dt)->getRoot()->width.value;
- Glib::ustring doc_w_unit = unit_table.getUnit(sp_desktop_document(dt)->getRoot()->width.unit).abbr;
+ Glib::ustring doc_w_unit = unit_table.getUnit(sp_desktop_document(dt)->getRoot()->width.unit)->abbr;
if (doc_w_unit == "") {
doc_w_unit = "px";
} else if (doc_w_unit == "%" && sp_desktop_document(dt)->getRoot()->viewBox_set) {
@@ -1449,7 +1449,7 @@ void DocumentProperties::update()
doc_w = sp_desktop_document(dt)->getRoot()->viewBox.width();
}
double doc_h = sp_desktop_document(dt)->getRoot()->height.value;
- Glib::ustring doc_h_unit = unit_table.getUnit(sp_desktop_document(dt)->getRoot()->height.unit).abbr;
+ Glib::ustring doc_h_unit = unit_table.getUnit(sp_desktop_document(dt)->getRoot()->height.unit)->abbr;
if (doc_h_unit == "") {
doc_h_unit = "px";
} else if (doc_h_unit == "%" && sp_desktop_document(dt)->getRoot()->viewBox_set) {
@@ -1644,11 +1644,11 @@ void DocumentProperties::onDocUnitChange()
{
SPDocument *doc = SP_ACTIVE_DOCUMENT;
Inkscape::XML::Node *repr = sp_desktop_namedview(getDesktop())->getRepr();
- Inkscape::Util::Unit old_doc_unit = unit_table.getUnit("px");
+ Inkscape::Util::Unit const *old_doc_unit = unit_table.getUnit("px");
if(repr->attribute("inkscape:document-units")) {
old_doc_unit = unit_table.getUnit(repr->attribute("inkscape:document-units"));
}
- Inkscape::Util::Unit doc_unit = _rum_deflt.getUnit();
+ Inkscape::Util::Unit const *doc_unit = _rum_deflt.getUnit();
// Don't execute when change is being undone
if (!DocumentUndo::getUndoSensitive(doc)) {
@@ -1657,7 +1657,7 @@ void DocumentProperties::onDocUnitChange()
// Set document unit
Inkscape::SVGOStringStream os;
- os << doc_unit.abbr;
+ os << doc_unit->abbr;
repr->setAttribute("inkscape:document-units", os.str().c_str());
// Set viewBox
diff --git a/src/ui/dialog/export.cpp b/src/ui/dialog/export.cpp
index 577793496..f1f7cf6c1 100644
--- a/src/ui/dialog/export.cpp
+++ b/src/ui/dialog/export.cpp
@@ -1884,7 +1884,7 @@ void Export::setValuePx(Glib::RefPtr<Gtk::Adjustment>& adj, double val)
void Export::setValuePx( Gtk::Adjustment *adj, double val)
#endif
{
- const Unit unit = unit_selector->getUnit();
+ Unit const *unit = unit_selector->getUnit();
setValue(adj, Inkscape::Util::Quantity::convert(val, "px", unit));
@@ -1934,7 +1934,7 @@ float Export::getValuePx( Gtk::Adjustment *adj )
#endif
{
float value = getValue( adj);
- const Unit unit = unit_selector->getUnit();
+ Unit const *unit = unit_selector->getUnit();
return Inkscape::Util::Quantity::convert(value, unit, "px");
} // end of sp_export_value_get_px()
diff --git a/src/ui/dialog/guides.cpp b/src/ui/dialog/guides.cpp
index 2de387364..5dfafa78d 100644
--- a/src/ui/dialog/guides.cpp
+++ b/src/ui/dialog/guides.cpp
@@ -59,7 +59,7 @@ Glib::ustring GuidelinePropertiesDialog::_angle_unit_status = DEG; // initialize
GuidelinePropertiesDialog::~GuidelinePropertiesDialog() {
// save current status
_relative_toggle_status = _relative_toggle.get_active();
- _angle_unit_status = _spin_angle.getUnit().abbr;
+ _angle_unit_status = _spin_angle.getUnit()->abbr;
}
void GuidelinePropertiesDialog::showDialog(SPGuide *guide, SPDesktop *desktop) {