mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
cmd_url_*(): use gchar instead of char
This commit is contained in:
parent
1e2a288d80
commit
59f5b81b85
@ -8983,7 +8983,7 @@ cmd_url_open(ProfWin *window, const char *const command, gchar **args)
|
||||
}
|
||||
}
|
||||
|
||||
char **suffix_cmd_pref = prefs_get_string_list_with_option(PREF_URL_OPEN_CMD, NULL);
|
||||
gchar **suffix_cmd_pref = prefs_get_string_list_with_option(PREF_URL_OPEN_CMD, NULL);
|
||||
if (suffix != NULL) {
|
||||
gchar *lowercase_suffix = g_ascii_strdown(suffix, -1);
|
||||
g_strfreev(suffix_cmd_pref);
|
||||
@ -9158,7 +9158,7 @@ cmd_executable(ProfWin *window, const char *const command, gchar **args)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
char *str = g_strjoinv(" ", &args[3]);
|
||||
gchar *str = g_strjoinv(" ", &args[3]);
|
||||
const gchar* const list[] = {args[2], str, NULL};
|
||||
prefs_set_string_list_with_option(PREF_URL_OPEN_CMD, args[1], list);
|
||||
cons_show("`url open` command set to: %s for %s files", str, args[1]);
|
||||
@ -9169,7 +9169,7 @@ cmd_executable(ProfWin *window, const char *const command, gchar **args)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
char *str = g_strjoinv(" ", &args[2]);
|
||||
gchar *str = g_strjoinv(" ", &args[2]);
|
||||
prefs_set_string_with_option(PREF_URL_SAVE_CMD, args[1], str);
|
||||
cons_show("`url save` command set to: %s for scheme %s", str, args[1]);
|
||||
g_free(str);
|
||||
|
@ -536,7 +536,7 @@ prefs_get_string_with_option(preference_t pref, gchar *option)
|
||||
}
|
||||
}
|
||||
|
||||
char**
|
||||
gchar**
|
||||
prefs_get_string_list_with_option(preference_t pref, gchar *option)
|
||||
{
|
||||
const char *group = _get_group(pref);
|
||||
|
@ -316,7 +316,7 @@ gboolean prefs_get_boolean(preference_t pref);
|
||||
void prefs_set_boolean(preference_t pref, gboolean value);
|
||||
char* prefs_get_string(preference_t pref);
|
||||
char* prefs_get_string_with_option(preference_t pref, gchar *option);
|
||||
char **prefs_get_string_list_with_option(preference_t pref, gchar *option);
|
||||
gchar **prefs_get_string_list_with_option(preference_t pref, gchar *option);
|
||||
void prefs_free_string(char *pref);
|
||||
void prefs_set_string(preference_t pref, char *value);
|
||||
void prefs_set_string_with_option(preference_t pref, char *option, char *value);
|
||||
|
@ -2070,7 +2070,7 @@ cons_executable_setting(void)
|
||||
cons_show("Default '/avatar open' command (/executable avatar) : %s", avatar);
|
||||
prefs_free_string(avatar);
|
||||
|
||||
char **urlopen = prefs_get_string_list_with_option(PREF_URL_OPEN_CMD, "");
|
||||
gchar **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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user