diff options
author | Matthias Clasen <mclasen@redhat.com> | 2015-05-30 21:28:44 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2015-06-02 09:08:16 -0400 |
commit | 555663c68679c9b512a3aac164eb2adc9637ddc9 (patch) | |
tree | 41febf74aa03d96119f9619efb377dab12c163f5 /gtk/gtktoolpalette.c | |
parent | 5dc440295e63cc43d46b6a3cf4edac2b0d21e12b (diff) | |
download | gtk+-555663c68679c9b512a3aac164eb2adc9637ddc9.tar.gz |
tool palette: Fix compiler warnings
Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
Diffstat (limited to 'gtk/gtktoolpalette.c')
-rw-r--r-- | gtk/gtktoolpalette.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/gtk/gtktoolpalette.c b/gtk/gtktoolpalette.c index 52f5bda2cc..4d25292b4c 100644 --- a/gtk/gtktoolpalette.c +++ b/gtk/gtktoolpalette.c @@ -621,13 +621,10 @@ gtk_tool_palette_size_allocate (GtkWidget *widget, for (i = 0; i < palette->priv->groups->len; ++i) { GtkToolItemGroupInfo *group = g_ptr_array_index (palette->priv->groups, i); - GtkWidget *widget; if (!group->widget) continue; - widget = GTK_WIDGET (group->widget); - if (gtk_tool_item_group_get_n_items (group->widget)) { gint size = group_sizes[i]; @@ -649,8 +646,8 @@ gtk_tool_palette_size_allocate (GtkWidget *widget, else child_allocation.x = x; - gtk_widget_size_allocate (widget, &child_allocation); - gtk_widget_show (widget); + gtk_widget_size_allocate (GTK_WIDGET (group->widget), &child_allocation); + gtk_widget_show (GTK_WIDGET (group->widget)); if (GTK_ORIENTATION_VERTICAL == palette->priv->orientation) child_allocation.y += child_allocation.height; @@ -658,7 +655,7 @@ gtk_tool_palette_size_allocate (GtkWidget *widget, x += child_allocation.width; } else - gtk_widget_hide (widget); + gtk_widget_hide (GTK_WIDGET (group->widget)); } if (GTK_ORIENTATION_VERTICAL == palette->priv->orientation) |