aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-03-15 09:10:39 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-03-17 20:49:12 +0800
commit09b7686c4a2a359aa8f747719932ccbf12c3103b (patch)
tree99dbada4d36619f169b35fe8f47b3753d9b10325
parentc5bc18cec08324f832f4d91dce3579c7332d9a0b (diff)
downloadgsoc2013-evolution-09b7686c4a2a359aa8f747719932ccbf12c3103b.tar.gz
gsoc2013-evolution-09b7686c4a2a359aa8f747719932ccbf12c3103b.tar.zst
gsoc2013-evolution-09b7686c4a2a359aa8f747719932ccbf12c3103b.zip
Add "headers-collapsed" setting.
Replaces "paned-view-headers-state", which was defined as an integer for some stupid reason. Not bothering to migrate the old setting since it's one button click.
-rw-r--r--data/evolution.convert1
-rw-r--r--data/org.gnome.evolution.mail.gschema.xml.in7
-rw-r--r--mail/e-mail-paned-view.c18
-rw-r--r--modules/mail/e-mail-shell-settings.c4
4 files changed, 16 insertions, 14 deletions
diff --git a/data/evolution.convert b/data/evolution.convert
index a859168710..1464433c9d 100644
--- a/data/evolution.convert
+++ b/data/evolution.convert
@@ -163,7 +163,6 @@ mime-types = /apps/evolution/mail/display/mime_types
monospace-font = /apps/evolution/mail/display/fonts/monospace
no-folder-dots = /apps/evolution/mail/display/no_folder_dots
paned-size = /apps/evolution/mail/display/paned_size
-paned-view-headers-state = /apps/evolution/mail/display/paned_view_headers_state
photo-local = /apps/evolution/mail/display/photo_local
prompt-check-if-default-mailer = /apps/evolution/mail/prompts/checkdefault
prompt-on-delete-in-vfolder = /apps/evolution/mail/prompts/delete_in_vfolder
diff --git a/data/org.gnome.evolution.mail.gschema.xml.in b/data/org.gnome.evolution.mail.gschema.xml.in
index 1fc0493987..24295b88af 100644
--- a/data/org.gnome.evolution.mail.gschema.xml.in
+++ b/data/org.gnome.evolution.mail.gschema.xml.in
@@ -284,10 +284,9 @@
<_summary>Height of the message-list pane</_summary>
<_description>Height of the message-list pane.</_description>
</key>
- <key name="paned-view-headers-state" type="i">
- <default>0</default>
- <_summary>State of message headers in paned view</_summary>
- <_description>Describes whether message headers in paned view should be collapsed or expanded by default. "0" = expanded and "1" = collapsed</_description>
+ <key name="headers-collapsed" type="b">
+ <default>false</default>
+ <_summary>Whether message headers are collapsed in the user interface</_summary>
</key>
<key name="hpaned-size" type="i">
<default>450</default>
diff --git a/mail/e-mail-paned-view.c b/mail/e-mail-paned-view.c
index 2fbf48a5f2..bf7907031c 100644
--- a/mail/e-mail-paned-view.c
+++ b/mail/e-mail-paned-view.c
@@ -624,8 +624,7 @@ mail_paned_view_constructed (GObject *object)
EShellBackend *shell_backend;
EShellWindow *shell_window;
EShellView *shell_view;
- EShell *shell;
- EShellSettings *shell_settings;
+ GSettings *settings;
EMailReader *reader;
EMailBackend *backend;
EMailSession *session;
@@ -644,16 +643,21 @@ mail_paned_view_constructed (GObject *object)
shell_view = e_mail_view_get_shell_view (view);
shell_window = e_shell_view_get_shell_window (shell_view);
shell_backend = e_shell_view_get_shell_backend (shell_view);
- shell = e_shell_window_get_shell (shell_window);
- shell_settings = e_shell_get_shell_settings (shell);
backend = E_MAIL_BACKEND (shell_backend);
session = e_mail_backend_get_session (backend);
- g_object_bind_property (
- shell_settings, "paned-view-headers-state",
+ /* FIXME This should be an EMailPanedView property, so
+ * it can be configured from the settings module. */
+
+ settings = g_settings_new ("org.gnome.evolution.mail");
+
+ g_settings_bind (
+ settings, "headers-collapsed",
priv->display, "headers-collapsed",
- G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
+ G_SETTINGS_BIND_DEFAULT);
+
+ g_object_unref (settings);
/* Build content widgets. */
diff --git a/modules/mail/e-mail-shell-settings.c b/modules/mail/e-mail-shell-settings.c
index 3b0c6b59c6..6982345b88 100644
--- a/modules/mail/e-mail-shell-settings.c
+++ b/modules/mail/e-mail-shell-settings.c
@@ -362,9 +362,9 @@ e_mail_shell_settings_init (EShellBackend *shell_backend)
"composer-gallery-path");
e_shell_settings_install_property_for_key (
- "paned-view-headers-state",
+ "mail-headers-collapsed",
MAIL_SCHEMA,
- "paned-view-headers-state");
+ "headers-collapsed");
e_shell_settings_install_property (
g_param_spec_enum (