diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2007-04-20 15:48:51 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2007-04-20 15:48:51 +0000 |
| commit | db4aeda163816cad5029f7a4d37ec82afac27a91 (patch) | |
| tree | fccd3fa74175d29196128e8688d8d34aa0def771 /src/ui/dialog/document-properties.cpp | |
| parent | Fix emphasized gridlines bug when zoomed out. (diff) | |
| download | inkscape-db4aeda163816cad5029f7a4d37ec82afac27a91.tar.gz inkscape-db4aeda163816cad5029f7a4d37ec82afac27a91.zip | |
grid: make grid names translatable. use different gridtype names in SVG that are not translated.
(bzr r2936)
Diffstat (limited to 'src/ui/dialog/document-properties.cpp')
| -rw-r--r-- | src/ui/dialog/document-properties.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp index f84b11920..4a57c6bfc 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -352,9 +352,10 @@ DocumentProperties::build_gridspage() Gtk::Label* label_crea_type = manage (new Gtk::Label); label_crea_type->set_markup (_("Gridtype")); - _grids_combo_gridtype.append_text(Glib::ustring("xygrid")); - _grids_combo_gridtype.append_text(Glib::ustring("axonometric")); - _grids_combo_gridtype.set_active_text(Glib::ustring("xygrid")); + for (gint t = 0; t <= GRID_MAXTYPENR; t++) { + _grids_combo_gridtype.append_text( CanvasGrid::getName( (GridType) t ) ); + } + _grids_combo_gridtype.set_active_text( CanvasGrid::getName(GRID_RECTANGULAR) ); Gtk::Label* label_def = manage (new Gtk::Label); label_def->set_markup (_("<b>Defined grids</b>")); @@ -531,7 +532,7 @@ DocumentProperties::onNewGrid() Inkscape::XML::Node *repr = SP_OBJECT_REPR(sp_desktop_namedview(SP_ACTIVE_DESKTOP)); Glib::ustring typestring = _grids_combo_gridtype.get_active_text(); - CanvasGrid::writeNewGridToRepr(repr, typestring.c_str()); + CanvasGrid::writeNewGridToRepr(repr, CanvasGrid::getGridTypeFromName(typestring.c_str())); } |
