|
|
|
@ -80,18 +80,19 @@ void WiredDeviceTray::addMenuItems(TDEPopupMenu* menu)
|
|
|
|
|
Subhead* subhead = new Subhead (menu, "subhead", TQString("Wired Connection (%1)").arg(dev->deviceNode()), SmallIcon("wired", TQIconSet::Automatic));
|
|
|
|
|
menu->insertItem (subhead, -1, -1);
|
|
|
|
|
|
|
|
|
|
// bolding subhead instead
|
|
|
|
|
//menu->insertSeparator();
|
|
|
|
|
|
|
|
|
|
TDENetworkConnectionManager* deviceConnMan = dev->connectionManager();
|
|
|
|
|
if (deviceConnMan->deviceInformation().statusFlags & TDENetworkConnectionStatus::LinkUnavailable) {
|
|
|
|
|
if (!deviceConnMan->deviceInformation().managed) {
|
|
|
|
|
// device is not managed by NM -> do not show any connections
|
|
|
|
|
subhead = new Subhead(menu, "subhead2", i18n("Not managed"), SmallIcon("no", TQIconSet::Automatic));
|
|
|
|
|
menu->insertItem(subhead, -1, -1);
|
|
|
|
|
}
|
|
|
|
|
else if (deviceConnMan->deviceInformation().statusFlags & TDENetworkConnectionStatus::LinkUnavailable) {
|
|
|
|
|
// no carrier -> do not show any connections
|
|
|
|
|
subhead = new Subhead(menu, "subhead2", i18n("Cable disconnected"), SmallIcon("no", TQIconSet::Automatic));
|
|
|
|
|
menu->insertItem(subhead, -1, -1);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
TDEGlobalNetworkManager* nm = TDEGlobal::networkManager();
|
|
|
|
|
TDENetworkConnectionManager* deviceConnMan = dev->connectionManager();
|
|
|
|
|
TDENetworkConnection* active_conn = NULL;
|
|
|
|
|
if ((!(deviceConnMan->deviceInformation().statusFlags & TDENetworkConnectionStatus::Disconnected))
|
|
|
|
|
&& (!(deviceConnMan->deviceInformation().statusFlags & TDENetworkConnectionStatus::Invalid))) {
|
|
|
|
@ -131,8 +132,8 @@ void WiredDeviceTray::addMenuItems(TDEPopupMenu* menu)
|
|
|
|
|
if (deactivate) {
|
|
|
|
|
deactivate->plug(menu);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
menu->insertSeparator();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
WiredDeviceTray::WiredDeviceTray (TQString dev, KSystemTray * parent, const char * name )
|
|
|
|
|