[tracker/tracker-needle-model: 2/2] needle: Connect to search.activate to trigger query immediately.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-needle-model: 2/2] needle: Connect to search.activate to trigger query immediately.
- Date: Thu, 17 Mar 2011 13:00:13 +0000 (UTC)
commit bce4036182ec5e76bdfdfb9c859e333a4419b145
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Mar 17 13:57:42 2011 +0100
needle: Connect to search.activate to trigger query immediately.
src/tracker-needle/tracker-needle.vala | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/tracker-needle/tracker-needle.vala b/src/tracker-needle/tracker-needle.vala
index 174643f..84bb0bd 100644
--- a/src/tracker-needle/tracker-needle.vala
+++ b/src/tracker-needle/tracker-needle.vala
@@ -143,6 +143,7 @@ public class Tracker.Needle {
search_list = builder.get_object ("comboboxentry_search") as ComboBoxEntry;
search = search_list.get_child () as Entry;
search.changed.connect (search_changed);
+ search.activate.connect (search_activated);
search_history_insert (history.get ());
spinner = new Spinner ();
@@ -219,6 +220,15 @@ public class Tracker.Needle {
last_search_id = Timeout.add_seconds (1, search_run);
}
+ private void search_activated (Entry entry) {
+ if (last_search_id != 0) {
+ Source.remove (last_search_id);
+ last_search_id = 0;
+ }
+
+ search_run ();
+ }
+
private async void search_simple (ListStore store) requires (store != null) {
/*
Tracker.Query query = new Tracker.Query ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]