diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2008-07-04 21:20:25 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2008-07-04 21:20:25 +0000 |
commit | c6e63c6d49f6faf1d18e654315a3ec116f7c2572 (patch) | |
tree | 0f8c5418feb280a7453b7b02e4167583e825dd54 /gtk/gtkmenu.c | |
parent | 7f874a4d195bccf7fe395df949c9877210755f30 (diff) | |
download | gtk+-c6e63c6d49f6faf1d18e654315a3ec116f7c2572.tar.gz |
More property deborkage
svn path=/trunk/; revision=20769
Diffstat (limited to 'gtk/gtkmenu.c')
-rw-r--r-- | gtk/gtkmenu.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c index 4d21d4a8b7..2af59de630 100644 --- a/gtk/gtkmenu.c +++ b/gtk/gtkmenu.c @@ -491,17 +491,18 @@ gtk_menu_class_init (GtkMenuClass *class) /** * GtkMenu:active: * - * The currently selected menu item. + * The index of the currently selected menu item, or -1 if no + * menu item is selected. * * Since: 2.14 **/ g_object_class_install_property (gobject_class, PROP_ACTIVE, - g_param_spec_uint ("active", - P_("Active"), - P_("The currently selected menu item"), - 0, G_MAXUINT, 0, - GTK_PARAM_READWRITE)); + g_param_spec_int ("active", + P_("Active"), + P_("The currently selected menu item"), + -1, G_MAXINT, -1, + GTK_PARAM_READWRITE)); /** * GtkMenu:accel-group: @@ -785,7 +786,7 @@ gtk_menu_set_property (GObject *object, switch (prop_id) { case PROP_ACTIVE: - gtk_menu_set_active (menu, g_value_get_uint (value)); + gtk_menu_set_active (menu, g_value_get_int (value)); break; case PROP_ACCEL_GROUP: gtk_menu_set_accel_group (menu, g_value_get_object (value)); @@ -834,7 +835,7 @@ gtk_menu_get_property (GObject *object, switch (prop_id) { case PROP_ACTIVE: - g_value_set_uint (value, g_list_index (GTK_MENU_SHELL (menu)->children, gtk_menu_get_active (menu))); + g_value_set_int (value, g_list_index (GTK_MENU_SHELL (menu)->children, gtk_menu_get_active (menu))); break; case PROP_ACCEL_GROUP: g_value_set_object (value, gtk_menu_get_accel_group (menu)); @@ -1024,6 +1025,7 @@ gtk_menu_init (GtkMenu *menu) priv->lower_arrow_state = GTK_STATE_NORMAL; priv->have_layout = FALSE; + priv->monitor_num = -1; } static void @@ -5064,7 +5066,7 @@ gtk_menu_set_monitor (GtkMenu *menu, * Retrieves the number of the monitor on which to show the menu. * * Returns: the number of the monitor on which the menu should - * be popped up or -1 + * be popped up or -1, if no monitor has been set * * Since: 2.14 **/ |