mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Move url/avatar commands from logging to exectuables section
c56d530b67
by peetah moves:
urlopen.cmd from the 'logging' to a new 'executables' section in profrc
avatar.cmd from the 'logging' to a new 'executables' section in profrc
We need to adapt this so that users don't have to set the setting again
themselves.
This commit is contained in:
parent
2b5160a351
commit
ec7e635e75
@ -161,6 +161,20 @@ static void _prefs_load(void)
|
||||
}
|
||||
}
|
||||
|
||||
// 0.9.0 introduced /urlopen. It was saved under "logging" section. Now we have a new "executables" section.
|
||||
if (g_key_file_has_key(prefs, PREF_GROUP_LOGGING, "urlopen.cmd", NULL)) {
|
||||
char *value = g_key_file_get_string(prefs, PREF_GROUP_LOGGING, "urlopen.cmd", NULL);
|
||||
g_key_file_set_string(prefs, PREF_GROUP_EXECUTABLES, "url.open.cmd", value);
|
||||
g_key_file_remove_key(prefs, PREF_GROUP_LOGGING, "urlopen.cmd", NULL);
|
||||
}
|
||||
|
||||
// 0.9.0 introduced configurable /avatar. It was saved under "logging" section. Now we have a new "executables" section.
|
||||
if (g_key_file_has_key(prefs, PREF_GROUP_LOGGING, "avatar.cmd", NULL)) {
|
||||
char *value = g_key_file_get_string(prefs, PREF_GROUP_LOGGING, "avatar.cmd", NULL);
|
||||
g_key_file_set_string(prefs, PREF_GROUP_EXECUTABLES, "avatar.cmd", value);
|
||||
g_key_file_remove_key(prefs, PREF_GROUP_LOGGING, "avatar.cmd", NULL);
|
||||
}
|
||||
|
||||
_save_prefs();
|
||||
|
||||
boolean_choice_ac = autocomplete_new();
|
||||
|
Loading…
Reference in New Issue
Block a user