[tracker] TrackerSearchBar: Forward visible keystrokes to search entry.



commit cc1a67635bbb840bd86d07c02d4a3ad4c1041cf9
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Mar 23 13:42:40 2010 +0100

    TrackerSearchBar: Forward visible keystrokes to search entry.
    
    Now when typing with the results window shown will have visible keystrokes
    (plus GDK_Back) forwarded to the search entry so the query may be refined
    on the fly.

 src/tracker-search-bar/tracker-results-window.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/tracker-search-bar/tracker-results-window.c b/src/tracker-search-bar/tracker-results-window.c
index d346979..c04e564 100644
--- a/src/tracker-search-bar/tracker-results-window.c
+++ b/src/tracker-search-bar/tracker-results-window.c
@@ -508,6 +508,16 @@ results_window_key_press_event (GtkWidget   *widget,
 
 	priv = TRACKER_RESULTS_WINDOW_GET_PRIVATE (widget);
 
+        if (event->keyval != GDK_Return &&
+            (*event->string != '\0' ||
+             event->keyval == GDK_BackSpace)) {
+                GtkWidget *entry;
+
+                entry = tracker_aligned_window_get_widget (TRACKER_ALIGNED_WINDOW (widget));
+                gtk_propagate_event (entry, (GdkEvent *) event);
+                return TRUE;
+        }
+
 	if (GTK_WIDGET_CLASS (tracker_results_window_parent_class)->key_press_event (widget, event)) {
 		return TRUE;
 	}



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