mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
refact, change 'Split' to 'Move tab to new window'
Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
@@ -570,7 +570,7 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
||||
forceRelay: call.arguments['forceRelay'],
|
||||
forceSeparateWindow: call.arguments['forceSeparateWindow'],
|
||||
);
|
||||
} else if (call.method == kWindowEventSplit) {
|
||||
} else if (call.method == kWindowEventMoveTabToNewWindow) {
|
||||
final args = call.arguments.split(',');
|
||||
int? windowId;
|
||||
try {
|
||||
@@ -579,7 +579,7 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
||||
debugPrint("Failed to parse window id '${call.arguments}': $e");
|
||||
}
|
||||
if (windowId != null) {
|
||||
await rustDeskWinManager.splitWindow(windowId, args[1], args[2]);
|
||||
await rustDeskWinManager.moveTabToNewWindow(windowId, args[1], args[2]);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -332,12 +332,12 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
|
||||
if (tabController.state.value.tabs.length > 1) {
|
||||
final splitAction = MenuEntryButton<String>(
|
||||
childBuilder: (TextStyle? style) => Text(
|
||||
translate('Split'),
|
||||
translate('Move tab to new window'),
|
||||
style: style,
|
||||
),
|
||||
proc: () async {
|
||||
await DesktopMultiWindow.invokeMethod(
|
||||
kMainWindowId, kWindowEventSplit, '${windowId()},$key,$sessionId');
|
||||
kMainWindowId, kWindowEventMoveTabToNewWindow, '${windowId()},$key,$sessionId');
|
||||
cancelFunc();
|
||||
},
|
||||
padding: padding,
|
||||
|
||||
Reference in New Issue
Block a user