? .deps
? .libs
? GNOME_Media_CDDBSlave2-common.lo
? GNOME_Media_CDDBSlave2-skels.lo
? GNOME_Media_CDDBSlave2-stubs.lo
? libgnomemedia-cddbslave2.la
? access/.deps
? access/.libs
? access/cddisplayaccessible.lo
? access/cddisplayaccessiblefactory.lo
? access/factory.lo
? access/libgnomecdaccess.la
? access/pangoaccessible.lo
? access/pangoaccessiblefactory.lo
Index: callbacks.c
===================================================================
RCS file: /cvs/gnome/gnome-media/gnome-cd/callbacks.c,v
retrieving revision 1.82
diff -u -p -r1.82 callbacks.c
--- callbacks.c	21 Dec 2005 14:30:09 -0000	1.82
+++ callbacks.c	25 Jul 2006 14:54:01 -0000
@@ -592,8 +592,8 @@ status_ok (GnomeCD *gcd,
 		} else {
 			text = g_strdup_printf (_("Playing\n: %s"), current_time);
 		}
-		if (gcd->tray_tips)	
-			gtk_tooltips_set_tip (gcd->tray_tips, gcd->tray, text, NULL);
+		if (gcd->tray)	
+			gtk_status_icon_set_tooltip (gcd->tray, text);
 		g_free (text);
 		
 		break;
