? .bzr
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/rhythmbox/ChangeLog,v
retrieving revision 1.2254
diff -u -r1.2254 ChangeLog
--- ChangeLog	11 Aug 2006 10:04:17 -0000	1.2254
+++ ChangeLog	11 Aug 2006 21:52:23 -0000
@@ -1,3 +1,21 @@
+2006-08-11  Jan Arne Petersen  <jpetersen@jpetersen.org>
+
+	* configure.ac: bump GTK+ requirements to 2.10 and libnotify
+	to 0.4.2 (GtkStatusIcon).
+
+	* shell/rb-shell.c: (rb_shell_shutdown), (rb_shell_finalize),
+	(rb_shell_constructor), (set_icon_geometry),
+	(rb_shell_set_visibility), (rb_shell_set_elapsed),
+	(rb_shell_hidden_notify):
+	* shell/rb-tray-icon.c: (rb_tray_icon_init),
+	(rb_tray_icon_finalize), (rb_tray_icon_new),
+	(rb_tray_icon_activate_cb), (rb_tray_icon_popup_menu_cb),
+	(rb_tray_icon_notify), (rb_tray_icon_cancel_notify):
+	* shell/rb-tray-icon.h:
+	Migrate from EggTrayIcon to GtkStatusIcon.
+
+	* widgets/Makefile.am: Remove eggtrayicon.[ch].
+
 2006-08-11  Jonathan Matthew  <jonathan@kaolin.wh9.net>
 
 	* lib/rb-debug.c: (rb_debug_real):
Index: configure.ac
===================================================================
RCS file: /cvs/gnome/rhythmbox/configure.ac,v
retrieving revision 1.255
diff -u -r1.255 configure.ac
--- configure.ac	11 Aug 2006 05:32:53 -0000	1.255
+++ configure.ac	11 Aug 2006 21:52:26 -0000
@@ -21,7 +21,7 @@
 AM_PROG_LIBTOOL
 AC_C_BIGENDIAN
 AC_CHECK_SIZEOF(long)
-GTK_REQS=2.6.0
+GTK_REQS=2.10.0
 GNOME_VFS_REQS=2.7.4
 NCB_MIN_REQS=2.9.0
 OLD_DBUS_MIN_REQS=0.31
@@ -397,7 +397,7 @@
 AM_CONDITIONAL(USE_HOWL, test "x$use_howl" = "xyes")
 AM_CONDITIONAL(USE_AVAHI, test "x$use_avahi" = "xyes")
 
