mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-13 03:28:03 +00:00
move closing-tabs to local config, and add glgetstring to stack check
This commit is contained in:
@@ -314,19 +314,16 @@ class _GeneralState extends State<_General> {
|
||||
Widget other() {
|
||||
final children = [
|
||||
_OptionCheckBox(context, 'Confirm before closing multiple tabs',
|
||||
'enable-confirm-closing-tabs'),
|
||||
'enable-confirm-closing-tabs',
|
||||
isServer: false),
|
||||
_OptionCheckBox(context, 'Adaptive Bitrate', 'enable-abr')
|
||||
];
|
||||
if (Platform.isLinux) {
|
||||
children.add(Tooltip(
|
||||
message: translate('software_render_tip'),
|
||||
child: _OptionCheckBox(
|
||||
context,
|
||||
"Always use software rendering",
|
||||
'allow-always-software-render',
|
||||
),
|
||||
));
|
||||
}
|
||||
// though this is related to GUI, but opengl problem affects all users, so put in config rather than local
|
||||
children.add(Tooltip(
|
||||
message: translate('software_render_tip'),
|
||||
child: _OptionCheckBox(context, "Always use software rendering",
|
||||
'allow-always-software-render'),
|
||||
));
|
||||
if (bind.mainShowOption(key: 'allow-linux-headless')) {
|
||||
children.add(_OptionCheckBox(
|
||||
context, 'Allow linux headless', 'allow-linux-headless'));
|
||||
@@ -1666,15 +1663,22 @@ Widget _OptionCheckBox(BuildContext context, String label, String key,
|
||||
bool reverse = false,
|
||||
bool enabled = true,
|
||||
Icon? checkedIcon,
|
||||
bool? fakeValue}) {
|
||||
bool value = mainGetBoolOptionSync(key);
|
||||
bool? fakeValue,
|
||||
bool isServer = true}) {
|
||||
bool value =
|
||||
isServer ? mainGetBoolOptionSync(key) : mainGetLocalBoolOptionSync(key);
|
||||
if (reverse) value = !value;
|
||||
var ref = value.obs;
|
||||
onChanged(option) async {
|
||||
if (option != null) {
|
||||
if (reverse) option = !option;
|
||||
await mainSetBoolOption(key, option);
|
||||
ref.value = mainGetBoolOptionSync(key);
|
||||
isServer
|
||||
? await mainSetBoolOption(key, option)
|
||||
: await mainSetLocalBoolOption(key, option);
|
||||
ref.value = isServer
|
||||
? mainGetBoolOptionSync(key)
|
||||
: mainGetLocalBoolOptionSync(key);
|
||||
;
|
||||
update?.call();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user