[galeon] Remove residual deprecated glib and GTK+ symbols.



commit 293bdb0c815c97d1adb3822381a4b97e9aa9cf6e
Author: Fabio Bonelli <fabiob src gnome org>
Date:   Thu May 13 21:18:35 2010 +0200

    Remove residual deprecated glib and GTK+ symbols.

 src/galeon-action-go.c     |    2 +-
 src/galeon-find-toolbar.c  |   10 +++-----
 src/galeon-sidebar-embed.c |    2 +-
 src/galeon-simple-window.c |   10 ++++----
 src/galeon-spinner.c       |    4 +-
 src/galeon-spinner.h       |    3 +-
 src/galeon-tab.c           |   47 +++++++++++++++++++++----------------------
 src/galeon-window.c        |   33 ++++++++++++++++++------------
 8 files changed, 57 insertions(+), 54 deletions(-)
---
diff --git a/src/galeon-action-go.c b/src/galeon-action-go.c
index 5efefbd..39defb5 100644
--- a/src/galeon-action-go.c
+++ b/src/galeon-action-go.c
@@ -270,7 +270,7 @@ widget_add_context_menu (GtkWidget *widget, GtkMenu *menu)
 
 	/* Destroy the menu when the proxy goes away */
 	g_object_ref (menu);
-	gtk_object_sink (GTK_OBJECT (menu));
+	g_object_ref_sink (G_OBJECT (menu));
 	g_object_weak_ref (G_OBJECT (widget), (GWeakNotify)g_object_unref, menu);
 	
 	/* Popup on the popup-menu signal */
diff --git a/src/galeon-find-toolbar.c b/src/galeon-find-toolbar.c
index cf48e11..a89978f 100644
--- a/src/galeon-find-toolbar.c
+++ b/src/galeon-find-toolbar.c
@@ -414,9 +414,8 @@ galeon_find_toolbar_init (GaleonFindToolbar *toolbar)
 	label = gtk_label_new (_("Find Previous"));
 	priv->prev = gtk_tool_button_new (arrow, _("Find Previous"));
 	gtk_tool_item_set_is_important (priv->prev, TRUE);
-	gtk_tool_item_set_tooltip (priv->prev, gtoolbar->tooltips,
-				   _("Find previous occurrence of the search string"),
-				   NULL);
+	gtk_tool_item_set_tooltip_text (priv->prev,
+                                        _("Find previous occurrence of the search string"));
 	gtk_toolbar_insert (GTK_TOOLBAR (toolbar), priv->prev, -1);
 	gtk_widget_show_all (GTK_WIDGET (priv->prev));
 
@@ -425,9 +424,8 @@ galeon_find_toolbar_init (GaleonFindToolbar *toolbar)
 	label = gtk_label_new (_("Find Next"));
 	priv->next = gtk_tool_button_new (arrow, _("Find Next"));
 	gtk_tool_item_set_is_important (priv->next, TRUE);
-	gtk_tool_item_set_tooltip (priv->next, gtoolbar->tooltips,
-				   _("Find next occurrence of the search string"),
-				   NULL);
+	gtk_tool_item_set_tooltip_text (priv->next,
+                                        _("Find next occurrence of the search string"));
 	gtk_toolbar_insert (GTK_TOOLBAR (toolbar), priv->next, -1);
 	gtk_widget_show_all (GTK_WIDGET (priv->next));
 