-LIBNOTIFY_REQUIRED=0.2.2
+LIBNOTIFY_REQUIRED=0.4.2
 AC_ARG_ENABLE(libnotify,
             AC_HELP_STRING([--disable-libnotify],
 			   [Disable libnotify support]),,
Index: po/ChangeLog
===================================================================
RCS file: /cvs/gnome/rhythmbox/po/ChangeLog,v
retrieving revision 1.850
diff -u -r1.850 ChangeLog
--- po/ChangeLog	11 Aug 2006 11:12:57 -0000	1.850
+++ po/ChangeLog	11 Aug 2006 21:52:33 -0000
@@ -1,3 +1,7 @@
+2006-08-11  Jan Arne Petersen  <jpetersen@jpetersen.org>
+
+	* POTFILES.in: Remove eggtrayicon.c.
+
 2006-08-11  Hendrik Richter  <hendrikr@gnome.org>
 
 	* de.po: Updated German translation, by
Index: po/POTFILES.in
===================================================================
RCS file: /cvs/gnome/rhythmbox/po/POTFILES.in,v
retrieving revision 1.83
diff -u -r1.83 POTFILES.in
--- po/POTFILES.in	10 Jul 2006 04:44:27 -0000	1.83
+++ po/POTFILES.in	11 Aug 2006 21:52:33 -0000
@@ -113,7 +113,6 @@
 sources/rb-sourcelist.c
 sources/rb-static-playlist-source.c
 widgets/bacon-volume.c
-widgets/eggtrayicon.c
 widgets/rb-cell-renderer-pixbuf.c
 widgets/rb-dialog.c
 widgets/rb-druid.c
Index: shell/rb-shell.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/shell/rb-shell.c,v
retrieving revision 1.470
diff -u -r1.470 rb-shell.c
--- shell/rb-shell.c	10 Aug 2006 05:35:08 -0000	1.470
+++ shell/rb-shell.c	11 Aug 2006 21:52:39 -0000
@@ -231,7 +231,6 @@
 static gboolean rb_shell_show_popup_cb (RBSourceList *sourcelist,
 					RBSource *target,
 					RBShell *shell);
-static gboolean tray_destroy_cb (GtkObject *object, RBShell *shell);
 
 static gboolean save_yourself_cb (GnomeClient *client,
                                   gint phase,
@@ -865,7 +864,7 @@
 	/* Hide the main window and tray icon as soon as possible */
 	display = gtk_widget_get_display (shell->priv->window);
 	gtk_widget_hide (shell->priv->window);
-	gtk_widget_hide (GTK_WIDGET (shell->priv->tray_icon));
+	gtk_status_icon_set_visible (GTK_STATUS_ICON (shell->priv->tray_icon), FALSE);
 	gdk_display_sync (display);
 }
 
@@ -886,7 +885,7 @@
 
 	g_list_free (shell->priv->supported_media_extensions);
 
-	gtk_widget_destroy (GTK_WIDGET (shell->priv->tray_icon));
+	g_object_unref (G_OBJECT (shell->priv->tray_icon));
 
 	if (shell->priv->save_playlist_id > 0) {
 		g_source_remove (shell->priv->save_playlist_id);
@@ -1318,7 +1317,8 @@
 	construct_widgets (shell);
 
 	rb_debug ("shell: setting up tray icon");
-	tray_destroy_cb (NULL, shell);
+	shell->priv->tray_icon = rb_tray_icon_new (shell->priv->ui_manager, shell);
+ 	gtk_status_icon_set_visible (GTK_STATUS_ICON (shell->priv->tray_icon), TRUE);
 
 	rb_debug ("shell: adding gconf notification");
 	/* sync state */
@@ -1382,7 +1382,7 @@
 
 	rb_debug ("shell: syncing window state");
 	rb_shell_sync_paned (shell);
-	gtk_widget_show_all (GTK_WIDGET (shell->priv->tray_icon));
+	gtk_status_icon_set_visible (GTK_STATUS_ICON (shell->priv->tray_icon), TRUE);
 
 	/* Stop here if this is the first time. */
 	if (!eel_gconf_get_boolean (CONF_FIRST_TIME)) {
@@ -1420,18 +1420,15 @@
 /* Based on a function found in wnck */
 static void
 set_icon_geometry  (GdkWindow *window,
-		    int        x,
-		    int        y,
-		    int        width,
-		    int        height)
+		    GdkRectangle *area)
 {
 	gulong data[4];
 	Display *dpy = gdk_x11_drawable_get_xdisplay (window);
 
-	data[0] = x;
-	data[1] = y;
-	data[2] = width;
-	data[3] = height;
+	data[0] = area->x;
+	data[1] = area->y;
+	data[2] = area->width;
+	data[3] = area->height;
 
 	XChangeProperty (dpy,
 			 GDK_WINDOW_XID (window),
@@ -1530,11 +1527,11 @@
 	shell->priv->idle_hide_mainwindow_id = 0;
 
 	/* don't minimise if we have no tray icon */
-	if (visible || (!force && !egg_tray_icon_have_manager (EGG_TRAY_ICON (shell->priv->tray_icon)))) {
+	if (visible || (!force && !gtk_status_icon_is_embedded (GTK_STATUS_ICON (shell->priv->tray_icon)))) {
 		rb_debug ("showing main window");
 		rb_shell_sync_window_state (shell, FALSE);
 
-		if (egg_tray_icon_have_manager (EGG_TRAY_ICON (shell->priv->tray_icon)))
+		if (gtk_status_icon_is_embedded (GTK_STATUS_ICON (shell->priv->tray_icon)))
 			gtk_window_set_skip_taskbar_hint (GTK_WINDOW (shell->priv->window), FALSE);
 		gtk_widget_show (GTK_WIDGET (shell->priv->window));
 		gtk_window_deiconify (GTK_WINDOW (shell->priv->window));
@@ -1548,16 +1545,14 @@
 
 		eel_gconf_set_boolean (CONF_STATE_WINDOW_VISIBLE, TRUE);
 	} else {
-		int x, y, width, height;
+		GdkRectangle area;
 
 		rb_debug ("hiding main window");
 		shell->priv->iconified = TRUE;
-		rb_tray_icon_get_geom (shell->priv->tray_icon,
-				       &x, &y, &width, &height);
+		gtk_status_icon_get_geometry (GTK_STATUS_ICON (shell->priv->tray_icon), NULL, &area, NULL);
 		if (GTK_WIDGET_REALIZED (GTK_WIDGET (shell->priv->window)))
-			set_icon_geometry (GTK_WIDGET (shell->priv->window)->window,
-					   x, y, width, height);
-		if (egg_tray_icon_have_manager (EGG_TRAY_ICON (shell->priv->tray_icon)))
+			set_icon_geometry (GTK_WIDGET (shell->priv->window)->window, &area);
+		if (gtk_status_icon_is_embedded (GTK_STATUS_ICON (shell->priv->tray_icon)))
 			gtk_window_set_skip_taskbar_hint (GTK_WINDOW (shell->priv->window), TRUE);
 		gtk_window_iconify (GTK_WINDOW (shell->priv->window));
 
@@ -2022,7 +2017,7 @@
 					   shell->priv->cached_title, elapsed_string);
 	}
 
-	rb_tray_icon_set_tooltip (shell->priv->tray_icon, tooltip);
+	gtk_status_icon_set_tooltip (GTK_STATUS_ICON (shell->priv->tray_icon), tooltip);
 	g_free (elapsed_string);
 	g_free (tooltip);
 }
@@ -2815,45 +2810,6 @@
 	return rb_source_show_popup (target);
 }
 
-static void
-tray_embedded_cb (GtkPlug *plug,
-		  gpointer data)
-{
-	/* FIXME - this doens't work */
-#if 0
-	RBShell *shell = RB_SHELL (data);
-
-	rb_debug ("got embedded signal");
-
-	gdk_window_set_decorations (shell->priv->window->window,
-				    GDK_DECOR_ALL | GDK_DECOR_MINIMIZE | GDK_DECOR_MAXIMIZE);
-#endif
-}
-
-static gboolean
-tray_destroy_cb (GtkObject *object,
-		 RBShell *shell)
-{
-	if (shell->priv->tray_icon) {
-		rb_debug ("caught destroy event for tray icon %p", object);
-		gtk_object_sink (object);
-		shell->priv->tray_icon = NULL;
-		rb_debug ("finished sinking tray");
-	}
-
-	rb_debug ("creating new tray icon");
-	shell->priv->tray_icon = rb_tray_icon_new (shell->priv->ui_manager, shell);
-	g_signal_connect_object (G_OBJECT (shell->priv->tray_icon), "destroy",
-				 G_CALLBACK (tray_destroy_cb), shell, 0);
-	g_signal_connect_object (G_OBJECT (shell->priv->tray_icon), "embedded",
-				 G_CALLBACK (tray_embedded_cb), shell, 0);
-
- 	gtk_widget_show_all (GTK_WIDGET (shell->priv->tray_icon));
-
-	rb_debug ("done creating new tray icon %p", shell->priv->tray_icon);
- 	return TRUE;
-}
-
 void
 rb_shell_hidden_notify (RBShell *shell,
 			guint timeout,
@@ -2869,7 +2825,7 @@
 
 	rb_tray_icon_notify (shell->priv->tray_icon,
 			     timeout, primary,
-			     icon, secondary);
+			     NULL, secondary);
 }
 
 static void
Index: shell/rb-tray-icon.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/shell/rb-tray-icon.c,v
retrieving revision 1.34
diff -u -r1.34 rb-tray-icon.c
--- shell/rb-tray-icon.c	17 Jul 2006 14:52:29 -0000	1.34
+++ shell/rb-tray-icon.c	11 Aug 2006 21:52:40 -0000
@@ -39,6 +39,10 @@
 #include "rb-shell.h"
 #include "rb-shell-player.h"
 
+#ifdef HAVE_NOTIFY
+#include <libnotify/notify.h>
+#endif
+
 static void rb_tray_icon_class_init (RBTrayIconClass *klass);
 static void rb_tray_icon_init (RBTrayIcon *shell_player);
 static GObject *rb_tray_icon_constructor (GType type, guint n_construct_properties,
@@ -55,26 +59,16 @@
 					  guint prop_id,
 					  GValue *value,
 					  GParamSpec *pspec);
-static void rb_tray_icon_button_press_event_cb (GtkWidget *ebox, GdkEventButton *event,
-						RBTrayIcon *icon);
-static void rb_tray_icon_scroll_event_cb (GtkWidget *ebox, GdkEvent *event,
-						RBTrayIcon *icon);
+static void rb_tray_icon_activate_cb (GtkStatusIcon *status_icon, RBTrayIcon *icon);
+static void rb_tray_icon_popup_menu_cb (GtkStatusIcon *status_icon, guint button,
+					guint activate_time, RBTrayIcon *icon);
 static void rb_tray_icon_show_window_changed_cb (GtkAction *action,
 						 RBTrayIcon *icon);
 static void rb_tray_icon_show_notifications_changed_cb (GtkAction *action,
 							RBTrayIcon *icon);
-static void rb_tray_icon_drop_cb (GtkWidget *widget,
-				  GdkDragContext *context,
-				  gint x,
-				  gint y,
-				  GtkSelectionData *data,
-				  guint info,
-				  guint time,
-				  RBTrayIcon *icon);
 
 struct RBTrayIconPrivate
 {
-	GtkTooltips *tooltips;
 	GtkUIManager *ui_manager;
 	GtkActionGroup *actiongroup;
 
@@ -84,6 +78,9 @@
 	RBShellPlayer *shell_player;
 
 	gboolean show_notifications;
+#ifdef HAVE_NOTIFY
+	NotifyNotification *notification;
+#endif
 };
 
 #define RB_TRAY_ICON_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), RB_TYPE_TRAY_ICON, RBTrayIconPrivate))
@@ -112,9 +109,7 @@
 };
 static guint rb_tray_icon_n_toggle_entries = G_N_ELEMENTS (rb_tray_icon_toggle_entries);
 
