summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2010-10-07 16:33:17 +0100
committerWill Thompson <will.thompson@collabora.co.uk>2010-10-07 16:33:49 +0100
commitfb5ea0159ec8a5d96a266530b401f788c0e293ca (patch)
treeb25a2e7e3c51d3f938a3596ad1fdbabdf54a5ea4
parentf03e38c057a3d38537bc585dabc78ed0dc8cda24 (diff)
parent144d6e15d9cd5bd8a8c17ffc50a0ba5078319d98 (diff)
downloadtelepathy-mission-control-fb5ea0159ec8a5d96a266530b401f788c0e293ca.tar.gz
Merge branch 'mc-tool-types' into telepathy-mission-control-5.6
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Vivek Dasmohapatra <vivek@collabora.co.uk> Reviewed-by: Vivek Dasmohapatra <vivek@collabora.co.uk>
-rw-r--r--util/mc-tool.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/util/mc-tool.c b/util/mc-tool.c
index 65847113..4073649c 100644
--- a/util/mc-tool.c
+++ b/util/mc-tool.c
@@ -45,9 +45,9 @@ show_help (gchar * err)
printf ("Usage:\n"
" %1$s list\n"
- " %1$s add <profile> <display name> [(int|bool|string):<key>=<value> ...]\n"
- " %1$s add <manager>/<protocol> <display name> [(int|bool|string):<key>=<value> ...]\n"
- " %1$s update <account name> [(int|uint|bool|string):<key>=<value>|clear:key] ...\n"
+ " %1$s add <profile> <display name> [<param> ...]\n"
+ " %1$s add <manager>/<protocol> <display name> [<param> ...]\n"
+ " %1$s update <account name> [<param>|clear:key] ...\n"
" %1$s display <account name> <display name>\n"
" %1$s nick <account name> <nick name>\n"
" %1$s service <account name> <service name>\n"
@@ -59,7 +59,8 @@ show_help (gchar * err)
" %1$s auto-presence <account name> <presence status> [<message>]\n"
" %1$s request <account name> <presence status> [<message>]\n"
" %1$s auto-connect <account name> [(on|off)]\n"
- " %1$s remove <account name>\n",
+ " %1$s remove <account name>\n"
+ " where <param> matches (int|uint|bool|string|path):<key>=<value>\n",
app_name);
if (err)
@@ -233,6 +234,12 @@ set_param (GHashTable *parameters,
g_value_set_string (gvalue, value);
ret = TRUE;
}
+ else if (strcmp (type, "path") == 0)
+ {
+ g_value_init (gvalue, DBUS_TYPE_G_OBJECT_PATH);
+ g_value_set_boxed (gvalue, value);
+ ret = TRUE;
+ }
if (ret)
g_hash_table_replace (parameters, g_strdup (key), gvalue);
@@ -268,6 +275,10 @@ show_param (gchar const *key, GValue *value)
type = "bool";
decoded = g_strdup (g_value_get_boolean (value) ? "true" : "false");
}
+ else if (G_VALUE_HOLDS (value, DBUS_TYPE_G_OBJECT_PATH)) {
+ type = "path";
+ decoded = g_value_dup_boxed (value);
+ }
else {
type = G_VALUE_TYPE_NAME (value);
decoded = g_strdup_value_contents (value);