From 01e8f01ed3faab41a25f2f05f6ea49c8464ea9ad Mon Sep 17 00:00:00 2001 From: William Wennerström Date: Fri, 18 Dec 2020 16:05:11 +0100 Subject: Add `/executable (urlsave|urlopen)` migrations --- src/command/cmd_defs.c | 10 +++++----- src/command/cmd_funcs.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/command') diff --git a/src/command/cmd_defs.c b/src/command/cmd_defs.c index e876b647..94633f03 100644 --- a/src/command/cmd_defs.c +++ b/src/command/cmd_defs.c @@ -2510,9 +2510,9 @@ static struct cmd_t command_defs[] = { "Configure executable that should be called upon a certain command.") CMD_ARGS( { "avatar", "Set executable that is run by /avatar open. Use your favorite image viewer." }, - { "urlopen set", "Set executable that is run by /url open. It may be your favorite browser or a specific viewer." }, + { "urlopen set", "Set executable that is run by /url open. Takes a command template that replaces %u and %p with the URL and path respectively." }, { "urlopen default", "Restore to default settings." }, - { "urlsave set", "Set executable that is run by /url save. It may be your favorite downloader.'" }, + { "urlsave set", "Set executable that is run by /url save. Takes a command template that replaces %u and %p with the URL and path respectively." }, { "urlsave default", "Use the built-in download method for saving." }) CMD_EXAMPLES( "/executable avatar xdg-open", @@ -2853,9 +2853,9 @@ command_mangen(void) mkdir_recursive("docs"); char* header = NULL; - GDateTime *now = g_date_time_new_now_local(); - gchar *date = g_date_time_format(now, "%F"); - if (asprintf(&header, ".TH man 1 \"%s\" \""PACKAGE_VERSION"\" \"Profanity XMPP client\"\n", date) == -1) { + GDateTime* now = g_date_time_new_now_local(); + gchar* date = g_date_time_format(now, "%F"); + if (asprintf(&header, ".TH man 1 \"%s\" \"" PACKAGE_VERSION "\" \"Profanity XMPP client\"\n", date) == -1) { // TODO: error return; } diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index 9784f388..38b45a57 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -9263,8 +9263,8 @@ cmd_executable_urlopen(ProfWin* window, const char* const command, gchar** args) g_free(str); } else if (g_strcmp0(args[1], "default") == 0) { - prefs_set_string(PREF_URL_SAVE_CMD, NULL); - gchar* def = prefs_get_string(PREF_URL_SAVE_CMD); + prefs_set_string(PREF_URL_OPEN_CMD, NULL); + gchar* def = prefs_get_string(PREF_URL_OPEN_CMD); cons_show("`url open` command set to invoke %s (default)", def); g_free(def); } else { -- cgit 1.4.1-2-gfad0