From: dvlierop2 Date: Tue, 11 Dec 2007 18:51:22 +0000 (+0000) Subject: Use frames in the snapping tab in the document properties dialog X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6d326b4f642556fbf28e0b5e07180b5bf490914d;p=inkscape.git Use frames in the snapping tab in the document properties dialog --- diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp index ae536b47e..2a90cb9ee 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -304,41 +304,54 @@ DocumentProperties::build_snap() slaves.push_back(_rcbsnbbn._button); _rcbsnbb.setSlaveButton(slaves); - Gtk::Label *label_g = manage (new Gtk::Label); - label_g->set_markup (_("Snapping of")); Gtk::Label *label_o = manage (new Gtk::Label); - label_o->set_markup (_("Snapping to objects")); + label_o->set_markup (_("Snap to objects")); Gtk::Label *label_gr = manage (new Gtk::Label); - label_gr->set_markup (_("Snapping to grids")); + label_gr->set_markup (_("Snap to grids")); Gtk::Label *label_gu = manage (new Gtk::Label); - 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_gu->set_markup (_("Snap to guides")); + + Gtk::Widget *const array_from[] = { - label_g, 0, 0, _rcbsnn._button, - 0, _rcbsnbb._button, - 0, 0, - 0, 0, - 0, 0, - 0, 0, + 0, _rcbsnbb._button + }; + + attach_all(_snap_table_from, array_from, G_N_ELEMENTS(array_from)); + + _snap_frame_from.set_label(_("What snaps")); + _page_snap.pack_start (_snap_frame_from, false, false, 0); + _snap_table_from.resize(3, 2); + _snap_table_from.set_border_width (4); + _snap_table_from.set_row_spacings (4); + _snap_table_from.set_col_spacings (4); + _snap_frame_from.add(_snap_table_from); + + Gtk::Widget *const array_to[] = + { label_o, 0, - 0, _rcbsnop._button, - 0, _rcbsnon._button, + 0, _rcbsnop._button, + 0, _rcbsnon._button, 0, _rcbsnbbp._button, 0, _rcbsnbbn._button, 0, _rsu_sno._vbox, - 0, 0, + 0, 0, label_gr, 0, 0, _rsu_sn._vbox, - 0, 0, - label_gu, 0, - 0, _rsu_gusn._vbox + 0, 0, + label_gu, 0, + 0, _rsu_gusn._vbox }; - - attach_all(_page_snap.table(), array, G_N_ELEMENTS(array)); + + attach_all(_snap_table_to, array_to, G_N_ELEMENTS(array_to)); + + _snap_frame_to.set_label(_("What to snap to")); + _page_snap.pack_start (_snap_frame_to, false, false, 0); + _snap_table_to.resize(3, 2); + _snap_table_to.set_border_width (4); + _snap_table_to.set_row_spacings (4); + _snap_table_to.set_col_spacings (4); + _snap_frame_to.add(_snap_table_to); } void @@ -362,7 +375,7 @@ DocumentProperties::build_snap_dtls() //Other options to locate here: e.g. visual snapping indicators on/off Gtk::Label *label_i= manage (new Gtk::Label); - label_i->set_markup (_("Snapping to intersections of")); + label_i->set_markup (_("Snap to intersections of")); Gtk::Label *label_m = manage (new Gtk::Label); label_m->set_markup (_("Miscellaneous")); diff --git a/src/ui/dialog/document-properties.h b/src/ui/dialog/document-properties.h index a6fe48ffa..11c196403 100644 --- a/src/ui/dialog/document-properties.h +++ b/src/ui/dialog/document-properties.h @@ -77,6 +77,10 @@ protected: RegisteredUnitMenu _rum_gusn; RegisteredColorPicker _rcp_gui, _rcp_hgui; //--------------------------------------------------------------- + Gtk::Frame _snap_frame_from; + Gtk::Frame _snap_frame_to; + Gtk::Table _snap_table_from; + Gtk::Table _snap_table_to; RegisteredCheckButton _rcbsnbb, _rcbsnn, _rcbsnop; RegisteredCheckButton _rcbsnon, _rcbsnbbp, _rcbsnbbn; RegisteredUnitMenu _rumso;