[gtk+] gtktoolbar: Make the icon-size property actually an enum
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gtktoolbar: Make the icon-size property actually an enum
- Date: Fri, 18 Oct 2013 20:14:37 +0000 (UTC)
commit 3971ed1779862c8bbf2280f8dc1e1c11ae8a1c37
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Oct 18 16:12:58 2013 -0400
gtktoolbar: Make the icon-size property actually an enum
As this is what it's interpreted as.
gtk/gtktoolbar.c | 22 ++++++++++------------
1 files changed, 10 insertions(+), 12 deletions(-)
---
diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c
index ac07f3e..3ec7963 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]