[evolution/wip/webkit2] Add some missing chunks of a fix for bug 740169 (unicode smileys)



commit a819317ddc409bd4a9d3d0b6843209789089eb45
Author: Milan Crha <mcrha redhat com>
Date:   Wed Aug 10 19:12:36 2016 +0200

    Add some missing chunks of a fix for bug 740169 (unicode smileys)

 composer/e-composer-actions.c    |    8 ++++++++
 composer/e-composer-actions.h    |    2 ++
 composer/e-composer-private.c    |    1 -
 composer/e-msg-composer.c        |    7 +++++++
 composer/evolution-composer.ui   |    1 +
 modules/mail/em-composer-prefs.c |    6 ++++++
 6 files changed, 24 insertions(+), 1 deletions(-)
---
diff --git a/composer/e-composer-actions.c b/composer/e-composer-actions.c
index fa92322..77e1b88 100644
--- a/composer/e-composer-actions.c
+++ b/composer/e-composer-actions.c
@@ -510,6 +510,14 @@ static GtkToggleActionEntry toggle_entries[] = {
          NULL,
          FALSE },
 
+       { "unicode-smileys",
+         NULL,
+         N_("Unicode smilyes"),
+         NULL,
+         N_("Use Unicode characters for smileys."),
+         NULL,  /* Handled by property bindings */
+         FALSE },
+
        { "view-bcc",
          NULL,
          N_("_Bcc Field"),
diff --git a/composer/e-composer-actions.h b/composer/e-composer-actions.h
index 863cc8f..8449287 100644
--- a/composer/e-composer-actions.h
+++ b/composer/e-composer-actions.h
@@ -68,6 +68,8 @@
        E_COMPOSER_ACTION ((composer), "toolbar-smime-encrypt")
 #define E_COMPOSER_ACTION_TOOLBAR_SMIME_SIGN(composer) \
        E_COMPOSER_ACTION ((composer), "toolbar-smime-sign")
+#define E_COMPOSER_ACTION_UNICODE_SMILEYS(composer) \
+       E_COMPOSER_ACTION ((composer), "unicode-smileys")
 #define E_COMPOSER_ACTION_VIEW_BCC(composer) \
        E_COMPOSER_ACTION ((composer), "view-bcc")
 #define E_COMPOSER_ACTION_VIEW_CC(composer) \
diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c
index 4023bd7..2b20b28 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -290,7 +290,6 @@ e_composer_private_constructed (EMsgComposer *composer)
        for (ii = 0; ii < E_COMPOSER_NUM_HEADERS; ii++) {
                EComposerHeaderTable *table;
                EComposerHeader *header;
-               GtkAction *action;
 
                table = E_COMPOSER_HEADER_TABLE (priv->header_table);
                header = e_composer_header_table_get_header (table, ii);
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 732ec2f..9eaef30 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -2450,6 +2450,13 @@ msg_composer_constructed (GObject *object)
        active = g_settings_get_boolean (settings, "composer-request-receipt");
        gtk_toggle_action_set_active (action, active);
 
+       action = GTK_TOGGLE_ACTION (ACTION (UNICODE_SMILEYS));
+       g_settings_bind (settings, "composer-unicode-smileys",
+                        action, "active",
+                        G_SETTINGS_BIND_DEFAULT);
+
+       g_object_unref (settings);
+
        /* Clipboard Support */
 
        g_signal_connect (
diff --git a/composer/evolution-composer.ui b/composer/evolution-composer.ui
index b74bb30..7acd273 100644
--- a/composer/evolution-composer.ui
+++ b/composer/evolution-composer.ui
@@ -51,6 +51,7 @@
       <menuitem action='request-read-receipt'/>
       <menuitem action='prioritize-message'/>
       <separator/>
+      <menuitem action='unicode-smileys'/>
       <menu action='charset-menu'/>
     </menu>
   </menubar>
diff --git a/modules/mail/em-composer-prefs.c b/modules/mail/em-composer-prefs.c
index d7c5da4..ecdcf40 100644
--- a/modules/mail/em-composer-prefs.c
+++ b/modules/mail/em-composer-prefs.c
@@ -1162,6 +1162,12 @@ em_composer_prefs_construct (EMComposerPrefs *prefs,
                widget, "active",
                G_SETTINGS_BIND_DEFAULT);
 
+       widget = e_builder_get_widget (prefs->builder, "chkUnicodeSmileys");
+       g_settings_bind (
+               settings, "composer-unicode-smileys",
+               widget, "active",
+               G_SETTINGS_BIND_DEFAULT);
+
        widget = e_builder_get_widget (prefs->builder, "chkRequestReceipt");
        g_settings_bind (
                settings, "composer-request-receipt",


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