? libegg-mustdie.patch
Index: Makefile.am
===================================================================
RCS file: /cvs/gnome/gnome-bluetooth/Makefile.am,v
retrieving revision 1.11
diff -c -r1.11 Makefile.am
*** Makefile.am	18 Sep 2006 15:36:33 -0000	1.11
--- Makefile.am	14 Oct 2006 14:28:21 -0000
***************
*** 1,6 ****
  ## Process this file with automake to produce Makefile.in
  
! SUBDIRS = po libegg src obex data ui pixmaps
  
  EXTRA_DIST = \
  	intltool-extract.in intltool-merge.in intltool-update.in \
--- 1,6 ----
  ## Process this file with automake to produce Makefile.in
  
! SUBDIRS = po src obex data ui pixmaps
  
  EXTRA_DIST = \
  	intltool-extract.in intltool-merge.in intltool-update.in \
Index: configure.in
===================================================================
RCS file: /cvs/gnome/gnome-bluetooth/configure.in,v
retrieving revision 1.60
diff -c -r1.60 configure.in
*** configure.in	4 Oct 2006 14:16:50 -0000	1.60
--- configure.in	14 Oct 2006 14:28:22 -0000
***************
*** 69,75 ****
  AC_SUBST(GNOME_BLUETOOTH_DATA_DIR)
  
  dnl stuff for obex
! PKG_CHECK_MODULES(GOBEX, gtk+-2.0 >= 2.6.0 gnome-vfs-2.0 librsvg-2.0 libgnomeui-2.0 libglade-2.0 libgnome-2.0 >= 2.0.0 gnome-vfs-module-2.0)
  AC_SUBST(GOBEX_LIBS)
  AC_SUBST(GOBEX_CFLAGS)
  
--- 69,75 ----
  AC_SUBST(GNOME_BLUETOOTH_DATA_DIR)
  
  dnl stuff for obex
! PKG_CHECK_MODULES(GOBEX, gtk+-2.0 >= 2.10.0 gnome-vfs-2.0 librsvg-2.0 libgnomeui-2.0 libglade-2.0 libgnome-2.0 >= 2.0.0 gnome-vfs-module-2.0)
  AC_SUBST(GOBEX_LIBS)
  AC_SUBST(GOBEX_CFLAGS)
  
***************
*** 114,121 ****
  else
      AC_MSG_RESULT(no)
  fi
- 
- AC_CONFIG_SUBDIRS(libegg)
  
  AC_OUTPUT([
  Makefile
--- 114,119 ----
Index: obex/Makefile.am
===================================================================
RCS file: /cvs/gnome/gnome-bluetooth/obex/Makefile.am,v
retrieving revision 1.10
diff -c -r1.10 Makefile.am
*** obex/Makefile.am	19 Apr 2006 19:37:13 -0000	1.10
--- obex/Makefile.am	14 Oct 2006 14:28:22 -0000
***************
*** 15,21 ****
  
  gnome_obex_server_LDADD = \
  	$(GNOME_BLUETOOTH_LIBS) \
- 	../libegg/libegg/tray/libeggtray.la \
  	../src/libgnomebt.la
  
  gnome_obex_send_LDFLAGS = \
--- 15,20 ----
***************
*** 23,29 ****
  	../src/libgnomebt.la
  
  INCLUDES = $(GNOME_BLUETOOTH_CFLAGS) \
! 	-I$(top_srcdir)/libegg/libegg/tray -I../src \
  	-I$(top_srcdir)/src \
  	-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
  	-DDATA_DIR="\"$(GNOME_BLUETOOTH_DATA_DIR)\"" \
--- 22,28 ----
  	../src/libgnomebt.la
  
  INCLUDES = $(GNOME_BLUETOOTH_CFLAGS) \
! 	-I../src \
  	-I$(top_srcdir)/src \
  	-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
  	-DDATA_DIR="\"$(GNOME_BLUETOOTH_DATA_DIR)\"" \
Index: obex/gnome-obex-server.c
===================================================================
RCS file: /cvs/gnome/gnome-bluetooth/obex/gnome-obex-server.c,v
retrieving revision 1.11
diff -c -r1.11 gnome-obex-server.c
*** obex/gnome-obex-server.c	17 Apr 2006 10:50:00 -0000	1.11
--- obex/gnome-obex-server.c	14 Oct 2006 14:28:22 -0000
***************
*** 48,56 ****
  
  #include <btobex.h>
  
! #include "eggtrayicon.h"
  #include "gnomebt-controller.h"
! #include "gnomebt-spinner.h"
  #include "gnomebt-permissiondialog.h"
  #include "gnomebt-fileactiondialog.h"
  #include "util.h"
--- 48,56 ----
  
  #include <btobex.h>
  
! //#include "eggtrayicon.h"
  #include "gnomebt-controller.h"
! //#include "gnomebt-spinner.h"
  #include "gnomebt-permissiondialog.h"
  #include "gnomebt-fileactiondialog.h"
  #include "util.h"
***************
*** 58,66 ****
  typedef struct _appinfo {
  	GnomebtController	*btctl;
  	BtctlObex		*obex;
! 	GnomebtSpinner	*spin;
  	GtkTooltips		*tooltip;
! 	EggTrayIcon	*tray_icon;
  	GtkMenu	*menu;
  	gboolean 	decision;
  } MyApp;
--- 58,66 ----
  typedef struct _appinfo {
  	GnomebtController	*btctl;
  	BtctlObex		*obex;
! 	//GnomebtSpinner	*spin;
  	GtkTooltips		*tooltip;
! 	GtkStatusIcon	*tray_icon;
  	GtkMenu	*menu;
  	gboolean 	decision;
  } MyApp;
***************
*** 169,187 ****
  static void
  progress_callback (BtctlObex *bo, gchar * bdaddr, MyApp *app)
  {
! 	/* g_message ("Progress from %s", bdaddr); */
! 	spincount++;
! 	if (spincount > 3) {
! 		gnomebt_spinner_spin (app->spin);
! 		spincount = 0;
! 	}
  }
  
  static void
  complete_callback (BtctlObex *bo, gchar * bdaddr, MyApp *app)
  {
! 	/* g_message ("Operation complete from %s", bdaddr); */
! 	gnomebt_spinner_reset (app->spin);
  }
  
  static void
--- 169,190 ----
  static void
  progress_callback (BtctlObex *bo, gchar * bdaddr, MyApp *app)
  {
! 	//g_message ("Progress from %s", bdaddr);
! 		gtk_status_icon_set_blinking(app->tray_icon,TRUE);
! 	//spincount++;
! 	//if (spincount > 3) {
! 		//gnomebt_spinner_spin (app->spin);
! 		//spincount = 0;
! 	//}
  }
  
  static void
  complete_callback (BtctlObex *bo, gchar * bdaddr, MyApp *app)
  {
! 	//g_message ("Operation complete from %s", bdaddr);
! 	if(gtk_status_icon_get_blinking(app->tray_icon))
! 		gtk_status_icon_set_blinking(app->tray_icon,FALSE);
! 	//gnomebt_spinner_reset (app->spin);
  }
  
  static void
***************
*** 209,215 ****
  			g_message ("Client aborted transfer");
  			break;
  	}
! 	gnomebt_spinner_reset (app->spin);
  }
  
  static void
