[grilo] grl-inspect: Wait 1 second before showing results
- From: Juan A. Suarez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo] grl-inspect: Wait 1 second before showing results
- Date: Mon, 25 Mar 2013 00:37:19 +0000 (UTC)
commit c1e9b86a2ac8a75acae1c256960ae07f4300d466
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date: Mon Mar 25 00:35:02 2013 +0000
grl-inspect: Wait 1 second before showing results
Wait for sources that are created asynchronously to be active before inspecting
them.
grl-inspect.1 | 1 +
tools/grilo-inspect/grl-inspect.c | 10 +++-------
2 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/grl-inspect.1 b/grl-inspect.1
index efaed93..bf2dc8c 100644
--- a/grl-inspect.1
+++ b/grl-inspect.1
@@ -44,6 +44,7 @@ Show summary of all options.
.BI \-d,\ \-\-delay " seconds"
Wait for some seconds before showing results. Useful when plugins may
need some time for the source discovery process (example: UPnP).
+If not specified, by default it waits 1 second.
.TP
.BI \-c,\ \-\-config " config-file"
Configuration file to use with the plugins.
diff --git a/tools/grilo-inspect/grl-inspect.c b/tools/grilo-inspect/grl-inspect.c
index 6747a0e..c38003f 100644
--- a/tools/grilo-inspect/grl-inspect.c
+++ b/tools/grilo-inspect/grl-inspect.c
@@ -28,7 +28,7 @@
#define GRL_LOG_DOMAIN_DEFAULT grl_inspect_log_domain
GRL_LOG_DOMAIN_STATIC(grl_inspect_log_domain);
-static gint delay = 0;
+static gint delay = 1;
static GMainLoop *mainloop = NULL;
static gchar **introspect_sources = NULL;
static gchar *conffile = NULL;
@@ -38,7 +38,7 @@ static gboolean version;
static GOptionEntry entries[] = {
{ "delay", 'd', 0,
G_OPTION_ARG_INT, &delay,
- "Wait some seconds before showing results",
+ "Wait some seconds before showing results (default 1 second)",
NULL },
{ "config", 'c', 0,
G_OPTION_ARG_STRING, &conffile,
@@ -252,11 +252,7 @@ main (int argc, char *argv[])
grl_registry_load_all_plugins (registry, NULL);
- if (delay > 0) {
- g_timeout_add_seconds ((guint) delay, run, NULL);
- } else {
- g_idle_add (run, NULL);
- }
+ g_timeout_add_seconds ((guint) delay, run, NULL);
g_main_loop_run (mainloop);
return 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]