]> Pileus Git - ~andy/gtk/commitdiff
GtkToolPalette: Fix a compiler warning introduced in my last commit.
authorMurray Cumming <murrayc@murrayc.com>
Tue, 19 Jan 2010 08:04:15 +0000 (09:04 +0100)
committerTristan Van Berkom <tristan.van.berkom@gmail.com>
Sun, 4 Apr 2010 00:55:21 +0000 (20:55 -0400)
gtk/gtktoolpalette.c

index 9bb93d9020109f1fe95d3da42204e190412c2d5a..94ea45247b41a11f194d506ce6815ef8d1583416 100644 (file)
@@ -1549,12 +1549,13 @@ gtk_tool_palette_get_drop_item (GtkToolPalette *palette,
                                 gint            x,
                                 gint            y)
 {
-  GtkWidget *group = gtk_tool_palette_get_drop_group (palette, x, y);
+  GtkToolItemGroup *group = gtk_tool_palette_get_drop_group (palette, x, y);
+  GtkWidget *widget = GTK_WIDGET (group);
 
   if (group)
-    return gtk_tool_item_group_get_drop_item (GTK_TOOL_ITEM_GROUP (group),
-                                              x - group->allocation.x,
-                                              y - group->allocation.y);
+    return gtk_tool_item_group_get_drop_item (group,
+                                              x - widget->allocation.x,
+                                              y - widget->allocation.y);
 
   return NULL;
 }