From ee3ad2b5b26e1e7be85a2de966ac7f208d88ff45 Mon Sep 17 00:00:00 2001 From: gustav_b Date: Thu, 6 Sep 2007 19:41:20 +0000 Subject: [PATCH] Group dock related prefs, add hidden prefs for dock bar and switcher appearance. --- src/preferences-skeleton.h | 5 ++++- src/ui/widget/dock-item.cpp | 2 +- src/ui/widget/dock.cpp | 13 ++++++++++++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/preferences-skeleton.h b/src/preferences-skeleton.h index 97d399f28..dad2738cd 100644 --- a/src/preferences-skeleton.h +++ b/src/preferences-skeleton.h @@ -196,7 +196,10 @@ static char const preferences_skeleton[] = " \n" " \n" " \n" -" \n" +" \n" // GDL_SWITCHER_STYLE_BOTH " \n" #ifdef WIN32 // FIXME: Temporary Win32 special code to enable transient dialogs " \n" diff --git a/src/ui/widget/dock-item.cpp b/src/ui/widget/dock-item.cpp index 46a2667c7..58a0e87f4 100644 --- a/src/ui/widget/dock-item.cpp +++ b/src/ui/widget/dock-item.cpp @@ -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); diff --git a/src/ui/widget/dock.cpp b/src/ui/widget/dock.cpp index 828b70451..0f92f7217 100644 --- a/src/ui/widget/dock.cpp +++ b/src/ui/widget/dock.cpp @@ -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(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(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); -- 2.30.2