X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fui%2Fdialog%2Fdocument-properties.cpp;h=e2dc2c0b9156ad6fb403c462d699bff94b10ca26;hb=e38df2ff7d95236e712464a1a8c472f2d9636e53;hp=e9dad3710d27859f43d1798ca9f5a6f788d0d38e;hpb=9b64c78f3873403775d80ce62fcec325a92a62a7;p=inkscape.git diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp index e9dad3710..e2dc2c0b9 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -72,10 +72,10 @@ static Inkscape::XML::NodeEventVector const _repr_events = { DocumentProperties* -DocumentProperties::create() +DocumentProperties::create(Behavior::BehaviorFactory behavior_factory) { if (_instance) return _instance; - _instance = new DocumentProperties; + _instance = new DocumentProperties(behavior_factory); _instance->init(); return _instance; } @@ -90,8 +90,8 @@ DocumentProperties::destroy() } } -DocumentProperties::DocumentProperties() - : Dialog ("dialogs.documentoptions", SP_VERB_DIALOG_NAMEDVIEW), +DocumentProperties::DocumentProperties(Behavior::BehaviorFactory behavior_factory) + : Dialog (behavior_factory, "dialogs.documentoptions", SP_VERB_DIALOG_NAMEDVIEW), _page_page(1, 1), _page_guides(1, 1), _page_snap(1, 1), _page_grids(1, 1), _grids_button_new(_("_New"), _("Create new grid.")), @@ -266,22 +266,22 @@ DocumentProperties::build_snap() { _page_snap.show(); //General options - _rcbsnbb.init (_("Snap bounding _box corners"), + _rcbsnbb.init (_("Bounding _box corners"), _("Snap bounding box corners to grid lines, to guides, and to other bounding boxes (only applicable to the selector tool)"), "inkscape:snap-bbox", _wr); - _rcbsnn.init (_("Snap _nodes"), + _rcbsnn.init (_("_Nodes"), _("Snap nodes to grid lines, to guides, to paths, and to other nodes"), "inkscape:snap-nodes", _wr); - _rcbic.init (_("Include the object's center"), - _("Also snap the rotation center of an object when snapping nodes"), - "inkscape:snap-center", _wr); + _rcbsng.init (_("_Guides"), + _("While dragging a guide, snap to object nodes. (In 'Snapping to objects', 'Snap to nodes' must also be enabled)"), + "inkscape:snap-guide", _wr); //Options for snapping to objects - _rcbsnop.init (_("Snap to _paths"), + _rcbsnop.init (_("Snap to p_aths"), _("Snap nodes to object paths"), "inkscape:object-paths", _wr); _rcbsnon.init (_("Snap to n_odes"), - _("Snap nodes to object nodes"), + _("Snap nodes or guides to object nodes"), "inkscape:object-nodes", _wr); _rsu_sno.init (_("Snap _distance"), _("Snap at any dist_ance"), _("Snapping distance, in screen pixels, for snapping to objects"), @@ -300,29 +300,34 @@ DocumentProperties::build_snap() _("If set, objects snap to the nearest guide, regardless of distance"), "guidetolerance", _wr); - std::list list; - list.push_back(_rcbic._button); - list.push_back(_rcbsnop._button); - list.push_back(_rcbsnon._button); - _rcbsnn.setSlaveButton(list); - + //Some other options + _rcbic.init (_("_Include the object's rotation center"), + _("Also snap the rotation center of an object when snapping nodes or guides"), + "inkscape:snap-center", _wr); + //Applies to both nodes and guides, but not to bboxes, that's why its located here + //Other options to locate here: e.g. visual snapping indicators on/off Gtk::Label *label_g = manage (new Gtk::Label); - label_g->set_markup (_("General")); + label_g->set_markup (_("Snapping of")); Gtk::Label *label_o = manage (new Gtk::Label); - label_o->set_markup (_("Object Snapping")); + label_o->set_markup (_("Snapping to objects")); Gtk::Label *label_gr = manage (new Gtk::Label); - label_gr->set_markup (_("Grid Snapping")); + label_gr->set_markup (_("Snapping to grids")); Gtk::Label *label_gu = manage (new Gtk::Label); - label_gu->set_markup (_("Guide Snapping")); + label_gu->set_markup (_("Snapping to guides")); + Gtk::Label *label_m = manage (new Gtk::Label); + label_m->set_markup (_("Miscellaneous")); Gtk::Widget *const array[] = { label_g, 0, 0, _rcbsnn._button, - 0, 0, //_rcbic._button will be inserted here + //0, 0, //_rcbic._button will be inserted here 0, _rcbsnbb._button, + 0, _rcbsng._button, 0, 0, + 0, 0, + 0, 0, label_o, 0, 0, _rcbsnop._button, 0, _rcbsnon._button, @@ -333,12 +338,14 @@ DocumentProperties::build_snap() 0, 0, label_gu, 0, 0, _rsu_gusn._vbox, + 0, 0, + 0, 0, + 0, 0, + label_m, 0, + 0, _rcbic._button }; attach_all(_page_snap.table(), array, G_N_ELEMENTS(array)); - - // add _rcbic manually to get some additional indenting - _page_snap.table().attach(*_rcbic._button, 1, 3, 2, 3, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0, 18, 0); } /** @@ -449,6 +456,7 @@ DocumentProperties::update() _rcbsnbb.setActive (nv->snap_manager.getSnapModeBBox()); _rcbsnn.setActive (nv->snap_manager.getSnapModeNode()); + _rcbsng.setActive (nv->snap_manager.getSnapModeGuide()); _rcbic.setActive (nv->snap_manager.getIncludeItemCenter()); _rcbsnop.setActive(nv->snap_manager.object.getSnapToItemPath()); _rcbsnon.setActive(nv->snap_manager.object.getSnapToItemNode());