@@ -613,8 +613,8 @@ status_ok (GnomeCD *gcd,
 		set_window_track_title (gcd, status);
 
 		/* Update the tray icon tooltip */
-		if (gcd->tray_tips)	
-			gtk_tooltips_set_tip (gcd->tray_tips, gcd->tray, _("Paused"), NULL);
+		if (gcd->tray)	
+			gtk_status_icon_set_tooltip (gcd->tray, _("Paused"));
 		break;
 		
 	case GNOME_CDROM_AUDIO_COMPLETE:
@@ -664,8 +664,8 @@ status_ok (GnomeCD *gcd,
 			set_track_option_menu (GTK_OPTION_MENU (gcd->tracks), 1);
 
 			/* Update tray icon tooltip */
-			if (gcd->tray_tips)	
-				gtk_tooltips_set_tip (gcd->tray_tips, gcd->tray, _("CD Player"), NULL);
+			if (gcd->tray)	
+				gtk_status_icon_set_tooltip (gcd->tray, _("CD Player"));
 			if (gcd->tooltips)
 				gtk_tooltips_set_tip (gcd->tooltips, GTK_WIDGET(gcd->display), _("CD Player"), NULL);
 
@@ -690,8 +690,8 @@ status_ok (GnomeCD *gcd,
 		}
 
 		/* Update the tray icon tooltip */
-		if (gcd->tray_tips)	
-			gtk_tooltips_set_tip (gcd->tray_tips, gcd->tray, _("Stopped"), NULL);
+		if (gcd->tray)	
+			gtk_status_icon_set_tooltip (gcd->tray, _("Stopped"));
 		break;
 		
 	case GNOME_CDROM_AUDIO_ERROR:
@@ -707,8 +707,8 @@ status_ok (GnomeCD *gcd,
 		}
 
 		/* Update the tray icon tooltip */
-		if (gcd->tray_tips)	
-			gtk_tooltips_set_tip (gcd->tray_tips, gcd->tray, _("No disc"), NULL);
+		if (gcd->tray)	
+			gtk_status_icon_set_tooltip (gcd->tray, _("No disc"));
 		break;
 		
 	default:
@@ -891,8 +891,8 @@ cd_status_changed_cb (GnomeCDRom *cdrom,
                 gnome_cd_set_window_title (gcd, NULL, NULL);
 
 		/* Updated the tray icon tooltip */
-		if (gcd->tray_tips)	
-			gtk_tooltips_set_tip (gcd->tray_tips, gcd->tray, _("No Cdrom"), NULL);
+		if (gcd->tray)	
+			gtk_status_icon_set_tooltip (gcd->tray, _("No Cdrom"));
                 break;
 
 	default:
@@ -1003,82 +1003,32 @@ popup_menu_cb (GtkWidget *widget, GnomeC
     return TRUE;
 }
 
-gboolean
-tray_icon_clicked (GtkWidget *widget, GdkEventButton *event, GnomeCD *gcd)
+void
+tray_popup_menu_cb (GtkStatusIcon *icon,
+		    guint          button,
+                    guint          activate_time,
+		    GnomeCD       *gcd)
 {
-	if (event->button != 3) {
-		if (GTK_WIDGET_VISIBLE (gcd->window)) {
-			gtk_widget_hide (gcd->window);
-		} else {
-			gtk_widget_show (gcd->window);
-		}
-
-		return TRUE;
-	} else {
-	if (event->button == 3) {	
-		make_popup_menu(gcd, NULL, TRUE);
-		return TRUE;
-	}
-		return FALSE;
-	}
+    make_popup_menu (gcd, NULL, FALSE);
 }
 
-gboolean
-tray_icon_pressed (GtkWidget *widget, GdkEventKey *event, GnomeCD *gcd)
+void
+tray_icon_activated (GtkStatusIcon *icon, GnomeCD *gcd)
 {
-	if (event->keyval == GDK_space ||
-	    event->keyval == GDK_KP_Space ||
-	    event->keyval == GDK_Return ||
-	    event->keyval == GDK_KP_Enter) {
-		if (GTK_WIDGET_VISIBLE (gcd->window)) {
-			gtk_widget_hide (gcd->window);
-		} else {
-			gtk_widget_show (gcd->window);
-		}
-
-		return TRUE;
+	if (GTK_WIDGET_VISIBLE (gcd->window)) {
+		gtk_widget_hide (gcd->window);
 	} else {
-		return FALSE;
+		gtk_widget_show (gcd->window);
 	}
 }
 
-gint
-tray_icon_expose (GtkWidget* widget, GdkEventExpose *event)
-{
-  /*
-   * Draw focus indication if the GtkEventBox has focus.
-   */
-  if (GTK_WIDGET_HAS_FOCUS (gtk_widget_get_parent (widget)))
-    {
-      gint focus_width, focus_pad;
-      gint x, y, width, height;
-
-      gtk_widget_style_get (widget,
-                            "focus-line-width", &focus_width,
-                            "focus-padding", &focus_pad,
-                            NULL);
-      x = widget->allocation.x + focus_pad;
-      y = widget->allocation.y + focus_pad;
-      width = widget->allocation.width -  2 * focus_pad;
-      height = widget->allocation.height - 2 * focus_pad;
-      gtk_paint_focus (widget->style, widget->window,
-                       GTK_STATE_NORMAL,
-                       &event->area, widget, "button",
-                       x, y, width, height);
-    }
-  return FALSE;
-}
-
 gboolean
 tray_icon_destroyed (GtkWidget *widget, GnomeCD *gcd)
 {
-	GdkPixbuf *pixbuf;
-	GtkWidget *box;
-
 	if (!GTK_WIDGET_VISIBLE (gcd->window)) {
 		gtk_widget_show (gcd->window);
 	}
-	gtk_widget_destroy (gcd->tray);
+	g_object_unref (gcd->tray);
 	gcd->tray = NULL;
 
 	tray_icon_create (gcd);
Index: callbacks.h
===================================================================
RCS file: /cvs/gnome/gnome-media/gnome-cd/callbacks.h,v
retrieving revision 1.16
diff -u -p -r1.16 callbacks.h
--- callbacks.h	21 Dec 2005 14:30:10 -0000	1.16
+++ callbacks.h	25 Jul 2006 14:54:01 -0000
@@ -68,15 +68,13 @@ void position_slider_leave (GtkRange *ra
 			    GdkEventCrossing *event,
 			    GnomeCD *gcd);
 
-gboolean tray_icon_clicked (GtkWidget *widget,
-                           GdkEventButton *event,
-                           GnomeCD *gcd);
+void tray_popup_menu_cb (GtkStatusIcon *icon,
+			 guint          button,
+			 guint          activate_time,
+			 GnomeCD       *gcd);
+void tray_icon_activated (GtkStatusIcon *icon,
+			  GnomeCD *gcd);
 
-gboolean tray_icon_pressed (GtkWidget *widget,
-                           GdkEventKey *event,
-                           GnomeCD *gcd);
-gint tray_icon_expose (GtkWidget* widget,
-                      GdkEventExpose *event);
 gboolean button_press_event_cb (GtkWidget *widget,
 	                      GdkEventButton *event,
 	                      GnomeCD *gcd);
Index: gnome-cd.c
===================================================================
RCS file: /cvs/gnome/gnome-media/gnome-cd/gnome-cd.c,v
retrieving revision 1.106
diff -u -p -r1.106 gnome-cd.c
--- gnome-cd.c	24 May 2006 10:06:21 -0000	1.106
+++ gnome-cd.c	25 Jul 2006 14:54:01 -0000
@@ -574,17 +574,6 @@ show_error (GtkWidget	*dialog,
 	}
 }
 
-static void
-tray_object_destroyed (GnomeCD *gcd)
-{
-	/* FIXME: gcd->tray should also be set to NULL.  
-	   Need a mechanism to re-create the eggtrayicon
-	   when the tray applet is re-added.
-	*/
-	g_free (gcd->tray_tips);
-	gcd->tray_tips = NULL;
-}
-
 static GnomeCD *
 init_player (const char *device_override)
 {
@@ -873,40 +862,23 @@ tray_icon_create (GnomeCD *gcd)
 	GdkPixbuf *icon;
 	GtkWidget *box;
 
+	icon = pixbuf_from_file ("gnome-cd/cd.png");
+	pixbuf = gdk_pixbuf_scale_simple (icon, 16, 16, GDK_INTERP_BILINEAR);
+	g_object_unref (G_OBJECT (icon));
+
 	/* Tray icon */
-	gcd->tray = GTK_WIDGET (egg_tray_icon_new ("GnomeCD Tray Icon"));
-	box = gtk_event_box_new ();
-	g_signal_connect (G_OBJECT (gcd->tray), "destroy",
-			 	G_CALLBACK (tray_icon_destroyed), gcd);
-	g_signal_connect (G_OBJECT (box), "button_press_event",
-			 	G_CALLBACK (tray_icon_clicked), gcd);
-	g_signal_connect (G_OBJECT (box), "key_press_event",
-			 	G_CALLBACK (tray_icon_pressed), gcd);
+	gcd->tray = gtk_status_icon_new_from_pixbuf (pixbuf);
+	g_object_unref (G_OBJECT (pixbuf));
 
-	g_object_set_data_full (G_OBJECT (gcd->tray), "tray-action-data", gcd,
-				(GDestroyNotify) tray_object_destroyed);
+	gtk_status_icon_set_tooltip (gcd->tray, _("CD Player"));
 
-	gtk_container_add (GTK_CONTAINER (gcd->tray), box);
-	
-	icon = pixbuf_from_file ("gnome-cd/cd.png");
-	pixbuf = gdk_pixbuf_scale_simple (icon,
-				16, 16, GDK_INTERP_BILINEAR);
-	gcd->tray_icon = gtk_image_new_from_pixbuf (pixbuf);
-	g_signal_connect (G_OBJECT (gcd->tray_icon), "expose_event",
-			 	G_CALLBACK (tray_icon_expose), gcd);
-			 	
-	g_object_unref (G_OBJECT (pixbuf));
-	g_object_unref (G_OBJECT (icon));
+	g_signal_connect (G_OBJECT (gcd->tray), "popup_menu",
+			        G_CALLBACK (tray_popup_menu_cb), gcd);
+	g_signal_connect (G_OBJECT (gcd->tray), "activate",
+			 	G_CALLBACK (tray_icon_activated), gcd);
 
-	GTK_WIDGET_SET_FLAGS (box, GTK_CAN_FOCUS);
-	atk_object_set_name (gtk_widget_get_accessible (box), _("CD Player"));
-	gtk_container_add (GTK_CONTAINER (box), gcd->tray_icon);
-	gcd->tray_tips = gtk_tooltips_new ();
-	gtk_tooltips_set_tip (GTK_TOOLTIPS(gcd->tray_tips), gcd->tray, _("CD Player"), NULL);
-	g_signal_connect (G_OBJECT (box), "popup_menu",
-	            G_CALLBACK (popup_menu_cb), gcd);
-	
-	gtk_widget_show_all (gcd->tray);
+	g_object_set_data_full (G_OBJECT (gcd->tray), "tray-action-data", gcd,
+				(GDestroyNotify) tray_icon_destroyed);
 }
 
 static int 
Index: gnome-cd.h
===================================================================
RCS file: /cvs/gnome/gnome-media/gnome-cd/gnome-cd.h,v
retrieving revision 1.33
diff -u -p -r1.33 gnome-cd.h
--- gnome-cd.h	21 Dec 2005 14:30:10 -0000	1.33
+++ gnome-cd.h	25 Jul 2006 14:54:01 -0000
@@ -9,6 +9,7 @@
 #define __GNOME_CD_H__
 
 #include <gtk/gtkwidget.h>
+#include <gtk/gtkstatusicon.h>
 #include <gtk/gtktooltips.h>
 
 #include <pango/pango.h>
@@ -20,7 +21,6 @@
 #include "cd-selection.h"
 #include "preferences.h"
 #include "cdrom.h"
-#include "eggtrayicon.h"
 
 #define NUMBER_OF_DISPLAY_LINES 5
 
@@ -49,9 +49,7 @@ typedef struct _GCDTheme {
 } GCDTheme;
 
 struct _GnomeCD {
-	GtkWidget *tray;
-	GtkWidget *tray_icon;
-	GtkTooltips *tray_tips;
+	GtkStatusIcon *tray;
 
 	GtkWidget *window;
 	GtkWidget *vbox;
