rhythmbox r6110 - in trunk: . shell widgets



Author: jmatthew
Date: Sun Dec 21 10:57:10 2008
New Revision: 6110
URL: http://svn.gnome.org/viewvc/rhythmbox?rev=6110&view=rev

Log:
2008-12-21  Jonathan Matthew  <jonathan d14n org>

	patch by:  John Daiker  <daikerjohn gmail com>

	* configure.ac:
	Increase gtk+ version requirement to 2.12 to get the new tooltip API.

	* shell/rb-shell.c: (rb_shell_finalize), (construct_load_ui),
	(tray_destroy_cb):
	* shell/rb-source-header.c: (rb_source_header_init):
	* shell/rb-statusbar.c: (rb_statusbar_init):
	* widgets/rb-entry-view.c: (rb_entry_view_constructor):
	Use GtkTooltip (or its helper functions) instead of GtkTooltips.
	From #564800.


Modified:
   trunk/ChangeLog
   trunk/configure.ac
   trunk/shell/rb-shell.c
   trunk/shell/rb-source-header.c
   trunk/shell/rb-statusbar.c
   trunk/widgets/rb-entry-view.c

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac	(original)
+++ trunk/configure.ac	Sun Dec 21 10:57:10 2008
@@ -27,7 +27,7 @@
 
 DBUS_MIN_REQS=0.35
 GST_0_10_REQS=0.10.12
-GTK_REQS=2.8.0
+GTK_REQS=2.12.0
 GLIB_REQS=2.15.5
 GNOME_MEDIA_PROFILES_REQS=2.8
 LIBNOTIFY_REQS=0.3.2

Modified: trunk/shell/rb-shell.c
==============================================================================
--- trunk/shell/rb-shell.c	(original)
+++ trunk/shell/rb-shell.c	Sun Dec 21 10:57:10 2008
@@ -378,7 +378,6 @@
 	GtkWidget *plugins;
 
 	RBTrayIcon *tray_icon;
-	GtkTooltips *tooltips;
 	GtkWidget *volume_button;
 	gboolean syncing_volume;
 
@@ -935,9 +934,6 @@
 	if (shell->priv->prefs != NULL)
 		gtk_widget_destroy (shell->priv->prefs);
 
-	rb_debug ("destroying tooltips");
-	gtk_object_destroy (GTK_OBJECT (shell->priv->tooltips));
-
 	g_free (shell->priv->rhythmdb_file);
 
 	g_free (shell->priv->playlists_file);
@@ -1291,12 +1287,8 @@
 
 	gtk_widget_show (hbox);
 
-	shell->priv->tooltips = gtk_tooltips_new ();
-	gtk_tooltips_enable (shell->priv->tooltips);
-
-	gtk_tooltips_set_tip (GTK_TOOLTIPS (shell->priv->tooltips),
-			      GTK_WIDGET (shell->priv->volume_button),
-			      _("Change the music volume"), NULL);
+	gtk_widget_set_tooltip_text (shell->priv->volume_button,
+				     _("Change the music volume"));
 
 	if (error != NULL) {
 		g_warning ("Couldn't merge %s: %s",
@@ -2951,7 +2943,7 @@
 {
 	if (shell->priv->tray_icon) {
 		rb_debug ("caught destroy event for tray icon %p", object);
-		gtk_object_sink (object);
+		g_object_ref_sink (object);
 		shell->priv->tray_icon = NULL;
 		rb_debug ("finished sinking tray");
 	}

Modified: trunk/shell/rb-source-header.c
==============================================================================
--- trunk/shell/rb-source-header.c	(original)
+++ trunk/shell/rb-source-header.c	Sun Dec 21 10:57:10 2008
@@ -102,8 +102,6 @@
 	GtkActionGroup *actiongroup;
 	guint source_ui_merge_id;
 
-	GtkTooltips *tooltips;
-
 	GtkWidget *search;
 	GtkWidget *search_bar;
 
@@ -263,18 +261,15 @@
 
 	header->priv = RB_SOURCE_HEADER_GET_PRIVATE (header);
 
-	header->priv->tooltips = gtk_tooltips_new ();
-	gtk_tooltips_enable (header->priv->tooltips);
-
 	gtk_table_set_col_spacings (GTK_TABLE (header), 5);
 	gtk_table_resize (GTK_TABLE (header), 1, 3);
 
 	ebox = GTK_EVENT_BOX (gtk_event_box_new ());
 	header->priv->search = GTK_WIDGET (rb_search_entry_new ());
-	gtk_tooltips_set_tip (GTK_TOOLTIPS (header->priv->tooltips),
-			      GTK_WIDGET (ebox),
-			      _("Filter music display by genre, artist, album, or title"),
-			      NULL);
+
+	gtk_widget_set_tooltip_text (GTK_WIDGET (ebox),
+				     _("Filter music display by genre, artist, album, or title"));
+
 	gtk_container_add (GTK_CONTAINER (ebox), GTK_WIDGET (header->priv->search));
 
 	g_signal_connect_object (G_OBJECT (header->priv->search), "search",

Modified: trunk/shell/rb-statusbar.c
==============================================================================
--- trunk/shell/rb-statusbar.c	(original)
+++ trunk/shell/rb-statusbar.c	Sun Dec 21 10:57:10 2008
@@ -89,7 +89,6 @@
         RhythmDB *db;
 
         GtkUIManager *ui_manager;
-        GtkTooltips *tooltips;
 
         GtkWidget *progress;
         double progress_fraction;
@@ -190,9 +189,6 @@
 						       RB_TYPE_STATUSBAR,
 						       RBStatusbarPrivate);
 
-        statusbar->priv->tooltips = gtk_tooltips_new ();
-        gtk_tooltips_enable (statusbar->priv->tooltips);
-
         gtk_statusbar_set_has_resize_grip (GTK_STATUSBAR (statusbar), TRUE);
 
         statusbar->priv->progress = gtk_progress_bar_new ();

Modified: trunk/widgets/rb-entry-view.c
==============================================================================
--- trunk/widgets/rb-entry-view.c	(original)
+++ trunk/widgets/rb-entry-view.c	Sun Dec 21 10:57:10 2008
@@ -1792,13 +1792,10 @@
 
 	{
 		GtkTreeViewColumn *column;
-		GtkTooltips *tooltip;
 		GtkCellRenderer *renderer;
 		GtkWidget *image_widget;
 		gint width;
 
-		tooltip = gtk_tooltips_new ();
-
 		/* Playing icon column */
 		column = GTK_TREE_VIEW_COLUMN (gtk_tree_view_column_new ());
 		renderer = rb_cell_renderer_pixbuf_new ();
@@ -1823,8 +1820,8 @@
 					  G_CALLBACK (rb_entry_view_pixbuf_clicked_cb),
 					  view);
 
-		gtk_tooltips_set_tip (GTK_TOOLTIPS (tooltip), GTK_WIDGET (column->button),
-				       _("Now Playing"), NULL);
+		gtk_widget_set_tooltip_text (GTK_WIDGET (column->button),
+					     _("Now Playing"));
 	}
 
 	view->priv->gconf_notification_id =



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