Code

Use frames in the snapping tab in the document properties dialog
authordvlierop2 <dvlierop2@users.sourceforge.net>
Tue, 11 Dec 2007 18:51:22 +0000 (18:51 +0000)
committerdvlierop2 <dvlierop2@users.sourceforge.net>
Tue, 11 Dec 2007 18:51:22 +0000 (18:51 +0000)
src/ui/dialog/document-properties.cpp
src/ui/dialog/document-properties.h

index ae536b47e03f63d4bd13221eb3ede72bccb78d0d..2a90cb9ee0e0a36822bbce7620122c8a6b505b85 100644 (file)
@@ -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 (_("<b>Snapping of</b>"));
     Gtk::Label *label_o = manage (new Gtk::Label);
-    label_o->set_markup (_("<b>Snapping to objects</b>"));
+    label_o->set_markup (_("Snap to objects"));
     Gtk::Label *label_gr = manage (new Gtk::Label);
-    label_gr->set_markup (_("<b>Snapping to grids</b>"));
+    label_gr->set_markup (_("Snap to grids"));
     Gtk::Label *label_gu = manage (new Gtk::Label);
-    label_gu->set_markup (_("<b>Snapping to guides</b>"));
-    Gtk::Label *label_m = manage (new Gtk::Label);
-    label_m->set_markup (_("<b>Miscellaneous</b>"));
-
-    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 (_("<b>Snapping to intersections of</b>"));
+    label_i->set_markup (_("<b>Snap to intersections of</b>"));
     Gtk::Label *label_m = manage (new Gtk::Label);
     label_m->set_markup (_("<b>Miscellaneous</b>"));
 
index a6fe48ffa0ea475f22b0a64b4c160f7ef5cf2041..11c19640381493c6e9e21ea40a12bfd2930a6d7e 100644 (file)
@@ -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;