summaryrefslogtreecommitdiffstats
path: root/src/widgets/toolbox.cpp
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2007-05-08 23:57:56 +0000
committerjoncruz <joncruz@users.sourceforge.net>2007-05-08 23:57:56 +0000
commitba5ba64541255239a702061a5af7058f2f90a194 (patch)
tree90a53d7a61e8cd129eb4cbc29f6899cbfb02361c /src/widgets/toolbox.cpp
parentcommitted patch #1713558 by John Faith. adds the definition of isinf for Mac ... (diff)
downloadinkscape-ba5ba64541255239a702061a5af7058f2f90a194.tar.gz
inkscape-ba5ba64541255239a702061a5af7058f2f90a194.zip
Added preference to allow for system toolbox size
(bzr r2985)
Diffstat (limited to 'src/widgets/toolbox.cpp')
-rw-r--r--src/widgets/toolbox.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp
index 91b94fe4d..dad4f11f6 100644
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
@@ -909,7 +909,14 @@ static void
setup_tool_toolbox(GtkWidget *toolbox, SPDesktop *desktop)
{
GtkTooltips *tooltips=GTK_TOOLTIPS(g_object_get_data(G_OBJECT(toolbox), "tooltips"));
- gint shrinkLeft = prefs_get_int_attribute_limited( "toolbox.left", "small", 0, 0, 1 );
+ gint shrinkLeft = prefs_get_int_attribute_limited( "toolbox.tools", "small", 0, 0, 1 );
+ if ( (shrinkLeft == 0) && (prefs_get_int_attribute_limited( "toolbox.tools", "small", 1, 0, 1 ) == 1) ) {
+ // "toolbox.tools" was not set. Fallback to older value
+ shrinkLeft = prefs_get_int_attribute_limited( "toolbox.left", "small", 0, 0, 1 );
+
+ // Copy the setting forwards
+ prefs_set_int_attribute( "toolbox.tools", "small", shrinkLeft );
+ }
Inkscape::IconSize toolboxSize = shrinkLeft ? Inkscape::ICON_SIZE_SMALL_TOOLBAR : Inkscape::ICON_SIZE_LARGE_TOOLBAR;
for (int i = 0 ; tools[i].type_name ; i++ ) {
@@ -994,7 +1001,9 @@ setup_aux_toolbox(GtkWidget *toolbox, SPDesktop *desktop)
gint shrinkTop = prefs_get_int_attribute_limited( "toolbox", "small", 1, 0, 1 );
Inkscape::IconSize toolboxSize = shrinkTop ? Inkscape::ICON_SIZE_SMALL_TOOLBAR : Inkscape::ICON_SIZE_LARGE_TOOLBAR;
- gtk_toolbar_set_style( GTK_TOOLBAR(toolBar), GTK_TOOLBAR_ICONS );
+ if ( prefs_get_int_attribute_limited( "toolbox", "icononly", 1, 0, 1 ) ) {
+ gtk_toolbar_set_style( GTK_TOOLBAR(toolBar), GTK_TOOLBAR_ICONS );
+ }
gtk_toolbar_set_icon_size( GTK_TOOLBAR(toolBar), static_cast<GtkIconSize>(toolboxSize) );
@@ -1090,7 +1099,9 @@ setup_commands_toolbox(GtkWidget *toolbox, SPDesktop *desktop)
gtk_ui_manager_add_ui_from_string( mgr, descr, -1, &errVal );
GtkWidget* toolBar = gtk_ui_manager_get_widget( mgr, "/ui/CommandsToolbar" );
- gtk_toolbar_set_style( GTK_TOOLBAR(toolBar), GTK_TOOLBAR_ICONS );
+ if ( prefs_get_int_attribute_limited( "toolbox", "icononly", 1, 0, 1 ) ) {
+ gtk_toolbar_set_style( GTK_TOOLBAR(toolBar), GTK_TOOLBAR_ICONS );
+ }
gint shrinkTop = prefs_get_int_attribute_limited( "toolbox", "small", 1, 0, 1 );
Inkscape::IconSize toolboxSize = shrinkTop ? Inkscape::ICON_SIZE_SMALL_TOOLBAR : Inkscape::ICON_SIZE_LARGE_TOOLBAR;
gtk_toolbar_set_icon_size( GTK_TOOLBAR(toolBar), (GtkIconSize)toolboxSize );