gtk+ r20769 - in trunk: . gtk gtk/tests
- From: matthiasc svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk+ r20769 - in trunk: . gtk gtk/tests
- Date: Fri, 4 Jul 2008 21:20:25 +0000 (UTC)
Author: matthiasc
Date: Fri Jul 4 21:20:25 2008
New Revision: 20769
URL: http://svn.gnome.org/viewvc/gtk+?rev=20769&view=rev
Log:
More property deborkage
Modified:
trunk/ChangeLog
trunk/gtk/gtkmenu.c
trunk/gtk/tests/defaultvalue.c
Modified: trunk/gtk/gtkmenu.c
==============================================================================
--- trunk/gtk/gtkmenu.c (original)
+++ trunk/gtk/gtkmenu.c Fri Jul 4 21:20:25 2008
@@ -491,17 +491,18 @@
/**
* 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 @@
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 @@
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 @@
priv->lower_arrow_state = GTK_STATE_NORMAL;
priv->have_layout = FALSE;
+ priv->monitor_num = -1;
}
static void
@@ -5064,7 +5066,7 @@
* 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
**/
Modified: trunk/gtk/tests/defaultvalue.c
==============================================================================
--- trunk/gtk/tests/defaultvalue.c (original)
+++ trunk/gtk/tests/defaultvalue.c Fri Jul 4 21:20:25 2008
@@ -161,6 +161,13 @@
strcmp (pspec->name, "current-color") == 0)
continue;
+ if (g_type_is_a (type, GTK_TYPE_COLOR_SELECTION_DIALOG) &&
+ (strcmp (pspec->name, "color-selection") == 0 ||
+ strcmp (pspec->name, "ok-button") == 0 ||
+ strcmp (pspec->name, "help-button") == 0 ||
+ strcmp (pspec->name, "cancel-button") == 0))
+ continue;
+
/* Gets set to the cwd */
if (g_type_is_a (type, GTK_TYPE_FILE_SELECTION) &&
strcmp (pspec->name, "filename") == 0)
@@ -216,10 +223,12 @@
(strcmp (pspec->name, "color-hash") == 0 ||
strcmp (pspec->name, "gtk-cursor-theme-name") == 0 ||
strcmp (pspec->name, "gtk-cursor-theme-size") == 0 ||
+ strcmp (pspec->name, "gtk-dnd-drag-threshold") == 0 ||
strcmp (pspec->name, "gtk-double-click-time") == 0 ||
+ strcmp (pspec->name, "gtk-fallback-icon-theme") == 0 ||
strcmp (pspec->name, "gtk-file-chooser-backend") == 0 ||
strcmp (pspec->name, "gtk-icon-theme-name") == 0 ||
- strcmp (pspec->name, "gtk-fallback-icon-theme") == 0 ||
+ strcmp (pspec->name, "gtk-im-module") == 0 ||
strcmp (pspec->name, "gtk-key-theme-name") == 0 ||
strcmp (pspec->name, "gtk-theme-name") == 0))
continue;
@@ -273,6 +282,10 @@
strcmp (pspec->name, "style") == 0))
continue;
+ if (g_test_verbose ())
+ g_print ("Property %s.%s\n",
+ g_type_name (pspec->owner_type),
+ pspec->name);
g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (pspec));
g_object_get_property (instance, pspec->name, &value);
check_property ("Property", pspec, &value);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]