aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-10-12 14:29:09 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-10-12 14:29:09 +0800
commit9b86a516810fb2d1eeb267b17046dc15849e3e53 (patch)
tree19d517165b86ef8a7ff32c88daf6d3a311535b9e
parent33423ed255ce0fa7a246f36da4cb5ef5d278f08d (diff)
downloadgsoc2013-evolution-9b86a516810fb2d1eeb267b17046dc15849e3e53.tar.gz
gsoc2013-evolution-9b86a516810fb2d1eeb267b17046dc15849e3e53.tar.zst
gsoc2013-evolution-9b86a516810fb2d1eeb267b17046dc15849e3e53.zip
[Fix #7643, Starting new view doesn't honor "view" settings.]
* e-shell-view-menu.c (command_open_folder_in_new_window): Pass the parent @shell_view as the @template_view arg to `e_shell_create_view()' * e-shell-view.c (activate_shortcut_cb): Pass the _view as the @template_view arg to `e_shell_create_view()'. * e-shell-folder-commands.c (e_shell_command_open_folder_in_other_window): Pass the parent @shell_view as the @template_view arg to `e_shell_create_view()'. * e-shell.c (e_shell_create_view): New arg @template_view. (impl_Shell_createNewView): Pass %NULL as @template_view when calling it. (e_shell_restore_from_settings): Likewise. svn path=/trunk/; revision=13618
-rw-r--r--shell/ChangeLog20
-rw-r--r--shell/e-shell-folder-commands.c2
-rw-r--r--shell/e-shell-view-menu.c2
-rw-r--r--shell/e-shell-view.c2
-rw-r--r--shell/e-shell.c15
-rw-r--r--shell/e-shell.h3
6 files changed, 35 insertions, 9 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 5a7eb5ef63..ab6872f2d6 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,5 +1,25 @@
2001-10-12 Ettore Perazzoli <ettore@ximian.com>
+ [Fix #7643, Starting new view doesn't honor "view" settings.]
+
+ * e-shell-view-menu.c (command_open_folder_in_new_window): Pass
+ the parent @shell_view as the @template_view arg to
+ `e_shell_create_view()'
+
+ * e-shell-view.c (activate_shortcut_cb): Pass the _view as the
+ @template_view arg to `e_shell_create_view()'.
+
+ * e-shell-folder-commands.c
+ (e_shell_command_open_folder_in_other_window): Pass the parent
+ @shell_view as the @template_view arg to `e_shell_create_view()'.
+
+ * e-shell.c (e_shell_create_view): New arg @template_view.
+ (impl_Shell_createNewView): Pass %NULL as @template_view when
+ calling it.
+ (e_shell_restore_from_settings): Likewise.
+
+2001-10-12 Ettore Perazzoli <ettore@ximian.com>
+
* main.c (quit_box_new): Also flush GDK after flushing GTK.
Otherwise GTK might queue draw requests to X that don't get
executed.
diff --git a/shell/e-shell-folder-commands.c b/shell/e-shell-folder-commands.c
index bef14fb5e5..9a0be5a6d8 100644
--- a/shell/e-shell-folder-commands.c
+++ b/shell/e-shell-folder-commands.c
@@ -272,7 +272,7 @@ e_shell_command_open_folder_in_other_window (EShell *shell,
folder_path = e_shell_view_get_current_path (shell_view);
uri = g_strconcat (E_SHELL_URI_PREFIX, folder_path, NULL);
- view = e_shell_create_view (shell, uri);
+ view = e_shell_create_view (shell, uri, shell_view);
g_free (uri);
gtk_widget_show (GTK_WIDGET (view));
diff --git a/shell/e-shell-view-menu.c b/shell/e-shell-view-menu.c
index 116ab27382..ba4db225b3 100644
--- a/shell/e-shell-view-menu.c
+++ b/shell/e-shell-view-menu.c
@@ -327,7 +327,7 @@ command_open_folder_in_new_window (BonoboUIComponent *uih,
shell = e_shell_view_get_shell (shell_view);
uri = g_strconcat (E_SHELL_URI_PREFIX, get_path_for_folder_op (shell_view), NULL);
- new_view = e_shell_create_view (shell, uri);
+ new_view = e_shell_create_view (shell, uri, shell_view);
g_free (uri);
gtk_widget_show (GTK_WIDGET (new_view));
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index 85adff70c4..06843e64e5 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -668,7 +668,7 @@ activate_shortcut_cb (EShortcutsView *shortcut_view,
if (in_new_window) {
EShellView *new_view;
- new_view = e_shell_create_view (e_shell_view_get_shell (shell_view), uri);
+ new_view = e_shell_create_view (e_shell_view_get_shell (shell_view), uri, shell_view);
gtk_widget_show (GTK_WIDGET (new_view));
} else {
e_shell_view_display_uri (shell_view, uri);
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 1f8628c2fe..6d793926af 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -287,7 +287,7 @@ impl_Shell_createNewView (PortableServer_Servant servant,
return CORBA_OBJECT_NIL;
}
- shell_view = e_shell_create_view (shell, uri);
+ shell_view = e_shell_create_view (shell, uri, NULL);
if (shell_view == NULL) {
CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
ex_GNOME_Evolution_Shell_NotFound, NULL);
@@ -1089,6 +1089,7 @@ e_shell_new (const char *local_directory,
* e_shell_create_view:
* @shell: The shell for which to create a new view.
* @uri: URI for the new view.
+ * @template_view: Window from which to copy the view settings (can be %NULL).
*
* Create a new view for @uri.
*
@@ -1096,7 +1097,8 @@ e_shell_new (const char *local_directory,
**/
EShellView *
e_shell_create_view (EShell *shell,
- const char *uri)
+ const char *uri,
+ EShellView *template_view)
{
EShellView *view;
EShellPrivate *priv;
@@ -1126,6 +1128,11 @@ e_shell_create_view (EShell *shell,
task_bar = e_shell_view_get_task_bar (view);
e_activity_handler_attach_task_bar (priv->activity_handler, task_bar);
+ if (template_view != NULL) {
+ e_shell_view_show_folder_bar (view, e_shell_view_folder_bar_shown (template_view));
+ e_shell_view_show_shortcut_bar (view, e_shell_view_shortcut_bar_shown (template_view));
+ }
+
return view;
}
@@ -1393,9 +1400,7 @@ e_shell_restore_from_settings (EShell *shell)
for (i = 0; i < num_views; i++) {
EShellView *view;
- /* FIXME: restore the URI here. There should be an
- e_shell_create_view_from_configuration() thingie. */
- view = e_shell_create_view (shell, NULL);
+ view = e_shell_create_view (shell, NULL, NULL);
if (! e_shell_view_load_settings (view, i))
retval = FALSE;
diff --git a/shell/e-shell.h b/shell/e-shell.h
index 4c17930b43..8f413902bf 100644
--- a/shell/e-shell.h
+++ b/shell/e-shell.h
@@ -101,7 +101,8 @@ EShell *e_shell_new (const char *local_director
EShellConstructResult *construct_result_return);
EShellView *e_shell_create_view (EShell *shell,
- const char *uri);
+ const char *uri,
+ EShellView *template_view);
const char *e_shell_get_local_directory (EShell *shell);
EShortcuts *e_shell_get_shortcuts (EShell *shell);