diff --git a/biometric-manager/biometric-manager.pro b/biometric-manager/biometric-manager.pro index 9606bc1..30f658a 100644 --- a/biometric-manager/biometric-manager.pro +++ b/biometric-manager/biometric-manager.pro @@ -28,7 +28,7 @@ include ($$PWD/qt-solutions/qtsingleapplication/src/qtsingleapplication.pri) TARGET = biometric-manager TEMPLATE = app CONFIG += c++11 link_pkgconfig -PKGCONFIG += x11 gsettings-qt gio-2.0 kysdk-waylandhelper kysdk-qtwidgets +PKGCONFIG += x11 gsettings-qt gio-2.0 gio-unix-2.0 kysdk-waylandhelper kysdk-qtwidgets kysdk-sysinfo SOURCES += src/main.cpp\ src/lightlabel.cpp \ diff --git a/biometric-manager/i18n_ts/bo.ts b/biometric-manager/i18n_ts/bo.ts index c09f602..0db181f 100644 --- a/biometric-manager/i18n_ts/bo.ts +++ b/biometric-manager/i18n_ts/bo.ts @@ -462,277 +462,294 @@ p, li { white-space: pre-wrap; } - - + + TextLabel - + Permisions - - - + + + + Biometric - + After this function is enabled, it can be used for system authentication, including login, screen lock, system authorization, and Polkit. - + Biometrics will be used to: - + Login system - + Unlock the lock screen - + System authorization - + Seletct Device - + Fingerprint recognition is not available. No device supporting this feature was detected. - - - - - + + + + + Device Management - + Face Recognition - - - - + + + + Select Device - + Face recognition is not available. No device supporting this feature was detected. - + Fingervein - + Fingervein recognition is not available. No device supporting this feature was detected. - + Iris Recognition - + Iric recognition is not available. No device supporting this feature was detected. - + Voiceprint - + Voiceprint recognition is not available. No device supporting this feature was detected. - + Biometirc Manager - - - + + + + FingerPrint - + + Device&Permission - + + Permissions - + + Password Setting - - + + + FingerVein - - + + + Iris - - + + + Face - + + + Maximize - + Options - - + + + VoicePrint - + Restart Service - + About - - + + Biometric Manager - + + + Restore + + + + Select Device Type - + Minimize - + Close - + Exit - + Help - - + + (default) - + Default - + Name - + Status - + Driver - + Fail to change device status - - + + OK - + The service has restarted. - + Service restart failure. - + Connected - + Unconnected - + disable @@ -898,23 +915,23 @@ Please authenticate yourself to continue QObject - + Username - + the biometric-authentication service was not started - - + + OK - + API version is not compatible diff --git a/biometric-manager/i18n_ts/bo_CN.ts b/biometric-manager/i18n_ts/bo_CN.ts index 262e0eb..4b9d0b8 100644 --- a/biometric-manager/i18n_ts/bo_CN.ts +++ b/biometric-manager/i18n_ts/bo_CN.ts @@ -845,8 +845,8 @@ p, li { white-space: pre-wrap; } MainWindow - - + + Biometric Manager སྐྱེ་དངོས་དབྱེ་འབྱེད་སྤྱི་གཉེར་བ། @@ -891,11 +891,11 @@ p, li { white-space: pre-wrap; } 虹膜设备驱动 - - - - - + + + + + Device Management སྒྲིག་ཆས་དོ་དམ། @@ -921,13 +921,13 @@ p, li { white-space: pre-wrap; } སྐྱེ་དངོས་དབྱེ་འབྱེད་རིག་པའི་ལག་ཤེས་བཟོ་ལས། - - + + TextLabel ཡི་གེ་ལ་པེར་གྱིས་བཤད་རྒྱུར - + Biometirc Manager སྐྱེ་དངོས་ཕྲ་རབ་ཀྱི་སྤྱི་གཉེར་བ། @@ -936,132 +936,140 @@ p, li { white-space: pre-wrap; } 用户名 - - - + + + + Biometric སྐྱེ་དངོས་རིག་པ། - - - + + + + FingerPrint མཛུབ་མོའི་པར་གཞི། - - + + + FingerVein མཛུབ་མོ་ཝེ་ལིན། - - + + + Face ངོ་གདོང་། - + Permisions ཆོག་མཆན་ཐོབ་པ། - + After this function is enabled, it can be used for system authentication, including login, screen lock, system authorization, and Polkit. རྟེན་འབྱུང་གྲངས་འདི་ལག་བསྟར་བྱས་རྗེས་མ་ལག་གི་བདེན་དཔང་ར་སྤྲོད་བྱེད་པར་སྤྱད་ཆོག་ཅིང་། དེའི་ནང་དུ་ཐོ་འགོད་དང་། བརྙན་ཤེལ་གྱི་ཟྭ། མ་ལག་གི་དབང་ཆ། Polkitབཅས་ཚུད་ཡོད། - + Biometrics will be used to: སྐྱེ་དངོས་དབྱེ་འབྱེད་རིག་པ་བེད་སྤྱོད་བྱ་རྒྱུ་སྟེ། - + Login system ཐོ་འགོད་མ་ལག - + Unlock the lock screen ཟྭ་རྒྱག་པའི་བརྙན་ཤེལ་གྱི་སྒོ་ཕྱེ - + System authorization ལམ་ལུགས་ཀྱི་དབང་ཆ་ - + Seletct Device Seletctསྒྲིག་ཆས། - + Fingerprint recognition is not available. No device supporting this feature was detected. མཛུབ་རིས་ངོས་འཛིན་བྱེད་ཐབས་མེད། ཁྱད་ཆོས་འདི་ལ་རྒྱབ་སྐྱོར་བྱེད་པའི་སྒྲིག་ཆས་ལ་ཞིབ་དཔྱད་ཚད་ལེན་བྱས - + Face Recognition ངོ་གདོང་ངོས་འཛིན་ - - - - + + + + Select Device སྒྲིག་ཆས་བདམས་པ། - + Face recognition is not available. No device supporting this feature was detected. ངོ་གདོང་ངོས་འཛིན་བྱེད་མི་ཐུབ། ཁྱད་ཆོས་འདི་ལ་རྒྱབ་སྐྱོར་བྱེད་པའི་སྒྲིག་ཆས་ལ་ཞིབ་དཔྱད་ཚད་ལེན་བྱས - + Fingervein recognition is not available. No device supporting this feature was detected. མཛུབ་མོས་ངོས་འཛིན་བྱེད་མི་ཐུབ། ཁྱད་ཆོས་འདི་ལ་རྒྱབ་སྐྱོར་བྱེད་པའི་སྒྲིག་ཆས་ལ་ཞིབ་དཔྱད་ཚད་ལེན་བྱས - + Iris Recognition དབྱི་སི་ཡི་ཁས་ལེན། - + Iric recognition is not available. No device supporting this feature was detected. དབྱི་ལི་ཆིའི་ཁས་ལེན་ཐོབ་མི་ཐུབ། ཁྱད་ཆོས་འདི་ལ་རྒྱབ་སྐྱོར་བྱེད་པའི་སྒྲིག་ཆས་ལ་ཞིབ་དཔྱད་ཚད་ལེན་བྱས - + Voiceprint སྒྲ་གདངས་ཀྱི་པར་གཞི། - + Voiceprint recognition is not available. No device supporting this feature was detected. སྒྲ་པར་ངོས་འཛིན་བྱེད་ཐབས་མེད། ཁྱད་ཆོས་འདི་ལ་རྒྱབ་སྐྱོར་བྱེད་པའི་སྒྲིག་ཆས་ལ་ཞིབ་དཔྱད་ཚད་ལེན་བྱས - + + Device&Permission སྒྲིག་ཆས་དང་ཆོག་འཐུས་ལག་ཁྱེར། - + + Permissions ཆོག་འཐུས་ལག་ཁྱེར། - + + Password Setting གསང་གྲངས་བཀོད་སྒྲིག - - + + + VoicePrint སྒྲ་གདངས་ཀྱི་པར་གཞི། @@ -1090,13 +1098,14 @@ p, li { white-space: pre-wrap; } 驱动未找到 - + Fingervein མཛུབ་མོ་ཝེ་ལིན། - - + + + Iris དབྱི་ལི་སི། @@ -1113,7 +1122,7 @@ p, li { white-space: pre-wrap; } API 版本不兼容 - + About འབྲེལ་ཡོད་ཀྱི་སྐོར། @@ -1142,12 +1151,12 @@ p, li { white-space: pre-wrap; } 使用生物特征的流程 1.确认设备已连接 2.将已连接的设备设为默认 3.打开生物特征状态开关 4.最后录入指纹 - + Minimize ཉུང་དུ་གཏོང་གང་ཐུབ་བྱ་དགོས། - + Close སྒོ་རྒྱག་པ། @@ -1160,12 +1169,12 @@ p, li { white-space: pre-wrap; } 设备与权限 - + Exit ཕྱིར་འཐེན་བྱེད་པ། - + Help རོགས་རམ་བྱེད་པ། @@ -1174,70 +1183,78 @@ p, li { white-space: pre-wrap; } 使用生物特征的流程 1.确认设备已连接 2.将已连接的设备设为默认 3.打开生物特征状态开关 4.最后录入生物特征 - - + + (default) (ཁ་ཆད་དང་འགལ་) - + Name མིང་། - + Status གནས་ཚུལ་གྱི་གནས་ - + Driver ཁ་ལོ་བ། - + Default ཁ་ཆད་དང་འགལ་ - + The service has restarted. ཞབས་ཞུ་ཡང་བསྐྱར་འགོ་ཚུགས་པ་རེད། - + Service restart failure. ཞབས་ཞུ་སླར་གསོ་བྱེད་མ་ཐུབ་པ - - + + OK འགྲིགས། - + + + Maximize - + + + Restore + + + + Options རྣམ་གྲངས་འདེམས་པ། - + Connected འབྲེལ་མཐུད་བྱེད་པ། - + Unconnected འབྲེལ་བ་མེད་པ། - + disable དབང་པོ་སྐྱོན་ཅན། @@ -1246,17 +1263,17 @@ p, li { white-space: pre-wrap; } ཞབས་ཞུ་མཚམས་བཞག་པ། - + Fail to change device status སྒྲིག་ཆས་ཀྱི་གནས་ཚུལ་ལ་འགྱུར་ལྡོག་གཏོང་ - + Select Device Type སྒྲིག་ཆས་ཀྱི་རིགས་དབྱིབས་བདམས་ - + Restart Service བསྐྱར་དུ་ཞབས་འདེགས་ཞུ་བ @@ -1479,7 +1496,7 @@ Please authenticate yourself to continue QObject - + Username སྤྱོད་མཁན་གྱི་མིང་། @@ -1488,18 +1505,18 @@ Please authenticate yourself to continue སྲོག་ལ་ཐུག་པའི་ནོར་ - + the biometric-authentication service was not started སྐྱེ་དངོས་དབྱེ་འབྱེད་ཀྱི་བདེན་དཔང་ར་སྤྲོད་ཞབས་ཞུ་ད་དུང་སྤེལ་འགོ་ཚུགས་མེད། - - + + OK འགྲིགས། - + API version is not compatible APIཔར་གཞི་དང་མི་མཐུན་པ། diff --git a/biometric-manager/i18n_ts/es.ts b/biometric-manager/i18n_ts/es.ts index 0c0d493..45dfdbb 100644 --- a/biometric-manager/i18n_ts/es.ts +++ b/biometric-manager/i18n_ts/es.ts @@ -776,6 +776,10 @@ p, li { white-space: pre-wrap; } Service restart failure. + + Restore + + MessageDialog diff --git a/biometric-manager/i18n_ts/fr.ts b/biometric-manager/i18n_ts/fr.ts index 26dea86..3851d8e 100644 --- a/biometric-manager/i18n_ts/fr.ts +++ b/biometric-manager/i18n_ts/fr.ts @@ -776,6 +776,10 @@ p, li { white-space: pre-wrap; } Service restart failure. + + Restore + + MessageDialog diff --git a/biometric-manager/i18n_ts/pt.ts b/biometric-manager/i18n_ts/pt.ts index ddc9d2e..0681042 100644 --- a/biometric-manager/i18n_ts/pt.ts +++ b/biometric-manager/i18n_ts/pt.ts @@ -776,6 +776,10 @@ p, li { white-space: pre-wrap; } Service restart failure. + + Restore + + MessageDialog diff --git a/biometric-manager/i18n_ts/ru.ts b/biometric-manager/i18n_ts/ru.ts index f73d9d7..c787c33 100644 --- a/biometric-manager/i18n_ts/ru.ts +++ b/biometric-manager/i18n_ts/ru.ts @@ -776,6 +776,10 @@ p, li { white-space: pre-wrap; } Service restart failure. + + Restore + + MessageDialog diff --git a/biometric-manager/i18n_ts/tr.ts b/biometric-manager/i18n_ts/tr.ts index 16968be..09c707f 100644 --- a/biometric-manager/i18n_ts/tr.ts +++ b/biometric-manager/i18n_ts/tr.ts @@ -837,8 +837,8 @@ p, li { white-space: pre-wrap; } MainWindow - - + + Biometric Manager 生物特征管理工具 @@ -883,11 +883,11 @@ p, li { white-space: pre-wrap; } Göz Aygıtı Sürücüsü - - - - - + + + + + Device Management Aygıt Yönetimi @@ -913,103 +913,104 @@ p, li { white-space: pre-wrap; } Biyometrik Yönetici - - + + TextLabel - + Permisions - - - + + + + Biometric - + After this function is enabled, it can be used for system authentication, including login, screen lock, system authorization, and Polkit. - + Biometrics will be used to: - + Login system - + Unlock the lock screen - + System authorization - + Seletct Device - + Fingerprint recognition is not available. No device supporting this feature was detected. - + Face Recognition - - - - + + + + Select Device - + Face recognition is not available. No device supporting this feature was detected. - + Fingervein recognition is not available. No device supporting this feature was detected. - + Iris Recognition - + Iric recognition is not available. No device supporting this feature was detected. - + Voiceprint - + Voiceprint recognition is not available. No device supporting this feature was detected. - + Biometirc Manager Biyometrik Yönetici @@ -1022,52 +1023,61 @@ p, li { white-space: pre-wrap; } Gösterge Paneli - - - + + + + FingerPrint Parmak İzi - + + Device&Permission - + + Permissions - + + Password Setting - - + + + FingerVein Damar İzi - - + + + Face Yüz Tanıma - + + + Maximize - + Options - - + + + VoicePrint Ses İzi @@ -1100,13 +1110,14 @@ p, li { white-space: pre-wrap; } Sürücü Bulunamadı - + Fingervein Damar İzi - - + + + Iris Göz @@ -1123,7 +1134,7 @@ p, li { white-space: pre-wrap; } API sürümü uyumlu değil - + About Hakkında @@ -1156,39 +1167,39 @@ p, li { white-space: pre-wrap; } Sürücü Durumu - + Default Varsayılan - - + + OK Tamam - + The service has restarted. - + Service restart failure. - + Connected Bağlandı - + Unconnected Bağlı Değil - + disable @@ -1197,58 +1208,64 @@ p, li { white-space: pre-wrap; } Hizmet Durdu - + Status Durum - + Select Device Type - + + + Restore + + + + Minimize - + Close Kapat - + Exit - + Help - - + + (default) - + Name İsim - + Driver - + Fail to change device status Cihaz durumu değiştirilemedi - + Restart Service Servisi yeniden başlat @@ -1471,7 +1488,7 @@ Lütfen devam etmek için kendinizi doğrulayın QObject - + Username Kullanıcı Adı @@ -1480,18 +1497,18 @@ Lütfen devam etmek için kendinizi doğrulayın Ölümcül Hata - + the biometric-authentication service was not started biyometrik kimlik doğrulama hizmeti başlatılmadı - - + + OK Tamam - + API version is not compatible API sürümü uyumlu değil diff --git a/biometric-manager/i18n_ts/zh_CN.ts b/biometric-manager/i18n_ts/zh_CN.ts index 0c86e48..14e6332 100644 --- a/biometric-manager/i18n_ts/zh_CN.ts +++ b/biometric-manager/i18n_ts/zh_CN.ts @@ -841,8 +841,8 @@ p, li { white-space: pre-wrap; } MainWindow - - + + Biometric Manager 生物特征管理工具 @@ -887,11 +887,11 @@ p, li { white-space: pre-wrap; } 虹膜设备驱动 - - - - - + + + + + Device Management 设备管理 @@ -914,16 +914,16 @@ p, li { white-space: pre-wrap; } BiometricManager - 生物特征管理工具 + 生物特征管理 - - + + TextLabel - + Biometirc Manager 生物特征管理 @@ -932,132 +932,140 @@ p, li { white-space: pre-wrap; } 用户名 - - - + + + + Biometric 生物设备 - - - + + + + FingerPrint 指纹 - - + + + FingerVein 指静脉 - - + + + Face 人脸识别 - + Permisions 权限设置 - + After this function is enabled, it can be used for system authentication, including login, screen lock, system authorization, and Polkit. 开启后可用于系统认证,包括登录、锁屏、系统授权和Polkit。 - + Biometrics will be used to: 生物识别将用于: - + Login system 登录系统 - + Unlock the lock screen 解锁锁屏 - + System authorization 系统授权 - + Seletct Device 选择设备 - + Fingerprint recognition is not available. No device supporting this feature was detected. 指纹识别不可用,未检测到支持此功能的设备 - + Face Recognition 人脸识别 - - - - + + + + Select Device 选择设备 - + Face recognition is not available. No device supporting this feature was detected. 人脸识别不可用,未检测到支持此功能的设备 - + Fingervein recognition is not available. No device supporting this feature was detected. 指静脉识别不可用,未检测到支持此功能的设备 - + Iris Recognition 虹膜识别 - + Iric recognition is not available. No device supporting this feature was detected. 虹膜识别不可用,未检测到支持此功能的设备 - + Voiceprint 声纹识别 - + Voiceprint recognition is not available. No device supporting this feature was detected. 声纹识别不可用,未检测到支持此功能的设备 - + + Device&Permission 设备与权限 - + + Permissions 权限 - + + Password Setting 密码设置 - - + + + VoicePrint 声纹 @@ -1086,13 +1094,14 @@ p, li { white-space: pre-wrap; } 驱动未找到 - + Fingervein 指静脉 - - + + + Iris 虹膜 @@ -1109,7 +1118,7 @@ p, li { white-space: pre-wrap; } API 版本不兼容 - + About 关于 @@ -1138,22 +1147,30 @@ p, li { white-space: pre-wrap; } 使用生物特征的流程 1.确认设备已连接 2.将已连接的设备设为默认 3.打开生物特征状态开关 4.最后录入指纹 - + Minimize 最小化 - + + + Maximize 最大化 - + Options 选项 - + + + Restore + 还原 + + + Close 关闭 @@ -1166,12 +1183,12 @@ p, li { white-space: pre-wrap; } 设备与权限 - + Exit 退出 - + Help 帮助 @@ -1180,60 +1197,60 @@ p, li { white-space: pre-wrap; } 使用生物特征的流程 1.确认设备已连接 2.将已连接的设备设为默认 3.打开生物特征状态开关 4.最后录入生物特征 - - + + (default) (默认) - + Name 名称 - + Status 状态 - + Driver 驱动 - + Default 设为默认 - - + + OK 确认 - + The service has restarted. 服务已重启 - + Service restart failure. 服务重启失败 - + Connected 已连接 - + Unconnected 断开 - + disable 禁用 @@ -1242,17 +1259,17 @@ p, li { white-space: pre-wrap; } 服务已关闭 - + Fail to change device status 更改设备状态失败 - + Select Device Type 选择设备类型 - + Restart Service 重启服务 @@ -1326,7 +1343,7 @@ p, li { white-space: pre-wrap; } - + Cancel 取消 @@ -1482,7 +1499,7 @@ Please authenticate yourself to continue QObject - + Username 用户名 @@ -1491,18 +1508,18 @@ Please authenticate yourself to continue 错误 - + the biometric-authentication service was not started 'biometric-authentication'服务没有启动 - - + + OK 确认 - + API version is not compatible API 版本不兼容 diff --git a/biometric-manager/src/giodbus.cpp b/biometric-manager/src/giodbus.cpp index 9c8bdc3..bb4dca3 100644 --- a/biometric-manager/src/giodbus.cpp +++ b/biometric-manager/src/giodbus.cpp @@ -18,7 +18,7 @@ #include "giodbus.h" #include -#include +#include #include int get_server_gvariant_stdout (int drvid) diff --git a/biometric-manager/src/main.cpp b/biometric-manager/src/main.cpp index 9dd9b25..76852d3 100644 --- a/biometric-manager/src/main.cpp +++ b/biometric-manager/src/main.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include "servicemanager.h" #include "messagedialog.h" @@ -182,11 +183,15 @@ int main(int argc, char *argv[]) //去除窗管标题栏 kdk::UkuiStyleHelper::self()->removeHeader(&w); - QRect desktopRect = QApplication::primaryScreen()->geometry(); - w.move(desktopRect.left() + (desktopRect.width() - w.width())/2,desktopRect.top() + (desktopRect.height() - w.height())/2); - w.show(); KWindowEffects::enableBlurBehind(w.winId(),true); - kdk::WindowManager::setGeometry(w.windowHandle(), w.geometry()); + QString systemName = QString(QLatin1String(kdk_system_get_systemName())); + if (!systemName.compare("openkylin", Qt::CaseInsensitive) == 0) { + QRect desktopRect = QApplication::primaryScreen()->geometry(); + w.move(desktopRect.left() + (desktopRect.width() - w.width())/2,desktopRect.top() + (desktopRect.height() - w.height())/2); + } + w.show(); + + //kdk::WindowManager::setGeometry(w.windowHandle(), w.geometry()); QObject::connect(&a, SIGNAL(messageReceived(QString)), &w, SLOT(onReviceWindowMessage(QString))); QObject::connect(sm, &ServiceManager::serviceStatusChanged, diff --git a/biometric-manager/src/mainwindow.cpp b/biometric-manager/src/mainwindow.cpp index 1f4c17b..ce2fa35 100644 --- a/biometric-manager/src/mainwindow.cpp +++ b/biometric-manager/src/mainwindow.cpp @@ -187,9 +187,13 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *event) if (this->windowState() == Qt::WindowMaximized) { ui->btnMax->setIcon(QIcon::fromTheme("window-maximize-symbolic")); this->showNormal(); + ui->btnMax->setToolTip(tr("Maximize")); + initPerwgtSize(); } else { ui->btnMax->setIcon(QIcon::fromTheme("window-restore-symbolic")); this->showMaximized(); + ui->btnMax->setToolTip(tr("Restore")); + initPerwgtSize(); } } } @@ -537,9 +541,11 @@ void MainWindow::initialize() if (isMaximized()) { showNormal(); ui->btnMax->setIcon(QIcon::fromTheme("window-maximize-symbolic")); + ui->btnMax->setToolTip(tr("Maximize")); } else { showMaximized(); ui->btnMax->setIcon(QIcon::fromTheme("window-restore-symbolic")); + ui->btnMax->setToolTip(tr("Restore")); } }); connect(ui->btnClose, &QPushButton::clicked, this, &MainWindow::close); diff --git a/biometric-plugin/biometric-plugin.pro b/biometric-plugin/biometric-plugin.pro index 8a93f20..b602188 100644 --- a/biometric-plugin/biometric-plugin.pro +++ b/biometric-plugin/biometric-plugin.pro @@ -48,6 +48,7 @@ CONFIG += link_pkgconfig \ PKGCONFIG += gsettings-qt \ gio-2.0 \ + gio-unix-2.0 \ x11 \ kysdk-waylandhelper \ kysdk-qtwidgets diff --git a/biometric-plugin/giodbus.cpp b/biometric-plugin/giodbus.cpp index 9e0490e..737c101 100644 --- a/biometric-plugin/giodbus.cpp +++ b/biometric-plugin/giodbus.cpp @@ -1,6 +1,6 @@ #include "giodbus.h" #include -#include +#include #include int get_server_gvariant_stdout (int drvid)