|
|
|
@ -23,10 +23,8 @@ static void saveUiStateInt(const char* key, int val) { |
|
|
|
gui_bridge_post_uasync_fn(chat_core_save_ui_state_trampoline, arg); |
|
|
|
gui_bridge_post_uasync_fn(chat_core_save_ui_state_trampoline, arg); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static void postChatSetting(const QString& configPath, const char* name, int val) { |
|
|
|
void postChatSetting(const QString& configPath, const char* name, int val) { |
|
|
|
/* persist to config file */ |
|
|
|
config_update_option(configPath, "chatserver", name, QString::number(val), CONFIG_UPDATE_REPLACE); |
|
|
|
config_update_option(configPath, "chat", name, QString::number(val), CONFIG_UPDATE_REPLACE); |
|
|
|
|
|
|
|
/* apply on-the-fly via bridge */ |
|
|
|
|
|
|
|
QByteArray v = QByteArray::number(val); |
|
|
|
QByteArray v = QByteArray::number(val); |
|
|
|
size_t nlen = strlen(name), vlen = (size_t)v.size(), total = nlen + 1 + vlen + 1; |
|
|
|
size_t nlen = strlen(name), vlen = (size_t)v.size(), total = nlen + 1 + vlen + 1; |
|
|
|
if (total > 256) return; |
|
|
|
if (total > 256) return; |
|
|
|
|