=== modified file 'data/rhythmbox.schemas'
--- data/rhythmbox.schemas	2008-10-01 16:38:55 +0000
+++ data/rhythmbox.schemas	2009-03-03 22:10:55 +0000
@@ -305,6 +305,17 @@
 	<long>If true, the song position slider is hidden.</long>
 	</locale>
       </schema>
+      <schema>
+        <key>/schemas/apps/rhythmbox/ui/trayicon_enabled</key>
+	<applyto>/apps/rhythmbox/ui/trayicon_enabled</applyto>
+	<owner>rhythmbox</owner>
+	<type>bool</type>
+	<default>FALSE</default>
+	<locale name="C">
+	<short>Enable the tray icon</short>
+	<long>If true, displays a tray icon in the notification area.</long>
+	</locale>
+      </schema>
 
       <schema>
         <key>/schemas/apps/rhythmbox/state/play_order</key>

=== modified file 'lib/rb-preferences.h'
--- lib/rb-preferences.h	2008-10-01 18:28:24 +0000
+++ lib/rb-preferences.h	2009-03-03 22:22:17 +0000
@@ -44,6 +44,7 @@
 #define CONF_UI_SONG_POSITION_SLIDER_HIDDEN  CONF_PREFIX "/ui/song_position_slider_hidden"
 #define CONF_UI_SIDEPANE_HIDDEN CONF_PREFIX "/ui/sourcelist_hidden"
 #define CONF_UI_QUEUE_AS_SIDEBAR  CONF_PREFIX "/ui/queue_as_sidebar"
+#define CONF_UI_TRAYICON_ENABLED  CONF_PREFIX "/ui/trayicon_enabled"
 #define CONF_UI_SMALL_DISPLAY     CONF_PREFIX "/ui/small_display"
 #define CONF_UI_FULLSCREEN     CONF_PREFIX "/ui/fullscreen"
 #define CONF_UI_OBSOLETE_COLUMNS_SETUP CONF_PREFIX "/ui/columns_setup"

=== modified file 'shell/rb-shell.c'
--- shell/rb-shell.c	2009-02-19 11:07:49 +0000
+++ shell/rb-shell.c	2009-03-03 22:20:19 +0000
@@ -405,6 +405,7 @@
 	gboolean queue_as_sidebar;
 	gboolean statusbar_hidden;
 	gboolean party_mode;
+	gboolean trayicon_enabled;
 	gint window_x;
 	gint window_y;
 	gint paned_position;
@@ -1377,6 +1378,7 @@
 	shell->priv->window_maximised = eel_gconf_get_boolean (CONF_STATE_WINDOW_MAXIMIZED);
 	shell->priv->window_small = eel_gconf_get_boolean (CONF_UI_SMALL_DISPLAY);
 	shell->priv->queue_as_sidebar = eel_gconf_get_boolean (CONF_UI_QUEUE_AS_SIDEBAR);
+	shell->priv->trayicon_enabled = eel_gconf_get_boolean (CONF_UI_TRAYICON_ENABLED);
 	shell->priv->window_x = eel_gconf_get_integer (CONF_STATE_WINDOW_X_POSITION);
 	shell->priv->window_y = eel_gconf_get_integer (CONF_STATE_WINDOW_Y_POSITION);
 	shell->priv->paned_position = eel_gconf_get_integer (CONF_STATE_PANED_POSITION);
@@ -1419,7 +1421,10 @@
 
 	rb_debug ("shell: syncing window state");
 	rb_shell_sync_paned (shell);
-	gtk_widget_show_all (GTK_WIDGET (shell->priv->tray_icon));
+	/* traylio */
+	if (shell->priv->trayicon_enabled) {
+		gtk_widget_show_all (GTK_WIDGET (shell->priv->tray_icon));
+	}
 
 	/* Do as if we ran the first time druid */
 	if (!eel_gconf_get_boolean (CONF_FIRST_TIME))
@@ -2974,6 +2979,7 @@
 tray_destroy_cb (GtkObject *object,
 		 RBShell *shell)
 {
+	/*traylio*/
 	if (shell->priv->tray_icon) {
 		rb_debug ("caught destroy event for tray icon %p", object);
 		g_object_ref_sink (object);
@@ -2987,8 +2993,10 @@
 				 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));
+				 
+	if (shell->priv->trayicon_enabled) {
+ 		gtk_widget_show_all (GTK_WIDGET (shell->priv->tray_icon));
+ 	}
 
 	rb_debug ("done creating new tray icon %p", shell->priv->tray_icon);
  	return TRUE;

