[aravis] control: execute command features.
- From: Emmanuel Pacaud <emmanuel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [aravis] control: execute command features.
- Date: Mon, 20 Jun 2011 15:17:19 +0000 (UTC)
commit ec7cea3f88548a7852104e788ea03c0e471b7530
Author: Emmanuel Pacaud <emmanuel gnome org>
Date: Mon Jun 20 17:16:58 2011 +0200
control: execute command features.
src/arvcontrol.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/src/arvcontrol.c b/src/arvcontrol.c
index 4ee17b6..25b8a4c 100644
--- a/src/arvcontrol.c
+++ b/src/arvcontrol.c
@@ -106,10 +106,15 @@ main (int argc, char **argv)
if (!ARV_IS_GC_NODE (feature))
printf ("Feature '%s' not found\n", tokens[0]);
else {
- if (tokens[1] != NULL)
- arv_gc_node_set_value_from_string (feature, tokens[1]);
-
- printf ("%s = %s\n", tokens[0], arv_gc_node_get_value_as_string (feature));
+ if (ARV_IS_GC_COMMAND (feature)) {
+ arv_gc_command_execute (ARV_GC_COMMAND (feature));
+ printf ("%s executed\n", tokens[0]);
+ } else {
+ if (tokens[1] != NULL)
+ arv_gc_node_set_value_from_string (feature, tokens[1]);
+
+ printf ("%s = %s\n", tokens[0], arv_gc_node_get_value_as_string (feature));
+ }
}
g_strfreev (tokens);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]