mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-06-07 18:02:48 +08:00
refact, change 'Split' to 'Move tab to new window'
Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
parent
755353dc0b
commit
7ddc706f2d
@ -2,7 +2,6 @@ import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_hbb/common/widgets/address_book.dart';
|
||||
import 'package:flutter_hbb/common/widgets/dialog.dart';
|
||||
import 'package:flutter_hbb/consts.dart';
|
||||
import 'package:flutter_hbb/models/peer_tab_model.dart';
|
||||
|
@ -39,7 +39,7 @@ const String kWindowEventActiveSession = "active_session";
|
||||
const String kWindowEventGetRemoteList = "get_remote_list";
|
||||
const String kWindowEventGetSessionIdList = "get_session_id_list";
|
||||
|
||||
const String kWindowEventSplit = "split";
|
||||
const String kWindowEventMoveTabToNewWindow = "move_tab_to_new_window";
|
||||
const String kWindowEventCloseForSeparateWindow = "close_for_separate_window";
|
||||
|
||||
const String kOptionSeparateRemoteWindow = "enable-separate-remote-window";
|
||||
|
@ -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,
|
||||
|
@ -43,7 +43,7 @@ class RustDeskMultiWindowManager {
|
||||
final List<int> _fileTransferWindows = List.empty(growable: true);
|
||||
final List<int> _portForwardWindows = List.empty(growable: true);
|
||||
|
||||
splitWindow(int windowId, String peerId, String sessionId) async {
|
||||
moveTabToNewWindow(int windowId, String peerId, String sessionId) async {
|
||||
var params = {
|
||||
'type': WindowType.RemoteDesktop.index,
|
||||
'id': peerId,
|
||||
|
@ -526,6 +526,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Sort tags", ""),
|
||||
("Separate remote window", ""),
|
||||
("separate window", ""),
|
||||
("Split", ""),
|
||||
("Move tab to new window", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -526,6 +526,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Sort tags", "对标签进行排序"),
|
||||
("Separate remote window", "使用独立远程窗口"),
|
||||
("separate window", "独立窗口"),
|
||||
("Split", "拆分"),
|
||||
("Move tab to new window", "将标签页移至新窗口"),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -526,6 +526,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Sort tags", ""),
|
||||
("Separate remote window", ""),
|
||||
("separate window", ""),
|
||||
("Split", ""),
|
||||
("Move tab to new window", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -526,6 +526,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Sort tags", ""),
|
||||
("Separate remote window", ""),
|
||||
("separate window", ""),
|
||||
("Split", ""),
|
||||
("Move tab to new window", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -526,6 +526,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Sort tags", "Tags sortieren"),
|
||||
("Separate remote window", ""),
|
||||
("separate window", ""),
|
||||
("Split", ""),
|
||||
("Move tab to new window", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -526,6 +526,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Sort tags", ""),
|
||||
("Separate remote window", ""),
|
||||
("separate window", ""),
|
||||
("Split", ""),
|
||||
("Move tab to new window", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -526,6 +526,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Sort tags", ""),
|
||||
("Separate remote window", ""),
|
||||
("separate window", ""),
|
||||
("Split", ""),
|
||||
("Move tab to new window", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -526,6 +526,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Sort tags", "Ordenar etiquetas"),
|
||||
("Separate remote window", ""),
|
||||
("separate window", ""),
|
||||
("Split", ""),
|
||||
("Move tab to new window", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -526,6 +526,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Sort tags", ""),
|
||||
("Separate remote window", ""),
|
||||
("separate window", ""),
|
||||
("Split", ""),
|
||||
("Move tab to new window", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -526,6 +526,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Sort tags", ""),
|
||||
("Separate remote window", ""),
|
||||
("separate window", ""),
|
||||
("Split", ""),
|
||||
("Move tab to new window", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -526,6 +526,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Sort tags", ""),
|
||||
("Separate remote window", ""),
|
||||
("separate window", ""),
|
||||
("Split", ""),
|
||||
("Move tab to new window", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -526,6 +526,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Sort tags", ""),
|
||||
("Separate remote window", ""),
|
||||
("separate window", ""),
|
||||
("Split", ""),
|
||||
("Move tab to new window", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -526,6 +526,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Sort tags", "Ordina etichette"),
|
||||
("Separate remote window", ""),
|
||||
("separate window", ""),
|
||||
("Split", ""),
|
||||
("Move tab to new window", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -526,6 +526,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Sort tags", ""),
|
||||
("Separate remote window", ""),
|
||||
("separate window", ""),
|
||||
("Split", ""),
|
||||
("Move tab to new window", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -526,6 +526,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Sort tags", ""),
|
||||
("Separate remote window", ""),
|
||||
("separate window", ""),
|
||||
("Split", ""),
|
||||
("Move tab to new window", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -526,6 +526,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Sort tags", ""),
|
||||
("Separate remote window", ""),
|
||||
("separate window", ""),
|
||||
("Split", ""),
|
||||
("Move tab to new window", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -526,6 +526,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Sort tags", ""),
|
||||
("Separate remote window", ""),
|
||||
("separate window", ""),
|
||||
("Split", ""),
|
||||
("Move tab to new window", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -526,6 +526,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Sort tags", "Labels sorteren"),
|
||||
("Separate remote window", ""),
|
||||
("separate window", ""),
|
||||
("Split", ""),
|
||||
("Move tab to new window", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -526,6 +526,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Sort tags", ""),
|
||||
("Separate remote window", ""),
|
||||
("separate window", ""),
|
||||
("Split", ""),
|
||||
("Move tab to new window", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -526,6 +526,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Sort tags", ""),
|
||||
("Separate remote window", ""),
|
||||
("separate window", ""),
|
||||
("Split", ""),
|
||||
("Move tab to new window", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -526,6 +526,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Sort tags", ""),
|
||||
("Separate remote window", ""),
|
||||
("separate window", ""),
|
||||
("Split", ""),
|
||||
("Move tab to new window", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -526,6 +526,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Sort tags", ""),
|
||||
("Separate remote window", ""),
|
||||
("separate window", ""),
|
||||
("Split", ""),
|
||||
("Move tab to new window", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -526,6 +526,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Sort tags", "Сортировка меток"),
|
||||
("Separate remote window", ""),
|
||||
("separate window", ""),
|
||||
("Split", ""),
|
||||
("Move tab to new window", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -526,6 +526,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Sort tags", ""),
|
||||
("Separate remote window", ""),
|
||||
("separate window", ""),
|
||||
("Split", ""),
|
||||
("Move tab to new window", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -526,6 +526,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Sort tags", ""),
|
||||
("Separate remote window", ""),
|
||||
("separate window", ""),
|
||||
("Split", ""),
|
||||
("Move tab to new window", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -526,6 +526,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Sort tags", ""),
|
||||
("Separate remote window", ""),
|
||||
("separate window", ""),
|
||||
("Split", ""),
|
||||
("Move tab to new window", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -526,6 +526,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Sort tags", ""),
|
||||
("Separate remote window", ""),
|
||||
("separate window", ""),
|
||||
("Split", ""),
|
||||
("Move tab to new window", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -526,6 +526,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Sort tags", ""),
|
||||
("Separate remote window", ""),
|
||||
("separate window", ""),
|
||||
("Split", ""),
|
||||
("Move tab to new window", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -526,6 +526,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Sort tags", ""),
|
||||
("Separate remote window", ""),
|
||||
("separate window", ""),
|
||||
("Split", ""),
|
||||
("Move tab to new window", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -526,6 +526,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Sort tags", ""),
|
||||
("Separate remote window", ""),
|
||||
("separate window", ""),
|
||||
("Split", ""),
|
||||
("Move tab to new window", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -526,6 +526,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Sort tags", ""),
|
||||
("Separate remote window", ""),
|
||||
("separate window", ""),
|
||||
("Split", ""),
|
||||
("Move tab to new window", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -526,6 +526,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Sort tags", ""),
|
||||
("Separate remote window", ""),
|
||||
("separate window", ""),
|
||||
("Split", ""),
|
||||
("Move tab to new window", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -526,6 +526,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Sort tags", ""),
|
||||
("Separate remote window", ""),
|
||||
("separate window", ""),
|
||||
("Split", ""),
|
||||
("Move tab to new window", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -526,6 +526,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Sort tags", ""),
|
||||
("Separate remote window", ""),
|
||||
("separate window", ""),
|
||||
("Split", ""),
|
||||
("Move tab to new window", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user