Index: mail/em-folder-browser.c
===================================================================
RCS file: evolution-1.4.6/mail/em-folder-browser.c,v
retrieving revision 1.50
diff -u -3 -r1.50 em-folder-browser.c
--- mail/em-folder-browser.c	10 Jul 2004 01:31:04 -0000	1.50
+++ mail/em-folder-browser.c	12 Aug 2004 04:47:15 -0000
@@ -100,6 +100,8 @@
 	
 	char *select_uid;
 	guint folder_changed_id;
+
+	int show_wide:1;
 
 	EMMenu *menu;		/* toplevel menu manager */
 };
@@ -188,7 +190,9 @@
 		gtk_box_pack_start((GtkBox *)emfb, (GtkWidget *)emfb->search, FALSE, TRUE, 0);
 	}
 
-	emfb->vpane = gtk_vpaned_new();
+	emfb->priv->show_wide = gconf_client_get_bool(mail_config_get_gconf_client(), "/apps/evolution/mail/display/show_wide", NULL);
+	emfb->vpane = emfb->priv->show_wide?gtk_hpaned_new():gtk_vpaned_new();
+
 	g_signal_connect(emfb->vpane, "realize", G_CALLBACK(emfb_pane_realised), emfb);
 	emfb->priv->vpane_resize_id = g_signal_connect(emfb->vpane, "button_release_event", G_CALLBACK(emfb_pane_button_release_event), emfb);
 
@@ -330,6 +334,33 @@
 	/* FIXME: need to update menu's to reflect ui changes */
 }
 
+void em_folder_browser_show_wide(EMFolderBrowser *emfb, gboolean state)
+{
+	GtkWidget *w;
+
+	if ((emfb->priv->show_wide ^ state) == 0
+	    || emfb->view.list == NULL
+	    || emfb->view.preview_active == 0) {
+		emfb->priv->show_wide = state;
+		return;
+	}
+
+	emfb->priv->show_wide = state;
+
+	w = emfb->priv->show_wide?gtk_hpaned_new():gtk_vpaned_new();
+
+	g_signal_handler_disconnect(emfb->vpane, emfb->priv->vpane_resize_id);
+	g_signal_connect(w, "realize", G_CALLBACK(emfb_pane_realised), emfb);
+	emfb->priv->vpane_resize_id = g_signal_connect(w, "button_release_event", G_CALLBACK(emfb_pane_button_release_event), emfb);
+
+	gtk_widget_show(w);
+	gtk_box_pack_start_defaults((GtkBox *)emfb, w);
+	gtk_widget_reparent((GtkWidget *)emfb->view.list, w);
+	gtk_widget_reparent((GtkWidget *)emfb->priv->preview, w);
+	gtk_widget_destroy(emfb->vpane);
+	emfb->vpane = w;
+}
+
 /* ********************************************************************** */
 
 /* FIXME: Need to separate system rules from user ones */
@@ -786,6 +817,21 @@
 }
 
 static void
+emfb_show_wide(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_EventType type, const char *state, void *data)
+{
+	GConfClient *gconf;
+	EMFolderBrowser *emfb = data;
+
+	if (type != Bonobo_UIComponent_STATE_CHANGED)
+		return;
+
+	gconf = mail_config_get_gconf_client ();
+	gconf_client_set_bool(gconf, "/apps/evolution/mail/display/show_wide", state[0] != '0', NULL);
+
+	em_folder_browser_show_wide(emfb, state[0] != '0');
+}
+
+static void
 emfb_list_scrolled (MessageList *ml, EMFolderBrowser *emfb)
 {
 	EMFolderView *emfv = (EMFolderView *) emfb;
@@ -1003,6 +1049,12 @@
 		bonobo_ui_component_set_prop(uic, "/commands/ViewThreaded", "state", state?"1":"0", NULL);
 		bonobo_ui_component_add_listener(uic, "ViewThreaded", emfb_view_threaded, emfv);
 		message_list_set_threaded(emfv->list, state);
+
+		/* Show wide display */
+		state = gconf_client_get_bool(gconf, "/apps/evolution/mail/display/show_wide", NULL);
+		bonobo_ui_component_set_prop(uic, "/commands/ViewWide", "state", state ? "1" : "0", NULL);
+		bonobo_ui_component_add_listener(uic, "ViewWide", emfb_show_wide, emfv);
+		em_folder_browser_show_wide((EMFolderBrowser *)emfv, state);
 
 		/* FIXME: Selection state */
 
Index: mail/em-folder-browser.h
===================================================================
RCS file: evolution-1.4.6/mail/em-folder-browser.h,v
retrieving revision 1.2
diff -u -3 -r1.2 em-folder-browser.h
--- mail/em-folder-browser.h	17 Sep 2003 21:19:02 -0000	1.2
+++ mail/em-folder-browser.h	12 Aug 2004 04:47:15 -0000
@@ -52,6 +52,7 @@
 GtkWidget *em_folder_browser_new(void);
 
 void em_folder_browser_show_preview(EMFolderBrowser *emfv, gboolean state);
+void em_folder_browser_show_wide(EMFolderBrowser *emfv, gboolean state);
 
 #ifdef __cplusplus
 }
