[gedit/wip/spell-shaking] spell-plugin: remove dead code about empty document



commit 64656d25806aa9c86e6edd9c313066170d2feb01
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Aug 7 11:18:06 2015 +0200

    spell-plugin: remove dead code about empty document
    
    Don't check if the doc is empty before showing the dialog.
    
    The GAction for launching the spell checker dialog is insensitive when
    the buffer is empty. So showing the message in the statusbar was never
    executed.

 plugins/spell/gedit-spell-plugin.c |   12 ------------
 1 files changed, 0 insertions(+), 12 deletions(-)
---
diff --git a/plugins/spell/gedit-spell-plugin.c b/plugins/spell/gedit-spell-plugin.c
index ee380e5..b051952 100644
--- a/plugins/spell/gedit-spell-plugin.c
+++ b/plugins/spell/gedit-spell-plugin.c
@@ -397,18 +397,6 @@ spell_cb (GSimpleAction *action,
        checker = get_spell_checker_from_document (doc);
        g_return_if_fail (checker != NULL);
 
-       if (gtk_text_buffer_get_char_count (GTK_TEXT_BUFFER (doc)) <= 0)
-       {
-               GtkWidget *statusbar;
-
-               statusbar = gedit_window_get_statusbar (priv->window);
-               gedit_statusbar_flash_message (GEDIT_STATUSBAR (statusbar),
-                                              priv->statusbar_context_id,
-                                              _("The document is empty."));
-
-               return;
-       }
-
        navigator = gedit_spell_navigator_gtv_new (GTK_TEXT_VIEW (view), checker);
        dialog = gedit_spell_checker_dialog_new (GTK_WINDOW (priv->window), navigator);
        g_object_unref (navigator);


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