diff options
-rw-r--r-- | util/mc-tool.c | 19 |
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); |