[devhelp/wip/swilmet/various-code-improvements: 13/17] sidebar: fix bug in set_search_string()



commit 9ab0124a29965e7e9ce4a943543f3a158a3a1bb1
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Oct 9 19:25:42 2015 +0200

    sidebar: fix bug in set_search_string()
    
    The following command didn't work:
    $ devhelp --search "gtk_ translation"
    
    It showed the book tree, not the hitlist. Because
    sidebar_entry_changed_cb() hides or shows the hitlist and the book tree,
    depending on whether the entry is empty or not.
    
    It's amazing the number of bugs that we find just by reading the code.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=756341

 src/dh-sidebar.c |   10 ----------
 1 files changed, 0 insertions(+), 10 deletions(-)
---
diff --git a/src/dh-sidebar.c b/src/dh-sidebar.c
index f2f4008..dddb4c8 100644
--- a/src/dh-sidebar.c
+++ b/src/dh-sidebar.c
@@ -343,19 +343,9 @@ dh_sidebar_set_search_string (DhSidebar   *sidebar,
 
         priv = dh_sidebar_get_instance_private (sidebar);
 
-        g_signal_handlers_block_by_func (priv->entry,
-                                         sidebar_entry_changed_cb,
-                                         sidebar);
-
         gtk_entry_set_text (priv->entry, str);
         gtk_editable_set_position (GTK_EDITABLE (priv->entry), -1);
         gtk_editable_select_region (GTK_EDITABLE (priv->entry), -1, -1);
-
-        g_signal_handlers_unblock_by_func (priv->entry,
-                                           sidebar_entry_changed_cb,
-                                           sidebar);
-
-        sidebar_search_run_idle (sidebar);
 }
 
 /******************************************************************************/


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