summaryrefslogtreecommitdiff
path: root/gtk/gtktoolbar.c
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2013-10-18 16:12:58 -0400
committerJasper St. Pierre <jstpierre@mecheye.net>2013-10-18 16:14:26 -0400
commit3971ed1779862c8bbf2280f8dc1e1c11ae8a1c37 (patch)
tree3a1391161854b9c6b5b825f71f39d16b12ab59ae /gtk/gtktoolbar.c
parent4ffcfc1593ad0dfc95eefde7e2f5b008ac7f1598 (diff)
downloadgtk+-3971ed1779862c8bbf2280f8dc1e1c11ae8a1c37.tar.gz
gtktoolbar: Make the icon-size property actually an enum
As this is what it's interpreted as.
Diffstat (limited to 'gtk/gtktoolbar.c')
-rw-r--r--gtk/gtktoolbar.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c
index ac07f3e2fe..3ec7963d8b 100644
--- a/gtk/gtktoolbar.c
+++ b/gtk/gtktoolbar.c
@@ -526,12 +526,12 @@ gtk_toolbar_class_init (GtkToolbarClass *klass)
*/
g_object_class_install_property (gobject_class,
PROP_ICON_SIZE,
- 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));
+ 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));
/**
* GtkToolbar:icon-size-set:
@@ -737,7 +737,7 @@ gtk_toolbar_set_property (GObject *object,
gtk_toolbar_set_show_arrow (toolbar, g_value_get_boolean (value));
break;
case PROP_ICON_SIZE:
- gtk_toolbar_set_icon_size (toolbar, g_value_get_int (value));
+ gtk_toolbar_set_icon_size (toolbar, g_value_get_enum (value));
break;
case PROP_ICON_SIZE_SET:
if (g_value_get_boolean (value))
@@ -772,7 +772,7 @@ gtk_toolbar_get_property (GObject *object,
g_value_set_boolean (value, priv->show_arrow);
break;
case PROP_ICON_SIZE:
- g_value_set_int (value, gtk_toolbar_get_icon_size (toolbar));
+ g_value_set_enum (value, gtk_toolbar_get_icon_size (toolbar));
break;
case PROP_ICON_SIZE_SET:
g_value_set_boolean (value, priv->icon_size_set);
@@ -2949,8 +2949,7 @@ gtk_toolbar_get_nth_item (GtkToolbar *toolbar,
*
* Retrieves the icon size for the toolbar. See gtk_toolbar_set_icon_size().
*
- * Return value: (type int): the current icon size for the icons on
- * the toolbar.
+ * Return value: the current icon size for the icons on the toolbar.
**/
GtkIconSize
gtk_toolbar_get_icon_size (GtkToolbar *toolbar)
@@ -3111,8 +3110,7 @@ gtk_toolbar_finalize (GObject *object)
/**
* gtk_toolbar_set_icon_size:
* @toolbar: A #GtkToolbar
- * @icon_size: (type int): The #GtkIconSize that stock icons in the
- * toolbar shall have.
+ * @icon_size: The #GtkIconSize that stock icons in the toolbar shall have.
*
* This function sets the size of stock icons in the toolbar. You
* can call it both before you add the icons and after they've been