[evolution/wip/webkit2] Make ESettingsContentEditor actually used



commit b52bf91a8e2c153df845e6536cf983b99f4912df
Author: Milan Crha <mcrha redhat com>
Date:   Thu Jun 9 15:25:04 2016 +0200

    Make ESettingsContentEditor actually used
    
    Also do not bind properties which are non-existent on the object

 modules/settings/e-settings-content-editor.c |   36 +++++---------------------
 modules/settings/evolution-module-settings.c |    2 +
 2 files changed, 9 insertions(+), 29 deletions(-)
---
diff --git a/modules/settings/e-settings-content-editor.c b/modules/settings/e-settings-content-editor.c
index 4dc0068..8726f70 100644
--- a/modules/settings/e-settings-content-editor.c
+++ b/modules/settings/e-settings-content-editor.c
@@ -75,33 +75,13 @@ settings_content_editor_changed_cb (GSettings *settings,
 }
 
 static void
-settings_content_editor_realize (GtkWidget *widget,
-                                 ESettingsContentEditor *extension)
+settings_content_editor_html_editor_realize_cb (GtkWidget *html_editor,
+                                               ESettingsContentEditor *extension)
 {
        GSettings *settings;
 
        settings = extension->priv->settings;
 
-       g_settings_bind (
-               settings, "composer-inline-spelling",
-               widget, "inline-spelling",
-               G_SETTINGS_BIND_DEFAULT);
-
-       g_settings_bind (
-               settings, "composer-magic-links",
-               widget, "magic-links",
-               G_SETTINGS_BIND_DEFAULT);
-
-       g_settings_bind (
-               settings, "composer-magic-smileys",
-               widget, "magic-smileys",
-               G_SETTINGS_BIND_DEFAULT);
-
-       g_settings_bind (
-               settings, "composer-unicode-smileys",
-               widget, "unicode-smileys",
-               G_SETTINGS_BIND_DEFAULT);
-
        settings_content_editor_load_style (extension);
 
        /* Reload the web view when certain settings change. */
@@ -166,17 +146,15 @@ static void
 settings_content_editor_constructed (GObject *object)
 {
        EExtensible *extensible;
-       EContentEditor *cnt_editor;
+
+       /* Chain up to parent's method. */
+       G_OBJECT_CLASS (e_settings_content_editor_parent_class)->constructed (object);
 
        extensible = e_extension_get_extensible (E_EXTENSION (object));
-       cnt_editor = e_html_editor_get_content_editor (E_HTML_EDITOR (extensible));
 
        g_signal_connect (
-               cnt_editor, "realize",
-               G_CALLBACK (settings_content_editor_realize), object);
-
-       /* Chain up to parent's constructed() method. */
-       G_OBJECT_CLASS (e_settings_content_editor_parent_class)->constructed (object);
+               extensible, "realize",
+               G_CALLBACK (settings_content_editor_html_editor_realize_cb), object);
 }
 
 static void
diff --git a/modules/settings/evolution-module-settings.c b/modules/settings/evolution-module-settings.c
index 57abd2b..8ade039 100644
--- a/modules/settings/evolution-module-settings.c
+++ b/modules/settings/evolution-module-settings.c
@@ -19,6 +19,7 @@
 #include "e-settings-calendar-item.h"
 #include "e-settings-calendar-view.h"
 #include "e-settings-client-cache.h"
+#include "e-settings-content-editor.h"
 #include "e-settings-date-edit.h"
 #include "e-settings-deprecated.h"
 #include "e-settings-content-editor.h"
@@ -46,6 +47,7 @@ e_module_load (GTypeModule *type_module)
        e_settings_calendar_item_type_register (type_module);
        e_settings_calendar_view_type_register (type_module);
        e_settings_client_cache_type_register (type_module);
+       e_settings_content_editor_type_register (type_module);
        e_settings_date_edit_type_register (type_module);
        e_settings_deprecated_type_register (type_module);
        e_settings_content_editor_type_register (type_module);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]