multi flutter ui sessions, refact 'Show displays as individual windows'
Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
parent
e363cd9813
commit
b52cf070f5
@ -2590,15 +2590,6 @@ String getDesktopTabLabel(String peerId, String alias) {
|
||||
return label;
|
||||
}
|
||||
|
||||
String getChooseDisplayBehavior() {
|
||||
var current = bind.mainGetOptionSync(key: kKeyChooseDisplayBehavior);
|
||||
if (![kChooseDisplayBehaviorSwitch, kChooseDisplayBehaviorOpen]
|
||||
.contains(current)) {
|
||||
current = kChooseDisplayBehaviorOpen;
|
||||
}
|
||||
return current;
|
||||
}
|
||||
|
||||
sessionRefreshVideo(SessionID sessionId, PeerInfo pi) async {
|
||||
if (pi.currentDisplay == kAllDisplayValue) {
|
||||
for (int i = 0; i < pi.displays.length; i++) {
|
||||
@ -2609,5 +2600,7 @@ sessionRefreshVideo(SessionID sessionId, PeerInfo pi) async {
|
||||
}
|
||||
}
|
||||
|
||||
bool get isChooseDisplayToOpen =>
|
||||
getChooseDisplayBehavior() != kChooseDisplayBehaviorSwitch;
|
||||
bool isChooseDisplayToOpenInNewWindow(PeerInfo pi, SessionID sessionId) =>
|
||||
pi.isSupportMultiDisplay &&
|
||||
bind.sessionGetDisplaysAsIndividualWindows(sessionId: sessionId) == 'Y';
|
||||
|
||||
|
@ -515,5 +515,23 @@ Future<List<TToggleMenu>> toolbarDisplayToggle(
|
||||
},
|
||||
child: Text(translate('Swap control-command key'))));
|
||||
}
|
||||
|
||||
if (pi.isSupportMultiDisplay &&
|
||||
PrivacyModeState.find(id).isFalse &&
|
||||
pi.displaysCount.value > 1 &&
|
||||
bind.mainGetUserDefaultOption(key: kKeyShowMonitorsToolbar) == 'Y') {
|
||||
final value =
|
||||
bind.sessionGetDisplaysAsIndividualWindows(sessionId: ffi.sessionId) ==
|
||||
'Y';
|
||||
v.add(TToggleMenu(
|
||||
value: value,
|
||||
onChanged: (value) {
|
||||
if (value == null) return;
|
||||
bind.sessionSetDisplaysAsIndividualWindows(
|
||||
sessionId: sessionId, value: value ? 'Y' : '');
|
||||
},
|
||||
child: Text(translate('Show displays as individual windows'))));
|
||||
}
|
||||
|
||||
return v;
|
||||
}
|
||||
|
@ -66,9 +66,8 @@ const int kWindowMainId = 0;
|
||||
const String kPointerEventKindTouch = "touch";
|
||||
const String kPointerEventKindMouse = "mouse";
|
||||
|
||||
const String kKeyChooseDisplayBehavior = 'choose-display-behavior';
|
||||
const String kChooseDisplayBehaviorSwitch = 'switch';
|
||||
const String kChooseDisplayBehaviorOpen = 'open';
|
||||
const String kKeyShowDisplaysAsIndividualWindows = 'displays_as_individual_windows';
|
||||
const String kKeyShowMonitorsToolbar = 'show_monitors_toolbar';
|
||||
|
||||
// the executable name of the portable version
|
||||
const String kEnvPortableExecutable = "RUSTDESK_APPNAME";
|
||||
|
@ -11,7 +11,6 @@ import 'package:flutter_hbb/consts.dart';
|
||||
import 'package:flutter_hbb/desktop/pages/desktop_home_page.dart';
|
||||
import 'package:flutter_hbb/desktop/pages/desktop_tab_page.dart';
|
||||
import 'package:flutter_hbb/models/platform_model.dart';
|
||||
import 'package:flutter_hbb/models/desktop_render_texture.dart';
|
||||
import 'package:flutter_hbb/models/server_model.dart';
|
||||
import 'package:flutter_hbb/plugin/manager.dart';
|
||||
import 'package:flutter_hbb/plugin/widgets/desktop_settings.dart';
|
||||
@ -1124,7 +1123,6 @@ class _DisplayState extends State<_Display> {
|
||||
controller: scrollController,
|
||||
physics: DraggableNeverScrollableScrollPhysics(),
|
||||
children: [
|
||||
chooseDisplay(context),
|
||||
viewStyle(context),
|
||||
scrollStyle(context),
|
||||
imageQuality(context),
|
||||
@ -1133,29 +1131,6 @@ class _DisplayState extends State<_Display> {
|
||||
]).marginOnly(bottom: _kListViewBottomMargin));
|
||||
}
|
||||
|
||||
Widget chooseDisplay(BuildContext context) {
|
||||
if (!useTextureRender) return const Offstage();
|
||||
|
||||
var current = getChooseDisplayBehavior();
|
||||
onChanged(String value) {
|
||||
bind.mainSetOption(key: kKeyChooseDisplayBehavior, value: value);
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
return _Card(title: 'Choose display behavior', children: [
|
||||
_Radio<String>(context,
|
||||
value: kChooseDisplayBehaviorSwitch,
|
||||
groupValue: current,
|
||||
label: 'Switch display',
|
||||
onChanged: onChanged),
|
||||
_Radio<String>(context,
|
||||
value: kChooseDisplayBehaviorOpen,
|
||||
groupValue: current,
|
||||
label: 'Open in new window',
|
||||
onChanged: onChanged),
|
||||
]);
|
||||
}
|
||||
|
||||
Widget viewStyle(BuildContext context) {
|
||||
final key = 'view_style';
|
||||
onChanged(String value) async {
|
||||
@ -1314,7 +1289,7 @@ class _DisplayState extends State<_Display> {
|
||||
Widget other(BuildContext context) {
|
||||
return _Card(title: 'Other Default Options', children: [
|
||||
otherRow('View Mode', 'view_only'),
|
||||
otherRow('show_monitors_tip', 'show_monitors_toolbar'),
|
||||
otherRow('show_monitors_tip', kKeyShowMonitorsToolbar),
|
||||
otherRow('Collapse toolbar', 'collapse_toolbar'),
|
||||
otherRow('Show remote cursor', 'show_remote_cursor'),
|
||||
otherRow('Zoom cursor', 'zoom-cursor'),
|
||||
@ -1325,6 +1300,8 @@ class _DisplayState extends State<_Display> {
|
||||
otherRow('Lock after session end', 'lock_after_session_end'),
|
||||
otherRow('Privacy mode', 'privacy_mode'),
|
||||
otherRow('Reverse mouse wheel', 'reverse_mouse_wheel'),
|
||||
otherRow('Show displays as individual windows',
|
||||
kKeyShowDisplaysAsIndividualWindows),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -598,7 +598,7 @@ class _MonitorMenu extends StatelessWidget {
|
||||
}) : super(key: key);
|
||||
|
||||
bool get showMonitorsToolbar =>
|
||||
bind.mainGetUserDefaultOption(key: 'show_monitors_toolbar') == 'Y';
|
||||
bind.mainGetUserDefaultOption(key: kKeyShowMonitorsToolbar) == 'Y';
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) =>
|
||||
@ -614,13 +614,40 @@ class _MonitorMenu extends StatelessWidget {
|
||||
menuStyle: MenuStyle(
|
||||
padding:
|
||||
MaterialStatePropertyAll(EdgeInsets.symmetric(horizontal: 6))),
|
||||
menuChildren: [Row(children: buildMonitorList(false))]);
|
||||
menuChildren: [buildMonitorSubmenuWidget()]);
|
||||
}
|
||||
|
||||
Widget buildMultiMonitorMenu() {
|
||||
return Row(children: buildMonitorList(true));
|
||||
}
|
||||
|
||||
Widget buildMonitorSubmenuWidget() {
|
||||
final pi = ffi.ffiModel.pi;
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Row(children: buildMonitorList(false)),
|
||||
pi.isSupportMultiDisplay ? Divider() : Offstage(),
|
||||
pi.isSupportMultiDisplay ? chooseDisplayBehavior() : Offstage(),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget chooseDisplayBehavior() {
|
||||
final value =
|
||||
bind.sessionGetDisplaysAsIndividualWindows(sessionId: ffi.sessionId) ==
|
||||
'Y';
|
||||
return CkbMenuButton(
|
||||
value: value,
|
||||
onChanged: (value) async {
|
||||
if (value == null) return;
|
||||
await bind.sessionSetDisplaysAsIndividualWindows(
|
||||
sessionId: ffi.sessionId, value: value ? 'Y' : '');
|
||||
},
|
||||
ffi: ffi,
|
||||
child: Text(translate('Show displays as individual windows')));
|
||||
}
|
||||
|
||||
List<Widget> buildMonitorList(bool isMulti) {
|
||||
final List<Widget> monitorList = [];
|
||||
final pi = ffi.ffiModel.pi;
|
||||
@ -746,7 +773,7 @@ class _MonitorMenu extends StatelessWidget {
|
||||
_menuDismissCallback(ffi);
|
||||
RxInt display = CurrentDisplayState.find(id);
|
||||
if (display.value != i) {
|
||||
if (pi.isSupportMultiDisplay) {
|
||||
if (isChooseDisplayToOpenInNewWindow(pi, ffi.sessionId)) {
|
||||
openMonitorInNewTabOrWindow(i, pi);
|
||||
} else {
|
||||
openMonitorInTheSameTab(i, pi);
|
||||
|
@ -430,7 +430,7 @@ class FfiModel with ChangeNotifier {
|
||||
final curDisplay = int.parse(evt['display']);
|
||||
|
||||
// The message should be handled by the another UI session.
|
||||
if (_pi.isSupportMultiDisplay) {
|
||||
if (isChooseDisplayToOpenInNewWindow(_pi, sessionId)) {
|
||||
if (curDisplay != _pi.currentDisplay) {
|
||||
return;
|
||||
}
|
||||
@ -2211,8 +2211,7 @@ class PeerInfo with ChangeNotifier {
|
||||
bool get isWayland => platformDdditions['is_wayland'] == true;
|
||||
bool get isHeadless => platformDdditions['headless'] == true;
|
||||
|
||||
bool get isSupportMultiDisplay =>
|
||||
isDesktop && isSupportMultiUiSession && isChooseDisplayToOpen;
|
||||
bool get isSupportMultiDisplay => isDesktop && isSupportMultiUiSession;
|
||||
|
||||
bool get cursorEmbedded => tryGetDisplay()?.cursorEmbedded ?? false;
|
||||
|
||||
|
@ -284,6 +284,12 @@ pub struct PeerConfig {
|
||||
skip_serializing_if = "String::is_empty"
|
||||
)]
|
||||
pub reverse_mouse_wheel: String,
|
||||
#[serde(
|
||||
default = "PeerConfig::default_displays_as_individual_windows",
|
||||
deserialize_with = "PeerConfig::deserialize_displays_as_individual_windows",
|
||||
skip_serializing_if = "String::is_empty"
|
||||
)]
|
||||
pub displays_as_individual_windows: String,
|
||||
|
||||
#[serde(
|
||||
default,
|
||||
@ -328,6 +334,7 @@ impl Default for PeerConfig {
|
||||
keyboard_mode: Default::default(),
|
||||
view_only: Default::default(),
|
||||
reverse_mouse_wheel: Self::default_reverse_mouse_wheel(),
|
||||
displays_as_individual_windows: Self::default_displays_as_individual_windows(),
|
||||
custom_resolutions: Default::default(),
|
||||
options: Self::default_options(),
|
||||
ui_flutter: Default::default(),
|
||||
@ -1144,6 +1151,11 @@ impl PeerConfig {
|
||||
deserialize_reverse_mouse_wheel,
|
||||
UserDefaultConfig::read().get("reverse_mouse_wheel")
|
||||
);
|
||||
serde_field_string!(
|
||||
default_displays_as_individual_windows,
|
||||
deserialize_displays_as_individual_windows,
|
||||
UserDefaultConfig::read().get("displays_as_individual_windows")
|
||||
);
|
||||
|
||||
fn default_custom_image_quality() -> Vec<i32> {
|
||||
let f: f64 = UserDefaultConfig::read()
|
||||
|
@ -1207,6 +1207,17 @@ impl LoginConfigHandler {
|
||||
self.save_config(config);
|
||||
}
|
||||
|
||||
/// Save reverse mouse wheel ("", "Y") to the current config.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `value` - The "displays_as_individual_windows" value ("", "Y").
|
||||
pub fn save_displays_as_individual_windows(&mut self, value: String) {
|
||||
let mut config = self.load_config();
|
||||
config.displays_as_individual_windows = value;
|
||||
self.save_config(config);
|
||||
}
|
||||
|
||||
/// Save scroll style to the current config.
|
||||
///
|
||||
/// # Arguments
|
||||
|
@ -339,6 +339,20 @@ pub fn session_set_reverse_mouse_wheel(session_id: SessionID, value: String) {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn session_get_displays_as_individual_windows(session_id: SessionID) -> SyncReturn<Option<String>> {
|
||||
if let Some(session) = sessions::get_session_by_session_id(&session_id) {
|
||||
SyncReturn(Some(session.get_displays_as_individual_windows()))
|
||||
} else {
|
||||
SyncReturn(None)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn session_set_displays_as_individual_windows(session_id: SessionID, value: String) {
|
||||
if let Some(session) = sessions::get_session_by_session_id(&session_id) {
|
||||
session.save_displays_as_individual_windows(value);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn session_get_custom_image_quality(session_id: SessionID) -> Option<Vec<i32>> {
|
||||
if let Some(session) = sessions::get_session_by_session_id(&session_id) {
|
||||
Some(session.get_custom_image_quality())
|
||||
|
@ -562,8 +562,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("display_is_plugged_out_msg", ""),
|
||||
("No displays", ""),
|
||||
("elevated_switch_display_msg", ""),
|
||||
("Choose display behavior", ""),
|
||||
("Switch display", ""),
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -562,8 +562,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("display_is_plugged_out_msg", ""),
|
||||
("No displays", ""),
|
||||
("elevated_switch_display_msg", ""),
|
||||
("Choose display behavior", ""),
|
||||
("Switch display", ""),
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -562,8 +562,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("display_is_plugged_out_msg", "显示器被拔出,切换到第一个显示器。"),
|
||||
("No displays", "没有显示器。"),
|
||||
("elevated_switch_display_msg", "切换到主显示器,因为提权后,不支持多显示器画面。"),
|
||||
("Choose display behavior", "选择显示器的行为"),
|
||||
("Switch display", "切换显示器"),
|
||||
("Open in new window", "在新的窗口中打开"),
|
||||
("Show displays as individual windows", "在单个窗口中打开显示器"),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -562,8 +562,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("display_is_plugged_out_msg", ""),
|
||||
("No displays", ""),
|
||||
("elevated_switch_display_msg", ""),
|
||||
("Choose display behavior", ""),
|
||||
("Switch display", ""),
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -562,8 +562,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("display_is_plugged_out_msg", ""),
|
||||
("No displays", ""),
|
||||
("elevated_switch_display_msg", ""),
|
||||
("Choose display behavior", ""),
|
||||
("Switch display", ""),
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -562,8 +562,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("display_is_plugged_out_msg", ""),
|
||||
("No displays", ""),
|
||||
("elevated_switch_display_msg", ""),
|
||||
("Choose display behavior", ""),
|
||||
("Switch display", ""),
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -562,8 +562,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("display_is_plugged_out_msg", ""),
|
||||
("No displays", ""),
|
||||
("elevated_switch_display_msg", ""),
|
||||
("Choose display behavior", ""),
|
||||
("Switch display", ""),
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -562,8 +562,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("display_is_plugged_out_msg", ""),
|
||||
("No displays", ""),
|
||||
("elevated_switch_display_msg", ""),
|
||||
("Choose display behavior", ""),
|
||||
("Switch display", ""),
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -562,8 +562,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("display_is_plugged_out_msg", ""),
|
||||
("No displays", ""),
|
||||
("elevated_switch_display_msg", ""),
|
||||
("Choose display behavior", ""),
|
||||
("Switch display", ""),
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -562,8 +562,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("display_is_plugged_out_msg", ""),
|
||||
("No displays", ""),
|
||||
("elevated_switch_display_msg", ""),
|
||||
("Choose display behavior", ""),
|
||||
("Switch display", ""),
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -562,8 +562,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("display_is_plugged_out_msg", ""),
|
||||
("No displays", ""),
|
||||
("elevated_switch_display_msg", ""),
|
||||
("Choose display behavior", ""),
|
||||
("Switch display", ""),
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -562,8 +562,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("display_is_plugged_out_msg", ""),
|
||||
("No displays", ""),
|
||||
("elevated_switch_display_msg", ""),
|
||||
("Choose display behavior", ""),
|
||||
("Switch display", ""),
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -562,8 +562,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("display_is_plugged_out_msg", ""),
|
||||
("No displays", ""),
|
||||
("elevated_switch_display_msg", ""),
|
||||
("Choose display behavior", ""),
|
||||
("Switch display", ""),
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -563,8 +563,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("display_is_plugged_out_msg", ""),
|
||||
("No displays", ""),
|
||||
("elevated_switch_display_msg", ""),
|
||||
("Choose display behavior", ""),
|
||||
("Switch display", ""),
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -562,8 +562,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("display_is_plugged_out_msg", ""),
|
||||
("No displays", ""),
|
||||
("elevated_switch_display_msg", ""),
|
||||
("Choose display behavior", ""),
|
||||
("Switch display", ""),
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -562,8 +562,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("display_is_plugged_out_msg", ""),
|
||||
("No displays", ""),
|
||||
("elevated_switch_display_msg", ""),
|
||||
("Choose display behavior", ""),
|
||||
("Switch display", ""),
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -562,8 +562,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("display_is_plugged_out_msg", ""),
|
||||
("No displays", ""),
|
||||
("elevated_switch_display_msg", ""),
|
||||
("Choose display behavior", ""),
|
||||
("Switch display", ""),
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -562,8 +562,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("display_is_plugged_out_msg", ""),
|
||||
("No displays", ""),
|
||||
("elevated_switch_display_msg", ""),
|
||||
("Choose display behavior", ""),
|
||||
("Switch display", ""),
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -562,8 +562,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("display_is_plugged_out_msg", ""),
|
||||
("No displays", ""),
|
||||
("elevated_switch_display_msg", ""),
|
||||
("Choose display behavior", ""),
|
||||
("Switch display", ""),
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -562,8 +562,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("display_is_plugged_out_msg", ""),
|
||||
("No displays", ""),
|
||||
("elevated_switch_display_msg", ""),
|
||||
("Choose Display Behavior", ""),
|
||||
("Switch display", ""),
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -562,8 +562,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("display_is_plugged_out_msg", ""),
|
||||
("No displays", ""),
|
||||
("elevated_switch_display_msg", ""),
|
||||
("Choose display behavior", ""),
|
||||
("Switch display", ""),
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -562,8 +562,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("display_is_plugged_out_msg", ""),
|
||||
("No displays", ""),
|
||||
("elevated_switch_display_msg", ""),
|
||||
("Choose display behavior", ""),
|
||||
("Switch display", ""),
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -562,8 +562,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("display_is_plugged_out_msg", ""),
|
||||
("No displays", ""),
|
||||
("elevated_switch_display_msg", ""),
|
||||
("Choose display behavior", ""),
|
||||
("Switch display", ""),
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -562,8 +562,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("display_is_plugged_out_msg", ""),
|
||||
("No displays", ""),
|
||||
("elevated_switch_display_msg", ""),
|
||||
("Choose display behavior", ""),
|
||||
("Switch display", ""),
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -562,8 +562,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("display_is_plugged_out_msg", ""),
|
||||
("No displays", ""),
|
||||
("elevated_switch_display_msg", ""),
|
||||
("Choose display behavior", ""),
|
||||
("Switch display", ""),
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -562,8 +562,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("display_is_plugged_out_msg", ""),
|
||||
("No displays", ""),
|
||||
("elevated_switch_display_msg", ""),
|
||||
("Choose display behavior", ""),
|
||||
("Switch display", ""),
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -562,8 +562,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("display_is_plugged_out_msg", ""),
|
||||
("No displays", ""),
|
||||
("elevated_switch_display_msg", ""),
|
||||
("Choose display behavior", ""),
|
||||
("Switch display", ""),
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -562,8 +562,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("display_is_plugged_out_msg", ""),
|
||||
("No displays", ""),
|
||||
("elevated_switch_display_msg", ""),
|
||||
("Choose display behavior", ""),
|
||||
("Switch display", ""),
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -562,8 +562,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("display_is_plugged_out_msg", ""),
|
||||
("No displays", ""),
|
||||
("elevated_switch_display_msg", ""),
|
||||
("Choose display behavior", ""),
|
||||
("Switch display", ""),
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -562,8 +562,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("display_is_plugged_out_msg", ""),
|
||||
("No displays", ""),
|
||||
("elevated_switch_display_msg", ""),
|
||||
("Choose display behavior", ""),
|
||||
("Switch display", ""),
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -562,8 +562,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("display_is_plugged_out_msg", ""),
|
||||
("No displays", ""),
|
||||
("elevated_switch_display_msg", ""),
|
||||
("Choose display behavior", ""),
|
||||
("Switch display", ""),
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -562,8 +562,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("display_is_plugged_out_msg", ""),
|
||||
("No displays", ""),
|
||||
("elevated_switch_display_msg", ""),
|
||||
("Choose display behavior", ""),
|
||||
("Switch display", ""),
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -562,8 +562,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("display_is_plugged_out_msg", ""),
|
||||
("No displays", ""),
|
||||
("elevated_switch_display_msg", ""),
|
||||
("Choose display behavior", ""),
|
||||
("Switch display", ""),
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -562,8 +562,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("display_is_plugged_out_msg", ""),
|
||||
("No displays", ""),
|
||||
("elevated_switch_display_msg", ""),
|
||||
("Choose display behavior", ""),
|
||||
("Switch display", ""),
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -562,8 +562,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("display_is_plugged_out_msg", ""),
|
||||
("No displays", ""),
|
||||
("elevated_switch_display_msg", ""),
|
||||
("Choose display behavior", ""),
|
||||
("Switch display", ""),
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -562,8 +562,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("display_is_plugged_out_msg", ""),
|
||||
("No displays", ""),
|
||||
("elevated_switch_display_msg", ""),
|
||||
("Choose display behavior", ""),
|
||||
("Switch display", ""),
|
||||
("Open in new window", ""),
|
||||
("Show displays as individual windows", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -236,10 +236,18 @@ impl<T: InvokeUiSession> Session<T> {
|
||||
self.lc.read().unwrap().reverse_mouse_wheel.clone()
|
||||
}
|
||||
|
||||
pub fn get_displays_as_individual_windows(&self) -> String {
|
||||
self.lc.read().unwrap().displays_as_individual_windows.clone()
|
||||
}
|
||||
|
||||
pub fn save_reverse_mouse_wheel(&self, value: String) {
|
||||
self.lc.write().unwrap().save_reverse_mouse_wheel(value);
|
||||
}
|
||||
|
||||
pub fn save_displays_as_individual_windows(&self, value: String) {
|
||||
self.lc.write().unwrap().save_displays_as_individual_windows(value);
|
||||
}
|
||||
|
||||
pub fn save_view_style(&self, value: String) {
|
||||
self.lc.write().unwrap().save_view_style(value);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user