gnome-system-tools r4303 - in trunk: . src/boot src/common src/disks src/time src/time/e-map src/users/search-bar



Author: thomashpa
Date: Wed Feb 25 21:59:48 2009
New Revision: 4303
URL: http://svn.gnome.org/viewvc/gnome-system-tools?rev=4303&view=rev

Log:
Replace various deprecated gtk symbols. Bug #570952

Modified:
   trunk/ChangeLog
   trunk/src/boot/boot-druid.c
   trunk/src/boot/boot-druid.h
   trunk/src/common/gst-dialog.c
   trunk/src/disks/callbacks.c
   trunk/src/disks/callbacks.h
   trunk/src/disks/disks-gui.c
   trunk/src/time/e-map/e-map-test.c
   trunk/src/time/e-map/e-map.c
   trunk/src/time/e-map/e-map.h
   trunk/src/time/tz-map.c
   trunk/src/users/search-bar/search-bar.c
   trunk/src/users/search-bar/search-bar.h

Modified: trunk/src/boot/boot-druid.c
==============================================================================
--- trunk/src/boot/boot-druid.c	(original)
+++ trunk/src/boot/boot-druid.c	Wed Feb 25 21:59:48 2009
@@ -38,10 +38,10 @@
 
 static GtkWindowClass *parent_class;
 
-GtkType
+GType
 boot_druid_get_type (void)
 {
-	static GtkType type = 0;
+	static GType type = 0;
 
 	if (!type) {
 		static const GTypeInfo type_info = {
@@ -67,7 +67,7 @@
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (class);
 
-	parent_class = gtk_type_class (gtk_window_get_type ());
+	parent_class = g_type_class_peek (gtk_window_get_type ());
 
 	/* override methods */
 	object_class->finalize = boot_druid_finalize;

Modified: trunk/src/boot/boot-druid.h
==============================================================================
--- trunk/src/boot/boot-druid.h	(original)
+++ trunk/src/boot/boot-druid.h	Wed Feb 25 21:59:48 2009
@@ -56,7 +56,7 @@
 	
 } BootDruidClass;
 
-GtkType boot_druid_get_type (void);
+GType boot_druid_get_type (void);
 
 BootDruid *boot_druid_new (void);
 

Modified: trunk/src/common/gst-dialog.c
==============================================================================
--- trunk/src/common/gst-dialog.c	(original)
+++ trunk/src/common/gst-dialog.c	Wed Feb 25 21:59:48 2009
@@ -230,7 +230,7 @@
 			exit (-1);
 		}
 
-		gtk_widget_ref (priv->child);
+		g_object_ref (priv->child);
 		gtk_container_remove (GTK_CONTAINER (priv->child->parent), priv->child);
 		gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), priv->child);
 

Modified: trunk/src/disks/callbacks.c
==============================================================================
--- trunk/src/disks/callbacks.c	(original)
+++ trunk/src/disks/callbacks.c	Wed Feb 25 21:59:48 2009
@@ -102,7 +102,7 @@
 						  gst_disks_storage_setup_properties_widget (storage);
 						  
 						  gtk_widget_set_sensitive (storage_list, TRUE);
-						  gdk_cursor_destroy (cursor);
+						  gdk_cursor_unref (cursor);
 						  gdk_window_set_cursor (main_window->window, NULL);
 						  
 						  
@@ -144,7 +144,7 @@
 						  gst_disks_storage_setup_properties_widget (storage);
 						  
 						  gtk_widget_set_sensitive (storage_list, TRUE);
-						  gdk_cursor_destroy (cursor);
+						  gdk_cursor_unref (cursor);
 						  gdk_window_set_cursor (main_window->window, NULL);
 						  
 						  g_object_get (G_OBJECT (storage), "empty", &cd_empty,
@@ -529,30 +529,6 @@
 	   }
 }
 
