kylin-nm 1.0.4
This commit is contained in:
parent
f93003c742
commit
23c5b35bdc
|
@ -106,11 +106,20 @@ void BackThread::execDisWifi(){
|
|||
}
|
||||
|
||||
void BackThread::execConnLan(QString connName){
|
||||
QFile sys_carrier("/sys/class/net/enp3s0/carrier");
|
||||
if(!sys_carrier.open(QIODevice::ReadOnly | QIODevice::Text))
|
||||
{
|
||||
qDebug()<<"Can't open the system file carrier!"<<endl;
|
||||
QString net_card = "ifconfig>/tmp/kylin-nm-ifconfig";
|
||||
system(net_card.toUtf8().data());
|
||||
QFile file("/tmp/kylin-nm-ifconfig");
|
||||
if(!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
qDebug()<<"Can't open the file kylin-nm-ifconfig!"<<endl;
|
||||
}
|
||||
QString txt = file.readLine();
|
||||
QString strType = txt.mid(0, 6);
|
||||
QString carrierPath ="/sys/class/net/" + strType + "/carrier";
|
||||
QFile sys_carrier(carrierPath);
|
||||
if(!sys_carrier.open(QIODevice::ReadOnly | QIODevice::Text)){
|
||||
qDebug()<<"Can't open the file carrier in documentary enp1s0"<<endl;
|
||||
}
|
||||
|
||||
QString sys_line = sys_carrier.readLine();
|
||||
sys_carrier.close();
|
||||
if(sys_line.indexOf("1") != -1){
|
||||
|
@ -125,8 +134,7 @@ void BackThread::execConnLan(QString connName){
|
|||
}
|
||||
|
||||
void BackThread::execConnWifi(QString connName){
|
||||
// QString cmd = "/usr/share/kylin-nm/shell/connup.sh '" + connName + "'";
|
||||
QString cmd = "/home/chenlelin/kylin-nm/kylin-nm/connup.sh '" + connName + "'";
|
||||
QString cmd = "/usr/share/kylin-nm/shell/connup.sh '" + connName + "'";
|
||||
system(cmd.toUtf8().data());
|
||||
|
||||
QFile file("/tmp/kylin-nm-btoutput_");
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
kylin-nm (1.0.4-0ubuntu1) eoan; urgency=medium
|
||||
|
||||
* Bug-fix:
|
||||
- Fix the bug which can not show correct icon size when change the height of taskbar
|
||||
|
||||
-- handsome_feng <jianfengli@ubuntukylin.com> Mon, 23 Sep 2019 16:51:40 +0800
|
||||
|
||||
kylin-nm (1.0.3-0ubuntu1) eoan; urgency=medium
|
||||
|
||||
* Bug-fix:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 4.6.2, 2019-09-16T09:14:14. -->
|
||||
<!-- Written by QtCreator 4.6.2, 2019-09-24T13:06:38. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
|
|
|
@ -180,8 +180,8 @@ void MainWindow::createTrayIcon()
|
|||
trayIcon->setContextMenu(trayIconMenu);
|
||||
|
||||
// 初始化托盘所有Icon
|
||||
QString iconDir = "/usr/share/icons/ukui-icon-theme/16x16/panel/";
|
||||
iconLanOnline = QIcon(iconDir + "nm-device-wired.png");
|
||||
QString iconDir = "/usr/share/icons/ukui-icon-theme/48x48/status/";
|
||||
iconLanOnline = QIcon(iconDir + "nm-device-wire.png");
|
||||
iconLanOffline = QIcon(iconDir + "nm-no-connection.png");
|
||||
iconWifiFull = QIcon(iconDir + "nm-signal-100.png");
|
||||
iconWifiHigh = QIcon(iconDir + "nm-signal-75.png");
|
||||
|
|
Loading…
Reference in New Issue