Bug 555186 – Setting gtk-toolbar-icon-size with custom icon_size

2008-10-11  Matthias Clasen  <mclasen@redhat.com>

        Bug 555186 – Setting gtk-toolbar-icon-size with custom icon_size

        * gtk/gtktoolbar.c: Turn GtkToolbar::icon-size and
        GtkSettings::gtk-toolbar-icon-size into int properties, to
        allow the use of app-registered icon sizes.


svn path=/trunk/; revision=21632
This commit is contained in:
Matthias Clasen 2008-10-12 03:17:16 +00:00 committed by Matthias Clasen
parent 4630182ec4
commit 4dc4227c70
2 changed files with 22 additions and 14 deletions

View File

@ -1,3 +1,11 @@
2008-10-11 Matthias Clasen <mclasen@redhat.com>
Bug 555186 Setting gtk-toolbar-icon-size with custom icon_size
* gtk/gtktoolbar.c: Turn GtkToolbar::icon-size and
GtkSettings::gtk-toolbar-icon-size into int properties, to
allow the use of app-registered icon sizes.
2008-10-11 Christian Dywan <christian@imendio.com>
Bug 555676 gtk_widget_real_grab_focus assumes toplevel == window

View File

@ -543,12 +543,12 @@ gtk_toolbar_class_init (GtkToolbarClass *klass)
*/
g_object_class_install_property (gobject_class,
PROP_ICON_SIZE,
g_param_spec_enum ("icon-size",
P_("Icon size"),
P_("Size of icons in this toolbar"),
GTK_TYPE_ICON_SIZE,
DEFAULT_ICON_SIZE,
GTK_PARAM_READWRITE));
g_param_spec_int ("icon-size",
P_("Icon size"),
P_("Size of icons in this toolbar"),
0, G_MAXINT,
DEFAULT_ICON_SIZE,
GTK_PARAM_READWRITE));
/**
* GtkToolbar:icon-size-set:
@ -640,12 +640,12 @@ gtk_toolbar_class_init (GtkToolbarClass *klass)
DEFAULT_TOOLBAR_STYLE,
GTK_PARAM_READWRITE));
gtk_settings_install_property (g_param_spec_enum ("gtk-toolbar-icon-size",
P_("Toolbar icon size"),
P_("Size of icons in default toolbars"),
GTK_TYPE_ICON_SIZE,
DEFAULT_ICON_SIZE,
GTK_PARAM_READWRITE));
gtk_settings_install_property (g_param_spec_int ("gtk-toolbar-icon-size",
P_("Toolbar icon size"),
P_("Size of icons in default toolbars"),
0, G_MAXINT,
DEFAULT_ICON_SIZE,
GTK_PARAM_READWRITE));
binding_set = gtk_binding_set_by_class (klass);
@ -742,7 +742,7 @@ gtk_toolbar_set_property (GObject *object,
gtk_toolbar_set_tooltips (toolbar, g_value_get_boolean (value));
break;
case PROP_ICON_SIZE:
gtk_toolbar_set_icon_size (toolbar, g_value_get_enum (value));
gtk_toolbar_set_icon_size (toolbar, g_value_get_int (value));
break;
case PROP_ICON_SIZE_SET:
if (g_value_get_boolean (value))
@ -780,7 +780,7 @@ gtk_toolbar_get_property (GObject *object,
g_value_set_boolean (value, gtk_toolbar_get_tooltips (toolbar));
break;
case PROP_ICON_SIZE:
g_value_set_enum (value, gtk_toolbar_get_icon_size (toolbar));
g_value_set_int (value, gtk_toolbar_get_icon_size (toolbar));
break;
case PROP_ICON_SIZE_SET:
g_value_set_boolean (value, toolbar->icon_size_set);