[evolution/webkit] Enable collapsable headers in paned view
- From: Dan VrÃtil <dvratil src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/webkit] Enable collapsable headers in paned view
- Date: Thu, 15 Dec 2011 16:14:34 +0000 (UTC)
commit 5f4d7c283e423a4bcf3752384fdd5e6e14ae006f
Author: Dan VrÃtil <dvratil redhat com>
Date: Thu Dec 15 17:12:49 2011 +0100
Enable collapsable headers in paned view
Fix handling of the 'headers-collapsed' event in EMailDisplay and
bind it correctly to a gconf value
mail/e-mail-display.c | 4 ++--
mail/e-mail-paned-view.c | 18 ++++++++++--------
2 files changed, 12 insertions(+), 10 deletions(-)
---
diff --git a/mail/e-mail-display.c b/mail/e-mail-display.c
index 3bc38ea..55ca67b 100644
--- a/mail/e-mail-display.c
+++ b/mail/e-mail-display.c
@@ -516,7 +516,7 @@ mail_display_headers_collapsed_state_changed (EWebView *web_view,
EMailDisplay *display = user_data;
JSGlobalContextRef ctx = e_web_view_get_global_context (web_view);
- display->priv->headers_collapsed = JSValueToBoolean (ctx, args[0]);
+ e_mail_display_set_headers_collapsed (display, JSValueToBoolean (ctx, args[0]));
}
static void
@@ -872,7 +872,7 @@ mail_display_class_init (EMailDisplayClass *class)
object_class,
PROP_HEADERS_COLLAPSED,
g_param_spec_boolean (
- "header-collapsed",
+ "headers-collapsed",
"Headers Collapsed",
NULL,
FALSE,
diff --git a/mail/e-mail-paned-view.c b/mail/e-mail-paned-view.c
index 629f7ee..50793cc 100644
--- a/mail/e-mail-paned-view.c
+++ b/mail/e-mail-paned-view.c
@@ -600,6 +600,8 @@ mail_paned_view_constructed (GObject *object)
EShellBackend *shell_backend;
EShellWindow *shell_window;
EShellView *shell_view;
+ EShell *shell;
+ EShellSettings *shell_settings;
ESearchBar *search_bar;
EMailReader *reader;
EMailView *view;
@@ -609,7 +611,9 @@ mail_paned_view_constructed (GObject *object)
priv = E_MAIL_PANED_VIEW (object)->priv;
- priv->display = g_object_new (E_TYPE_MAIL_DISPLAY, NULL);
+ priv->display = g_object_new (E_TYPE_MAIL_DISPLAY,
+ "headers-collapsable", TRUE, NULL);
+
widget = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (widget),
GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
@@ -624,15 +628,13 @@ 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);
- /* Make headers collapsable and store state of headers in config file */
- /* FIXME WEBKIT */
- /*em_format_html_set_headers_collapsable (EM_FORMAT_HTML (priv->formatter), TRUE);
+ /* Make headers collapsable and store state of headers in config file. */
g_object_bind_property (shell_settings, "paned-view-headers-state",
- EM_FORMAT_HTML (priv->formatter), "headers-state",
- G_BINDING_BIDIRECTIONAL |
- G_BINDING_SYNC_CREATE);
- */
+ priv->display, "headers-collapsed",
+ G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
/* Build content widgets. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]