Index: mail/evolution-mail.schemas.in.in
===================================================================
RCS file: evolution-1.4.6/mail/evolution-mail.schemas.in.in,v
retrieving revision 1.17
diff -u -3 -r1.17 evolution-mail.schemas.in.in
--- mail/evolution-mail.schemas.in.in	10 May 2004 19:35:38 -0000	1.17
+++ mail/evolution-mail.schemas.in.in	12 Aug 2004 04:47:15 -0000
@@ -360,6 +360,20 @@
     </schema>
 
     <schema>
+      <key>/schemas/apps/evolution/mail/display/show_wide</key>
+      <applyto>/apps/evolution/mail/display/show_wide</applyto>
+      <owner>evolution-mail</owner>
+      <type>bool</type>
+      <default>false</default>
+      <locale name="C">
+         <short>Use side-by-side or vertical layout</short>
+         <long>
+	  If the &quot;Preview&quot; pane is on, then show it side-by-side rather than vertically.
+         </long>
+      </locale>
+    </schema>
+
+    <schema>
       <key>/schemas/apps/evolution/mail/display/fonts/variable</key>
       <applyto>/apps/evolution/mail/display/fonts/variable</applyto>
       <owner>evolution-mail</owner>
Index: shell/apps_evolution_shell.schemas.in.in
===================================================================
RCS file: evolution-1.4.6/shell/apps_evolution_shell.schemas.in.in,v
retrieving revision 1.5
diff -u -3 -r1.5 apps_evolution_shell.schemas.in.in
--- shell/apps_evolution_shell.schemas.in.in	1 Aug 2004 17:58:08 -0000	1.5
+++ shell/apps_evolution_shell.schemas.in.in	12 Aug 2004 04:47:18 -0000
@@ -108,6 +108,18 @@
     </schema>
 
     <schema>
+      <key>/schemas/apps/evolution/shell/view_defaults/sidebar_visible</key>
+      <applyto>/apps/evolution/shell/view_defaults/sidebar_visible</applyto>
+      <owner>evolution</owner>
+      <type>bool</type>
+      <default>TRUE</default>
+      <locale name="C">
+        <short>Sidebar is visible</short>
+        <long>Whether the sidebar should be visible.</long>
+      </locale>
+    </schema>
+
+    <schema>
       <key>/schemas/apps/evolution/shell/view_defaults/component_id</key>
       <applyto>/apps/evolution/shell/view_defaults/component_id</applyto>
       <owner>evolution</owner>
Index: shell/e-shell-window-commands.c
===================================================================
RCS file: evolution-1.4.6/shell/e-shell-window-commands.c,v
retrieving revision 1.21
diff -u -3 -r1.21 e-shell-window-commands.c
--- shell/e-shell-window-commands.c	1 Aug 2004 17:58:08 -0000	1.21
+++ shell/e-shell-window-commands.c	12 Aug 2004 04:47:18 -0000
@@ -624,6 +624,23 @@
 				      "hidden", is_visible ? "0" : "1", NULL);
 }
 
+static void
+view_sidebar_item_toggled_handler (BonoboUIComponent           *ui_component,
+				   const char                  *path,
+				   Bonobo_UIComponent_EventType type,
+				   const char                  *state,
+				   EShellWindow                *shell_window)
+{
+	gboolean is_visible;
+
+	is_visible = state[0] == '1';
+
+	if (is_visible)
+		gtk_widget_show (GTK_WIDGET (e_shell_window_peek_sidebar (shell_window)));
+	else
+		gtk_widget_hide (GTK_WIDGET (e_shell_window_peek_sidebar (shell_window)));
+}
+
 
 /* Public API.  */
 
@@ -646,6 +663,9 @@
 	bonobo_ui_component_add_verb_list_with_data (uic, help_verbs, shell_window);
 	bonobo_ui_component_add_listener (uic, "ViewToolbar",
 					  (BonoboUIListenerFn)view_toolbar_item_toggled_handler,
+					  (gpointer)shell_window);
+	bonobo_ui_component_add_listener (uic, "ViewSidebar",
+					  (BonoboUIListenerFn)view_sidebar_item_toggled_handler,
 					  (gpointer)shell_window);
 
 	e_pixmaps_update (uic, pixmaps);
