From 30493d6d028485e65dd0fb61ea9978c7b128e817 Mon Sep 17 00:00:00 2001 From: Maximilian Albert Date: Sun, 13 Jan 2008 18:17:32 +0000 Subject: Use visual/geometric bbox (as specified in Selector tool preferences) when converting to guidelines. Also, provide options to convert rectangles and 3D boxes using their bbox, too (i.e., disregarding their true shapes). (bzr r4477) --- src/ui/dialog/inkscape-preferences.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/ui/dialog/inkscape-preferences.cpp') diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index e88ba74b1..b07914265 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -229,6 +229,12 @@ void InkscapePreferences::AddGradientCheckbox(DialogPage& p, const std::string& p.add_line( false, "", *cb, "", _("Whether selected objects display gradient editing controls")); } +void InkscapePreferences::AddConvertGuidesCheckbox(DialogPage& p, const std::string& prefs_path, bool def_value) { + PrefCheckButton* cb = Gtk::manage( new PrefCheckButton); + cb->init ( _("Conversion to guides uses edges instead of bounding box"), prefs_path, "convertguides", def_value); + p.add_line( false, "", *cb, "", _("Converting an object to guides places these along the object's true edges (imitating the object's shape), not along the bounding box.")); +} + void StyleFromSelectionToTool(gchar const *prefs_path, StyleSwatch *swatch) { SPDesktop *desktop = SP_ACTIVE_DESKTOP; @@ -374,9 +380,11 @@ void InkscapePreferences::initPageTools() //Rectangle this->AddPage(_page_rectangle, _("Rectangle"), iter_shapes, PREFS_PAGE_TOOLS_SHAPES_RECT); this->AddNewObjectsStyle(_page_rectangle, "tools.shapes.rect"); + this->AddConvertGuidesCheckbox(_page_rectangle, "tools.shapes.rect", true); //3D box this->AddPage(_page_3dbox, _("3D Box"), iter_shapes, PREFS_PAGE_TOOLS_SHAPES_3DBOX); this->AddNewObjectsStyle(_page_3dbox, "tools.shapes.3dbox"); + this->AddConvertGuidesCheckbox(_page_3dbox, "tools.shapes.3dbox", true); //ellipse this->AddPage(_page_ellipse, _("Ellipse"), iter_shapes, PREFS_PAGE_TOOLS_SHAPES_ELLIPSE); this->AddNewObjectsStyle(_page_ellipse, "tools.shapes.arc"); -- cgit v1.2.3