aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-view.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2000-07-20 22:39:08 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2000-07-20 22:39:08 +0800
commit1a800edf4d387b9fd2b34bc01e136bc8452f17ca (patch)
tree3fdf0bd4bea4be15ccb1964171fee8cb0b2c4934 /shell/e-shell-view.c
parentb40242c395b0eec33a622ddfe90634fd6d63e4c6 (diff)
downloadgsoc2013-evolution-1a800edf4d387b9fd2b34bc01e136bc8452f17ca.tar
gsoc2013-evolution-1a800edf4d387b9fd2b34bc01e136bc8452f17ca.tar.gz
gsoc2013-evolution-1a800edf4d387b9fd2b34bc01e136bc8452f17ca.tar.bz2
gsoc2013-evolution-1a800edf4d387b9fd2b34bc01e136bc8452f17ca.tar.lz
gsoc2013-evolution-1a800edf4d387b9fd2b34bc01e136bc8452f17ca.tar.xz
gsoc2013-evolution-1a800edf4d387b9fd2b34bc01e136bc8452f17ca.tar.zst
gsoc2013-evolution-1a800edf4d387b9fd2b34bc01e136bc8452f17ca.zip
Implement saving of pane positions.
svn path=/trunk/; revision=4238
Diffstat (limited to 'shell/e-shell-view.c')
-rw-r--r--shell/e-shell-view.c20
1 files changed, 17 insertions, 3 deletions
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);