mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-19 09:50:06 +00:00
GtkToolPalette: Use GtkToolItemGroup* instead of GtkWidget* for setter parameters.
See Bug #567729
This commit is contained in:
parent
4b1299ab8f
commit
122d2a3288
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user