From 7e4e90d371e3226f4a45942d94fa1ed5643f420e Mon Sep 17 00:00:00 2001 From: zhangyuanyuan1 Date: Fri, 29 Jul 2022 17:32:36 +0800 Subject: [PATCH 01/20] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BF=BB=E8=AF=91?= =?UTF-8?q?=E6=96=87=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/mainwindow.cpp | 2 +- src/frontend/netdetails/configpage.cpp | 13 +- src/frontend/networkmode/firewalldialog.cpp | 12 +- translations/kylin-nm_bo.ts | 169 ++++++++--------- translations/kylin-nm_bo_CN.qm | Bin 17217 -> 16836 bytes translations/kylin-nm_bo_CN.ts | 193 ++++++++++++-------- translations/kylin-nm_tr.qm | Bin 1958 -> 2010 bytes translations/kylin-nm_tr.ts | 169 ++++++++--------- translations/kylin-nm_zh_CN.qm | Bin 10615 -> 10504 bytes translations/kylin-nm_zh_CN.ts | 193 ++++++++++++-------- 10 files changed, 409 insertions(+), 342 deletions(-) diff --git a/src/frontend/mainwindow.cpp b/src/frontend/mainwindow.cpp index af521a47..558b5231 100644 --- a/src/frontend/mainwindow.cpp +++ b/src/frontend/mainwindow.cpp @@ -306,7 +306,7 @@ void MainWindow::initTrayIcon() m_showMainwindowAction = new QAction(tr("Show MainWindow"),this); m_showSettingsAction = new QAction(tr("Settings"),this); - m_trayIcon->setToolTip(QString(tr("kylin-nm"))); + m_trayIcon->setToolTip(QString(tr("Network tool"))); m_showSettingsAction->setIcon(QIcon::fromTheme("document-page-setup-symbolic", QIcon(":/res/x/setup.png")) ); // m_trayIconMenu->addAction(m_showMainwindowAction); m_trayIconMenu->addAction(m_showSettingsAction); diff --git a/src/frontend/netdetails/configpage.cpp b/src/frontend/netdetails/configpage.cpp index cc0ff7e3..0218480a 100644 --- a/src/frontend/netdetails/configpage.cpp +++ b/src/frontend/netdetails/configpage.cpp @@ -60,14 +60,13 @@ void ConfigPage::initUi() //网络配置文件类型 m_descriptionLabel->setText(tr("Network profile type")); m_descriptionLabel->setAlignment(Qt::AlignLeft); - //公用(推荐)无法在网络上发现你的设备。在大多数情况下,在家庭、工作或公共位置连接到网络时使用此功能。 - m_publicLabel->setText(tr("Public(recommended) Your device can not be discovered on the network. In most cases, " - "use this feature when connected to a network at home, work, or a public location.")); + //公用(推荐) 网络中的设备不可发现此电脑。一般情况下适用于公共场所中的网络,如机场或咖啡店等等。 + m_publicLabel->setText(tr("Public(recommended) Devices on the network cannot discover this computer. Generally, " + "it is suitable for networks in public places, such as airports or coffee shops, etc.")); m_publicLabel->setWordWrap(true); - //专用 可在网络上发现你的设备。如果需要文件共享或使用通过此网络通信的应用,请选择此项。你应该了解并信任网络上的人员和设备。 - m_privateLabel->setText(tr("Private Your device can be discovered on the network. Select this if you require file " - "sharing or use applications that communicate over this network. " - "You should know and trust the people and devices on the network.")); + //专用 网络中的设备可发现此电脑。一般情况下适用于家庭或工作单位的网络,您认识并信任网络上的个人和设备。 + m_privateLabel->setText(tr("Devices on the network can discover this computer. Generally applicable to a network " + "at home or work where you know and trust the individuals and devices on the network.")); m_privateLabel->setWordWrap(true); //配置防火墙和安全设置 m_congigBtn->setText(tr("Config firewall and security settings")); diff --git a/src/frontend/networkmode/firewalldialog.cpp b/src/frontend/networkmode/firewalldialog.cpp index e215eab8..c9a3d903 100644 --- a/src/frontend/networkmode/firewalldialog.cpp +++ b/src/frontend/networkmode/firewalldialog.cpp @@ -71,15 +71,15 @@ void FirewallDialog::initUI() QFont font = m_contentLabel->font(); font.setWeight(75); m_contentLabel->setFont(font); - //是否允许你的电脑被此网络上的其他电脑和设备发现? - m_contentLabel->setText(tr("Allow your computer to be discovered by other computers and devices on this network?")); + //是否允许此网络上的其他设备发现这台电脑? + m_contentLabel->setText(tr("Allow other devices on this network to discover this computer?")); m_contentLabel->setWordWrap(true); - //建议你在家庭和工作网络上而非公共网络上启用此功能。 - m_suggestLabel->setText(tr("It is recommended that you enable this feature on your home and work networks rather than public networks.")); + //不建议在公共网络上开启此功能 + m_suggestLabel->setText(tr("It is not recommended to enable this feature on public networks")); m_suggestLabel->setWordWrap(true); - m_YesBtn->setText(tr("Yse")); - m_NoBtn->setText(tr("No")); + m_YesBtn->setText(tr("Not allowed (recommended)")); + m_NoBtn->setText(tr("Allowed")); this->closeButton(); this->mainWidget()->setLayout(m_dialogLayout); diff --git a/translations/kylin-nm_bo.ts b/translations/kylin-nm_bo.ts index 4c2287b3..d4c86dc2 100644 --- a/translations/kylin-nm_bo.ts +++ b/translations/kylin-nm_bo.ts @@ -10,16 +10,16 @@ - Public(recommended) Your device can not be discovered on the network. In most cases, use this feature when connected to a network at home, work, or a public location. + Public(recommended) Devices on the network cannot discover this computer. Generally, it is suitable for networks in public places, such as airports or coffee shops, etc. - Private Your device can be discovered on the network. Select this if you require file sharing or use applications that communicate over this network. You should know and trust the people and devices on the network. + Devices on the network can discover this computer. Generally applicable to a network at home or work where you know and trust the individuals and devices on the network. - + Config firewall and security settings @@ -176,144 +176,154 @@ FirewallDialog - - Allow your computer to be discovered by other computers and devices on this network? + + Allow other devices on this network to discover this computer? - - It is recommended that you enable this feature on your home and work networks rather than public networks. + + It is not recommended to enable this feature on public networks - - Yse + + Not allowed (recommended) - - No + + Allowed Ipv4Page - + Ipv4Config - + Address - + Netmask - + Default Gateway - + Prefs DNS - + Alternative DNS - + Auto(DHCP) - + Manual - + Invalid address - + Invalid subnet mask - - + + Required + + + Address conflict + + Ipv6Page - + Ipv6Config - + Address - + Subnet prefix Length - + Default Gateway - + Prefs DNS - + Alternative DNS - + Auto(DHCP) - + Manual - - + + Required - + Invalid address - + Invalid gateway + + + Address conflict + + JoinHiddenWiFiPage @@ -386,27 +396,27 @@ LanPage - + No ethernet device avaliable - + LAN - + Activated LAN - + Inactivated LAN - + Wired Device not carried @@ -428,7 +438,6 @@ MainWindow - kylin-nm @@ -447,6 +456,11 @@ Settings + + + Network tool + + Show MainWindow @@ -456,120 +470,107 @@ NetDetail - + Kylin NM - + kylin network desktop message - + Detail - + Ipv4 - + Ipv6 - + Security - - + + Config - + Confirm - + Cancel - + Forget this network - + Add Lan Connect - + connect hiddin wlan - - - + + + None - - + + Auto - - start check ipv4 address conflict - - - - + start check ipv6 address conflict - - - - ipv4 address conflict! - - - - - + ipv6 address conflict! - + this wifi no support enterprise type - + this wifi no support None type - + this wifi no support WPA2 type - + this wifi no support WPA3 type @@ -869,32 +870,32 @@ WlanPage - + WLAN - + Activated WLAN - + Other WLAN - + No wireless network card detected - + WLAN Connected Successfully - + WLAN Disconnected Successfully diff --git a/translations/kylin-nm_bo_CN.qm b/translations/kylin-nm_bo_CN.qm index fab08fcc43928dc271ba08ba21be7c6bb6005d72..3aa60f20cc47f23d67945bc0b99de54730f628ea 100644 GIT binary patch delta 2892 zcmbtW3s6+o8U9yxmwg{#cR`TH6+uBB8UuoaDMAQ_;0P2%8jWSyy&E^cUc9@!jLAAR zwVehW^+pq7rZIuhNQg?PnOf5ntfVxJ(&tOxD^4v@k9Poks=GL$?-WOc9S5^fQI7tp+EU20 z&>O~eq0fjG1&j~-2H{sR9z6qXSX+%(BCbCZ-T7gxv*{u#o*(=8*rP=GD`Q_A`~ZSH z#E}hibmo|BTM#H~!gOcX=R}TdQ;}me?hl(9uCGD|-Y`8^_aG9k;23|!H1bv^C^=yo z``|C|d(&L}z`I0=qPhHx86wRyM|`SyEIDQ==@V3tX6{*Ffa>>~_nbu~vpwd+Q$Hjs zpKm_06W_D0n_o8pv+pyXU-Biy_ni6CVSLZuX1=as_Eqz(Z5J?6qZUW4f&wmaj7#U} ze92N7^Dt3-m*wssErWlGSUg`95v82tSh~XEd*`>{O0KI|(u94-T6C83AgYZH-TMYSJgE*_#(8w;Q%A)FC|J7Q(Q|S8s{p)9-hS;I1w?W-q?8r-5U|>$4wxF~!cG*6P z4C@0R{COqCa3Ebb$ZFUo*2t{P&qmn<+l;jx@1^#m{5`{|Je!#iS&kDK7FJfpCSg;B z)pD%Vdu{kD16x@GPO7nLU}4sxdWrg!Svz)HSiN>yrCC?8Ce7ddu=Q$QxYtT8QY&`u z*Q~4I*O~wmHFzTeG-*do%8?{@eWPa522=GyGi>Zkb-)YyI_XCCGS1cX)WmrLty&s> zwhPv3dhn%q=DOq6WU67Q#%p71nY_!iEOM|~>@EDgVZGok}PQ6 z`ZkENC=5tFLPt>Q6Ffnm5SDvFVS%YJ13_P)H{k2>bcU2KOpBBghF)F2veD(vw%;-# zRi3h+?blf39iPz3XlC|X=5NU*Z`1$7XgwHK)xkAV9nt#QsBQX@wz}OkLl~T^7VL6a z+~!sl=(FI;4yKx;oT*w+g`~1y1&-A~4Vtg7l_6`KuZTvfWD!-NeoYE0#a=j7wHbz9 z3)O!W$cW#uhMsm%mLrScvr7#6L|?8T{AUparSSjOLB0?O3xWEO5b6npH8uFbd{jyy z@GEp{QHAbK544sKJMRX;6B0ZDxm%LMP@fEa`Te3Ogf>Xsun@yuCC==cTyGtY)jg_F z{C%TEsc;$<-`oU6a+)IQRQ$KGZD+&LdEuP2u@z_rpOaQJrDD1%->K~Ege)b9Q5JkN z2LigkJrNN2HwMBoJrNa3#63IRhWCb#VKcK%yN=adi$2w4UO(vYYn-;hSQT<>G($V~ z)kjKJhFk@8O~_NN4UWL>?MJ8z?o~qD*+JY>&+XG;Dr!Lhas^v6n8i>ki`=tWwEMRS zQFB?D10SkFqe=h!LAzz15hHmOykqR8KG7$9LqMuSB`$HPJ(KyO4aOU&Y|KrZH=SWz zrOzjeA@v;z`k}yZEYxVK?d~m7c34+W?n?Z8*0;L8RJ(pA`9+H^Rh3DGSIeMg1_!oP Z(MK&TNu85{tQ&geT<%Ac>+&up{R^Ck+UEcO delta 3046 zcmah~4RBOf6+WBnX8-q+>~2;9feRsIHw_^T36M5GvWCbCLy`tUC~f8K?n|;|*%$VQ z2&7#K)oM+&_6a45))pi!KLwgrWI#(OnXywui(-p7&e(`kOM%vk4Mov&@7)b4qGo2_ z_uhT)+uWhhXgux8pE2S0L~+t#utzYJ=OGXcVdEj1AF6Etn&i1w+M8c)ST=2Ccr&6GiIFFjr>ozz;1Bii?}Jn31b}bMBh}hDC@;ys@{Vgr_h8yUvzBh!h^t&0W=v zAJ_%jXA8{r>lPPw0ZiVhYtJ7KaMu@fo1c6f;NAtgJ{1`#nXmis{1AG_omF(|8XnY; z^+4=nfU+xDn}R(k#q_LK&oU2O%DU?KBS2+XZ%;N~MDy&^e`D{X81R;UU(Ya7Rx5Da zUj;hK4VKM#(Dd1c3fpoFoMdPmSqfl%&=4Ii1+a}6o?G0GQk)f-bKS7(^i({!-mrK0 zPXMKl89rd~h2J+;KKKrRiyEuX8WI0&Oa_@*Ovj9h>k2aPyfIOvL$^!D?dPzf@e_>) zPkaSn-ag}@Z{suUHojp%oc>GWh4N34sS4wJ2l3f$HjXeXN|pMZ5m>dw#4F4#G@U&0 zF2LQ7nucESA!9qto?<*OXM#ZIDs%laM**sTY7V}*5KVp5ylcl0KzWyW|27YLs8`_3 zZu2=hfD$L46gT!C3CvY3HShlnH666{STRHUMS;1$7MQn5;LN)$y%WC&kY}>=m25?d zk6U&wlJTG-%P~z1J@O@imDerj7QKOHt+D2p`~YC$MQi>84EI>Swg%Ue)yu6XyRqN% z&RU1Rg$HZKTd!*qXs*B8H1Fz=+UIPR$rsSYZ8k9vs%;AnBlUBJZ3|z(jkJ1O%cbQg zk=yo{Pm#H*LQ*iI_NwHjHYlSzGG{C+}q3Vyck!@|7-rh}U(iExmvi6~uEiUesqnuxJ8W!fn#oncwMqMuo&VFfV{ zFs{aM4sK+yn-|+g_Tc+&#yoh`x2D?j8##|@?(g81&Ts#qrAak8*YI=ifH*EAs@4U`jKur96dqSOrZL#0|Z>c7-G3|5Yt zs^c+G;)LRKh@^dyepmY6Sj3!^5YYet diff --git a/translations/kylin-nm_bo_CN.ts b/translations/kylin-nm_bo_CN.ts index 34f06ae4..7d428c90 100644 --- a/translations/kylin-nm_bo_CN.ts +++ b/translations/kylin-nm_bo_CN.ts @@ -41,16 +41,24 @@ - Public(recommended) Your device can not be discovered on the network. In most cases, use this feature when connected to a network at home, work, or a public location. - སྤྱི་སྤྱོད་(འོས་སྦྱོར་)དྲ་རྒྱའི་ཐོག་ནས་ཁྱོད་ཀྱི་སྒྲིག་ཆས་རྙེད་མི་ཐུབ། གནས་ཚུལ་མང་ཆེ་བའི་འོག་ཏུ་ཁྱིམ་ཚང་དང་བྱ་བ་འམ་ཡང་ན་སྤྱི་པའི་གོ་གནས་སུ་དྲ་རྒྱའི་དུས་སུ་ནུས་པ་འདི་བཀོལ་སྤྱོད་བྱེད་དགོས།. + Public(recommended) Devices on the network cannot discover this computer. Generally, it is suitable for networks in public places, such as airports or coffee shops, etc. + སྤྱི་སྤྱོད།(འོས་སྦྱོར་བྱས་པ།)དྲ་རྒྱའི་སྒྲིག་ཆས་ཀྱིས་གློག་ཀླད་འདི་མཐོང་མི་ཐུབ། སྤྱིར་བཏང་གི་གནས་ཚུལ་འོག་ཏུ་མི་མང་འདུ་སའི་ནང་གི་དྲ་བ་ལ་འཚམ་པ་སྟེ།དཔེར་ན་གནམ་གྲུ་ཐང་དང་འཚིག་ཇའི་ཁང་སོགས་ལྟ་བུ།. - Private Your device can be discovered on the network. Select this if you require file sharing or use applications that communicate over this network. You should know and trust the people and devices on the network. - ཆེད་སྤྱོད་དྲ་རྒྱའི་སྟེང་ནས་ཁྱོད་ཀྱི་སྒྲིག་ཆས་རྙེད་ཐུབ། གལ་ཏེ་ཡིག་ཆ་མཉམ་སྤྱོད་བྱེད་དགོས་པའམ་ཡང་ན་དྲ་རྒྱའི་འཕྲིན་གཏོང་བཀོལ་སྤྱོད་བྱེད་པར་བརྟེན་ནས་རྣམ་གྲངས་འདི་འདེམས་རོགས་གནང། ཁྱོད་ཀྱིས་དྲ་རྒྱའི་སྟེང་གི་མི་སྣ་དང་སྒྲིག་ཆས་ལ་རྒྱུས་ལོན་དང་ཡིད་ཆེས་བྱེད་དགོས།. + Devices on the network can discover this computer. Generally applicable to a network at home or work where you know and trust the individuals and devices on the network. + ཆེད་སྤྱོད། དྲ་རྒྱའི་སྒྲིག་ཆས་ཀྱིས་གློག་ཀླད་འདི་མཐོང་ཐུབ། སྤྱིར་བཏང་གི་གནས་ཚུལ་འོག་ཁྱིམ་ཚང་ངམ་ལས་དོན་ཚན་པའི་དྲ་བ་དང་འཚམ་པས།ཁྱེད་ཀྱིས་དྲ་ཐོག་གི་མི་སྒེར་དང་སྒྲིག་ཆས་ལ་ངོས་འཛིན་དང་ཡིད་ཆེས་བྱེད་དགོས།. - + Public(recommended) Your device can not be discovered on the network. In most cases, use this feature when connected to a network at home, work, or a public location. + སྤྱི་སྤྱོད་(འོས་སྦྱོར་)དྲ་རྒྱའི་ཐོག་ནས་ཁྱོད་ཀྱི་སྒྲིག་ཆས་རྙེད་མི་ཐུབ། གནས་ཚུལ་མང་ཆེ་བའི་འོག་ཏུ་ཁྱིམ་ཚང་དང་བྱ་བ་འམ་ཡང་ན་སྤྱི་པའི་གོ་གནས་སུ་དྲ་རྒྱའི་དུས་སུ་ནུས་པ་འདི་བཀོལ་སྤྱོད་བྱེད་དགོས།. + + + Private Your device can be discovered on the network. Select this if you require file sharing or use applications that communicate over this network. You should know and trust the people and devices on the network. + ཆེད་སྤྱོད་དྲ་རྒྱའི་སྟེང་ནས་ཁྱོད་ཀྱི་སྒྲིག་ཆས་རྙེད་ཐུབ། གལ་ཏེ་ཡིག་ཆ་མཉམ་སྤྱོད་བྱེད་དགོས་པའམ་ཡང་ན་དྲ་རྒྱའི་འཕྲིན་གཏོང་བཀོལ་སྤྱོད་བྱེད་པར་བརྟེན་ནས་རྣམ་གྲངས་འདི་འདེམས་རོགས་གནང། ཁྱོད་ཀྱིས་དྲ་རྒྱའི་སྟེང་གི་མི་སྣ་དང་སྒྲིག་ཆས་ལ་རྒྱུས་ལོན་དང་ཡིད་ཆེས་བྱེད་དགོས།. + + + Config firewall and security settings མེ་འགོག་གྱང་རྩིག་དང་བདེ་འཇགས་བཀོད་སྒྲིག་བྱ་དགོས། @@ -456,144 +464,170 @@ FirewallDialog - Allow your computer to be discovered by other computers and devices on this network? - ཁྱོད་ཀྱི་གློག་ཀླད་དེ་དྲ་རྒྱའི་སྟེང་གི་གློག་ཀླད་དང་སྒྲིག་ཆས་གཞན་དག་གིས་རྙེད་ཐུབ་བམ།? + ཁྱོད་ཀྱི་གློག་ཀླད་དེ་དྲ་རྒྱའི་སྟེང་གི་གློག་ཀླད་དང་སྒྲིག་ཆས་གཞན་དག་གིས་རྙེད་ཐུབ་བམ།? - It is recommended that you enable this feature on your home and work networks rather than public networks. - ཁྱེད་ཀྱིས་ཁྱིམ་ཚང་དང་བྱ་བའི་དྲ་རྒྱའི་སྟེང་ནས་སྤྱི་སྤྱོད་མིན་པའི་དྲ་རྒྱའི་སྟེང་ནས་བྱེད་ནུས་འདི་སྤྱོད་རྒྱུའི་གྲོས་འགོ་བཏོན།. + ཁྱེད་ཀྱིས་ཁྱིམ་ཚང་དང་བྱ་བའི་དྲ་རྒྱའི་སྟེང་ནས་སྤྱི་སྤྱོད་མིན་པའི་དྲ་རྒྱའི་སྟེང་ནས་བྱེད་ནུས་འདི་སྤྱོད་རྒྱུའི་གྲོས་འགོ་བཏོན།. - Yse - དེ་ནི་རེད། + དེ་ནི་རེད། - No - དེ་ལྟར་མ་བྱས་ + དེ་ལྟར་མ་བྱས་ + + + + Allow other devices on this network to discover this computer? + དྲ་རྒྱའི་སྟེང་གི་སྒྲིག་ཆས་གཞན་པས་གློག་ཀླད་འདི་རྙེད་དུ་འཇུག་གམ།? + + + + It is not recommended to enable this feature on public networks + བསམ་འཆར་མེད་།སྤྱི་པའི་དྲ་རྒྱའི་སྟེང་ནས་ནུས་པ་འདི་མགོ་བརྩམས་། + + + + Not allowed (recommended) + མི་ཆོག་(འོས་སྦྱོར་)། + + + + Allowed + ཆོག་པ་ Ipv4Page - + Ipv4Config Ipv4ཁུང་ཙི། - + Address སྡོད་གནས། - + Netmask དྲ་རྒྱའི་མ་ལག - + Default Gateway ཁ་ཆད་བཞག་པའི་སྒོ་ཆེན། - + Prefs DNS སྔོན་གྲབས་DNS - + Alternative DNS ཚབ་བྱེད་རང་བཞིན་གྱི་DNS - + Auto(DHCP) རང་འགུལ་(DHCP) - + Manual ལག་དེབ། - + Invalid address རྩིས་འགྲོ་མེད་པའི་ས་གནས། - + Invalid subnet mask རྩིས་འགྲོ་མེད་པའི་དྲ་བ་འགེབས་སྲུང་བྱེད་པ། - - + + Required ངེས་པར་དུ་སྐོང་དགོས། + + + Address conflict + ཤག་གནས་གདོང་གཏུག་ + Ipv6Page - + Ipv6Config Ipv6ཁུང་ཙི། - + Address སྡོད་གནས། - + Subnet prefix Length ཡན་ལག་དྲ་རྒྱའི་སྔོན་སྒྲིག་གི་རིང་ཚད། - + Default Gateway ཁ་ཆད་བཞག་པའི་སྒོ་ཆེན། - + Prefs DNS སྔོན་གྲབས་DNS - + Alternative DNS ཚབ་བྱེད་རང་བཞིན་གྱི་DNS - + Auto(DHCP) རང་འགུལ་(DHCP) - + Manual ལག་དེབ། - - + + Required ངེས་པར་དུ་སྐོང་དགོས། - + Invalid address རྩིས་འགྲོ་མེད་པའི་ས་གནས། - + Invalid gateway རྩིས་འགྲོ་མེད་པའི་དྲ་བའི་འགག་སྒོ། + + + Address conflict + ཤག་གནས་གདོང་གཏུག་ + JoinHiddenWiFiPage @@ -666,22 +700,22 @@ LanPage - + No ethernet device avaliable ཨེ་ཙི་དྲ་རྒྱའི་སྒྲིག་ཆས་ལ་བཙན་འཛུལ་བྱས་མི་ཆོག། - + LAN སྐུད་ཡོད་དྲ་བ། - + Activated LAN ངའི་དྲ་རྒྱ། - + Inactivated LAN དྲ་བ་གཞན་དག @@ -690,7 +724,7 @@ སྐུད་ཡོད་དྲ་བ་ཆད་སོང་། - + Wired Device not carried སྐུད་ཡོད་སྒྲིག་ཆས་འཁྱེར་མེད་པ། @@ -716,7 +750,6 @@ MainWindow - kylin-nm དྲ་རྒྱའི་ཡོ་བྱད། @@ -743,36 +776,41 @@ 设置网络项 སྒྲིག་བཀོད། + + + Network tool + དྲ་རྒྱའི་ལག་ཆ་ + NetDetail - + Kylin NM ཅིན་ལིན་NM - + kylin network desktop message དྲ་རྒྱའི་གསལ་འདེབས་གནས་ཚུལ། - + Detail ཞིབ་ཕྲའི་གནས་ཚུལ། - + Ipv4 Ipv4 - + Ipv6 Ipv6 - + Security བདེ་འཇགས། @@ -781,90 +819,85 @@ 关闭 - - + + Config བཀོད་སྒྲིག་བཅས་བྱ་དགོས། - + Confirm གཏན་འཁེལ་བྱ་དགོས། - + Cancel ཕྱིར་འཐེན། - + Forget this network དྲ་རྒྱ་འདི་བརྗེད་སོང་། - + Add Lan Connect སྐུད་ཡོད་དྲ་བ་ཁ་སྣོན་བྱ་དགོས། - + connect hiddin wlan ཧའེ་ཏེན་ཝེ་ལན་དང་འབྲེལ་མཐུད་བྱེད་པ། - - - + + + None གཅིག་ཀྱང་མེད། - - + + Auto རང་འགུལ་གྱིས་རླངས་ - start check ipv4 address conflict - ipv4ས་གནས་ཀྱི་འགལ་བ་ལ་ཞིབ་བཤེར་བྱེད་འགོ་ཚུགས། + ipv4ས་གནས་ཀྱི་འགལ་བ་ལ་ཞིབ་བཤེར་བྱེད་འགོ་ཚུགས། - + start check ipv6 address conflict ipv6གནས་ཡུལ་དང་འགལ་བར་ཞིབ་བཤེར་བྱེད་འགོ་ཚུགས། - - - ipv4 address conflict! - ipv4ཐག་གཅོད་གདོང་གཏུག་བྱུང་བ་རེད།! + ipv4ཐག་གཅོད་གདོང་གཏུག་བྱུང་བ་རེད།! - - + ipv6 address conflict! ipv6ཐག་གཅོད་གདོང་གཏུག་བྱུང་བ་རེད།! - + this wifi no support enterprise type wifiལ་རྒྱབ་སྐྱོར་མེད་པའི་ཁེ་ལས་ཀྱི་རིགས་དབྱིབས། - + this wifi no support None type wifiལ་རྒྱབ་སྐྱོར་མི་བྱེད་པར་རིགས་དབྱིབས་གཅིག་ཀྱང་མེད། - + this wifi no support WPA2 type wifiལ་རྒྱབ་སྐྱོར་མི་བྱེད་པའི་WPA2རིགས་དབྱིབས་ - + this wifi no support WPA3 type wifiལ་རྒྱབ་སྐྱོར་མི་བྱེད་པའི་WPA3རིགས་དབྱིབས་ @@ -1260,22 +1293,22 @@ WlanPage - + WLAN སྐུད་མེད་ཅུས་ཁོངས་ཀྱི་དྲ་བ། - + No wireless network card detected སྐུད་མེད་དྲ་རྒྱའི་བྱང་བུ་མ་རྙེད་པ། - + Activated WLAN ངའི་དྲ་རྒྱ། - + Other WLAN དྲ་བ་གཞན་དག @@ -1284,12 +1317,12 @@ 更多... - + WLAN Connected Successfully སྐུད་མེད་དྲ་བ་སྦྲེལ་ཡོད། - + WLAN Disconnected Successfully སྐུད་མེད་དྲ་རྒྱ་ཆད་སོང་། diff --git a/translations/kylin-nm_tr.qm b/translations/kylin-nm_tr.qm index 07e2ca58f3d79cb9ff2f80155bf344fd312bf37c..67ee71e84e40a9877474ba9e57722ceff1c227d1 100644 GIT binary patch delta 199 zcmZ3+e~W*DNaO{MBvz~#0=?w$RwO$4W<_su3fq^y5707ph&@3tptOw$N z>SjS`w(SfCqP0N&QO4eBq6`d-dm%Jy>BL-h!D5zWKHq_wMOe0({{zxHCeGDY)8RV0 z#S_SR%e{EUQ3eJUf1axzCxI>y;eXA$1jt{L$-uz&U~(Lz{$@qSmrRlz42}$y42cXy W91K9f2Exwyd1;yHo4+%!X9fWD_%VL~ delta 160 zcmcb`zl?u^NaPI$2G(dGKF`3?vz~#0=?w$RwO$4WW*aD-!oV8l3gnAG=^qTN2jYP0 zWoE-;tAv& - Public(recommended) Your device can not be discovered on the network. In most cases, use this feature when connected to a network at home, work, or a public location. + Public(recommended) Devices on the network cannot discover this computer. Generally, it is suitable for networks in public places, such as airports or coffee shops, etc. - Private Your device can be discovered on the network. Select this if you require file sharing or use applications that communicate over this network. You should know and trust the people and devices on the network. + Devices on the network can discover this computer. Generally applicable to a network at home or work where you know and trust the individuals and devices on the network. - + Config firewall and security settings @@ -1195,144 +1195,154 @@ FirewallDialog - - Allow your computer to be discovered by other computers and devices on this network? + + Allow other devices on this network to discover this computer? - - It is recommended that you enable this feature on your home and work networks rather than public networks. + + It is not recommended to enable this feature on public networks - - Yse + + Not allowed (recommended) - - No + + Allowed Ipv4Page - + Ipv4Config - + Address - + Netmask - + Default Gateway - + Prefs DNS - + Alternative DNS - + Auto(DHCP) Oto(DHCP) - + Manual Elle - + Invalid address - + Invalid subnet mask - - + + Required + + + Address conflict + + Ipv6Page - + Ipv6Config - + Address - + Subnet prefix Length - + Default Gateway - + Prefs DNS - + Alternative DNS - + Auto(DHCP) Oto(DHCP) - + Manual Elle - - + + Required - + Invalid address - + Invalid gateway + + + Address conflict + + JoinHiddenWiFiPage @@ -1412,27 +1422,27 @@ LanPage - + No ethernet device avaliable - + LAN - + Activated LAN - + Inactivated LAN - + Wired Device not carried @@ -1454,7 +1464,6 @@ MainWindow - kylin-nm @@ -1489,6 +1498,11 @@ Settings + + + Network tool + + Enabled Aktif @@ -1598,120 +1612,107 @@ NetDetail - + Kylin NM - + kylin network desktop message - + Detail - + Ipv4 - + Ipv6 - + Security - - + + Config Ayar - + Confirm - + Cancel - + Forget this network - + Add Lan Connect - + connect hiddin wlan - - - + + + None Yok - - + + Auto Oto - - start check ipv4 address conflict - - - - + start check ipv6 address conflict - - - - ipv4 address conflict! - - - - - + ipv6 address conflict! - + this wifi no support enterprise type - + this wifi no support None type - + this wifi no support WPA2 type - + this wifi no support WPA3 type @@ -2216,32 +2217,32 @@ WlanPage - + WLAN WLAN - + Activated WLAN - + Other WLAN - + No wireless network card detected - + WLAN Connected Successfully - + WLAN Disconnected Successfully diff --git a/translations/kylin-nm_zh_CN.qm b/translations/kylin-nm_zh_CN.qm index f13d1aaa760516212e01c67bcf7df35376fe65ec..196dbdcc070cded8b1aef7ba75f4bbaf282fef42 100644 GIT binary patch delta 2258 zcmai!dr(w$6vxj#?(W{*dzUweF7N|1kx;30RL02{k_@(hfar+ivU_nimc8q~2vOGu zV-{%EDo9q2qm~Lj5z`(<4mjgrSx%UyS!$*|Ov)E&MQ8UXq>a`eJD>YFzw`Kh&)wV8 zR!mzR?rjAC0?_Xdfb6dTm@fcwiUC57QigVeyml8rcmc>yuEe-~_jn2zD zcz*=CCXNJ%-U8je?HK2gDE3qW$i58F3+nas0e4oSDmw_kr%Q6SuEl^2l9hE4*ia*7 ze5j=9qcDINt>jpG1HLy=s_m5A9!Y2IDu9GG>Co2A0Kr|92|2Q?!WJCxfUIV}4M5T% zt3QhkM3>6078ZK}21Lm@XDkK`m#5!G*;$`FH6q53utclv*=o zc$NI^skhOZP4cF9(7x~+@?Fac0pg40`$wS_17^uPMt1&ivZGFlp4HX1djQRx|uV&qY8C>cvwyqNg2r{s{Uqwn*u->C8yoj34 zo_X>PPM~40?85tgz;^o?wUzBzeh$Bo8ES2&4?Rz&RHspLRq6?{DpXFUp7i1vOdP2; z+#P}5AEu1&Qky>e1g+^%3t8Bx@>|N_ddm1VuR1Up|AP8(>ji*ViMoAXCQ9|LW=Jv? zR3E40gEblT2LTcrgiNYU#)3cI|P+uD0SaxI!QAswUJWOPRXC(#{YN- z&rjxRd2CQ~lTz!I(u-h1soTq~)UC%!&TtJW%TU@%?u{t|7MjkzFLB~d6i|}yxy~uL ztg&~wYkBybjo@Qa-a?7%_?RL;1%5>tzE9l1uTL3^=MwnC3-Egn&f|ZVyK#r=wUP^H zNp`;(S}yJk{!!?(%VcYCVuq5-(Ee}-C5wM4Xxh)$(EKh#rQb7-bA?^@pH&fR4u_sAt7sZu>G zO_|f4+oIR3mb#Plt7h#l-cb@c`%-pMUP1P=o@)Qe9&XOon$0ywiapuq^>+ig)Sha6 zvi`mNT7Sk=smkA%0)N}m1&_rjIEiQ@F0WZ2Ho;XPI?9OAU?V1r(h-Y@+M`wMZcr7eSev zZi_1*NGT3~PfaJzNbK$s)QZ@x2GlzRG1r=awpUrC^PlCnd{M?3~UGP#w(}uy8PSG6W8bK(-W*#6k0@m9mI5> z$9^Y!Jx0qOZt*xJu7)KPI znB+HvcK#gX4=*!K+pzf0zAWQ11H$=Lb_lp-<$}#5;DU%mumzO#2KKL1Fu2^fMYyT= zr0iAqQRTII-rsKT7WEa3)?+CgOsv2%N%z$p^6*T)q@d(*Rbgu3_}snom-M9xp5R-e s3u{gf>Mwot+nkUVh40ONp**L*_hq?6(c1iL)EJr1K45Kgk!}G0HZ2?KO(uhS+aTFA^f=Sa>N`_LKCbw;Dy4z;6sYPHx zihwOr4NnCb2axweD-J4yh%yYL_+TtLAShO5Kv0-b0jXHe=0X{j8UM+5_ujqd@jKsU zLFwhv&J=k!01$wIB7oKnVA2A(j{)eC0ZOU>l8!P>#{KH0cwPXSjvW9gg`hdQ2=Co- zUEQG7F9Ars3w0UlRM4jW1z`ORw4-WxpIKy zOOQV1E`YR`!Kt6k!9eFgPRm@*Te_4DDm znymmizr)F-N!a59aBI^)ehbrU3{5IRL?AA^k+Jb1SwRQG^h$^U^{X!dd!fRK?kU-W1-LQ{;NA1;B zioXI3a_F87bYQ?Ab-Rw>jP+jKg_Ki>`Zs-Y*=g)>slI*lEP(8%^jkW5kkm+~rgElS zwSkjoV}kUkp~(6qUfgdex#9valo`T3!vTyF46jeD!%AID&2tQEKg~n*Ul}&{{D^@+ zGMta!&oPdi_6?eCv~kQ4BkCK*K<|C%g$Ip7`Y+gduTdI?22Q$WT-J?^*m&d4mr!Af zQ9fkAMfzdm@exM<#MELpPgwpgz>rFFU=w~mq}9B3#Q}W3*SvLUK7LN$F||)Ncatt8^*vKg&(!iA z_s~y!afExg4ht5@jbduGF-?^3WD9#fw829b^JyQpf+32UPV-SU@JZUD_#WKqGtS~F|4+2ANLuKCdIaM z+Yn6TWIABH?VM#D7E%<%tm|XPG?lSh-NW*9SF+>)Qg)%jA$w+h>oS#nDeiPvN88%> zdi74V_qn=N%VFUhI^T84)9l((ljfEsM`z~ZgAD=Y{mxAHsc2i(63NlWwO{Tu)|_n! ztY~$r-PKh~+E2TlU)WO>b)Rzeve?l!*L&qt$~#zW0~RfV4u8Kc2?wLT2qnZTNMRD7 z(V(9azmF$1lmvpJUx?B$4G@7Rk$Osa8fg*24Z}$p4N-pt_ktn`){<61B4OGr1;doo z21AsH^}cYBuOmX3NFpV^rlwHP?~4QlUc^hj2=R{-8XF~E*`!2C!eaF&z;ZB%AcX>? zffrhcj}MSYSQ3?-lr&MHDMVxU=$vxE6G8+A|Hio`eMb6ysQcD9D;(Zo-b~t5eZaHJ zW$xoD98=$^+U8VEJMFHlN%Mp}&F&{;e(_2F`ckKYj9yZ3Hv~%8%)aJSE5PEsHk3#; z*oh-d{a8Qc1C$2x{|k>7BL4%hm?w<_cH{SnR4j-?io>j>zKDbrTk0uK`~uG-W*UfH z)TU+^5QTk#!qi8a;&qUaz^KMNy40?(^z~ZVSzB0sn`dnMZpBK{$T>+1wlKrEOwl$^ z)OA$ZV@6O6*O$}Z+vKsK5R%4OhB0$vlN3>=BK)h7npPs<2yVV2#%IHvBa#7er=TmY zPx8W^HL-1$40%M=)%NY~YKFbML&46RIh$KvrQl~z<%PF^{&aDKV8olu(F%%(6xUJS zSA%~02Rkew-bB67h}J{nv - Public(recommended) Your device can not be discovered on the network. In most cases, use this feature when connected to a network at home, work, or a public location. - 公用(推荐)无法在网络上发现你的设备。在大多数情况下,在家庭、工作或公共位置连接到网络时使用此功能。 + Public(recommended) Devices on the network cannot discover this computer. Generally, it is suitable for networks in public places, such as airports or coffee shops, etc. + 公用(推荐) 网络中的设备不可发现此电脑。一般情况下适用于公共场所中的网络,如机场或咖啡店等等。 - Private Your device can be discovered on the network. Select this if you require file sharing or use applications that communicate over this network. You should know and trust the people and devices on the network. - 专用 可在网络上发现你的设备。如果需要文件共享或使用通过此网络通信的应用,请选择此项。你应该了解并信任网络上的人员和设备。 + Devices on the network can discover this computer. Generally applicable to a network at home or work where you know and trust the individuals and devices on the network. + 专用 网络中的设备可发现此电脑。一般情况下适用于家庭或工作单位的网络,您认识并信任网络上的个人和设备。 - + Public(recommended) Your device can not be discovered on the network. In most cases, use this feature when connected to a network at home, work, or a public location. + 公用(推荐)无法在网络上发现你的设备。在大多数情况下,在家庭、工作或公共位置连接到网络时使用此功能。 + + + Private Your device can be discovered on the network. Select this if you require file sharing or use applications that communicate over this network. You should know and trust the people and devices on the network. + 专用 可在网络上发现你的设备。如果需要文件共享或使用通过此网络通信的应用,请选择此项。你应该了解并信任网络上的人员和设备。 + + + Config firewall and security settings 配置防火墙和安全设置 @@ -456,144 +464,170 @@ FirewallDialog - Allow your computer to be discovered by other computers and devices on this network? - 是否允许你的电脑被此网络上的其他电脑和设备发现? + 是否允许你的电脑被此网络上的其他电脑和设备发现? - It is recommended that you enable this feature on your home and work networks rather than public networks. - 建议你在家庭和工作网络上而非公共网络上启用此功能。 + 建议你在家庭和工作网络上而非公共网络上启用此功能。 - Yse - + - No - + + + + + Allow other devices on this network to discover this computer? + 是否允许此网络上的其他设备发现这台电脑? + + + + It is not recommended to enable this feature on public networks + 不建议在公共网络上开启此功能 + + + + Not allowed (recommended) + 不允许(推荐) + + + + Allowed + 允许 Ipv4Page - + Ipv4Config Ipv4配置 - + Address 地址 - + Netmask 子网掩码 - + Default Gateway 默认网关 - + Prefs DNS 首选DNS - + Alternative DNS 备选DNS - + Auto(DHCP) 自动 - + Manual 手动 - + Invalid address 无效地址 - + Invalid subnet mask 无效子网掩码 - - + + Required 必填 + + + Address conflict + 地址冲突 + Ipv6Page - + Ipv6Config Ipv6配置 - + Address 地址 - + Subnet prefix Length 子网前缀长度 - + Default Gateway 默认网关 - + Prefs DNS 首选DNS - + Alternative DNS 备选DNS - + Auto(DHCP) 自动 - + Manual 手动 - - + + Required 必填 - + Invalid address 无效地址 - + Invalid gateway 无效网关 + + + Address conflict + 地址冲突 + JoinHiddenWiFiPage @@ -666,22 +700,22 @@ LanPage - + No ethernet device avaliable 未检测到有线设备 - + LAN 有线网络 - + Activated LAN 我的网络 - + Inactivated LAN 其他网络 @@ -690,7 +724,7 @@ 有线网络已断开 - + Wired Device not carried 未插入网线 @@ -716,7 +750,6 @@ MainWindow - kylin-nm 网络工具 @@ -743,36 +776,41 @@ 设置网络项 设置网络项 + + + Network tool + 网络工具 + NetDetail - + Kylin NM 麒麟网络设置工具 - + kylin network desktop message 网络提示消息 - + Detail 详情 - + Ipv4 Ipv4 - + Ipv6 Ipv6 - + Security 安全 @@ -781,90 +819,85 @@ 关闭 - - + + Config 配置 - + Confirm 确定 - + Cancel 取消 - + Forget this network 忘记此网络 - + Add Lan Connect 添加有线网络 - + connect hiddin wlan 连接到隐藏WLAN - - - + + + None - - + + Auto 自动 - start check ipv4 address conflict - 开始检测ipv4地址冲突 + 开始检测ipv4地址冲突 - + start check ipv6 address conflict 开始检测ipv6地址冲突 - - - ipv4 address conflict! - ipv4地址冲突! + ipv4地址冲突! - - + ipv6 address conflict! ipv6地址冲突! - + this wifi no support enterprise type 此wifi不支持企业网类型 - + this wifi no support None type 此wifi不支持空类型 - + this wifi no support WPA2 type 此wifi不支持WPA2类型 - + this wifi no support WPA3 type 此wifi不支持WPA3类型 @@ -1260,22 +1293,22 @@ WlanPage - + WLAN 无线局域网 - + No wireless network card detected 未检测到无线网卡 - + Activated WLAN 我的网络 - + Other WLAN 其他网络 @@ -1284,12 +1317,12 @@ 更多... - + WLAN Connected Successfully 无线网络已连接 - + WLAN Disconnected Successfully 无线网络已断开 From bafaa206e210242bf3bd85243a4a33d74e8e94f9 Mon Sep 17 00:00:00 2001 From: zhangyuanyuan1 Date: Tue, 2 Aug 2022 17:27:57 +0800 Subject: [PATCH 02/20] =?UTF-8?q?fix=20bug=20126830=20=E6=89=8B=E5=8A=A8?= =?UTF-8?q?=E4=BF=AE=E6=94=B9IP=E5=86=B2=E7=AA=81=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/netdetails/ipv4page.cpp | 87 ++++++++++++++ src/frontend/netdetails/ipv4page.h | 21 +++- src/frontend/netdetails/ipv6page.cpp | 86 ++++++++++++++ src/frontend/netdetails/ipv6page.h | 18 +++ src/frontend/netdetails/netdetail.cpp | 165 ++++++++++++++++++++------ src/frontend/netdetails/netdetail.h | 33 +++++- 6 files changed, 367 insertions(+), 43 deletions(-) diff --git a/src/frontend/netdetails/ipv4page.cpp b/src/frontend/netdetails/ipv4page.cpp index 9d8ffd10..e03d4041 100644 --- a/src/frontend/netdetails/ipv4page.cpp +++ b/src/frontend/netdetails/ipv4page.cpp @@ -25,6 +25,8 @@ #define LAYOUT_SPACING 0 #define HINT_TEXT_MARGINS 8, 1, 0, 3 #define LABEL_HEIGHT 24 +#define FRAME_SPEED 150 +#define ICON_SIZE 16,16 Ipv4Page::Ipv4Page(QWidget *parent):QFrame(parent) { @@ -53,6 +55,7 @@ void Ipv4Page::initUI() { m_addressHintLabel = new QLabel(this); m_addressHintLabel->setFixedHeight(LABEL_HEIGHT); m_addressHintLabel->setContentsMargins(HINT_TEXT_MARGINS); + initConflictHintLable(); m_maskHintLabel = new QLabel(this); m_maskHintLabel->setFixedHeight(LABEL_HEIGHT); @@ -72,6 +75,12 @@ void Ipv4Page::initUI() { m_dnsLabel->setText(tr("Prefs DNS")); m_secDnsLabel->setText(tr("Alternative DNS")); + m_statusLabel = new QLabel(this); + m_statusLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); + QHBoxLayout *pPwdLayout = new QHBoxLayout(ipv4addressEdit); + pPwdLayout->addStretch(); + pPwdLayout->addWidget(m_statusLabel); + QPalette hintTextColor; hintTextColor.setColor(QPalette::WindowText, Qt::red); m_addressHintLabel->setPalette(hintTextColor); @@ -123,6 +132,8 @@ void Ipv4Page::initUI() { netMaskEdit->setValidator(new QRegExpValidator(rx, this)); firstDnsEdit->setValidator(new QRegExpValidator(rx, this)); secondDnsEdit->setValidator(new QRegExpValidator(rx, this)); + + initLoadingIcon(); } void Ipv4Page::initComponent() { @@ -134,6 +145,7 @@ void Ipv4Page::initComponent() { connect(ipv4ConfigCombox, SIGNAL(currentIndexChanged(int)), this, SLOT(configChanged(int))); connect(ipv4addressEdit, SIGNAL(textChanged(QString)), this, SLOT(onAddressTextChanged())); + connect(ipv4addressEdit, SIGNAL(editingFinished()), this, SLOT(onAddressEidtFinished())); connect(netMaskEdit, SIGNAL(textChanged(QString)), this, SLOT(onNetMaskTextChanged())); connect(ipv4ConfigCombox, SIGNAL(currentIndexChanged(int)), this, SLOT(setEnableOfSaveBtn())); @@ -280,8 +292,12 @@ void Ipv4Page::configChanged(int index) { void Ipv4Page::onAddressTextChanged() { if (!getTextEditState(ipv4addressEdit->text())) { + m_iconLabel->hide(); + m_textLabel->hide(); m_addressHintLabel->setText(tr("Invalid address")); } else { + m_iconLabel->hide(); + m_textLabel->hide(); m_addressHintLabel->clear(); } } @@ -295,6 +311,15 @@ void Ipv4Page::onNetMaskTextChanged() } } +void Ipv4Page::onAddressEidtFinished() +{ + if (ipv4addressEdit->isModified()) { + if (!ipv4addressEdit->text().isEmpty() && getTextEditState(ipv4addressEdit->text())) { + Q_EMIT ipv4EditFinished(ipv4addressEdit->text()); + } + } +} + void Ipv4Page::setLineEnabled(bool check) { if (!check) { @@ -372,3 +397,65 @@ QString Ipv4Page::getNetMaskText(QString text) } return QString("%1.%2.%3.%4").arg(list[0],list[1],list[2],list[3]); } + + +void Ipv4Page::initConflictHintLable() +{ + QIcon icon = QIcon::fromTheme("dialog-warning"); + m_iconLabel = new QLabel(m_addressHintLabel); + m_iconLabel->setPixmap(icon.pixmap(ICON_SIZE)); + m_textLabel = new QLabel(m_addressHintLabel); + m_textLabel->setText(tr("Address conflict")); + QHBoxLayout *conflictHintLayout = new QHBoxLayout(); + conflictHintLayout->setContentsMargins(0, 0, 0, 0); + conflictHintLayout->addWidget(m_iconLabel); + conflictHintLayout->addWidget(m_textLabel); + conflictHintLayout->addStretch(); + m_addressHintLabel->setLayout(conflictHintLayout); + m_iconLabel->hide(); + m_textLabel->hide(); +} + +void Ipv4Page::initLoadingIcon() +{ + m_loadIcons.append(QIcon::fromTheme("ukui-loading-1-symbolic")); + m_loadIcons.append(QIcon::fromTheme("ukui-loading-2-symbolic")); + m_loadIcons.append(QIcon::fromTheme("ukui-loading-3-symbolic")); + m_loadIcons.append(QIcon::fromTheme("ukui-loading-4-symbolic")); + m_loadIcons.append(QIcon::fromTheme("ukui-loading-5-symbolic")); + m_loadIcons.append(QIcon::fromTheme("ukui-loading-6-symbolic")); + m_loadIcons.append(QIcon::fromTheme("ukui-loading-7-symbolic")); + m_iconTimer = new QTimer(this); + connect(m_iconTimer, &QTimer::timeout, this, &Ipv4Page::updateIcon); +} + +void Ipv4Page::updateIcon() +{ + if (m_currentIconIndex > 6) { + m_currentIconIndex = 0; + } + m_statusLabel->setPixmap(m_loadIcons.at(m_currentIconIndex).pixmap(ICON_SIZE)); + m_currentIconIndex ++; +} + +void Ipv4Page::startLoading() +{ + m_iconTimer->start(FRAME_SPEED); +} + +void Ipv4Page::stopLoading() +{ + m_iconTimer->stop(); + m_statusLabel->clear(); +} + +void Ipv4Page::showIpv4AddressConflict(bool isConflict) +{ + if (isConflict) { + m_iconLabel->show(); + m_textLabel->show(); + } else { + m_iconLabel->hide(); + m_textLabel->hide(); + } +} diff --git a/src/frontend/netdetails/ipv4page.h b/src/frontend/netdetails/ipv4page.h index 04ef8348..20c79c7f 100644 --- a/src/frontend/netdetails/ipv4page.h +++ b/src/frontend/netdetails/ipv4page.h @@ -48,6 +48,10 @@ public: bool checkIsChanged(const ConInfo info, KyConnectSetting &setting); + void startLoading(); + void stopLoading(); + void showIpv4AddressConflict(bool isConflict); + private: QComboBox *ipv4ConfigCombox; LineEdit *ipv4addressEdit; @@ -56,7 +60,6 @@ private: LineEdit *firstDnsEdit; LineEdit *secondDnsEdit; -private: QFormLayout *m_detailLayout; QVBoxLayout *mvBoxLayout; QLabel *m_configLabel; @@ -71,6 +74,15 @@ private: QLabel *m_maskHintLabel; QLabel *m_gateWayEmptyLabel; QLabel *m_firstDnsEmptyLabel; + + QLabel *m_statusLabel = nullptr; + QList m_loadIcons; + QTimer *m_iconTimer = nullptr; + int m_currentIconIndex =0; + + QLabel *m_iconLabel; + QLabel *m_textLabel; + private: void initUI(); void initComponent(); @@ -80,17 +92,20 @@ private: bool netMaskIsValide(QString text); QString getNetMaskText(QString text); bool checkConnectBtnIsEnabled(); - + void initConflictHintLable(); + void initLoadingIcon(); private slots: void setEnableOfSaveBtn(); void configChanged(int index); void onAddressTextChanged(); void onNetMaskTextChanged(); + void onAddressEidtFinished(); + void updateIcon(); Q_SIGNALS: void setIpv4PageState(bool); - + void ipv4EditFinished(const QString &address); }; #endif // IPV4PAGE_H diff --git a/src/frontend/netdetails/ipv6page.cpp b/src/frontend/netdetails/ipv6page.cpp index 7fe0ca3e..59dc59db 100644 --- a/src/frontend/netdetails/ipv6page.cpp +++ b/src/frontend/netdetails/ipv6page.cpp @@ -24,6 +24,8 @@ #define LAYOUT_SPACING 0 #define HINT_TEXT_MARGINS 8, 1, 0, 3 #define LABEL_HEIGHT 24 +#define FRAME_SPEED 150 +#define ICON_SIZE 16,16 Ipv6Page::Ipv6Page(QWidget *parent):QFrame(parent) { @@ -134,6 +136,7 @@ void Ipv6Page::initUI() { m_addressHintLabel = new QLabel(this); m_addressHintLabel->setFixedHeight(LABEL_HEIGHT); m_addressHintLabel->setContentsMargins(HINT_TEXT_MARGINS); + initConflictHintLable(); m_gateWayHintLabel = new QLabel(this); m_gateWayHintLabel->setFixedHeight(LABEL_HEIGHT); @@ -153,6 +156,12 @@ void Ipv6Page::initUI() { m_dnsLabel->setText(tr("Prefs DNS")); m_secDnsLabel->setText(tr("Alternative DNS")); + m_statusLabel = new QLabel(this); + m_statusLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); + QHBoxLayout *pPwdLayout = new QHBoxLayout(ipv6AddressEdit); + pPwdLayout->addStretch(); + pPwdLayout->addWidget(m_statusLabel); + QPalette hintTextColor; hintTextColor.setColor(QPalette::WindowText, Qt::red); m_addressHintLabel->setPalette(hintTextColor); @@ -196,6 +205,8 @@ void Ipv6Page::initUI() { QRegExp prefix_rx("\\b(?:(?:12[0-8]|1[0-1][0-9]|^[1-9][0-9]?$)\\.){3}(?:12[0-8]|1[0-1][0-9]|^[1-9][0-9]?$)\\b"); lengthEdit->setValidator(new QRegExpValidator(prefix_rx,this)); + + initLoadingIcon(); } void Ipv6Page::initComponent() { @@ -207,6 +218,7 @@ void Ipv6Page::initComponent() { connect(ipv6ConfigCombox, SIGNAL(currentIndexChanged(int)), this, SLOT(configChanged(int))); connect(ipv6AddressEdit, SIGNAL(textChanged(QString)), this, SLOT(onAddressTextChanged())); + connect(ipv6AddressEdit, SIGNAL(editingFinished()), this, SLOT(onAddressEidtFinished())); connect(gateWayEdit, SIGNAL(textChanged(QString)), this, SLOT(onGatewayTextChanged())); connect(ipv6ConfigCombox, SIGNAL(currentIndexChanged(int)), this, SLOT(setEnableOfSaveBtn())); @@ -259,8 +271,12 @@ void Ipv6Page::setEnableOfSaveBtn() void Ipv6Page::onAddressTextChanged() { if (!getIpv6EditState(ipv6AddressEdit->text())) { + m_iconLabel->hide(); + m_textLabel->hide(); m_addressHintLabel->setText(tr("Invalid address")); } else { + m_iconLabel->hide(); + m_textLabel->hide(); m_addressHintLabel->clear(); } } @@ -274,6 +290,15 @@ void Ipv6Page::onGatewayTextChanged() } } +void Ipv6Page::onAddressEidtFinished() +{ + if (ipv6AddressEdit->isModified()) { + if (!ipv6AddressEdit->text().isEmpty() && getIpv6EditState(ipv6AddressEdit->text())) { + Q_EMIT ipv6EditFinished(ipv6AddressEdit->text()); + } + } +} + bool Ipv6Page::checkConnectBtnIsEnabled() { if (ipv6ConfigCombox->currentIndex() == AUTO_CONFIG) { @@ -312,6 +337,23 @@ bool Ipv6Page::checkConnectBtnIsEnabled() return true; } +void Ipv6Page::initConflictHintLable() +{ + QIcon icon = QIcon::fromTheme("dialog-warning"); + m_iconLabel = new QLabel(m_addressHintLabel); + m_iconLabel->setPixmap(icon.pixmap(ICON_SIZE)); + m_textLabel = new QLabel(m_addressHintLabel); + m_textLabel->setText(tr("Address conflict")); + QHBoxLayout *conflictHintLayout = new QHBoxLayout(); + conflictHintLayout->setContentsMargins(0, 0, 0, 0); + conflictHintLayout->addWidget(m_iconLabel); + conflictHintLayout->addWidget(m_textLabel); + conflictHintLayout->addStretch(); + m_addressHintLabel->setLayout(conflictHintLayout); + m_iconLabel->hide(); + m_textLabel->hide(); +} + bool Ipv6Page::getIpv6EditState(QString text) { if (text.isEmpty()) { @@ -348,3 +390,47 @@ int Ipv6Page::getPerfixLength(QString text) return length; } +void Ipv6Page::initLoadingIcon() +{ + m_loadIcons.append(QIcon::fromTheme("ukui-loading-1-symbolic")); + m_loadIcons.append(QIcon::fromTheme("ukui-loading-2-symbolic")); + m_loadIcons.append(QIcon::fromTheme("ukui-loading-3-symbolic")); + m_loadIcons.append(QIcon::fromTheme("ukui-loading-4-symbolic")); + m_loadIcons.append(QIcon::fromTheme("ukui-loading-5-symbolic")); + m_loadIcons.append(QIcon::fromTheme("ukui-loading-6-symbolic")); + m_loadIcons.append(QIcon::fromTheme("ukui-loading-7-symbolic")); + m_iconTimer = new QTimer(this); + connect(m_iconTimer, &QTimer::timeout, this, &Ipv6Page::updateIcon); +} + +void Ipv6Page::updateIcon() +{ + if (m_currentIconIndex > 6) { + m_currentIconIndex = 0; + } + m_statusLabel->setPixmap(m_loadIcons.at(m_currentIconIndex).pixmap(ICON_SIZE)); + m_currentIconIndex ++; +} + +void Ipv6Page::startLoading() +{ + m_iconTimer->start(FRAME_SPEED); +} + +void Ipv6Page::stopLoading() +{ + m_iconTimer->stop(); + m_statusLabel->clear(); +} + +void Ipv6Page::showIpv6AddressConflict(bool isConflict) +{ + if (isConflict) { + m_iconLabel->show(); + m_textLabel->show(); + } else { + m_iconLabel->hide(); + m_textLabel->hide(); + } +} + diff --git a/src/frontend/netdetails/ipv6page.h b/src/frontend/netdetails/ipv6page.h index 712e335c..02da1e83 100644 --- a/src/frontend/netdetails/ipv6page.h +++ b/src/frontend/netdetails/ipv6page.h @@ -50,6 +50,10 @@ public: int getPerfixLength(QString text); + void startLoading(); + void stopLoading(); + void showIpv6AddressConflict(bool isConflict); + public: QComboBox *ipv6ConfigCombox; LineEdit *ipv6AddressEdit; @@ -71,6 +75,14 @@ private: QLabel *m_subnetEmptyLabel; QLabel *m_gateWayHintLabel; QLabel *m_firstDnsEmptyLabel; + + QLabel *m_statusLabel = nullptr; + QList m_loadIcons; + QTimer *m_iconTimer = nullptr; + int m_currentIconIndex =0; + + QLabel *m_iconLabel; + QLabel *m_textLabel; private: void initUI(); void initComponent(); @@ -80,14 +92,20 @@ private: bool checkConnectBtnIsEnabled(); + void initConflictHintLable(); + void initLoadingIcon(); + private slots: void configChanged(int index); void setEnableOfSaveBtn(); void onAddressTextChanged(); void onGatewayTextChanged(); + void onAddressEidtFinished(); + void updateIcon(); signals: void setIpv6PageState(bool); + void ipv6EditFinished(const QString &address); }; #endif // IPV6PAGE_H diff --git a/src/frontend/netdetails/netdetail.cpp b/src/frontend/netdetails/netdetail.cpp index 206c4b28..cd7bd864 100644 --- a/src/frontend/netdetails/netdetail.cpp +++ b/src/frontend/netdetails/netdetail.cpp @@ -89,6 +89,37 @@ void NetDetail::setNetdetailSomeEnable(bool on) confimBtn->setEnabled(on); } +void NetDetail::startObjectThread() +{ + m_objectThread = new QThread(); + m_object = new ThreadObject(m_deviceName); + m_object->moveToThread(m_objectThread); + connect(m_objectThread, &QThread::finished, m_objectThread, &QObject::deleteLater); + connect(m_objectThread, &QThread::finished, m_object, &QObject::deleteLater); + connect(ipv4Page, &Ipv4Page::ipv4EditFinished, this, [=](){ + ipv4Page->startLoading(); + }); + connect(ipv6Page, &Ipv6Page::ipv6EditFinished, this, [=](){ + ipv6Page->startLoading(); + }); + + connect(ipv4Page, SIGNAL(ipv4EditFinished(const QString &)), m_object, SLOT(checkIpv4ConflictThread(const QString &))); + connect(ipv6Page, SIGNAL(ipv6EditFinished(const QString &)), m_object, SLOT(checkIpv6ConflictThread(const QString &))); + connect(this, SIGNAL(checkCurrentIpv4Conflict(const QString &)), m_object, SLOT(checkIpv4ConflictThread(const QString &))); + connect(this, SIGNAL(checkCurrentIpv6Conflict(const QString &)), m_object, SLOT(checkIpv6ConflictThread(const QString &))); + + connect(m_object, &ThreadObject::ipv4IsConflict, this, [=](bool ipv4IsConf) { + ipv4Page->stopLoading(); + ipv4Page->showIpv4AddressConflict(ipv4IsConf); + }); + connect(m_object, &ThreadObject::ipv6IsConflict, this, [=](bool ipv6IsConf) { + ipv6Page->stopLoading(); + ipv6Page->showIpv6AddressConflict(ipv6IsConf); + }); + + m_objectThread->start(); +} + NetDetail::NetDetail(QString interface, QString name, QString uuid, bool isActive, bool isWlan, bool isCreateNet, QWidget *parent) :m_deviceName(interface), m_name(name), @@ -130,6 +161,7 @@ NetDetail::NetDetail(QString interface, QString name, QString uuid, bool isActiv loadPage(); initComponent(); getConInfo(m_info); + startObjectThread(); pagePadding(name,isWlan); connect(qApp, &QApplication::paletteChanged, this, &NetDetail::onPaletteChanged); @@ -150,7 +182,10 @@ NetDetail::NetDetail(QString interface, QString name, QString uuid, bool isActiv NetDetail::~NetDetail() { - + if (m_objectThread->isRunning()) { + m_objectThread->quit(); + m_objectThread->wait(); + } } void NetDetail::onPaletteChanged() @@ -417,6 +452,7 @@ void NetDetail::pagePadding(QString netName, bool isWlan) //ipv4页面填充 if (m_info.ipv4ConfigType == CONFIG_IP_MANUAL) { + emit checkCurrentIpv4Conflict(m_info.strIPV4Address); ipv4Page->setIpv4Config(m_info.ipv4ConfigType); ipv4Page->setIpv4(m_info.strIPV4Address); ipv4Page->setNetMask(m_info.strIPV4NetMask); @@ -428,6 +464,7 @@ void NetDetail::pagePadding(QString netName, bool isWlan) } //ipv6页面填充 if (m_info.ipv6ConfigType == CONFIG_IP_MANUAL) { + emit checkCurrentIpv6Conflict(m_info.strIPV6Address); ipv6Page->setIpv6Config(m_info.ipv6ConfigType); ipv6Page->setIpv6(m_info.strIPV6Address); ipv6Page->setIpv6Perfix(m_info.iIPV6Prefix); @@ -734,6 +771,7 @@ void NetDetail::setConfirmEnable() confimBtn->setEnabled(isConfirmBtnEnable); } +#if 0 bool NetDetail::checkIpv4Conflict(QString ipv4Address) { showDesktopNotify(tr("start check ipv4 address conflict"), "networkwrong"); @@ -767,6 +805,7 @@ bool NetDetail::checkIpv6Conflict(QString ipv6address) ipv46rping = nullptr; return isConflict; } +#endif void NetDetail::updateWirelessPersonalConnect() { @@ -796,13 +835,13 @@ bool NetDetail::createWiredConnect() KyWirelessConnectSetting connetSetting; connetSetting.setIfaceName(m_deviceName); createNetPage->constructIpv4Info(connetSetting); - if (connetSetting.m_ipv4ConfigIpType != CONFIG_IP_DHCP) { - if (checkIpv4Conflict(connetSetting.m_ipv4Address.at(0).ip().toString())) { - qDebug() << "ipv4 conflict"; - showDesktopNotify(tr("ipv4 address conflict!"), "networkwrong"); - return false; - } - } +// if (connetSetting.m_ipv4ConfigIpType != CONFIG_IP_DHCP) { +// if (checkIpv4Conflict(connetSetting.m_ipv4Address.at(0).ip().toString())) { +// qDebug() << "ipv4 conflict"; +// showDesktopNotify(tr("ipv4 address conflict!"), "networkwrong"); +// return false; +// } +// } m_wiredConnOperation->createWiredConnect(connetSetting); return true; } @@ -847,21 +886,21 @@ bool NetDetail::createWirelessConnect() connetSetting.dumpInfo(); qDebug() << "ipv4Changed" << ipv4Change << "ipv6Change" << ipv6Change; - if (ipv4Change && connetSetting.m_ipv4ConfigIpType == CONFIG_IP_MANUAL) { - if (checkIpv4Conflict(connetSetting.m_ipv4Address.at(0).ip().toString())) { - qDebug() << "ipv4 conflict"; - showDesktopNotify(tr("ipv4 address conflict!"), "networkwrong"); - return false; - } - } +// if (ipv4Change && connetSetting.m_ipv4ConfigIpType == CONFIG_IP_MANUAL) { +// if (checkIpv4Conflict(connetSetting.m_ipv4Address.at(0).ip().toString())) { +// qDebug() << "ipv4 conflict"; +// showDesktopNotify(tr("ipv4 address conflict!"), "networkwrong"); +// return false; +// } +// } - if (ipv6Change && connetSetting.m_ipv6ConfigIpType == CONFIG_IP_MANUAL) { - if (checkIpv6Conflict(connetSetting.m_ipv6Address.at(0).ip().toString())) { - qDebug() << "ipv6 conflict"; - showDesktopNotify(tr("ipv6 address conflict!"), "networkwrong"); - return false; - } - } +// if (ipv6Change && connetSetting.m_ipv6ConfigIpType == CONFIG_IP_MANUAL) { +// if (checkIpv6Conflict(connetSetting.m_ipv6Address.at(0).ip().toString())) { +// qDebug() << "ipv6 conflict"; +// showDesktopNotify(tr("ipv6 address conflict!"), "networkwrong"); +// return false; +// } +// } //wifi安全性 if (secuType == WPA_AND_WPA2_ENTERPRISE) { connetSetting.m_type = WpaEap; @@ -935,21 +974,21 @@ bool NetDetail::updateConnect() qDebug() << "ipv4Changed" << ipv4Change << "ipv6Change" << ipv6Change; - if (ipv4Change && connetSetting.m_ipv4ConfigIpType == CONFIG_IP_MANUAL) { - if (checkIpv4Conflict(connetSetting.m_ipv4Address.at(0).ip().toString())) { - qDebug() << "ipv4 conflict"; - showDesktopNotify(tr("ipv4 address conflict!"), "networkwrong"); - return false; - } - } +// if (ipv4Change && connetSetting.m_ipv4ConfigIpType == CONFIG_IP_MANUAL) { +// if (checkIpv4Conflict(connetSetting.m_ipv4Address.at(0).ip().toString())) { +// qDebug() << "ipv4 conflict"; +// showDesktopNotify(tr("ipv4 address conflict!"), "networkwrong"); +// return false; +// } +// } - if (ipv6Change && connetSetting.m_ipv6ConfigIpType == CONFIG_IP_MANUAL) { - if (checkIpv6Conflict(connetSetting.m_ipv6Address.at(0).ip().toString())) { - qDebug() << "ipv6 conflict"; - showDesktopNotify(tr("ipv6 address conflict!"), "networkwrong"); - return false; - } - } +// if (ipv6Change && connetSetting.m_ipv6ConfigIpType == CONFIG_IP_MANUAL) { +// if (checkIpv6Conflict(connetSetting.m_ipv6Address.at(0).ip().toString())) { +// qDebug() << "ipv6 conflict"; +// showDesktopNotify(tr("ipv6 address conflict!"), "networkwrong"); +// return false; +// } +// } if (ipv4Change || ipv6Change) { connetSetting.dumpInfo(); @@ -1053,3 +1092,57 @@ QSize NetTabBar::minimumTabSizeHint(int index) const Q_UNUSED(index) return QSize(TAB_WIDTH, TAB_HEIGHT); } + + +ThreadObject::ThreadObject(QString deviceName, QObject *parent) + :m_devName(deviceName), QObject(parent) +{ + m_isStop = false; +} + +ThreadObject::~ThreadObject() +{ + +} + +void ThreadObject::stop() +{ + m_isStop = true; +} + +void ThreadObject::checkIpv4ConflictThread(const QString &ipv4Address) +{ + if (m_isStop) { + return; + } + bool isConflict = false; + KyIpv4Arping* ipv4Arping = new KyIpv4Arping(m_devName, ipv4Address); + if (ipv4Arping->ipv4ConflictCheck() >= 0) { + isConflict = ipv4Arping->ipv4IsConflict(); + } else { + qWarning() << "checkIpv4Conflict internal error"; + } + + delete ipv4Arping; + ipv4Arping = nullptr; + emit ipv4IsConflict(isConflict); +} + +void ThreadObject::checkIpv6ConflictThread(const QString &ipv6Address) +{ + if (m_isStop) { + return; + } + bool isConflict = false; + KyIpv6Arping* ipv6rping = new KyIpv6Arping(m_devName, ipv6Address); + + if (ipv6rping->ipv6ConflictCheck() >= 0) { + isConflict = ipv6rping->ipv6IsConflict(); + } else { + qWarning() << "checkIpv6Conflict internal error"; + } + + delete ipv6rping; + ipv6rping = nullptr; + emit ipv6IsConflict(isConflict); +} diff --git a/src/frontend/netdetails/netdetail.h b/src/frontend/netdetails/netdetail.h index 6f2e1885..ab6daf04 100644 --- a/src/frontend/netdetails/netdetail.h +++ b/src/frontend/netdetails/netdetail.h @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -65,6 +66,25 @@ public: QSize sizeHint() const; QSize minimumTabSizeHint(int index) const; }; +class ThreadObject : public QObject +{ + Q_OBJECT +public: + ThreadObject(QString deviceName, QObject *parent = nullptr); + ~ThreadObject(); + void stop(); +private: + QString m_devName; + volatile bool m_isStop; + +public slots: + void checkIpv4ConflictThread(const QString &ipv4Address); + void checkIpv6ConflictThread(const QString &ipv6Address); + +signals: + bool ipv4IsConflict(bool isConflict); + bool ipv6IsConflict(bool isConflict); +}; class NetDetail : public QWidget { @@ -103,8 +123,8 @@ private: void setConfirmEnable(); - bool checkIpv4Conflict(QString ipv4Address); - bool checkIpv6Conflict(QString ipv6Address); +// bool checkIpv4Conflict(QString ipv4Address); +// bool checkIpv6Conflict(QString ipv6Address); bool createWiredConnect(); bool createWirelessConnect(); @@ -115,6 +135,8 @@ private: void showDesktopNotify(const QString &message, QString soundName); void setNetdetailSomeEnable(bool on); + void startObjectThread(); + private: KyNetworkDeviceResourse *m_netDeviceResource = nullptr; KyConnectOperation* m_connectOperation = nullptr; @@ -159,6 +181,9 @@ private: ConInfo m_info; + ThreadObject *m_object; + QThread *m_objectThread; + private slots: void on_btnConfirm_clicked(); void on_btnForget_clicked(); @@ -171,8 +196,8 @@ signals: void detailPageClose(bool on); void createPageClose(QString); void currentChanged(int); + void checkCurrentIpv4Conflict(const QString &address); + void checkCurrentIpv6Conflict(const QString &address); }; - - #endif // NETDETAIL_H From 1783bdb86a6aae91331200be617f160ba8d61ec1 Mon Sep 17 00:00:00 2001 From: zhangyuanyuan1 Date: Wed, 3 Aug 2022 11:05:33 +0800 Subject: [PATCH 03/20] =?UTF-8?q?Fixbug=20131910=20=E9=A6=96=E6=AC=A1?= =?UTF-8?q?=E8=BF=9E=E6=8E=A5=E7=BD=91=E7=BB=9C=E5=BC=B9=E7=AA=97=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/netdetails/netdetail.cpp | 7 +------ src/frontend/networkmode/firewalldialog.h | 12 ++++++++++- src/frontend/tab-pages/lanpage.cpp | 25 ++++++++++++++--------- src/frontend/tab-pages/wlanpage.cpp | 23 +++++++++++---------- 4 files changed, 39 insertions(+), 28 deletions(-) diff --git a/src/frontend/netdetails/netdetail.cpp b/src/frontend/netdetails/netdetail.cpp index 206c4b28..f0d907a7 100644 --- a/src/frontend/netdetails/netdetail.cpp +++ b/src/frontend/netdetails/netdetail.cpp @@ -455,12 +455,7 @@ void NetDetail::pagePadding(QString netName, bool isWlan) //配置页面 if (isActive) { - int configType = NetworkModeConfig::getInstance()->getNetworkModeConfig(m_uuid); - if (configType == -1) { - configPage->setConfigState(KSC_FIREWALL_PUBLIC); - } else { - configPage->setConfigState(configType); - } + configPage->setConfigState(NetworkModeConfig::getInstance()->getNetworkModeConfig(m_uuid)); } } diff --git a/src/frontend/networkmode/firewalldialog.h b/src/frontend/networkmode/firewalldialog.h index 154275e3..44594582 100644 --- a/src/frontend/networkmode/firewalldialog.h +++ b/src/frontend/networkmode/firewalldialog.h @@ -35,10 +35,13 @@ class FirewallDialog : public KDialog public: explicit FirewallDialog(KDialog *parent = nullptr); ~FirewallDialog(); + void setUuid(QString uuid) { + m_uuid = uuid; + } private: void initUI(); - + QString m_uuid; QLabel * m_iconLabel = nullptr; QLabel * m_contentLabel = nullptr; QLabel * m_suggestLabel = nullptr; @@ -49,5 +52,12 @@ private: signals: void setPublicNetMode(); void setPrivateNetMode(); + +public slots: + void closeMyself(QString uuid, int status) { + if (uuid == m_uuid && status == 4) { + this->close(); + } + } }; #endif // FIREWALLDIALOG_H diff --git a/src/frontend/tab-pages/lanpage.cpp b/src/frontend/tab-pages/lanpage.cpp index 93a6d787..fb1b6059 100644 --- a/src/frontend/tab-pages/lanpage.cpp +++ b/src/frontend/tab-pages/lanpage.cpp @@ -926,6 +926,10 @@ void LanPage::onConnectionStateChange(QString uuid, return; } + if (m_activeConnectionMap.keys().contains(uuid) && state == NetworkManager::ActiveConnection::State::Activated) { + return; + } + sendLanStateChangeSignal(uuid, (ConnectState)state); qDebug()<<"[LanPage] connection uuid"<< uuid @@ -948,23 +952,24 @@ void LanPage::onConnectionStateChange(QString uuid, int configType = NetworkModeConfig::getInstance()->getNetworkModeConfig(uuid); if (configType == -1) { - FirewallDialog *fireWallDiaglog = new FirewallDialog(); - fireWallDiaglog->setWindowTitle(p_newItem->m_connectName); + NetworkModeConfig::getInstance()->setNetworkModeConfig(uuid, deviceName, ssid, KSC_FIREWALL_PUBLIC); //默认公有配置 + FirewallDialog *fireWallDialog = new FirewallDialog(); + fireWallDialog->setUuid(uuid); + fireWallDialog->setWindowTitle(ssid); - connect(fireWallDiaglog, &FirewallDialog::setPrivateNetMode, this, [=](){ - fireWallDiaglog->close(); + connect(fireWallDialog, &FirewallDialog::setPrivateNetMode, this, [=](){ + fireWallDialog->hide(); NetworkModeConfig::getInstance()->setNetworkModeConfig(uuid, deviceName, ssid, KSC_FIREWALL_PRIVATE); }); - connect(fireWallDiaglog, &FirewallDialog::setPublicNetMode, this, [=](){ - fireWallDiaglog->close(); + connect(fireWallDialog, &FirewallDialog::setPublicNetMode, this, [=](){ + fireWallDialog->hide(); NetworkModeConfig::getInstance()->setNetworkModeConfig(uuid, deviceName, ssid, KSC_FIREWALL_PUBLIC); }); - connect(fireWallDiaglog, &FirewallDialog::close, this, [=](){ - NetworkModeConfig::getInstance()->setNetworkModeConfig(uuid, deviceName, ssid, KSC_FIREWALL_PUBLIC); - }); - fireWallDiaglog->show(); + connect(m_activeResourse, &KyActiveConnectResourse::stateChangeReason, fireWallDialog, &FirewallDialog::closeMyself); + + fireWallDialog->show(); } else if (configType == KSC_FIREWALL_PUBLIC) { NetworkModeConfig::getInstance()->setNetworkModeConfig(uuid, deviceName, ssid, KSC_FIREWALL_PUBLIC); } else if (configType == KSC_FIREWALL_PRIVATE) { diff --git a/src/frontend/tab-pages/wlanpage.cpp b/src/frontend/tab-pages/wlanpage.cpp index 8411236d..499ec2af 100644 --- a/src/frontend/tab-pages/wlanpage.cpp +++ b/src/frontend/tab-pages/wlanpage.cpp @@ -942,24 +942,25 @@ void WlanPage::onConnectionStateChanged(QString uuid, if (!isApConnection) { int configType = NetworkModeConfig::getInstance()->getNetworkModeConfig(uuid); - if (configType == -1) { - FirewallDialog *fireWallDiaglog = new FirewallDialog(); - fireWallDiaglog->setWindowTitle(ssid); - connect(fireWallDiaglog, &FirewallDialog::setPrivateNetMode, this, [=](){ - fireWallDiaglog->close(); + if (configType == -1) { + NetworkModeConfig::getInstance()->setNetworkModeConfig(uuid, devName, ssid, KSC_FIREWALL_PUBLIC); //默认公有配置 + FirewallDialog *fireWallDialog = new FirewallDialog(); //弹窗 供用户配置 + fireWallDialog->setUuid(uuid); + fireWallDialog->setWindowTitle(ssid); + + connect(fireWallDialog, &FirewallDialog::setPrivateNetMode, this, [=](){ + fireWallDialog->hide(); NetworkModeConfig::getInstance()->setNetworkModeConfig(uuid, devName, ssid, KSC_FIREWALL_PRIVATE); }); - connect(fireWallDiaglog, &FirewallDialog::setPublicNetMode, this, [=](){ - fireWallDiaglog->close(); + connect(fireWallDialog, &FirewallDialog::setPublicNetMode, this, [=](){ + fireWallDialog->hide(); NetworkModeConfig::getInstance()->setNetworkModeConfig(uuid, devName, ssid, KSC_FIREWALL_PUBLIC); }); - connect(fireWallDiaglog, &FirewallDialog::close, this, [=](){ - NetworkModeConfig::getInstance()->setNetworkModeConfig(uuid, devName, ssid, KSC_FIREWALL_PUBLIC); - }); + connect(m_activatedConnectResource, &KyActiveConnectResourse::stateChangeReason, fireWallDialog, &FirewallDialog::closeMyself); - fireWallDiaglog->show(); + fireWallDialog->show(); } else if (configType == KSC_FIREWALL_PUBLIC) { NetworkModeConfig::getInstance()->setNetworkModeConfig(uuid, devName, ssid, KSC_FIREWALL_PUBLIC); From 1441db34f52a8fa69bac3e282efb835f0685b87f Mon Sep 17 00:00:00 2001 From: zhangyuanyuan1 Date: Wed, 3 Aug 2022 11:07:05 +0800 Subject: [PATCH 04/20] =?UTF-8?q?bug=20132228=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E4=B8=8E=E6=A0=87=E9=A2=98=E6=A0=8F=E9=97=B4?= =?UTF-8?q?=E9=9A=94=20=E6=96=87=E6=9C=AC=E5=AD=97=E9=87=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/networkmode/firewalldialog.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/frontend/networkmode/firewalldialog.cpp b/src/frontend/networkmode/firewalldialog.cpp index e215eab8..d9a4265c 100644 --- a/src/frontend/networkmode/firewalldialog.cpp +++ b/src/frontend/networkmode/firewalldialog.cpp @@ -46,7 +46,7 @@ void FirewallDialog::initUI() QWidget *contentWidget = new QWidget(this); QGridLayout *contentLayout = new QGridLayout(contentWidget); contentLayout->setContentsMargins(0, 0, 0, 0); - contentLayout->addWidget(m_iconLabel, 0, 0, Qt::AlignTop); + contentLayout->addWidget(m_iconLabel, 0, 0, Qt::AlignVCenter); contentLayout->addWidget(m_contentLabel, 0, 1); contentLayout->addWidget(m_suggestLabel, 1, 1); m_iconLabel->setFixedWidth(16); @@ -59,7 +59,7 @@ void FirewallDialog::initUI() btnLayout->addWidget(m_YesBtn); btnLayout->addWidget(m_NoBtn); - m_dialogLayout->setContentsMargins(24, 0, 24, 24); + m_dialogLayout->setContentsMargins(24, 16, 24, 24); m_dialogLayout->setSpacing(0); m_dialogLayout->addWidget(contentWidget); m_dialogLayout->addStretch(); @@ -69,7 +69,7 @@ void FirewallDialog::initUI() m_iconLabel->setPixmap(icon.pixmap(ICON_SIZE)); QFont font = m_contentLabel->font(); - font.setWeight(75); + font.setWeight(57); m_contentLabel->setFont(font); //是否允许你的电脑被此网络上的其他电脑和设备发现? m_contentLabel->setText(tr("Allow your computer to be discovered by other computers and devices on this network?")); From 20e855fa8e796d3a6145f0c6c22f3a109700f2ae Mon Sep 17 00:00:00 2001 From: zhangyuanyuan1 Date: Thu, 4 Aug 2022 16:15:27 +0800 Subject: [PATCH 05/20] =?UTF-8?q?fix=20bug=20132350=20=E4=B8=8E=E5=8A=A0?= =?UTF-8?q?=E5=85=A5=E9=9A=90=E8=97=8F=E7=BD=91=E7=BB=9C=E5=AE=89=E5=85=A8?= =?UTF-8?q?=E9=A1=B5ui=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../enterprise-wlan/enterprisewlandialog.cpp | 141 ++++++++++++------ .../enterprise-wlan/enterprisewlandialog.h | 14 +- .../netdetails/joinhiddenwifipage.cpp | 37 ++--- src/frontend/netdetails/joinhiddenwifipage.h | 6 +- src/frontend/netdetails/securitypage.cpp | 33 +++- src/frontend/netdetails/securitypage.h | 5 + 6 files changed, 147 insertions(+), 89 deletions(-) diff --git a/src/frontend/enterprise-wlan/enterprisewlandialog.cpp b/src/frontend/enterprise-wlan/enterprisewlandialog.cpp index 295b02a2..9e3e1d97 100644 --- a/src/frontend/enterprise-wlan/enterprisewlandialog.cpp +++ b/src/frontend/enterprise-wlan/enterprisewlandialog.cpp @@ -21,27 +21,37 @@ #include #include #include "xatom-helper.h" -#define MAIN_SIZE_EXPAND 400,500 -#define MAIN_SIZE_NARROW 400,400 +#define MAIN_SIZE_EXPAND 480,580 +#define MAIN_SIZE_NARROW 480,484 +#define PEAP_SCRO_HEIGHT 390 +#define TLS_SCRO_HEIGHT 590 +#define MAIN_LAYOUT_MARGINS 0,0,0,0 +#define CENTER_LAYOUT_MARGINS 24, 16, 24, 8 +#define BUTTON_LAYOUT_MARGINS 24, 24, 24, 24 +#define MAIN_LAYOUT_SPACING 0 +#define BUTTON_SPACING 16 +#define LABEL_MIN_WIDTH 146 +#define MEDIUM_WEIGHT_VALUE 57 #define THEME_SCHAME "org.ukui.style" #define COLOR_THEME "styleName" EnterpriseWlanDialog::EnterpriseWlanDialog(KyWirelessNetItem &wirelessNetItem, QString device, QWidget *parent) : QWidget(parent) { - //设置窗口无边框,阴影 -#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)) - MotifWmHints window_hints; - window_hints.flags = MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS; - window_hints.functions = MWM_FUNC_ALL; - window_hints.decorations = MWM_DECOR_BORDER; - XAtomHelper::getInstance()->setWindowMotifHint(this->winId(), window_hints); -#else - this->setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint); -#endif +// //设置窗口无边框,阴影 +//#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)) +// MotifWmHints window_hints; +// window_hints.flags = MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS; +// window_hints.functions = MWM_FUNC_ALL; +// window_hints.decorations = MWM_DECOR_BORDER; +// XAtomHelper::getInstance()->setWindowMotifHint(this->winId(), window_hints); +//#else +// this->setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint); +//#endif this->setAttribute(Qt::WA_DeleteOnClose); this->setWindowFlag(Qt::Window); - this->setWindowTitle(tr("Connect Enterprise WLAN")); +// this->setWindowTitle(tr("Connect Enterprise WLAN")); + this->setWindowIcon(QIcon::fromTheme("kylin-network")); m_wirelessNetItem = wirelessNetItem; m_deviceName = device; @@ -70,49 +80,79 @@ void EnterpriseWlanDialog::closeEvent(QCloseEvent *event) return QWidget::closeEvent(event); } +void EnterpriseWlanDialog::paintEvent(QPaintEvent *event) +{ + QPalette pal = qApp->palette(); + QPainter painter(this); + painter.setBrush(pal.color(QPalette::Base)); + painter.drawRect(this->rect()); + painter.fillRect(rect(), QBrush(pal.color(QPalette::Base))); + + return QWidget::paintEvent(event); +} + void EnterpriseWlanDialog::initUI() { -#define MAIN_LAYOUT_MARGINS 8,8,8,8 -#define SSID_LAYOUT_MARGINS 8,8,8,0 -#define MAIN_LAYOUT_SPACING 0 -#define BUTTON_SPACING 8 - m_mainLayout = new QVBoxLayout(this); this->setLayout(m_mainLayout); m_mainLayout->setContentsMargins(MAIN_LAYOUT_MARGINS); m_mainLayout->setSpacing(MAIN_LAYOUT_SPACING); - m_ssidLayout = new QHBoxLayout(); - m_ssidLayout->setContentsMargins(SSID_LAYOUT_MARGINS); - m_ssidTitleLabel = new QLabel(this); - m_ssidTitleLabel->setText("SSID"); + m_centerWidget = new QWidget(this); + QVBoxLayout *centerLayout = new QVBoxLayout(m_centerWidget); + centerLayout->setContentsMargins(CENTER_LAYOUT_MARGINS); + centerLayout->setSpacing(MAIN_LAYOUT_SPACING); + + m_descriptionLabel = new QLabel(this); + m_descriptionLabel->setText(tr("Wi-Fi network requires authentication")); //Wi-Fi网络要求认证 + QFont font = m_descriptionLabel->font(); + font.setWeight(MEDIUM_WEIGHT_VALUE); + m_descriptionLabel->setFont(font); m_ssidLabel = new QLabel(this); - m_ssidLabel->setText(m_wirelessNetItem.m_NetSsid); - - m_ssidLayout->addWidget(m_ssidTitleLabel); - m_ssidLayout->addStretch(); - m_ssidLayout->addWidget(m_ssidLabel); - - m_securityPage = new SecurityPage(this); + QString str = tr("Access to Wi-Fi network \""); //访问Wi-Fi网络 + str.append(m_wirelessNetItem.m_NetSsid); + str.append(tr("\" requires a password or encryption key.")); //需要密码或加密秘钥 + m_ssidLabel->setText(str); + m_ssidLabel->setWordWrap(true); + m_securityPage = new SecurityPage(false, this); m_securityPage->setSecurity(KySecuType::WPA_AND_WPA2_ENTERPRISE); - m_securityPage->setSecurityVisible(false); +// m_securityPage->setSecurityVisible(false); - m_btnLayout = new QHBoxLayout(); - m_btnLayout->setSpacing(BUTTON_SPACING); + centerLayout->addWidget(m_descriptionLabel); + centerLayout->addSpacing(8); + centerLayout->addWidget(m_ssidLabel); + centerLayout->addSpacing(BUTTON_SPACING); + centerLayout->addWidget(m_securityPage); + centerLayout->addStretch(); + m_enterWlanScrollArea = new QScrollArea(this); + m_enterWlanScrollArea->setFrameShape(QFrame::NoFrame); + m_enterWlanScrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + m_enterWlanScrollArea->setWidget(m_centerWidget); + QPalette pal = m_enterWlanScrollArea->palette(); + pal.setBrush(QPalette::Window, Qt::transparent); + m_enterWlanScrollArea->setPalette(pal); + + m_bottomDivider = new Divider(this); + + QWidget *bottomWidget = new QWidget(this); + QHBoxLayout *btnLayout = new QHBoxLayout(bottomWidget); + btnLayout->setContentsMargins(BUTTON_LAYOUT_MARGINS); + btnLayout->setSpacing(BUTTON_SPACING); m_cancelBtn = new QPushButton(this); m_connectBtn = new QPushButton(this); m_cancelBtn->setText(tr("Cancel")); m_connectBtn->setText(tr("Connect")); m_connectBtn->setEnabled(false); - m_btnLayout->addStretch(); - m_btnLayout->addWidget(m_cancelBtn); - m_btnLayout->addWidget(m_connectBtn); - m_mainLayout->addLayout(m_ssidLayout); - m_mainLayout->addWidget(m_securityPage); - m_mainLayout->addLayout(m_btnLayout); - m_mainLayout->addStretch(); + btnLayout->addStretch(); + btnLayout->addWidget(m_cancelBtn); + btnLayout->addWidget(m_connectBtn); + + m_mainLayout->addWidget(m_enterWlanScrollArea); + m_mainLayout->addWidget(m_bottomDivider); + m_mainLayout->addWidget(bottomWidget); this->setFixedSize(MAIN_SIZE_EXPAND); + this->setWindowTitle(m_wirelessNetItem.m_NetSsid); initConnections(); onPaletteChanged(); } @@ -145,15 +185,15 @@ void EnterpriseWlanDialog::onPaletteChanged() { QPalette pal = qApp->palette(); - QGSettings * styleGsettings = nullptr; - const QByteArray style_id(THEME_SCHAME); - if (QGSettings::isSchemaInstalled(style_id)) { - styleGsettings = new QGSettings(style_id); - QString currentTheme = styleGsettings->get(COLOR_THEME).toString(); - if(currentTheme == "ukui-default"){ - pal = lightPalette(this); - } - } +// QGSettings * styleGsettings = nullptr; +// const QByteArray style_id(THEME_SCHAME); +// if (QGSettings::isSchemaInstalled(style_id)) { +// styleGsettings = new QGSettings(style_id); +// QString currentTheme = styleGsettings->get(COLOR_THEME).toString(); +// if(currentTheme == "ukui-default"){ +// pal = lightPalette(this); +// } +// } this->setPalette(pal); @@ -184,7 +224,7 @@ void EnterpriseWlanDialog::onBtnConnectClicked() KyWirelessConnectSetting connetSetting; connetSetting.setConnectName(m_wirelessNetItem.m_NetSsid); connetSetting.setIfaceName(m_deviceName); - connetSetting.isAutoConnect = true; //ZJP_TODO 自动连接选项 +// connetSetting.isAutoConnect = true; //ZJP_TODO 自动连接选项 connetSetting.m_type = KyKeyMgmt::WpaEap; connetSetting.m_ssid = m_wirelessNetItem.m_NetSsid; connetSetting.m_secretFlag = 0; @@ -214,18 +254,21 @@ void EnterpriseWlanDialog::onEapTypeChanged(const KyEapMethodType &type) m_resource->getEnterPriseInfoTls(m_wirelessNetItem.m_connectUuid, m_info.tlsInfo); } this->setFixedSize(MAIN_SIZE_EXPAND); + m_centerWidget->setFixedHeight(TLS_SCRO_HEIGHT); break; case KyEapMethodType::PEAP: if (m_wirelessNetItem.m_connectUuid.isEmpty()) { m_resource->getEnterPriseInfoPeap(m_wirelessNetItem.m_connectUuid, m_info.peapInfo); } this->setFixedSize(MAIN_SIZE_NARROW); + m_centerWidget->setFixedHeight(PEAP_SCRO_HEIGHT); break; case KyEapMethodType::TTLS: if (!m_wirelessNetItem.m_connectUuid.isEmpty()) { m_resource->getEnterPriseInfoTtls(m_wirelessNetItem.m_connectUuid, m_info.ttlsInfo); } this->setFixedSize(MAIN_SIZE_NARROW); + m_centerWidget->setFixedHeight(PEAP_SCRO_HEIGHT); break; default: break; diff --git a/src/frontend/enterprise-wlan/enterprisewlandialog.h b/src/frontend/enterprise-wlan/enterprisewlandialog.h index 7226c04a..50cd6c12 100644 --- a/src/frontend/enterprise-wlan/enterprisewlandialog.h +++ b/src/frontend/enterprise-wlan/enterprisewlandialog.h @@ -21,7 +21,11 @@ #define ENTERPRISEWLANDIALOG_H #include #include +#include +#include + #include "securitypage.h" +#include "divider.h" #include "kywirelessnetitem.h" #include "coninfo.h" @@ -34,6 +38,7 @@ public: protected: void closeEvent(QCloseEvent *event); + void paintEvent(QPaintEvent *event); private: void initUI(); //初始化UI界面 @@ -62,13 +67,16 @@ private: QLabel *m_titleLabel = nullptr; QPushButton *m_closeBtn = nullptr; - QHBoxLayout *m_ssidLayout = nullptr; - QLabel *m_ssidTitleLabel = nullptr; + QWidget *m_centerWidget = nullptr; + QLabel *m_descriptionLabel = nullptr; QLabel *m_ssidLabel = nullptr; SecurityPage *m_securityPage = nullptr; - QHBoxLayout *m_btnLayout = nullptr; + QScrollArea *m_enterWlanScrollArea = nullptr; + + Divider *m_bottomDivider = nullptr; + QPushButton *m_cancelBtn = nullptr; QPushButton *m_connectBtn = nullptr; diff --git a/src/frontend/netdetails/joinhiddenwifipage.cpp b/src/frontend/netdetails/joinhiddenwifipage.cpp index 4e0d1c60..261672da 100644 --- a/src/frontend/netdetails/joinhiddenwifipage.cpp +++ b/src/frontend/netdetails/joinhiddenwifipage.cpp @@ -33,6 +33,7 @@ #define PSK_SCRO_HEIGHT 182 #define PEAP_SCRO_HEIGHT 340 #define TLS_SCRO_HEIGHT 560 +#define MEDIUM_WEIGHT_VALUE 57 JoinHiddenWiFiPage::JoinHiddenWiFiPage(QString devName, KDialog *parent) :m_devName(devName), @@ -72,24 +73,23 @@ void JoinHiddenWiFiPage::initUI() m_nameLabel = new QLabel(this); m_nameEdit =new LineEdit(this); - m_emptyLabel = new QLabel(this); - m_checkLabel = new QLabel(this); - m_rememberCheckBox = new QCheckBox(this); - m_bottomDivider = new Divider(this); m_showListBtn = new KBorderlessButton(this); m_cancelBtn =new QPushButton(this); m_joinBtn =new QPushButton(this); - m_scrollArea = new QScrollArea(this); - m_scrollArea->setFrameShape(QFrame::NoFrame); - m_scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + m_hiddenWifiScrollArea = new QScrollArea(this); + m_hiddenWifiScrollArea->setFrameShape(QFrame::NoFrame); + m_hiddenWifiScrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + QPalette pa = m_hiddenWifiScrollArea->palette(); + pa.setBrush(QPalette::Window, Qt::transparent); + m_hiddenWifiScrollArea->setPalette(pa); m_pageLayout = new QVBoxLayout(this); m_pageLayout->setContentsMargins(LAYOUT_MARGINS); m_pageLayout->setSpacing(0); m_pageLayout->addWidget(m_topWidget); - m_pageLayout->addWidget(m_scrollArea); + m_pageLayout->addWidget(m_hiddenWifiScrollArea); m_pageLayout->addWidget(m_bottomDivider); m_pageLayout->addWidget(m_bottomWidget); this->mainWidget()->setLayout(m_pageLayout); @@ -108,26 +108,14 @@ void JoinHiddenWiFiPage::initUI() ssidLayout->addWidget(m_nameLabel); ssidLayout->addWidget(m_nameEdit); - //记住该网络复选框 - QWidget *checkWidget = new QWidget(this); - QHBoxLayout *checkLayout = new QHBoxLayout(checkWidget); - checkLayout->setContentsMargins(LAYOUT_MARGINS); - m_emptyLabel->setMinimumWidth(LABEL_MIN_WIDTH - 8); - m_rememberCheckBox->setChecked(true); - checkLayout->addWidget(m_emptyLabel); - checkLayout->addWidget(m_rememberCheckBox); - checkLayout->addWidget(m_checkLabel); - checkLayout->addStretch(); - m_centerVBoxLayout = new QVBoxLayout(m_centerWidget); m_centerVBoxLayout->setContentsMargins(CENTER_LAYOUT_MARGINS); m_centerVBoxLayout->setSpacing(0); m_centerVBoxLayout->addWidget(ssidWidget); m_centerVBoxLayout->addSpacing(LAYOUT_SPACING); m_centerVBoxLayout->addWidget(m_secuWidget); - m_centerVBoxLayout->addWidget(checkWidget); m_centerVBoxLayout->addStretch(); - m_scrollArea->setWidget(m_centerWidget); + m_hiddenWifiScrollArea->setWidget(m_centerWidget); //底部按钮 m_bottomLayout = new QHBoxLayout(m_bottomWidget); @@ -141,10 +129,9 @@ void JoinHiddenWiFiPage::initUI() //请输入您想要加入网络的名称和安全类型 m_descriptionLabel->setText(tr("Please enter the network name and security type")); QFont font = m_descriptionLabel->font(); - font.setWeight(75); + font.setWeight(MEDIUM_WEIGHT_VALUE); m_descriptionLabel->setFont(font); m_nameLabel->setText(tr("Network name(SSID)")); //网络名(SSID) - m_checkLabel->setText(tr("Remember the Network")); //记住该网络 m_showListBtn->setText(tr("Show Network List")); //显示网络列表 m_cancelBtn->setText(tr("Cancel")); m_joinBtn->setText(tr("Join")); @@ -152,9 +139,6 @@ void JoinHiddenWiFiPage::initUI() m_nameEdit->setMaxLength(MAX_NAME_LENGTH); m_nameEdit->setPlaceholderText(tr("Required")); //必填 - QPalette pa = m_scrollArea->palette(); - pa.setBrush(QPalette::Window, Qt::transparent); - m_scrollArea->setPalette(pa); this->setWindowTitle(tr("Find and Join Wi-Fi")); this->setWindowIcon(QIcon::fromTheme("kylin-network")); @@ -196,7 +180,6 @@ void JoinHiddenWiFiPage::onBtnJoinClicked() connSettingInfo.m_ssid = m_nameEdit->text(); connSettingInfo.setConnectName(connSettingInfo.m_ssid); connSettingInfo.setIfaceName(m_devName); - connSettingInfo.m_isAutoConnect = m_rememberCheckBox->isChecked(); connSettingInfo.m_secretFlag = 0; KySecuType secuType; diff --git a/src/frontend/netdetails/joinhiddenwifipage.h b/src/frontend/netdetails/joinhiddenwifipage.h index 7c80da5f..3e4e1237 100644 --- a/src/frontend/netdetails/joinhiddenwifipage.h +++ b/src/frontend/netdetails/joinhiddenwifipage.h @@ -65,16 +65,12 @@ private: QLabel *m_nameLabel; LineEdit *m_nameEdit; - QLabel *m_emptyLabel; - QLabel *m_checkLabel; - QCheckBox *m_rememberCheckBox = nullptr; - Divider *m_bottomDivider = nullptr; KBorderlessButton *m_showListBtn; QPushButton *m_cancelBtn; QPushButton *m_joinBtn; - QScrollArea *m_scrollArea; + QScrollArea *m_hiddenWifiScrollArea; QVBoxLayout *m_pageLayout; QHBoxLayout *m_topLayout; QVBoxLayout *m_centerVBoxLayout; diff --git a/src/frontend/netdetails/securitypage.cpp b/src/frontend/netdetails/securitypage.cpp index 6eb80855..16b92e9b 100644 --- a/src/frontend/netdetails/securitypage.cpp +++ b/src/frontend/netdetails/securitypage.cpp @@ -24,7 +24,7 @@ #define DETAIL_MIN_LABEL_WIDTH 80 #define DETAIL_MIN_EDIT_WIDTH 390 -#define MIN_LABEL_WIDTH 138 +#define MIN_LABEL_WIDTH 146 #define MIN_EDIT_WIDTH 286 SecurityPage::SecurityPage(bool isNetDetailPage, QWidget *parent) : isDetailPage(isNetDetailPage), QFrame(parent) @@ -35,6 +35,7 @@ SecurityPage::SecurityPage(bool isNetDetailPage, QWidget *parent) : isDetailPage void SecurityPage::initUI() { + mainLayout = new QVBoxLayout(this); secuTypeLabel = new QLabel(this); pwdLabel = new QLabel(this); //企业wifi共有 @@ -82,6 +83,21 @@ void SecurityPage::initUI() queryLayout->addWidget(userPwdFlagLabel); queryLayout->addStretch(); + //记住该网络复选框 + m_emptyLabel = new QLabel(this); + m_emptyLabel->setMinimumWidth(MIN_LABEL_WIDTH - 8); + m_checkLabel = new QLabel(this); + m_checkLabel->setText(tr("Remember the Network")); //记住该网络 + m_rememberCheckBox = new QCheckBox(this); + m_rememberCheckBox->setChecked(true); + QWidget *checkWidget = new QWidget(this); + QHBoxLayout *rememberLayout = new QHBoxLayout(checkWidget); + rememberLayout->setContentsMargins(0, 0, 0, 0); + rememberLayout->addWidget(m_emptyLabel); + rememberLayout->addWidget(m_rememberCheckBox); + rememberLayout->addWidget(m_checkLabel); + rememberLayout->addStretch(); + // mSecuLayout = new QFormLayout(this); // mSecuLayout->setContentsMargins(0, 0, 0, 0); // mSecuLayout->addRow(secuTypeLabel, secuTypeCombox); @@ -99,7 +115,7 @@ void SecurityPage::initUI() // mSecuLayout->addRow(userPwdLabel, userPwdEdit); // mSecuLayout->addRow(userPwdFlagBox, userPwdFlagLabel); - topLayout = new QGridLayout(this); + topLayout = new QGridLayout(); topLayout->setContentsMargins(0, 0, 0, 0); topLayout->setVerticalSpacing(16); // 安全 Label和选项框 第0行,第0列,第1列 @@ -159,18 +175,24 @@ void SecurityPage::initUI() bottomLayout->addWidget(pwdOptionLabel, 6, 0); bottomLayout->addWidget(pwdOptionCombox, 6, 1); - if(isDetailPage) { + if (isDetailPage) { + checkWidget->hide(); topLayout->addWidget(queryWidget, 7, 1); changeColumnWidthWithSecuType(); } else { queryWidget->hide(); topLayout->setColumnMinimumWidth(0, MIN_LABEL_WIDTH); topLayout->setColumnMinimumWidth(1, MIN_EDIT_WIDTH); - bottomLayout->setColumnMinimumWidth(0, MIN_LABEL_WIDTH); + bottomLayout->setColumnMinimumWidth(0, MIN_LABEL_WIDTH - 8); } topLayout->addWidget(tlsWidget, 7, 0, 6, 2); + mainLayout->setContentsMargins(0, 0, 0, 0); + mainLayout->setSpacing(0); + mainLayout->addLayout(topLayout); + mainLayout->addWidget(checkWidget); + mainLayout->addStretch(); secuTypeLabel->setText(tr("Security")); pwdLabel->setText(tr("Password")); @@ -667,6 +689,7 @@ void SecurityPage::updateSecurityChange(KyWirelessConnectSetting &setting) } else if (secuTypeCombox->currentData().toInt() == WPA3_PERSONAL) { setting.m_type = SAE; } + setting.isAutoConnect = m_rememberCheckBox->isChecked(); } bool SecurityPage::checkConnectBtnIsEnabled() @@ -872,7 +895,7 @@ void SecurityPage::changeColumnWidthWithSecuType() eapMethodCombox->currentData().toInt() == TLS) { topLayout->setColumnMinimumWidth(0, MIN_LABEL_WIDTH); topLayout->setColumnMinimumWidth(1, MIN_EDIT_WIDTH); - bottomLayout->setColumnMinimumWidth(0, MIN_LABEL_WIDTH); + bottomLayout->setColumnMinimumWidth(0, MIN_LABEL_WIDTH - 8); } else { topLayout->setColumnMinimumWidth(0, DETAIL_MIN_LABEL_WIDTH); diff --git a/src/frontend/netdetails/securitypage.h b/src/frontend/netdetails/securitypage.h index 4c259f80..667feb5c 100644 --- a/src/frontend/netdetails/securitypage.h +++ b/src/frontend/netdetails/securitypage.h @@ -59,6 +59,7 @@ private: // QFormLayout *mSecuLayout; QGridLayout *topLayout; QGridLayout *bottomLayout; + QVBoxLayout *mainLayout; QLabel *secuTypeLabel; QLabel *pwdLabel; @@ -100,6 +101,10 @@ private: KPasswordEdit *userPwdEdit = nullptr; QCheckBox *userPwdFlagBox; + QLabel *m_emptyLabel = nullptr; + QLabel *m_checkLabel = nullptr; + QCheckBox *m_rememberCheckBox = nullptr; + QString hintRequired = tr("Required"); //必填 QString emptyhint = tr(" "); From 1fab334ba5880dfac3add0f895a83e2aecddb36f Mon Sep 17 00:00:00 2001 From: zhangyuanyuan1 Date: Fri, 5 Aug 2022 09:09:21 +0800 Subject: [PATCH 06/20] =?UTF-8?q?=E5=88=A0=E9=99=A4=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/netdetails/ipv4page.cpp | 9 ++++----- src/frontend/netdetails/ipv6page.cpp | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/frontend/netdetails/ipv4page.cpp b/src/frontend/netdetails/ipv4page.cpp index e03d4041..df031a82 100644 --- a/src/frontend/netdetails/ipv4page.cpp +++ b/src/frontend/netdetails/ipv4page.cpp @@ -291,13 +291,12 @@ void Ipv4Page::configChanged(int index) { void Ipv4Page::onAddressTextChanged() { + m_iconLabel->hide(); + m_textLabel->hide(); + if (!getTextEditState(ipv4addressEdit->text())) { - m_iconLabel->hide(); - m_textLabel->hide(); m_addressHintLabel->setText(tr("Invalid address")); } else { - m_iconLabel->hide(); - m_textLabel->hide(); m_addressHintLabel->clear(); } } @@ -406,7 +405,7 @@ void Ipv4Page::initConflictHintLable() m_iconLabel->setPixmap(icon.pixmap(ICON_SIZE)); m_textLabel = new QLabel(m_addressHintLabel); m_textLabel->setText(tr("Address conflict")); - QHBoxLayout *conflictHintLayout = new QHBoxLayout(); + QHBoxLayout *conflictHintLayout = new QHBoxLayout(m_addressHintLabel); conflictHintLayout->setContentsMargins(0, 0, 0, 0); conflictHintLayout->addWidget(m_iconLabel); conflictHintLayout->addWidget(m_textLabel); diff --git a/src/frontend/netdetails/ipv6page.cpp b/src/frontend/netdetails/ipv6page.cpp index 59dc59db..37c0aaea 100644 --- a/src/frontend/netdetails/ipv6page.cpp +++ b/src/frontend/netdetails/ipv6page.cpp @@ -270,13 +270,12 @@ void Ipv6Page::setEnableOfSaveBtn() void Ipv6Page::onAddressTextChanged() { + m_iconLabel->hide(); + m_textLabel->hide(); + if (!getIpv6EditState(ipv6AddressEdit->text())) { - m_iconLabel->hide(); - m_textLabel->hide(); m_addressHintLabel->setText(tr("Invalid address")); } else { - m_iconLabel->hide(); - m_textLabel->hide(); m_addressHintLabel->clear(); } } @@ -344,7 +343,7 @@ void Ipv6Page::initConflictHintLable() m_iconLabel->setPixmap(icon.pixmap(ICON_SIZE)); m_textLabel = new QLabel(m_addressHintLabel); m_textLabel->setText(tr("Address conflict")); - QHBoxLayout *conflictHintLayout = new QHBoxLayout(); + QHBoxLayout *conflictHintLayout = new QHBoxLayout(m_addressHintLabel); conflictHintLayout->setContentsMargins(0, 0, 0, 0); conflictHintLayout->addWidget(m_iconLabel); conflictHintLayout->addWidget(m_textLabel); From f0b951022bcc66316ed2e153aef8ea05ff73b6d6 Mon Sep 17 00:00:00 2001 From: zhangyuanyuan1 Date: Fri, 5 Aug 2022 15:21:44 +0800 Subject: [PATCH 07/20] Fixbug 133311 --- src/frontend/tab-pages/lanpage.cpp | 13 +++++++++++++ src/frontend/tab-pages/wlanpage.cpp | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/src/frontend/tab-pages/lanpage.cpp b/src/frontend/tab-pages/lanpage.cpp index 93a6d787..c0ca7f1c 100644 --- a/src/frontend/tab-pages/lanpage.cpp +++ b/src/frontend/tab-pages/lanpage.cpp @@ -381,6 +381,19 @@ void LanPage::constructActiveConnectionArea() QListWidgetItem *p_listWidgetItem = addNewItem(p_activeConnectionItem, m_activatedLanListWidget); m_activeConnectionMap.insert(p_activeConnectionItem->m_connectUuid, p_listWidgetItem); + int configType = NetworkModeConfig::getInstance()->getNetworkModeConfig(p_activeConnectionItem->m_connectUuid); + if (configType == -1) { + NetworkModeConfig::getInstance()->setNetworkModeConfig(p_activeConnectionItem->m_connectUuid, + m_currentDeviceName, + p_activeConnectionItem->m_connectName, + KSC_FIREWALL_PUBLIC); + } else { + NetworkModeConfig::getInstance()->setNetworkModeConfig(p_activeConnectionItem->m_connectUuid, + m_currentDeviceName, + p_activeConnectionItem->m_connectName, + configType); + } + delete p_activeConnectionItem; p_activeConnectionItem = nullptr; } diff --git a/src/frontend/tab-pages/wlanpage.cpp b/src/frontend/tab-pages/wlanpage.cpp index 8411236d..3c45e137 100644 --- a/src/frontend/tab-pages/wlanpage.cpp +++ b/src/frontend/tab-pages/wlanpage.cpp @@ -425,6 +425,19 @@ void WlanPage::constructActivateConnectionArea() m_activateConnectionItemMap.insert(wirelessNetItem.m_NetSsid, p_listWidgetItem); updateWlanItemState(m_activatedNetListWidget, p_listWidgetItem, Activated); + int configType = NetworkModeConfig::getInstance()->getNetworkModeConfig(wirelessNetItem.m_connectUuid); + if (configType == -1) { + NetworkModeConfig::getInstance()->setNetworkModeConfig(wirelessNetItem.m_connectUuid, + m_currentDevice, + wirelessNetItem.m_connName, + KSC_FIREWALL_PUBLIC); + } else { + NetworkModeConfig::getInstance()->setNetworkModeConfig(wirelessNetItem.m_connectUuid, + m_currentDevice, + wirelessNetItem.m_connName, + configType); + } + height += p_listWidgetItem->sizeHint().height(); } } From a54b049b914adfe711a789ad9287edc4d27f51da Mon Sep 17 00:00:00 2001 From: zhangyuanyuan1 Date: Mon, 8 Aug 2022 11:36:10 +0800 Subject: [PATCH 08/20] =?UTF-8?q?Fixbug=20132105=E6=9C=80=E5=A4=A7?= =?UTF-8?q?=E5=AD=97=E4=BD=93=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../netdetails/joinhiddenwifipage.cpp | 5 +- src/frontend/netdetails/joinhiddenwifipage.h | 2 +- src/frontend/netdetails/netdetail.cpp | 54 ++++++++++++++++--- src/frontend/netdetails/netdetail.h | 2 + src/frontend/netdetails/securitypage.cpp | 25 +++++---- src/frontend/netdetails/securitypage.h | 11 ++-- 6 files changed, 75 insertions(+), 24 deletions(-) diff --git a/src/frontend/netdetails/joinhiddenwifipage.cpp b/src/frontend/netdetails/joinhiddenwifipage.cpp index 4e0d1c60..f8dd4ff6 100644 --- a/src/frontend/netdetails/joinhiddenwifipage.cpp +++ b/src/frontend/netdetails/joinhiddenwifipage.cpp @@ -69,7 +69,8 @@ void JoinHiddenWiFiPage::initUI() m_secuWidget->setSecurity(KySecuType::WPA_AND_WPA2_PERSONAL); m_descriptionLabel = new QLabel(this); - m_nameLabel = new QLabel(this); + m_nameLabel = new FixLabel(this); + m_nameLabel->setFixedWidth(LABEL_MIN_WIDTH); m_nameEdit =new LineEdit(this); m_emptyLabel = new QLabel(this); @@ -143,7 +144,7 @@ void JoinHiddenWiFiPage::initUI() QFont font = m_descriptionLabel->font(); font.setWeight(75); m_descriptionLabel->setFont(font); - m_nameLabel->setText(tr("Network name(SSID)")); //网络名(SSID) + m_nameLabel->setLabelText(tr("Network name(SSID)")); //网络名(SSID) m_checkLabel->setText(tr("Remember the Network")); //记住该网络 m_showListBtn->setText(tr("Show Network List")); //显示网络列表 m_cancelBtn->setText(tr("Cancel")); diff --git a/src/frontend/netdetails/joinhiddenwifipage.h b/src/frontend/netdetails/joinhiddenwifipage.h index 7c80da5f..d6249a6b 100644 --- a/src/frontend/netdetails/joinhiddenwifipage.h +++ b/src/frontend/netdetails/joinhiddenwifipage.h @@ -62,7 +62,7 @@ private: SecurityPage *m_secuWidget; QLabel *m_descriptionLabel; - QLabel *m_nameLabel; + FixLabel *m_nameLabel; LineEdit *m_nameEdit; QLabel *m_emptyLabel; diff --git a/src/frontend/netdetails/netdetail.cpp b/src/frontend/netdetails/netdetail.cpp index 206c4b28..2bf8229e 100644 --- a/src/frontend/netdetails/netdetail.cpp +++ b/src/frontend/netdetails/netdetail.cpp @@ -37,7 +37,8 @@ #define WINDOW_HEIGHT 602 #define ICON_SIZE 22,22 #define TITLE_LAYOUT_MARGINS 9,9,0,0 -#define LAYOUT_MARGINS 0,0,0,0 +#define CENTER_LAYOUT_MARGINS 24,0,0,0 +#define BOTTOM_LAYOUT_MARGINS 24,0,24,0 #define BOTTOM_LAYOUT_SPACING 16 #define PAGE_LAYOUT_SPACING 1 #define DETAIL_PAGE_NUM 0 @@ -49,6 +50,9 @@ #define PAGE_MIN_HEIGHT 40 #define LAN_TAB_WIDTH 180 #define WLAN_TAB_WIDTH 240 +#define SCRO_WIDTH 472 +#define PEAP_SCRO_HEIGHT 300 +#define TLS_SCRO_HEIGHT 480 //extern void qt_blurImage(QImage &blurImage, qreal radius, bool quality, int transposed); @@ -131,7 +135,7 @@ NetDetail::NetDetail(QString interface, QString name, QString uuid, bool isActiv initComponent(); getConInfo(m_info); pagePadding(name,isWlan); - + setSecuPageHeight(); connect(qApp, &QApplication::paletteChanged, this, &NetDetail::onPaletteChanged); isCreateOk = !(m_isCreateNet && !isWlan); @@ -244,7 +248,8 @@ void NetDetail::centerToScreen() void NetDetail::initUI() { QVBoxLayout *mainLayout = new QVBoxLayout(this); - mainLayout->setContentsMargins(24,9,24,24); + mainLayout->setContentsMargins(0,9,0,24); + mainLayout->setSpacing(24); detailPage = new DetailPage(isWlan, m_name.isEmpty(), this); @@ -259,11 +264,25 @@ void NetDetail::initUI() centerWidget = new QWidget(this); bottomWidget = new QWidget(this); + m_secuPageScrollArea = new QScrollArea(this); + m_secuPageScrollArea->setFrameShape(QFrame::NoFrame); + m_secuPageScrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + m_secuPageScrollArea->setWidget(securityPage); + QPalette pal = m_secuPageScrollArea->palette(); + pal.setBrush(QPalette::Window, Qt::transparent); + m_secuPageScrollArea->setPalette(pal); + + detailPage->setFixedWidth(SCRO_WIDTH); + ipv4Page->setFixedWidth(SCRO_WIDTH); + ipv6Page->setFixedWidth(SCRO_WIDTH); + createNetPage->setFixedWidth(SCRO_WIDTH); + configPage->setFixedWidth(SCRO_WIDTH); + stackWidget = new QStackedWidget(centerWidget); stackWidget->addWidget(detailPage); stackWidget->addWidget(ipv4Page); stackWidget->addWidget(ipv6Page); - stackWidget->addWidget(securityPage); + stackWidget->addWidget(m_secuPageScrollArea); stackWidget->addWidget(configPage); stackWidget->addWidget(createNetPage); @@ -320,13 +339,13 @@ void NetDetail::initUI() this->setWindowIcon(QIcon::fromTheme("kylin-network")); QVBoxLayout *centerlayout = new QVBoxLayout(centerWidget); - centerlayout->setContentsMargins(LAYOUT_MARGINS); + centerlayout->setContentsMargins(CENTER_LAYOUT_MARGINS); centerlayout->addWidget(pageFrame); centerlayout->addSpacing(4); centerlayout->addWidget(stackWidget); QHBoxLayout *bottomLayout = new QHBoxLayout(bottomWidget); - bottomLayout->setContentsMargins(LAYOUT_MARGINS); + bottomLayout->setContentsMargins(BOTTOM_LAYOUT_MARGINS); bottomLayout->setSpacing(BOTTOM_LAYOUT_SPACING); bottomLayout->addWidget(forgetBtn); bottomLayout->addStretch(); @@ -394,6 +413,13 @@ void NetDetail::initComponent() isSecuOk = status; setConfirmEnable(); }); + + connect(securityPage, &SecurityPage::secuTypeChanged, this, [=]() { + setSecuPageHeight(); + }); + connect(securityPage, &SecurityPage::eapTypeChanged, this, [=]() { + setSecuPageHeight(); + }); } void NetDetail::pagePadding(QString netName, bool isWlan) @@ -660,6 +686,22 @@ void NetDetail::initSecuData() } } +void NetDetail::setSecuPageHeight() +{ + KySecuType secuType; + KyEapMethodType eapType; + securityPage->getSecuType(secuType, eapType); + if (secuType == WPA_AND_WPA2_ENTERPRISE) { + if (eapType == TLS) { + securityPage->setFixedSize(SCRO_WIDTH, TLS_SCRO_HEIGHT); + } else { + securityPage->setFixedSize(SCRO_WIDTH, PEAP_SCRO_HEIGHT); + } + } else { + securityPage->setFixedSize(SCRO_WIDTH, PEAP_SCRO_HEIGHT); + } +} + void NetDetail::initTlsInfo(ConInfo &conInfo) { m_resource->getEnterPriseInfoTls(m_uuid, conInfo.tlsInfo); diff --git a/src/frontend/netdetails/netdetail.h b/src/frontend/netdetails/netdetail.h index 6f2e1885..085c0bca 100644 --- a/src/frontend/netdetails/netdetail.h +++ b/src/frontend/netdetails/netdetail.h @@ -86,6 +86,7 @@ private: void loadPage(); void pagePadding(QString netName, bool isWlan); void initSecuData(); + void setSecuPageHeight(); void initTlsInfo(ConInfo &conInfo); void initPeapInfo(ConInfo &conInfo); @@ -133,6 +134,7 @@ private: QWidget * centerWidget; QWidget * bottomWidget; + QScrollArea * m_secuPageScrollArea; QPushButton * cancelBtn; QPushButton * forgetBtn; diff --git a/src/frontend/netdetails/securitypage.cpp b/src/frontend/netdetails/securitypage.cpp index 6eb80855..7c18ed03 100644 --- a/src/frontend/netdetails/securitypage.cpp +++ b/src/frontend/netdetails/securitypage.cpp @@ -44,13 +44,18 @@ void SecurityPage::initUI() domainLable = new QLabel(this); caCertPathLabel = new QLabel(this); caNeedFlagLabel = new QLabel(this); - clientCertPathLabel = new QLabel(this); - clientPrivateKeyLabel = new QLabel(this); - clientPrivateKeyPwdLabel = new QLabel(this); - pwdOptionLabel = new QLabel(this); + clientCertPathLabel = new FixLabel(this); + clientCertPathLabel->setFixedWidth(MIN_LABEL_WIDTH); + clientPrivateKeyLabel = new FixLabel(this); + clientPrivateKeyLabel->setFixedWidth(MIN_LABEL_WIDTH); + clientPrivateKeyPwdLabel = new FixLabel(this); + clientPrivateKeyPwdLabel->setFixedWidth(MIN_LABEL_WIDTH); + pwdOptionLabel = new FixLabel(this); + pwdOptionLabel->setFixedWidth(MIN_LABEL_WIDTH); //PEAP TTLS共有 - eapMethodLabel = new QLabel(this); + eapMethodLabel = new FixLabel(this); + eapMethodLabel->setFixedWidth(MIN_LABEL_WIDTH); userNameLabel = new QLabel(this); userPwdLabel = new QLabel(this); userPwdFlagLabel = new QLabel(this); @@ -183,15 +188,15 @@ void SecurityPage::initUI() domainLable->setText(tr("Domain")); caCertPathLabel->setText(tr("CA certficate")); caNeedFlagLabel->setText(tr("no need for CA certificate")); - clientCertPathLabel->setText(tr("User certificate")); - clientPrivateKeyLabel->setText(tr("User private key")); - clientPrivateKeyPwdLabel->setText(tr("User key password")); - pwdOptionLabel->setText(tr("Password options")); + clientCertPathLabel->setLabelText(tr("User certificate")); + clientPrivateKeyLabel->setLabelText(tr("User private key")); + clientPrivateKeyPwdLabel->setLabelText(tr("User key password")); + pwdOptionLabel->setLabelText(tr("Password options")); identityEdit->setPlaceholderText(tr("Required")); clientPrivateKeyPwdEdit->setPlaceholderText(hintRequired); //PEAP TTLS共有 - eapMethodLabel->setText(tr("Ineer authentication")); + eapMethodLabel->setLabelText(tr("Ineer authentication")); userNameLabel->setText(tr("Usename")); userPwdLabel->setText(tr("Password")); userPwdFlagLabel->setText(tr("Ask pwd each query")); diff --git a/src/frontend/netdetails/securitypage.h b/src/frontend/netdetails/securitypage.h index 4c259f80..6c266300 100644 --- a/src/frontend/netdetails/securitypage.h +++ b/src/frontend/netdetails/securitypage.h @@ -28,6 +28,7 @@ #include #include "coninfo.h" +#include "detailwidget.h" #include "kwidget.h" #include "kpasswordedit.h" @@ -69,13 +70,13 @@ private: QLabel *domainLable; QLabel *caCertPathLabel; QLabel *caNeedFlagLabel; - QLabel *clientCertPathLabel; - QLabel *clientPrivateKeyLabel; - QLabel *clientPrivateKeyPwdLabel; - QLabel *pwdOptionLabel; + FixLabel *clientCertPathLabel; + FixLabel *clientPrivateKeyLabel; + FixLabel *clientPrivateKeyPwdLabel; + FixLabel *pwdOptionLabel; //PEAP TTLS共有 - QLabel *eapMethodLabel; + FixLabel *eapMethodLabel; QLabel *userNameLabel; QLabel *userPwdLabel; QLabel *userPwdFlagLabel; From 5e7ed05c9ad3af27d8908fa28bdbb0aa8d0d49d4 Mon Sep 17 00:00:00 2001 From: zhangyuanyuan1 Date: Mon, 8 Aug 2022 14:23:10 +0800 Subject: [PATCH 09/20] =?UTF-8?q?bug=20132182=E6=9C=80=E5=A4=A7=E5=AD=97?= =?UTF-8?q?=E4=BD=93=E6=98=BE=E7=A4=BA=E8=A7=84=E8=8C=83=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/netdetails/detailwidget.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/frontend/netdetails/detailwidget.cpp b/src/frontend/netdetails/detailwidget.cpp index 8f41b72e..2b63e1a2 100644 --- a/src/frontend/netdetails/detailwidget.cpp +++ b/src/frontend/netdetails/detailwidget.cpp @@ -24,8 +24,9 @@ #define ITEM_HEIGHT 36 #define ITEM_MARGINS 18,0,16,0 - -#define MAX_LABEL_WIDTH 138 +#define MIN_LABEL_WIDTH 150 +#define MAX_LABEL_WIDTH 154 +#define MAX_WIDGET_WIDTH 270 FixLabel::FixLabel(QWidget *parent) : QLabel(parent) @@ -83,6 +84,7 @@ void DetailWidget::initUI() m_mainLayout->setContentsMargins(ITEM_MARGINS); m_keyLabel = new FixLabel(this); + m_keyLabel->setMinimumWidth(MIN_LABEL_WIDTH); m_keyLabel->setMaximumWidth(MAX_LABEL_WIDTH); m_keyLabel->setAlignment(Qt::AlignLeft | Qt::AlignVCenter); @@ -94,13 +96,10 @@ void DetailWidget::initUI() m_mainLayout->addWidget(m_copyButton); } m_mainLayout->addWidget(m_valueWidget); - m_valueWidget->setMaximumWidth(100000000000); + m_valueWidget->setMaximumWidth(MAX_WIDGET_WIDTH); } void DetailWidget::setKey(const QString &keyLabel) { - m_keyLabel->setText(keyLabel); + m_keyLabel->setLabelText(keyLabel); } - - - From ef9365b0b850c36715d432f1d2331d2063bbb168 Mon Sep 17 00:00:00 2001 From: zhangyuanyuan1 Date: Mon, 8 Aug 2022 14:49:36 +0800 Subject: [PATCH 10/20] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E9=A1=BA=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/tab-pages/lanpage.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontend/tab-pages/lanpage.cpp b/src/frontend/tab-pages/lanpage.cpp index fb1b6059..adf218a1 100644 --- a/src/frontend/tab-pages/lanpage.cpp +++ b/src/frontend/tab-pages/lanpage.cpp @@ -926,12 +926,12 @@ void LanPage::onConnectionStateChange(QString uuid, return; } + sendLanStateChangeSignal(uuid, (ConnectState)state); + if (m_activeConnectionMap.keys().contains(uuid) && state == NetworkManager::ActiveConnection::State::Activated) { return; } - sendLanStateChangeSignal(uuid, (ConnectState)state); - qDebug()<<"[LanPage] connection uuid"<< uuid << "state change slot:"<< state; From 3b7942a8781242ba0698194733af21f3bfa21ea8 Mon Sep 17 00:00:00 2001 From: zhangyuanyuan1 Date: Tue, 9 Aug 2022 10:28:37 +0800 Subject: [PATCH 11/20] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- translations/kylin-nm_zh_CN.qm | Bin 10615 -> 10686 bytes translations/kylin-nm_zh_CN.ts | 5 +++++ 2 files changed, 5 insertions(+) diff --git a/translations/kylin-nm_zh_CN.qm b/translations/kylin-nm_zh_CN.qm index f13d1aaa760516212e01c67bcf7df35376fe65ec..7c8b96ce605fe8043e8eb8fdbbe1467523135bb6 100644 GIT binary patch delta 355 zcmew!v@dvq2;+f?qHRnnS`+80GiFRYs>h{Z!f;Q}hk-$%X5wFW&J&Dl_6svG$R3&O z%P22c#iV;+2?K+`UkI(tHo2BjpYhe?wTya9N+Of*GRiYvo&1;4+;A=H%*mn*4AO3F z>PNl;>ECQI#h)1%R=NV6x`TW1 zjH3(;@>bkyrfM=Uh~9_LvQsBtWtM0BJ^3rMd|(Dougq))2L2ZiT2_;1rcN^hgUkn> zIUcD%y*xa-8H*Vhg!Lh`;vAl<9w&j~8+m1Q<}ok`F6Nbu0ntUg9oax}mC(ttEcT4{ iljpMNvlV9o1)gla#G)%Zd7p^x?3~DF< delta 321 zcmdlN{5@!b2;+{4qHRpduP4q`XVjc{RF6ykE5kiO9|i^m+lhbOIXfBG>=$NWkZqmp z%P22s&7^x^2?K+`UkI&qd~z+LKI7`iYZ>*J6t7Oc%P7w{ZSr46bHhB=nUh5s7^L0U z)Q@}x(!beaia#?j$Z4=ur}Qu|us&hidMS&6fjyG#y~snLU0)`rGMO*P#QCfCg1ep2{q*7{i^i(iNz^l6&!t zqd?K$+-s(4GBAkVhtRTNldm$%GwzxEm08|Ulc!f^HUk6y3!a%e%?u1OA9&_?qyqJv z<=M?x%)lV551|!fd9He#WMGgln(WIW&L}oHmBpTsVe(QIeKwO!1_qU-n{Tn`%5HX3 Hs$d5I*z96e diff --git a/translations/kylin-nm_zh_CN.ts b/translations/kylin-nm_zh_CN.ts index 7753b4b4..a210ef93 100644 --- a/translations/kylin-nm_zh_CN.ts +++ b/translations/kylin-nm_zh_CN.ts @@ -974,6 +974,11 @@ SecurityPage + + + Remember the Network + 记住该网络 + Security From 4fef15a3fb097938273c26ce6050efc422c8bc52 Mon Sep 17 00:00:00 2001 From: zhangyuanyuan1 Date: Wed, 10 Aug 2022 09:28:31 +0800 Subject: [PATCH 12/20] =?UTF-8?q?=E5=AE=89=E5=85=A8=E9=A1=B5=E5=B8=83?= =?UTF-8?q?=E5=B1=80=E9=94=99=E4=BD=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/netdetails/detailwidget.cpp | 2 +- src/frontend/netdetails/securitypage.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/frontend/netdetails/detailwidget.cpp b/src/frontend/netdetails/detailwidget.cpp index 2b63e1a2..b7a030fb 100644 --- a/src/frontend/netdetails/detailwidget.cpp +++ b/src/frontend/netdetails/detailwidget.cpp @@ -24,7 +24,7 @@ #define ITEM_HEIGHT 36 #define ITEM_MARGINS 18,0,16,0 -#define MIN_LABEL_WIDTH 150 +#define MIN_LABEL_WIDTH 146 #define MAX_LABEL_WIDTH 154 #define MAX_WIDGET_WIDTH 270 diff --git a/src/frontend/netdetails/securitypage.cpp b/src/frontend/netdetails/securitypage.cpp index 146dc9a5..d8ebdcd5 100644 --- a/src/frontend/netdetails/securitypage.cpp +++ b/src/frontend/netdetails/securitypage.cpp @@ -25,7 +25,7 @@ #define DETAIL_MIN_LABEL_WIDTH 80 #define DETAIL_MIN_EDIT_WIDTH 390 #define MIN_LABEL_WIDTH 146 -#define MIN_EDIT_WIDTH 286 +#define MIN_EDIT_WIDTH 278 SecurityPage::SecurityPage(bool isNetDetailPage, QWidget *parent) : isDetailPage(isNetDetailPage), QFrame(parent) { @@ -159,6 +159,7 @@ void SecurityPage::initUI() bottomLayout = new QGridLayout(tlsWidget); bottomLayout->setContentsMargins(0, 0, 0, 0); bottomLayout->setVerticalSpacing(8); + bottomLayout->setHorizontalSpacing(0); // 域 Label和输入框 第0行,第0列,第1列 bottomLayout->addWidget(domainLable, 0, 0); bottomLayout->addWidget(domainEdit, 0, 1); From 921fc4eb889cafc703774b9e1441304ecace86ee Mon Sep 17 00:00:00 2001 From: zhangyuanyuan1 Date: Mon, 15 Aug 2022 20:16:00 +0800 Subject: [PATCH 13/20] Fixbug 134326 --- src/frontend/tab-pages/lanpage.cpp | 10 +++++----- src/frontend/tab-pages/tabpage.cpp | 21 +++++++++++---------- src/frontend/tab-pages/tabpage.h | 9 +++++---- src/frontend/tab-pages/wlanpage.cpp | 10 +++++----- 4 files changed, 26 insertions(+), 24 deletions(-) diff --git a/src/frontend/tab-pages/lanpage.cpp b/src/frontend/tab-pages/lanpage.cpp index 30fd786b..82f85f0d 100644 --- a/src/frontend/tab-pages/lanpage.cpp +++ b/src/frontend/tab-pages/lanpage.cpp @@ -429,7 +429,7 @@ void LanPage::constructConnectionArea() } } - if (m_inactivatedLanListWidget->count() < MAX_ITEMS) { + if (m_inactivatedLanListWidget->count() <= MAX_ITEMS) { m_inactivatedLanListWidget->setFixedWidth(MIN_WIDTH); } else { m_inactivatedLanListWidget->setFixedWidth(MAX_WIDTH); @@ -475,7 +475,7 @@ bool LanPage::removeConnectionItem(QMap &connectMap, p_listWidgetItem = nullptr; iter = connectMap.erase(iter); - if (m_inactivatedLanListWidget->count() < MAX_ITEMS) { + if (m_inactivatedLanListWidget->count() <= MAX_ITEMS) { m_inactivatedLanListWidget->setFixedWidth(MIN_WIDTH); } return true; @@ -528,7 +528,7 @@ void LanPage::onAddConnection(QString uuid) //新增一个有线 delete p_newItem; p_newItem = nullptr; - if (m_inactivatedLanListWidget->count() >= MAX_ITEMS) { + if (m_inactivatedLanListWidget->count() > MAX_ITEMS) { m_inactivatedLanListWidget->setFixedWidth(MAX_WIDTH); } return; @@ -857,7 +857,7 @@ void LanPage::updateActivatedConnectionArea(KyConnectItem *p_newItem) m_activeConnectionMap.insert(p_newItem->m_connectUuid, p_listWidgetItem); // this->showDesktopNotify(tr("LAN Connected Successfully"), "networkconnected"); } - if (m_inactivatedLanListWidget->count() < MAX_ITEMS) { + if (m_inactivatedLanListWidget->count() <= MAX_ITEMS) { m_inactivatedLanListWidget->setFixedWidth(MIN_WIDTH); } @@ -881,7 +881,7 @@ void LanPage::updateConnectionArea(KyConnectItem *p_newItem) m_inactiveConnectionMap.insert(p_newItem->m_connectUuid, p_listWidgetItem); // this->showDesktopNotify(tr("LAN Disconnected Successfully"), "networkdisconnected"); } - if (m_inactivatedLanListWidget->count() < MAX_ITEMS) { + if (m_inactivatedLanListWidget->count() <= MAX_ITEMS) { m_inactivatedLanListWidget->setFixedWidth(MIN_WIDTH); } else { m_inactivatedLanListWidget->setFixedWidth(MAX_WIDTH); diff --git a/src/frontend/tab-pages/tabpage.cpp b/src/frontend/tab-pages/tabpage.cpp index c71e772b..19e136c3 100644 --- a/src/frontend/tab-pages/tabpage.cpp +++ b/src/frontend/tab-pages/tabpage.cpp @@ -94,16 +94,17 @@ void TabPage::initUI() m_inactivatedNetLabel = new QLabel(m_inactivatedNetFrame); m_inactivatedNetLabel->setContentsMargins(TEXT_MARGINS); - m_inactivatedNetListArea = new QScrollArea(m_inactivatedNetFrame); - m_inactivatedNetListArea->setFrameShape(QFrame::Shape::NoFrame); - m_inactivatedNetListArea->setWidgetResizable(true); - m_inactivatedNetListArea->setBackgroundRole(QPalette::Base); - m_inactivatedNetListArea->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - m_inactivatedNetListArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); +// m_inactivatedNetListArea = new QScrollArea(m_inactivatedNetFrame); +// m_inactivatedNetListArea->setFrameShape(QFrame::Shape::NoFrame); +// m_inactivatedNetListArea->setWidgetResizable(true); +// m_inactivatedNetListArea->setBackgroundRole(QPalette::Base); +// m_inactivatedNetListArea->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); +// m_inactivatedNetListArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + m_inactivatedNetListArea = new QWidget(m_inactivatedNetFrame); m_inactivatedAreaLayout = new QVBoxLayout(m_inactivatedNetListArea); m_inactivatedAreaLayout->setSpacing(MAIN_LAYOUT_SPACING); m_inactivatedAreaLayout->setContentsMargins(MAIN_LAYOUT_MARGINS); - m_inactivatedNetListArea->setLayout(m_inactivatedAreaLayout); +// m_inactivatedNetListArea->setLayout(m_inactivatedAreaLayout); m_inactivatedNetLayout->addWidget(m_inactivatedNetLabel); m_inactivatedNetLayout->addWidget(m_inactivatedNetListArea); @@ -133,9 +134,9 @@ void TabPage::initUI() m_mainLayout->addWidget(m_inactivatedNetDivider); m_mainLayout->addWidget(m_settingsFrame); - QPalette pal = m_inactivatedNetListArea->palette(); - pal.setBrush(QPalette::Base, QColor(0,0,0,0)); //背景透明 - m_inactivatedNetListArea->setPalette(pal); +// QPalette pal = m_inactivatedNetListArea->palette(); +// pal.setBrush(QPalette::Base, QColor(0,0,0,0)); //背景透明 +// m_inactivatedNetListArea->setPalette(pal); onPaletteChanged(); } diff --git a/src/frontend/tab-pages/tabpage.h b/src/frontend/tab-pages/tabpage.h index d69ab1cd..514ba793 100644 --- a/src/frontend/tab-pages/tabpage.h +++ b/src/frontend/tab-pages/tabpage.h @@ -52,7 +52,7 @@ enum network_mode { #define DEVICE_LAYOUT_MARGINS 24,0,24,8 #define DEVICE_COMBOBOX_WIDTH 180 #define ACTIVE_NET_LAYOUT_MARGINS 8,8,8,8 -#define NET_LAYOUT_MARGINS 8,8,0,3 +#define NET_LAYOUT_MARGINS 8,8,0,1 #define NET_LAYOUT_SPACING 8 #define NET_LIST_SPACING 0 #define TEXT_MARGINS 16,0,0,0 @@ -63,8 +63,8 @@ enum network_mode { #define ACTIVE_AREA_MAX_HEIGHT 92 #define MAX_ITEMS 4 -#define MAX_WIDTH 400 -#define MIN_WIDTH 383 +#define MAX_WIDTH 408 +#define MIN_WIDTH 396 #define SCROLL_STEP 4 @@ -133,7 +133,8 @@ protected: QFrame * m_inactivatedNetFrame = nullptr; QVBoxLayout * m_inactivatedNetLayout = nullptr; QLabel * m_inactivatedNetLabel = nullptr; - QScrollArea * m_inactivatedNetListArea = nullptr; +// QScrollArea * m_inactivatedNetListArea = nullptr; + QWidget * m_inactivatedNetListArea = nullptr; QVBoxLayout * m_inactivatedAreaLayout = nullptr; Divider * m_inactivatedNetDivider = nullptr; diff --git a/src/frontend/tab-pages/wlanpage.cpp b/src/frontend/tab-pages/wlanpage.cpp index 1cfad847..83af8d2d 100644 --- a/src/frontend/tab-pages/wlanpage.cpp +++ b/src/frontend/tab-pages/wlanpage.cpp @@ -393,7 +393,7 @@ void WlanPage::deleteWirelessItemFormMap(QMap &wirele delete p_listWidgetItem; p_listWidgetItem = nullptr; - if (m_inactivatedNetListWidget->count() < MAX_ITEMS) { + if (m_inactivatedNetListWidget->count() <= MAX_ITEMS) { m_inactivatedNetListWidget->setFixedWidth(MIN_WIDTH); } return; @@ -484,7 +484,7 @@ void WlanPage::constructWirelessNetArea() qDebug() << "[WlanPage] Stopped loading wireless net list! time=" << QDateTime::currentDateTime().toString("hh:mm:ss.zzzz"); - if (m_inactivatedNetListWidget->count() < MAX_ITEMS) { + if (m_inactivatedNetListWidget->count() <= MAX_ITEMS) { m_inactivatedNetListWidget->setFixedWidth(MIN_WIDTH); } else { m_inactivatedNetListWidget->setFixedWidth(MAX_WIDTH); @@ -539,7 +539,7 @@ void WlanPage::onWlanAdded(QString interface, KyWirelessNetItem &item) updateWlanItemState(m_inactivatedNetListWidget, p_listWidgetItem, Deactivated); addWlanMoreItem(); - if (m_inactivatedNetListWidget->count() >= MAX_ITEMS) { + if (m_inactivatedNetListWidget->count() > MAX_ITEMS) { m_inactivatedNetListWidget->setFixedWidth(MAX_WIDTH); } return; @@ -866,7 +866,7 @@ void WlanPage::updateActivatedArea(QString uuid, QString ssid, QString devName) m_activateConnectionItemMap.insert(wirelessNetItem.m_NetSsid, p_listWidgetItem); m_activatedNetListWidget->setFixedHeight(p_listWidgetItem->sizeHint().height()); - if (m_inactivatedNetListWidget->count() < MAX_ITEMS) { + if (m_inactivatedNetListWidget->count() <= MAX_ITEMS) { m_inactivatedNetListWidget->setFixedWidth(MIN_WIDTH); } return; @@ -899,7 +899,7 @@ void WlanPage::updateWirelessNetArea(QString uuid, QString ssid, QString devName // 更新‘更多’条目,以保证其处于listwidget的最底部 addWlanMoreItem(); - if (m_inactivatedNetListWidget->count() < MAX_ITEMS) { + if (m_inactivatedNetListWidget->count() <= MAX_ITEMS) { m_inactivatedNetListWidget->setFixedWidth(MIN_WIDTH); } else { m_inactivatedNetListWidget->setFixedWidth(MAX_WIDTH); From 238b9bed7cd03e8bd98eb1466d3a9c7abd762a9b Mon Sep 17 00:00:00 2001 From: zhangyuanyuan1 Date: Mon, 15 Aug 2022 20:49:45 +0800 Subject: [PATCH 14/20] =?UTF-8?q?=E6=97=A0=E7=BA=BF=E7=BD=91=E7=BB=9C=20?= =?UTF-8?q?=E8=BF=9E=E6=8E=A5=E6=8C=89=E9=92=AE=E5=8F=98=E8=93=9D=E6=96=87?= =?UTF-8?q?=E5=AD=97=E9=9C=80=E5=8F=8D=E7=99=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/list-items/wlanlistitem.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/frontend/list-items/wlanlistitem.cpp b/src/frontend/list-items/wlanlistitem.cpp index 96b1aa15..b5b45011 100644 --- a/src/frontend/list-items/wlanlistitem.cpp +++ b/src/frontend/list-items/wlanlistitem.cpp @@ -620,6 +620,7 @@ void WlanListItem::setConnectButtonState() QPalette btnPal; if (m_connectButton->isEnabled()) { btnPal.setColor(QPalette::Button, ENABLE_BUTTON_COLOR); + btnPal.setColor(QPalette::ButtonText, Qt::white); m_connectButton->setPalette(btnPal); } else { btnPal.setColor(QPalette::Button, UNABLE_BUTTON_COLOR); From 6c2f2113aecd1da2ab18fae82c216b5fb704b6a9 Mon Sep 17 00:00:00 2001 From: zhangyuanyuan1 Date: Tue, 16 Aug 2022 16:57:30 +0800 Subject: [PATCH 15/20] Fixbug 122742 --- src/frontend/list-items/wlanlistitem.cpp | 31 ++++++++++++++++++++---- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/src/frontend/list-items/wlanlistitem.cpp b/src/frontend/list-items/wlanlistitem.cpp index 96b1aa15..29836a1e 100644 --- a/src/frontend/list-items/wlanlistitem.cpp +++ b/src/frontend/list-items/wlanlistitem.cpp @@ -448,13 +448,34 @@ void WlanListItem::onNetButtonClicked() return; } + //获取有配置网络的安全类型 + KyKeyMgmt type = m_wirelessConnectOperation->getConnectKeyMgmt(m_wirelessNetItem.m_connectUuid); + KySecuType kySecuType = NONE; + if (type == WpaNone || type == Unknown) { + kySecuType = NONE; + } else if (type == WpaPsk) { + kySecuType = WPA_AND_WPA2_PERSONAL; + } else if (type == SAE) { + kySecuType = WPA3_PERSONAL; + } else if (type == WpaEap) { + kySecuType = WPA_AND_WPA2_ENTERPRISE; + } else { + qDebug() << "KeyMgmt not support now " << type; + } + //有配置或者无密码的wifi直接连接 if (m_wirelessNetItem.m_isConfigured) { - m_wirelessConnectOperation->activeWirelessConnect(m_wlanDevice, m_wirelessNetItem.m_connectUuid); - qDebug()<<"[WlanListItem] Has configuration, will be activated. ssid = " - << m_wirelessNetItem.m_NetSsid << Q_FUNC_INFO << __LINE__; - m_netButton->startLoading(); - return; + if (m_wirelessNetItem.m_kySecuType == kySecuType) { + //安全类型不变直接连接 + m_wirelessConnectOperation->activeWirelessConnect(m_wlanDevice, m_wirelessNetItem.m_connectUuid); + qDebug()<<"[WlanListItem] Has configuration, will be activated. ssid = " + << m_wirelessNetItem.m_NetSsid << Q_FUNC_INFO << __LINE__; + m_netButton->startLoading(); + return; + } else { + //安全类型改变则删除连接 + m_wirelessConnectOperation->deleteWirelessConnect(m_wirelessNetItem.m_connectUuid); + } } if (!this->m_connectButton->isVisible() && m_wirelessNetItem.m_secuType != "") { From b435280184e358860837ea4f7c8393539d893160 Mon Sep 17 00:00:00 2001 From: zhangyuanyuan1 Date: Wed, 17 Aug 2022 10:25:29 +0800 Subject: [PATCH 16/20] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=E7=A7=BB=E5=8A=A8=E7=83=AD=E7=82=B9GHz?= =?UTF-8?q?=E5=8D=95=E4=BD=8D=E6=8B=BC=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/mobilehotspot/mobilehotspotwidget.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/mobilehotspot/mobilehotspotwidget.cpp b/plugins/mobilehotspot/mobilehotspotwidget.cpp index 69bad9a3..4d9aab55 100644 --- a/plugins/mobilehotspot/mobilehotspotwidget.cpp +++ b/plugins/mobilehotspot/mobilehotspotwidget.cpp @@ -538,8 +538,8 @@ void MobileHotspotWidget::setFreqBandFrame() m_freqBandComboBox->setInsertPolicy(QComboBox::NoInsert); m_freqBandComboBox->setMinimumWidth(COMBOBOX_MIN_WIDTH); m_freqBandComboBox->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed); - m_freqBandComboBox->addItem("2.4Ghz"); - m_freqBandComboBox->addItem("5Ghz"); + m_freqBandComboBox->addItem("2.4GHz"); + m_freqBandComboBox->addItem("5GHz"); freqBandHLayout->setContentsMargins(ITEM_MARGINS); freqBandHLayout->setSpacing(0); freqBandHLayout->addWidget(m_freqBandLabel); @@ -746,10 +746,10 @@ void MobileHotspotWidget::updateBandCombox() } QMap devCapMap = capReply.value(); if (devCapMap[m_interfaceName] & 0x02) { - m_freqBandComboBox->addItem("2.4Ghz"); + m_freqBandComboBox->addItem("2.4GHz"); } if (devCapMap[m_interfaceName] & 0x04) { - m_freqBandComboBox->addItem("5Ghz"); + m_freqBandComboBox->addItem("5GHz"); } } From b148c6e23df38803e59fc99785a11de3ab0a6fb9 Mon Sep 17 00:00:00 2001 From: chenxuechao Date: Thu, 18 Aug 2022 15:35:40 +0800 Subject: [PATCH 17/20] =?UTF-8?q?=E8=A7=A3=E5=86=B3BUG=20103974=20?= =?UTF-8?q?=E3=80=90=E5=8F=8D=E9=A6=88=E5=9B=9E=E5=BD=92=E3=80=91=E3=80=90?= =?UTF-8?q?=E6=97=A0=E7=BA=BF=E7=BD=91=E7=BB=9C=E3=80=91=E4=BD=BF=E7=94=A8?= =?UTF-8?q?ip=20link=20set=20down=20dev=20wlan0=E5=85=B3=E9=97=AD=E6=97=A0?= =?UTF-8?q?=E7=BA=BF=E8=AE=BE=E5=A4=87=E5=90=8E=EF=BC=8C=E6=97=A0=E7=BA=BF?= =?UTF-8?q?=E5=BC=80=E5=85=B3=E4=BB=8D=E7=84=B6=E6=98=AF=E6=89=93=E5=BC=80?= =?UTF-8?q?=E7=8A=B6=E6=80=81=EF=BC=8C=E6=97=A0=E6=97=A0=E7=BA=BF=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E3=80=82=E9=A1=BA=E5=B8=A6=E4=BF=AE=E6=94=B9=E6=97=A0?= =?UTF-8?q?=E7=BA=BF=E5=BC=80=E5=85=B3=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/wlanconnect/wlanconnect.cpp | 92 ++++++------ plugins/wlanconnect/wlanconnect.h | 32 +++- .../kylinnetworkdeviceresource.cpp | 5 + .../kylinnetworkdeviceresource.h | 1 + .../kylinnetworkresourcemanager.cpp | 3 + .../kylinnetworkresourcemanager.h | 2 + src/backend/dbusadaptor.cpp | 5 + src/backend/dbusadaptor.h | 4 + src/frontend/mainwindow.cpp | 8 + src/frontend/mainwindow.h | 3 + src/frontend/tab-pages/wlanpage.cpp | 138 +++++++----------- src/frontend/tab-pages/wlanpage.h | 36 ++++- 12 files changed, 191 insertions(+), 138 deletions(-) diff --git a/plugins/wlanconnect/wlanconnect.cpp b/plugins/wlanconnect/wlanconnect.cpp index 5ac940f7..e6f132c0 100644 --- a/plugins/wlanconnect/wlanconnect.cpp +++ b/plugins/wlanconnect/wlanconnect.cpp @@ -148,7 +148,6 @@ WlanConnect::~WlanConnect() ui = nullptr; } delete m_interface; - delete m_switchGsettings; } QString WlanConnect::plugini18nName() { @@ -224,10 +223,10 @@ bool WlanConnect::eventFilter(QObject *w, QEvent *e) { if (w == m_wifiSwitch) { if (e->type() == QMouseEvent::MouseButtonRelease) { - if (!m_wifiSwitch->isCheckable()) { + if (!getSwitchBtnEnable()) { showDesktopNotify(tr("No wireless network card detected")); } else { - m_interface->call(QStringLiteral("setWirelessSwitchEnable"), !m_wifiSwitch->isChecked()); + m_interface->call(QStringLiteral("setWirelessSwitchEnable"), !getSwitchBtnState()); return true; } } @@ -246,33 +245,18 @@ void WlanConnect::initComponent() { m_wifiSwitch->installEventFilter(this); //开关 - if (QGSettings::isSchemaInstalled(GSETTINGS_SCHEMA)) { - m_switchGsettings = new QGSettings(GSETTINGS_SCHEMA); - - setSwitchStatus(); - - connect(m_switchGsettings, &QGSettings::changed, this, [=] (const QString &key) { - if (key == WIRELESS_SWITCH) { - setSwitchStatus(); - } - }); - } else { - m_wifiSwitch->blockSignals(true); - m_wifiSwitch->setChecked(true); - m_wifiSwitch->blockSignals(false); - qDebug()<<"[netconnect] org.ukui.kylin-nm.switch is not installed!"; - } + initSwtichState(); //获取设备列表 getDeviceList(deviceList); if (deviceList.isEmpty()) { qDebug() << "[WlanConnect]no device exist when init, set switch disable"; - m_wifiSwitch->setChecked(false); - m_wifiSwitch->setCheckable(false); + setSwitchBtnState(false); + setSwitchBtnEnable(false); } initNet(); - if (!m_wifiSwitch->isChecked() || deviceList.isEmpty() || !m_interface->isValid()) { + if (!getSwitchBtnState() || deviceList.isEmpty() || !m_interface->isValid()) { hideLayout(ui->availableLayout); } @@ -288,7 +272,8 @@ void WlanConnect::initComponent() { // connect(m_interface, SIGNAL(signalStrengthChange(QString, QString, int)), this, SLOT(updateStrengthList(QString, QString, int))); //网卡name处理 connect(m_interface, SIGNAL(deviceNameChanged(QString, QString, int)), this, SLOT(onDeviceNameChanged(QString, QString, int)), Qt::QueuedConnection); - + connect(m_interface, SIGNAL(wirelessSwitchBtnChanged(bool)), this, SLOT(onSwitchBtnChanged(bool)), Qt::QueuedConnection); + connect(m_interface, SIGNAL(timeToUpdate()), this, SLOT(updateList()), Qt::QueuedConnection); //高级设置 connect(ui->detailBtn, &QPushButton::clicked, this, [=](bool checked) { @@ -320,7 +305,7 @@ void WlanConnect::reScan() //更新列表顺序 void WlanConnect::updateList() { - if (!m_wifiSwitch->isChecked()) { + if (!getSwitchBtnState()) { return; } qDebug() << "update list"; @@ -525,11 +510,11 @@ void WlanConnect::onDeviceStatusChanged() } deviceList = list; if (deviceList.isEmpty()) { - m_wifiSwitch->setChecked(false); - m_wifiSwitch->setCheckable(false); + setSwitchBtnState(false); + setSwitchBtnEnable(false); } else { - m_wifiSwitch->setCheckable(true); - setSwitchStatus(); + setSwitchBtnEnable(true); + initSwtichState(); } } @@ -558,10 +543,24 @@ void WlanConnect::onDeviceNameChanged(QString oldName, QString newName, int type } } +void WlanConnect::onSwitchBtnChanged(bool state) +{ + if (getSwitchBtnState() == state) { + return; + } + + setSwitchBtnState(state); + if (!getSwitchBtnState()) { + hideLayout(ui->availableLayout); + } else { + showLayout(ui->availableLayout); + } +} + //activeconnect status change void WlanConnect::onActiveConnectionChanged(QString deviceName, QString ssid, QString uuid, int status) { - if (!m_wifiSwitch->isChecked()) { + if (!getSwitchBtnState()) { return; } if (uuid.isEmpty()) { @@ -623,7 +622,7 @@ void WlanConnect::onActiveConnectionChanged(QString deviceName, QString ssid, QS void WlanConnect::onNetworkAdd(QString deviceName, QStringList wlanInfo) { qDebug()<<"[WlanConnect]onNetworkAdd "<< deviceName << " " << wlanInfo; - if(!m_wifiSwitch->isChecked() || deviceName.isEmpty()) { + if(!getSwitchBtnState() || deviceName.isEmpty()) { return; } @@ -693,25 +692,22 @@ void WlanConnect::getDeviceList(QStringList &list) list = map.keys(); } -//设置开关 -void WlanConnect::setSwitchStatus() +void WlanConnect::initSwtichState() { -// if (deviceList.size() == 0) { -// m_wifiSwitch->blockSignals(true); -// m_wifiSwitch->setChecked(false); -// m_wifiSwitch->blockSignals(false); -// return; -// } - bool status = m_switchGsettings->get(WIRELESS_SWITCH).toBool(); - qDebug() << "[WlanConnect]setSwitchStatus" << status; - m_wifiSwitch->blockSignals(true); - m_wifiSwitch->setChecked(status); - m_wifiSwitch->blockSignals(false); - if (!m_wifiSwitch->isChecked()) { - hideLayout(ui->availableLayout); - } else { - showLayout(ui->availableLayout); + if (!m_interface->isValid()) { + return; } + + QDBusMessage result = m_interface->call("getWirelessSwitchBtnState"); + qDebug() << "[WlanConnect]call getWirelessSwitchBtnState respond" << __LINE__; + if(result.type() == QDBusMessage::ErrorMessage) + { + qWarning() << "[WlanConnect]getWirelessSwitchBtnState error:" << result.errorMessage(); + return; + } + + bool state = result.arguments().at(0).toBool(); + setSwitchBtnState(state); } //初始化整体列表和单设备列表 @@ -731,7 +727,7 @@ void WlanConnect::initNet() { void WlanConnect::initNetListFromDevice(QString deviceName) { qDebug() << "[WlanConnect]initNetListFromDevice " << deviceName; - if (!m_wifiSwitch->isChecked()) { + if (!getSwitchBtnState()) { qDebug() << "[WlanConnect]initNetListFromDevice " << deviceName << " switch off"; return; } diff --git a/plugins/wlanconnect/wlanconnect.h b/plugins/wlanconnect/wlanconnect.h index 0a7800d5..8754219f 100644 --- a/plugins/wlanconnect/wlanconnect.h +++ b/plugins/wlanconnect/wlanconnect.h @@ -98,7 +98,6 @@ private: //开关相关 - void setSwitchStatus(); void hideLayout(QVBoxLayout * layout); void showLayout(QVBoxLayout * layout); @@ -124,6 +123,33 @@ private: //单个wifi连接状态变化 void itemActiveConnectionStatusChanged(WlanItem *item, int status); + + void initSwtichState(); + inline void setSwitchBtnEnable(bool state) { + if (m_wifiSwitch != nullptr) { + m_wifiSwitch->setCheckable(state); + } + } + inline bool getSwitchBtnEnable() { + if (m_wifiSwitch != nullptr) { + return m_wifiSwitch->isCheckable(); + } + } + + inline void setSwitchBtnState(bool state) { + if (m_wifiSwitch != nullptr) { + m_wifiSwitch->blockSignals(true); + m_wifiSwitch->setChecked(state); + m_wifiSwitch->blockSignals(false); + } + } + inline bool getSwitchBtnState() { + if (m_wifiSwitch != nullptr) { + return m_wifiSwitch->isChecked(); + } + } + + protected: bool eventFilter(QObject *w,QEvent *e); @@ -136,8 +162,6 @@ private: QDBusInterface *m_interface = nullptr; - QGSettings *m_switchGsettings = nullptr; - //设备列表 QStringList deviceList; //设备名 + 单设备frame @@ -162,6 +186,8 @@ private slots: void onDeviceStatusChanged(); void onDeviceNameChanged(QString, QString, int); + void onSwitchBtnChanged(bool); + void reScan(); diff --git a/src/backend/dbus-interface/kylinnetworkdeviceresource.cpp b/src/backend/dbus-interface/kylinnetworkdeviceresource.cpp index 64b034a6..67a80afa 100644 --- a/src/backend/dbus-interface/kylinnetworkdeviceresource.cpp +++ b/src/backend/dbus-interface/kylinnetworkdeviceresource.cpp @@ -26,6 +26,8 @@ KyNetworkDeviceResourse::KyNetworkDeviceResourse(QObject *parent) : QObject(parent) { + qRegisterMetaType("NetworkManager::Device::State"); + qRegisterMetaType("NetworkManager::Device::StateChangeReason"); m_networkResourceInstance = KyNetworkResourceManager::getInstance(); m_deviceMap.clear(); @@ -39,6 +41,9 @@ KyNetworkDeviceResourse::KyNetworkDeviceResourse(QObject *parent) : QObject(pare connect(m_networkResourceInstance, &KyNetworkResourceManager::deviceUpdate, this, &KyNetworkDeviceResourse::onDeviceUpdate, Qt::ConnectionType::DirectConnection); + connect(m_networkResourceInstance, &KyNetworkResourceManager::stateChanged, + this, &KyNetworkDeviceResourse::stateChanged, Qt::ConnectionType::DirectConnection); + connect(m_networkResourceInstance, &KyNetworkResourceManager::deviceCarrierChanage, this, &KyNetworkDeviceResourse::carrierChanage); connect(m_networkResourceInstance, &KyNetworkResourceManager::deviceBitRateChanage, diff --git a/src/backend/dbus-interface/kylinnetworkdeviceresource.h b/src/backend/dbus-interface/kylinnetworkdeviceresource.h index ffc012a2..01686efb 100644 --- a/src/backend/dbus-interface/kylinnetworkdeviceresource.h +++ b/src/backend/dbus-interface/kylinnetworkdeviceresource.h @@ -44,6 +44,7 @@ signals: void deviceBitRateChanage(QString deviceName, int bitRate); void deviceMacAddressChanage(QString deviceName, const QString &hwAddress); void deviceActiveChanage(QString deviceName, bool deivceActive); + void stateChanged(NetworkManager::Device::State newstate, NetworkManager::Device::State oldstate, NetworkManager::Device::StateChangeReason reason); public slots: void onDeviceAdd(QString deviceName, QString uni, NetworkManager::Device::Type deviceType); diff --git a/src/backend/dbus-interface/kylinnetworkresourcemanager.cpp b/src/backend/dbus-interface/kylinnetworkresourcemanager.cpp index a6c2ada7..f45cddc0 100644 --- a/src/backend/dbus-interface/kylinnetworkresourcemanager.cpp +++ b/src/backend/dbus-interface/kylinnetworkresourcemanager.cpp @@ -50,6 +50,8 @@ KyNetworkResourceManager::KyNetworkResourceManager(QObject *parent) : QObject(pa qRegisterMetaType("NetworkManager::Connectivity"); qRegisterMetaType("NetworkManager::ActiveConnection::Reason"); qRegisterMetaType("NetworkManager::Device::Type"); + qRegisterMetaType("NetworkManager::Device::State"); + qRegisterMetaType("NetworkManager::Device::StateChangeReason"); QDBusConnection::systemBus().connect(QString("org.freedesktop.DBus"), QString("/org/freedesktop/DBus"), @@ -264,6 +266,7 @@ void KyNetworkResourceManager::addDevice(NetworkManager::Device::Ptr device) #endif connect(qobject_cast(device.data()), &NetworkManager::WirelessDevice::networkAppeared, this, &KyNetworkResourceManager::onWifiNetworkAppeared); connect(qobject_cast(device.data()), &NetworkManager::WirelessDevice::networkDisappeared, this, &KyNetworkResourceManager::onWifiNetworkDisappeared); + connect(device.data(), &NetworkManager::Device::stateChanged, this, &KyNetworkResourceManager::stateChanged); break; default: //TODO: other device types! diff --git a/src/backend/dbus-interface/kylinnetworkresourcemanager.h b/src/backend/dbus-interface/kylinnetworkresourcemanager.h index 14e4ec27..aa89d00d 100644 --- a/src/backend/dbus-interface/kylinnetworkresourcemanager.h +++ b/src/backend/dbus-interface/kylinnetworkresourcemanager.h @@ -137,6 +137,8 @@ signals: NetworkManager::VpnConnection::StateChangeReason reason); void connectivityChanged(NetworkManager::Connectivity connectivity); + void stateChanged(NetworkManager::Device::State newstate, NetworkManager::Device::State oldstate, NetworkManager::Device::StateChangeReason reason); + public slots: void onInitNetwork(); diff --git a/src/backend/dbusadaptor.cpp b/src/backend/dbusadaptor.cpp index 09882fdd..47129adf 100644 --- a/src/backend/dbusadaptor.cpp +++ b/src/backend/dbusadaptor.cpp @@ -50,6 +50,11 @@ QMap > DbusAdaptor::getWirelessList() return map; } +bool DbusAdaptor::getWirelessSwitchBtnState() +{ + return parent()->getWirelessSwitchBtnState(); +} + //有线列表 QMap> DbusAdaptor::getWiredList() { diff --git a/src/backend/dbusadaptor.h b/src/backend/dbusadaptor.h index 56f6ccb7..6cb0f411 100644 --- a/src/backend/dbusadaptor.h +++ b/src/backend/dbusadaptor.h @@ -92,6 +92,9 @@ public Q_SLOTS: // METHODS void keyRingClear(); //just show void showKylinNM(int type); + + bool getWirelessSwitchBtnState(); + Q_SIGNALS: // SIGNALS // void wirelessActivating(QString devName, QString ssid); // void wiredActivating(QString devName, QString ssid); @@ -108,6 +111,7 @@ Q_SIGNALS: // SIGNALS //设备插拔 void deviceStatusChanged(); void deviceNameChanged(QString oldName, QString newName, int type); + void wirelessSwitchBtnChanged(bool state); //热点断开 void hotspotDeactivated(QString devName, QString ssid); //热点连接 diff --git a/src/frontend/mainwindow.cpp b/src/frontend/mainwindow.cpp index 558b5231..a7cc6c7d 100644 --- a/src/frontend/mainwindow.cpp +++ b/src/frontend/mainwindow.cpp @@ -327,6 +327,7 @@ void MainWindow::initDbusConnnect() connect(m_lanWidget, &LanPage::deviceNameChanged, this, &MainWindow::deviceNameChanged); connect(m_wlanWidget, &WlanPage::deviceStatusChanged, this, &MainWindow::deviceStatusChanged); connect(m_wlanWidget, &WlanPage::deviceNameChanged, this, &MainWindow::deviceNameChanged); + connect(m_wlanWidget, &WlanPage::wirelessSwitchBtnChanged, this, &MainWindow::wirelessSwitchBtnChanged); connect(m_wlanWidget, &WlanPage::activateFailed, this, &MainWindow::activateFailed); connect(m_wlanWidget, &WlanPage::deactivateFailed, this, &MainWindow::deactivateFailed); @@ -704,6 +705,13 @@ void MainWindow::getWirelessList(QMap > &map) } } +bool MainWindow::getWirelessSwitchBtnState() +{ + if (nullptr != m_wlanWidget) { + return m_wlanWidget->getWirelessSwitchBtnState(); + } +} + /** * @brief MainWindow::getWiredList 获取lan列表,供dbus调用 * @param map diff --git a/src/frontend/mainwindow.h b/src/frontend/mainwindow.h index 0a5fd198..b1e3ac57 100644 --- a/src/frontend/mainwindow.h +++ b/src/frontend/mainwindow.h @@ -106,11 +106,14 @@ public: void keyRingInit(); void keyRingClear(); + bool getWirelessSwitchBtnState(); + signals: //设备插拔 void deviceStatusChanged(); //设备名称变化 void deviceNameChanged(QString oldName, QString newName, int type); + void wirelessSwitchBtnChanged(bool state); //有线无线列表更新(有线增删、无线增加减少) void lanAdd(QString devName, QStringList info); void lanRemove(QString dbusPath); diff --git a/src/frontend/tab-pages/wlanpage.cpp b/src/frontend/tab-pages/wlanpage.cpp index 1cfad847..b2ffaa94 100644 --- a/src/frontend/tab-pages/wlanpage.cpp +++ b/src/frontend/tab-pages/wlanpage.cpp @@ -37,6 +37,8 @@ const QString IsApConnection = "1"; WlanPage::WlanPage(QWidget *parent) : TabPage(parent) { + qRegisterMetaType("NetworkManager::Device::State"); + qRegisterMetaType("NetworkManager::Device::StateChangeReason"); m_wirelessNetResource = new KyWirelessNetResource(this); m_activatedConnectResource = new KyActiveConnectResourse(this); m_netDeviceResource=new KyNetworkDeviceResourse(this); @@ -67,6 +69,8 @@ WlanPage::WlanPage(QWidget *parent) : TabPage(parent) connect(m_netDeviceResource, &KyNetworkDeviceResourse::deviceRemove, this, &WlanPage::onDeviceRemove); connect(m_netDeviceResource, &KyNetworkDeviceResourse::deviceNameUpdate, this, &WlanPage::onDeviceNameUpdate); + connect(m_netDeviceResource, &KyNetworkDeviceResourse::stateChanged, this, &WlanPage::onWlanStateChanged); + connect(m_wirelessConnectOpreation, &KyWirelessConnectOperation::activateConnectionError, this, &WlanPage::activateFailed); connect(m_wirelessConnectOpreation, &KyWirelessConnectOperation::addAndActivateConnectionError, this, &WlanPage::activateFailed); connect(m_wirelessConnectOpreation, &KyWirelessConnectOperation::deactivateConnectionError, this, &WlanPage::deactivateFailed); @@ -86,13 +90,11 @@ bool WlanPage::eventFilter(QObject *w, QEvent *e) } } else if (w == m_netSwitch) { if (e->type() == QEvent::MouseButtonRelease) { - if (m_devList.isEmpty()) { + if (!getSwitchBtnEnable()) { showDesktopNotify(tr("No wireless network card detected"), "networkwrong"); //检测不到无线网卡不再触发click信号 - m_netSwitch->setChecked(false); - m_netSwitch->setCheckable(false); } else { - m_wirelessConnectOpreation->setWirelessEnabled(!m_netSwitch->isChecked()); + setWirelessEnable(!getSwitchBtnState()); } return true; } @@ -136,47 +138,37 @@ void WlanPage::initWlanUI() m_netSwitch->installEventFilter(this); } - -void WlanPage::onWlanSwithGsettingsChanged(const QString &key) +bool WlanPage::getWirelessDevieceUseable() { - if (key == WIRELESS_SWITCH) { - m_wlanSwitchEnable = m_switchGsettings->get(WIRELESS_SWITCH).toBool(); - qDebug() << LOG_FLAG << "wlan switch state" << m_wlanSwitchEnable; - - if (m_wirelessConnectOpreation->getWirelessEnabled() != m_wlanSwitchEnable) { - // 根据Gsetting更新开关状态 - m_wirelessConnectOpreation->setWirelessEnabled(m_wlanSwitchEnable); + for (auto devname : m_devList) { + if (m_netDeviceResource->getDeviceState(devname) >= NetworkManager::Device::Disconnected) { + return true; } - - m_netSwitch->setChecked(m_wlanSwitchEnable); - initDeviceCombox(); - initWlanArea(); } + return false; +} + +void WlanPage::setWirelessEnable(bool state) +{ + m_wirelessConnectOpreation->setWirelessEnabled(state); + return; +} + +bool WlanPage::getWirelessEnable() +{ + return m_wirelessConnectOpreation->getWirelessEnabled(); } void WlanPage::initWlanSwitchState() { - bool wirelessGsetting = true; - if (QGSettings::isSchemaInstalled(GSETTINGS_SCHEMA)) { - m_switchGsettings = new QGSettings(GSETTINGS_SCHEMA); - if (m_switchGsettings->keys().contains(WIRELESS_SWITCH)) { - if (m_devList.isEmpty()) { - m_netSwitch->setChecked(false); - m_netSwitch->setCheckable(false); - } else { - wirelessGsetting = m_switchGsettings->get(WIRELESS_SWITCH).toBool(); - if (m_wirelessConnectOpreation->getWirelessEnabled() - != wirelessGsetting) { - //以gsetting为准 - m_wirelessConnectOpreation->setWirelessEnabled(wirelessGsetting); - } - m_netSwitch->setChecked(wirelessGsetting); - } - connect(m_switchGsettings, &QGSettings::changed, this, &WlanPage::onWlanSwithGsettingsChanged); - } + if (m_devList.isEmpty()) { + setSwitchBtnState(false); + setSwitchBtnEnable(false); + return ; } - m_netSwitch->setChecked(wirelessGsetting); - m_wlanSwitchEnable = wirelessGsetting; + + setSwitchBtnEnable(true); + setSwitchBtnState(getWirelessDevieceUseable()); return; } @@ -209,7 +201,7 @@ void WlanPage::initDeviceCombox() this, &WlanPage::onDeviceComboxIndexChanged); m_deviceComboBox->clear(); - if (m_netSwitch->isChecked()) { + if (getSwitchBtnState()) { if (0 == m_devList.count()) { m_deviceFrame->show(); m_tipsLabel->show(); @@ -494,7 +486,7 @@ void WlanPage::constructWirelessNetArea() void WlanPage::initWlanArea() { - if (m_netSwitch->isChecked()) { + if (getSwitchBtnState()) { m_activatedNetFrame->show(); m_activatedNetDivider->show(); constructActivateConnectionArea(); @@ -656,7 +648,7 @@ void WlanPage::addDeviceToCombox(QString deviceName) { disconnect(m_deviceComboBox, QOverload::of(&QComboBox::currentIndexChanged), this, &WlanPage::onDeviceComboxIndexChanged); - if (m_netSwitch->isChecked()) { + if (getSwitchBtnState()) { if (m_currentDevice.isEmpty()){ m_deviceFrame->hide(); m_currentDevice = deviceName; @@ -688,13 +680,10 @@ void WlanPage::onDeviceAdd(QString deviceName, NetworkManager::Device::Type devi return; } - if (m_devList.isEmpty()) { - bool wlanSwitch = m_switchGsettings->get(WIRELESS_SWITCH).toBool(); - m_netSwitch->setCheckable(true); - m_netSwitch->setChecked(wlanSwitch); - } - m_devList << deviceName; + setSwitchBtnEnable(true); + setSwitchBtnState(getWirelessDevieceUseable()); + addDeviceToCombox(deviceName); if (m_currentDevice == deviceName) { initWlanArea(); @@ -710,7 +699,7 @@ void WlanPage::deleteDeviceFromCombox(QString deviceName) disconnect(m_deviceComboBox, QOverload::of(&QComboBox::currentIndexChanged), this, &WlanPage::onDeviceComboxIndexChanged); - if (m_netSwitch->isChecked()) { + if (getSwitchBtnState()) { if (0 == m_devList.count()) { m_deviceFrame->hide(); //m_tipsLabel->show(); @@ -751,8 +740,8 @@ void WlanPage::onDeviceRemove(QString deviceName) deleteDeviceFromCombox(deviceName); if (m_devList.isEmpty()) { - m_netSwitch->setChecked(false); - m_netSwitch->setCheckable(false); + setSwitchBtnState(false); + setSwitchBtnEnable(false); } if (originalDeviceName == deviceName) { @@ -799,6 +788,17 @@ void WlanPage::onDeviceNameUpdate(QString oldName, QString newName) emit deviceNameChanged(oldName, newName, WIRELESS); } +void WlanPage::onWlanStateChanged(NetworkManager::Device::State newstate, NetworkManager::Device::State oldstate, NetworkManager::Device::StateChangeReason reason) +{ + if (getSwitchBtnState() == getWirelessDevieceUseable()) { + return ; + } + setSwitchBtnState(getWirelessDevieceUseable()); + initDeviceCombox(); + initWlanArea(); + emit wirelessSwitchBtnChanged(getSwitchBtnState()); +} + void WlanPage::sendApStateChangeSignal(QString uuid, QString ssid, QString deviceName, @@ -1109,23 +1109,6 @@ void WlanPage::onWifiEnabledChanged(bool isWifiOn) { //监听外部命令导致wifi状态变化,更新界面 qDebug() << "[WlanPage] onWifiEnabledChanged wifi state" << isWifiOn; - isWifiOn = m_wirelessConnectOpreation->getWirelessEnabled(); - - //应该先检测是否有无线网卡可用,才改变开关状态 - if (m_devList.isEmpty()) { - qDebug() << "[WLanPage] have no device to use " << Q_FUNC_INFO << __LINE__; - return; - } - - if (m_wlanSwitchEnable == isWifiOn) { - return; - } else { -// if (!m_netSwitch->isChecked()) { -// m_netSwitch->setChecked(true); -// } - m_switchGsettings->set(WIRELESS_SWITCH, isWifiOn); - } - return; } @@ -1297,6 +1280,12 @@ void WlanPage::getWirelessList(QMap > &map) return; } +//for dbus +bool WlanPage::getWirelessSwitchBtnState() +{ + return getSwitchBtnState(); +} + //开启热点 void WlanPage::activeWirelessAp(const QString apName, const QString apPassword, const QString wirelessBand, const QString apDevice) { @@ -1489,22 +1478,7 @@ bool WlanPage::checkWlanStatus(NetworkManager::ActiveConnection::State state) void WlanPage::setWirelessSwitchEnable(bool enable) { qDebug() << "dbus setWirelessSwitchEnable = " << enable << __LINE__; - //应该先检测是否有无线网卡可用,才改变开关状态 - if (m_devList.isEmpty()) { - qDebug() << "have no device to use " << Q_FUNC_INFO << __LINE__; - //检测不到无线网卡不再触发click信号 - m_netSwitch->setChecked(false); - m_netSwitch->setCheckable(false); - }else{ - m_wirelessConnectOpreation->setWirelessEnabled(enable); - if (!enable) { - m_netSwitch->setChecked(false); - m_activatedNetFrame->hide(); - m_activatedNetDivider->hide(); - m_inactivatedNetFrame->hide(); - m_deviceFrame->hide(); - } - } + setWirelessEnable(enable); } void WlanPage::getWirelessDeviceCap(QMap &map) diff --git a/src/frontend/tab-pages/wlanpage.h b/src/frontend/tab-pages/wlanpage.h index 7615bae0..c4ee3d38 100644 --- a/src/frontend/tab-pages/wlanpage.h +++ b/src/frontend/tab-pages/wlanpage.h @@ -76,6 +76,8 @@ public: void getConnectivity(NetworkManager::Connectivity &connectivity); + bool getWirelessSwitchBtnState(); + signals: void oneItemExpanded(const QString &ssid); void wlanAdd(QString devName, QStringList info); @@ -93,6 +95,8 @@ signals: void connectivityChanged(NetworkManager::Connectivity connectivity); + void wirelessSwitchBtnChanged(bool state); + public slots: void onMainWindowVisibleChanged(const bool &visible); void onSecurityTypeChange(QString devName, QString ssid, QString secuType); @@ -115,14 +119,14 @@ private slots: NetworkManager::ActiveConnection::Reason reason); void onItemHeightChanged(const bool isExpanded, const QString &ssid); - void onWlanSwithGsettingsChanged(const QString &key); - void onDeviceComboxIndexChanged(int currentIndex); void onHiddenWlanClicked(); void showControlCenter(); void onWifiEnabledChanged(bool isWifiOn); void onRefreshIconTimer(); + void onWlanStateChanged(NetworkManager::Device::State newstate, NetworkManager::Device::State oldstate, NetworkManager::Device::StateChangeReason reason); + protected: bool eventFilter(QObject *watched, QEvent *event); @@ -174,6 +178,31 @@ private: // void wlanShowNotify(QString ssid, NetworkManager::ActiveConnection::State state, // NetworkManager::ActiveConnection::Reason reason); + //是否存在可用的无线网卡 + bool getWirelessDevieceUseable(); + void setWirelessEnable(bool state); + bool getWirelessEnable(); + inline void setSwitchBtnState(bool state) { + if (m_netSwitch != nullptr) { + m_netSwitch->setChecked(state); + } + } + inline bool getSwitchBtnState() { + if (m_netSwitch != nullptr) { + return m_netSwitch->isChecked(); + } + } + inline void setSwitchBtnEnable(bool state) { + if (m_netSwitch != nullptr) { + m_netSwitch->setCheckable(state); + } + } + inline bool getSwitchBtnEnable() { + if (m_netSwitch != nullptr) { + return m_netSwitch->isCheckable(); + } + } + private: QMap m_wirelessNetItemMap; QMap m_activateConnectionItemMap; @@ -195,9 +224,6 @@ private: KyWirelessConnectOperation * m_wirelessConnectOpreation = nullptr; KyConnectResourse * m_connectResource = nullptr; - QGSettings *m_switchGsettings = nullptr; - bool m_wlanSwitchEnable = true; - bool m_updateStrength = true; QTimer *m_scanTimer = nullptr; From c0f3e3320f0f574f3c78139a1abf1877a958804b Mon Sep 17 00:00:00 2001 From: chenxuechao Date: Fri, 19 Aug 2022 17:39:01 +0800 Subject: [PATCH 18/20] =?UTF-8?q?=E8=A7=A3=E5=86=B3BUG=20126700=20?= =?UTF-8?q?=E3=80=90WIFI=E3=80=91=E5=9C=A8=E7=BD=91=E7=BB=9C=E9=AB=98?= =?UTF-8?q?=E7=BA=A7=E8=AE=BE=E7=BD=AE=E4=B8=AD=E8=BF=9E=E6=8E=A5=E6=97=A0?= =?UTF-8?q?=E7=BA=BF=E7=BD=91=E7=BB=9C=E5=90=8E=EF=BC=8C=E6=96=AD=E5=BC=80?= =?UTF-8?q?=E8=AF=A5=E6=97=A0=E7=BA=BF=E7=BD=91=E7=BB=9C=EF=BC=8C=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E6=A0=8F=E6=97=A0=E7=BA=BF=E5=88=97=E8=A1=A8=E8=AF=A5?= =?UTF-8?q?=E6=97=A0=E7=BA=BF=E7=BD=91=E7=BB=9C=E4=BB=8D=E7=84=B6=E5=A4=84?= =?UTF-8?q?=E4=BA=8E=E6=96=AD=E5=BC=80=E5=8A=A0=E8=BD=BD=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/list-items/wlanlistitem.cpp | 5 +++++ src/frontend/list-items/wlanlistitem.h | 1 + src/frontend/tab-pages/wlanpage.cpp | 28 +++++++++++++++++++----- 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/src/frontend/list-items/wlanlistitem.cpp b/src/frontend/list-items/wlanlistitem.cpp index 96b1aa15..41309099 100644 --- a/src/frontend/list-items/wlanlistitem.cpp +++ b/src/frontend/list-items/wlanlistitem.cpp @@ -79,6 +79,11 @@ QString WlanListItem::getSsid() return m_wirelessNetItem.m_NetSsid; } +QString WlanListItem::getUuid() +{ + return m_wirelessNetItem.m_connectUuid; +} + void WlanListItem::setSignalStrength(const int &signal) { m_wirelessNetItem.m_signalStrength = signal; diff --git a/src/frontend/list-items/wlanlistitem.h b/src/frontend/list-items/wlanlistitem.h index b37c4175..e8acc822 100644 --- a/src/frontend/list-items/wlanlistitem.h +++ b/src/frontend/list-items/wlanlistitem.h @@ -59,6 +59,7 @@ public: public: QString getSsid(); + QString getUuid(); void setSignalStrength(const int &signal); int getSignalStrength(); diff --git a/src/frontend/tab-pages/wlanpage.cpp b/src/frontend/tab-pages/wlanpage.cpp index b2ffaa94..af673247 100644 --- a/src/frontend/tab-pages/wlanpage.cpp +++ b/src/frontend/tab-pages/wlanpage.cpp @@ -879,10 +879,22 @@ void WlanPage::updateWirelessNetArea(QString uuid, QString ssid, QString devName } if (m_activateConnectionItemMap.contains(ssid)) { - deleteWirelessItemFormMap(m_activateConnectionItemMap, m_activatedNetListWidget, ssid); - QListWidgetItem *p_activeListWidgetItem = addEmptyItem(m_activatedNetListWidget); - m_activateConnectionItemMap.insert(EMPTY_SSID, p_activeListWidgetItem); - m_activatedNetListWidget->setFixedHeight(p_activeListWidgetItem->sizeHint().height()); + QListWidgetItem *p_listWidgetItem = m_activateConnectionItemMap.value(ssid); + if (nullptr == p_listWidgetItem) { + qWarning()<< LOG_FLAG <<"wireless item is not exsit, it's ssid is " << ssid; + return; + } + WlanListItem *p_wlanItem = (WlanListItem *)m_activatedNetListWidget->itemWidget(p_listWidgetItem); + if (nullptr == p_wlanItem) { + qWarning() << LOG_FLAG << "p_wlanItem is null"; + return; + } + if (p_wlanItem->getUuid() == uuid) { + deleteWirelessItemFormMap(m_activateConnectionItemMap, m_activatedNetListWidget, ssid); + QListWidgetItem *p_activeListWidgetItem = addEmptyItem(m_activatedNetListWidget); + m_activateConnectionItemMap.insert(EMPTY_SSID, p_activeListWidgetItem); + m_activatedNetListWidget->setFixedHeight(p_activeListWidgetItem->sizeHint().height()); + } } else { qDebug() << LOG_FLAG << ssid << "is not in activeconnection map"; } @@ -918,7 +930,8 @@ void WlanPage::onConnectionStateChanged(QString uuid, qDebug()<< LOG_FLAG << "emit wlanActiveConnectionStateChanged" << devName << ssid << state; emit wlanActiveConnectionStateChanged(devName, ssid, uuid, state); - if (ssid.isEmpty() || devName.isEmpty()) { + //解决通过高级设置添加的未指定网卡的无线连接无法断开的问题,去掉设备为空的判断 + if (ssid.isEmpty()) { qDebug()<< LOG_FLAG << "ssid or devicename is empty" << "devicename"<< devName <<"ssid"< Date: Wed, 7 Sep 2022 10:38:49 +0800 Subject: [PATCH 19/20] =?UTF-8?q?fix=20bug=20132182=20=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E5=86=85=E8=BE=B9=E8=B7=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/netdetails/detailpage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/netdetails/detailpage.cpp b/src/frontend/netdetails/detailpage.cpp index 7b1727f6..fb9e6e76 100644 --- a/src/frontend/netdetails/detailpage.cpp +++ b/src/frontend/netdetails/detailpage.cpp @@ -141,7 +141,7 @@ void DetailPage::newCopiedTip() //设置“复制成功”消息弹窗格式 m_copiedTip = new KBallonTip(); m_copiedTip->setTipType(Normal); - m_copiedTip->setContentsMargins(16, 0, 16, 0); + m_copiedTip->setContentsMargins(16, 14, 16, 14); m_copiedTip->setFixedHeight(48); m_copiedTip->setWindowFlags(Qt::FramelessWindowHint); m_copiedTip->setAttribute(Qt::WA_TranslucentBackground, true); From 548327bc8cc9d547a9eb536f44e285e097cd5131 Mon Sep 17 00:00:00 2001 From: chenxuechao Date: Fri, 16 Sep 2022 11:06:06 +0800 Subject: [PATCH 20/20] =?UTF-8?q?=E4=BF=AE=E6=94=B9BUG=20140629=EF=BC=8C?= =?UTF-8?q?=E3=80=90=E6=97=A0=E7=BA=BF=E5=B1=80=E5=9F=9F=E7=BD=91=E3=80=91?= =?UTF-8?q?=E6=9C=AA=E8=97=8F=E6=96=87=E5=8C=96=EF=BC=9A=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E6=A0=8F=E6=89=93=E5=BC=80=E6=97=A0=E7=BA=BF=E5=B1=80=E5=9F=9F?= =?UTF-8?q?=E7=BD=91=EF=BC=8C=E5=8A=A0=E5=85=A5=E5=85=B6=E4=BB=96=E7=BD=91?= =?UTF-8?q?=E7=BB=9C=EF=BC=8C=E2=80=9D=E8=AE=B0=E4=BD=8F=E8=AF=A5=E7=BD=91?= =?UTF-8?q?=E7=BB=9C=E2=80=9C=E6=98=BE=E7=A4=BA=E4=B8=BA=E8=8B=B1=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- translations/kylin-nm_bo.ts | 437 +++++++++++++++++--------------- translations/kylin-nm_bo_CN.qm | Bin 16836 -> 16851 bytes translations/kylin-nm_bo_CN.ts | 311 +++++++++++++---------- translations/kylin-nm_tr.ts | 441 ++++++++++++++++++--------------- translations/kylin-nm_zh_CN.qm | Bin 10575 -> 10503 bytes translations/kylin-nm_zh_CN.ts | 310 +++++++++++++---------- 6 files changed, 837 insertions(+), 662 deletions(-) diff --git a/translations/kylin-nm_bo.ts b/translations/kylin-nm_bo.ts index d4c86dc2..fa557feb 100644 --- a/translations/kylin-nm_bo.ts +++ b/translations/kylin-nm_bo.ts @@ -158,17 +158,27 @@ EnterpriseWlanDialog - - Connect Enterprise WLAN + + Wi-Fi network requires authentication - + + Access to Wi-Fi network " + + + + + " requires a password or encryption key. + + + + Cancel - + Connect @@ -239,23 +249,23 @@ - + Invalid address - + Invalid subnet mask - - + + Required - + Address conflict @@ -263,64 +273,64 @@ Ipv6Page - + Ipv6Config - + Address - + Subnet prefix Length - + Default Gateway - + Prefs DNS - + Alternative DNS - + Auto(DHCP) - + Manual - - - + + + Required - + Invalid address - + Invalid gateway - + Address conflict @@ -328,42 +338,37 @@ JoinHiddenWiFiPage - + Please enter the network name and security type - + Network name(SSID) - - Remember the Network - - - - + Show Network List - + Cancel - + Join - + Required - + Find and Join Wi-Fi @@ -396,27 +401,27 @@ LanPage - + No ethernet device avaliable - + LAN - + Activated LAN - + Inactivated LAN - + Wired Device not carried @@ -470,107 +475,107 @@ NetDetail - + Kylin NM - + kylin network desktop message - + Detail - + Ipv4 - + Ipv6 - + Security - - + + Config - + Confirm - + Cancel - + Forget this network - + Add Lan Connect - + connect hiddin wlan - - - + + + None - - - + + + Auto - + + start check ipv4 address conflict + + + + start check ipv6 address conflict - - ipv6 address conflict! - - - - + this wifi no support enterprise type - + this wifi no support None type - + this wifi no support WPA2 type - + this wifi no support WPA3 type @@ -594,164 +599,169 @@ SecurityPage - - Security - - - - - - Password - - - - - EAP type - - - - - Identity - - - - - Domain - - - - - CA certficate - - - - - no need for CA certificate - - - - - User certificate - - - - - User private key - - - - - User key password - - - - - Password options - - - - - - - Required - - - - - Ineer authentication - - - - - Usename - - - - - Ask pwd each query - - - - - - - - - - - - - None - - - - - WPA&WPA2 Personal + + Remember the Network - WPA&WPA2 Enterprise + Security - WPA3 Personal + + Password + + + + + EAP type + + + + + Identity + + + + + Domain + CA certficate + + + + + no need for CA certificate + + + + + User certificate + + + + User private key + + + + + User key password + + + + + Password options + + + + + + Required + + + + + Ineer authentication + + + + + Usename + + + + + Ask pwd each query + + + + + + + + + + + + + None + + + + + WPA&WPA2 Personal + + + + + WPA&WPA2 Enterprise + + + + + WPA3 Personal + + + + + + Choose from file... - + Store passwords only for this user - + Store password only for this user - + Store passwords for all users - + Store password for all users - + Ask this password every time - + Ask password every time - - - + + + Choose a CA certificate - - - + + + CA Files (*.pem *.der *.p12 *.crt *.cer *.pfx) - + @@ -769,21 +779,39 @@ - + Settings - + Kylin NM - + kylin network applet desktop message + + VpnPage + + + Activated VPN + + + + + Inactivated VPN + + + + + Wired Device not carried + + + WiFiConfigDialog @@ -830,31 +858,31 @@ WlanListItem - + Not connected - - + + Disconnect - - - + + + Connect - - + + Forget - + Auto Connect @@ -870,32 +898,32 @@ WlanPage - + WLAN - + Activated WLAN - + Other WLAN - + No wireless network card detected - + WLAN Connected Successfully - + WLAN Disconnected Successfully @@ -903,19 +931,32 @@ main - + kylinnm - + show kylin-nm wifi page - + show kylin-nm lan page + + vpnMainWindow + + + kylin-vpn + + + + + vpn tool + + + diff --git a/translations/kylin-nm_bo_CN.qm b/translations/kylin-nm_bo_CN.qm index 3aa60f20cc47f23d67945bc0b99de54730f628ea..fb2d4979066ae34057acb20e13710f0c9910f50b 100644 GIT binary patch delta 1349 zcmXYxdr(w$6vw}py_dar_wHVKtQ(JIm4~XFj-GFMB>iEwTFZz~hB9Cf! zS=aM&Nf>P?;#W=g0s1aJ>vb!Mb)P@d90eqN!8bTQrSy{-=NB@XC;9iXr-22F_?Gt{ z5-;(sm3gGeLB2DEM7Q?xSL{~+^?63W->6qTfc;HDZ~B~?8Y$Sf?1K~P3aVTXvs&BKp=4?3-Q=$H#_BzeeIY!0A=-(pB6?ALFn3%NdZ$Q^9+Vq=%B)iz?+(~I? zF#45%RlB@!~D-xoj!( z0u61KR6j&%8^@&9?)^Y|veb5z);{;7K9Lw%E)6Hn&Wu)})fe`>r z8ok3!1&lK)?=S`=Xfjo=0`qQb9y_?4?yu53^S}ldf+oBM?75nvufL+kysX*oq|D|2 z8Pvqqc3I=CG;mULxqFoKYtZz5IPVx^V5Bzdco&eiMqAXpn&x*+U*o5Q~rc2p-*9!(H0;Nt))p#*ew5*Lw?;gohkM$Qur-K)Cm-lT1f~>mx{9c-%clF$;K<~x|y=)$)_dw8Rv{MU~?b7Go z+(eaj=qpw9jwm^d{-gREGo)Zjs}jFw3GKU}JbvpAwFb($l>^keG^OpsNQ!$%X$zS% zLf0{eZCJUfYoZD!pQXmPd%}eQ+4H==Bzyh{6E*G~meL5DvP01-E0r8CS19eui?l8v z&o*K%{kFM%tPalR&bCH+ez4pX>6qSK8Rm5FU+VAaPpntF3&M+3xi9SYJegXo{tsg= BV$1*l delta 1520 zcmXYxc}x^{6vw~g&g{3n|FNQ`^}Ga z+~qoMd!Wn41HybDF#^cF3rP2XyhT7zIb(1s`1*FhvK#zQ4M6z$x4Z{IvkM5#B{mXk zAo%_V`?`bp zsHhEyTZb>KA%H#;y~b=>Kf^#;f(wX-(CjNUUjvHUFH{f5gs zwwvBJa1D(C)zx+1^x~g7K^#XXOOufFOp8UGir*G42=;o^Xy?+BHJ<_;LvmR2#<274b zKLnz)HJ{f%pn*Kes5CK}Y@%FCfx00*5;Bb{hm<;W@%NpKvRE2YV4*; z{1;2@ogV}C@zSXsv>r7mT@i`anNm;OD;mB-(&KhokKZf}4%0dy{kORnK#SJka8m(~ z8Ak^*noej_RqFxcGVSy&lgU4{i(khBV_bKck^G*vq`e!X3|AOQb41T(fgn-bI(~|O0urxcm^pHuWR1h1;jqrwe6-W zJ}!VU=B2LN;sIQmw}#g~w&8O}p7!JdkYbnX^^~Dk52LR?V?ZZk%n`XEXde)eD>p^g z0WnGP{uxdRbXY#eRRO_$jPccS_Y4}|iRa}0S+sAMuQx{@Af+Sq<^>1n{s;EyKPjgJ zDYx|dqV4oyi~iDv*(8mheu!U1L$$)d-52P`6J(G>dPt$?hN&IYg2Y9Jg1$LaX|thD zwTo`YO-9oq!ym6m!K8yqY~=(xcT9Qz&ll7hC@0fyQ0t~Br%r^?HC!`HBi-W^rBB~N z8RnKz!w-8xg&T5!T}f5eDLSQCDOGeRL^e{9qm;tp9a`HEKL7Qi?SH15j{ EnterpriseWlanDialog - Connect Enterprise WLAN - ཁེ་ལས་WLANས སྦྲེལ་མཐུད་བྱེད་པ། + ཁེ་ལས་WLANས སྦྲེལ་མཐུད་བྱེད་པ། Close 关闭 - + + Wi-Fi network requires authentication + + + + + Access to Wi-Fi network " + + + + + " requires a password or encryption key. + + + + Cancel ཕྱིར་འཐེན། - + Connect སྦྲེལ་མཐུད་བྱེད་པ @@ -543,23 +557,23 @@ ལག་དེབ། - + Invalid address རྩིས་འགྲོ་མེད་པའི་ས་གནས། - + Invalid subnet mask རྩིས་འགྲོ་མེད་པའི་དྲ་བ་འགེབས་སྲུང་བྱེད་པ། - - + + Required ངེས་པར་དུ་སྐོང་དགོས། - + Address conflict ཤག་གནས་གདོང་གཏུག་ @@ -567,64 +581,64 @@ Ipv6Page - + Ipv6Config Ipv6ཁུང་ཙི། - + Address སྡོད་གནས། - + Subnet prefix Length ཡན་ལག་དྲ་རྒྱའི་སྔོན་སྒྲིག་གི་རིང་ཚད། - + Default Gateway ཁ་ཆད་བཞག་པའི་སྒོ་ཆེན། - + Prefs DNS སྔོན་གྲབས་DNS - + Alternative DNS ཚབ་བྱེད་རང་བཞིན་གྱི་DNS - + Auto(DHCP) རང་འགུལ་(DHCP) - + Manual ལག་དེབ། - - - + + + Required ངེས་པར་དུ་སྐོང་དགོས། - + Invalid address རྩིས་འགྲོ་མེད་པའི་ས་གནས། - + Invalid gateway རྩིས་འགྲོ་མེད་པའི་དྲ་བའི་འགག་སྒོ། - + Address conflict ཤག་གནས་གདོང་གཏུག་ @@ -632,42 +646,41 @@ JoinHiddenWiFiPage - + Please enter the network name and security type ཁྱེད་རང་དྲ་རྒྱའི་ནང་དུ་ཞུགས་འདོད་པའི་མིང་དང་བདེ་འཇགས་རིགས་ནང་འཇུག་བྱེད་རོགས། - + Network name(SSID) དྲ་རྒྱའི་མིང་། (SID) - Remember the Network - དྲ་རྒྱ་དེ་སེམས་ལ་འཛིན་དགོས། + དྲ་རྒྱ་དེ་སེམས་ལ་འཛིན་དགོས། - + Show Network List དྲ་རྒྱའི་རེའུ་མིག་གསལ་པོར་མངོན་པ། - + Cancel མེད་པར་བཟོ་དགོས། - + Join དེའི་ནང་དུ་ཞུགས་པ། - + Required ངེས་པར་དུ་སྐོང་དགོས། - + Find and Join Wi-Fi འཚོལ་ཞིབ་བྱས་པ་མ་ཟད་WI-FIལ་ཞུགས་པ་རེད། @@ -700,22 +713,22 @@ LanPage - + No ethernet device avaliable ཨེ་ཙི་དྲ་རྒྱའི་སྒྲིག་ཆས་ལ་བཙན་འཛུལ་བྱས་མི་ཆོག། - + LAN སྐུད་ཡོད་དྲ་བ། - + Activated LAN ངའི་དྲ་རྒྱ། - + Inactivated LAN དྲ་བ་གཞན་དག @@ -724,7 +737,7 @@ སྐུད་ཡོད་དྲ་བ་ཆད་སོང་། - + Wired Device not carried སྐུད་ཡོད་སྒྲིག་ཆས་འཁྱེར་མེད་པ། @@ -785,32 +798,32 @@ NetDetail - + Kylin NM ཅིན་ལིན་NM - + kylin network desktop message དྲ་རྒྱའི་གསལ་འདེབས་གནས་ཚུལ། - + Detail ཞིབ་ཕྲའི་གནས་ཚུལ། - + Ipv4 Ipv4 - + Ipv6 Ipv6 - + Security བདེ་འཇགས། @@ -819,56 +832,57 @@ 关闭 - - + + Config བཀོད་སྒྲིག་བཅས་བྱ་དགོས། - + Confirm གཏན་འཁེལ་བྱ་དགོས། - + Cancel ཕྱིར་འཐེན། - + Forget this network དྲ་རྒྱ་འདི་བརྗེད་སོང་། - + Add Lan Connect སྐུད་ཡོད་དྲ་བ་ཁ་སྣོན་བྱ་དགོས། - + connect hiddin wlan ཧའེ་ཏེན་ཝེ་ལན་དང་འབྲེལ་མཐུད་བྱེད་པ། - - - + + + None གཅིག་ཀྱང་མེད། - - - + + + Auto རང་འགུལ་གྱིས་རླངས་ + start check ipv4 address conflict - ipv4ས་གནས་ཀྱི་འགལ་བ་ལ་ཞིབ་བཤེར་བྱེད་འགོ་ཚུགས། + ipv4ས་གནས་ཀྱི་འགལ་བ་ལ་ཞིབ་བཤེར་བྱེད་འགོ་ཚུགས། - + start check ipv6 address conflict ipv6གནས་ཡུལ་དང་འགལ་བར་ཞིབ་བཤེར་བྱེད་འགོ་ཚུགས། @@ -877,27 +891,26 @@ ipv4ཐག་གཅོད་གདོང་གཏུག་བྱུང་བ་རེད།! - ipv6 address conflict! - ipv6ཐག་གཅོད་གདོང་གཏུག་བྱུང་བ་རེད།! + ipv6ཐག་གཅོད་གདོང་གཏུག་བྱུང་བ་རེད།! - + this wifi no support enterprise type wifiལ་རྒྱབ་སྐྱོར་མེད་པའི་ཁེ་ལས་ཀྱི་རིགས་དབྱིབས། - + this wifi no support None type wifiལ་རྒྱབ་སྐྱོར་མི་བྱེད་པར་རིགས་དབྱིབས་གཅིག་ཀྱང་མེད། - + this wifi no support WPA2 type wifiལ་རྒྱབ་སྐྱོར་མི་བྱེད་པའི་WPA2རིགས་དབྱིབས་ - + this wifi no support WPA3 type wifiལ་རྒྱབ་སྐྱོར་མི་བྱེད་པའི་WPA3རིགས་དབྱིབས་ @@ -1008,75 +1021,80 @@ SecurityPage - + + Remember the Network + དྲ་རྒྱ་དེ་སེམས་ལ་འཛིན་དགོས། + + + Security བདེ་འཇགས། - - + + Password གསང་གྲངས། - + EAP type EAP རིགས་དབྱིབས། - + Identity ཐོབ་ཐང་། - + Domain ཁྱབ་ཁོངས། - + CA certficate CA certficate - + no need for CA certificate CAཡི་ལག་ཁྱེར་མི་དགོས། - + User certificate སྤྱོད་མཁན་གྱི་ལག་ཁྱེར། - + User private key སྤྱོད་མཁན་གྱི་སྒེར་གྱི་ལྡེ་མིག - + User key password སྤྱོད་མཁན་གྱི་ལྡེ་མིག་གི་གསང་ - + Password options གསང་བའི་ཐོག་ནས་རྣམ་གྲངས་བདམས་པ། - - - + + + Required ངེས་པར་དུ་སྐོང་དགོས། - + Ineer authentication དབྱིན་ཆས་ཀྱི་བདེན་དཔང་ར་སྤྲོད་ - + Usename བཀོལ་སྤྱོད་ཀྱི་མིང་། @@ -1086,91 +1104,91 @@ 用户名 - + Ask pwd each query འདྲི་རྩད་རེ་རེར་འདྲི་རྩད་བྱེད་པ། - - - - - - - - - + + + + + + + + + None གཅིག་ཀྱང་མེད། - + WPA&WPA2 Personal WPA&WPA2མི་སྒེར་གྱི་ངོས་ནས་བཤད་ན། - + WPA&WPA2 Enterprise WPA&WPA2 ཁེ་ལས། - + WPA3 Personal WPA3མི་སྒེར་ - - - + + + Choose from file... ཡིག་ཆའི་ནང་ནས་གདམ་ག་རྒྱག་དགོས།... - + Store passwords only for this user སྤྱོད་མཁན་དེ་ཁོ་ནའི་ཆེད་དུ་གསང་གྲངས་ཉར་ཚགས་བྱས་ཡོད། - + Store password only for this user སྤྱོད་མཁན་དེ་ཁོ་ནའི་ཆེད་དུ་གསང་གྲངས་ཉར་ཚགས་བྱས་ཡོད། - + Store passwords for all users སྤྱོད་མཁན་ཚང་མའི་གསང་བ་གསོག་ཉར་བྱེད་དགོས། - + Store password for all users སྤྱོད་མཁན་ཚང་མའི་གསང་བ་གསོག་ཉར་བྱེད་དགོས། - + Ask this password every time ཐེངས་རེར་གསང་བ་འདི་འདྲི་རྩད་བྱེད་ཐེངས་རེ་ཡིན། - + Ask password every time ཐེངས་རེར་གསང་བ་འདི་འདྲི་རྩད་བྱེད་ཐེངས་རེ་ཡིན། - - - + + + Choose a CA certificate CAཡི་དཔང་ཡིག་འདེམས་པ། - - - + + + CA Files (*.pem *.der *.p12 *.crt *.cer *.pfx) CA དཔང་ཡིག (*.pem *.der *.p12 *.crt *.cer *.pfx) - + @@ -1188,21 +1206,39 @@ སྒྲིག་ཆས་སྒོ་རྒྱག་པ།! - + Settings སྒྲིག་བཀོད། - + Kylin NM ཅིན་ལིན་NM - + kylin network applet desktop message kylinདྲ་རྒྱའི་ཀུ་ཤུའི་ཅོག་ཙེའི་ཆ་འཕྲིན། + + VpnPage + + + Activated VPN + + + + + Inactivated VPN + + + + + Wired Device not carried + སྐུད་ཡོད་སྒྲིག་ཆས་འཁྱེར་མེད་པ། + + WiFiConfigDialog @@ -1249,31 +1285,31 @@ WlanListItem - + Not connected འབྲེལ་མཐུད་མི་བྱེད་པ། - - + + Disconnect འབྲེལ་ཐག་ཆད་པ། - - - + + + Connect སྦྲེལ་མཐུད་བྱེད་པ - - + + Forget བརྗེད་པ། - + Auto Connect རང་འགུལ་གྱིས་སྦྲེལ་མཐུད་ @@ -1293,22 +1329,22 @@ WlanPage - + WLAN སྐུད་མེད་ཅུས་ཁོངས་ཀྱི་དྲ་བ། - + No wireless network card detected སྐུད་མེད་དྲ་རྒྱའི་བྱང་བུ་མ་རྙེད་པ། - + Activated WLAN ངའི་དྲ་རྒྱ། - + Other WLAN དྲ་བ་གཞན་དག @@ -1317,12 +1353,12 @@ 更多... - + WLAN Connected Successfully སྐུད་མེད་དྲ་བ་སྦྲེལ་ཡོད། - + WLAN Disconnected Successfully སྐུད་མེད་དྲ་རྒྱ་ཆད་སོང་། @@ -1385,19 +1421,32 @@ main - + kylinnm - + show kylin-nm wifi page སྐུད་མེད་དྲ་རྒྱའི་ངོས་མངོན་པར་བྱས་ཡོད། - + show kylin-nm lan page སྐུད་ཡོད་དྲ་རྒྱའི་ཤོག་ངོས་མངོན་པར་བྱས་ཡོད། + + vpnMainWindow + + + kylin-vpn + + + + + vpn tool + + + diff --git a/translations/kylin-nm_tr.ts b/translations/kylin-nm_tr.ts index 723fb75e..bca72f95 100644 --- a/translations/kylin-nm_tr.ts +++ b/translations/kylin-nm_tr.ts @@ -1177,17 +1177,27 @@ EnterpriseWlanDialog - - Connect Enterprise WLAN + + Wi-Fi network requires authentication - + + Access to Wi-Fi network " + + + + + " requires a password or encryption key. + + + + Cancel - + Connect @@ -1258,23 +1268,23 @@ Elle - + Invalid address - + Invalid subnet mask - - + + Required - + Address conflict @@ -1282,64 +1292,64 @@ Ipv6Page - + Ipv6Config - + Address - + Subnet prefix Length - + Default Gateway - + Prefs DNS - + Alternative DNS - + Auto(DHCP) Oto(DHCP) - + Manual Elle - - - + + + Required - + Invalid address - + Invalid gateway - + Address conflict @@ -1347,42 +1357,37 @@ JoinHiddenWiFiPage - + Please enter the network name and security type - + Network name(SSID) - - Remember the Network - - - - + Show Network List - + Cancel - + Join - + Required - + Find and Join Wi-Fi @@ -1422,27 +1427,27 @@ LanPage - + No ethernet device avaliable - + LAN - + Activated LAN - + Inactivated LAN - + Wired Device not carried @@ -1612,107 +1617,107 @@ NetDetail - + Kylin NM - + kylin network desktop message - + Detail - + Ipv4 - + Ipv6 - + Security - - + + Config Ayar - + Confirm - + Cancel - + Forget this network - + Add Lan Connect - + connect hiddin wlan - - - + + + None Yok - - - + + + Auto Oto - + + start check ipv4 address conflict + + + + start check ipv6 address conflict - - ipv6 address conflict! - - - - + this wifi no support enterprise type - + this wifi no support None type - + this wifi no support WPA2 type - + this wifi no support WPA3 type @@ -1934,164 +1939,169 @@ SecurityPage - - Security - - - - - - Password - - - - - EAP type - - - - - Identity - Kimlik: - - - - Domain - Domain: - - - - CA certficate - - - - - no need for CA certificate - - - - - User certificate - Kullanıcı sertifikası: - - - - User private key - Kullanıcı özel anahtarı: - - - - User key password - Kullanıcı anahtarı şifresi: - - - - Password options - - - - - - - Required - - - - - Ineer authentication - - - - - Usename - - - - - Ask pwd each query - - - - - - - - - - - - - None - Yok - - - - WPA&WPA2 Personal + + Remember the Network - WPA&WPA2 Enterprise + Security + + Password + + + + + EAP type + + + + + Identity + Kimlik: + + + + Domain + Domain: + + + + CA certficate + + + + + no need for CA certificate + + + + + User certificate + Kullanıcı sertifikası: + + + + User private key + Kullanıcı özel anahtarı: + + + + User key password + Kullanıcı anahtarı şifresi: + + + + Password options + + + + + + + Required + + + + + Ineer authentication + + + + + Usename + + + + + Ask pwd each query + + + + + + + + + + + + + None + Yok + + + + WPA&WPA2 Personal + + + + + WPA&WPA2 Enterprise + + + + WPA3 Personal - - - + + + Choose from file... - + Store passwords only for this user - + Store password only for this user - + Store passwords for all users - + Store password for all users - + Ask this password every time - + Ask password every time - - - + + + Choose a CA certificate - - - + + + CA Files (*.pem *.der *.p12 *.crt *.cer *.pfx) - + @@ -2109,17 +2119,17 @@ - + Settings - + Kylin NM - + kylin network applet desktop message Kylin ağ uygulaması masaüstü mesajı @@ -2131,6 +2141,24 @@ Kylin ağ uygulaması masaüstü mesajı + + VpnPage + + + Activated VPN + + + + + Inactivated VPN + + + + + Wired Device not carried + + + WiFiConfigDialog @@ -2177,31 +2205,31 @@ WlanListItem - + Not connected Bağlanamadı - - + + Disconnect Bağlantıyı Kes - - - + + + Connect - - + + Forget - + Auto Connect @@ -2217,32 +2245,32 @@ WlanPage - + WLAN WLAN - + Activated WLAN - + Other WLAN - + No wireless network card detected - + WLAN Connected Successfully - + WLAN Disconnected Successfully @@ -2265,19 +2293,32 @@ main - + kylinnm - + show kylin-nm wifi page - + show kylin-nm lan page + + vpnMainWindow + + + kylin-vpn + + + + + vpn tool + + + diff --git a/translations/kylin-nm_zh_CN.qm b/translations/kylin-nm_zh_CN.qm index cec9f4bcf9275457ff0603e820573d3fc75fc9ab..e7d265ba3e5476989d959de95c090813bf2ce6b7 100644 GIT binary patch delta 1240 zcmXYwdr(w$6vw}py?6IMcY)n?7xv9Vat9ktNNJcJii`}-pqSE>I>XE|q)ztOtSOYW zs9m$$>VFPJ_HNJV_%K0o!~TYhgxCg7gr4;GyU496Lb zZbtJs|K93p>Yat}Y`;US;Ja$d0N*D5i7K6vLS$fmQg985e!g)Zo%mKf@bxk zuq!aZ-u1-2DhUjJ9W$EgDGo(O~ z#=7X+_Nw&f9R1S2Z(JjbKPDTCqBL_qqjZZ=T`WJMs{-U6c|~m=B_5W`XLD%wOBj6< za^UN)Xf*k9MKKj@_<=D|Wc2mRZK1mgwR`2h-VsvPC!hJah?M0i3;dK&ew|SrR0cBKnL9mPrq{b;2HA9N~LrE0`krajLudi?u}8$+8C88My*bL_~*|kzCaCYRG@N< zQTs#<%`KSf*@82uMx4#$@*K4(yM_vxRo`A!L5XbYDK1E!7-aOetMOH2R`+RjVjZoE zLz*kQg<5RTTpNjrm$bTV^gq2tYtGK6xTw~*lP;`jK>Lf|K^{smaw9Yn+m-c3)pM0v z6fxH58p!>p7?nH5pJu3KzB*Is_-z^iOdl*iN6O-+6UQ?sK?7q_2cyqp`b9fJ1yyeW zG8V>0c)J)Y&~_Q3W66$ax7i-cvwHN=7DpME6P1k3L>|MM=tu~yjyZu*WOL}M zfv6FjvIFSy}#f2o!|F- z&-raD8Y$Xs3Y-Jr03sg(%f11GFMxtlV8(gI@JaB^eSoP1{Fgf^?)ZPa1VOzAFnfq? z#4Qla{{Z@H5avGzsCpqRUrg&iFk0gw3{YO<0HZqui~KZ@XtKhR{sa(FgJgvb2(M!_ z_b@tcBH6r&4&G=vkr4P0{qeDYrWE5d@<_OViG}lksDqdcb_41SUBJ zbDFiM09_VWaHy5`-{f|-nd!0~MrR?{`>_$QE#)p`bs^_(E}?<<>5Rs!6xvi&j%h+3_@;h}P4EWGTu)BbEe>mFGu2KnsQ63L#g z`Q3-(fmlDkH|I17KfnwAxtw6GhwAP2I21?sauf^Ho6cC!_c+qiom6n<-nwlxEJl zJJgkHnz{NC>dFpH!DK#tn>71#*N{d7qxLCH*98~dvQN`}^+&*(C(e8363xuxV){jq z*dcl!q>;-ih*g%~shBh3`UHW7aYAexCAo$&@n{Q?+b*8h5G~8au_y1-&}zl&ee@j( zadMiLL*mrdaT@Ful0GL$?M!5p(ir7>DN|VwXqD2UZ3`%GgjDumE_HSA5d(0|mb{;T zO12M6zFbnO{+=rHv5wUa6tW3=|m9Z3yj@dkO{5+7aIDu2NFX%I>no$>PM5}L=@H2IHWS{Kba zThbfkbeqn$Dlq-Wr`x`k0^H-e&ZKlY=+X^tr1u(Dtow^!Pm|NG=dMs|B3J0;*fDzN zR(*qV4^=KO%Gvs#?~`-RbB3bdZc{5@cz5AvRN<)M=#e*?$KuLbUrlvQh2Q7! EnterpriseWlanDialog - Connect Enterprise WLAN - 连接企业网 + 连接企业网 Close 关闭 - + + Wi-Fi network requires authentication + + + + + Access to Wi-Fi network " + + + + + " requires a password or encryption key. + + + + Cancel 取消 - + Connect 连接 @@ -543,23 +557,23 @@ 手动 - + Invalid address 无效地址 - + Invalid subnet mask 无效子网掩码 - - + + Required 必填 - + Address conflict 地址冲突 @@ -567,64 +581,64 @@ Ipv6Page - + Ipv6Config Ipv6配置 - + Address 地址 - + Subnet prefix Length 子网前缀长度 - + Default Gateway 默认网关 - + Prefs DNS 首选DNS - + Alternative DNS 备选DNS - + Auto(DHCP) 自动 - + Manual 手动 - - - + + + Required 必填 - + Invalid address 无效地址 - + Invalid gateway 无效网关 - + Address conflict 地址冲突 @@ -632,42 +646,41 @@ JoinHiddenWiFiPage - + Please enter the network name and security type 请输入您想要加入网络的名称和安全类型 - + Network name(SSID) 网络名(SSID) - Remember the Network - 记住该网络 + 记住该网络 - + Show Network List 显示网络列表 - + Cancel 取消 - + Join 加入 - + Required 必填 - + Find and Join Wi-Fi 查找并加入Wi-Fi @@ -700,22 +713,22 @@ LanPage - + No ethernet device avaliable 未检测到有线设备 - + LAN 有线网络 - + Activated LAN 我的网络 - + Inactivated LAN 其他网络 @@ -724,7 +737,7 @@ 有线网络已断开 - + Wired Device not carried 未插入网线 @@ -785,32 +798,32 @@ NetDetail - + Kylin NM 麒麟网络设置工具 - + kylin network desktop message 网络提示消息 - + Detail 详情 - + Ipv4 Ipv4 - + Ipv6 Ipv6 - + Security 安全 @@ -819,56 +832,57 @@ 关闭 - - + + Config 配置 - + Confirm 确定 - + Cancel 取消 - + Forget this network 忘记此网络 - + Add Lan Connect 添加有线网络 - + connect hiddin wlan 连接到隐藏WLAN - - - + + + None - - - + + + Auto 自动 + start check ipv4 address conflict - 开始检测ipv4地址冲突 + 开始检测ipv4地址冲突 - + start check ipv6 address conflict 开始检测ipv6地址冲突 @@ -877,27 +891,26 @@ ipv4地址冲突! - ipv6 address conflict! - ipv6地址冲突! + ipv6地址冲突! - + this wifi no support enterprise type 此wifi不支持企业网类型 - + this wifi no support None type 此wifi不支持空类型 - + this wifi no support WPA2 type 此wifi不支持WPA2类型 - + this wifi no support WPA3 type 此wifi不支持WPA3类型 @@ -1007,81 +1020,81 @@ SecurityPage - - + + Remember the Network 记住该网络 - + Security 安全性 - - + + Password 密钥 - + EAP type EAP方法 - + Identity 匿名身份 - + Domain - + CA certficate CA 证书 - + no need for CA certificate 不需要CA证书 - + User certificate 用户证书 - + User private key 用户私钥 - + User key password 用户密钥密码 - + Password options 密码选项 - - - + + + Required 必填 - + Ineer authentication 内部认证 - + Usename 用户名 @@ -1091,91 +1104,91 @@ 用户名 - + Ask pwd each query 每次询问密码 - - - - - - - - - + + + + + + + + + None - + WPA&WPA2 Personal WPA&WPA2 个人 - + WPA&WPA2 Enterprise WPA&WPA2 企业 - + WPA3 Personal WPA3 个人 - - - + + + Choose from file... 从文件选择... - + Store passwords only for this user 仅为该用户存储密码 - + Store password only for this user 仅为该用户存储密码 - + Store passwords for all users 存储所有用户的密码 - + Store password for all users 存储所有用户的密码 - + Ask this password every time 每次询问这个密码 - + Ask password every time 每次询问这个密码 - - - + + + Choose a CA certificate 选择一个CA证书 - - - + + + CA Files (*.pem *.der *.p12 *.crt *.cer *.pfx) CA 证书 (*.pem *.der *.p12 *.crt *.cer *.pfx) - + @@ -1193,21 +1206,39 @@ 设备关闭! - + Settings 网络设置 - + Kylin NM 麒麟网络设置工具 - + kylin network applet desktop message 网络提示消息 + + VpnPage + + + Activated VPN + + + + + Inactivated VPN + + + + + Wired Device not carried + 未插入网线 + + WiFiConfigDialog @@ -1254,31 +1285,31 @@ WlanListItem - + Not connected 未连接 - - + + Disconnect 断开 - - - + + + Connect 连接 - - + + Forget 忘记此网络 - + Auto Connect 自动加入该网络 @@ -1298,22 +1329,22 @@ WlanPage - + WLAN 无线局域网 - + No wireless network card detected 未检测到无线网卡 - + Activated WLAN 我的网络 - + Other WLAN 其他网络 @@ -1322,12 +1353,12 @@ 更多... - + WLAN Connected Successfully 无线网络已连接 - + WLAN Disconnected Successfully 无线网络已断开 @@ -1390,19 +1421,32 @@ main - + kylinnm - + show kylin-nm wifi page - + show kylin-nm lan page + + vpnMainWindow + + + kylin-vpn + + + + + vpn tool + + +