|
|
@ -139,7 +139,7 @@ void NewSecretsDialog::init()
|
|
|
|
// show a message to the user that the connection failed
|
|
|
|
// show a message to the user that the connection failed
|
|
|
|
// and allow edit or cancel
|
|
|
|
// and allow edit or cancel
|
|
|
|
|
|
|
|
|
|
|
|
TQLabel* label = new TQLabel(tqtr(" The connection %1 could not be established ").tqarg(conn->getInfoSetting()->getName()), this);
|
|
|
|
TQLabel* label = new TQLabel(tqtr(" The connection %1 could not be established ").arg(conn->getInfoSetting()->getName()), this);
|
|
|
|
TQPushButton* buttonEdit = new TQPushButton(tr("&Edit"), this);
|
|
|
|
TQPushButton* buttonEdit = new TQPushButton(tr("&Edit"), this);
|
|
|
|
TQPushButton* buttonCancel = new TQPushButton(tr("&Cancel"), this);
|
|
|
|
TQPushButton* buttonCancel = new TQPushButton(tr("&Cancel"), this);
|
|
|
|
|
|
|
|
|
|
|
@ -277,8 +277,8 @@ void Tray::contextMenuAboutToShow (KPopupMenu* menu)
|
|
|
|
KAction * deviceNewConnAction = 0;
|
|
|
|
KAction * deviceNewConnAction = 0;
|
|
|
|
if (dev_comp)
|
|
|
|
if (dev_comp)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQString actionName = TQString("new_connection_%1").tqarg(dev_comp->device()->getInterface());
|
|
|
|
TQString actionName = TQString("new_connection_%1").arg(dev_comp->device()->getInterface());
|
|
|
|
TQString menuCaption = TQString("%1").tqarg(dev_comp->device()->getInterface());
|
|
|
|
TQString menuCaption = TQString("%1").arg(dev_comp->device()->getInterface());
|
|
|
|
if (menuCaption.contains("eth", FALSE) > 0) {
|
|
|
|
if (menuCaption.contains("eth", FALSE) > 0) {
|
|
|
|
menuCaption = menuCaption.insert(0, "Wired Connection (");
|
|
|
|
menuCaption = menuCaption.insert(0, "Wired Connection (");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -303,7 +303,7 @@ void Tray::contextMenuAboutToShow (KPopupMenu* menu)
|
|
|
|
++it;
|
|
|
|
++it;
|
|
|
|
KAction * deviceNewConnAction = 0;
|
|
|
|
KAction * deviceNewConnAction = 0;
|
|
|
|
TQString menuCaption = "VPN Connection";
|
|
|
|
TQString menuCaption = "VPN Connection";
|
|
|
|
TQString actionName = TQString("new_connection_%1").tqarg("vpn");
|
|
|
|
TQString actionName = TQString("new_connection_%1").arg("vpn");
|
|
|
|
deviceNewConnAction = new KAction (menuCaption, 0, TQT_TQOBJECT(this), TQT_SLOT(slotNewVPNConnection()), actionCollection(), actionName);
|
|
|
|
deviceNewConnAction = new KAction (menuCaption, 0, TQT_TQOBJECT(this), TQT_SLOT(slotNewVPNConnection()), actionCollection(), actionName);
|
|
|
|
newConnActionMenu->insert(deviceNewConnAction);
|
|
|
|
newConnActionMenu->insert(deviceNewConnAction);
|
|
|
|
} else if ( devices == 1 ) {
|
|
|
|
} else if ( devices == 1 ) {
|
|
|
@ -331,11 +331,11 @@ void Tray::contextMenuAboutToShow (KPopupMenu* menu)
|
|
|
|
if (!conn)
|
|
|
|
if (!conn)
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
|
|
TQString actionName = TQString("disable_connection_%1_%2").tqarg(conn->getID()).tqarg(dev ? dev->getInterface() : "");
|
|
|
|
TQString actionName = TQString("disable_connection_%1_%2").arg(conn->getID()).arg(dev ? dev->getInterface() : "");
|
|
|
|
KAction * deviceNewConnAction = actionCollection ()->action (actionName);
|
|
|
|
KAction * deviceNewConnAction = actionCollection ()->action (actionName);
|
|
|
|
TQString actionText = conn->getInfoSetting()->getName();
|
|
|
|
TQString actionText = conn->getInfoSetting()->getName();
|
|
|
|
if (dev)
|
|
|
|
if (dev)
|
|
|
|
actionText += TQString(" (%1)").tqarg(dev->getInterface());
|
|
|
|
actionText += TQString(" (%1)").arg(dev->getInterface());
|
|
|
|
|
|
|
|
|
|
|
|
if (!deviceNewConnAction) {
|
|
|
|
if (!deviceNewConnAction) {
|
|
|
|
deviceNewConnAction = new KAction (actionText, 0, &d->signalMapper, TQT_SLOT(map()), actionCollection(), actionName);
|
|
|
|
deviceNewConnAction = new KAction (actionText, 0, &d->signalMapper, TQT_SLOT(map()), actionCollection(), actionName);
|
|
|
@ -470,7 +470,7 @@ Tray::slotVPNSecretsNeeded(ConnectionSettings::Connection* connection, Connectio
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
// Get a group for this setting
|
|
|
|
// Get a group for this setting
|
|
|
|
TQString setting_grp = TQString("ConnectionSecrets_%1_%2").tqarg(id).tqarg(type);
|
|
|
|
TQString setting_grp = TQString("ConnectionSecrets_%1_%2").arg(id).arg(type);
|
|
|
|
|
|
|
|
|
|
|
|
// Restore the settings
|
|
|
|
// Restore the settings
|
|
|
|
printf("Restoring VPN secret: %s\n\r", setting_grp.ascii());
|
|
|
|
printf("Restoring VPN secret: %s\n\r", setting_grp.ascii());
|
|
|
@ -629,7 +629,7 @@ void Tray::slotRemoveDeviceTrayComponent(Device* dev)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// remove the appropriate action
|
|
|
|
// remove the appropriate action
|
|
|
|
TQString actionName = TQString("new_connection_%1").tqarg(dev_comp->device()->getInterface());
|
|
|
|
TQString actionName = TQString("new_connection_%1").arg(dev_comp->device()->getInterface());
|
|
|
|
KAction * deviceNewConnAction = actionCollection ()->action (actionName);
|
|
|
|
KAction * deviceNewConnAction = actionCollection ()->action (actionName);
|
|
|
|
|
|
|
|
|
|
|
|
if (!deviceNewConnAction)
|
|
|
|
if (!deviceNewConnAction)
|
|
|
@ -999,13 +999,13 @@ void Tray::updateActiveConnection(NMDeviceState state)
|
|
|
|
void Tray::slotDeviceAddedNotify(Device* dev)
|
|
|
|
void Tray::slotDeviceAddedNotify(Device* dev)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
kdDebug() << "Tray::slotDeviceAddedNotify" << endl;
|
|
|
|
kdDebug() << "Tray::slotDeviceAddedNotify" << endl;
|
|
|
|
KNotifyClient::event( winId(), "knm-nm-device-added", i18n("New network device %1 found").tqarg(dev->getInterface()) );
|
|
|
|
KNotifyClient::event( winId(), "knm-nm-device-added", i18n("New network device %1 found").arg(dev->getInterface()) );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Tray::slotDeviceRemovedNotify(Device* dev)
|
|
|
|
void Tray::slotDeviceRemovedNotify(Device* dev)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
kdDebug() << "Tray::slotDeviceRemovedNotify" << endl;
|
|
|
|
kdDebug() << "Tray::slotDeviceRemovedNotify" << endl;
|
|
|
|
KNotifyClient::event( winId(), "knm-nm-device-removed", i18n("Network device %1 removed").tqarg(dev->getInterface()) );
|
|
|
|
KNotifyClient::event( winId(), "knm-nm-device-removed", i18n("Network device %1 removed").arg(dev->getInterface()) );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Tray::slotVPNBannerShow(const TQString& vpnbanner)
|
|
|
|
void Tray::slotVPNBannerShow(const TQString& vpnbanner)
|
|
|
|