|
|
|
@ -263,9 +263,9 @@ void Tray::contextMenuAboutToShow (TDEPopupMenu* menu)
|
|
|
|
|
menuCaption = menuCaption.insert(0, "Unknown Connection (");
|
|
|
|
|
}
|
|
|
|
|
menuCaption = menuCaption.append(")");
|
|
|
|
|
deviceNewConnAction = actionCollection ()->action (actionName);
|
|
|
|
|
deviceNewConnAction = actionCollection ()->action (actionName.utf8());
|
|
|
|
|
if (!deviceNewConnAction) {
|
|
|
|
|
deviceNewConnAction = new TDEAction (menuCaption, 0, (*it), TQT_SLOT(newConnection()), actionCollection(), actionName);
|
|
|
|
|
deviceNewConnAction = new TDEAction (menuCaption, 0, (*it), TQT_SLOT(newConnection()), actionCollection(), actionName.utf8());
|
|
|
|
|
}
|
|
|
|
|
newConnActionMenu->insert(deviceNewConnAction);
|
|
|
|
|
}
|
|
|
|
@ -275,7 +275,7 @@ void Tray::contextMenuAboutToShow (TDEPopupMenu* menu)
|
|
|
|
|
TDEAction * deviceNewConnAction = 0;
|
|
|
|
|
TQString menuCaption = "VPN Connection";
|
|
|
|
|
TQString actionName = TQString("new_connection_%1").arg("vpn");
|
|
|
|
|
deviceNewConnAction = new TDEAction (menuCaption, 0, TQT_TQOBJECT(this), TQT_SLOT(slotNewVPNConnection()), actionCollection(), actionName);
|
|
|
|
|
deviceNewConnAction = new TDEAction (menuCaption, 0, TQT_TQOBJECT(this), TQT_SLOT(slotNewVPNConnection()), actionCollection(), actionName.utf8());
|
|
|
|
|
newConnActionMenu->insert(deviceNewConnAction);
|
|
|
|
|
}
|
|
|
|
|
else if ( devices == 1 ) {
|
|
|
|
@ -309,11 +309,11 @@ void Tray::contextMenuAboutToShow (TDEPopupMenu* menu)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TQString actionName = TQString("disable_connection_%1").arg(conn->UUID);
|
|
|
|
|
TDEAction * deviceNewConnAction = actionCollection ()->action (actionName);
|
|
|
|
|
TDEAction * deviceNewConnAction = actionCollection ()->action (actionName.utf8());
|
|
|
|
|
TQString actionText = conn->friendlyName;
|
|
|
|
|
|
|
|
|
|
if (!deviceNewConnAction) {
|
|
|
|
|
deviceNewConnAction = new TDEAction (actionText, 0, &d->signalMapper, TQT_SLOT(map()), actionCollection(), actionName);
|
|
|
|
|
deviceNewConnAction = new TDEAction (actionText, 0, &d->signalMapper, TQT_SLOT(map()), actionCollection(), actionName.utf8());
|
|
|
|
|
}
|
|
|
|
|
d->signalMapper.setMapping(deviceNewConnAction, d->current_idx);
|
|
|
|
|
d->act_conn_map.insert(d->current_idx, conn->UUID);
|
|
|
|
@ -449,7 +449,7 @@ void Tray::slotRemoveDeviceTrayComponent(TQString dev)
|
|
|
|
|
TDENetworkDevice* dev_comp_dev = dynamic_cast<TDENetworkDevice*>(hwdevices->findByUniqueID(dev_comp->device()));
|
|
|
|
|
if (dev_comp_dev) {
|
|
|
|
|
TQString actionName = TQString("new_connection_%1").arg(dev_comp_dev->deviceNode());
|
|
|
|
|
TDEAction * deviceNewConnAction = actionCollection ()->action (actionName);
|
|
|
|
|
TDEAction * deviceNewConnAction = actionCollection ()->action (actionName.utf8());
|
|
|
|
|
if (!deviceNewConnAction) {
|
|
|
|
|
delete deviceNewConnAction;
|
|
|
|
|
deviceNewConnAction = NULL;
|
|
|
|
@ -905,7 +905,7 @@ void Tray::updateActiveConnection(TDENetworkConnectionStatus::TDENetworkConnecti
|
|
|
|
|
void Tray::slotDeviceAddedNotify(TDENetworkDevice* dev)
|
|
|
|
|
{
|
|
|
|
|
kdDebug() << "Tray::slotDeviceAddedNotify" << endl;
|
|
|
|
|
if( dev->deviceNode() ) {
|
|
|
|
|
if( !dev->deviceNode().isEmpty() ) {
|
|
|
|
|
KNotifyClient::event( winId(), "tdenm-nm-device-added", i18n("New network device %1 found").arg(dev->deviceNode()) );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -913,7 +913,7 @@ void Tray::slotDeviceAddedNotify(TDENetworkDevice* dev)
|
|
|
|
|
void Tray::slotDeviceRemovedNotify(TDENetworkDevice* dev)
|
|
|
|
|
{
|
|
|
|
|
kdDebug() << "Tray::slotDeviceRemovedNotify" << endl;
|
|
|
|
|
if( dev->deviceNode() ) {
|
|
|
|
|
if( !dev->deviceNode().isEmpty() ) {
|
|
|
|
|
KNotifyClient::event( winId(), "tdenm-nm-device-removed", i18n("Network device %1 removed").arg(dev->deviceNode()) );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|