[bijiben] search-toolbar: Search for notes after a slight delay
- From: Mohammed Sadiq <pksadiq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [bijiben] search-toolbar: Search for notes after a slight delay
- Date: Sat, 28 Apr 2018 03:01:27 +0000 (UTC)
commit 907881f0fcb60d93e2da8a9747b2efd1dbfae958
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date: Fri Apr 27 14:50:08 2018 +0530
search-toolbar: Search for notes after a slight delay
The "notify::text" is emitted for every change immediately. This
can make the UI freeze if there is too much to search.
Instead, we can better connect to "search-changed" signal which
gets emitted every 150ms after some text change.
https://bugzilla.gnome.org/show_bug.cgi?id=795598
src/bjb-search-toolbar.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/src/bjb-search-toolbar.c b/src/bjb-search-toolbar.c
index 45a159c..64f68e9 100644
--- a/src/bjb-search-toolbar.c
+++ b/src/bjb-search-toolbar.c
@@ -119,7 +119,6 @@ bjb_search_toolbar_set_property (GObject *object,
static void
action_entry_text_change_callback (GtkEntry *entry,
- GParamSpec *pspec,
BjbSearchToolbar *self)
{
bjb_controller_set_needle (BJB_CONTROLLER (self->controller),
@@ -148,7 +147,7 @@ bjb_search_toolbar_connect (BjbSearchToolbar *self)
if (self->text_id == 0)
- self->text_id = g_signal_connect (self->entry, "notify::text",
+ self->text_id = g_signal_connect (self->entry, "search-changed",
G_CALLBACK (action_entry_text_change_callback), self);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]