[evolution/webkit: 83/113] Enable collapsable headers in paned view
- From: Dan VrÃtil <dvratil src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/webkit: 83/113] Enable collapsable headers in paned view
- Date: Tue, 10 Jan 2012 09:55:34 +0000 (UTC)
commit 34517962a80ae9d6178591c5877ca356ac67a02c
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 | 20 ++++++++++----------
2 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/mail/e-mail-display.c b/mail/e-mail-display.c
index 6353f1e..07bf0c8 100644
--- a/mail/e-mail-display.c
+++ b/mail/e-mail-display.c
@@ -521,7 +521,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
@@ -877,7 +877,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 10c438e..d0304b3 100644
--- a/mail/e-mail-paned-view.c
+++ b/mail/e-mail-paned-view.c
@@ -612,6 +612,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;
EMailBackend *backend;
@@ -623,7 +625,9 @@ mail_paned_view_constructed (GObject *object)
priv = E_MAIL_PANED_VIEW_GET_PRIVATE (object);
- 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);
@@ -638,19 +642,15 @@ 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);
- /* 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);
- g_object_bind_property (
- shell_settings, "paned-view-headers-state",
- priv->formatter, "headers-state",
- G_BINDING_BIDIRECTIONAL |
- G_BINDING_SYNC_CREATE);
- */
+ g_object_bind_property (shell_settings, "paned-view-headers-state",
+ 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]