mirror of
https://github.com/irssi/irssi.git
synced 2026-08-11 04:43:34 +02:00
Settings are now stored in module-specific blocks. Irssi complains
about all unknown settings that are found inside those blocks. Left backwards compatibility kludge which should be removed in 0.7.98. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1004 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
78b3fb8d4a
commit
aac80846b8
9 changed files with 196 additions and 48 deletions
|
|
@ -55,11 +55,11 @@ static void set_print(SETTINGS_REC *rec)
|
|||
static void set_boolean(const char *key, const char *value)
|
||||
{
|
||||
if (g_strcasecmp(value, "ON") == 0)
|
||||
iconfig_set_bool("settings", key, TRUE);
|
||||
settings_set_bool(key, TRUE);
|
||||
else if (g_strcasecmp(value, "OFF") == 0)
|
||||
iconfig_set_bool("settings", key, FALSE);
|
||||
settings_set_bool(key, FALSE);
|
||||
else if (g_strcasecmp(value, "TOGGLE") == 0)
|
||||
iconfig_set_bool("settings", key, !settings_get_bool(key));
|
||||
settings_set_bool(key, !settings_get_bool(key));
|
||||
else
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, IRCTXT_NOT_TOGGLE);
|
||||
}
|
||||
|
|
@ -102,10 +102,10 @@ static void cmd_set(char *data)
|
|||
set_boolean(key, clear ? FALSE : value);
|
||||
break;
|
||||
case SETTING_TYPE_INT:
|
||||
iconfig_set_int("settings", key, clear ? 0 : atoi(value));
|
||||
settings_set_int(key, clear ? 0 : atoi(value));
|
||||
break;
|
||||
case SETTING_TYPE_STRING:
|
||||
iconfig_set_str("settings", key, clear ? "" : value);
|
||||
settings_set_str(key, clear ? "" : value);
|
||||
break;
|
||||
}
|
||||
signal_emit("setup changed", 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue