aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-view.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2002-04-08 23:30:02 +0800
committerDan Winship <danw@src.gnome.org>2002-04-08 23:30:02 +0800
commitc357c638049b6a83ec05fa95f236818e8d0528e5 (patch)
tree281935c79bbdb701d2a307d186dd7442701d69cb /shell/e-shell-view.c
parent851c96fac4f9a670dc260fddc9aeaf675aeb2227 (diff)
downloadgsoc2013-evolution-c357c638049b6a83ec05fa95f236818e8d0528e5.tar
gsoc2013-evolution-c357c638049b6a83ec05fa95f236818e8d0528e5.tar.gz
gsoc2013-evolution-c357c638049b6a83ec05fa95f236818e8d0528e5.tar.bz2
gsoc2013-evolution-c357c638049b6a83ec05fa95f236818e8d0528e5.tar.lz
gsoc2013-evolution-c357c638049b6a83ec05fa95f236818e8d0528e5.tar.xz
gsoc2013-evolution-c357c638049b6a83ec05fa95f236818e8d0528e5.tar.zst
gsoc2013-evolution-c357c638049b6a83ec05fa95f236818e8d0528e5.zip
Fix "evolution evolution:/path/to/folder" to use default view
prefs. * e-shell.c (impl_Shell_createNewView): Use e_shell_create_view_from_uri_and_settings to create the new view based on saved view 0 instead of always using the initial evolution defaults. (e_shell_create_view_from_uri_and_settings): Renamed and simplified; the template_view argument was useless and settings_found would always be set to TRUE in the context it was being used it. (e_shell_restore_from_settings): Simplify for e_shell_create_view_from_uri_and_settings changes. * e-shell-view.c (e_shell_view_load_settings): Only load the DisplayedURI if the view isn't already displaying a URI. Also, pass an &ev to the first bonobo_config_get_long so we can tell if it failed and bail out. * e-shell-view.h: Remove a prototype for a non-existent function (e_shell_view_remove_control_for_uri). * main.c (idle_cb): Add some comments here and remove some dead code. svn path=/trunk/; revision=16389
Diffstat (limited to 'shell/e-shell-view.c')
-rw-r--r--shell/e-shell-view.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index 165c9800b2..3c7330fe35 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -2621,6 +2621,7 @@ e_shell_view_load_settings (EShellView *shell_view,
int num_groups, group, val;
long width, height;
char *stringval, *prefix, *filename, *key;
+ CORBA_Environment ev;
g_return_val_if_fail (shell_view != NULL, FALSE);
g_return_val_if_fail (E_IS_SHELL_VIEW (shell_view), FALSE);
@@ -2634,9 +2635,14 @@ e_shell_view_load_settings (EShellView *shell_view,
prefix = g_strdup_printf ("/Shell/Views/%d/", view_num);
+ CORBA_exception_init (&ev);
key = g_strconcat (prefix, "Width", NULL);
- width = bonobo_config_get_long (db, key, NULL);
+ width = bonobo_config_get_long (db, key, &ev);
g_free (key);
+ if (ev._major != CORBA_NO_EXCEPTION) {
+ CORBA_exception_free (&ev);
+ return FALSE;
+ }
key = g_strconcat (prefix, "Height", NULL);
height = bonobo_config_get_long (db, key, NULL);
@@ -2673,16 +2679,18 @@ e_shell_view_load_settings (EShellView *shell_view,
priv->view_hpaned_position = val;
g_free (key);
- key = g_strconcat (prefix, "DisplayedURI", NULL);
- stringval = bonobo_config_get_string (db, key, NULL);
- if (stringval) {
- if (! e_shell_view_display_uri (shell_view, stringval))
+ if (priv->uri == NULL && priv->delayed_selection == NULL) {
+ key = g_strconcat (prefix, "DisplayedURI", NULL);
+ stringval = bonobo_config_get_string (db, key, NULL);
+ if (stringval) {
+ if (! e_shell_view_display_uri (shell_view, stringval))
+ e_shell_view_display_uri (shell_view, E_SHELL_VIEW_DEFAULT_URI);
+ } else
e_shell_view_display_uri (shell_view, E_SHELL_VIEW_DEFAULT_URI);
- } else
- e_shell_view_display_uri (shell_view, E_SHELL_VIEW_DEFAULT_URI);
- g_free (stringval);
- g_free (key);
+ g_free (stringval);
+ g_free (key);
+ }
num_groups = e_shortcut_model_get_num_groups (shortcut_bar->model);