diff options
-rw-r--r-- | shell/ChangeLog | 6 | ||||
-rw-r--r-- | shell/e-shell-view.c | 20 |
2 files changed, 23 insertions, 3 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index 565762994e..2d78fd8f5a 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,5 +1,11 @@ 2000-07-20 Ettore Perazzoli <ettore@helixcode.com> + * e-shell-view.c (e_shell_view_save_settings): Save the paned + positions. + (e_shell_view_load_settings): Restore them. + +2000-07-20 Ettore Perazzoli <ettore@helixcode.com> + * e-shell.c (save_settings_for_views): New. Code moved out of `e_shell_save_settings'. (e_shell_save_settings): Use it. diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c index 36e0becf0d..fcd5b54843 100644 --- a/shell/e-shell-view.c +++ b/shell/e-shell-view.c @@ -987,6 +987,7 @@ e_shell_view_save_settings (EShellView *shell_view, GConfClient *gconf_client, const char *prefix) { + EShellViewPrivate *priv; GConfError *err = NULL; const char *uri; char *path; @@ -998,6 +999,8 @@ e_shell_view_save_settings (EShellView *shell_view, g_return_val_if_fail (prefix != NULL, FALSE); g_return_val_if_fail (g_path_is_absolute (prefix), FALSE); + priv = shell_view->priv; + #define SET(type, key, value) \ path = g_strconcat (prefix, "/", (key), NULL); \ gconf_client_set_##type (gconf_client, path, (value), &err); \ @@ -1007,8 +1010,10 @@ e_shell_view_save_settings (EShellView *shell_view, return FALSE; \ } - SET (int, "FolderBarMode", e_shell_view_get_folder_bar_mode (shell_view)) - SET (int, "ShortcutBarMode", e_shell_view_get_shortcut_bar_mode (shell_view)); + SET (int, "FolderBarMode", e_shell_view_get_folder_bar_mode (shell_view)) + SET (int, "ShortcutBarMode", e_shell_view_get_shortcut_bar_mode (shell_view)); + SET (int, "HPanedPosition", e_paned_get_position (E_PANED (priv->hpaned))); + SET (int, "ViewHPanedPosition", e_paned_get_position (priv->view_hpaned)); uri = e_shell_view_get_current_uri (shell_view); if (uri != NULL) { @@ -1045,8 +1050,9 @@ e_shell_view_load_settings (EShellView *shell_view, GConfClient *gconf_client, const char *prefix) { - gboolean val; + EShellViewPrivate *priv; GConfError *err = NULL; + int val; char *stringval; char *path; @@ -1057,6 +1063,8 @@ e_shell_view_load_settings (EShellView *shell_view, g_return_val_if_fail (prefix != NULL, FALSE); g_return_val_if_fail (g_path_is_absolute (prefix), FALSE); + priv = shell_view->priv; + #define GET(type, key, value) \ path = g_strconcat (prefix, "/", (key), NULL); \ (value) = gconf_client_get_##type (gconf_client, path, &err); \ @@ -1072,6 +1080,12 @@ e_shell_view_load_settings (EShellView *shell_view, GET (int, "ShortcutBarMode", val); e_shell_view_set_shortcut_bar_mode (shell_view, val); + GET (int, "HPanedPosition", val); + e_paned_set_position (E_PANED (priv->hpaned), val); + + GET (int, "ViewHPanedPosition", val); + e_paned_set_position (E_PANED (priv->view_hpaned), val); + GET (string, "DisplayedURI", stringval); e_shell_view_display_uri (shell_view, stringval); g_free (stringval); |