-static const GtkTargetEntry target_uri [] = {{ "text/uri-list", 0, 0 }};
-
-G_DEFINE_TYPE (RBTrayIcon, rb_tray_icon, EGG_TYPE_TRAY_ICON)
+G_DEFINE_TYPE (RBTrayIcon, rb_tray_icon, GTK_TYPE_STATUS_ICON)
 
 static void
 rb_tray_icon_class_init (RBTrayIconClass *klass)
@@ -155,36 +150,22 @@
 static void
 rb_tray_icon_init (RBTrayIcon *icon)
 {
-	GtkWidget *image;
-
 	rb_debug ("setting up tray icon");
 
 	icon->priv = RB_TRAY_ICON_GET_PRIVATE (icon);
 
-	icon->priv->tooltips = gtk_tooltips_new ();
-
-	gtk_tooltips_set_tip (icon->priv->tooltips, GTK_WIDGET (icon),
-			      _("Not playing"), NULL);
+	gtk_status_icon_set_tooltip (GTK_STATUS_ICON (icon), _("Not playing"));
 
-	icon->priv->ebox = gtk_event_box_new ();
-	g_signal_connect_object (G_OBJECT (icon->priv->ebox),
-				 "button_press_event",
-				 G_CALLBACK (rb_tray_icon_button_press_event_cb),
+	g_signal_connect_object (G_OBJECT (icon),
+				 "activate",
+				 G_CALLBACK (rb_tray_icon_activate_cb),
 				 icon, 0);
-	g_signal_connect_object (G_OBJECT (icon->priv->ebox),
-				 "scroll_event",
-				 G_CALLBACK (rb_tray_icon_scroll_event_cb),
+	g_signal_connect_object (G_OBJECT (icon),
+				 "popup-menu",
+				 G_CALLBACK (rb_tray_icon_popup_menu_cb),
 				 icon, 0);
-	gtk_drag_dest_set (icon->priv->ebox, GTK_DEST_DEFAULT_ALL, target_uri, 1, GDK_ACTION_COPY);
-	g_signal_connect_object (G_OBJECT (icon->priv->ebox), "drag_data_received",
-				 G_CALLBACK (rb_tray_icon_drop_cb), icon, 0);
-
-	image = gtk_image_new_from_stock (RB_STOCK_TRAY_ICON,
-					  GTK_ICON_SIZE_SMALL_TOOLBAR);
-	gtk_container_add (GTK_CONTAINER (icon->priv->ebox), image);
 
-	gtk_container_add (GTK_CONTAINER (icon), icon->priv->ebox);
-	gtk_widget_show_all (GTK_WIDGET (icon->priv->ebox));
+	gtk_status_icon_set_from_stock (GTK_STATUS_ICON (icon), RB_STOCK_TRAY_ICON);
 }
 
 static GObject *
@@ -239,7 +220,11 @@
 		g_object_unref (tray->priv->shell_player);
 	}
 
-	gtk_object_destroy (GTK_OBJECT (tray->priv->tooltips));
+#ifdef HAVE_NOTIFY
+	if (tray->priv->notification != NULL) {
+		notify_notification_close (tray->priv->notification, NULL);
+	}
+#endif
 
 	G_OBJECT_CLASS (rb_tray_icon_parent_class)->finalize (object);
 }
