[grilo] test-ui: Support search all
- From: Juan A. Suarez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo] test-ui: Support search all
- Date: Mon, 7 Feb 2011 20:40:15 +0000 (UTC)
commit 02688fe8f32a512a1872e71e32865b2e21f04f1c
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date: Wed Feb 2 21:17:57 2011 +0100
test-ui: Support search all
If search text entry is empty, perform a search all.
Signed-off-by: Juan A. Suarez Romero <jasuarez igalia com>
tools/grilo-test-ui/main.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/tools/grilo-test-ui/main.c b/tools/grilo-test-ui/main.c
index 0c91f56..6d15117 100644
--- a/tools/grilo-test-ui/main.c
+++ b/tools/grilo-test-ui/main.c
@@ -1078,7 +1078,12 @@ search_btn_clicked_cb (GtkButton *btn, gpointer user_data)
SEARCH_MODEL_SOURCE, &source,
-1);
text = gtk_entry_get_text (GTK_ENTRY (view->search_text));
- search (source, text);
+ /* Special case: empty search means search all */
+ if (text[0] == '\0') {
+ search (source, NULL);
+ } else {
+ search (source, text);
+ }
if (source) {
g_object_unref (source);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]