[gtk+] demos/gtk-demo/toolpalette.c: Avoid C99ism



commit a3519988f582a83d1087f5fac87d5b30b8183cd6
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Mon Sep 23 13:25:49 2013 +0800

    demos/gtk-demo/toolpalette.c: Avoid C99ism
    
    Avoid declaring variable at the middle of the block

 demos/gtk-demo/toolpalette.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/demos/gtk-demo/toolpalette.c b/demos/gtk-demo/toolpalette.c
index 37e896b..9accab5 100644
--- a/demos/gtk-demo/toolpalette.c
+++ b/demos/gtk-demo/toolpalette.c
@@ -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. */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]