@@ -328,144 +313,32 @@
 		  RBShell *shell)
 {
 	return g_object_new (RB_TYPE_TRAY_ICON,
-			     "title", "Rhythmbox tray icon",
 			     "ui-manager", mgr,
 			     "shell", shell,
 			     NULL);
 }
 
 static void
-tray_popup_position_menu (GtkMenu *menu,
-			  int *x,
-			  int *y,
-			  gboolean *push_in,
-			  gpointer user_data)
-{
-        GtkWidget *widget;
-        GtkRequisition requisition;
-        gint menu_xpos;
-        gint menu_ypos;
-
-        widget = GTK_WIDGET (user_data);
-
-        gtk_widget_size_request (GTK_WIDGET (menu), &requisition);
-
-        gdk_window_get_origin (widget->window, &menu_xpos, &menu_ypos);
-
-        menu_xpos += widget->allocation.x;
-        menu_ypos += widget->allocation.y;
-
-	if (menu_ypos > gdk_screen_get_height (gtk_widget_get_screen (widget)) / 2)
-		menu_ypos -= requisition.height + widget->style->ythickness;
-	else
-		menu_ypos += widget->allocation.height + widget->style->ythickness;
-
-        *x = menu_xpos;
-        *y = menu_ypos;
-        *push_in = TRUE;
-}
-
-static void
-rb_tray_icon_button_press_event_cb (GtkWidget *ebox, GdkEventButton *event,
-				    RBTrayIcon *icon)
+rb_tray_icon_activate_cb (GtkStatusIcon *status_icon, RBTrayIcon *icon)
 {
-	GtkWidget *popup;
+	rb_debug ("tray activate");
 
-	/* filter out double, triple clicks */
-	if (event->type != GDK_BUTTON_PRESS)
-		return;
-
-	rb_debug ("tray button press");
-
-	switch (event->button) {
-	case 1:
-		rb_shell_toggle_visibility (icon->priv->shell);
-		break;
-	case 2:
-		rb_shell_player_playpause (icon->priv->shell_player, FALSE, NULL);
-		break;
-	case 3:
-		popup = gtk_ui_manager_get_widget (GTK_UI_MANAGER (icon->priv->ui_manager),
-						   "/RhythmboxTrayPopup");
-		gtk_menu_set_screen (GTK_MENU (popup), gtk_widget_get_screen (GTK_WIDGET (icon)));
-		gtk_menu_popup (GTK_MENU (popup), NULL, NULL,
-				tray_popup_position_menu, ebox, 2,
-				gtk_get_current_event_time ());
-		break;
-	}
+	rb_shell_toggle_visibility (icon->priv->shell);
 }
 
 static void
