diff options
| author | Nicolas Dufour <nicoduf@yahoo.fr> | 2012-03-22 19:19:09 +0000 |
|---|---|---|
| committer | JazzyNico <nicoduf@yahoo.fr> | 2012-03-22 19:19:09 +0000 |
| commit | d622704efbe803d7e271bc41655dc4432a1d556e (patch) | |
| tree | 7089850074cf5568beaf3375dcff87bc3c57d264 /src | |
| parent | UI. Fix for bug #962002 (<image> context menu item Edit externally… ignores... (diff) | |
| download | inkscape-d622704efbe803d7e271bc41655dc4432a1d556e.tar.gz inkscape-d622704efbe803d7e271bc41655dc4432a1d556e.zip | |
UI. Patch for Bug #666370 (Not all units in the Object Transform dialog are translatable) by Fernando Lucchesi.
Fixed bugs:
- https://launchpad.net/bugs/666370
(bzr r11116)
Diffstat (limited to 'src')
| -rw-r--r-- | src/ui/dialog/guides.cpp | 6 | ||||
| -rw-r--r-- | src/ui/dialog/transformation.cpp | 2 | ||||
| -rw-r--r-- | src/util/units.h | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/src/ui/dialog/guides.cpp b/src/ui/dialog/guides.cpp index 61b4fe389..088290b6f 100644 --- a/src/ui/dialog/guides.cpp +++ b/src/ui/dialog/guides.cpp @@ -54,7 +54,7 @@ GuidelinePropertiesDialog::GuidelinePropertiesDialog(SPGuide *guide, SPDesktop * } bool GuidelinePropertiesDialog::_relative_toggle_status = false; // initialize relative checkbox status for when this dialog is opened for first time -Glib::ustring GuidelinePropertiesDialog::_angle_unit_status = "deg"; // initialize angle unit status +Glib::ustring GuidelinePropertiesDialog::_angle_unit_status = DEG; // initialize angle unit status GuidelinePropertiesDialog::~GuidelinePropertiesDialog() { // save current status @@ -87,7 +87,7 @@ void GuidelinePropertiesDialog::_modeChanged() _spin_button_x.setValue(0); } else { // absolute - _spin_angle.setValueKeepUnit(_oldangle, "deg"); + _spin_angle.setValueKeepUnit(_oldangle, DEG); _spin_button_x.setValueKeepUnit(_oldpos[Geom::X], "px"); _spin_button_y.setValueKeepUnit(_oldpos[Geom::Y], "px"); @@ -96,7 +96,7 @@ void GuidelinePropertiesDialog::_modeChanged() void GuidelinePropertiesDialog::_onApply() { - double deg_angle = _spin_angle.getValue("deg"); + double deg_angle = _spin_angle.getValue(DEG); if (!_mode) deg_angle += _oldangle; Geom::Point normal; diff --git a/src/ui/dialog/transformation.cpp b/src/ui/dialog/transformation.cpp index 9b65c1f68..1951dc92a 100644 --- a/src/ui/dialog/transformation.cpp +++ b/src/ui/dialog/transformation.cpp @@ -724,7 +724,7 @@ void Transformation::applyPageScale(Inkscape::Selection *selection) void Transformation::applyPageRotate(Inkscape::Selection *selection) { - double angle = _scalar_rotate.getValue("deg"); + double angle = _scalar_rotate.getValue(DEG); Inkscape::Preferences *prefs = Inkscape::Preferences::get(); if (prefs->getBool("/dialogs/transformation/applyseparately")) { diff --git a/src/util/units.h b/src/util/units.h index d45109a8f..b22bdb1f2 100644 --- a/src/util/units.h +++ b/src/util/units.h @@ -32,6 +32,8 @@ enum UnitType { UNIT_TYPE_NONE = -1 }; +const char DEG[] = "°"; + class Unit { public: Glib::ustring name; |
