[PATCH] test-ui: Inform about cancelled operations
- From: "Juan A. Suarez Romero" <jasuarez igalia com>
- To: grilo-list gnome org
- Subject: [PATCH] test-ui: Inform about cancelled operations
- Date: Tue, 8 Feb 2011 13:52:20 +0100
Signed-off-by: Juan A. Suarez Romero <jasuarez igalia com>
---
tools/grilo-test-ui/main.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/tools/grilo-test-ui/main.c b/tools/grilo-test-ui/main.c
index 6d15117..b1e66b7 100644
--- a/tools/grilo-test-ui/main.c
+++ b/tools/grilo-test-ui/main.c
@@ -475,7 +475,13 @@ metadata_cb (GrlMediaSource *source,
view->metadata_model);
if (error) {
- g_critical ("Error: %s", error->message);
+ if (g_error_matches (error,
+ GRL_CORE_ERROR,
+ GRL_CORE_ERROR_OPERATION_CANCELLED)) {
+ GRL_DEBUG ("Operation cancelled");
+ } else {
+ g_critical ("Error: %s", error->message);
+ }
return;
}
@@ -556,7 +562,13 @@ browse_search_query_cb (GrlMediaSource *source,
guint next_op_id;
if (error) {
- g_critical ("Error: %s", error->message);
+ if (g_error_matches (error,
+ GRL_CORE_ERROR,
+ GRL_CORE_ERROR_OPERATION_CANCELLED)) {
+ GRL_DEBUG ("Operation cancelled");
+ } else {
+ g_critical ("Error: %s", error->message);
+ }
}
state->count++;
--
1.7.1
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]