commit
c308f677f2
@ -1318,7 +1318,7 @@ class _DisplayState extends State<_Display> {
|
|||||||
|
|
||||||
Widget other(BuildContext context) {
|
Widget other(BuildContext context) {
|
||||||
return _Card(title: 'Other Default Options', children: [
|
return _Card(title: 'Other Default Options', children: [
|
||||||
otherRow('View Mode', 'view-only'),
|
otherRow('View Mode', 'view_only'),
|
||||||
otherRow('show_monitors_tip', 'show_monitors_toolbar'),
|
otherRow('show_monitors_tip', 'show_monitors_toolbar'),
|
||||||
otherRow('Show remote cursor', 'show_remote_cursor'),
|
otherRow('Show remote cursor', 'show_remote_cursor'),
|
||||||
otherRow('Zoom cursor', 'zoom-cursor'),
|
otherRow('Zoom cursor', 'zoom-cursor'),
|
||||||
|
@ -139,9 +139,8 @@ class _RemotePageState extends State<RemotePage>
|
|||||||
_ffi.ffiModel.updateEventListener(widget.id);
|
_ffi.ffiModel.updateEventListener(widget.id);
|
||||||
_ffi.qualityMonitorModel.checkShowQualityMonitor(widget.id);
|
_ffi.qualityMonitorModel.checkShowQualityMonitor(widget.id);
|
||||||
// Session option should be set after models.dart/FFI.start
|
// Session option should be set after models.dart/FFI.start
|
||||||
// _showRemoteCursor has been set by setViewOnly
|
_showRemoteCursor.value = bind.sessionGetToggleOptionSync(
|
||||||
_ffi.ffiModel.setViewOnly(widget.id,
|
id: widget.id, arg: 'show-remote-cursor');
|
||||||
bind.sessionGetToggleOptionSync(id: widget.id, arg: 'view-only'));
|
|
||||||
_zoomCursor.value =
|
_zoomCursor.value =
|
||||||
bind.sessionGetToggleOptionSync(id: widget.id, arg: 'zoom-cursor');
|
bind.sessionGetToggleOptionSync(id: widget.id, arg: 'zoom-cursor');
|
||||||
DesktopMultiWindow.addListener(this);
|
DesktopMultiWindow.addListener(this);
|
||||||
|
@ -385,7 +385,6 @@ class _RemoteMenubarState extends State<RemoteMenubar> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildToolbar(BuildContext context) {
|
Widget _buildToolbar(BuildContext context) {
|
||||||
final ffiModel = Provider.of<FfiModel>(context);
|
|
||||||
final List<Widget> toolbarItems = [];
|
final List<Widget> toolbarItems = [];
|
||||||
if (!isWebDesktop) {
|
if (!isWebDesktop) {
|
||||||
toolbarItems.add(_PinMenu(state: widget.state));
|
toolbarItems.add(_PinMenu(state: widget.state));
|
||||||
@ -397,7 +396,7 @@ class _RemoteMenubarState extends State<RemoteMenubar> {
|
|||||||
if (PrivacyModeState.find(widget.id).isFalse &&
|
if (PrivacyModeState.find(widget.id).isFalse &&
|
||||||
stateGlobal.displaysCount.value > 1) {
|
stateGlobal.displaysCount.value > 1) {
|
||||||
toolbarItems.add(
|
toolbarItems.add(
|
||||||
bind.mainGetUserDefaultOption(key: 'show_monitors_menubar') == 'Y'
|
bind.mainGetUserDefaultOption(key: 'show_monitors_toolbar') == 'Y'
|
||||||
? _MultiMonitorMenu(id: widget.id, ffi: widget.ffi)
|
? _MultiMonitorMenu(id: widget.id, ffi: widget.ffi)
|
||||||
: _MonitorMenu(id: widget.id, ffi: widget.ffi),
|
: _MonitorMenu(id: widget.id, ffi: widget.ffi),
|
||||||
);
|
);
|
||||||
@ -411,9 +410,7 @@ class _RemoteMenubarState extends State<RemoteMenubar> {
|
|||||||
state: widget.state,
|
state: widget.state,
|
||||||
setFullscreen: _setFullscreen,
|
setFullscreen: _setFullscreen,
|
||||||
));
|
));
|
||||||
if (!ffiModel.viewOnly) {
|
|
||||||
toolbarItems.add(_KeyboardMenu(id: widget.id, ffi: widget.ffi));
|
toolbarItems.add(_KeyboardMenu(id: widget.id, ffi: widget.ffi));
|
||||||
}
|
|
||||||
if (!isWeb) {
|
if (!isWeb) {
|
||||||
toolbarItems.add(_ChatMenu(id: widget.id, ffi: widget.ffi));
|
toolbarItems.add(_ChatMenu(id: widget.id, ffi: widget.ffi));
|
||||||
toolbarItems.add(_VoiceCallMenu(id: widget.id, ffi: widget.ffi));
|
toolbarItems.add(_VoiceCallMenu(id: widget.id, ffi: widget.ffi));
|
||||||
@ -969,7 +966,6 @@ class _DisplayMenuState extends State<_DisplayMenu> {
|
|||||||
codec(),
|
codec(),
|
||||||
resolutions(),
|
resolutions(),
|
||||||
Divider(),
|
Divider(),
|
||||||
view_only(),
|
|
||||||
showRemoteCursor(),
|
showRemoteCursor(),
|
||||||
zoomCursor(),
|
zoomCursor(),
|
||||||
showQualityMonitor(),
|
showQualityMonitor(),
|
||||||
@ -1463,39 +1459,26 @@ class _DisplayMenuState extends State<_DisplayMenu> {
|
|||||||
child: Text(translate("Resolution")));
|
child: Text(translate("Resolution")));
|
||||||
}
|
}
|
||||||
|
|
||||||
view_only() {
|
|
||||||
final visible = version_cmp(pi.version, '1.2.0') >= 0;
|
|
||||||
if (!visible) return Offstage();
|
|
||||||
final ffiModel = widget.ffi.ffiModel;
|
|
||||||
return _CheckboxMenuButton(
|
|
||||||
value: ffiModel.viewOnly,
|
|
||||||
onChanged: (value) async {
|
|
||||||
if (value == null) return;
|
|
||||||
bind.sessionSetViewOnly(id: widget.id, viewOnly: value);
|
|
||||||
ffiModel.setViewOnly(widget.id, value);
|
|
||||||
},
|
|
||||||
ffi: widget.ffi,
|
|
||||||
child: Text(translate('View Mode')));
|
|
||||||
}
|
|
||||||
|
|
||||||
showRemoteCursor() {
|
showRemoteCursor() {
|
||||||
if (widget.ffi.ffiModel.pi.platform == kPeerPlatformAndroid) {
|
if (widget.ffi.ffiModel.pi.platform == kPeerPlatformAndroid) {
|
||||||
return Offstage();
|
return Offstage();
|
||||||
}
|
}
|
||||||
final ffiModel = widget.ffi.ffiModel;
|
final ffiModel = widget.ffi.ffiModel;
|
||||||
final visible =
|
final visible = !widget.ffi.canvasModel.cursorEmbedded;
|
||||||
!ffiModel.viewOnly && !widget.ffi.canvasModel.cursorEmbedded;
|
|
||||||
if (!visible) return Offstage();
|
if (!visible) return Offstage();
|
||||||
|
final enabled = !ffiModel.viewOnly;
|
||||||
final state = ShowRemoteCursorState.find(widget.id);
|
final state = ShowRemoteCursorState.find(widget.id);
|
||||||
final option = 'show-remote-cursor';
|
final option = 'show-remote-cursor';
|
||||||
return _CheckboxMenuButton(
|
return _CheckboxMenuButton(
|
||||||
value: state.value,
|
value: state.value,
|
||||||
onChanged: (value) async {
|
onChanged: enabled
|
||||||
|
? (value) async {
|
||||||
if (value == null) return;
|
if (value == null) return;
|
||||||
await bind.sessionToggleOption(id: widget.id, value: option);
|
await bind.sessionToggleOption(id: widget.id, value: option);
|
||||||
state.value =
|
state.value =
|
||||||
bind.sessionGetToggleOptionSync(id: widget.id, arg: option);
|
bind.sessionGetToggleOptionSync(id: widget.id, arg: option);
|
||||||
},
|
}
|
||||||
|
: null,
|
||||||
ffi: widget.ffi,
|
ffi: widget.ffi,
|
||||||
child: Text(translate('Show remote cursor')));
|
child: Text(translate('Show remote cursor')));
|
||||||
}
|
}
|
||||||
@ -1568,18 +1551,20 @@ class _DisplayMenuState extends State<_DisplayMenu> {
|
|||||||
|
|
||||||
disableClipboard() {
|
disableClipboard() {
|
||||||
final ffiModel = widget.ffi.ffiModel;
|
final ffiModel = widget.ffi.ffiModel;
|
||||||
final visible = perms['keyboard'] != false &&
|
final visible = perms['keyboard'] != false && perms['clipboard'] != false;
|
||||||
perms['clipboard'] != false &&
|
|
||||||
!ffiModel.viewOnly;
|
|
||||||
if (!visible) return Offstage();
|
if (!visible) return Offstage();
|
||||||
|
final enabled = !ffiModel.viewOnly;
|
||||||
final option = 'disable-clipboard';
|
final option = 'disable-clipboard';
|
||||||
final value = bind.sessionGetToggleOptionSync(id: widget.id, arg: option);
|
var value = bind.sessionGetToggleOptionSync(id: widget.id, arg: option);
|
||||||
|
if (ffiModel.viewOnly) value = true;
|
||||||
return _CheckboxMenuButton(
|
return _CheckboxMenuButton(
|
||||||
value: value,
|
value: value,
|
||||||
onChanged: (value) {
|
onChanged: enabled
|
||||||
|
? (value) {
|
||||||
if (value == null) return;
|
if (value == null) return;
|
||||||
bind.sessionToggleOption(id: widget.id, value: option);
|
bind.sessionToggleOption(id: widget.id, value: option);
|
||||||
},
|
}
|
||||||
|
: null,
|
||||||
ffi: widget.ffi,
|
ffi: widget.ffi,
|
||||||
child: Text(translate('Disable clipboard')));
|
child: Text(translate('Disable clipboard')));
|
||||||
}
|
}
|
||||||
@ -1672,7 +1657,12 @@ class _KeyboardMenu extends StatelessWidget {
|
|||||||
ffi: ffi,
|
ffi: ffi,
|
||||||
color: _MenubarTheme.blueColor,
|
color: _MenubarTheme.blueColor,
|
||||||
hoverColor: _MenubarTheme.hoverBlueColor,
|
hoverColor: _MenubarTheme.hoverBlueColor,
|
||||||
menuChildren: [mode(), localKeyboardType()]);
|
menuChildren: [
|
||||||
|
mode(),
|
||||||
|
localKeyboardType(),
|
||||||
|
Divider(),
|
||||||
|
view_mode(),
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
mode() {
|
mode() {
|
||||||
@ -1686,6 +1676,7 @@ class _KeyboardMenu extends StatelessWidget {
|
|||||||
KeyboardModeMenu(key: _kKeyTranslateMode, menu: 'Translate mode'),
|
KeyboardModeMenu(key: _kKeyTranslateMode, menu: 'Translate mode'),
|
||||||
];
|
];
|
||||||
List<_RadioMenuButton> list = [];
|
List<_RadioMenuButton> list = [];
|
||||||
|
final enabled = !ffi.ffiModel.viewOnly;
|
||||||
onChanged(String? value) async {
|
onChanged(String? value) async {
|
||||||
if (value == null) return;
|
if (value == null) return;
|
||||||
await bind.sessionSetKeyboardMode(id: id, value: value);
|
await bind.sessionSetKeyboardMode(id: id, value: value);
|
||||||
@ -1706,7 +1697,7 @@ class _KeyboardMenu extends StatelessWidget {
|
|||||||
child: Text(text),
|
child: Text(text),
|
||||||
value: mode.key,
|
value: mode.key,
|
||||||
groupValue: groupValue,
|
groupValue: groupValue,
|
||||||
onChanged: onChanged,
|
onChanged: enabled ? onChanged : null,
|
||||||
ffi: ffi,
|
ffi: ffi,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
@ -1719,6 +1710,7 @@ class _KeyboardMenu extends StatelessWidget {
|
|||||||
final localPlatform = getLocalPlatformForKBLayoutType(pi.platform);
|
final localPlatform = getLocalPlatformForKBLayoutType(pi.platform);
|
||||||
final visible = localPlatform != '';
|
final visible = localPlatform != '';
|
||||||
if (!visible) return Offstage();
|
if (!visible) return Offstage();
|
||||||
|
final enabled = !ffi.ffiModel.viewOnly;
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
Divider(),
|
Divider(),
|
||||||
@ -1727,12 +1719,30 @@ class _KeyboardMenu extends StatelessWidget {
|
|||||||
'${translate('Local keyboard type')}: ${KBLayoutType.value}'),
|
'${translate('Local keyboard type')}: ${KBLayoutType.value}'),
|
||||||
trailingIcon: const Icon(Icons.settings),
|
trailingIcon: const Icon(Icons.settings),
|
||||||
ffi: ffi,
|
ffi: ffi,
|
||||||
onPressed: () =>
|
onPressed: enabled
|
||||||
showKBLayoutTypeChooser(localPlatform, ffi.dialogManager),
|
? () => showKBLayoutTypeChooser(localPlatform, ffi.dialogManager)
|
||||||
|
: null,
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
view_mode() {
|
||||||
|
final ffiModel = ffi.ffiModel;
|
||||||
|
final enabled = version_cmp(pi.version, '1.2.0') >= 0 &&
|
||||||
|
ffiModel.permissions["keyboard"] != false;
|
||||||
|
return _CheckboxMenuButton(
|
||||||
|
value: ffiModel.viewOnly,
|
||||||
|
onChanged: enabled
|
||||||
|
? (value) async {
|
||||||
|
if (value == null) return;
|
||||||
|
await bind.sessionToggleOption(id: id, value: 'view-only');
|
||||||
|
ffiModel.setViewOnly(id, value);
|
||||||
|
}
|
||||||
|
: null,
|
||||||
|
ffi: ffi,
|
||||||
|
child: Text(translate('View Mode')));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class _ChatMenu extends StatefulWidget {
|
class _ChatMenu extends StatefulWidget {
|
||||||
|
@ -450,6 +450,8 @@ class FfiModel with ChangeNotifier {
|
|||||||
handleResolutions(peerId, evt["resolutions"]);
|
handleResolutions(peerId, evt["resolutions"]);
|
||||||
parent.target?.elevationModel.onPeerInfo(_pi);
|
parent.target?.elevationModel.onPeerInfo(_pi);
|
||||||
}
|
}
|
||||||
|
setViewOnly(
|
||||||
|
peerId, bind.sessionGetToggleOptionSync(id: peerId, arg: 'view-only'));
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -522,6 +524,7 @@ class FfiModel with ChangeNotifier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void setViewOnly(String id, bool value) {
|
void setViewOnly(String id, bool value) {
|
||||||
|
if (version_cmp(_pi.version, '1.2.0') < 0) return;
|
||||||
if (value) {
|
if (value) {
|
||||||
ShowRemoteCursorState.find(id).value = value;
|
ShowRemoteCursorState.find(id).value = value;
|
||||||
} else {
|
} else {
|
||||||
|
@ -235,10 +235,12 @@ pub struct PeerConfig {
|
|||||||
pub show_quality_monitor: ShowQualityMonitor,
|
pub show_quality_monitor: ShowQualityMonitor,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub keyboard_mode: String,
|
pub keyboard_mode: String,
|
||||||
|
#[serde(flatten)]
|
||||||
|
pub view_only: ViewOnly,
|
||||||
|
|
||||||
// The other scalar value must before this
|
// The other scalar value must before this
|
||||||
#[serde(default, deserialize_with = "PeerConfig::deserialize_options")]
|
#[serde(default, deserialize_with = "PeerConfig::deserialize_options")]
|
||||||
pub options: HashMap<String, String>,
|
pub options: HashMap<String, String>, // not use delete to represent default values
|
||||||
// Various data for flutter ui
|
// Various data for flutter ui
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub ui_flutter: HashMap<String, String>,
|
pub ui_flutter: HashMap<String, String>,
|
||||||
@ -1061,10 +1063,6 @@ impl PeerConfig {
|
|||||||
if !mp.contains_key(key) {
|
if !mp.contains_key(key) {
|
||||||
mp.insert(key.to_owned(), UserDefaultConfig::read().get(key));
|
mp.insert(key.to_owned(), UserDefaultConfig::read().get(key));
|
||||||
}
|
}
|
||||||
key = "view-only";
|
|
||||||
if !mp.contains_key(key) {
|
|
||||||
mp.insert(key.to_owned(), UserDefaultConfig::read().get(key));
|
|
||||||
}
|
|
||||||
Ok(mp)
|
Ok(mp)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1119,6 +1117,13 @@ serde_field_bool!(
|
|||||||
"AllowSwapKey::default_allow_swap_key"
|
"AllowSwapKey::default_allow_swap_key"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
serde_field_bool!(
|
||||||
|
ViewOnly,
|
||||||
|
"view_only",
|
||||||
|
default_view_only,
|
||||||
|
"ViewOnly::default_view_only"
|
||||||
|
);
|
||||||
|
|
||||||
#[derive(Debug, Default, Serialize, Deserialize, Clone)]
|
#[derive(Debug, Default, Serialize, Deserialize, Clone)]
|
||||||
pub struct LocalConfig {
|
pub struct LocalConfig {
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
@ -1415,7 +1420,8 @@ impl ConfigOidc {
|
|||||||
if let Ok(client_id) = env::var(format!("OIDC-{}-CLIENT-ID", k.to_uppercase())) {
|
if let Ok(client_id) = env::var(format!("OIDC-{}-CLIENT-ID", k.to_uppercase())) {
|
||||||
v.client_id = client_id;
|
v.client_id = client_id;
|
||||||
}
|
}
|
||||||
if let Ok(client_secret) = env::var(format!("OIDC-{}-CLIENT-SECRET", k.to_uppercase())) {
|
if let Ok(client_secret) = env::var(format!("OIDC-{}-CLIENT-SECRET", k.to_uppercase()))
|
||||||
|
{
|
||||||
v.client_secret = client_secret;
|
v.client_secret = client_secret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1235,6 +1235,24 @@ impl LoginConfigHandler {
|
|||||||
config.show_quality_monitor.v = !config.show_quality_monitor.v;
|
config.show_quality_monitor.v = !config.show_quality_monitor.v;
|
||||||
} else if name == "allow_swap_key" {
|
} else if name == "allow_swap_key" {
|
||||||
config.allow_swap_key.v = !config.allow_swap_key.v;
|
config.allow_swap_key.v = !config.allow_swap_key.v;
|
||||||
|
} else if name == "view-only" {
|
||||||
|
config.view_only.v = !config.view_only.v;
|
||||||
|
let f = |b: bool| {
|
||||||
|
if b {
|
||||||
|
BoolOption::Yes.into()
|
||||||
|
} else {
|
||||||
|
BoolOption::No.into()
|
||||||
|
}
|
||||||
|
};
|
||||||
|
if config.view_only.v {
|
||||||
|
option.disable_keyboard = f(true);
|
||||||
|
option.disable_clipboard = f(true);
|
||||||
|
option.show_remote_cursor = f(true);
|
||||||
|
} else {
|
||||||
|
option.disable_keyboard = f(false);
|
||||||
|
option.disable_clipboard = f(self.get_toggle_option("disable-clipboard"));
|
||||||
|
option.show_remote_cursor = f(self.get_toggle_option("show-remote-cursor"));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
let is_set = self
|
let is_set = self
|
||||||
.options
|
.options
|
||||||
@ -1242,7 +1260,12 @@ impl LoginConfigHandler {
|
|||||||
.map(|o| !o.is_empty())
|
.map(|o| !o.is_empty())
|
||||||
.unwrap_or(false);
|
.unwrap_or(false);
|
||||||
if is_set {
|
if is_set {
|
||||||
|
if name == "zoom-cursor" {
|
||||||
|
self.config.options.insert(name, "".to_owned());
|
||||||
|
} else {
|
||||||
|
// Notice: When PeerConfig loads, the default value is taken when the option key does not exist.
|
||||||
self.config.options.remove(&name);
|
self.config.options.remove(&name);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
self.config.options.insert(name, "Y".to_owned());
|
self.config.options.insert(name, "Y".to_owned());
|
||||||
}
|
}
|
||||||
@ -1395,6 +1418,8 @@ impl LoginConfigHandler {
|
|||||||
self.config.show_quality_monitor.v
|
self.config.show_quality_monitor.v
|
||||||
} else if name == "allow_swap_key" {
|
} else if name == "allow_swap_key" {
|
||||||
self.config.allow_swap_key.v
|
self.config.allow_swap_key.v
|
||||||
|
} else if name == "view-only" {
|
||||||
|
self.config.view_only.v
|
||||||
} else {
|
} else {
|
||||||
!self.get_option(name).is_empty()
|
!self.get_option(name).is_empty()
|
||||||
}
|
}
|
||||||
|
@ -543,12 +543,6 @@ pub fn session_set_size(_id: String, _width: i32, _height: i32) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn session_set_view_only(id: String, view_only: bool) {
|
|
||||||
if let Some(session) = SESSIONS.read().unwrap().get(&id) {
|
|
||||||
session.set_view_only(view_only);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn main_get_sound_inputs() -> Vec<String> {
|
pub fn main_get_sound_inputs() -> Vec<String> {
|
||||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||||
return get_sound_inputs();
|
return get_sound_inputs();
|
||||||
|
@ -10,7 +10,6 @@ use std::time::{Duration, SystemTime};
|
|||||||
|
|
||||||
use async_trait::async_trait;
|
use async_trait::async_trait;
|
||||||
use bytes::Bytes;
|
use bytes::Bytes;
|
||||||
use hbb_common::message_proto::option_message::BoolOption;
|
|
||||||
use rdev::{Event, EventType::*};
|
use rdev::{Event, EventType::*};
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
|
|
||||||
@ -843,37 +842,6 @@ impl<T: InvokeUiSession> Session<T> {
|
|||||||
}
|
}
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_view_only(&self, view_only: bool) {
|
|
||||||
let mut option = OptionMessage::default();
|
|
||||||
let f = |b: bool| {
|
|
||||||
if b {
|
|
||||||
BoolOption::Yes.into()
|
|
||||||
} else {
|
|
||||||
BoolOption::No.into()
|
|
||||||
}
|
|
||||||
};
|
|
||||||
if view_only {
|
|
||||||
option.disable_keyboard = f(true);
|
|
||||||
option.disable_clipboard = f(true);
|
|
||||||
option.show_remote_cursor = f(true);
|
|
||||||
} else {
|
|
||||||
option.disable_keyboard = f(false);
|
|
||||||
option.disable_clipboard = f(self.get_toggle_option("disable-clipboard".to_string()));
|
|
||||||
option.show_remote_cursor = f(self.get_toggle_option("show-remote-cursor".to_string()));
|
|
||||||
}
|
|
||||||
let mut misc = Misc::new();
|
|
||||||
misc.set_option(option);
|
|
||||||
let mut msg = Message::new();
|
|
||||||
msg.set_misc(misc);
|
|
||||||
self.send(Data::Message(msg));
|
|
||||||
if self.get_toggle_option("view-only".to_string()) != view_only {
|
|
||||||
self.lc
|
|
||||||
.write()
|
|
||||||
.unwrap()
|
|
||||||
.toggle_option("view-only".to_string());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait InvokeUiSession: Send + Sync + Clone + 'static + Sized + Default {
|
pub trait InvokeUiSession: Send + Sync + Clone + 'static + Sized + Default {
|
||||||
@ -905,7 +873,14 @@ pub trait InvokeUiSession: Send + Sync + Clone + 'static + Sized + Default {
|
|||||||
only_count: bool,
|
only_count: bool,
|
||||||
);
|
);
|
||||||
fn confirm_delete_files(&self, id: i32, i: i32, name: String);
|
fn confirm_delete_files(&self, id: i32, i: i32, name: String);
|
||||||
fn override_file_confirm(&self, id: i32, file_num: i32, to: String, is_upload: bool, is_identical: bool);
|
fn override_file_confirm(
|
||||||
|
&self,
|
||||||
|
id: i32,
|
||||||
|
file_num: i32,
|
||||||
|
to: String,
|
||||||
|
is_upload: bool,
|
||||||
|
is_identical: bool,
|
||||||
|
);
|
||||||
fn update_block_input_state(&self, on: bool);
|
fn update_block_input_state(&self, on: bool);
|
||||||
fn job_progress(&self, id: i32, file_num: i32, speed: f64, finished_size: f64);
|
fn job_progress(&self, id: i32, file_num: i32, speed: f64, finished_size: f64);
|
||||||
fn adapt_size(&self);
|
fn adapt_size(&self);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user