[gedit/wip/spell-checking] spell-plugin: retain auto-spell after a drag-and-drop



commit 9535bc519af33cb85833a991f7b3e18e18f821a8
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Jul 31 14:35:03 2015 +0200

    spell-plugin: retain auto-spell after a drag-and-drop
    
    If the auto-spell is enabled in a tab, after a drag-and-drop of that
    tab, the auto-spell was disabled.

 plugins/spell/gedit-spell-plugin.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/plugins/spell/gedit-spell-plugin.c b/plugins/spell/gedit-spell-plugin.c
index dedb42b..cd9c3b3 100644
--- a/plugins/spell/gedit-spell-plugin.c
+++ b/plugins/spell/gedit-spell-plugin.c
@@ -106,6 +106,7 @@ static void auto_spell_change_state_cb      (GSimpleAction *action, GVariant *state,
 
 static void    on_document_loaded              (GeditDocument *doc, ViewData *data);
 static void    on_document_saved               (GeditDocument *doc, ViewData *data);
+static void    set_auto_spell_from_metadata    (ViewData *data);
 
 static GActionEntry action_entries[] =
 {
@@ -141,6 +142,8 @@ view_data_new (GeditSpellPlugin *plugin,
                          G_CALLBACK (on_document_saved),
                          data);
 
+       set_auto_spell_from_metadata (data);
+
        return data;
 }
 
@@ -1275,8 +1278,6 @@ gedit_spell_plugin_activate (GeditWindowActivatable *activatable)
                                        VIEW_DATA_KEY,
                                        data,
                                        (GDestroyNotify) view_data_free);
-
-               set_auto_spell_from_metadata (data);
        }
 
        priv->tab_added_id = g_signal_connect (priv->window,


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