-rb_tray_icon_scroll_event_cb (GtkWidget *ebox, GdkEvent *event,
-				    RBTrayIcon *icon)
+rb_tray_icon_popup_menu_cb (GtkStatusIcon *status_icon, guint button,
+			    guint activate_time, RBTrayIcon *icon)
 {
-	gdouble adjust;
-
-	switch (event->scroll.direction) {
-	case GDK_SCROLL_UP:
-		adjust = 0.1;
-		break;
-	case GDK_SCROLL_DOWN:
-		adjust = -0.1;
-		break;
-	default:
-		return;
-	}
-
-	rb_shell_player_set_volume_relative (icon->priv->shell_player, adjust, NULL);
-}
-
-static void
-rb_tray_icon_drop_cb (GtkWidget *widget,
-		      GdkDragContext *context,
-		      gint x,
-		      gint y,
-		      GtkSelectionData *data,
-		      guint info,
-		      guint time,
-		      RBTrayIcon *icon)
-{
-	GList *list, *uri_list, *i;
-	GtkTargetList *tlist;
-	gboolean ret;
-
-	tlist = gtk_target_list_new (target_uri, 1);
-	ret = (gtk_drag_dest_find_target (widget, context, tlist) != GDK_NONE);
-	gtk_target_list_unref (tlist);
-
-	if (ret == FALSE)
-		return;
-
-	list = gnome_vfs_uri_list_parse ((char *) data->data);
-
-	if (list == NULL) {
-		gtk_drag_finish (context, FALSE, FALSE, time);
-		return;
-	}
-
-	uri_list = NULL;
-
-	for (i = list; i != NULL; i = g_list_next (i))
-		uri_list = g_list_prepend (uri_list, gnome_vfs_uri_to_string ((const GnomeVFSURI *) i->data, 0));
-
-	gnome_vfs_uri_list_free (list);
-
-	if (uri_list == NULL) {
-		gtk_drag_finish (context, FALSE, FALSE, time);
-		return;
-	}
-
-	for (i = uri_list; i != NULL; i = i->next) {
-		char *uri = i->data;
-		if (uri != NULL)
-			rb_shell_load_uri (icon->priv->shell, uri, FALSE, NULL);
-
-		g_free (uri);
-	}
+	GtkWidget *popup;
 
-	g_list_free (uri_list);
+	rb_debug ("tray popup menu");
 
-	gtk_drag_finish (context, TRUE, FALSE, time);
+	popup = gtk_ui_manager_get_widget (GTK_UI_MANAGER (icon->priv->ui_manager),
+			"/RhythmboxTrayPopup");
+	gtk_menu_popup (GTK_MENU (popup), NULL, NULL,
+			gtk_status_icon_position_menu, icon, button,
+			activate_time);
 }
 
 static void