Index: shell/e-shell-window.c
===================================================================
RCS file: evolution-1.4.6/shell/e-shell-window.c,v
retrieving revision 1.27
diff -u -3 -r1.27 e-shell-window.c
--- shell/e-shell-window.c	24 Jun 2004 08:14:51 -0000	1.27
+++ shell/e-shell-window.c	12 Aug 2004 04:47:19 -0000
@@ -607,6 +607,7 @@
 	GString *xml;
 	int button_id;
 	gboolean visible;
+	gboolean sidebar_visible;
 	char *style;
 	int mode;
 	
@@ -610,6 +611,15 @@
 				      toolbar_visible ? "0" : "1",
 				      NULL);
 
+	sidebar_visible = gconf_client_get_bool (gconf_client,
+						 "/apps/evolution/shell/view_defaults/sidebar_visible",
+						 NULL);
+	bonobo_ui_component_set_prop (e_shell_window_peek_bonobo_ui_component (window),
+				      "/commands/ViewSidebar",
+				      "state",
+				      sidebar_visible ? "1" : "0",
+				      NULL);
+
 	button_id = 0;
 	xml = g_string_new("");
 	for (p = e_component_registry_peek_list (registry); p != NULL; p = p->next) {
@@ -660,6 +670,9 @@
 	gtk_box_pack_start (GTK_BOX (contents_vbox), priv->status_bar, FALSE, TRUE, 0);
 	gtk_widget_show_all (contents_vbox);
 
+	if (!sidebar_visible)
+		gtk_widget_hide (priv->sidebar);
+
 	/* We only display this when a menu item is actually selected.  */
 	gtk_widget_hide (priv->menu_hint_label);
 
@@ -1028,6 +1028,20 @@
 		g_free (prop);
 	}
 
+	/* Toolbar visibility setting */
+	prop = bonobo_ui_component_get_prop (e_shell_window_peek_bonobo_ui_component (window),
+					     "/commands/ViewSidebar",
+					     "state",
+					     NULL);
+	if (prop) {
+		visible = prop[0] == '1';
+		gconf_client_set_bool (client,
+				       "/apps/evolution/shell/view_defaults/sidebar_visible",
+				       visible,
+ 				       NULL);
+ 		g_free (prop);
+ 	}
+
 	g_object_unref (client);
 }
 
Index: ui/evolution-mail-global.xml
===================================================================
RCS file: evolution-1.4.6/ui/evolution-mail-global.xml,v
retrieving revision 1.27
diff -u -3 -r1.27 evolution-mail-global.xml
--- ui/evolution-mail-global.xml	25 May 2004 20:54:01 -0000	1.27
+++ ui/evolution-mail-global.xml	12 Aug 2004 04:47:19 -0000
@@ -36,6 +36,10 @@
      accel="*Control*m"
      type="toggle"/>
 
+    <cmd name="ViewWide"
+     _tip="Show message side-by-side with list"
+     type="toggle"/>
+
   </commands>
 
   <menu>
@@ -49,6 +53,7 @@
     <submenu name="View" _label="_View">
       <placeholder name="ViewPreview">
         <menuitem name="ViewPreview" verb="" _label="Message _Preview"/>
+		<menuitem name="ViewWide" verb="" _label="_View Side By Side"/>
       </placeholder>
 
       <separator f="" name="emailglobal"/>
Index: ui/evolution.xml
===================================================================
RCS file: evolution-1.4.6/ui/evolution.xml,v
retrieving revision 1.94
diff -u -3 -r1.94 evolution.xml
--- ui/evolution.xml	2 Jun 2004 20:37:45 -0000	1.94
+++ ui/evolution.xml	12 Aug 2004 04:47:19 -0000
@@ -13,6 +13,9 @@
     <cmd name="ViewToolbar" _label="Tool_bar" type="toggle"
       _tip="Change the visibility of the toolbar" state="1"/>
 
+    <cmd name="ViewSidebar" _label="_Sidebar" type="toggle"
+      _tip="Change the visibility of the sidebar" state="1"/>
+
     <cmd name="HelpSubmitBug" _label="Submit Bug Report"
       _tip="Submit a bug report using Bug Buddy"/>
 
@@ -74,6 +77,7 @@
       <placeholder name="ViewBegin"/>
       <submenu name="Window" _label="_Window"/>
       <menuitem name="ViewToolbar" id="ViewToolbar" verb="" accel="*Control**Shift*o"/>
+      <menuitem name="ViewSidebar" id="ViewSidebar" verb="" accel="*Control**Shift*s"/>
       <placeholder name="ViewPreview"/>
       <submenu name="Buttons" _label="_Switcher Appearance">
             <menuitem name="ViewButtonsIconText" id="ViewButtonsIconText" verb=""/>
