[evolution/gnome-3-22] Fix the EHTMLEditor's update-actions signal



commit d527902b13196771663b761b0c350727fa167480
Author: Tomas Popela <tpopela redhat com>
Date:   Wed Nov 30 13:33:10 2016 +0100

    Fix the EHTMLEditor's update-actions signal
    
    It's argument is not a boxed type, but the unsigned int. Correct its
    declaration that could allow us to remove one private variable.

 e-util/e-html-editor-private.h |    2 --
 e-util/e-html-editor.c         |    7 +++----
 e-util/e-html-editor.h         |    3 ++-
 3 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/e-util/e-html-editor-private.h b/e-util/e-html-editor-private.h
index 37523a5..22213d0 100644
--- a/e-util/e-html-editor-private.h
+++ b/e-util/e-html-editor-private.h
@@ -86,8 +86,6 @@ struct _EHTMLEditorPrivate {
        GHashTable *content_editors;
        EContentEditor *use_content_editor;
 
-       EContentEditorNodeFlags node_flags;
-
        gchar *filename;
 
        guint spell_suggestions_merge_id;
diff --git a/e-util/e-html-editor.c b/e-util/e-html-editor.c
index 39070ee..15a5202 100644
--- a/e-util/e-html-editor.c
+++ b/e-util/e-html-editor.c
@@ -330,10 +330,10 @@ action_set_visible_and_sensitive (GtkAction *action,
 }
 
 static void
-html_editor_update_actions (EHTMLEditor *editor)
+html_editor_update_actions (EHTMLEditor *editor,
+                            EContentEditorNodeFlags flags)
 {
        EContentEditor *cnt_editor;
-       EContentEditorNodeFlags flags = editor->priv->node_flags;
        ESpellChecker *spell_checker;
        GtkUIManager *manager;
        GtkActionGroup *action_group;
@@ -499,7 +499,6 @@ html_editor_context_menu_requested_cb (EContentEditor *cnt_editor,
        /* COUNT FLAGS */
        menu = e_html_editor_get_managed_widget (editor, "/context-menu");
 
-       editor->priv->node_flags = flags;
        g_signal_emit (editor, signals[UPDATE_ACTIONS], 0, flags);
 
        if (!gtk_menu_get_attach_widget (GTK_MENU (menu)))
@@ -844,7 +843,7 @@ e_html_editor_class_init (EHTMLEditorClass *class)
                G_SIGNAL_RUN_LAST,
                G_STRUCT_OFFSET (EHTMLEditorClass, update_actions),
                NULL, NULL,
-               g_cclosure_marshal_VOID__BOXED,
+               g_cclosure_marshal_VOID__UINT,
                G_TYPE_NONE, 1,
                G_TYPE_UINT);
 
diff --git a/e-util/e-html-editor.h b/e-util/e-html-editor.h
index e1381da..6c5a63a 100644
--- a/e-util/e-html-editor.h
+++ b/e-util/e-html-editor.h
@@ -63,7 +63,8 @@ struct _EHTMLEditor {
 struct _EHTMLEditorClass {
        GtkGridClass parent_class;
 
-       void            (*update_actions)       (EHTMLEditor *editor);
+       void            (*update_actions)       (EHTMLEditor *editor,
+                                                EContentEditorNodeFlags flags);
 
        void            (*spell_languages_changed)
                                                (EHTMLEditor *editor);


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