=== modified file 'configure.ac'
--- old/configure.ac	2010-02-03 17:58:31 +0000
+++ new/configure.ac	2010-02-03 18:03:04 +0000
@@ -46,6 +46,7 @@
 LIBSOUP_REQS=2.26.0
 GUDEV_REQS=143
 LIBMTP_REQS=0.3.0
+APPINDICATOR_REQS=0.0.10
 
 AC_MSG_CHECKING([for GNU extension fwrite_unlocked])
 AC_LINK_IFELSE(
@@ -74,6 +75,19 @@
 # libgnomeui still required with gtk < 2.14
 PKG_CHECK_EXISTS(gtk+-2.0 >= 2.14, [LIBGNOME_REQS=], [LIBGNOME_REQS=libgnomeui-2.0])
 
+# have libappindicator
+PKG_CHECK_EXISTS(appindicator-0.1 >= $APPINDICATOR_REQS, [
+        have_app_indicator=yes
+        AC_DEFINE(HAVE_APP_INDICATOR, 1, [Have AppIndicator])
+], [have_app_indicator=no])
+AM_CONDITIONAL(HAVE_APP_INDICATOR, test x"$have_app_indicator" = xyes)
+if test x$have_app_indicator = xyes ; then
+   PKG_CHECK_MODULES(APP_INDICATOR,
+                     appindicator-0.1 >= $APPINDICATOR_REQS)
+   AC_SUBST(APP_INDICATOR_CFLAGS)
+   AC_SUBST(APP_INDICATOR_LIBS)
+fi
+
 # use gtk status icon with gtk >= 2.16
 PKG_CHECK_EXISTS(gtk+-2.0 >= 2.16, [
 	use_gtk_status_icon=yes
@@ -977,4 +991,10 @@
 	AC_MSG_NOTICE([   iTunes detection browser plugin (for podcasts) disabled])
 fi
 
+if test "x$have_app_indicator" != xno ; then
+        AC_MSG_NOTICE([** Application indicators enabled])
+else
+        AC_MSG_NOTICE([   Application indicators not enabled.])
+fi
+
 AC_MSG_NOTICE([End options])

=== modified file 'plugins/status-icon/Makefile.am'
--- old/plugins/status-icon/Makefile.am	2010-02-03 17:52:33 +0000
+++ new/plugins/status-icon/Makefile.am	2010-02-03 17:59:07 +0000
@@ -3,6 +3,11 @@
 plugindir = $(PLUGINDIR)/status-icon
 plugin_LTLIBRARIES = libstatus-icon.la
 
+if HAVE_APP_INDICATOR
+ICON_IMPL_FILES =					\
+	rb-indicator.h					\
+	rb-indicator.c
+else
 if USE_GTK_STATUS_ICON
 ICON_IMPL_FILES = \
 	rb-tray-icon-gtk.h 				\
@@ -14,6 +19,7 @@
 	rb-tray-icon.c \
 	rb-tray-icon.h
 endif
+endif
 
 libstatus_icon_la_SOURCES = \
 	rb-status-icon-plugin.h				\
@@ -28,6 +34,7 @@
 libstatus_icon_la_LIBADD = 				\
 	$(top_builddir)/shell/librhythmbox-core.la	\
 	$(NOTIFY_LIBS)					\
+	$(APP_INDICATOR_LIBS)				\
 	$(NULL)
 
 INCLUDES = 						\
@@ -44,6 +51,7 @@
 	-DSHARE_DIR=\"$(pkgdatadir)\"                   \
 	-DDATADIR=\""$(datadir)"\"			\
 	$(RHYTHMBOX_CFLAGS)				\
+	$(APP_INDICATOR_CFLAGS)				\
 	-D_XOPEN_SOURCE -D_BSD_SOURCE
 
 uixmldir = $(plugindir)

=== modified file 'plugins/status-icon/Makefile.in'
--- old/plugins/status-icon/Makefile.in	2010-02-03 17:52:33 +0000
+++ new/plugins/status-icon/Makefile.in	2010-02-03 17:59:07 +0000
@@ -79,15 +79,17 @@
 am__DEPENDENCIES_1 =
 libstatus_icon_la_DEPENDENCIES =  \
 	$(top_builddir)/shell/librhythmbox-core.la \
-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
 am__libstatus_icon_la_SOURCES_DIST = rb-status-icon-plugin.h \
 	rb-status-icon-plugin.c eggtrayicon.c eggtrayicon.h \
 	rb-tray-icon.c rb-tray-icon.h rb-tray-icon-gtk.h \
-	rb-tray-icon-gtk.c
-@USE_GTK_STATUS_ICON_FALSE@am__objects_1 =  \
-@USE_GTK_STATUS_ICON_FALSE@	libstatus_icon_la-eggtrayicon.lo \
-@USE_GTK_STATUS_ICON_FALSE@	libstatus_icon_la-rb-tray-icon.lo
-@USE_GTK_STATUS_ICON_TRUE@am__objects_1 = libstatus_icon_la-rb-tray-icon-gtk.lo
+	rb-tray-icon-gtk.c rb-indicator.h rb-indicator.c
+@HAVE_APP_INDICATOR_FALSE@@USE_GTK_STATUS_ICON_FALSE@am__objects_1 = libstatus_icon_la-eggtrayicon.lo \
+@HAVE_APP_INDICATOR_FALSE@@USE_GTK_STATUS_ICON_FALSE@	libstatus_icon_la-rb-tray-icon.lo
+@HAVE_APP_INDICATOR_FALSE@@USE_GTK_STATUS_ICON_TRUE@am__objects_1 = libstatus_icon_la-rb-tray-icon-gtk.lo
+@HAVE_APP_INDICATOR_TRUE@am__objects_1 =  \
+@HAVE_APP_INDICATOR_TRUE@	libstatus_icon_la-rb-indicator.lo
 am__objects_2 =
 am_libstatus_icon_la_OBJECTS =  \
 	libstatus_icon_la-rb-status-icon-plugin.lo $(am__objects_1) \
@@ -137,6 +139,8 @@
 ALL_LINGUAS = @ALL_LINGUAS@
 AMTAR = @AMTAR@
 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+APP_INDICATOR_CFLAGS = @APP_INDICATOR_CFLAGS@
+APP_INDICATOR_LIBS = @APP_INDICATOR_LIBS@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
@@ -361,15 +365,19 @@
 NULL = 
 plugindir = $(PLUGINDIR)/status-icon
 plugin_LTLIBRARIES = libstatus-icon.la
-@USE_GTK_STATUS_ICON_FALSE@ICON_IMPL_FILES = \
-@USE_GTK_STATUS_ICON_FALSE@	eggtrayicon.c \
-@USE_GTK_STATUS_ICON_FALSE@	eggtrayicon.h \
-@USE_GTK_STATUS_ICON_FALSE@	rb-tray-icon.c \
-@USE_GTK_STATUS_ICON_FALSE@	rb-tray-icon.h
-
-@USE_GTK_STATUS_ICON_TRUE@ICON_IMPL_FILES = \
-@USE_GTK_STATUS_ICON_TRUE@	rb-tray-icon-gtk.h 				\
-@USE_GTK_STATUS_ICON_TRUE@	rb-tray-icon-gtk.c
+@HAVE_APP_INDICATOR_FALSE@@USE_GTK_STATUS_ICON_FALSE@ICON_IMPL_FILES = \
+@HAVE_APP_INDICATOR_FALSE@@USE_GTK_STATUS_ICON_FALSE@	eggtrayicon.c \
+@HAVE_APP_INDICATOR_FALSE@@USE_GTK_STATUS_ICON_FALSE@	eggtrayicon.h \
+@HAVE_APP_INDICATOR_FALSE@@USE_GTK_STATUS_ICON_FALSE@	rb-tray-icon.c \
+@HAVE_APP_INDICATOR_FALSE@@USE_GTK_STATUS_ICON_FALSE@	rb-tray-icon.h
+
+@HAVE_APP_INDICATOR_FALSE@@USE_GTK_STATUS_ICON_TRUE@ICON_IMPL_FILES = \
+@HAVE_APP_INDICATOR_FALSE@@USE_GTK_STATUS_ICON_TRUE@	rb-tray-icon-gtk.h 				\
+@HAVE_APP_INDICATOR_FALSE@@USE_GTK_STATUS_ICON_TRUE@	rb-tray-icon-gtk.c
+
+@HAVE_APP_INDICATOR_TRUE@ICON_IMPL_FILES = \
+@HAVE_APP_INDICATOR_TRUE@	rb-indicator.h					\
+@HAVE_APP_INDICATOR_TRUE@	rb-indicator.c
 
 libstatus_icon_la_SOURCES = \
 	rb-status-icon-plugin.h				\
@@ -382,6 +390,7 @@
 libstatus_icon_la_LIBADD = \
 	$(top_builddir)/shell/librhythmbox-core.la	\
 	$(NOTIFY_LIBS)					\
+	$(APP_INDICATOR_LIBS)				\
 	$(NULL)
 
 INCLUDES = \
@@ -398,6 +407,7 @@
 	-DSHARE_DIR=\"$(pkgdatadir)\"                   \
 	-DDATADIR=\""$(datadir)"\"			\
 	$(RHYTHMBOX_CFLAGS)				\
+	$(APP_INDICATOR_CFLAGS)				\
 	-D_XOPEN_SOURCE -D_BSD_SOURCE
 
 uixmldir = $(plugindir)
@@ -505,6 +515,7 @@
 	-rm -f *.tab.c
 
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstatus_icon_la-eggtrayicon.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstatus_icon_la-rb-indicator.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstatus_icon_la-rb-status-icon-plugin.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstatus_icon_la-rb-tray-icon-gtk.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstatus_icon_la-rb-tray-icon.Plo@am__quote@
@@ -565,6 +576,14 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(libstatus_icon_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libstatus_icon_la-rb-tray-icon-gtk.lo `test -f 'rb-tray-icon-gtk.c' || echo '$(srcdir)/'`rb-tray-icon-gtk.c
 
+libstatus_icon_la-rb-indicator.lo: rb-indicator.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libstatus_icon_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libstatus_icon_la-rb-indicator.lo -MD -MP -MF $(DEPDIR)/libstatus_icon_la-rb-indicator.Tpo -c -o libstatus_icon_la-rb-indicator.lo `test -f 'rb-indicator.c' || echo '$(srcdir)/'`rb-indicator.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libstatus_icon_la-rb-indicator.Tpo $(DEPDIR)/libstatus_icon_la-rb-indicator.Plo
+@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='rb-indicator.c' object='libstatus_icon_la-rb-indicator.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(libstatus_icon_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libstatus_icon_la-rb-indicator.lo `test -f 'rb-indicator.c' || echo '$(srcdir)/'`rb-indicator.c
+
 mostlyclean-libtool:
 	-rm -f *.lo
 

=== added file 'plugins/status-icon/rb-indicator.c'
--- old/plugins/status-icon/rb-indicator.c	1970-01-01 00:00:00 +0000
+++ new/plugins/status-icon/rb-indicator.c	2010-02-03 17:59:07 +0000
@@ -0,0 +1,270 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ *  Copyright (C) 2003,2004 Colin Walters <walters@redhat.com>
+ *  Copyright (C) 2009 Canonical Ltd.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The Rhythmbox authors hereby grant permission for non-GPL compatible
+ *  GStreamer plugins to be used and distributed together with GStreamer
+ *  and Rhythmbox. This permission is above and beyond the permissions granted
+ *  by the GPL license by which Rhythmbox is covered. If you modify this code
+ *  you may extend this exception to your version of the code, but you are not
+ *  obligated to do so. If you do not wish to do so, delete this exception
+ *  statement from your version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA.
+ *
+ */
+
+#include <config.h>
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <glib/gi18n.h>
+#include <gtk/gtk.h>
+
+#include "rb-indicator.h"
+#include "rb-stock-icons.h"
+#include "rb-debug.h"
+#include "rb-shell-player.h"
+#include "rb-util.h"
+
+
+static void rb_indicator_class_init            (RBIndicatorClass *klass);
+static void rb_indicator_init                  (RBIndicator      *indicator);
+static void rb_indicator_constructed           (GObject         *object);
+static void rb_indicator_dispose               (GObject         *object);
+static void rb_indicator_set_property          (GObject         *object,
+						guint            prop_id,
+						const GValue    *value,
+						GParamSpec      *pspec);
+static void rb_indicator_get_property          (GObject         *object,
+						guint            prop_id,
+						GValue          *value,
+						GParamSpec      *pspec);
+static void rb_indicator_playing_changed_cb    (RBShellPlayer   *player,
+						gboolean         playing,
+						RBIndicator      *indicator);
+
+struct _RBIndicatorPrivate
+{
+	RBStatusIconPlugin *plugin;
+	AppIndicator       *indicator;
+	RBShellPlayer      *shell_player;
+};
+
+enum
+{
+	PROP_0,
+	PROP_PLUGIN,
+	PROP_SHELL_PLAYER
+};
+
+enum
+{
+	LAST_SIGNAL,
+};
+
+G_DEFINE_TYPE (RBIndicator, rb_indicator, G_TYPE_OBJECT)
+
+static void
+rb_indicator_class_init (RBIndicatorClass *klass)
+{
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+	object_class->dispose     = rb_indicator_dispose;
+	object_class->constructed = rb_indicator_constructed;
+
+	object_class->set_property = rb_indicator_set_property;
+	object_class->get_property = rb_indicator_get_property;
+
+	g_object_class_install_property (object_class,
+					 PROP_PLUGIN,
+					 g_param_spec_object ("plugin",
+							      "RBStatusIconPlugin",
+							      "RBStatusIconPlugin object",
+							      RB_TYPE_STATUS_ICON_PLUGIN,
+							      G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+	g_object_class_install_property (object_class,
+					 PROP_SHELL_PLAYER,
+					 g_param_spec_object ("shell-player",
+							      "RBShellPlayer",
+							      "RBShellPlayer object",
+							      RB_TYPE_SHELL_PLAYER,
+							      G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+
+	g_type_class_add_private (klass, sizeof (RBIndicatorPrivate));
+}
+
+static void
+rb_indicator_init (RBIndicator *indicator)
+{
+	indicator->priv = G_TYPE_INSTANCE_GET_PRIVATE ((indicator), RB_TYPE_INDICATOR, RBIndicatorPrivate);
+
+	indicator->priv->indicator = app_indicator_new_with_path ("rhythmbox",
+							RB_APP_ICON,
+							APP_INDICATOR_CATEGORY_APPLICATION_STATUS,
+							SHARE_DIR G_DIR_SEPARATOR_S "icons");
+	app_indicator_set_status (indicator->priv->indicator,
+				  APP_INDICATOR_STATUS_PASSIVE);
+}
+
+static void
+rb_indicator_constructed (GObject *object)
+{
+	RBIndicator *indicator;
+	GtkWidget *menu;
+
+	RB_CHAIN_GOBJECT_METHOD (rb_indicator_parent_class, constructed, object);
+	indicator = RB_INDICATOR (object);
+
+	menu = rb_status_icon_get_popup (indicator->priv->plugin);
+	app_indicator_set_menu (indicator->priv->indicator,
+                                GTK_MENU (menu));
+
+	g_signal_connect_object (indicator->priv->shell_player,
+				 "playing-changed",
+				 G_CALLBACK (rb_indicator_playing_changed_cb),
+				 indicator, 0);
+}
+
+static void
+rb_indicator_dispose (GObject *object)
+{
+	RBIndicator *indicator;
+
+	g_return_if_fail (object != NULL);
+	g_return_if_fail (RB_IS_INDICATOR (object));
+
+	indicator = RB_INDICATOR (object);
+
+	g_return_if_fail (indicator->priv != NULL);
+
+	if (indicator->priv->indicator != NULL) {
+		g_object_unref (indicator->priv->indicator);
+		indicator->priv->indicator = NULL;
+	}
+
+	G_OBJECT_CLASS (rb_indicator_parent_class)->dispose (object);
+}
+
+static void
+rb_indicator_playing_changed_cb (RBShellPlayer *player, gboolean playing, RBIndicator *indicator)
+{
+	const char *icon_name;
+
+	icon_name = playing ? RB_STOCK_TRAY_ICON_PLAYING : RB_STOCK_TRAY_ICON_NOT_PLAYING;
+	app_indicator_set_icon (indicator->priv->indicator, icon_name);
+}
+
+static void
+rb_indicator_set_property (GObject *object,
+			   guint prop_id,
+			   const GValue *value,
+			   GParamSpec *pspec)
+{
+	RBIndicator *indicator = RB_INDICATOR (object);
+
+	switch (prop_id)
+	{
+	case PROP_SHELL_PLAYER:
+		indicator->priv->shell_player = g_value_get_object (value);
+		break;
+	case PROP_PLUGIN:
+		indicator->priv->plugin = g_value_get_object (value);
+		break;
+	default:
+		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+		break;
+	}
+}
+
+static void
+rb_indicator_get_property (GObject *object,
+			      guint prop_id,
+			      GValue *value,
+			      GParamSpec *pspec)
+{
+	RBIndicator *indicator = RB_INDICATOR (object);
+
+	switch (prop_id)
+	{
+	case PROP_SHELL_PLAYER:
+		g_value_set_object (value, indicator->priv->shell_player);
+		break;
+	case PROP_PLUGIN:
+		g_value_set_object (value, indicator->priv->plugin);
+		break;
+	default:
+		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+		break;
+	}
+}
+
+
+RBIndicator *
+rb_tray_icon_new (RBStatusIconPlugin *plugin,
+		  RBShellPlayer      *shell_player)
+{
+	return g_object_new (RB_TYPE_INDICATOR,
+			     "plugin", plugin,
+			     "shell-player", shell_player,
+			     NULL);
+}
+
+
+/**
+ * rb_indicator_get_geom:
+ * @icon: the #RBIndicator
+ * @x: returns the x position of the tray icon
+ * @y: returns the y position of the tray icon
+ * @width: returns the width of the tray icon
+ * @height: returns the height of the tray icon
+ *
+ * Retrieves the current position and size of the tray icon.
+ */
+void
+rb_tray_icon_get_geom (RBIndicator *indicator, int *x, int *y, int *width, int *height)
+{
+	*x = 0;
+	*y = 0;
+	*width = 0;
+	*height = 0;
+}
+
+void
+rb_tray_icon_trigger_tooltip_query (RBIndicator *indicator)
+{
+}
+
+
+gboolean
+rb_tray_icon_is_embedded (RBIndicator *indicator)
+{
+        return FALSE;
+}
+
+void
+rb_tray_icon_set_visible (RBIndicator *indicator, gboolean visible)
+{
+	app_indicator_set_status (indicator->priv->indicator,
+				  visible ? APP_INDICATOR_STATUS_ACTIVE : APP_INDICATOR_STATUS_PASSIVE);
+}
+
+void
+rb_tray_icon_menu_popup (RBIndicator *icon, GtkWidget *popup, gint button)
+{
+}

=== added file 'plugins/status-icon/rb-indicator.h'
--- old/plugins/status-icon/rb-indicator.h	1970-01-01 00:00:00 +0000
+++ new/plugins/status-icon/rb-indicator.h	2010-02-03 17:59:07 +0000
@@ -0,0 +1,73 @@
+/*
+ *  Copyright (C) 2003 Colin Walters <walters@verbum.org>
+ *  Copyright (C) 2009 Canonical Ltd.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The Rhythmbox authors hereby grant permission for non-GPL compatible
+ *  GStreamer plugins to be used and distributed together with GStreamer
+ *  and Rhythmbox. This permission is above and beyond the permissions granted
+ *  by the GPL license by which Rhythmbox is covered. If you modify this code
+ *  you may extend this exception to your version of the code, but you are not
+ *  obligated to do so. If you do not wish to do so, delete this exception
+ *  statement from your version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA.
+ *
+ */
+
+#include <gtk/gtk.h>
+#include <libappindicator/app-indicator.h>
+#include "rb-status-icon-plugin.h"
+#include "rb-shell-player.h"
+
+#ifndef __RB_INDICATOR_H
+#define __RB_INDICATOR_H
+
+G_BEGIN_DECLS
+
+#define RB_TYPE_INDICATOR         (rb_indicator_get_type ())
+#define RB_INDICATOR(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), RB_TYPE_INDICATOR, RBIndicator))
+#define RB_INDICATOR_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), RB_TYPE_INDICATOR, RBIndicatorClass))
+#define RB_IS_INDICATOR(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), RB_TYPE_INDICATOR))
+#define RB_IS_INDICATOR_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), RB_TYPE_INDICATOR))
+#define RB_INDICATOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), RB_TYPE_INDICATOR, RBIndicatorClass))
+
+typedef struct _RBIndicator        RBIndicator;
+typedef struct _RBIndicatorClass   RBIndicatorClass;
+typedef struct _RBIndicatorPrivate RBIndicatorPrivate;
+
+struct _RBIndicator
+{
+	GObject parent;
+	RBIndicatorPrivate *priv;
+};
+
+struct _RBIndicatorClass
+{
+	GObjectClass parent_class;
+};
+
+GType			rb_indicator_get_type	(void) G_GNUC_CONST;
+
+RBIndicator *		rb_tray_icon_new                   (RBStatusIconPlugin *plugin, RBShellPlayer *shell_player);
+void                    rb_tray_icon_get_geom              (RBIndicator *icon, int *x, int *y, int *width, int *height);
+void 			rb_tray_icon_trigger_tooltip_query (RBIndicator *icon);
+
+gboolean		rb_tray_icon_is_embedded           (RBIndicator *icon);
+void			rb_tray_icon_set_visible           (RBIndicator *icon, gboolean visible);
+void                    rb_tray_icon_menu_popup            (RBIndicator *icon, GtkWidget *popup, gint button);
+
+G_END_DECLS
+
+#endif /* __RB_INDICATOR_H */

=== modified file 'plugins/status-icon/rb-status-icon-plugin.c'
--- old/plugins/status-icon/rb-status-icon-plugin.c	2010-02-03 17:52:33 +0000
+++ new/plugins/status-icon/rb-status-icon-plugin.c	2010-02-03 18:00:36 +0000
@@ -118,7 +118,7 @@
 
 	/* notification data */
 	GdkPixbuf *notify_pixbuf;
-#ifdef HAVE_NOTIFY
+#if defined(HAVE_NOTIFY)
 	NotifyNotification *notification;
 	gboolean notify_supports_actions;
 #endif
@@ -141,14 +141,19 @@
 {
 	{ "MusicClose", GTK_STOCK_CLOSE, N_("_Close"), "<control>W",
 	  N_("Hide the music player window"),
-	  G_CALLBACK (toggle_window_cmd) }
+	  G_CALLBACK (toggle_window_cmd) },
+        { "TrayShowWindow", NULL, N_("_Show Rhythmbox"), NULL,
+          N_("Show the music player window"),
+          G_CALLBACK (toggle_window_cmd) }
 };
 
 static GtkToggleActionEntry rb_status_icon_plugin_toggle_entries [] =
 {
+#if 0
 	{ "TrayShowWindow", NULL, N_("_Show Music Player"), NULL,
 	  N_("Choose music to play"),
 	  G_CALLBACK (show_window_cmd) },
+#endif
 	{ "TrayShowNotifications", NULL, N_("Show N_otifications"), NULL,
 	  N_("Show notifications of song changes and other events"),
 	  G_CALLBACK (show_notifications_cmd) },
@@ -284,6 +289,19 @@
 	}
 }
 
+GtkWidget *
+rb_status_icon_get_popup (RBStatusIconPlugin *plugin)
+{
+        GtkWidget *popup;
+        GtkUIManager *uim;
+
+        g_object_get (plugin->priv->shell, "ui-manager", &uim, NULL);
+        popup = gtk_ui_manager_get_widget (GTK_UI_MANAGER (uim),
+                                           "/RhythmboxIndicator");
+
+        return popup;
+}
+
 static void
 sync_actions (RBStatusIconPlugin *plugin)
 {
@@ -295,11 +313,10 @@
 	action = gtk_action_group_get_action (plugin->priv->action_group,
 					      "TrayShowWindow");
 	g_object_get (plugin->priv->shell, "visibility", &visible, NULL);
-	gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), visible);
 
 	action = gtk_action_group_get_action (plugin->priv->action_group,
 					      "TrayShowNotifications");
-#ifdef HAVE_NOTIFY
+#if defined(HAVE_NOTIFY)
 	gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action),
 				      plugin->priv->notify_mode != NOTIFY_NEVER);
 #else
@@ -324,7 +341,7 @@
 
 /* notification popups */
 
-#ifdef HAVE_NOTIFY
+#if defined(HAVE_NOTIFY)
 static void
 notification_closed_cb (NotifyNotification *notification,
 			RBStatusIconPlugin *plugin)
@@ -455,10 +472,12 @@
 
 	case ICON_ALWAYS:
 	case ICON_OWNS_WINDOW:
+#ifndef HAVE_APP_INDICATOR
 		if (rb_tray_icon_is_embedded (plugin->priv->tray_icon) == FALSE) {
 			rb_debug ("status icon is not embedded, not notifying");
 			return FALSE;
 		}
+#endif
 		break;
 
 	default:
@@ -488,6 +507,13 @@
 	return TRUE;
 }
 
+#if defined(HAVE_NOTIFY) && defined(HAVE_APP_INDICATOR)
+void
+rb_tray_icon_attach_notification (RBTrayIcon *icon, NotifyNotification *notification)
+{
+}
+#endif
+
 static void
 notify_playing_entry (RBStatusIconPlugin *plugin, gboolean requested)
 {

=== modified file 'plugins/status-icon/rb-status-icon-plugin.h'
--- old/plugins/status-icon/rb-status-icon-plugin.h	2010-02-03 17:52:33 +0000
+++ new/plugins/status-icon/rb-status-icon-plugin.h	2010-02-03 17:59:07 +0000
@@ -72,6 +72,8 @@
 							 GtkTooltip *tooltip,
 							 RBStatusIconPlugin *plugin);
 
+GtkWidget      *rb_status_icon_get_popup                (RBStatusIconPlugin *plugin);
+
 G_END_DECLS
 
 #endif /* __RB_STATUS_ICON_PLUGIN_H */

=== modified file 'plugins/status-icon/status-icon-ui.xml'
--- old/plugins/status-icon/status-icon-ui.xml	2010-02-03 17:52:33 +0000
+++ new/plugins/status-icon/status-icon-ui.xml	2010-02-03 17:59:07 +0000
@@ -22,5 +22,16 @@
       <separator/>
       <menuitem name="QuitTray" action="MusicQuit"/>
   </popup>
+
+  <popup name="RhythmboxIndicator">
+      <menuitem name="PlayTray" action="ControlPlay"/>
+      <separator/>
+      <menuitem name="PreviousTray" action="ControlPrevious"/>
+      <menuitem name="NextTray" action="ControlNext"/>
+      <separator/>
+      <menuitem name="ShowWindowTray" action="TrayShowWindow"/>
+      <menuitem name="QuitTray" action="MusicQuit"/>
+  </popup>
+
 </ui>
 

