about summary refs log tree commit diff stats
path: root/src/ui
diff options
context:
space:
mode:
authorWilliam Wennerström <william@wstrm.dev>2020-12-08 20:01:17 +0100
committerWilliam Wennerström <william@wstrm.dev>2020-12-08 20:01:17 +0100
commitd7848e38bc2d916f88e889352f337a5c617fb26d (patch)
tree11faca1055e3bd9afb12361ebdf64e0338fa3deb /src/ui
parent7f0165a91278647e9ddb72890e58a6db6b265a5d (diff)
downloadprofani-tty-d7848e38bc2d916f88e889352f337a5c617fb26d.tar.gz
Remove scheme and filetype matching for url (save|open)
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/console.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ui/console.c b/src/ui/console.c
index 623556f7..306b13d5 100644
--- a/src/ui/console.c
+++ b/src/ui/console.c
@@ -2068,17 +2068,20 @@ cons_correction_setting(void)
 void
 cons_executable_setting(void)
 {
-    char* avatar = prefs_get_string(PREF_AVATAR_CMD);
+    gchar* avatar = prefs_get_string(PREF_AVATAR_CMD);
     cons_show("Default '/avatar open' command (/executable avatar)                      : %s", avatar);
     g_free(avatar);
 
     //TODO: there needs to be a way to get all the "locales"/schemes so we can
     //display the default openers for all filetypes
-    char* urlopen = prefs_get_string_with_option(PREF_URL_OPEN_CMD, "");
+    gchar* urlopen = prefs_get_string(PREF_URL_OPEN_CMD);
     cons_show("Default '/url open' command (/executable urlopen)                        : %s", urlopen);
     g_free(urlopen);
 
-    char* urlsave = prefs_get_string(PREF_URL_SAVE_CMD);
+    gchar* urlsave = prefs_get_string(PREF_URL_SAVE_CMD);
+    if (urlsave == NULL) {
+        urlsave = g_strdup("(built-in)");
+    }
     cons_show("Default '/url save' command (/executable urlsave)                        : %s", urlsave);
     g_free(urlsave);
 }