demos/gtk-demo/toolpalette.c: Avoid C99ism

Avoid declaring variable at the middle of the block
This commit is contained in:
Chun-wei Fan 2013-09-23 13:25:49 +08:00
parent 9b8f740635
commit a3519988f5

View File

@ -296,6 +296,7 @@ interactive_canvas_drag_data_received (GtkWidget *widget,
GtkWidget *palette = gtk_drag_get_source_widget (context);
GtkWidget *tool_item = NULL;
CanvasItem *item;
while (palette && !GTK_IS_TOOL_PALETTE (palette))
palette = gtk_widget_get_parent (palette);
@ -317,7 +318,7 @@ interactive_canvas_drag_data_received (GtkWidget *widget,
drop_item = NULL;
}
CanvasItem *item = canvas_item_new (widget, GTK_TOOL_BUTTON (tool_item), x, y);
item = canvas_item_new (widget, GTK_TOOL_BUTTON (tool_item), x, y);
/* Either create a new item or just create a preview item,
depending on why the drag data was requested. */