Index: Makefile.am
===================================================================
RCS file: /cvs/gnome/phonemgr/Makefile.am,v
retrieving revision 1.7
diff -u -p -r1.7 Makefile.am
--- Makefile.am	19 Nov 2005 20:59:46 -0000	1.7
+++ Makefile.am	15 Oct 2006 12:20:28 -0000
@@ -1,6 +1,6 @@
 ## Process this file with automake to produce Makefile.in
 
-SUBDIRS = po libgsm libegg src ui
+SUBDIRS = po libgsm src ui
 
 EXTRA_DIST = \
 	autogen.sh \
Index: configure.in
===================================================================
RCS file: /cvs/gnome/phonemgr/configure.in,v
retrieving revision 1.37
diff -u -p -r1.37 configure.in
--- configure.in	18 Sep 2006 15:41:43 -0000	1.37
+++ configure.in	15 Oct 2006 12:20:28 -0000
@@ -48,7 +48,7 @@ PKG_CHECK_MODULES(TMP_EVO, libebook-1.2,
 		evo_pc_file="libebook-1.2",
 		evo_pc_file="libebook-1.0")
 
-PKG_CHECK_MODULES(PHONEMGR, gtk+-2.0 glib-2.0 libgnomeui-2.0 >= 1.110.0
+PKG_CHECK_MODULES(PHONEMGR, gtk+-2.0 >= 2.10 glib-2.0 libgnomeui-2.0 >= 1.110.0
 	libgnome-2.0 gdk-pixbuf-2.0 gconf-2.0 libbtctl >= 0.4.1
 	libglade-2.0 gnome-bluetooth gnokii >= 0.6.4 $evo_pc_file
 	gmodule-2.0
@@ -127,7 +127,6 @@ else
     AC_MSG_RESULT(no)
 fi
 
-AC_CONFIG_SUBDIRS(libegg)
 
 AC_OUTPUT([
 Makefile
Index: src/Makefile.am
===================================================================
RCS file: /cvs/gnome/phonemgr/src/Makefile.am,v
retrieving revision 1.4
diff -u -p -r1.4 Makefile.am
--- src/Makefile.am	13 Jun 2005 10:12:58 -0000	1.4
+++ src/Makefile.am	15 Oct 2006 12:20:28 -0000
@@ -5,8 +5,7 @@ AM_CPPFLAGS = \
 	-DDATA_DIR="\"$(datadir)/$(PACKAGE)\"" \
 	-DVERSION="\"$(VERSION)\"" \
 	-DPACKAGE="\"$(PACKAGE)\"" \
-	-I$(srcdir)/../libgsm \
-	-I$(srcdir)/../libegg/libegg/tray
+	-I$(srcdir)/../libgsm 
 
 bin_PROGRAMS = gnome-phone-manager
 
@@ -23,7 +22,6 @@ gnome_phone_manager_SOURCES =		\
 
 gnome_phone_manager_LDADD = \
 	$(PHONEMGR_LIBS) \
-	../libegg/libegg/tray/libeggtray.la \
 	../libgsm/libgsmwrap.la
 
 EXTRA_DIST = gnome-phone-manager.desktop.in
@@ -40,6 +38,4 @@ test_entry_LDADD = $(PHONEMGR_LIBS)
 
 CLA_FILES = e-contact-entry.h e-contact-entry.c
 CLADIR = $(srcdir)/../../contact-lookup-applet/src/
-regenerate-built-sources:
-	EGGFILES="$(CLA_FILES)" EGGDIR="$(CLADIR)" $(srcdir)/update-from-egg.sh || true
 
Index: src/app.h
===================================================================
RCS file: /cvs/gnome/phonemgr/src/app.h,v
retrieving revision 1.7
diff -u -p -r1.7 app.h
--- src/app.h	13 Jun 2005 18:21:11 -0000	1.7
+++ src/app.h	15 Oct 2006 12:20:28 -0000
@@ -5,7 +5,7 @@
 #include <gnome.h>
 #include <glade/glade.h>
 #include <gconf/gconf-client.h>
-#include "eggtrayicon.h"
+//#include "eggtrayicon.h"
 
 #include "phonemgr-listener.h"
 
@@ -16,9 +16,9 @@ typedef struct _appinfo {
 
     /* gui stuff */
 	GtkTooltips	*tooltip;
-	EggTrayIcon	*tray_icon;
-	GtkImage    *image_icon;
-    GtkEventBox *event_box;
+	GtkStatusIcon *tray_icon;
+	//GtkImage    *image_icon;
+    //GtkEventBox *event_box;
 	GtkMenu *menu;
     GladeXML    *ui;
     gint    iconstate;
Index: src/icon.c
===================================================================
RCS file: /cvs/gnome/phonemgr/src/icon.c,v
retrieving revision 1.8
diff -u -p -r1.8 icon.c
--- src/icon.c	11 May 2006 21:51:15 -0000	1.8
+++ src/icon.c	15 Oct 2006 12:20:28 -0000
@@ -30,13 +30,14 @@ have_tray (void)
 }
 
 static gboolean
-tray_icon_press (GtkWidget *widget, GdkEventButton *event, MyApp *app)
+tray_icon_press  (GtkStatusIcon *status_icon,guint button,
+                  guint activate_time,MyApp *app)
 {
-	if (event->button == 3) {
+	if (button == 3) {
 		gtk_menu_popup (GTK_MENU (app->menu), NULL, NULL, NULL,
-						NULL, event->button, event->time);
+						NULL, button, activate_time);
 		return TRUE;
-	} else if (event->button == 1) {
+	} else if (button == 1) {
 		/* if not popping up messages automatically, popup a
 		 message on button 1 click */
 		if (app->messages && (! app->popup_cb)) {
@@ -46,49 +47,6 @@ tray_icon_press (GtkWidget *widget, GdkE
 	return FALSE;
 }
 
-static gboolean
-tray_icon_release (GtkWidget *widget, GdkEventButton *event, MyApp *app)
-{
-	if (event->button == 3) {
-		gtk_menu_popdown (GTK_MENU (app->menu));
-		return FALSE;
-	}
-
-	return TRUE;
-}
-
-static gboolean
-tray_destroy_cb (GtkObject *obj, MyApp *app)
-{
-	/* When try icon is destroyed, recreate it.  This happens
-	   when the notification area is removed. */
-
-	app->tray_icon = egg_tray_icon_new (_("Phone Manager"));
-
-	app->event_box = GTK_EVENT_BOX (gtk_event_box_new ());
-	app->image_icon = GTK_IMAGE (gtk_image_new ());
-
-	set_icon_state (app);
-
-	gtk_container_add (GTK_CONTAINER (app->event_box),
-			GTK_WIDGET (app->image_icon));
-	gtk_container_add (GTK_CONTAINER (app->tray_icon),
-			GTK_WIDGET (app->event_box));
-
-	g_signal_connect (G_OBJECT (app->tray_icon), "destroy",
-		G_CALLBACK (tray_destroy_cb), (gpointer) app);
-
-	g_signal_connect (GTK_OBJECT (app->event_box), "button_press_event",
-		G_CALLBACK (tray_icon_press), (gpointer) app);
-
-	g_signal_connect (GTK_OBJECT (app->event_box), "button_release_event",
-		G_CALLBACK (tray_icon_release), (gpointer) app);
-
-
-	gtk_widget_show_all (GTK_WIDGET (app->tray_icon));
-
-	return TRUE;
-}
 
 static
 GdkPixbuf *load_icon (MyApp *app, const gchar *iconname, int size)
@@ -139,9 +97,9 @@ flash_icon (MyApp *app)
 			&& app->messages)
 	{
 		if (app->flashon)
-			gtk_image_set_from_pixbuf (app->image_icon, pb_message);
+			gtk_status_icon_set_from_pixbuf (app->tray_icon, pb_message);
 		else
-			gtk_image_set_from_pixbuf (app->image_icon, pb_idle);
+			gtk_status_icon_set_from_pixbuf (app->tray_icon, pb_idle);
 		app->flashon = ! app->flashon;
 		return TRUE;
 	} else {
@@ -163,23 +121,19 @@ set_icon_state (MyApp *app)
 	if (app->listener && phonemgr_listener_connected (app->listener)) {
 		gtk_widget_set_sensitive (app->send_item, TRUE);
 		if (app->messages) {
-			gtk_image_set_from_pixbuf (app->image_icon, pb_message);
-			gtk_tooltips_set_tip (app->tooltip, GTK_WIDGET (app->event_box),
-					_("Message arrived"), NULL);
+			gtk_status_icon_set_from_pixbuf (app->tray_icon, pb_message);
+			gtk_status_icon_set_tooltip (app->tray_icon,_("Message arrived"));
 		} else {
-			gtk_image_set_from_pixbuf (app->image_icon, pb_idle);
-			gtk_tooltips_set_tip (app->tooltip, GTK_WIDGET (app->event_box),
-					_("Connected"), NULL);
+			gtk_status_icon_set_from_pixbuf (app->tray_icon, pb_idle);
+			gtk_status_icon_set_tooltip (app->tray_icon,_("Connected"));
 		}
 	} else if (app->connecting) {
-		gtk_image_set_from_pixbuf (app->image_icon, pb_connecting);
-		gtk_tooltips_set_tip (app->tooltip, GTK_WIDGET (app->event_box),
-				_("Connecting to phone"), NULL);
+		gtk_status_icon_set_from_pixbuf (app->tray_icon, pb_connecting);
+		gtk_status_icon_set_tooltip (app->tray_icon,_("Connecting to phone"));
 		gtk_widget_set_sensitive (app->send_item, FALSE);
 	} else {
-		gtk_image_set_from_pixbuf (app->image_icon, pb_error);
-		gtk_tooltips_set_tip (app->tooltip, GTK_WIDGET (app->event_box),
-				_("Not connected"), NULL);
+		gtk_status_icon_set_from_pixbuf (app->tray_icon, pb_error);
+		gtk_status_icon_set_tooltip (app->tray_icon,_("Not connected"));
 		gtk_widget_set_sensitive (app->send_item, FALSE);
 	}
 }
@@ -210,7 +164,18 @@ tray_icon_init (MyApp  *app)
 		
 		gtk_widget_show_all (GTK_WIDGET (dialog));
 	}
-	tray_destroy_cb (NULL, app);
+	/* When try icon is destroyed, recreate it.  This happens
+	   when the notification area is removed. */
+
+	app->tray_icon = gtk_status_icon_new();
+
+	set_icon_state (app);
+
+	g_signal_connect (app->tray_icon, "popup-menu",
+		G_CALLBACK (tray_icon_press), (gpointer) app);
+
+	//gtk_widget_show_all (app->tray_icon);
+
 }
 
 void