@@ -488,51 +361,48 @@
 }
 
 void
-rb_tray_icon_get_geom (RBTrayIcon *icon, int *x, int *y, int *width, int *height)
-{
-	GtkWidget *widget;
-	GtkRequisition requisition;
-
-	widget = GTK_WIDGET (icon->priv->ebox);
-
-	gtk_widget_size_request (widget, &requisition);
-
-	gdk_window_get_origin (widget->window, x, y);
-
-	*width = widget->allocation.x;
-	*height = widget->allocation.y;
-}
-
-void
-rb_tray_icon_set_tooltip (RBTrayIcon *icon, const char *tooltip)
-{
-	gtk_tooltips_set_tip (icon->priv->tooltips,
-			      GTK_WIDGET (icon),
-			      tooltip, NULL);
-}
-
-void
 rb_tray_icon_notify (RBTrayIcon *icon,
 		     guint timeout,
 		     const char *primary,
-		     GtkWidget *msgicon,
+		     const char *msgicon,
 		     const char *secondary)
 {
-	if (!egg_tray_icon_have_manager (EGG_TRAY_ICON (icon))) {
-		rb_debug ("not showing notification: %s", primary);
-		return;
-	}
 	if (!icon->priv->show_notifications) {
 		rb_debug ("ignoring notification: %s", primary);
 		return;
 	}
 
+#ifdef HAVE_NOTIFY
 	rb_debug ("doing notify: %s", primary);
-	egg_tray_icon_notify (EGG_TRAY_ICON (icon), timeout, primary, msgicon, secondary);
+
+	if (!notify_is_initted () && !notify_init ("rhythmbox")) {
+		rb_debug ("cannot initialize notification");
+		return;
+	}
+
+	if (icon->priv->notification != NULL) {
+		notify_notification_close (icon->priv->notification, NULL);
+		icon->priv->notification = NULL;
+	}
+
+	/* FIXME: Workaround libnotify#85 (http://trac.galago-project.org/ticket/85) */
+	icon->priv->notification = notify_notification_new (primary, secondary, NULL, NULL);
+	g_object_set (G_OBJECT (icon->priv->notification), "status-icon", icon, NULL);
+	notify_notification_set_urgency (icon->priv->notification, NOTIFY_URGENCY_LOW);
+	notify_notification_set_timeout (icon->priv->notification, 4 * 1000);
+	notify_notification_show (icon->priv->notification, NULL);
+	g_signal_connect_object (G_OBJECT (icon->priv->notification), "closed", 
+				 G_CALLBACK (g_object_unref), NULL, 0);
+#endif
 }
 
 void
 rb_tray_icon_cancel_notify (RBTrayIcon *icon)
 {
-	egg_tray_icon_cancel_message (EGG_TRAY_ICON (icon), 1);
+#ifdef HAVE_NOTIFY
+	if (icon->priv->notification != NULL) {
+		notify_notification_close (icon->priv->notification, NULL);
+		icon->priv->notification = NULL;
+	}
+#endif
 }