-gboolean
-gst_on_partition_list_button_press (GtkTreeView *treeview, GdkEventButton *event, gpointer gdata)
-{
-	GtkTreePath *path;
-	GtkItemFactory *factory;
-
-	factory = (GtkItemFactory *) gdata;
-
-	if (event->button == 3)
-	{
-		gtk_widget_grab_focus (GTK_WIDGET (treeview));
-		if (gtk_tree_view_get_path_at_pos (treeview, event->x, event->y, &path, NULL, NULL, NULL))
-		{
-			gtk_tree_selection_unselect_all (gtk_tree_view_get_selection (treeview));
-			gtk_tree_selection_select_path (gtk_tree_view_get_selection (treeview), path);
-
-			gtk_item_factory_popup (factory, event->x_root, event->y_root,
-						event->button, event->time);
-		}
-		return TRUE;
-	}
-	return FALSE;
-}
-
 void
 gst_disks_storage_get_device_speed_cb (GstDirectiveEntry *entry)
 {

Modified: trunk/src/disks/callbacks.h
==============================================================================
--- trunk/src/disks/callbacks.h	(original)
+++ trunk/src/disks/callbacks.h	Wed Feb 25 21:59:48 2009
@@ -35,7 +35,6 @@
 void gst_on_mount_button_clicked            (GtkWidget *button, gpointer gdata);
 void gst_on_browse_button_clicked           (GtkWidget *button, gpointer gdata);
 void gst_on_play_button_clicked             (GtkWidget *button, gpointer gdata);
-gboolean gst_on_partition_list_button_press (GtkTreeView *treeview, GdkEventButton *event, gpointer gdata);
 void     gst_on_speed_property_changed      (GObject *object, GParamSpec *spec, gpointer gdata);
 void  gst_disks_storage_get_device_speed_cb (GstDirectiveEntry *entry);
 void  gst_disks_storage_update_device_speed (GtkWidget *w, gpointer gdata);

Modified: trunk/src/disks/disks-gui.c
==============================================================================
--- trunk/src/disks/disks-gui.c	(original)
+++ trunk/src/disks/disks-gui.c	Wed Feb 25 21:59:48 2009
@@ -44,32 +44,6 @@
 
 extern GstTool *tool;
 
-/*GtkItemFactoryEntry popup_partition_menu_items[] = {
-	{ N_("/_Format"), NULL, NULL, POPUP_PARTITION_FORMAT, "<StockItem>", GTK_STOCK_DELETE },
-	{ N_("/_Delete"), NULL, NULL, POPUP_PARTITION_REMOVE, "<StockItem>", GTK_STOCK_REMOVE }
-	};*/
-
-/*static char *
-disks_partition_item_factory_trans (const char *path, gpointer data)
-{
-	return _((gchar*)path);
-}*/
-
-/*static GtkItemFactory *
-gst_disks_partition_popup_item_factory_create (GtkWidget *treeview)
-{
-	GtkItemFactory *item_factory;
-
-	item_factory = gtk_item_factory_new (GTK_TYPE_MENU, "<main>", NULL);
-	gtk_item_factory_set_translate_func (item_factory, disks_partition_item_factory_trans,
-					     NULL, NULL);
-	gtk_item_factory_create_items (item_factory, G_N_ELEMENTS (popup_partition_menu_items),
-				       popup_partition_menu_items,
-				       (gpointer) treeview);
-
-	return item_factory;
-}*/
-
 gchar *
 gst_storage_get_human_readable_size (const gulong size)
 {
@@ -228,7 +202,6 @@
 	GtkCellRenderer *renderer;
 	GtkTreeViewColumn *column;
 	GtkTreeSelection *selection;
-	/*GtkItemFactory *item_factory;*/
 
 	model = GTK_TREE_MODEL (gtk_tree_store_new (PARTITION_LIST_LAST,
 						    G_TYPE_STRING,
@@ -253,11 +226,6 @@
 			  G_CALLBACK (gst_on_partition_list_selection_change),
 			  NULL);
 
-	/*item_factory = gst_disks_partition_popup_item_factory_create (treeview);
-	g_signal_connect (G_OBJECT (treeview), "button_press_event",
-			  G_CALLBACK (gst_on_partition_list_button_press),
-			  (gpointer) item_factory);*/
-
 	return (treeview);
 }
 

Modified: trunk/src/time/e-map/e-map-test.c
==============================================================================
--- trunk/src/time/e-map/e-map-test.c	(original)
+++ trunk/src/time/e-map/e-map-test.c	Wed Feb 25 21:59:48 2009
@@ -87,7 +87,7 @@
 			 G_CALLBACK (button_pressed), NULL);
 
 	gtk_widget_show_all(window);
-	id = gtk_timeout_add(100, flash, NULL);
+	id = g_timeout_add(100, flash, NULL);
 	gtk_main();
 	return(0);
 }

Modified: trunk/src/time/e-map/e-map.c
==============================================================================
--- trunk/src/time/e-map/e-map.c	(original)
+++ trunk/src/time/e-map/e-map.c	Wed Feb 25 21:59:48 2009
@@ -143,10 +143,10 @@
  * Return value: The type ID of the #EMap class.
  **/
 