diff --git a/src/galeon-sidebar-embed.c b/src/galeon-sidebar-embed.c
index 8f5f023..754c013 100644
--- a/src/galeon-sidebar-embed.c
+++ b/src/galeon-sidebar-embed.c
@@ -241,7 +241,7 @@ galeon_sidebar_embed_size_allocate (GtkWidget *widget,
 	widget->allocation = *allocation;
 	child = GTK_BIN (widget)->child;
 
-	if (child && GTK_WIDGET_VISIBLE (child))
+	if (child && gtk_widget_get_visible (GTK_WIDGET (child)))
 	{
 		gtk_widget_size_allocate (child, allocation);
 	}
diff --git a/src/galeon-simple-window.c b/src/galeon-simple-window.c
index 0cb7c63..0a7a7aa 100644
--- a/src/galeon-simple-window.c
+++ b/src/galeon-simple-window.c
@@ -135,19 +135,19 @@ galeon_simple_window_init(GaleonSimpleWindow *window)
 	gtk_widget_show (GTK_WIDGET (p->embed));
 
 	g_signal_connect_object (p->embed, "ge_title",
-				 GTK_SIGNAL_FUNC (galeon_simple_window_title_cb), 
+				 G_CALLBACK (galeon_simple_window_title_cb),
 				 window, 0);
 	g_signal_connect_object (p->embed, "ge_destroy_brsr",
-				 GTK_SIGNAL_FUNC (galeon_simple_window_destroy_brsr_cb), 
+				 G_CALLBACK (galeon_simple_window_destroy_brsr_cb),
 				 window, 0);
 	g_signal_connect_object (p->embed, "ge_size_to",
-				 GTK_SIGNAL_FUNC (galeon_simple_window_size_to_cb), 
+				 G_CALLBACK (galeon_simple_window_size_to_cb),
 				 window, 0);
 	g_signal_connect_object (p->embed, "ge_new_window",
-				 GTK_SIGNAL_FUNC (galeon_simple_window_new_window_cb), 
+				 G_CALLBACK (galeon_simple_window_new_window_cb),
 				 window, 0);
 	g_signal_connect_object (p->embed, "ge_visibility",
-				 GTK_SIGNAL_FUNC (galeon_simple_window_visibility_cb), 
+				 G_CALLBACK (galeon_simple_window_visibility_cb),
 				 window, 0);
 
 	g_object_ref (galeon_shell);
diff --git a/src/galeon-spinner.c b/src/galeon-spinner.c
index 860641a..5d7115e 100644
--- a/src/galeon-spinner.c
+++ b/src/galeon-spinner.c
@@ -346,7 +346,7 @@ galeon_spinner_expose (GtkWidget *widget, GdkEventExpose *event)
 
 	g_return_val_if_fail (GALEON_IS_SPINNER (widget), FALSE);
 
-	if (!GTK_WIDGET_DRAWABLE (widget)) return FALSE;
+	if (! gtk_widget_is_drawable (widget)) return FALSE;
 	spinner = GALEON_SPINNER (widget);
 
 	pixbuf = select_spinner_image (spinner);
@@ -405,7 +405,7 @@ bump_spinner_frame (gpointer callback_data)
 	GaleonSpinner *spinner;
 
 	spinner = GALEON_SPINNER (callback_data);
-	if (!GTK_WIDGET_DRAWABLE (spinner)) return TRUE;
+	if (! gtk_widget_is_drawable (GTK_WIDGET (spinner))) return TRUE;
 
 	spinner->details->current_frame += 1;
 	if (spinner->details->current_frame > spinner->details->max_frame - 1) {
diff --git a/src/galeon-spinner.h b/src/galeon-spinner.h
index 8b0813b..988a514 100644
--- a/src/galeon-spinner.h
+++ b/src/galeon-spinner.h
@@ -29,7 +29,6 @@
 #define GALEON_SPINNER_H
 
 #include <gtk/gtkeventbox.h>
-#include <bonobo.h>
 
 G_BEGIN_DECLS
 
@@ -52,7 +51,7 @@ struct GaleonSpinnerClass {
 	GtkEventBoxClass parent_class;
 };
 
-GtkType       galeon_spinner_get_type       (void);
+GType         galeon_spinner_get_type       (void);
 GtkWidget    *galeon_spinner_new            (void);
 void          galeon_spinner_start          (GaleonSpinner *throbber);
 void          galeon_spinner_stop           (GaleonSpinner *throbber);
diff --git a/src/galeon-tab.c b/src/galeon-tab.c
index cbd1b8d..292b259 100644
--- a/src/galeon-tab.c
+++ b/src/galeon-tab.c
@@ -407,7 +407,7 @@ galeon_tab_size_allocate(GtkWidget *widget, GtkAllocation *allocation)
 
 	/* Only resize if we're mapped (bug #124558),
 	 * or if this is the initial size-allocate (bug #156854). */
-	if (GTK_WIDGET_MAPPED (child) ||
+	if (gtk_widget_get_mapped (child) ||
 	    memcmp (&child->allocation, &invalid, sizeof (GtkAllocation)) == 0)
 	{
 		gtk_widget_size_allocate (child, allocation);
@@ -543,8 +543,7 @@ galeon_tab_init (GaleonTab *tab)
 	embed = G_OBJECT (galeon_embed_new ());
 
 	tab->priv->tab_icon = galeon_embed_favicon_new (GALEON_EMBED (embed));
-	g_object_ref (G_OBJECT (tab->priv->tab_icon));
-	gtk_object_sink (GTK_OBJECT (tab->priv->tab_icon));
+	g_object_ref_sink (G_OBJECT (tab->priv->tab_icon));
 
 	tab_icon_set_visibility (GALEON_FAVICON (tab->priv->tab_icon));
 
@@ -553,7 +552,7 @@ galeon_tab_init (GaleonTab *tab)
 				tab, &tab->priv->notifiers);
 
 	g_signal_connect_object (tab->priv->tab_icon, "changed",
-				 G_CALLBACK (tab_icon_changed_cb), 
+				 G_CALLBACK (tab_icon_changed_cb),
 				 tab, 0);
 
 	tab->priv->link_message = g_strdup ("");
@@ -574,58 +573,58 @@ galeon_tab_init (GaleonTab *tab)
 	gtk_widget_show (GTK_WIDGET(embed));
 
 	g_signal_connect_object (embed, "ge_link_message",
-				 GTK_SIGNAL_FUNC (galeon_tab_link_message_cb), 
+				 G_CALLBACK (galeon_tab_link_message_cb),
 				 tab, 0);
 	g_signal_connect_object (embed, "ge_js_status",
-				 GTK_SIGNAL_FUNC (galeon_tab_js_status_cb), 
+				 G_CALLBACK (galeon_tab_js_status_cb),
 				 tab, 0);
 	g_signal_connect_object (embed, "ge_location",
-				 GTK_SIGNAL_FUNC (galeon_tab_location_cb), 
+				 G_CALLBACK (galeon_tab_location_cb),
 				 tab, 0);
 	g_signal_connect_object (embed, "ge_title",
-				 GTK_SIGNAL_FUNC (galeon_tab_title_cb), 
+				 G_CALLBACK (galeon_tab_title_cb),
 				 tab, 0);
 	g_signal_connect_object (embed, "ge_zoom_change",
-				 GTK_SIGNAL_FUNC (galeon_tab_zoom_changed_cb),
+				 G_CALLBACK (galeon_tab_zoom_changed_cb),
 				 tab, 0);
 	g_signal_connect_object (embed, "ge_content_change",
-				 GTK_SIGNAL_FUNC (galeon_tab_content_changed_cb),
+				 G_CALLBACK (galeon_tab_content_changed_cb),
 				 tab, 0);
 	g_signal_connect_object (embed, "ge_progress",
-				 GTK_SIGNAL_FUNC (galeon_tab_progress_cb), 
+				 G_CALLBACK (galeon_tab_progress_cb),
 				 tab, 0);
 	g_signal_connect_object (embed, "ge_net_state",
-				 GTK_SIGNAL_FUNC (galeon_tab_net_state_cb), 
+				 G_CALLBACK (galeon_tab_net_state_cb),
 				 tab, 0);
 	g_signal_connect_object (embed, "ge_net_stop",
-				 GTK_SIGNAL_FUNC (galeon_tab_net_stop_cb), 
+				 G_CALLBACK (galeon_tab_net_stop_cb),
 				 tab, 0);
 	g_signal_connect_object (embed, "ge_net_start",
-				 GTK_SIGNAL_FUNC (galeon_tab_net_start_cb), 
+				 G_CALLBACK (galeon_tab_net_start_cb),
 				 tab, 0);
 	g_signal_connect_object (embed, "ge_new_window",
-				 GTK_SIGNAL_FUNC (galeon_tab_new_window_cb), 
+				 G_CALLBACK (galeon_tab_new_window_cb),
 				 tab, 0);
 	g_signal_connect_object (embed, "ge_visibility",
-				 GTK_SIGNAL_FUNC (galeon_tab_visibility_cb), 
+				 G_CALLBACK (galeon_tab_visibility_cb),
 				 tab, 0);
 	g_signal_connect_object (embed, "ge_destroy_brsr",
-				 GTK_SIGNAL_FUNC (galeon_tab_destroy_brsr_cb), 
+				 G_CALLBACK (galeon_tab_destroy_brsr_cb),
 				 tab, 0);
 	g_signal_connect_object (embed, "ge_size_to",
-				 GTK_SIGNAL_FUNC (galeon_tab_size_to_cb), 
+				 G_CALLBACK (galeon_tab_size_to_cb),
 				 tab, 0);
 	g_signal_connect_object (embed, "ge_dom_mouse_click",
-				 GTK_SIGNAL_FUNC (galeon_tab_dom_mouse_click_cb), 
+				 G_CALLBACK (galeon_tab_dom_mouse_click_cb),
 				 tab, 0);
 	g_signal_connect_object (embed, "ge_dom_mouse_down",
-				 GTK_SIGNAL_FUNC (galeon_tab_dom_mouse_down_cb), 
+				 G_CALLBACK (galeon_tab_dom_mouse_down_cb),
 				 tab, 0);
 	g_signal_connect_object (embed, "ge_contextmenu",
-				 GTK_SIGNAL_FUNC (galeon_tab_contextmenu_cb), 
+				 G_CALLBACK (galeon_tab_contextmenu_cb),
 				 tab, 0);
 	g_signal_connect_object (embed, "ge_security_change",
-				 GTK_SIGNAL_FUNC (galeon_tab_security_change_cb), 
+				 G_CALLBACK (galeon_tab_security_change_cb),
 				 tab, 0);
 	g_signal_connect_object (embed, "ge_favicon",
 				 G_CALLBACK (galeon_tab_favicon_cb),
@@ -1291,13 +1290,13 @@ galeon_tab_show_bookmark_menu (GaleonTab *tab, int button)
 	menu = gtk_menu_new();
 
 	ggm = gb_gtk_menu_new (bs->root, GTK_MENU_SHELL (menu));
-	gtk_object_sink (GTK_OBJECT (menu));
+	g_object_ref_sink (G_OBJECT (menu));
 	gb_gtk_menu_set_location_source (ggm, GB_LOCATION_SOURCE (window));
 	gb_gtk_menu_set_statusbar (ggm, GTK_STATUSBAR (galeon_window_get_statusbar (window)));
 	gb_gtk_menu_fill_children_submenus (ggm);
 	
 	g_signal_connect (ggm, "bookmark-activated", 
-			  G_CALLBACK (galeon_tab_bookmark_activated_cb), 
+			  G_CALLBACK (galeon_tab_bookmark_activated_cb),
 			  window);
 
 	gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, button,
diff --git a/src/galeon-window.c b/src/galeon-window.c
index fc5e77d..57a5b74 100644
--- a/src/galeon-window.c
+++ b/src/galeon-window.c
@@ -811,7 +811,7 @@ galeon_window_key_press_event (GtkWidget *window,
 
 	if (is_menu_bar_accel (window, event) &&
 	    priv->menubar && priv->menubar->parent &&
-	    !GTK_WIDGET_VISIBLE(priv->menubar->parent))
+	    ! gtk_widget_get_visible (priv->menubar->parent))
 	{
 		/* When F10 is pressed gtk+ automatically opens the menu if the
 		 * menubar is visible, but when the menubar is not visible
@@ -1003,22 +1003,22 @@ setup_notebook (GaleonWindow *window)
 				window);
 
 	g_signal_connect (G_OBJECT (notebook), "tab_detached", 
-			  G_CALLBACK (galeon_window_tab_detached_cb), 
+			  G_CALLBACK (galeon_window_tab_detached_cb),
 			  window);
 	g_signal_connect (G_OBJECT (notebook), "tabs_reordered", 
-			  G_CALLBACK (galeon_window_tabs_reordered_cb), 
+			  G_CALLBACK (galeon_window_tabs_reordered_cb),
 			  window);
 
 	g_signal_connect (G_OBJECT (notebook), "tab_added", 
-			  G_CALLBACK (galeon_window_tab_added_cb), 
+			  G_CALLBACK (galeon_window_tab_added_cb),
 			  window);
 
 	g_signal_connect (G_OBJECT (notebook), "tab_removed", 
-			  G_CALLBACK (galeon_window_tab_removed_cb), 
+			  G_CALLBACK (galeon_window_tab_removed_cb),
 			  window);
 
 	g_signal_connect (G_OBJECT (notebook), "tab_delete", 
-			  G_CALLBACK (galeon_window_tab_delete_cb), 
+			  G_CALLBACK (galeon_window_tab_delete_cb),
 			  window);
  
 	galeon_dnd_url_list_drag_dest_set_with_flags (GTK_WIDGET(notebook),
@@ -2692,8 +2692,7 @@ sync_tab_load_status (GaleonTab *tab, GParamSpec *pspec, GaleonWindow *window)
 		{
 			icon = gtk_image_new_from_animation (_galeon_window_loading_animation);
 			gtk_widget_show (icon);
-			g_object_ref (G_OBJECT (icon));
-			gtk_object_sink (GTK_OBJECT (icon));
+			g_object_ref_sink (G_OBJECT (icon));
 			have_ref = TRUE;
 		}
 
@@ -2828,7 +2827,7 @@ sync_tab_visibility (GaleonTab *t, GParamSpec *pspec, GaleonWindow *window)
 	}
 	g_list_free (tabs);
 
-	if (GTK_WIDGET_VISIBLE (GTK_WIDGET (window)))
+	if (gtk_widget_get_visible (GTK_WIDGET (window)))
 	{
 		gtk_widget_hide (GTK_WIDGET (window));
 	}
@@ -3197,11 +3196,19 @@ handle_smartsite (GaleonWindow *w, GbSmartSite *s)
 	gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
 
 	label = gtk_label_new (_("Enter the arguments for this smart site:"));
-	gtk_box_pack_start_defaults (GTK_BOX (vbox), label);
+	gtk_box_pack_start (GTK_BOX (vbox),
+                            label,
+                            TRUE,
+                            TRUE,
+                            0);
 
 	entry = gtk_entry_new ();
 	gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
-	gtk_box_pack_start_defaults (GTK_BOX (vbox), entry);
+	gtk_box_pack_start (GTK_BOX (vbox),
+                            entry,
+                            TRUE,
+                            TRUE,
+                            0);
 
 	gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), vbox);
 	gtk_widget_show_all (dialog);
@@ -3260,8 +3267,8 @@ confirm_open_many_bookmarks (GaleonWindow *w, int count)
 		gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
 		gtk_widget_show (label);
 		hig_alert_add_widget (HIG_ALERT (dialog), box);
-		gtk_box_pack_start_defaults (GTK_BOX (box), label);
-		gtk_box_pack_start_defaults (GTK_BOX (box), spin);
+		gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0);
+		gtk_box_pack_start (GTK_BOX (box), spin, TRUE, TRUE, 0);
 
 		response = gtk_dialog_run (GTK_DIALOG (dialog));
 		gtk_widget_destroy (dialog);



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