Index: shell/rb-tray-icon.h
===================================================================
RCS file: /cvs/gnome/rhythmbox/shell/rb-tray-icon.h,v
retrieving revision 1.10
diff -u -r1.10 rb-tray-icon.h
--- shell/rb-tray-icon.h	12 May 2006 16:04:49 -0000	1.10
+++ shell/rb-tray-icon.h	11 Aug 2006 21:52:40 -0000
@@ -21,7 +21,7 @@
 
 #include <gtk/gtkactiongroup.h>
 #include <gtk/gtkuimanager.h>
-#include "eggtrayicon.h"
+#include <gtk/gtkstatusicon.h>
 #include "rhythmdb.h"
 #include "rb-shell.h"
 
@@ -41,31 +41,27 @@
 
 typedef struct
 {
-	EggTrayIcon parent;
+	GtkStatusIcon parent;
 
 	RBTrayIconPrivate *priv;
 } RBTrayIcon;
 
 typedef struct
 {
-	EggTrayIconClass parent_class;
+	GtkStatusIconClass parent_class;
 } RBTrayIconClass;
 
 GType			rb_tray_icon_get_type	(void);
 
 RBTrayIcon *		rb_tray_icon_new	(GtkUIManager *mgr, RBShell *shell);
 
-void                    rb_tray_icon_get_geom   (RBTrayIcon *icon, int *x, int *y, int *width, int *height);
-
 void                    rb_tray_icon_notify     (RBTrayIcon *icon,
 						 guint timeout,
 						 const char *primary,
-						 GtkWidget *msgicon,
+						 const char *msgicon,
 						 const char *secondary);
 
 void                    rb_tray_icon_cancel_notify (RBTrayIcon *icon);
-
-void			rb_tray_icon_set_tooltip(RBTrayIcon *icon, const char *tooltip);
 
 G_END_DECLS
 
Index: widgets/Makefile.am
===================================================================
RCS file: /cvs/gnome/rhythmbox/widgets/Makefile.am,v
retrieving revision 1.34
diff -u -r1.34 Makefile.am
--- widgets/Makefile.am	10 Jul 2006 04:19:59 -0000	1.34
+++ widgets/Makefile.am	11 Aug 2006 21:52:40 -0000
@@ -20,8 +20,6 @@
 	bacon-volume.h					\
 	rb-druid.c					\
 	rb-druid.h					\
-	eggtrayicon.c					\
-	eggtrayicon.h					\
 	rb-dialog.c					\
 	rb-dialog.h					\
 	rb-cell-renderer-pixbuf.c			\