-GtkType
+GType
 e_map_get_type (void)
 {
-	static GtkType e_map_type = 0;
+	static GType e_map_type = 0;
 
 	if (!e_map_type)
 	{
@@ -185,7 +185,7 @@
 	object_class = (GtkObjectClass *) class;
 	widget_class = (GtkWidgetClass *) class;
 
-	parent_class = gtk_type_class (GTK_TYPE_WIDGET);
+	parent_class = g_type_class_peek (GTK_TYPE_WIDGET);
 
 	object_class->destroy = e_map_destroy;
 	
@@ -534,7 +534,8 @@
 	{
 		priv->hadj = hadj;
 		g_object_ref (G_OBJECT (priv->hadj));
-		gtk_object_sink (GTK_OBJECT (priv->hadj));
+		g_object_ref_sink (G_OBJECT (priv->hadj));
+		g_object_unref (G_OBJECT (priv->hadj));
 
 		priv->hadj_signal_id = g_signal_connect (G_OBJECT (priv->hadj),
 							 "value_changed",
@@ -548,7 +549,8 @@
 	{
 		priv->vadj = vadj;
 		g_object_ref (G_OBJECT (priv->vadj));
-		gtk_object_sink (GTK_OBJECT (priv->vadj));
+		g_object_ref_sink (G_OBJECT (priv->vadj));
+		g_object_unref (G_OBJECT (priv->vadj));
 
 		priv->vadj_signal_id = g_signal_connect (G_OBJECT (priv->vadj),
 							 "value_changed",

Modified: trunk/src/time/e-map/e-map.h
==============================================================================
--- trunk/src/time/e-map/e-map.h	(original)
+++ trunk/src/time/e-map/e-map.h	Wed Feb 25 21:59:48 2009
@@ -69,7 +69,7 @@
 
 /* --- Widget --- */
 
-GtkType e_map_get_type (void);
+GType e_map_get_type (void);
 
 EMap *e_map_new (void);
 

Modified: trunk/src/time/tz-map.c
==============================================================================
--- trunk/src/time/tz-map.c	(original)
+++ trunk/src/time/tz-map.c	Wed Feb 25 21:59:48 2009
@@ -371,7 +371,7 @@
 out_map (GtkWidget *w, GdkEventCrossing *event, gpointer data)
 {
 	ETzMap *tzmap;
-	char *old_zone;
+	const char *old_zone;
    
 	tzmap = (ETzMap *) data;
 
@@ -383,7 +383,7 @@
 
 	tzmap->point_hover = NULL;
    
-	gtk_label_get (GTK_LABEL (((GstTimeTool *) tzmap->tool)->map_hover_label), &old_zone);
+	old_zone = gtk_label_get_text (GTK_LABEL (((GstTimeTool *) tzmap->tool)->map_hover_label));
 	if (strcmp (old_zone, ""))
 		gtk_label_set_text (GTK_LABEL (((GstTimeTool *) tzmap->tool)->map_hover_label), "");
    

Modified: trunk/src/users/search-bar/search-bar.c
==============================================================================
--- trunk/src/users/search-bar/search-bar.c	(original)
+++ trunk/src/users/search-bar/search-bar.c	Wed Feb 25 21:59:48 2009
@@ -315,7 +315,7 @@
 
 	g_object_class = G_OBJECT_CLASS(klass);
 
-	parent_class = gtk_type_class (gtk_hbox_get_type ());
+	parent_class = g_type_class_peek (gtk_hbox_get_type ());
 
 	g_object_class->set_property = impl_set_property;
 	g_object_class->get_property = impl_get_property;
@@ -407,7 +407,7 @@
 	return widget;
 }
 
-GtkType
+GType
 search_bar_get_type (void)
 {
 	static GType type = 0;

Modified: trunk/src/users/search-bar/search-bar.h
==============================================================================
--- trunk/src/users/search-bar/search-bar.h	(original)
+++ trunk/src/users/search-bar/search-bar.h	Wed Feb 25 21:59:48 2009
@@ -69,7 +69,7 @@
 	void (*menu_activated) (SearchBar *search, int item);
 };
 
-GtkType    search_bar_get_type   (void);
+GType    search_bar_get_type   (void);
 
 void       search_bar_clear_search (SearchBar *search_bar);
 void       search_bar_set_option   (SearchBar *search_bar, SearchBarItem *option_items);



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