Code

Group dock related prefs, add hidden prefs for dock bar and switcher appearance.
authorgustav_b <gustav_b@users.sourceforge.net>
Thu, 6 Sep 2007 19:41:20 +0000 (19:41 +0000)
committergustav_b <gustav_b@users.sourceforge.net>
Thu, 6 Sep 2007 19:41:20 +0000 (19:41 +0000)
src/preferences-skeleton.h
src/ui/widget/dock-item.cpp
src/ui/widget/dock.cpp

index 97d399f2891179bde36f0ca930724b4d37f440b5..dad2738cd0b0b04931df2b7ec054ed77e9c92a39 100644 (file)
@@ -196,7 +196,10 @@ static char const preferences_skeleton[] =
 "    <group id=\"autoscrolldistance\" value=\"-10\"/>\n"
 "    <group id=\"simplifythreshold\" value=\"0.002\"/>\n"
 "    <group id=\"dialogtype\" value=\"1\"/>\n"
-"    <group id=\"dialogscancenterdock\" value=\"1\"/>\n"
+"    <group id=\"dock\" "
+"           cancenterdock=\"1\""
+"           dockbarstyle=\"2\""      // GDL_DOCK_BAR_BOTH
+"           switcherstyle=\"2\"/>\n" // GDL_SWITCHER_STYLE_BOTH
 "    <group id=\"dialogsskiptaskbar\" value=\"1\"/>\n"
 #ifdef WIN32 // FIXME: Temporary Win32 special code to enable transient dialogs
 "    <group id=\"dialogsontopwin32\" value=\"0\"/>\n"
index 46a2667c7b125ea4b4fe5c4543b98c560915825e..58a0e87f451fe5ca06c48bce2cee19ecd058c4a3 100644 (file)
@@ -49,7 +49,7 @@ DockItem::DockItem(Dock& dock, const Glib::ustring& name, const Glib::ustring& l
 
 
     GdlDockItemBehavior gdl_dock_behavior = 
-        (prefs_get_int_attribute_limited ("options.dialogscancenterdock", "value", 1, 0, 1) == 0 ?
+        (prefs_get_int_attribute_limited ("options.dock", "cancenterdock", 1, 0, 1) == 0 ?
          GDL_DOCK_ITEM_BEH_CANT_DOCK_CENTER
          : GDL_DOCK_ITEM_BEH_NORMAL);
 
index 828b7045102b75f5c5c7fb4b9e63539b630b7d46..0f92f7217eb85add460ea17fe490fe8a93fa996c 100644 (file)
@@ -10,6 +10,7 @@
  */
 
 #include "inkscape.h"
+#include "prefs-utils.h"
 #include "desktop.h"
 
 #include "dock.h"
@@ -71,10 +72,20 @@ Dock::Dock(Gtk::Orientation orientation)
 
     _scrolled_window->set_size_request(0);
 
+    GdlSwitcherStyle gdl_switcher_style = 
+        static_cast<GdlSwitcherStyle>(prefs_get_int_attribute_limited("options.dock", "switcherstyle", 
+                                                                      GDL_SWITCHER_STYLE_BOTH, 0, 4));
+
     g_object_set (GDL_DOCK_OBJECT(_gdl_dock)->master,
-                  "switcher-style", GDL_SWITCHER_STYLE_BOTH,
+                  "switcher-style", gdl_switcher_style,
                   NULL);
 
+    GdlDockBarStyle gdl_dock_bar_style = 
+        static_cast<GdlDockBarStyle>(prefs_get_int_attribute_limited("options.dock", "dockbarstyle", 
+                                                                     GDL_DOCK_BAR_BOTH, 0, 3));
+
+    gdl_dock_bar_set_style(_gdl_dock_bar, gdl_dock_bar_style);
+
     g_signal_connect(G_OBJECT(INKSCAPE), "dialogs_hide", G_CALLBACK(hideCallback), (void *)this);
     g_signal_connect(G_OBJECT(INKSCAPE), "dialogs_unhide", G_CALLBACK(unhideCallback), (void *)this);