From efdd567e16c9863bda03fbf4b96a582c80a515af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=95=8F?= Date: Wed, 3 Jul 2024 10:23:54 +0000 Subject: [PATCH] =?UTF-8?q?!3=20fixbug=20Merge=20pull=20request=20!3=20fro?= =?UTF-8?q?m=20=E6=9D=A8=E6=95=8F/openkylin/nile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/changelog | 14 + debian/patches/0043-3-fixbug.patch | 3500 ++++++++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 3515 insertions(+) create mode 100644 debian/patches/0043-3-fixbug.patch diff --git a/debian/changelog b/debian/changelog index be48647..08d15fd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,17 @@ +ukui-screensaver (4.10.0.0-ok26~0703) nile; urgency=medium + + * BUG号:#IA4OBU 【锁屏】【登录】锁屏/登录界面,认证框提示内容不一致 + #I9UW2D 开启唤醒屏幕需要密码,等待关闭显示器10s后,唤醒屏幕直接进入系统 + #IA4OXO 切换英文,登录界面,日期显示异常 + #IA4HLC 锁屏/登录界面,睡眠休眠唤醒后仍显示电源管理界面 + #I9RPOI 多个用户登录的情况下,在登录界面关机或重启,提示显示英文 + #I9RPHC 两个用户,一个登录,一个未登录情况下,未登录用户的登录界面,不存在电源按钮 + * 需求号:无 + * 其他改动说明:无 + * 其他改动影响域:无 + + -- Yang Min Wed, 03 Jul 2024 18:03:51 +0800 + ukui-screensaver (4.10.0.0-ok25~0630) nile; urgency=medium * BUG号:无 diff --git a/debian/patches/0043-3-fixbug.patch b/debian/patches/0043-3-fixbug.patch new file mode 100644 index 0000000..4183ff3 --- /dev/null +++ b/debian/patches/0043-3-fixbug.patch @@ -0,0 +1,3500 @@ +From: =?utf-8?b?5p2o5pWP?= +Date: Wed, 3 Jul 2024 10:23:54 +0000 +Subject: =?utf-8?q?!3_fixbug_Merge_pull_request_!3_from_=E6=9D=A8=E6=95=8F/?= + =?utf-8?q?openkylin/nile?= + +--- + i18n_ts/bo.ts | 52 ++++----- + i18n_ts/bo_CN.ts | 60 ++++++----- + i18n_ts/de.ts | 60 ++++++----- + i18n_ts/es.ts | 60 ++++++----- + i18n_ts/fr.ts | 60 ++++++----- + i18n_ts/kk.ts | 55 +++++----- + i18n_ts/ky.ts | 55 +++++----- + i18n_ts/mn.ts | 60 ++++++----- + i18n_ts/pt.ts | 12 +-- + i18n_ts/ru.ts | 12 +-- + i18n_ts/tr.ts | 54 +++++----- + i18n_ts/ug.ts | 88 ++++++++-------- + i18n_ts/zh_CN.ts | 60 ++++++----- + i18n_ts/zh_HK.ts | 66 +++++++----- + src/common/definetypes.h | 2 +- + src/dbusifs/login1helper.cpp | 36 +++++-- + src/dbusifs/login1helper.h | 8 +- + src/dbusifs/upowerhelper.cpp | 16 +++ + src/dbusifs/upowerhelper.h | 11 ++ + src/lock-backend/dbusupperinterface.cpp | 180 +++++++++++++++++++------------- + src/lock-backend/dbusupperinterface.h | 6 +- + src/lock-dialog/backenddbushelper.cpp | 57 +++++----- + src/lock-dialog/backenddbushelper.h | 6 +- + src/lock-dialog/languagesetting.cpp | 31 +++++- + src/lock-dialog/languagesetting.h | 2 + + src/lock-dialog/lockdialogperformer.cpp | 15 +-- + src/widgets/authdialog.cpp | 6 +- + src/widgets/fullbackgroundwidget.cpp | 30 ++++-- + src/widgets/lockwidget.cpp | 17 ++- + src/widgets/mediacontrolwidget.cpp | 27 ++++- + src/widgets/powerlistwidget.cpp | 5 +- + src/widgets/timewidget.cpp | 39 +++---- + 32 files changed, 728 insertions(+), 520 deletions(-) + +diff --git a/i18n_ts/bo.ts b/i18n_ts/bo.ts +index dbf32f6..8e523f1 100644 +--- a/i18n_ts/bo.ts ++++ b/i18n_ts/bo.ts +@@ -60,7 +60,7 @@ + + + +- Password ++ Password: + + + +@@ -472,24 +472,24 @@ + + LockWidget + +- +- ++ ++ + system-monitor + + + +- +- ++ ++ + Multiple users are logged in at the same time.Are you sure you want to %1 this system? + + + +- +- Reboot ++ ++ Restart + + + +- ++ + Shut Down + + +@@ -556,10 +556,10 @@ + + MPRISWidget + +- + +- +- ++ ++ ++ + Unknown + + +@@ -594,90 +594,90 @@ + + PowerListWidget + +- ++ + + Hibernate + + + +- ++ + + Turn off your computer, but the app stays open. When the computer is turned on, it can be restored to the state you left + + + +- ++ + + Suspend + + + +- ++ + + The computer stays on, but consumes less power. The app stays open and can quickly wake up and revert to where you left off + + + +- ++ + + Restart + + + +- ++ + Close all apps, and then restart your computer + + + +- ++ + + Shut Down + + + +- ++ + + Close all apps, and then shut down your computer + + + +- ++ + + Log Out + + + +- ++ + + The current user logs out of the system, terminates the session, and returns to the login page + + + +- ++ + + SwitchUser + + + +- ++ + + LockScreen + + + +- ++ + + UpgradeThenRestart + + + +- ++ + + UpgradeThenShutdown + + + +- ++ + Logout + + +diff --git a/i18n_ts/bo_CN.ts b/i18n_ts/bo_CN.ts +index a17ab97..1e302dc 100644 +--- a/i18n_ts/bo_CN.ts ++++ b/i18n_ts/bo_CN.ts +@@ -98,6 +98,11 @@ + Verify iris or enter password to unlock + iris ཞིབ་བཤེར་བྱེད་པའམ་ཡང་ན་གསང་གྲངས་ནང་འཇུག་བྱས་ནས་ཟྭ་ + ++ ++ ++ Password: ++ ནང་འཇུག་གི་གསང་གྲངས། ++ + + + Input Password +@@ -274,9 +279,8 @@ + བདེ་འཇགས་ཀྱི་གསང་བའི་ལྡེ་མིག་དེ་USBཡི་སྣེ་འདྲེན་དུ་འཇུག་རོགས། + + +- + Password +- གསང་གྲངས། ++ གསང་གྲངས། + + + +@@ -2006,32 +2010,32 @@ + སྐུད་མེད་ཅུས་ཁོངས་ཀྱི་དྲ་བ། + + +- +- ++ ++ + system-monitor + མ་ལག་གི་ལྟ་ཞིབ་ཡོ་བྱད། + + ++ + Restart +- ཡང་བསྐྱར་འགོ་འཛུགས་ ++ ཡང་བསྐྱར་འགོ་འཛུགས་ + + +- +- ++ ++ + Multiple users are logged in at the same time.Are you sure you want to %1 this system? + སྤྱོད་མཁན་མང་པོ་ཞིག་དུས་གཅིག་ཏུ་ཐོ་འགོད་བྱས། ཁྱེད་རང་གིས་%1མ་ལག་འདི་གཏན་འཁེལ་བྱེད་དགོས་སམ། + + +- + Reboot +- བསྐྱར་དུ་སྒོ་འབྱེད་དགོས། ++ བསྐྱར་དུ་སྒོ་འབྱེད་དགོས། + + + PowerOff + གནམ་གྲུའི་སྒོ་རྒྱག་དགོས། + + +- ++ + Shut Down + ལས་མཚམས་འཇོག + +@@ -2102,10 +2106,10 @@ + + MPRISWidget + +- + +- +- ++ ++ ++ + Unknown + ཤེས་མེད་པ། + +@@ -2300,54 +2304,54 @@ + + PowerListWidget + +- ++ + + Hibernate + ཧིན་རྡུ་ཉི་ཞི་ཡ། + + +- ++ + + Turn off your computer, but the app stays open. When the computer is turned on, it can be restored to the state you left + གློག་ཀླད་ཀྱི་སྒོ་བརྒྱབ་ནས་བཀོལ་སྤྱོད་བྱེད་སྐབས་ཐོག་མཐའ་བར་གསུམ་དུ་རྣམ་པ་རྒྱུན་འཁྱོངས་བྱེད་ཐུབ། གློག་ཀླད་ཀྱི་ཁ་ཕྱེ་དུས་ཁྱོད་དང་ཁ་བྲལ་བའི་རྣམ་པ་སླར་གསོ་བྱེད་ཐུབ། + + +- ++ + + Suspend + གནས་སྐབས་མཚམས་འཇོག་ + + +- ++ + + The computer stays on, but consumes less power. The app stays open and can quickly wake up and revert to where you left off + གློག་ཀླད་ཀྱི་ཁ་ཕྱེ་བའི་རྣམ་པ་རྒྱུན་འཁྱོངས་བྱས་མོད། འོན་ཀྱང་གློག་ཟད་ཚད་ཅུང་ཉུང་། ཉེར་སྤྱོད་ཚོགས་འདུའི་ཐོག་ཁ་ཕྱེ་ནས་མགྱོགས་མྱུར་ངང་གློག་ཀླད་དཀྲོགས་ཏེ་ཁྱོད་དང་ཁ་བྲལ་བའི་རྣམ་པ་སླར་གསོ་བྱེད་ཐུབ། + + +- ++ + + Restart + ཡང་བསྐྱར་འགོ་འཛུགས་ + + +- ++ + Close all apps, and then restart your computer + བཀོལ་སྤྱོད་ཡོད་ཚད་སྒོ་བརྒྱབ་རྗེས་གློག་ཀླད་བསྐྱར་དུ་སྒོ་ཕྱེ་བ་རེད། + + +- ++ + + Shut Down + ལས་མཚམས་འཇོག + + +- ++ + + The current user logs out of the system, terminates the session, and returns to the login page + མིག་སྔར་སྤྱོད་མཁན་གྱི་ཐོ་ཁོངས་ནས་སུབ་པ་དང་། ཚོགས་འདུ་གྲོལ་མཚམས་བཞག་ནས་ཤོག་ངོས་སུ་འགོད་དགོས། + + +- ++ + Logout + ཐོ་ཁོངས་ནས་སུབ་དགོས། + +@@ -2356,31 +2360,31 @@ + གློག་ཆད་པ། + + +- ++ + + Close all apps, and then shut down your computer + བཀོལ་སྤྱོད་ཡོད་ཚད་སྒོ་བརྒྱབ་ནས་གློག་ཀླད་སྒོ་རྒྱག་དགོས། + + +- ++ + + SwitchUser + སྤྱོད་མཁན་བརྗེ་དགོས། + + +- ++ + + LockScreen + ཟྭ་བརྒྱབ་པ། + + +- ++ + + Log Out + ཕྱིར་འཐེན་བྱ་དགོས། + + +- ++ + + UpgradeThenRestart + གསར་བཅོས་བྱས་རྗེས་བསྐྱར་དུ་སྒོ་འབྱེད་དགོས། +@@ -2391,7 +2395,7 @@ + སྤྱོད་སྒོ་ཡོད་ཚད་སྒོ་བརྒྱབ་ནས་གློག་ཀླད་སྒོ་རྒྱག་པ་དང་། དེ་ནས་ཡང་བསྐྱར་གློག་ཀླད་ཀྱི་ཁ་ཕྱེ་བ་རེད། + + +- ++ + + UpgradeThenShutdown + རྒྱབ་སྒོ་གསར་སྒྱུར་བྱེད་དགོས། +diff --git a/i18n_ts/de.ts b/i18n_ts/de.ts +index 5082035..86b7666 100644 +--- a/i18n_ts/de.ts ++++ b/i18n_ts/de.ts +@@ -98,6 +98,11 @@ + Verify iris or enter password to unlock + Überprüfen Sie die Iris oder geben Sie das Passwort ein, um zu entsperren + ++ ++ ++ Password: ++ ++ + + + Input Password +@@ -274,9 +279,8 @@ + Stecken Sie den Ukey in den USB-Anschluss + + +- + Password +- Passwort ++ Passwort + + + +@@ -2018,24 +2022,24 @@ + WLAN + + +- +- ++ ++ + system-monitor + + + +- +- ++ ++ + Multiple users are logged in at the same time.Are you sure you want to %1 this system? + + + +- +- Reboot +- ++ ++ Restart ++ Neustarten + + +- ++ + Shut Down + Herunterfahren + +@@ -2106,10 +2110,10 @@ + + MPRISWidget + +- + +- +- ++ ++ ++ + Unknown + + +@@ -2304,84 +2308,84 @@ + + PowerListWidget + +- ++ + + Hibernate + Überwintern + + +- ++ + + Turn off your computer, but the app stays open. When the computer is turned on, it can be restored to the state you left + Schalten Sie Ihren Computer aus, aber die App bleibt geöffnet. Wenn der Computer eingeschaltet ist, kann er in den Zustand zurückversetzt werden, den Sie verlassen haben + + +- ++ + + Suspend + Aufhängen + + +- ++ + + The computer stays on, but consumes less power. The app stays open and can quickly wake up and revert to where you left off + Der Computer bleibt eingeschaltet, verbraucht aber weniger Strom. Die App bleibt geöffnet und kann schnell wieder aufwachen und dort weitermachen, wo Sie aufgehört haben + + +- ++ + + Restart + Neustarten + + +- ++ + Close all apps, and then restart your computer + + + +- ++ + + Shut Down + Herunterfahren + + +- ++ + + Log Out + Ausloggen + + +- ++ + + The current user logs out of the system, terminates the session, and returns to the login page + + + +- ++ + + SwitchUser + + + +- ++ + + LockScreen + + + +- ++ + + UpgradeThenRestart + + + +- ++ + + UpgradeThenShutdown + + + +- ++ + Logout + + +@@ -2390,7 +2394,7 @@ + Ausschalten + + +- ++ + + Close all apps, and then shut down your computer + Schließen Sie alle Apps, und fahren Sie dann den Computer herunter +diff --git a/i18n_ts/es.ts b/i18n_ts/es.ts +index 42b979b..4cfbfeb 100644 +--- a/i18n_ts/es.ts ++++ b/i18n_ts/es.ts +@@ -98,6 +98,11 @@ + Verify iris or enter password to unlock + Verifique el iris o ingrese la contraseña para desbloquear + ++ ++ ++ Password: ++ ++ + + + Input Password +@@ -274,9 +279,8 @@ + Inserte la ukey en el puerto USB + + +- + Password +- Contraseña ++ Contraseña + + + +@@ -2022,24 +2026,24 @@ + WLAN + + +- +- ++ ++ + system-monitor + + + +- +- ++ ++ + Multiple users are logged in at the same time.Are you sure you want to %1 this system? + + + +- +- Reboot +- ++ ++ Restart ++ Reanudar + + +- ++ + Shut Down + Apaga + +@@ -2110,10 +2114,10 @@ + + MPRISWidget + +- + +- +- ++ ++ ++ + Unknown + + +@@ -2308,84 +2312,84 @@ + + PowerListWidget + +- ++ + + Hibernate + Hibernar + + +- ++ + + Turn off your computer, but the app stays open. When the computer is turned on, it can be restored to the state you left + Apague su computadora, pero la aplicación permanece abierta. Cuando se enciende la computadora, se puede restaurar al estado en el que la dejó + + +- ++ + + Suspend + Suspender + + +- ++ + + The computer stays on, but consumes less power. The app stays open and can quickly wake up and revert to where you left off + El ordenador permanece encendido, pero consume menos energía. La aplicación permanece abierta y puede despertarse rápidamente y volver a donde la dejó + + +- ++ + + Restart + Reanudar + + +- ++ + Close all apps, and then restart your computer + + + +- ++ + + Shut Down + Apaga + + +- ++ + + Log Out + Cerrar sesión + + +- ++ + + The current user logs out of the system, terminates the session, and returns to the login page + + + +- ++ + + SwitchUser + + + +- ++ + + LockScreen + + + +- ++ + + UpgradeThenRestart + + + +- ++ + + UpgradeThenShutdown + + + +- ++ + Logout + + +@@ -2394,7 +2398,7 @@ + Apagar + + +- ++ + + Close all apps, and then shut down your computer + Cierre todas las aplicaciones y, a continuación, apague el equipo +diff --git a/i18n_ts/fr.ts b/i18n_ts/fr.ts +index aa2150a..29199e6 100644 +--- a/i18n_ts/fr.ts ++++ b/i18n_ts/fr.ts +@@ -98,6 +98,11 @@ + Verify iris or enter password to unlock + Vérifiez l’iris ou entrez le mot de passe pour déverrouiller + ++ ++ ++ Password: ++ ++ + + + Input Password +@@ -274,9 +279,8 @@ + Insérez l’ukey dans le port USB + + +- + Password +- Mot de passe ++ Mot de passe + + + +@@ -2018,24 +2022,24 @@ + Réseau local sans fil (WLAN) + + +- +- ++ ++ + system-monitor + + + +- +- ++ ++ + Multiple users are logged in at the same time.Are you sure you want to %1 this system? + + + +- +- Reboot +- ++ ++ Restart ++ Redémarrer + + +- ++ + Shut Down + Arrêter + +@@ -2106,10 +2110,10 @@ + + MPRISWidget + +- + +- +- ++ ++ ++ + Unknown + + +@@ -2304,84 +2308,84 @@ + + PowerListWidget + +- ++ + + Hibernate + Hiberner + + +- ++ + + Turn off your computer, but the app stays open. When the computer is turned on, it can be restored to the state you left + Éteignez votre ordinateur, mais l’application reste ouverte. Lorsque l’ordinateur est allumé, il peut être restauré dans l’état que vous avez laissé + + +- ++ + + Suspend + Suspendre + + +- ++ + + The computer stays on, but consumes less power. The app stays open and can quickly wake up and revert to where you left off + L’ordinateur reste allumé, mais consomme moins d’énergie. L’application reste ouverte et peut rapidement se réveiller et revenir à l’endroit où vous vous étiez arrêté + + +- ++ + + Restart + Redémarrer + + +- ++ + Close all apps, and then restart your computer + + + +- ++ + + Shut Down + Arrêter + + +- ++ + + Log Out + Se déconnecter + + +- ++ + + The current user logs out of the system, terminates the session, and returns to the login page + + + +- ++ + + SwitchUser + + + +- ++ + + LockScreen + + + +- ++ + + UpgradeThenRestart + + + +- ++ + + UpgradeThenShutdown + + + +- ++ + Logout + + +@@ -2390,7 +2394,7 @@ + Mise hors tension + + +- ++ + + Close all apps, and then shut down your computer + Fermez toutes les applications, puis éteignez votre ordinateur +diff --git a/i18n_ts/kk.ts b/i18n_ts/kk.ts +index a92c5fe..c6b11b4 100644 +--- a/i18n_ts/kk.ts ++++ b/i18n_ts/kk.ts +@@ -98,6 +98,11 @@ + Verify iris or enter password to unlock + نى انىقتاۋ ياكي قۇپيا نومەر كىرگىزۋ ارقىلى قۇلىپ ٸشٸۋ Iris + ++ ++ ++ Password: ++ ++ + + + Input Password +@@ -1986,24 +1991,24 @@ + 无线局域网 + + +- +- ++ ++ + system-monitor + سەستيما كۇزەتۋشى + + +- +- ++ ++ + Multiple users are logged in at the same time.Are you sure you want to %1 this system? + بٸر قانشا الارمان بٸرلا ۋاقىتتا سەستاماعا كىردى، نۇ %1 سەستامانى ٸستەتلۋٸن كەسٸم جاسايسٸزبە؟ + + +- +- Reboot ++ ++ Restart + دەرەۋ قاتە قوزعالتۋ + + +- ++ + Shut Down + 关机 + +@@ -2074,10 +2079,10 @@ + + MPRISWidget + +- + +- +- ++ ++ ++ + Unknown + كۋالىك + +@@ -2268,84 +2273,84 @@ + + PowerListWidget + +- ++ + + Hibernate + 休眠 + + +- ++ + + Turn off your computer, but the app stays open. When the computer is turned on, it can be restored to the state you left + 关闭电脑,但是应用会一直保持打开状态。当打开电脑时,可以恢复到你离开的状态。 + + +- ++ + + Suspend + 睡眠 + + +- ++ + + The computer stays on, but consumes less power. The app stays open and can quickly wake up and revert to where you left off + 电脑保持开机状态,但耗电较少。应用会一直保持打开状态,可快速唤醒电脑并恢复到你离开的状态。 + + +- ++ + + Restart + 重启 + + +- ++ + Close all apps, and then restart your computer + بارلٸق ئەپنى ٶشٸرٸپ، سونان كومپيۋتەردى قاتە قوزعالتۋ + + +- ++ + + Shut Down + 关机 + + +- ++ + + Log Out + 注销 + + +- ++ + + The current user logs out of the system, terminates the session, and returns to the login page + + + +- ++ + + SwitchUser + 切换用户 + + +- ++ + + LockScreen + + + +- ++ + + UpgradeThenRestart + + + +- ++ + + UpgradeThenShutdown + دارەجەسىن وسىرىپ ، سونان تاقاۋ + + +- ++ + Logout + شەگنىپ شىعۋ + +@@ -2354,7 +2359,7 @@ + 关机 + + +- ++ + + Close all apps, and then shut down your computer + 关闭所有应用,然后关闭电脑。 +diff --git a/i18n_ts/ky.ts b/i18n_ts/ky.ts +index 2cd6301..7d231a7 100644 +--- a/i18n_ts/ky.ts ++++ b/i18n_ts/ky.ts +@@ -98,6 +98,11 @@ + Verify iris or enter password to unlock + نى انىقتاش كۅرۉنۉشتۅرۉ جاشىرۇۇن نومۇر كىرگىزۉۉ ارقىلۇۇ قۇلپ اچۇۇ Iris + ++ ++ ++ Password: ++ ++ + + + Input Password +@@ -1986,24 +1991,24 @@ + 无线局域网 + + +- +- ++ ++ + system-monitor + ساامالىق كۉزۅتكۉچ + + +- +- ++ ++ + Multiple users are logged in at the same time.Are you sure you want to %1 this system? + بىر قانچا كەرەكتۅۅچۉ بىر لا ۇباقىتتا ساامالىقا كىردى، بۇل %1 سەستىمانى ىشتەتىشتى بەكىتەسىزبى؟ + + +- +- Reboot ++ ++ Restart + داروو قايرا قوزعوتۇۇ + + +- ++ + Shut Down + 关机 + +@@ -2074,10 +2079,10 @@ + + MPRISWidget + +- + +- +- ++ ++ ++ + Unknown + بەلگىسىز + +@@ -2268,84 +2273,84 @@ + + PowerListWidget + +- ++ + + Hibernate + 休眠 + + +- ++ + + Turn off your computer, but the app stays open. When the computer is turned on, it can be restored to the state you left + 关闭电脑,但是应用会一直保持打开状态。当打开电脑时,可以恢复到你离开的状态。 + + +- ++ + + Suspend + 睡眠 + + +- ++ + + The computer stays on, but consumes less power. The app stays open and can quickly wake up and revert to where you left off + 电脑保持开机状态,但耗电较少。应用会一直保持打开状态,可快速唤醒电脑并恢复到你离开的状态。 + + +- ++ + + Restart + 重启 + + +- ++ + Close all apps, and then restart your computer + باردىق ئەپنى ۅچۉرۉپ، اندان كومپىيۇتەردى قايرا قوزعوتۇۇ + + +- ++ + + Shut Down + 关机 + + +- ++ + + Log Out + 注销 + + +- ++ + + The current user logs out of the system, terminates the session, and returns to the login page + + + +- ++ + + SwitchUser + 切换用户 + + +- ++ + + LockScreen + + + +- ++ + + UpgradeThenRestart + + + +- ++ + + UpgradeThenShutdown + چەگىن ۅستۉرۉپ ، اندان بەكىتىش + + +- ++ + Logout + جانىپ سىندىرۇۇ + +@@ -2354,7 +2359,7 @@ + 关机 + + +- ++ + + Close all apps, and then shut down your computer + 关闭所有应用,然后关闭电脑。 +diff --git a/i18n_ts/mn.ts b/i18n_ts/mn.ts +index 7c37ce6..0873c7e 100644 +--- a/i18n_ts/mn.ts ++++ b/i18n_ts/mn.ts +@@ -98,6 +98,11 @@ + Verify iris or enter password to unlock + ᠰᠤᠯᠤᠩᠭ᠎ᠠ ᠪᠦᠷᠬᠦᠪᠴᠢ᠎ᠶᠢ ᠪᠠᠳᠤᠯᠭᠠᠵᠢᠭᠤᠯᠬᠤ ᠪᠤᠶᠤ ᠨᠢᠭᠤᠴᠠ ᠺᠤᠳ᠋ ᠤᠷᠤᠭᠤᠯᠵᠤ ᠤᠨᠢᠰᠤ᠎ᠶᠢ ᠳᠠᠢᠯᠤᠭᠠᠷᠠᠢ + ++ ++ ++ Password: ++ ᠨᠢᠭᠤᠴᠠ ᠺᠤᠳ᠋ ᠤᠷᠤᠭᠤᠯᠬᠤ ++ + + + Input Password +@@ -274,9 +279,8 @@ + ᠠᠮᠤᠷ ᠲᠦᠪᠰᠢᠨ ᠦ ᠨᠢᠭᠤᠴᠠ ᠶᠢ USB ᠦᠵᠦᠭᠦᠷ ᠲᠦ ᠬᠠᠳᠬᠤᠵᠤ ᠣᠷᠣᠭᠠᠷᠠᠢ ᠃ + + +- + Password +- ᠨᠢᠭᠤᠴᠠ ᠺᠤᠳ᠋ ++ ᠨᠢᠭᠤᠴᠠ ᠺᠤᠳ᠋ + + + +@@ -2009,32 +2013,32 @@ + ᠤᠳᠠᠰᠤ ᠦᠬᠡᠢ ᠬᠡᠰᠡᠭ ᠬᠡᠪᠴᠢᠶᠡᠨ᠎ᠦ ᠰᠦᠯᠵᠢᠶ᠎ᠡ + + +- +- ++ ++ + system-monitor + 系统监视器 + + ++ + Restart +- ᠳᠠᠬᠢᠵᠤ ᠡᠬᠢᠯᠡᠬᠦᠯᠬᠦ᠌ ++ ᠳᠠᠬᠢᠵᠤ ᠡᠬᠢᠯᠡᠬᠦᠯᠬᠦ᠌ + + +- +- ++ ++ + Multiple users are logged in at the same time.Are you sure you want to %1 this system? + ᠣᠯᠠᠨ ᠬᠡᠷᠡᠭᠯᠡᠭᠴᠢ ᠬᠠᠮᠲᠤ ᠳᠤᠨᠢ ᠲᠡᠮᠳᠡᠭ᠍ᠯᠡᠵᠡᠢ ᠃ ᠲᠠ %1 ᠡᠨᠡ ᠰᠢᠰᠲ᠋ᠧᠮ ᠢ ᠲᠣᠭᠲᠠᠭᠠᠨ᠎ᠠ ᠤᠤ ? + + +- + Reboot +- ᠳᠠᠷᠤᠢ ᠳᠠᠬᠢᠨ ᠡᠬᠢᠯᠡᠬᠦᠯᠬᠦ ++ ᠳᠠᠬᠢᠨ ᠰᠡᠩᠭᠡᠷᠡᠭᠦᠯᠬᠦ + + + PowerOff + ᠬᠠᠭᠠᠬᠤ + + +- ++ + Shut Down + ᠪᠠᠢᠭᠤᠯᠤᠯᠭ᠎ᠠ + +@@ -2105,10 +2109,10 @@ + + MPRISWidget + +- + +- +- ++ ++ ++ + Unknown + ᠮᠡᠳᠡᠬᠦ ᠦᠭᠡᠢ + +@@ -2303,54 +2307,54 @@ + + PowerListWidget + +- ++ + + Hibernate + ᠢᠴᠡᠭᠡᠯᠡᠬᠦ + + +- ++ + + Turn off your computer, but the app stays open. When the computer is turned on, it can be restored to the state you left + ᠺᠣᠮᠫᠢᠦ᠋ᠲ᠋ᠧᠷ ᠢ ᠬᠠᠭᠠᠬᠤ ᠪᠣᠯᠪᠠᠴᠤ ᠬᠡᠷᠡᠭᠯᠡᠭᠡᠨ ᠦ ᠬᠤᠷᠠᠯ ᠨᠡᠭᠡᠭᠡᠬᠦ ᠪᠠᠶᠢᠳᠠᠯ ᠢᠶᠠᠨ ᠪᠠᠷᠢᠮᠲᠠᠯᠠᠳᠠᠭ ᠃ ᠺᠣᠮᠫᠢᠦ᠋ᠲ᠋ᠧᠷ ᠢ ᠨᠡᠭᠡᠭᠡᠬᠦ ᠦᠶ᠎ᠡ ᠳᠦ ᠂ ᠴᠢᠨᠦ ᠰᠠᠯᠤᠭᠰᠠᠨ ᠪᠠᠶᠢᠳᠠᠯ ᠢᠶᠠᠨ ᠰᠡᠷᠭᠦᠭᠡᠵᠦ ᠪᠣᠯᠣᠨ᠎ᠠ ᠃ + + +- ++ + + Suspend + ᠵᠤᠭ᠍ᠰᠤᠭᠠᠬᠤ + + +- ++ + + The computer stays on, but consumes less power. The app stays open and can quickly wake up and revert to where you left off + ᠺᠣᠮᠫᠢᠦ᠋ᠲ᠋ᠧᠷ ᠮᠠᠰᠢᠨ ᠢᠶᠠᠨ ᠨᠡᠭᠡᠭᠡᠬᠦ ᠪᠠᠶᠢᠳᠠᠯ ᠢᠶᠠᠨ ᠪᠠᠷᠢᠮᠲᠠᠯᠠᠳᠠᠭ ᠂ ᠭᠡᠪᠡᠴᠦ ᠴᠠᠬᠢᠯᠭᠠᠨ ᠬᠣᠷᠣᠭᠳᠠᠭᠤᠯᠭ᠎ᠠ ᠨᠡᠯᠢᠶᠡᠳ ᠪᠠᠭ᠎ᠠ ᠃ ᠬᠡᠷᠡᠭᠯᠡᠭᠡᠨ ᠦ ᠬᠤᠷᠠᠯ ᠨᠡᠭᠡᠭᠡᠬᠦ ᠪᠠᠶᠢᠳᠠᠯ ᠢᠶᠠᠨ ᠦᠷᠭᠦᠯᠵᠢᠯᠡᠭᠦᠯᠦᠭᠰᠡᠭᠡᠷ ᠂ ᠺᠣᠮᠫᠢᠦ᠋ᠲ᠋ᠧᠷ ᠢ ᠲᠦᠷᠭᠡᠨ ᠰᠡᠷᠢᠭᠡᠬᠦ ᠶᠢᠨ ᠬᠠᠮᠲᠤ ᠴᠢᠨᠦ ᠰᠠᠯᠤᠭᠰᠠᠨ ᠪᠠᠶᠢᠳᠠᠯ ᠢᠶᠠᠨ ᠰᠡᠷᠭᠦᠭᠡᠵᠦ ᠪᠣᠯᠣᠨ᠎ᠠ ᠃ + + +- ++ + + Restart + ᠳᠠᠬᠢᠨ ᠡᠬᠢᠯᠡᠬᠦᠯᠬᠦ + + +- ++ + Close all apps, and then restart your computer + ᠪᠤᠢ ᠪᠥᠬᠥᠢ ᠬᠡᠷᠡᠭ᠍ᠯᠡᠭᠡ ᠶᠢ ᠬᠠᠭᠠᠵᠤ ᠂ ᠳᠠᠷᠠᠭ᠎ᠠ ᠨᠢ ᠺᠣᠮᠫᠢᠦ᠋ᠲ᠋ᠧᠷ ᠢ ᠳᠠᠬᠢᠨ ᠰᠡᠩᠭᠡᠷᠡᠭᠦᠯᠦᠨ᠎ᠡ ᠃ + + +- ++ + + Shut Down + ᠪᠠᠢᠭᠤᠯᠤᠯᠭ᠎ᠠ + + +- ++ + + The current user logs out of the system, terminates the session, and returns to the login page + ᠣᠳᠣᠬᠠᠨ ᠳᠤ ᠬᠡᠷᠡᠭᠯᠡᠭᠴᠢ ᠰᠢᠰᠲ᠋ᠧᠮ ᠡᠴᠡ ᠬᠦᠴᠦᠨ ᠦᠭᠡᠶ ᠪᠣᠯᠭᠠᠵᠤ ᠂ ᠲᠡᠭᠦᠨ ᠦ ᠬᠤᠷᠠᠯ ᠤᠨ ᠦᠭᠡ ᠪᠡᠨ ᠳᠠᠭᠤᠰᠬᠠᠬᠤ ᠶᠢᠨ ᠬᠠᠮᠲᠤ ᠲᠡᠮᠳᠡᠭᠯᠡᠭᠰᠡᠨ ᠨᠢᠭᠤᠷ ᠲᠤ ᠪᠤᠴᠠᠵᠠᠶ ᠃ + + +- ++ + Logout + ᠬᠦᠴᠦᠨ ᠦᠬᠡᠢ ᠪᠤᠯᠭᠠᠬᠤ + +@@ -2359,31 +2363,31 @@ + ᠬᠠᠭᠠᠬᠤ + + +- ++ + + Close all apps, and then shut down your computer + ᠪᠤᠢ ᠪᠥᠬᠥᠢ ᠬᠡᠷᠡᠭ᠍ᠯᠡᠭᠡ ᠶᠢ ᠬᠠᠭᠠᠵᠤ ᠂ ᠳᠠᠷᠠᠭ᠎ᠠ ᠨᠢ ᠺᠣᠮᠫᠢᠦ᠋ᠲ᠋ᠧᠷ ᠢ ᠬᠠᠭᠠᠬᠤ + + +- ++ + + SwitchUser + ᠬᠡᠷᠡᠭᠯᠡᠭᠴᠢ ᠶᠢ ᠰᠣᠯᠢᠨ᠎ᠠ᠃ + + +- ++ + + LockScreen + ᠳᠡᠯᠪᠡᠴᠢᠬᠦ ᠃ + + +- ++ + + Log Out + ᠬᠦᠴᠦᠨ ᠦᠭᠡᠶ ᠪᠣᠯᠭᠠᠬᠤ᠃ + + +- ++ + + UpgradeThenRestart + ᠰᠢᠨᠡᠳᠬᠡᠭᠰᠡᠨ ᠦ ᠳᠠᠷᠠᠭ᠎ᠠ ᠳᠠᠬᠢᠨ ᠰᠡᠩᠬᠡᠷᠡᠭᠦᠯᠪᠡ ᠃ +@@ -2394,7 +2398,7 @@ + ᠪᠤᠢ ᠪᠥᠬᠥᠢ ᠬᠡᠷᠡᠭ᠍ᠯᠡᠭᠡ ᠶᠢ ᠬᠠᠭᠠᠵᠤ ᠂ ᠺᠣᠮᠫᠢᠦ᠋ᠲ᠋ᠧᠷ ᠢ ᠬᠠᠭᠠᠵᠤ ᠂ ᠳᠠᠷᠠᠭ᠎ᠠ ᠨᠢ ᠺᠣᠮᠫᠢᠦ᠋ᠲ᠋ᠧᠷ ᠢ ᠳᠠᠬᠢᠨ ᠨᠡᠭᠡᠭᠡᠨ᠎ᠡ ᠃ + + +- ++ + + UpgradeThenShutdown + ᠳᠡᠰ ᠳᠡᠪᠰᠢᠭᠰᠡᠨ ᠦ ᠳᠠᠷᠠᠭ᠎ᠠ ᠪᠠᠢ᠌ᠭᠤᠯᠭ᠎ᠠ ᠪᠠᠨ ᠬᠠᠭᠠᠪᠠ ᠃ +diff --git a/i18n_ts/pt.ts b/i18n_ts/pt.ts +index c8399e1..59f7d85 100644 +--- a/i18n_ts/pt.ts ++++ b/i18n_ts/pt.ts +@@ -98,10 +98,6 @@ + Password cannot be empty + + +- +- Password +- +- + + Input Password + +@@ -182,6 +178,10 @@ + voiceprint + + ++ ++ Password: ++ ++ + + + BatteryWidget +@@ -573,11 +573,11 @@ + + + +- Reboot ++ Shut Down + + + +- Shut Down ++ Restart + + + +diff --git a/i18n_ts/ru.ts b/i18n_ts/ru.ts +index f8d0564..5d66139 100644 +--- a/i18n_ts/ru.ts ++++ b/i18n_ts/ru.ts +@@ -98,10 +98,6 @@ + Password cannot be empty + + +- +- Password +- +- + + Input Password + +@@ -182,6 +178,10 @@ + voiceprint + + ++ ++ Password: ++ ++ + + + BatteryWidget +@@ -573,11 +573,11 @@ + + + +- Reboot ++ Shut Down + + + +- Shut Down ++ Restart + + + +diff --git a/i18n_ts/tr.ts b/i18n_ts/tr.ts +index d56b9f1..2481096 100644 +--- a/i18n_ts/tr.ts ++++ b/i18n_ts/tr.ts +@@ -97,7 +97,7 @@ + + + +- Password ++ Password: + + + +@@ -686,24 +686,24 @@ + Kullanıcı Değiştir + + +- +- ++ ++ + system-monitor + + + +- +- ++ ++ + Multiple users are logged in at the same time.Are you sure you want to %1 this system? + + + +- +- Reboot +- ++ ++ Restart ++ Yeniden Başlat + + +- ++ + Shut Down + + +@@ -770,10 +770,10 @@ + + MPRISWidget + +- + +- +- ++ ++ ++ + Unknown + + +@@ -808,90 +808,90 @@ + + PowerListWidget + +- ++ + + Hibernate + + + +- ++ + + Turn off your computer, but the app stays open. When the computer is turned on, it can be restored to the state you left + + + +- ++ + + Suspend + + + +- ++ + + The computer stays on, but consumes less power. The app stays open and can quickly wake up and revert to where you left off + + + +- ++ + + Restart + Yeniden Başlat + + +- ++ + Close all apps, and then restart your computer + + + +- ++ + + Shut Down + + + +- ++ + + Close all apps, and then shut down your computer + + + +- ++ + + Log Out + Çıkış + + +- ++ + + The current user logs out of the system, terminates the session, and returns to the login page + + + +- ++ + + SwitchUser + Kullanıcı Değiştir + + +- ++ + + LockScreen + + + +- ++ + + UpgradeThenRestart + + + +- ++ + + UpgradeThenShutdown + + + +- ++ + Logout + + +diff --git a/i18n_ts/ug.ts b/i18n_ts/ug.ts +index 3d2fb02..fac3b0e 100644 +--- a/i18n_ts/ug.ts ++++ b/i18n_ts/ug.ts +@@ -98,6 +98,11 @@ + Verify iris or enter password to unlock + نى ئېنىقلاش ياكى مەخپىي نومۇر كىرگۈزۈش ئارقىلىق قۇلۇپ ئېچىش Iris + ++ ++ ++ Password: ++ مەخپىي نومۇر ++ + + + Input Password +@@ -274,9 +279,8 @@ + 请将安全密钥插入USB端口 + + +- + Password +- مەخپىي نۇمۇر ++ مەخپىي نۇمۇر + + + +@@ -419,27 +423,27 @@ + + + The following programs prevent restarting, you can click "Cancel" and then close these programs. +- ++ تۆۋەندىكى پروگراممىلار قايتىدىن قوزغىتىشنى توسۇپ قالسىڭىز بولىدۇ،سىز «ئەمەلدىن قالدۇرۇش»نى چېكىپ ئاندىن بۇ تەرتىپلەرنى ئېتىۋەتسىڭىز بولىدۇ. + + + + The following programs prevent the shutdown, you can click "Cancel" and then close these programs. +- ++ تۆۋەندىكى پىروگرامما ئېتىۋېتىلگەنلىكىنى توسۇپ قالىدۇ،سىز «ئەمەلدىن قالدۇرۇش»نى چېكىپ ئاندىن بۇ پروگراممىلارنى ئېتىۋەتسىڭىز بولىدۇ. + + + + The following programs prevent suspend, you can click "Cancel" and then close these programs. +- ++ تۆۋەندىكى پروگرامما ئۇيقۇنى توسۇپ قالىدۇ،سىز «ئەمەلدىن قالدۇرۇش»نى چېكىپ ئاندىن بۇ پروگراممىلارنى ئېتىۋەتسىڭىز بولىدۇ. + + + + The following programs prevent hibernation, you can click "Cancel" and then close these programs. +- ++ تۆۋەندىكى پروگرامما ئۇيقۇنى توسۇپ قالىدۇ،سىز «ئەمەلدىن قالدۇرۇش»نى چېكىپ ئاندىن بۇ پروگراممىلارنى ئېتىۋەتسىڭىز بولىدۇ. + + + + The following programs prevent you from logging out, you can click "Cancel" and then close them. +- ++ تۆۋەندىكى پىروگراممىلار بىكار قىلىنىشنى توسۇپ قالىدۇ،سىز «ئەمەلدىن قالدۇرۇش»نى چېكىپ ئاندىن بۇ پروگراممىلارنى ئېتىۋەتسىڭىز بولىدۇ. + + + The following program is running to prevent the system from reboot! +@@ -2002,26 +2006,26 @@ + 无线局域网 + + +- +- ++ ++ + system-monitor +- ++ سىستىمىلىق كۆزەتكۈچ + + +- +- ++ ++ + Multiple users are logged in at the same time.Are you sure you want to %1 this system? + بىر قانچە ئابونت بىرلا ۋاقىتتا سىستېمىغا كىردى، بۇ %1 سىستېمىنى ئىشلىتىشنى جەزىملەشتۈرەمسىز؟ + + +- +- Reboot +- ++ ++ Restart ++ قايتىدىن قوزغىتىش + + +- ++ + Shut Down +- ++ تېلېفوننى ئېتىۋېتىش + + + +@@ -2090,10 +2094,10 @@ + + MPRISWidget + +- + +- +- ++ ++ ++ + Unknown + نامەلۇم + +@@ -2284,93 +2288,93 @@ + + PowerListWidget + +- ++ + + Hibernate + ئۆچەككە كىرىش + + +- ++ + + Turn off your computer, but the app stays open. When the computer is turned on, it can be restored to the state you left + كومپيۇتېرنى ئېتىك، ئەمما ئەپ ئوچۇق ھالەتنى ساقلايدۇ. كومپيۇتېر ئېچىلغان چاغدا، سىز ئايرىلغان چاغدىكى ھالەتكە قايتىدۇ + + +- ++ + + Suspend + توختىتىپ قويۇش + + +- ++ + + The computer stays on, but consumes less power. The app stays open and can quickly wake up and revert to where you left off + كومپيۇتېر ئوچۇق ھالەتنى ساقلايدۇ، ئەمما قۇۋۋەت سەرپىياتى بىر قەدەر تۆۋەن. بۇ ئەپ ئوچۇق ھالەتتە تۇرىدۇ، تېز سۈرئەتتە ئويغىنىدۇ ھەمدە سىز توختىغان جايغا قايتۇرغىلى بولىدۇ + + +- ++ + + Restart + قايتا قوزغىتىش + + +- ++ + Close all apps, and then restart your computer + بارلىق ئەپنى ئۆچۈرۈپ، ئاندىن كومپيۇتېرنى قايتا قوزغىتىش + + +- ++ + + Shut Down + ئېتىش + + +- ++ + + Log Out +- 注销 ++ بىكار قىلىۋەتمەك + + +- ++ + + The current user logs out of the system, terminates the session, and returns to the login page +- ++ نۆۋەتتە ئابونتلار سىستېمىدىن بىكار قىلىنىپ، سۆزلىشىشنى ئاخىرلاشتۇردى ھەمدە تىزىملىتىش كۆرۈنۈشىگە قايتىدۇ. + + +- ++ + + SwitchUser +- 切换用户 ++ خېرىدار ئالماشتۇرماق + + +- ++ + + LockScreen +- ++ قۇلۇپ ئېكرانى + + +- ++ + + UpgradeThenRestart +- ++ يېڭىلىغاندىن كېيىن قايتىدىن قوزغىتىش + + +- ++ + + UpgradeThenShutdown +- ++ يېڭىلانغاندىن كېيىن ئاپپارات ئېتىلىدۇ + + +- ++ + Logout +- ++ بىكار قىلىۋەتمەك + + + Power Off + 关机 + + +- ++ + + Close all apps, and then shut down your computer + بارلىق ئەپنى ئۆچۈرۈپ، ئاندىن كومپيۇتېرنى ئۆچۈرۈش +diff --git a/i18n_ts/zh_CN.ts b/i18n_ts/zh_CN.ts +index 60892b1..8804f60 100644 +--- a/i18n_ts/zh_CN.ts ++++ b/i18n_ts/zh_CN.ts +@@ -98,6 +98,11 @@ + Verify iris or enter password to unlock + 验证虹膜或输入密码解锁 + ++ ++ ++ Password: ++ 密码: ++ + + + Input Password +@@ -274,9 +279,8 @@ + 请将安全密钥插入USB端口 + + +- + Password +- 密码 ++ 密码 + + + +@@ -1986,32 +1990,32 @@ + 无线局域网 + + +- +- ++ ++ + system-monitor + 系统监视器 + + ++ + Restart +- 重启 ++ 重启 + + +- +- ++ ++ + Multiple users are logged in at the same time.Are you sure you want to %1 this system? + 同时有多个用户处于登录状态,你确定要%1吗? + + +- + Reboot +- 重启 ++ 重启 + + + PowerOff + 关机 + + +- ++ + Shut Down + 关机 + +@@ -2082,10 +2086,10 @@ + + MPRISWidget + +- + +- +- ++ ++ ++ + Unknown + 未知 + +@@ -2276,54 +2280,54 @@ + + PowerListWidget + +- ++ + + Hibernate + 休眠 + + +- ++ + + Turn off your computer, but the app stays open. When the computer is turned on, it can be restored to the state you left + 关闭电脑,但是应用会一直保持打开状态。当打开电脑时,可以恢复到你离开的状态。 + + +- ++ + + Suspend + 睡眠 + + +- ++ + + The computer stays on, but consumes less power. The app stays open and can quickly wake up and revert to where you left off + 电脑保持开机状态,但耗电较少。应用会一直保持打开状态,可快速唤醒电脑并恢复到你离开的状态。 + + +- ++ + + Restart + 重启 + + +- ++ + Close all apps, and then restart your computer + 关闭所有应用,然后重启电脑。 + + +- ++ + + Shut Down + 关机 + + +- ++ + + The current user logs out of the system, terminates the session, and returns to the login page + 当前用户从系统中注销,结束其会话并返回登录界面。 + + +- ++ + Logout + 注销 + +@@ -2332,31 +2336,31 @@ + 关机 + + +- ++ + + Close all apps, and then shut down your computer + 关闭所有应用,然后关闭电脑。 + + +- ++ + + SwitchUser + 切换用户 + + +- ++ + + LockScreen + 锁屏 + + +- ++ + + Log Out + 注销 + + +- ++ + + UpgradeThenRestart + 更新后重启 +@@ -2367,7 +2371,7 @@ + 关闭所有应用,关闭电脑,然后重新打开电脑。 + + +- ++ + + UpgradeThenShutdown + 更新后关机 +diff --git a/i18n_ts/zh_HK.ts b/i18n_ts/zh_HK.ts +index eb8435a..187d437 100644 +--- a/i18n_ts/zh_HK.ts ++++ b/i18n_ts/zh_HK.ts +@@ -98,6 +98,11 @@ + Verify iris or enter password to unlock + 驗證虹膜或輸入密碼解鎖 + ++ ++ ++ Password: ++ 密码: ++ + + + Input Password +@@ -111,12 +116,12 @@ + + + User name input error! +- ++ 使用者名输入错误! + + + + login +- ++ 登录 + + + +@@ -274,9 +279,8 @@ + 將 Ukey 插入 USB 埠 + + +- + Password +- 密碼 ++ 密碼 + + + +@@ -2006,28 +2010,32 @@ + 無線局域網 + + +- +- ++ ++ + system-monitor + 系統監視器 + + +- +- ++ ++ + Multiple users are logged in at the same time.Are you sure you want to %1 this system? + 多個用戶同時登錄,您確定要 %1 此系統嗎? + + +- +- Reboot ++ ++ Restart + 重啟 + ++ ++ Reboot ++ 重啟 ++ + + PowerOff + 關機 + + +- ++ + Shut Down + 關機 + +@@ -2098,10 +2106,10 @@ + + MPRISWidget + +- + +- +- ++ ++ ++ + Unknown + 未知 + +@@ -2296,54 +2304,54 @@ + + PowerListWidget + +- ++ + + Hibernate + 休眠 + + +- ++ + + Turn off your computer, but the app stays open. When the computer is turned on, it can be restored to the state you left + 關閉電腦,但應用會保持打開狀態。當計算機打開時,它可以恢復到您離開時的狀態 + + +- ++ + + Suspend + 睡眠 + + +- ++ + + The computer stays on, but consumes less power. The app stays open and can quickly wake up and revert to where you left off + 計算機保持打開狀態,但消耗的電量更少。該應用程式保持打開狀態,可以快速喚醒並恢復到上次中斷的位置 + + +- ++ + + Restart + 重啟 + + +- ++ + Close all apps, and then restart your computer + 關閉所有應用,然後重啟電腦。 + + +- ++ + + Shut Down + 關機 + + +- ++ + + The current user logs out of the system, terminates the session, and returns to the login page + 當前使用者從系統中註銷,結束其會話並返回登錄介面。 + + +- ++ + Logout + 註銷 + +@@ -2352,31 +2360,31 @@ + 關機 + + +- ++ + + Close all apps, and then shut down your computer + 關閉所有應用,然後關閉電腦 + + +- ++ + + SwitchUser + 切換使用者 + + +- ++ + + LockScreen + 鎖屏 + + +- ++ + + Log Out + 註銷 + + +- ++ + + UpgradeThenRestart + 更新後重啟 +@@ -2387,7 +2395,7 @@ + 關閉所有應用,關閉計算機,然後重新打開計算機 + + +- ++ + + UpgradeThenShutdown + 更新後關機 +diff --git a/src/common/definetypes.h b/src/common/definetypes.h +index 9d3afd5..b7fbbb7 100644 +--- a/src/common/definetypes.h ++++ b/src/common/definetypes.h +@@ -38,7 +38,7 @@ typedef enum _LOCK_CMD_ID_e + LOCK_CMD_ID_LOGIN1_PREPAREFORSLEEP, + LOCK_CMD_ID_LOGIN1_SESSION_ACTIVE_CHANGED, + LOCK_CMD_ID_LOGIN1_IS_SESSION_ACTIVE, +- LOCK_CMD_ID_LOGIN1_LIDSTATE_CHANGED, ++ LOCK_CMD_ID_LOGIN1_BLOCKINHIBITED_CHANGED, + LOCK_CMD_ID_LOGIN1_SET_POWER_MANAGER, + LOCK_CMD_ID_LOGIN1_GET_POWER_MANAGER_CANSWITCHUSER, + LOCK_CMD_ID_LOGIN1_GET_POWER_MANAGER_CANHIBERNATE, +diff --git a/src/dbusifs/login1helper.cpp b/src/dbusifs/login1helper.cpp +index 333d546..bbf0e1f 100644 +--- a/src/dbusifs/login1helper.cpp ++++ b/src/dbusifs/login1helper.cpp +@@ -39,14 +39,24 @@ Login1Helper::Login1Helper(QObject *parent) : QObject(parent) + if (!sessionPath.isValid()) { + qWarning() << "Get session error:" << sessionPath.error(); + } else { +- QString session = sessionPath.value().path(); ++ m_strSessionPath = sessionPath.value().path(); + QDBusConnection::systemBus().connect( +- login1Service, session, login1SessionInterface, QStringLiteral("Lock"), this, SIGNAL(requestLock())); ++ login1Service, ++ m_strSessionPath, ++ login1SessionInterface, ++ QStringLiteral("Lock"), ++ this, ++ SIGNAL(requestLock())); + QDBusConnection::systemBus().connect( +- login1Service, session, login1SessionInterface, QStringLiteral("Unlock"), this, SIGNAL(requestUnlock())); ++ login1Service, ++ m_strSessionPath, ++ login1SessionInterface, ++ QStringLiteral("Unlock"), ++ this, ++ SIGNAL(requestUnlock())); + + // 获取会话激活状态 +- QDBusInterface iface(login1Service, session, propertiesInterface, QDBusConnection::systemBus()); ++ QDBusInterface iface(login1Service, m_strSessionPath, propertiesInterface, QDBusConnection::systemBus()); + QDBusReply reply = iface.call("Get", login1SessionInterface, "Active"); + if (reply.isValid()) { + m_isSessionActive = reply.value().toBool(); +@@ -58,7 +68,7 @@ Login1Helper::Login1Helper(QObject *parent) : QObject(parent) + // 监听属性变化 + QDBusConnection::systemBus().connect( + login1Service, +- session, ++ m_strSessionPath, + propertiesInterface, + "PropertiesChanged", + this, +@@ -119,8 +129,8 @@ void Login1Helper::onHibitedWatcherMessage() + QDBusInterface iface(login1Service, login1Path, propertiesInterface, QDBusConnection::systemBus()); + QDBusReply reply = iface.call("Get", "org.freedesktop.login1.Manager", "BlockInhibited"); + if (reply.isValid()) { +- QString lidState = reply.value().toString(); +- Q_EMIT lidStateChanged(lidState); ++ QString blockInhibited = reply.value().toString(); ++ Q_EMIT blockInhibitedChanged(blockInhibited); + } else { + qDebug() << "Failed to get lid closed event!"; + } +@@ -145,14 +155,17 @@ bool Login1Helper::getCanPowerManager(const QString &powerManagerfunc) + } + return canFlag; + } ++ + bool Login1Helper::isCanHibernate() + { + return m_isCanHibernate; + } ++ + bool Login1Helper::isCanSuspend() + { + return m_isCanSuspend; + } ++ + bool Login1Helper::isCanReboot() + { + return m_isCanReboot; +@@ -182,3 +195,12 @@ bool Login1Helper::canAction(Action action) + return false; + } + } ++ ++void Login1Helper::Unlock() ++{ ++ if (!m_strSessionPath.isEmpty()) { ++ QDBusInterface iface(login1Service, m_strSessionPath, login1SessionInterface, QDBusConnection::systemBus()); ++ iface.call("Unlock"); ++ qDebug() << "login1 unlock session:" << m_strSessionPath; ++ } ++} +diff --git a/src/dbusifs/login1helper.h b/src/dbusifs/login1helper.h +index 756e498..ea616fe 100644 +--- a/src/dbusifs/login1helper.h ++++ b/src/dbusifs/login1helper.h +@@ -59,6 +59,8 @@ public: + bool isCanPowerOff(); + bool canAction(Action action); + ++ void Unlock(); ++ + public Q_SLOTS: + /** + * @brief 会话属性改变 +@@ -106,9 +108,9 @@ Q_SIGNALS: + /** + * @brief 程序阻塞关机/睡眠状态改变 + * +- * @param lidState 阻塞类型 ++ * @param blockInhibited 阻塞类型 + */ +- void lidStateChanged(QString lidState); ++ void blockInhibitedChanged(QString blockInhibited); + + private: + bool m_isSessionActive = false; /**< 是否处于活跃状态 */ +@@ -120,6 +122,8 @@ private: + bool m_isCanPowerOff = true; + bool m_isCanLockScreen = true; + bool m_isCanLogout = true; ++ ++ QString m_strSessionPath; // 当前会话路径 + }; + + #endif // LOGIN1HELPER_H +diff --git a/src/dbusifs/upowerhelper.cpp b/src/dbusifs/upowerhelper.cpp +index cef2613..fbc1cd5 100644 +--- a/src/dbusifs/upowerhelper.cpp ++++ b/src/dbusifs/upowerhelper.cpp +@@ -64,6 +64,9 @@ UpowerHelper::UpowerHelper(QObject *parent) : QObject(parent) + if (interfaceReply.isValid()) { + m_isBattery = interfaceReply.value().toBool(); + } ++ // 监听屏幕关屏信号 ++ QDBusConnection::systemBus().connect( ++ upowerService, upowerPath, propertiesInterface, "PropertiesChanged", this, SLOT(onLidWatcherMessage())); + } + + m_engineDevice = EngineDevice::getInstance(); +@@ -123,3 +126,16 @@ void UpowerHelper::dealMessage(QDBusMessage) + { + Q_EMIT batteryStatusChanged(getBatteryIconName()); + } ++ ++void UpowerHelper::onLidWatcherMessage() ++{ ++ QDBusInterface iface(upowerService, upowerPath, propertiesInterface, QDBusConnection::systemBus()); ++ QDBusReply reply = iface.call("Get", upowerInterface, "LidIsClosed"); ++ if (reply.isValid()) { ++ bool isLidClosed = reply.value().toBool(); ++ Q_EMIT lidStateChanged(isLidClosed); ++ qDebug() << "lid state:" << isLidClosed; ++ } else { ++ qDebug() << "Failed to get lid closed event!"; ++ } ++} +diff --git a/src/dbusifs/upowerhelper.h b/src/dbusifs/upowerhelper.h +index 6042930..74d9643 100644 +--- a/src/dbusifs/upowerhelper.h ++++ b/src/dbusifs/upowerhelper.h +@@ -51,11 +51,22 @@ private Q_SLOTS: + + void dealMessage(QDBusMessage); + ++ /** ++ * @brief onLidWatcherMessage 屏幕开关信号监听 ++ */ ++ void onLidWatcherMessage(); ++ + Q_SIGNALS: + void batteryStatusChanged(QString iconName); + + void batteryChanged(QStringList args); + ++ /** ++ * @brief lidStateChanged 屏幕亮屏状态 ++ * @param isClosed 是否关屏 ++ */ ++ void lidStateChanged(bool isClosed); ++ + private: + QDBusInterface *m_upowerInterface = nullptr; + QDBusInterface *m_batInterface = nullptr; +diff --git a/src/lock-backend/dbusupperinterface.cpp b/src/lock-backend/dbusupperinterface.cpp +index b87aa8c..2c45c22 100644 +--- a/src/lock-backend/dbusupperinterface.cpp ++++ b/src/lock-backend/dbusupperinterface.cpp +@@ -95,7 +95,8 @@ void DbusUpperInterface::initConnections() + &Login1Helper::sessionActiveChanged, + this, + &DbusUpperInterface::onLogin1SessionActiveChanged); +- connect(m_login1Helper, &Login1Helper::lidStateChanged, this, &DbusUpperInterface::onLidStateChanged); ++ connect( ++ m_login1Helper, &Login1Helper::blockInhibitedChanged, this, &DbusUpperInterface::onBlockInhibitedChanged); + } + if (m_gsettingsHelper) { + connect( +@@ -140,11 +141,11 @@ void DbusUpperInterface::initConnections() + &GSettingsHelper::usdMediaKeysConfigChanged, + this, + &DbusUpperInterface::onUsdMediaKeysConfigChanged); +- connect( +- m_gsettingsHelper, +- &GSettingsHelper::usdMediaStateKeysConfigChanged, +- this, +- &DbusUpperInterface::onUsdMediaStateKeysConfigChanged); ++ connect( ++ m_gsettingsHelper, ++ &GSettingsHelper::usdMediaStateKeysConfigChanged, ++ this, ++ &DbusUpperInterface::onUsdMediaStateKeysConfigChanged); + } + if (m_bioAuth) { + connect(m_bioAuth, &BioAuthenticate::bioAuthShowMessage, this, &DbusUpperInterface::onBioAuthShowMessage); +@@ -167,6 +168,7 @@ void DbusUpperInterface::initConnections() + if (m_upowerHelper) { + connect(m_upowerHelper, &UpowerHelper::batteryStatusChanged, this, &DbusUpperInterface::onBatteryStatusChanged); + connect(m_upowerHelper, &UpowerHelper::batteryChanged, this, &DbusUpperInterface::onBatteryChanged); ++ connect(m_upowerHelper, &UpowerHelper::lidStateChanged, this, &DbusUpperInterface::onLidStateChanged); + } + if (m_sessionWatcher) { + connect(m_sessionWatcher, &SessionWatcher::sessionIdle, this, &DbusUpperInterface::onSessionIdleReceived); +@@ -449,8 +451,13 @@ void DbusUpperInterface::Logout() + + void DbusUpperInterface::UnLock() + { +- if (m_procLockDialog.state() != QProcess::NotRunning) +- m_procLockDialog.kill(); ++ qDebug() << "manual unlcok!!"; ++ if (m_login1Helper) { ++ m_login1Helper->Unlock(); ++ } else { ++ if (m_procLockDialog.state() != QProcess::NotRunning) ++ m_procLockDialog.kill(); ++ } + } + + bool DbusUpperInterface::LockByBlank(int nType) +@@ -479,54 +486,54 @@ bool DbusUpperInterface::LockByBlank(int nType) + return false; + } + } +- if (m_procLockDialog.state() != QProcess::NotRunning) { +- if (isNeedLock) { +- if (!lockState) { +- //锁屏状态通过lockState获取,如果未锁屏,则发送锁屏信号 +- emitLockState(true); +- } +- QDBusMessage message; +- message = QDBusMessage::createSignal(SS_DBUS_PATH, SS_DBUS_INTERFACE, "SecondRunParam"); +- message << "CloseLock"; +- QDBusConnection::sessionBus().send(message); +- return true; +- } else { +- return false; +- } +- } else { ++ if (isNeedLock) { + qDebug() << "LockByBlank ---"; + lockState = false; + m_bSlpState = false; +- if (m_gsettingsHelper->GetScreenSaverConf(KEY_LOCK_TIMEOUT).toInt() != -1 && isNeedLock) { ++ if (m_gsettingsHelper->GetLockScreenConf(KEY_LOCK_TIMEOUT).toInt() != -1 && isNeedLock) { + // 空闲关屏且关屏时间与睡眠时间一致时直接锁定 + if (nType == 0 + && ((m_gsettingsHelper->GetPowerManagerConf(KEY_SLEEP_DISPLAY_AC).toInt() + == m_gsettingsHelper->GetPowerManagerConf(KEY_SLEEP_COMPUTER_AC).toInt()) + && m_gsettingsHelper->GetPowerManagerConf(KEY_SLEEP_COMPUTER_AC).toInt() != -1)) { + qDebug() << "close delay same with sleep delay then lock!"; +- QString cmd = QString("/usr/bin/ukui-screensaver-dialog --blank --delay %1 --has-lock %2") +- .arg(1000) +- .arg(isNeedLock ? 1 : 0); +- qDebug() << cmd; +- m_procLockDialog.start(cmd); ++ if (m_procLockDialog.state() != QProcess::NotRunning) { ++ QDBusMessage message; ++ message = QDBusMessage::createSignal(SS_DBUS_PATH, SS_DBUS_INTERFACE, "SecondRunParam"); ++ QString strParam = QString("CloseLock&delay=%1&hasLock=%2").arg(1000).arg(isNeedLock ? 1 : 0); ++ message << strParam; ++ QDBusConnection::sessionBus().send(message); ++ } else { ++ QString cmd = QString("/usr/bin/ukui-screensaver-dialog --blank --delay %1 --has-lock %2") ++ .arg(1000) ++ .arg(isNeedLock ? 1 : 0); ++ qDebug() << cmd; ++ m_procLockDialog.start(cmd); ++ } + emitLockState(true); +- return true; + } else { + delayLockScreen(); +- return false; + } + } else { +- QString cmd = QString("/usr/bin/ukui-screensaver-dialog --blank --delay %1 --has-lock %2") +- .arg(2000) +- .arg(isNeedLock ? 1 : 0); +- qDebug() << cmd; +- m_procLockDialog.start(cmd); ++ if (m_procLockDialog.state() != QProcess::NotRunning) { ++ QDBusMessage message; ++ message = QDBusMessage::createSignal(SS_DBUS_PATH, SS_DBUS_INTERFACE, "SecondRunParam"); ++ QString strParam = QString("CloseLock&delay=%1&hasLock=%2").arg(2000).arg(isNeedLock ? 1 : 0); ++ message << strParam; ++ QDBusConnection::sessionBus().send(message); ++ } else { ++ QString cmd = QString("/usr/bin/ukui-screensaver-dialog --blank --delay %1 --has-lock %2") ++ .arg(2000) ++ .arg(isNeedLock ? 1 : 0); ++ qDebug() << cmd; ++ m_procLockDialog.start(cmd); ++ } + emitLockState(true); + } + return true; ++ } else { ++ return false; + } +- +- return true; + } + + void DbusUpperInterface::SetLockState() +@@ -724,7 +731,7 @@ QString DbusUpperInterface::GetInformation(QString strJson) + retObj["CmdId"] = cmdId; + GetUsdMediaKeys(rootObj, retObj); + break; +- case LOCK_CMD_ID_GSETTINGS_GET_USD_MEDIA_STATE_KEYS_CONF: ++ case LOCK_CMD_ID_GSETTINGS_GET_USD_MEDIA_STATE_KEYS_CONF: + retObj["CmdId"] = cmdId; + GetUsdMediaStateKeys(rootObj, retObj); + break; +@@ -786,7 +793,6 @@ QString DbusUpperInterface::GetInformation(QString strJson) + case LOCK_CMD_ID_LOCK_SCREEN_GET_THEMES: + retObj["CmdId"] = cmdId; + retObj["Content"] = getSaverTheme(); +- ; + break; + case LOCK_CMD_ID_BIOAUTH_GET_AVAILABLE_DEVICES: + retObj["CmdId"] = cmdId; +@@ -912,7 +918,7 @@ int DbusUpperInterface::SetInformation(QString strJson) + case LOCK_CMD_ID_KWIN_BLOCK_SHORTCUT: + nRet = blockShortcut(rootObj); + break; +- case LOCK_CMD_ID_GSETTINGS_SET_USD_MEDIA_STATE_KEYS_CONF: ++ case LOCK_CMD_ID_GSETTINGS_SET_USD_MEDIA_STATE_KEYS_CONF: + nRet = SetUsdMediaStateKeys(rootObj); + break; + default: +@@ -1074,7 +1080,7 @@ QString DbusUpperInterface::GetDefaultAuthUser() + if (!isGreeterMode()) { + strUserName = getenv("USER"); + } else { +- //获取lightdm传过来的被选中的用户 ++ // 获取lightdm传过来的被选中的用户 + QString selectedUser = m_lightDmHelper->selectUserHint(); + if (!selectedUser.isEmpty()) { + qDebug() << "SelectUserHint: " << selectedUser; +@@ -1089,7 +1095,7 @@ QString DbusUpperInterface::GetDefaultAuthUser() + } else if (m_lightDmHelper->selectGuestHint()) { + qDebug() << "SelectGuest"; + strUserName = "*guest"; +- } else if (m_lightDmHelper->getUsersInfo().count() == 1) { //如果只有一个用户,默认选中 ++ } else if (m_lightDmHelper->getUsersInfo().count() == 1) { // 如果只有一个用户,默认选中 + strUserName = m_lightDmHelper->getUsersInfo()[0]->name(); + } else { + QString lastLoginUser = m_config->getLastLoginUser(); +@@ -1253,7 +1259,7 @@ void DbusUpperInterface::onLogin1ReqLock() + retObj["CmdId"] = LOCK_CMD_ID_LOGIN1_REQ_LOCK; + SendUpdateInfoSig(QString(QJsonDocument(retObj).toJson())); + // LockScreensaver(); +- //调用屏保会导致在两个已登录用户切锁屏,会出现屏保界面,因此改为调用锁屏 ++ // 调用屏保会导致在两个已登录用户切锁屏,会出现屏保界面,因此改为调用锁屏 + Lock(); + } + +@@ -1317,11 +1323,11 @@ void DbusUpperInterface::onLogin1SessionActiveChanged(bool isActive) + SendUpdateInfoSig(QString(QJsonDocument(retObj).toJson())); + } + +-void DbusUpperInterface::onLidStateChanged(QString lidState) ++void DbusUpperInterface::onBlockInhibitedChanged(QString blockInhibited) + { + QJsonObject retObj; +- retObj["CmdId"] = LOCK_CMD_ID_LOGIN1_LIDSTATE_CHANGED; +- retObj["Lidstate"] = lidState; ++ retObj["CmdId"] = LOCK_CMD_ID_LOGIN1_BLOCKINHIBITED_CHANGED; ++ retObj["BlockInhibited"] = blockInhibited; + SendUpdateInfoSig(QString(QJsonDocument(retObj).toJson())); + } + +@@ -1363,23 +1369,37 @@ void DbusUpperInterface::delayLockScreen() + m_timerLock = new QTimer(this); + connect(m_timerLock, &QTimer::timeout, this, &DbusUpperInterface::onLockScreenTimeout); + } +- qDebug() << "LockTimeout:" << m_gsettingsHelper->GetScreenSaverConf(KEY_LOCK_TIMEOUT).toInt(); +- if (m_gsettingsHelper->GetScreenSaverConf(KEY_LOCK_TIMEOUT).toInt() != -1) { ++ int nLockTimeout = m_gsettingsHelper->GetLockScreenConf(KEY_LOCK_TIMEOUT).toInt(); ++ qDebug() << "LockTimeout:" << nLockTimeout; ++ if (nLockTimeout != -1) { + stopDelayLockScreen(); +- m_timerLock->start(m_gsettingsHelper->GetScreenSaverConf(KEY_LOCK_TIMEOUT).toInt() * 1000); ++ if (m_procLockDialog.state() != QProcess::NotRunning) { ++ QDBusMessage message; ++ message = QDBusMessage::createSignal(SS_DBUS_PATH, SS_DBUS_INTERFACE, "SecondRunParam"); ++ QString strParam = QString("CloseLock&delay=%1&hasLock=1").arg(nLockTimeout * 1000); ++ message << strParam; ++ QDBusConnection::sessionBus().send(message); ++ } else { ++ QString cmd ++ = QString("/usr/bin/ukui-screensaver-dialog --blank --delay %1 --has-lock 1").arg(nLockTimeout * 1000); ++ qDebug() << cmd; ++ m_procLockDialog.start(cmd); ++ } ++ emitLockState(true); ++ m_timerLock->start(m_gsettingsHelper->GetLockScreenConf(KEY_LOCK_TIMEOUT).toInt() * 1000); + } + } + + void DbusUpperInterface::stopDelayLockScreen() + { + if (m_timerLock && m_timerLock->isActive()) { ++ UnLock(); + m_timerLock->stop(); + } + } + + void DbusUpperInterface::onLockScreenTimeout() + { +- Lock(); + m_timerLock->stop(); + } + +@@ -1397,6 +1417,16 @@ void DbusUpperInterface::onBatteryChanged(QStringList batteryArgs) + SendUpdateInfoSig(QString(QJsonDocument(retObj).toJson())); + } + ++void DbusUpperInterface::onLidStateChanged(bool isClosed) ++{ ++ if (!isClosed) { ++ if (m_gsettingsHelper->GetPowerManagerConf(KEY_LOCK_BLANKSCREEN).toBool()) { ++ m_nStatus &= ~SESSION_STATUS_SCREENCLOSE; ++ } ++ stopDelayLockScreen(); ++ } ++} ++ + void DbusUpperInterface::onLockScreenConfigChanged(QString strKey, QVariant value) + { + if (strKey == KEY_BACKGROUND) { +@@ -1664,22 +1694,22 @@ void DbusUpperInterface::onUsdMediaStateKeysConfigChanged(QString strKey, QVaria + retObj["CmdId"] = LOCK_CMD_ID_GSETTINGS_USD_MEDIA_STATE_KEYS_CONF_CHANGED; + retObj["Key"] = strKey; + switch (value.type()) { +- case QVariant::Bool: +- retObj["Value"] = value.toBool(); ++ case QVariant::Bool: ++ retObj["Value"] = value.toBool(); + break; +- case QVariant::Int: ++ case QVariant::Int: + retObj["Value"] = value.toInt(); + break; +- case QVariant::String: ++ case QVariant::String: + retObj["Value"] = value.toString(); + break; +- case QVariant::UInt: ++ case QVariant::UInt: + retObj["Value"] = value.toDouble(); + break; +- case QVariant::Double: ++ case QVariant::Double: + retObj["Value"] = value.toDouble(); + break; +- default: ++ default: + return; + } + SendUpdateInfoSig(QString(QJsonDocument(retObj).toJson())); +@@ -2524,23 +2554,23 @@ void DbusUpperInterface::GetUsdMediaStateKeys(QJsonObject &reqObj, QJsonObject & + if (!strKey.isEmpty()) { + QVariant value = m_gsettingsHelper->GetUsdMediaStateKeys(strKey); + switch (value.type()) { +- case QVariant::Bool: +- retObj[strKey] = value.toBool(); +- return; +- case QVariant::Int: +- retObj[strKey] = value.toInt(); +- return; +- case QVariant::String: +- retObj[strKey] = value.toString(); +- return; +- case QVariant::UInt: +- retObj[strKey] = value.toDouble(); +- return; +- case QVariant::Double: +- retObj[strKey] = value.toDouble(); +- return; +- default: +- break; ++ case QVariant::Bool: ++ retObj[strKey] = value.toBool(); ++ return; ++ case QVariant::Int: ++ retObj[strKey] = value.toInt(); ++ return; ++ case QVariant::String: ++ retObj[strKey] = value.toString(); ++ return; ++ case QVariant::UInt: ++ retObj[strKey] = value.toDouble(); ++ return; ++ case QVariant::Double: ++ retObj[strKey] = value.toDouble(); ++ return; ++ default: ++ break; + } + } + retObj["Ret"] = -2; +diff --git a/src/lock-backend/dbusupperinterface.h b/src/lock-backend/dbusupperinterface.h +index 6fc89c3..6070942 100644 +--- a/src/lock-backend/dbusupperinterface.h ++++ b/src/lock-backend/dbusupperinterface.h +@@ -188,14 +188,16 @@ public Q_SLOTS: + /** + * @brief 程序阻塞关机/睡眠状态改变 + * +- * @param lidState 阻塞类型 ++ * @param blockInhibited 阻塞类型 + */ +- void onLidStateChanged(QString lidState); ++ void onBlockInhibitedChanged(QString blockInhibited); + + void onBatteryStatusChanged(QString iconName); + + void onBatteryChanged(QStringList batteryArgs); + ++ void onLidStateChanged(bool isClosed); ++ + void onLockScreenConfigChanged(QString strKey, QVariant value); + void onScreenSaverConfigChanged(QString strKey, QVariant value); + void onPowerManagerConfigChanged(QString strKey, QVariant value); +diff --git a/src/lock-dialog/backenddbushelper.cpp b/src/lock-dialog/backenddbushelper.cpp +index e033858..fbbb703 100644 +--- a/src/lock-dialog/backenddbushelper.cpp ++++ b/src/lock-dialog/backenddbushelper.cpp +@@ -1042,8 +1042,8 @@ void BackendDbusHelper::onUpdateInformation(const QString &strJson) + case LOCK_CMD_ID_GSETTINGS_SESSION_CONF_CHANGED: { + ParseSessionConf(objRes); + } break; +- case LOCK_CMD_ID_LOGIN1_LIDSTATE_CHANGED: { +- ParseLidstateChanged(objRes); ++ case LOCK_CMD_ID_LOGIN1_BLOCKINHIBITED_CHANGED: { ++ ParseBlockInhibitedChanged(objRes); + } break; + case LOCK_CMD_ID_GSETTINGS_KEYBOARD_CONF_CHANGED: { + ParseCapslockConf(objRes); +@@ -1060,8 +1060,7 @@ void BackendDbusHelper::onUpdateInformation(const QString &strJson) + case LOCK_CMD_ID_GSETTINGS_USD_MEDIAKEYS_CONF_CHANGED: { + ParseUsdMediaKeysConf(objRes); + } break; +- case LOCK_CMD_ID_GSETTINGS_USD_MEDIA_STATE_KEYS_CONF_CHANGED: +- { ++ case LOCK_CMD_ID_GSETTINGS_USD_MEDIA_STATE_KEYS_CONF_CHANGED: { + ParseUsdMediaStateKeysConf(objRes); + } break; + case LOCK_CMD_ID_UPOWER_BATTERY_STATUS: { +@@ -1268,10 +1267,10 @@ bool BackendDbusHelper::ParseLogin1SessionActiveChanged(const QJsonObject &objRe + return true; + } + +-bool BackendDbusHelper::ParseLidstateChanged(const QJsonObject &objRes) ++bool BackendDbusHelper::ParseBlockInhibitedChanged(const QJsonObject &objRes) + { +- QString lidstate = objRes.value("Lidstate").toString(); +- Q_EMIT lidstateChanged(lidstate); ++ QString blockInhibited = objRes.value("BlockInhibited").toString(); ++ Q_EMIT blockInhibitedChanged(blockInhibited); + return true; + } + +@@ -2176,7 +2175,7 @@ QVariant BackendDbusHelper::getUsdMediaStateKeys(QString strKey) + QJsonObject jsonCmd; + jsonCmd["CmdId"] = LOCK_CMD_ID_GSETTINGS_GET_USD_MEDIA_STATE_KEYS_CONF; + jsonCmd["Key"] = strKey; +- QJsonObject objRes ; ++ QJsonObject objRes; + QDBusPendingReply reply = GetInformation(QString(QJsonDocument(jsonCmd).toJson())); + reply.waitForFinished(); + if (reply.isError()) { +@@ -2186,22 +2185,22 @@ QVariant BackendDbusHelper::getUsdMediaStateKeys(QString strKey) + QJsonParseError jsonParseError; + const QJsonDocument jsonDoc = QJsonDocument::fromJson(strResponse.toUtf8(), &jsonParseError); + if (jsonParseError.error != QJsonParseError::NoError) { +- qInfo()<<"getUsdMediaStateKeys Parse json failed!!"; ++ qInfo() << "getUsdMediaStateKeys Parse json failed!!"; + } else { + objRes = jsonDoc.object(); + if (objRes.isEmpty()) { +- qInfo()<<"getUsdMediaStateKeys Json is null!!"; ++ qInfo() << "getUsdMediaStateKeys Json is null!!"; + } else { + if (objRes.contains("CmdId") && objRes.contains("Ret")) { + int nCmdId = objRes.value("CmdId").toInt(-1); + int nRet = objRes.value("Ret").toInt(-1); + if (nCmdId != LOCK_CMD_ID_GSETTINGS_GET_USD_MEDIA_STATE_KEYS_CONF || nRet != 0) { +- qInfo()<<"getUsdMediaStateKeys Failed!!"; ++ qInfo() << "getUsdMediaStateKeys Failed!!"; + } else { + varValue = objRes.value(strKey); + } + } else { +- qInfo()<<"getUsdMediaStateKeys Json is invalid!!"; ++ qInfo() << "getUsdMediaStateKeys Json is invalid!!"; + } + } + } +@@ -2215,23 +2214,23 @@ bool BackendDbusHelper::setUsdMediaStateKeys(QString strKey, QVariant value) + jsonCmd["CmdId"] = LOCK_CMD_ID_GSETTINGS_SET_USD_MEDIA_STATE_KEYS_CONF; + jsonCmd["Key"] = strKey; + switch (value.type()) { +- case QVariant::Bool: +- jsonCmd["Value"] = value.toBool(); +- break; +- case QVariant::Int: +- jsonCmd["Value"] = value.toInt(); +- break; +- case QVariant::String: +- jsonCmd["Value"] = value.toString(); +- break; +- case QVariant::UInt: +- jsonCmd["Value"] = value.toDouble(); +- break; +- case QVariant::Double: +- jsonCmd["Value"] = value.toDouble(); +- break; +- default: +- return false; ++ case QVariant::Bool: ++ jsonCmd["Value"] = value.toBool(); ++ break; ++ case QVariant::Int: ++ jsonCmd["Value"] = value.toInt(); ++ break; ++ case QVariant::String: ++ jsonCmd["Value"] = value.toString(); ++ break; ++ case QVariant::UInt: ++ jsonCmd["Value"] = value.toDouble(); ++ break; ++ case QVariant::Double: ++ jsonCmd["Value"] = value.toDouble(); ++ break; ++ default: ++ return false; + } + QDBusPendingReply reply = SetInformation(QString(QJsonDocument(jsonCmd).toJson())); + reply.waitForFinished(); +diff --git a/src/lock-dialog/backenddbushelper.h b/src/lock-dialog/backenddbushelper.h +index 70191b5..3bac8b9 100644 +--- a/src/lock-dialog/backenddbushelper.h ++++ b/src/lock-dialog/backenddbushelper.h +@@ -180,7 +180,7 @@ public Q_SLOTS: // METHODS + inline QDBusPendingReply GetBlankState() + { + QList argumentList; +- return asyncCallWithArgumentList(QStringLiteral("GetBlankState"), argumentList); ++ return callWithArgumentList(QDBus::Block, QStringLiteral("GetBlankState"), argumentList); + } + + /** +@@ -345,7 +345,7 @@ Q_SIGNALS: // SIGNALS + + void currentSessionChanged(QString strSession); + +- void lidstateChanged(QString lidstate); ++ void blockInhibitedChanged(QString lidstate); + + void batteryStatusChanged(QString iconName); + +@@ -409,7 +409,7 @@ private: + + bool ParseCurrentSession(const QJsonObject &objRes); + +- bool ParseLidstateChanged(const QJsonObject &objRes); ++ bool ParseBlockInhibitedChanged(const QJsonObject &objRes); + + bool ParseBatteryStatusChanged(const QJsonObject &objRes); + +diff --git a/src/lock-dialog/languagesetting.cpp b/src/lock-dialog/languagesetting.cpp +index 95131e5..75c43b2 100644 +--- a/src/lock-dialog/languagesetting.cpp ++++ b/src/lock-dialog/languagesetting.cpp +@@ -19,6 +19,9 @@ + #include + #include "definetypes.h" + #include ++#include ++#include ++#include + + LanguageSetting *LanguageSetting::m_singleInstance = nullptr; + +@@ -55,7 +58,7 @@ void LanguageSetting::onLanguageChanged(QString languageCode) + if (languageCode.startsWith("zh_CN")) { /*这里写的有问题,忘记之前为什么写了,会导致繁体也会加载zh_CN*/ + qmFile = QString(WORKING_DIRECTORY "/i18n_qm/%1.qm").arg("zh_CN"); + setenv("LANGUAGE", "zh_CN", 1); +- setenv("LANG","zh_CN",1); ++ setenv("LANG", languageCode2Locale("zh_CN", "zh_CN").toLatin1().data(), 1); + setlocale(LC_ALL, "zh_CN.utf8"); + QLocale lang("zh_CN"); + /*这里设置一个QLocale的默认值,用来影响插件的语言。插件加载翻译文件时,不使用QLocale::system().name()来获取语言, +@@ -64,7 +67,7 @@ void LanguageSetting::onLanguageChanged(QString languageCode) + } else { + qmFile = QString(WORKING_DIRECTORY "/i18n_qm/%1.qm").arg(languageCode); + setenv("LANGUAGE", languageCode.toLatin1().data(), 1); +- setenv("LANG",languageCode.toLatin1().data(),1); ++ setenv("LANG", languageCode2Locale(languageCode, languageCode).toLatin1().data(), 1); + setlocale(LC_ALL, ""); + QLocale lang(languageCode); + /*这里设置一个QLocale的默认值,用来影响插件的语言。插件加载翻译文件时,不使用QLocale::system().name()来获取语言, +@@ -79,3 +82,27 @@ void LanguageSetting::onLanguageChanged(QString languageCode) + m_strLanguageCode = languageCode; + Q_EMIT languageChanged(true); + } ++ ++QString LanguageSetting::languageCode2Locale(QString strLangCode, QString strDefault) ++{ ++ QString strLocale = strDefault; ++ QFileInfo cmdInfo("/usr/share/language-tools/language2locale"); ++ if (cmdInfo.exists() && cmdInfo.isExecutable()) { ++ QProcess process; ++ QString strCmd = cmdInfo.filePath() + " " + strLangCode; ++ process.start(strCmd); ++ process.waitForFinished(3000); ++ QString result = process.readAll(); ++ QStringList langLocales = result.split("\n"); ++ if (langLocales.count() > 0) { ++ QString strFirstLocale = langLocales[0].trimmed(); ++ if (!strFirstLocale.isEmpty()) { ++ strLocale = strFirstLocale; ++ } ++ } ++ } else { ++ qInfo() << cmdInfo.path() << "is invalid!"; ++ } ++ qDebug() << strLangCode << " to " << strLocale; ++ return strLocale; ++} +diff --git a/src/lock-dialog/languagesetting.h b/src/lock-dialog/languagesetting.h +index c9e7886..1cff3cf 100644 +--- a/src/lock-dialog/languagesetting.h ++++ b/src/lock-dialog/languagesetting.h +@@ -37,6 +37,8 @@ private: + LanguageSetting(QObject *parent = nullptr); + virtual ~LanguageSetting(); + ++ QString languageCode2Locale(QString strLangCode, QString strDefault); ++ + private: + static LanguageSetting *m_singleInstance; + QTranslator *m_translator = nullptr; +diff --git a/src/lock-dialog/lockdialogperformer.cpp b/src/lock-dialog/lockdialogperformer.cpp +index 092de25..79ae81e 100644 +--- a/src/lock-dialog/lockdialogperformer.cpp ++++ b/src/lock-dialog/lockdialogperformer.cpp +@@ -54,7 +54,7 @@ void LockDialogPerformer::initConnections() + m_modelLockDialog, + &LockDialogModel::onCurSessionChanged); + +- connect(m_bdHelper, &BackendDbusHelper::lidstateChanged, this, [=](const QString &lidStatus) { ++ connect(m_bdHelper, &BackendDbusHelper::blockInhibitedChanged, this, [=](const QString &blockInhibited) { + m_modelLockDialog->updateSleepLockcheck(m_bdHelper->getSleepLockcheck()); + m_modelLockDialog->updateShutdownLockcheck(m_bdHelper->getShutdownLockcheck()); + }); +@@ -108,13 +108,13 @@ void LockDialogPerformer::initConnections() + m_modelLockDialog, + &LockDialogModel::onUsdMediaKeysChanged); + connect( +- m_bdHelper, +- &BackendDbusHelper::usdMediaStateKeysConfChanged, +- m_modelLockDialog, +- &LockDialogModel::onUsdMediaStateKeysChanged); ++ m_bdHelper, ++ &BackendDbusHelper::usdMediaStateKeysConfChanged, ++ m_modelLockDialog, ++ &LockDialogModel::onUsdMediaStateKeysChanged); + connect( + m_bdHelper, &BackendDbusHelper::tabletModeChanged, m_modelLockDialog, &LockDialogModel::onTabletModeChanged); +- ///通过信号直接调用槽 ++ /// 通过信号直接调用槽 + connect(m_modelLockDialog, &LockDialogModel::setCurrentUser, m_bdHelper, &BackendDbusHelper::setCurrentUser); + connect(m_modelLockDialog, &LockDialogModel::switchToUser, m_bdHelper, &BackendDbusHelper::switchToUser); + connect(m_modelLockDialog, &LockDialogModel::setCurrentSession, m_bdHelper, &BackendDbusHelper::setCurrentSession); +@@ -198,7 +198,8 @@ void LockDialogPerformer::initData() + m_modelLockDialog->updateUsdMediaKeys( + KEY_WINDOW_SCREENSHOT, m_bdHelper->getUsdMediaKeys(KEY_WINDOW_SCREENSHOT).toString()); + #ifdef USDFIXED +- m_modelLockDialog->updateUsdMediaStateKeys(KEY_RFKILL_STATE, m_bdHelper->getUsdMediaStateKeys(KEY_RFKILL_STATE).toInt()); ++ m_modelLockDialog->updateUsdMediaStateKeys( ++ KEY_RFKILL_STATE, m_bdHelper->getUsdMediaStateKeys(KEY_RFKILL_STATE).toInt()); + #endif + m_modelLockDialog->updateScreensaverMode(m_bdHelper->getLockScreenConf(KEY_MODE).toString()); + m_modelLockDialog->updateScreensaverTheme(m_bdHelper->getSaverThemes()); +diff --git a/src/widgets/authdialog.cpp b/src/widgets/authdialog.cpp +index 98c07e4..1611e73 100644 +--- a/src/widgets/authdialog.cpp ++++ b/src/widgets/authdialog.cpp +@@ -928,8 +928,8 @@ void AuthDialog::onPamShowPrompt(QString strPrompt, int nType) + if (m_loginOpts) + m_loginOpts->setSelectedPassword(); + } +- if (strPrompt == "Password: " || strPrompt == "密码:") { +- strPrompt = tr("Password "); ++ if (strPrompt == "Password: " || strPrompt == "密码:" || strPrompt == "密码: ") { ++ strPrompt = tr("Password:"); + m_isPassWdInput = true; + } else if (strPrompt == "Input password" || strPrompt == "Input Password" || strPrompt == "输入密码") { + strPrompt = tr("Input Password"); +@@ -1134,7 +1134,7 @@ void AuthDialog::onCurUserChanged(UserInfoPtr userInfo) + updateUI(); + startAuth(); + if (m_passwordEdit) { +- m_passwordEdit->clear(); ++ m_passwordEdit->clearText(); + m_passwordEdit->setType(QLineEdit::Password); + } + if (m_messageButton) +diff --git a/src/widgets/fullbackgroundwidget.cpp b/src/widgets/fullbackgroundwidget.cpp +index 7a5d7b2..4ae3378 100644 +--- a/src/widgets/fullbackgroundwidget.cpp ++++ b/src/widgets/fullbackgroundwidget.cpp +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -169,7 +170,7 @@ bool FullBackgroundWidget::eventFilter(QObject *obj, QEvent *event) + // QTimer::singleShot(200,this,SLOT(killWindow())); + } else if (event->type() == QEvent::Show || event->type() == QEvent::UpdateRequest) { + WindowManager::setWindowLayer(this->windowHandle(), WindowLayer::ScreenLock); +- //qDebug()<<"Set window layer ScreenLock"; ++ // qDebug()<<"Set window layer ScreenLock"; + } + return QWidget::eventFilter(obj, event); + } +@@ -233,8 +234,24 @@ void FullBackgroundWidget::onSecondRunParam(const QString &str) + onShowLock(true); + } else if (str == "CmdLock") { + onShowLock(false); +- } else if (str == "CloseLock") { +- onShowBlankScreensaver(1000, false); ++ } else if (str.startsWith("CloseLock")) { ++ int nDelayTime = 1000; ++ bool needLock = false; ++ QStringList listParam = str.split('&'); ++ for (const QString ¶m : listParam) { ++ if (param.startsWith("delay")) { ++ QStringList listDelay = param.split('='); ++ if (listDelay.size() >= 2) { ++ nDelayTime = listDelay[1].toInt(); ++ } ++ } else if (param.startsWith("hasLock")) { ++ QStringList listLock = param.split('='); ++ if (listLock.size() >= 2) { ++ needLock = (listLock[1].toInt() ? true : false); ++ } ++ } ++ } ++ onShowBlankScreensaver(nDelayTime, needLock); + } else if (str == "SessionIdle") { + onShowSessionIdle(); + } else if (str == "Screensaver") { +@@ -260,7 +277,7 @@ void FullBackgroundWidget::onSecondRunParam(const QString &str) + + void FullBackgroundWidget::onShowBlankScreensaver(int nDelay, bool isHasLock) + { +- show(); ++ qDebug() << "onShowBlankScreensaver:" << nDelay << "," << isHasLock; + Q_EMIT m_modelLockDialog->lockStateChanged(true); + + if (isHasLock) { +@@ -286,8 +303,8 @@ void FullBackgroundWidget::onShowBlankScreensaver(int nDelay, bool isHasLock) + * 因此这里在进入黑色屏保时,通过后台接口,获取一次当前是否应该显示黑色屏保状态*/ + bool ret = Q_EMIT m_modelLockDialog->GetBlankState(); + if (!ret) { +- // isBlank = false; +- // onClearScreensaver(); ++ m_isBlank = false; ++ onClearScreensaver(); + } + } else { + QTimer::singleShot(nDelay, this, [=]() { +@@ -297,6 +314,7 @@ void FullBackgroundWidget::onShowBlankScreensaver(int nDelay, bool isHasLock) + } + }); + } ++ show(); + } + + void FullBackgroundWidget::onShowLock(bool isStartup) +diff --git a/src/widgets/lockwidget.cpp b/src/widgets/lockwidget.cpp +index 42e23f8..97a4386 100644 +--- a/src/widgets/lockwidget.cpp ++++ b/src/widgets/lockwidget.cpp +@@ -366,11 +366,13 @@ void LockWidget::initConnections() + } + connect(LanguageSetting::instance(this), &LanguageSetting::languageChanged, this, &LockWidget::onLanguageChanged); + } ++ + void LockWidget::initTimeWidget() + { + m_timeWidget = new TimeWidget(m_modelLockDialog, this); + m_timeWidget->move((width() - m_timeWidget->width()) / 2, 0); + } ++ + void LockWidget::initUserWidget() + { + if (!m_userListWidget) { +@@ -747,8 +749,14 @@ void LockWidget::onUsersInfoChanged() + m_curUserInfo = ptrUser; + if (m_btnItemSession && m_curUserInfo->isLoggedIn()) { + buttonListWidget->setItemHidden(m_btnItemSession, true); ++ buttonListWidget->setFixedSize(QSize( ++ 48 * (buttonListWidget->count() - 1) ++ + buttonListWidget->spacing() * 2 * (buttonListWidget->count() - 1), ++ 64)); + } else { + buttonListWidget->setItemHidden(m_btnItemSession, false); ++ buttonListWidget->setFixedSize(QSize( ++ 48 * buttonListWidget->count() + buttonListWidget->spacing() * 2 * buttonListWidget->count(), 64)); + } + if (authDialog) { + authDialog->onCurUserInfoChanged(m_curUserInfo); +@@ -790,8 +798,13 @@ void LockWidget::onCurUserChanged(const QString &strUserName) + } + if (m_btnItemSession && m_curUserInfo->isLoggedIn()) { + buttonListWidget->setItemHidden(m_btnItemSession, true); ++ buttonListWidget->setFixedSize(QSize( ++ 48 * (buttonListWidget->count() - 1) + buttonListWidget->spacing() * 2 * (buttonListWidget->count() - 1), ++ 64)); + } else { + buttonListWidget->setItemHidden(m_btnItemSession, false); ++ buttonListWidget->setFixedSize( ++ QSize(48 * buttonListWidget->count() + buttonListWidget->spacing() * 2 * buttonListWidget->count(), 64)); + } + } + +@@ -1219,7 +1232,7 @@ void LockWidget::onMulUsersLogined(int inhibitType, bool iscommand) + m_inhibitType = "Reboot"; + m_blockWidget->setTips( + tr("Multiple users are logged in at the same time.Are you sure you want to %1 this system?") +- .arg(tr("Reboot"))); ++ .arg(tr("Restart"))); + } else if (inhibitType == 1) { + m_inhibitType = "PowerOff"; + m_blockWidget->setTips( +@@ -1275,7 +1288,7 @@ void LockWidget::onLockScreenClicked() + + void LockWidget::onSuspendClicked() + { +- if (m_modelLockDialog->getSleepActivationEnabled()) { ++ if (!isGreeterMode() && m_isSessionTools && m_modelLockDialog->getSleepActivationEnabled()) { + m_isSessionTools = false; + Q_EMIT showBlankScreensaver(0, true); + } else { +diff --git a/src/widgets/mediacontrolwidget.cpp b/src/widgets/mediacontrolwidget.cpp +index dd19b3a..8e1c39e 100644 +--- a/src/widgets/mediacontrolwidget.cpp ++++ b/src/widgets/mediacontrolwidget.cpp +@@ -8,6 +8,7 @@ + #include + #include + #include ++#include "mprisdbusclient.h" + + #define AUDIOTYPE "audio/x-vorbis+ogg" + +@@ -36,14 +37,12 @@ void MediaControlWidget::initMultimediaControl() + QDBusReply reply = call.reply(); + const QStringList &serviceList = reply.value(); + QString service = QString(); ++ // check is default audio app + QString defaultAudioExeInfo = getDefaultAudioAppExecInfo(); + for (const QString &serv : serviceList) { + if (!serv.startsWith("org.mpris.MediaPlayer2.") || serv.endsWith("KylinVideo")) { + continue; + } +- if (service.isEmpty()) { +- service = serv; +- } + // 优先默认音频应用,其次按dbus列表第一个 + if (!serv.isEmpty()) { + QString strServicePath = getServiceCmd(serv); +@@ -55,6 +54,28 @@ void MediaControlWidget::initMultimediaControl() + } + } + } ++ if (service.isEmpty()) { ++ // check is playing app ++ for (const QString &serv : serviceList) { ++ if (!serv.startsWith("org.mpris.MediaPlayer2.") || serv.endsWith("KylinVideo")) { ++ continue; ++ } ++ if (service.isEmpty()) { ++ service = serv; ++ } ++ // 优先播放状态应用,其次按dbus列表第一个 ++ if (!serv.isEmpty()) { ++ MPRISDBusClient *client = new MPRISDBusClient( ++ serv, "/org/mpris/MediaPlayer2", QDBusConnection::sessionBus(), this); ++ if (client->playbackStatus() == "Playing") { ++ service = serv; ++ break; ++ } ++ client->deleteLater(); ++ client = nullptr; ++ } ++ } ++ } + // 未检测到支持mpris的mediaplayer服务 + if (service.isEmpty()) { + if (!m_dbusDaemonInterface) { +diff --git a/src/widgets/powerlistwidget.cpp b/src/widgets/powerlistwidget.cpp +index 2f9d44e..03461f6 100644 +--- a/src/widgets/powerlistwidget.cpp ++++ b/src/widgets/powerlistwidget.cpp +@@ -198,9 +198,10 @@ void PowerListWidget::onListItemClicked(QListWidgetItem *item) + // qWarning() << __LINE__ << "=================" << powerBtnList[i].setFuncName << __FUNCTION__; + if (powerBtnList[i].setFuncName == "LockScreen") { + Q_EMIT lockScreenClicked(); +- } else if (powerBtnList[i].setFuncName == "Suspend") { +- Q_EMIT m_modelLockDialog->setPowerManager(powerBtnList[i].setFuncName); ++ } else if (powerBtnList[i].setFuncName == "Suspend" || powerBtnList[i].setFuncName == "Hibernate") { + Q_EMIT suspendClicked(); ++ QTimer::singleShot( ++ 100, this, [=]() { Q_EMIT m_modelLockDialog->setPowerManager(powerBtnList[i].setFuncName); }); + } else if (powerBtnList[i].setFuncName == "SwitchUser") { + // Q_EMIT lockScreenClicked(); + // Q_EMIT m_modelLockDialog->setPowerManager(powerBtnList[i].setFuncName); +diff --git a/src/widgets/timewidget.cpp b/src/widgets/timewidget.cpp +index 08abf0a..5716a51 100644 +--- a/src/widgets/timewidget.cpp ++++ b/src/widgets/timewidget.cpp +@@ -14,17 +14,15 @@ + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + * +-**/ ++ **/ + #include "timewidget.h" + #include "../lock-dialog/lockdialogmodel.h" + + #define TIME_FONT_SIZE 36 + #define TIME_DATE_SIZE 18 +-#define TIMEWIDGET_SIZE 1000,100 ++#define TIMEWIDGET_SIZE 1000, 100 + +-TimeWidget::TimeWidget(LockDialogModel *model, QWidget *parent) +- : QWidget(parent) +- , m_modelLockDialog(model) ++TimeWidget::TimeWidget(LockDialogModel *model, QWidget *parent) : QWidget(parent), m_modelLockDialog(model) + { + this->setMinimumSize(TIMEWIDGET_SIZE); + +@@ -36,14 +34,14 @@ TimeWidget::TimeWidget(LockDialogModel *model, QWidget *parent) + m_t_label->setAlignment(Qt::AlignCenter); + m_t_label->setFontSize(TIME_FONT_SIZE); + m_t_label->setStyleSheet("QLabel{color: white;}" +- "QToolTip{border-radius:4px; background-color:#FFFFFF; color:black;}"); ++ "QToolTip{border-radius:4px; background-color:#FFFFFF; color:black;}"); + m_t_label->setText(getLongFormatDate(TIME)); + m_t_label->adjustSize(); + + m_d_label = new KLabel(this); + m_d_label->setAlignment(Qt::AlignCenter); + m_d_label->setStyleSheet("QLabel{color: white;}" +- "QToolTip{border-radius:4px; background-color:#FFFFFF; color:black;}"); ++ "QToolTip{border-radius:4px; background-color:#FFFFFF; color:black;}"); + m_d_label->setText(getLongFormatDate(DATE)); + m_d_label->setFontSize(TIME_DATE_SIZE); + m_d_label->adjustSize(); +@@ -66,8 +64,8 @@ TimeWidget::~TimeWidget() + void TimeWidget::updateUI() + { + this->setFixedSize(this->width(), this->height()); +- m_t_label->setFontSize((TIME_FONT_SIZE + m_curFontSize)*m_ptToPx); +- m_d_label->setFontSize((TIME_DATE_SIZE + m_curFontSize)*m_ptToPx); ++ m_t_label->setFontSize((TIME_FONT_SIZE + m_curFontSize) * m_ptToPx); ++ m_d_label->setFontSize((TIME_DATE_SIZE + m_curFontSize) * m_ptToPx); + } + + void TimeWidget::timerStart() +@@ -88,39 +86,36 @@ void TimeWidget::updateTimeFont(QString fontFamily) + if (m_d_label) { + m_d_label->setFontFamily(fontFamily); + } ++ update_datatime(); + } + + void TimeWidget::updateTimeFontSize(double fontSize) + { + if (m_t_label) { +- m_t_label->setFontSize((TIME_FONT_SIZE + fontSize)*m_ptToPx); ++ m_t_label->setFontSize((TIME_FONT_SIZE + fontSize) * m_ptToPx); + } + if (m_d_label) { +- m_d_label->setFontSize((TIME_DATE_SIZE + fontSize)*m_ptToPx); ++ m_d_label->setFontSize((TIME_DATE_SIZE + fontSize) * m_ptToPx); + } ++ update_datatime(); + } + + QString TimeWidget::getLongFormatDate(int type) + { +- char* userName; ++ char *userName; + QByteArray ba = m_modelLockDialog->currentUserName().toLatin1(); + userName = ba.data(); + kdk_logn_dateinfo *dateInfo = kdk_system_login_lock_dateinfo(userName); +- if (type == DATE) +- { ++ if (type == DATE) { + QString date = dateInfo->date; + QString week = dateInfo->week; +- if (dateInfo) +- { ++ if (dateInfo) { + kdk_free_logn_dateinfo(dateInfo); + } +- return date + " " + week; +- } +- else if (type == TIME) +- { ++ return date + " " + week; ++ } else if (type == TIME) { + QString time = dateInfo->time; +- if (dateInfo) +- { ++ if (dateInfo) { + kdk_free_logn_dateinfo(dateInfo); + } + return time; diff --git a/debian/patches/series b/debian/patches/series index 34cc574..073fc41 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -40,3 +40,4 @@ 0040-2-feature.patch 0041-Translated-using-Weblate-Uyghur.patch 0042-Translated-using-Weblate-Mongolian.patch +0043-3-fixbug.patch