[devhelp/wip/swilmet/various-code-improvements] sidebar: fix bug in set_search_string()
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devhelp/wip/swilmet/various-code-improvements] sidebar: fix bug in set_search_string()
- Date: Fri, 9 Oct 2015 17:29:12 +0000 (UTC)
commit 79fce1fb92cc68d6334702a23d2034abcbb3f348
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.
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 6d653ad..f0ba60e 100644
--- a/src/dh-sidebar.c
+++ b/src/dh-sidebar.c
@@ -341,19 +341,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]