[grilo] test-ui: Show new registered metadata keys.
- From: Juan A. Suarez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo] test-ui: Show new registered metadata keys.
- Date: Sun, 9 Mar 2014 19:36:07 +0000 (UTC)
commit 4ce8e5056180a54c027e88b4c7ed9b11038aa029
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date: Sun Mar 9 19:32:02 2014 +0000
test-ui: Show new registered metadata keys.
tools/grilo-test-ui/main.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/tools/grilo-test-ui/main.c b/tools/grilo-test-ui/main.c
index f6f12d9..72d82d9 100644
--- a/tools/grilo-test-ui/main.c
+++ b/tools/grilo-test-ui/main.c
@@ -2216,6 +2216,24 @@ content_changed_cb (GrlSource *source,
}
static void
+metadata_key_added_cb (GrlRegistry *registry,
+ const gchar *key,
+ gpointer user_data)
+{
+ gchar *message;
+ guint id;
+
+ message = g_strdup_printf ("New metadata key '%s' has been added", key);
+ id = gtk_statusbar_push (GTK_STATUSBAR (view->statusbar),
+ view->statusbar_context_id,
+ message);
+ g_timeout_add_seconds (NOTIFICATION_TIMEOUT,
+ remove_notification,
+ GUINT_TO_POINTER (id));
+ g_free (message);
+}
+
+static void
source_added_cb (GrlRegistry *registry,
GrlSource *source,
gpointer user_data)
@@ -2278,6 +2296,8 @@ load_plugins (void)
G_CALLBACK (source_added_cb), NULL);
g_signal_connect (registry, "source-removed",
G_CALLBACK (source_removed_cb), NULL);
+ g_signal_connect (registry, "metadata-key-added",
+ G_CALLBACK (metadata_key_added_cb), NULL);
if (!grl_registry_load_all_plugins (registry, NULL)) {
g_error ("Failed to load plugins.");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]