Merge branch '0929-new' into 'dbus-interface'
bug#83002#83284 See merge request kylin-desktop/kylin-nm!293
This commit is contained in:
commit
1a7927e53d
|
@ -24,7 +24,6 @@ LanListItem::LanListItem(KyConnectItem *data, QString deviceName, QWidget *paren
|
|||
m_isActive = false;
|
||||
}
|
||||
}
|
||||
m_netButton->setActive(m_isActive);
|
||||
m_itemFrame->installEventFilter(this);
|
||||
connect(this->m_infoButton, &InfoButton::clicked, this, &LanListItem::onInfoButtonClicked);
|
||||
connect(m_activeConnectResource, &KyActiveConnectResourse::stateChangeReason, this, &LanListItem::onLanStatusChange);
|
||||
|
@ -43,8 +42,10 @@ void LanListItem::setIcon(bool isOn)
|
|||
{
|
||||
if (isOn) {
|
||||
m_netButton->setButtonIcon(QIcon::fromTheme("network-wired-connected-symbolic"));
|
||||
m_netButton->setActive(true); //设置图标显示不同颜色
|
||||
} else {
|
||||
m_netButton->setButtonIcon(QIcon::fromTheme("network-wired-disconnected-symbolic"));
|
||||
m_netButton->setActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -63,6 +64,7 @@ void LanListItem::onNetButtonClicked()
|
|||
}
|
||||
else {
|
||||
qDebug() << "[LanListItem] Wired Device not carried";
|
||||
this->showDesktopNotify(tr("Wired Device not carried"));
|
||||
m_isActive = false;
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -195,7 +195,7 @@ void LanPage::initDeviceCombox()
|
|||
}
|
||||
|
||||
m_deviceComboBox->clear();
|
||||
m_devList.clear();
|
||||
m_devList.clear(); //!!!!
|
||||
enableDevice.clear();
|
||||
|
||||
getDeviceEnableState(WIRED, deviceMap);
|
||||
|
@ -206,7 +206,6 @@ void LanPage::initDeviceCombox()
|
|||
m_activatedNetFrame->hide();
|
||||
m_inactivatedNetFrame->hide();
|
||||
m_activatedNetDivider->hide();
|
||||
m_inactivatedNetDivider->hide();
|
||||
m_deviceName = "";
|
||||
} else {
|
||||
m_device->getNetworkDeviceList(NetworkManager::Device::Type::Ethernet, m_devList);
|
||||
|
@ -229,7 +228,6 @@ void LanPage::initDeviceCombox()
|
|||
m_activatedNetFrame->hide();
|
||||
m_inactivatedNetFrame->hide();
|
||||
m_activatedNetDivider->hide();
|
||||
m_inactivatedNetDivider->hide();
|
||||
m_deviceName = "";
|
||||
return;
|
||||
}
|
||||
|
@ -237,7 +235,6 @@ void LanPage::initDeviceCombox()
|
|||
m_activatedNetFrame->show();
|
||||
m_inactivatedNetFrame->show();
|
||||
m_activatedNetDivider->show();
|
||||
m_inactivatedNetDivider->show();
|
||||
|
||||
if (enableDevice.count() == 1) {
|
||||
m_deviceFrame->hide();
|
||||
|
|
|
@ -93,8 +93,8 @@ void TabPage::initUI()
|
|||
m_mainLayout->addWidget(m_activatedNetFrame);
|
||||
m_mainLayout->addWidget(m_activatedNetDivider);
|
||||
m_mainLayout->addWidget(m_inactivatedNetFrame);
|
||||
m_mainLayout->addWidget(m_inactivatedNetDivider);
|
||||
m_mainLayout->addStretch();
|
||||
m_mainLayout->addWidget(m_inactivatedNetDivider);
|
||||
m_mainLayout->addWidget(m_settingsFrame);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue