[libgda] Removed deprecated GTK+ symbols



commit 9a0060e2309a5120bb75380f3e8df605ef07803a
Author: Vivien Malerba <malerba gnome-db org>
Date:   Sun Mar 14 16:28:39 2010 +0100

    Removed deprecated GTK+ symbols
    
    
    for Gnome Goal
    http://live.gnome.org/GnomeGoals/RemoveDeprecatedSymbols/GTK+

 control-center/dsn-config.c                        |    8 ++--
 libgda-ui/gdaui-data-filter.c                      |    2 +-
 libgda-ui/gdaui-raw-grid.c                         |   45 ++++++++++----------
 tools/browser/canvas/browser-canvas-db-relations.c |    6 +-
 tools/browser/canvas/browser-canvas-fkey.c         |    2 +-
 tools/browser/canvas/browser-canvas.c              |   20 ++++----
 tools/browser/connection-binding-properties.c      |    4 +-
 7 files changed, 44 insertions(+), 43 deletions(-)
---
diff --git a/control-center/dsn-config.c b/control-center/dsn-config.c
index 0cc7570..2ac031d 100644
--- a/control-center/dsn-config.c
+++ b/control-center/dsn-config.c
@@ -88,10 +88,10 @@ list_popup_cb (GdauiRawGrid *grid, GtkMenu *menu, gpointer user_data)
 	gtk_widget_set_sensitive (item_delete, ok);
 	gtk_widget_set_sensitive (item_properties, ok);
 
-	gtk_menu_prepend (menu, gtk_separator_menu_item_new ());
-	gtk_menu_prepend (menu, item_delete);
-	gtk_menu_prepend (menu, gtk_separator_menu_item_new ());
-	gtk_menu_prepend (menu, item_properties);
+	gtk_menu_shell_prepend (GTK_MENU_SHELL (menu), gtk_separator_menu_item_new ());
+	gtk_menu_shell_prepend (GTK_MENU_SHELL (menu), item_delete);
+	gtk_menu_shell_prepend (GTK_MENU_SHELL (menu), gtk_separator_menu_item_new ());
+	gtk_menu_shell_prepend (GTK_MENU_SHELL (menu), item_properties);
 }
 
 /*
diff --git a/libgda-ui/gdaui-data-filter.c b/libgda-ui/gdaui-data-filter.c
index 378dce7..7e7dc69 100644
--- a/libgda-ui/gdaui-data-filter.c
+++ b/libgda-ui/gdaui-data-filter.c
@@ -122,7 +122,7 @@ set_wait_cursor (GtkWidget *w)
 #else
 		gdk_window_set_cursor (parent->window, cursor);
 #endif
-		gdk_cursor_destroy (cursor);
+		gdk_cursor_unref (cursor);
 	}
 }
 
diff --git a/libgda-ui/gdaui-raw-grid.c b/libgda-ui/gdaui-raw-grid.c
index 276e8d4..9885a76 100644
--- a/libgda-ui/gdaui-raw-grid.c
+++ b/libgda-ui/gdaui-raw-grid.c
@@ -1749,30 +1749,31 @@ tree_view_popup_button_pressed_cb (GtkWidget *widget, GdkEventButton *event, Gda
 	/* create the menu */
 	menu = gtk_menu_new ();
 	if (sel_mode == GTK_SELECTION_MULTIPLE)
-		gtk_menu_append (GTK_MENU (menu),
-				 new_menu_item (_("Select _All"), FALSE,
-						G_CALLBACK (menu_select_all_cb), grid));
-
+		gtk_menu_shell_append (GTK_MENU_SHELL (menu),
+				       new_menu_item (_("Select _All"), FALSE,
+						      G_CALLBACK (menu_select_all_cb), grid));
+	
 	if ((sel_mode == GTK_SELECTION_SINGLE) || (sel_mode == GTK_SELECTION_MULTIPLE))
-		gtk_menu_append (GTK_MENU (menu),
-				 new_menu_item (_("_Clear Selection"), FALSE,
-						G_CALLBACK (menu_unselect_all_cb), grid));
-	gtk_menu_append (GTK_MENU (menu),
-			 new_check_menu_item (_("Show Column _Titles"),
-					      gtk_tree_view_get_headers_visible (tree_view),
-					      G_CALLBACK (menu_show_columns_cb), grid));
-
-	gtk_menu_append (GTK_MENU (menu),
-			 new_menu_item (_("_Set filter"), FALSE,
-					G_CALLBACK (menu_set_filter_cb), grid));
-	gtk_menu_append (GTK_MENU (menu),
-			 new_menu_item (_("_Unset filter"), FALSE,
-					G_CALLBACK (menu_unset_filter_cb), grid));
-
+		gtk_menu_shell_append (GTK_MENU_SHELL (menu),
+				       new_menu_item (_("_Clear Selection"), FALSE,
+						      G_CALLBACK (menu_unselect_all_cb), grid));
+	gtk_menu_shell_append (GTK_MENU_SHELL (menu),
+			       new_check_menu_item (_("Show Column _Titles"),
+						    gtk_tree_view_get_headers_visible (tree_view),
+						    G_CALLBACK (menu_show_columns_cb), grid));
+	
+	gtk_menu_shell_append (GTK_MENU_SHELL (menu),
+			       new_menu_item (_("_Set filter"), FALSE,
+					      G_CALLBACK (menu_set_filter_cb), grid));
+	gtk_menu_shell_append (GTK_MENU_SHELL (menu),
+			       new_menu_item (_("_Unset filter"), FALSE,
+					      G_CALLBACK (menu_unset_filter_cb), grid));
+	
 	if (sel_mode != GTK_SELECTION_NONE) {
-		gtk_menu_append (GTK_MENU (menu), gtk_separator_menu_item_new ());
-		gtk_menu_append (GTK_MENU (menu), new_menu_item (GTK_STOCK_SAVE_AS, TRUE,
-								 G_CALLBACK (menu_save_as_cb), grid));
+		gtk_menu_shell_append (GTK_MENU_SHELL (menu), gtk_separator_menu_item_new ());
+		gtk_menu_shell_append (GTK_MENU_SHELL (menu), new_menu_item (GTK_STOCK_SAVE_AS, TRUE,
+									     G_CALLBACK (menu_save_as_cb),
+									     grid));
 	}
 
 	/* allow listeners to add their custom menu items */
diff --git a/tools/browser/canvas/browser-canvas-db-relations.c b/tools/browser/canvas/browser-canvas-db-relations.c
index 44d4353..7650756 100644
--- a/tools/browser/canvas/browser-canvas-db-relations.c
+++ b/tools/browser/canvas/browser-canvas-db-relations.c
@@ -347,11 +347,11 @@ canvas_entity_popup_func (BrowserCanvasTable *ce)
 	menu = gtk_menu_new ();
 	entry = gtk_menu_item_new_with_label (_("Remove"));
 	g_signal_connect (G_OBJECT (entry), "activate", G_CALLBACK (popup_func_delete_cb), ce);
-	gtk_menu_append (GTK_MENU (menu), entry);
+	gtk_menu_shell_append (GTK_MENU_SHELL (menu), entry);
 	gtk_widget_show (entry);
 	entry = gtk_menu_item_new_with_label (_("Add referenced tables"));
 	g_signal_connect (G_OBJECT (entry), "activate", G_CALLBACK (popup_func_add_depend_cb), ce);
-	gtk_menu_append (GTK_MENU (menu), entry);
+	gtk_menu_shell_append (GTK_MENU_SHELL (menu), entry);
 	gtk_widget_show (entry);
 
 	return menu;
@@ -512,7 +512,7 @@ build_context_menu (BrowserCanvas *canvas)
 	menu = gtk_menu_new ();
 	submitem = gtk_menu_item_new_with_label (_("Add table"));
 	gtk_widget_show (submitem);
-	gtk_menu_append (menu, submitem);
+	gtk_menu_shell_append (GTK_MENU_SHELL (menu), submitem);
 	g_signal_connect (G_OBJECT (submitem), "activate", G_CALLBACK (popup_add_table_cb), canvas);
 
 	return menu;
diff --git a/tools/browser/canvas/browser-canvas-fkey.c b/tools/browser/canvas/browser-canvas-fkey.c
index b00363a..7642ef7 100644
--- a/tools/browser/canvas/browser-canvas-fkey.c
+++ b/tools/browser/canvas/browser-canvas-fkey.c
@@ -458,7 +458,7 @@ single_item_button_press_event_cb (GooCanvasItem *ci, GooCanvasItem *target_item
 	entry = gtk_menu_item_new_with_label (_("Remove"));
 	g_object_set_data (G_OBJECT (entry), "fkcons", fkcons);
 	g_signal_connect (G_OBJECT (entry), "activate", G_CALLBACK (popup_delete_cb), cc);
-	gtk_menu_append (GTK_MENU (menu), entry);
+	gtk_menu_shell_append (GTK_MENU_SHELL (menu), entry);
 	gtk_widget_show (entry);
 	gtk_menu_popup (GTK_MENU (menu), NULL, NULL,
 			NULL, NULL, ((GdkEventButton *)event)->button,
diff --git a/tools/browser/canvas/browser-canvas.c b/tools/browser/canvas/browser-canvas.c
index a3e5ef1..6810dcd 100644
--- a/tools/browser/canvas/browser-canvas.c
+++ b/tools/browser/canvas/browser-canvas.c
@@ -366,50 +366,50 @@ canvas_event_cb (BrowserCanvas *canvas, GdkEvent *event, GooCanvas *gcanvas)
 				else {
 					mitem = gtk_separator_menu_item_new ();
 					gtk_widget_show (mitem);
-					gtk_menu_append (menu, mitem);
+					gtk_menu_shell_append (GTK_MENU_SHELL (menu), mitem);
 				}
 				mitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_ZOOM_IN, NULL);
 				gtk_widget_show (mitem);
-				gtk_menu_append (menu, mitem);
+				gtk_menu_shell_append (GTK_MENU_SHELL (menu), mitem);
 				g_signal_connect (G_OBJECT (mitem), "activate", G_CALLBACK (popup_zoom_in_cb), canvas);
 				mitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_ZOOM_OUT, NULL);
 				gtk_widget_show (mitem);
-				gtk_menu_append (menu, mitem);
+				gtk_menu_shell_append (GTK_MENU_SHELL (menu), mitem);
 				g_signal_connect (G_OBJECT (mitem), "activate", G_CALLBACK (popup_zoom_out_cb), canvas);
 				mitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_ZOOM_FIT, NULL);
 				gtk_widget_show (mitem);
-				gtk_menu_append (menu, mitem);
+				gtk_menu_shell_append (GTK_MENU_SHELL (menu), mitem);
 				g_signal_connect (G_OBJECT (mitem), "activate", G_CALLBACK (popup_zoom_fit_cb), canvas);
 
 				mitem = gtk_separator_menu_item_new ();
 				gtk_widget_show (mitem);
-				gtk_menu_append (menu, mitem);
+				gtk_menu_shell_append (GTK_MENU_SHELL (menu), mitem);
 
 #ifdef HAVE_GRAPHVIZ
 				mitem = gtk_menu_item_new_with_label (_("Linear layout"));
 				gtk_widget_show (mitem);
-				gtk_menu_append (menu, mitem);
+				gtk_menu_shell_append (GTK_MENU_SHELL (menu), mitem);
 				g_signal_connect (G_OBJECT (mitem), "activate", G_CALLBACK (popup_layout_default_cb), canvas);
 
 				mitem = gtk_menu_item_new_with_label (_("Radial layout"));
 				gtk_widget_show (mitem);
-				gtk_menu_append (menu, mitem);
+				gtk_menu_shell_append (GTK_MENU_SHELL (menu), mitem);
 				g_signal_connect (G_OBJECT (mitem), "activate", G_CALLBACK (popup_layout_radial_cb), canvas);
 
 				mitem = gtk_separator_menu_item_new ();
 				gtk_widget_show (mitem);
-				gtk_menu_append (menu, mitem);
+				gtk_menu_shell_append (GTK_MENU_SHELL (menu), mitem);
 #endif
 				
 				mitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_SAVE_AS, NULL);
 				gtk_widget_show (mitem);
-				gtk_menu_append (menu, mitem);
+				gtk_menu_shell_append (GTK_MENU_SHELL (menu), mitem);
 				g_signal_connect (G_OBJECT (mitem), "activate", G_CALLBACK (popup_export_cb), canvas);
 
 				mitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_PRINT, NULL);
 				gtk_widget_show (mitem);
 				g_signal_connect (G_OBJECT (mitem), "activate", G_CALLBACK (popup_print_cb), canvas);
-				gtk_menu_append (menu, mitem);
+				gtk_menu_shell_append (GTK_MENU_SHELL (menu), mitem);
 
 				gtk_menu_popup (GTK_MENU (menu), NULL, NULL,
 						NULL, NULL, ((GdkEventButton *)event)->button,
diff --git a/tools/browser/connection-binding-properties.c b/tools/browser/connection-binding-properties.c
index 50a473f..02d6f9a 100644
--- a/tools/browser/connection-binding-properties.c
+++ b/tools/browser/connection-binding-properties.c
@@ -330,12 +330,12 @@ add_part_clicked_cb (GtkWidget *button, ConnectionBindingProperties *cprop)
 				   GINT_TO_POINTER (BROWSER_VIRTUAL_CONNECTION_PART_CNC));
 		g_signal_connect (G_OBJECT (entry), "activate", G_CALLBACK (add_part_mitem_cb), cprop);
 		gtk_widget_show (entry);
-		gtk_menu_append (GTK_MENU (menu), entry);
+		gtk_menu_shell_append (GTK_MENU_SHELL (menu), entry);
 		entry = gtk_menu_item_new_with_label (_("Bind a data set"));
 		g_object_set_data (G_OBJECT (entry), "part-type",
 				   GINT_TO_POINTER (BROWSER_VIRTUAL_CONNECTION_PART_MODEL));
 		g_signal_connect (G_OBJECT (entry), "activate", G_CALLBACK (add_part_mitem_cb), cprop);
-		gtk_menu_append (GTK_MENU (menu), entry);
+		gtk_menu_shell_append (GTK_MENU_SHELL (menu), entry);
 		gtk_widget_show (entry);
 
 		cprop->priv->menu = menu;



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