[gedit/wip/spell-cleanup] spell: make the menu item sensitive even for an empty buffer



commit 91a49abe2f28a1d11916337eceb0c7aa8be104fe
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sat Jan 9 12:49:41 2016 +0100

    spell: make the menu item sensitive even for an empty buffer
    
    A user may wonder why the menu item is insensitive. She may think that
    the spell checking doesn't work well.

 plugins/spell/gedit-spell-plugin.c |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)
---
diff --git a/plugins/spell/gedit-spell-plugin.c b/plugins/spell/gedit-spell-plugin.c
index ea551df..d1eb883 100644
--- a/plugins/spell/gedit-spell-plugin.c
+++ b/plugins/spell/gedit-spell-plugin.c
@@ -377,7 +377,6 @@ update_ui (GeditSpellPlugin *plugin)
        if (view != NULL)
        {
                GeditTab *tab;
-               GtkTextBuffer *buffer;
 
                tab = gedit_window_get_active_tab (priv->window);
                g_return_if_fail (gedit_tab_get_view (tab) == view);
@@ -396,12 +395,6 @@ update_ui (GeditSpellPlugin *plugin)
                        g_action_change_state (inline_checker_action,
                                               g_variant_new_boolean (inline_checker_enabled));
                }
-
-               buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
-
-               g_simple_action_set_enabled (G_SIMPLE_ACTION (check_spell_action),
-                                            editable_view &&
-                                            gtk_text_buffer_get_char_count (buffer) > 0);
        }
 }
 


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