Commit def208f2 authored by Andrey Borzenkov's avatar Andrey Borzenkov
Browse files

save changed settings after exiting applet configuration interface

Caller of KCmoduleProxy is reponsible for saving changed settings.
Cf. http://api.kde.org/4.x-api/kdelibs-apidocs/plasma/html/classPlasma_1_1Applet.html#a92f9d3b1a842eeb55b9bb1d47cc64699

BUG: 257777
parent fac15b53
......@@ -277,6 +277,18 @@ void NetworkManagerApplet::createConfigurationInterface(KConfigDialog *parent)
m_kcmNM->moduleInfo().icon());
parent->addPage(m_kcmNMTray, m_kcmNMTray->moduleInfo().moduleName(),
m_kcmNMTray->moduleInfo().icon());
connect(parent, SIGNAL(applyClicked()), this, SLOT(saveConfiguration()));
connect(parent, SIGNAL(okClicked()), this, SLOT(saveConfiguration()));
}
void NetworkManagerApplet::saveConfiguration()
{
// kcm_networkmanagement implicitly saves connection definition after
// editing is finished, so no need to call its save() method
// FIXME This just writes out changed values to ini file. kded module
// still continues to use old value
m_kcmNMTray->save();
}
void NetworkManagerApplet::constraintsEvent(Plasma::Constraints constraints)
......
......@@ -110,6 +110,8 @@ private Q_SLOTS:
void updatePixmap();
void repaint();
void clearActivatedOverlay();
// Request KCM module to persist changes
void saveConfiguration();
private:
bool hasInterfaceOfType(Solid::Control::NetworkInterface::Type type);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment