From 122d2a32882f950a90bd042baa752b899d3a41af Mon Sep 17 00:00:00 2001 From: Murray Cumming Date: Thu, 14 Jan 2010 10:26:49 +0100 Subject: [PATCH] GtkToolPalette: Use GtkToolItemGroup* instead of GtkWidget* for setter parameters. See Bug #567729 --- gtk/gtktoolpalette.c | 44 ++++++++++++++++++++++++-------------------- gtk/gtktoolpalette.h | 12 ++++++------ 2 files changed, 30 insertions(+), 26 deletions(-) diff --git a/gtk/gtktoolpalette.c b/gtk/gtktoolpalette.c index ac5a5a7773..ad90adbd0d 100644 --- a/gtk/gtktoolpalette.c +++ b/gtk/gtktoolpalette.c @@ -798,11 +798,13 @@ gtk_tool_palette_set_child_property (GtkContainer *container, switch (prop_id) { case CHILD_PROP_EXCLUSIVE: - gtk_tool_palette_set_exclusive (palette, child, g_value_get_boolean (value)); + gtk_tool_palette_set_exclusive (palette, GTK_TOOL_ITEM_GROUP (child), + g_value_get_boolean (value)); break; case CHILD_PROP_EXPAND: - gtk_tool_palette_set_expand (palette, child, g_value_get_boolean (value)); + gtk_tool_palette_set_expand (palette, GTK_TOOL_ITEM_GROUP (child), + g_value_get_boolean (value)); break; default: @@ -823,11 +825,13 @@ gtk_tool_palette_get_child_property (GtkContainer *container, switch (prop_id) { case CHILD_PROP_EXCLUSIVE: - g_value_set_boolean (value, gtk_tool_palette_get_exclusive (palette, child)); + g_value_set_boolean (value, + gtk_tool_palette_get_exclusive (palette, GTK_TOOL_ITEM_GROUP (child))); break; case CHILD_PROP_EXPAND: - g_value_set_boolean (value, gtk_tool_palette_get_expand (palette, child)); + g_value_set_boolean (value, + gtk_tool_palette_get_expand (palette, GTK_TOOL_ITEM_GROUP (child))); break; default: @@ -1294,9 +1298,9 @@ _gtk_tool_palette_compare_groups (gconstpointer a, * Since: 2.20 */ void -gtk_tool_palette_set_group_position (GtkToolPalette *palette, - GtkWidget *group, - gint position) +gtk_tool_palette_set_group_position (GtkToolPalette *palette, + GtkToolItemGroup *group, + gint position) { GtkToolItemGroupInfo *group_new; GtkToolItemGroupInfo *group_old; @@ -1362,9 +1366,9 @@ gtk_tool_palette_group_notify_collapsed (GtkToolItemGroup *group, * Since: 2.20 */ void -gtk_tool_palette_set_exclusive (GtkToolPalette *palette, - GtkWidget *group, - gboolean exclusive) +gtk_tool_palette_set_exclusive (GtkToolPalette *palette, + GtkToolItemGroup *group, + gboolean exclusive) { GtkToolItemGroupInfo *group_info; gint position; @@ -1399,7 +1403,7 @@ gtk_tool_palette_set_exclusive (GtkToolPalette *palette, } gtk_tool_palette_group_notify_collapsed (group_info->widget, NULL, palette); - gtk_widget_child_notify (group, "exclusive"); + gtk_widget_child_notify (GTK_WIDGET (group), "exclusive"); } /** @@ -1413,8 +1417,8 @@ gtk_tool_palette_set_exclusive (GtkToolPalette *palette, * Since: 2.20 */ void -gtk_tool_palette_set_expand (GtkToolPalette *palette, - GtkWidget *group, +gtk_tool_palette_set_expand (GtkToolPalette *palette, + GtkToolItemGroup *group, gboolean expand) { GtkToolItemGroupInfo *group_info; @@ -1432,7 +1436,7 @@ gtk_tool_palette_set_expand (GtkToolPalette *palette, { group_info->expand = expand; gtk_widget_queue_resize (GTK_WIDGET (palette)); - gtk_widget_child_notify (group, "expand"); + gtk_widget_child_notify (GTK_WIDGET (group), "expand"); } } @@ -1449,8 +1453,8 @@ gtk_tool_palette_set_expand (GtkToolPalette *palette, * Since: 2.20 */ gint -gtk_tool_palette_get_group_position (GtkToolPalette *palette, - GtkWidget *group) +gtk_tool_palette_get_group_position (GtkToolPalette *palette, + GtkToolItemGroup *group) { guint i; @@ -1480,8 +1484,8 @@ gtk_tool_palette_get_group_position (GtkToolPalette *palette, * Since: 2.20 */ gboolean -gtk_tool_palette_get_exclusive (GtkToolPalette *palette, - GtkWidget *group) +gtk_tool_palette_get_exclusive (GtkToolPalette *palette, + GtkToolItemGroup *group) { gint position; GtkToolItemGroupInfo *info; @@ -1510,8 +1514,8 @@ gtk_tool_palette_get_exclusive (GtkToolPalette *palette, * Since: 2.20 */ gboolean -gtk_tool_palette_get_expand (GtkToolPalette *palette, - GtkWidget *group) +gtk_tool_palette_get_expand (GtkToolPalette *palette, + GtkToolItemGroup *group) { gint position; GtkToolItemGroupInfo *info; diff --git a/gtk/gtktoolpalette.h b/gtk/gtktoolpalette.h index e45b9a1dcf..39005e57fd 100644 --- a/gtk/gtktoolpalette.h +++ b/gtk/gtktoolpalette.h @@ -89,21 +89,21 @@ GType gtk_tool_palette_get_type (void) G_G GtkWidget* gtk_tool_palette_new (void); void gtk_tool_palette_set_group_position (GtkToolPalette *palette, - GtkWidget *group, + GtkToolItemGroup *group, gint position); void gtk_tool_palette_set_exclusive (GtkToolPalette *palette, - GtkWidget *group, + GtkToolItemGroup *group, gboolean exclusive); void gtk_tool_palette_set_expand (GtkToolPalette *palette, - GtkWidget *group, + GtkToolItemGroup *group, gboolean expand); gint gtk_tool_palette_get_group_position (GtkToolPalette *palette, - GtkWidget *group); + GtkToolItemGroup *group); gboolean gtk_tool_palette_get_exclusive (GtkToolPalette *palette, - GtkWidget *group); + GtkToolItemGroup *group); gboolean gtk_tool_palette_get_expand (GtkToolPalette *palette, - GtkWidget *group); + GtkToolItemGroup *group); void gtk_tool_palette_set_icon_size (GtkToolPalette *palette, GtkIconSize icon_size);