about summary refs log tree commit diff stats
path: root/src/ui/console.c
diff options
context:
space:
mode:
authorPierre Mazière <pierre.maziere@gmx.com>2020-06-12 09:35:55 +0200
committerMichael Vetter <jubalh@iodoru.org>2020-06-25 15:03:20 +0200
commitf9961677aaa8d2713a80127f95a3770b33af4cef (patch)
tree53bb93b5e1660532c0740a01a238d5c3a87c7239 /src/ui/console.c
parentbcea9c863bc226caf969ce1aaa8479e98b577f70 (diff)
downloadprofani-tty-f9961677aaa8d2713a80127f95a3770b33af4cef.tar.gz
Display default value for /url associated commands
The display of commands associated with specific file
types and protocols will need to be implemented later,
but this requires to use private data of the GKeyFile
structure, which can be a maintainability issue on the
long term.

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
Diffstat (limited to 'src/ui/console.c')
-rw-r--r--src/ui/console.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/ui/console.c b/src/ui/console.c
index 8b6693e4..be137d7b 100644
--- a/src/ui/console.c
+++ b/src/ui/console.c
@@ -2067,12 +2067,16 @@ void
 cons_executable_setting(void)
 {
     char *avatar = prefs_get_string(PREF_AVATAR_CMD);
-    cons_show("Avatar command (/executable avatar)                                   : %s", avatar);
-    prefs_free_string(avatar);
+    cons_show("'/avatar' command (/executable avatar)                                   : %s", avatar);
+    g_free(avatar);
 
-    char *exec = prefs_get_string(PREF_URL_OPEN_CMD);
-    cons_show("urlopen command (/executable urlopen)                                 : %s", exec);
-    prefs_free_string(exec);
+    char **urlopen = prefs_get_string_list_with_option(PREF_URL_OPEN_CMD, "");
+    cons_show("Default '/url open' command (/executable urlopen)                        : %s", urlopen[1]);
+    g_strfreev(urlopen);
+
+    char *urlsave = prefs_get_string(PREF_URL_SAVE_CMD);
+    cons_show("Default '/url save' command (/executable urlsave)                        : %s", urlsave);
+    g_free(urlsave);
 }
 
 void