Index: lib/rb-preferences.h
===================================================================
--- lib/rb-preferences.h	(revision 5667)
+++ lib/rb-preferences.h	(working copy)
@@ -48,6 +48,7 @@
 #define CONF_STATE_BURN_DEVICE	CONF_PREFIX "/state/burn_device"
 #define CONF_STATE_WINDOW_VISIBLE	CONF_PREFIX "/state/window_visible"
 #define CONF_UI_AUTO_PROXY_COMPLAINT	CONF_PREFIX "/ui/auto_proxy_complaint"
+#define CONF_UI_CLOSE_WINDOW_MEANS_QUIT CONF_PREFIX "/ui/close_window_means_quit"
 
 #define CONF_AUDIOSCROBBLER_USERNAME CONF_PREFIX "/audioscrobbler/username"
 #define CONF_AUDIOSCROBBLER_PASSWORD CONF_PREFIX "/audioscrobbler/password"
Index: shell/rb-shell.c
===================================================================
--- shell/rb-shell.c	(revision 5667)
+++ shell/rb-shell.c	(working copy)
@@ -1619,9 +1619,13 @@
 	if (shell->priv->party_mode) {
 		return TRUE;
 	}
+	
+	if (eel_gconf_get_boolean (CONF_UI_CLOSE_WINDOW_MEANS_QUIT)) {
+		rb_shell_quit (shell, NULL);
+	} else {
+		rb_shell_set_visibility (shell, FALSE, FALSE);
+	}
 
-	rb_shell_quit (shell, NULL);
-
 	return TRUE;
 }
 
Index: data/rhythmbox.schemas
===================================================================
--- data/rhythmbox.schemas	(revision 5667)
+++ data/rhythmbox.schemas	(working copy)
@@ -734,6 +734,17 @@
         </locale>
       </schema>
       <schema>
+        <key>/schemas/apps/rhythmbox/ui/close_window_means_quit</key>
+        <applyto>/apps/rhythmbox/ui/close_window_means_quit</applyto>
+        <owner>rhythmbox</owner>
+        <type>bool</type>
+        <default>TRUE</default>
+        <locale name="C">
+	<short>Whether closing the main Rhythmbox shell window cause it to quit</short>
+	<long>When enabled, Rhythmbox will quit when its main window is closed.</long>
+        </locale>
+      </schema>
+      <schema>
         <key>/schemas/apps/rhythmbox/plugins/no_user_plugins</key>
         <applyto>/apps/rhythmbox/plugins/no_user_plugins</applyto>
         <owner>rhythmbox</owner>