--- 212,218 ----
  			g_message ("Client aborted transfer");
  			break;
  	}
! 	//gnomebt_spinner_reset (app->spin);
  }
  
  static void
***************
*** 344,397 ****
  }
  
  static gboolean
! tray_icon_press (GtkWidget *widget, GdkEventButton *event, MyApp *app)
  {
! 	if (event->button == 3)
  	{
  		gtk_menu_popup (GTK_MENU (app->menu), NULL, NULL, NULL,
! 						NULL, event->button, event->time);
  		return TRUE;
  	}
  	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 (_("Bluetooth File Sharing"));
- 	app->spin = gnomebt_spinner_new ();
- 	gnomebt_spinner_reset (app->spin);
- 
- 	g_signal_connect (G_OBJECT (app->tray_icon), "destroy",
- 		G_CALLBACK (tray_destroy_cb), (gpointer) app);
- 
- 	g_signal_connect (GTK_OBJECT (app->spin), "button_press_event",
- 		G_CALLBACK (tray_icon_press), (gpointer) app);
- 
- 	g_signal_connect (GTK_OBJECT (app->spin), "button_release_event",
- 		G_CALLBACK (tray_icon_release), (gpointer) app);
- 
- 	gtk_container_add (GTK_CONTAINER (app->tray_icon),
- 			GTK_WIDGET (app->spin));
- 
- 	gtk_widget_show_all (GTK_WIDGET (app->tray_icon));
- 
- 	return TRUE;
- }
  
  int
  main (int argc, char *argv[])
--- 347,364 ----
  }
  
  static gboolean
! tray_icon_press  (GtkStatusIcon *status_icon,guint button,
!                   guint activate_time,MyApp *app)
  {
! 	if (button == 3)
  	{
  		gtk_menu_popup (GTK_MENU (app->menu), NULL, NULL, NULL,
! 						NULL, button, activate_time);
  		return TRUE;
  	}
  	return FALSE;
  }
  
  
  int
  main (int argc, char *argv[])
***************
*** 428,435 ****
  				G_CALLBACK(error_callback), (gpointer) app);
  	g_signal_connect (G_OBJECT(app->obex), "connect",
  				G_CALLBACK(connect_callback), (gpointer) app);
  
- 	app->tray_icon = egg_tray_icon_new (_("Bluetooth File Server"));
  	app->btctl = gnomebt_controller_new ();
  
  	app->tooltip = gtk_tooltips_new();
--- 395,408 ----
  				G_CALLBACK(error_callback), (gpointer) app);
  	g_signal_connect (G_OBJECT(app->obex), "connect",
  				G_CALLBACK(connect_callback), (gpointer) app);
+ 	
+ 	app->tray_icon = gtk_status_icon_new();
+ 	gtk_status_icon_set_from_file(app->tray_icon ,DATA_DIR"/pixmaps/frame4.png");
+ 	
+ 	g_signal_connect (app->tray_icon, "popup-menu",
+ 		G_CALLBACK (tray_icon_press), (gpointer) app);
+ 
  
  	app->btctl = gnomebt_controller_new ();
  
  	app->tooltip = gtk_tooltips_new();
***************
*** 463,472 ****
  	gtk_widget_show (item);
  	gtk_menu_shell_append (GTK_MENU_SHELL(app->menu), item);
  
- 	tray_destroy_cb (NULL, app);
- 
  	gtk_tooltips_set_tip (app->tooltip,
! 						GTK_WIDGET (app->spin),
  						_("Ready for Bluetooth file transfers"),
  						NULL);
  
--- 436,443 ----
  	gtk_widget_show (item);
  	gtk_menu_shell_append (GTK_MENU_SHELL(app->menu), item);
  
  	gtk_tooltips_set_tip (app->tooltip,
! 						app->tray_icon,
  						_("Ready for Bluetooth file transfers"),
  						NULL);
  
