executable: actually take the user set default if a certain scheme is
not found
This commit is contained in:
@@ -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);
|
char *result = g_key_file_get_locale_string(prefs, group, key, option, NULL);
|
||||||
|
|
||||||
if (result == NULL) {
|
if (result == NULL) {
|
||||||
if (def) {
|
// check for user set default
|
||||||
return g_strdup(def);
|
result = g_key_file_get_locale_string(prefs, group, key, "DEF", NULL);
|
||||||
} else {
|
if (result == NULL) {
|
||||||
return NULL;
|
if (def) {
|
||||||
|
// use hardcoded profanity default
|
||||||
|
return g_strdup(def);
|
||||||
|
} else {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
gchar**
|
gchar**
|
||||||
|
|||||||
Reference in New Issue
Block a user