More property deborkage
svn path=/trunk/; revision=20769
This commit is contained in:
parent
7f874a4d19
commit
c6e63c6d49
@ -1,5 +1,9 @@
|
||||
2008-07-04 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/tests/defaultvalue.c: Omit some more untestable properties.
|
||||
|
||||
* gtk/gtkmenu.c: Fix the initial value of the monitor property.
|
||||
|
||||
* gtk/gtkentry.c: Fix the property getter for text-length property.
|
||||
|
||||
* gtk/gtkaccelgroup.c: Fix default value for modifier-mask property.
|
||||
|
@ -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
|
||||
**/
|
||||
|
@ -161,6 +161,13 @@ test_type (gconstpointer data)
|
||||
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 @@ test_type (gconstpointer data)
|
||||
(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 @@ test_type (gconstpointer data)
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user