msgbox & translations

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2022-10-14 11:19:49 +08:00
parent 5ddb10366e
commit 77de0d05f9
42 changed files with 271 additions and 64 deletions

View File

@@ -39,6 +39,12 @@ use std::{
#[cfg(windows)]
use virtual_display;
pub const SCRAP_UBUNTU_HIGHER_REQUIRED: &str = "Wayland requires Ubuntu 21.04 or higher version.";
pub const SCRAP_OTHER_VERSION_OR_X11_REQUIRED: &str =
"Wayland requires higher version of linux distro. Please try X11 desktop or change your OS.";
pub const SCRAP_X11_REQUIRED: &str = "x11 expected";
pub const SCRAP_X11_REF_URL: &str = "https://rustdesk.com/docs/en/manual/linux/#x11-required";
pub const NAME: &'static str = "video";
lazy_static::lazy_static! {
@@ -569,7 +575,7 @@ fn run(sp: GenericService) -> ResultType<()> {
{
if !scrap::is_x11() {
if would_block_count >= 100 {
// For now, the user should choose and agree screen sharing agiain.
// For now, the user should choose and agree screen sharing agiain.
// to-do: Remember choice, attendless...
super::wayland::release_resouce();
bail!("Wayland capturer none 100 times, try restart captuere");
@@ -747,6 +753,14 @@ pub(super) fn get_displays_2(all: &Vec<Display>) -> (usize, Vec<DisplayInfo>) {
(*lock, displays)
}
pub fn is_inited_msg() -> Option<Message> {
#[cfg(target_os = "linux")]
if !scrap::is_x11() {
return super::wayland::is_inited();
}
None
}
pub async fn get_displays() -> ResultType<(usize, Vec<DisplayInfo>)> {
#[cfg(target_os = "linux")]
{