1
1
mirror of https://github.com/profanity-im/profanity.git synced 2025-01-03 14:57:42 -05:00

executable: actually take the user set default if a certain scheme is

not found
This commit is contained in:
Michael Vetter 2020-07-02 10:59:45 +02:00
parent 7de83217c4
commit 6ada720e18

View File

@ -526,14 +526,19 @@ prefs_get_string_with_option(preference_t pref, gchar *option)
char *result = g_key_file_get_locale_string(prefs, group, key, option, NULL);
if (result == NULL) {
if (def) {
return g_strdup(def);
} else {
return NULL;
// check for user set default
result = g_key_file_get_locale_string(prefs, group, key, "DEF", NULL);
if (result == NULL) {
if (def) {
// use hardcoded profanity default
return g_strdup(def);
} else {
return NULL;
}
}
} else {
return result;
}
return result;
}
gchar**