summaryrefslogtreecommitdiffabout
authorulf69 <ulf69>2004-08-10 19:40:27 (UTC)
committer ulf69 <ulf69>2004-08-10 19:40:27 (UTC)
commit20a2709f00d4e99eace87338fefc54701fcc47c0 (patch) (side-by-side diff)
treed0914ea349b33322e837e3e67aacd0bfdc024a81
parent2666ac52add8d79e34a04a64e4d5f092dd3d3d7e (diff)
downloadkdepimpi-20a2709f00d4e99eace87338fefc54701fcc47c0.zip
kdepimpi-20a2709f00d4e99eace87338fefc54701fcc47c0.tar.gz
kdepimpi-20a2709f00d4e99eace87338fefc54701fcc47c0.tar.bz2
release cache of externalapphandler after changes have been applied
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libkdepim/kcmconfigs/kdepimconfigwidget.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
index 9964eeb..c8b94db 100644
--- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
+++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
@@ -261,48 +261,49 @@ void KDEPIMConfigWidget::saveEditFieldSettings()
{
mPhoneOtherChannel = mChannel->text();
mPhoneOtherMessage = mMessage->text();
mPhoneOtherMessageParameters = mParameters->text();
}
else if ((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC))
{
mSMSOtherChannel = mChannel->text();
mSMSOtherMessage = mMessage->text();
mSMSOtherMessageParameters = mParameters->text();
}
else if ((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC))
{
mFaxOtherChannel = mChannel->text();
mFaxOtherMessage = mMessage->text();
mFaxOtherMessageParameters = mParameters->text();
}
else if ((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC))
{
mPagerOtherChannel = mChannel->text();
mPagerOtherMessage = mMessage->text();
mPagerOtherMessageParameters = mParameters->text();
}
+
}
void KDEPIMConfigWidget::updateClientWidgets()
{
bool blocked = signalsBlocked();
blockSignals( true );
// at this point we assume, that mCurrentApp and mCurrentClient are set to the values that we want to display
QMap<ExternalAppHandler::Types, QString>::Iterator it = mExternalAppsMap.find ( mCurrentApp );
if (it == mExternalAppsMap.end())
return;
// update group box
mExternalAppGroupBox->setTitle(i18n( "Used %1 Client" ).arg(it.data()));
//update the entries in the client combobox
mClient->clear();
QList<DefaultAppItem> items = ExternalAppHandler::instance()->getAvailableDefaultItems(mCurrentApp);
DefaultAppItem* dai;
for ( dai=items.first(); dai != 0; dai=items.next() )
{
mClient->insertItem( i18n(dai->_label), dai->_id );
@@ -477,48 +478,51 @@ void KDEPIMConfigWidget::saveSettings(KPimGlobalPrefs* prefs)
prefs->mEmailOtherMessageParameters2 = mEmailOtherMessageParameters2;
prefs->mPhoneClient = mPhoneClient;
prefs->mPhoneOtherChannel = mPhoneOtherChannel;
prefs->mPhoneOtherMessage = mPhoneOtherMessage;
prefs->mPhoneOtherMessageParameters = mPhoneOtherMessageParameters;
prefs->mFaxClient = mFaxClient;
prefs->mFaxOtherChannel = mFaxOtherChannel;
prefs->mFaxOtherMessage = mFaxOtherMessage;
prefs->mFaxOtherMessageParameters = mFaxOtherMessageParameters;
prefs->mSMSClient = mSMSClient;
prefs->mSMSOtherChannel = mSMSOtherChannel;
prefs->mSMSOtherMessage = mSMSOtherMessage;
prefs->mSMSOtherMessageParameters = mSMSOtherMessageParameters;
prefs->mPagerClient = mPagerClient;
prefs->mPagerOtherChannel = mPagerOtherChannel;
prefs->mPagerOtherMessage = mPagerOtherMessage;
prefs->mPagerOtherMessageParameters = mPagerOtherMessageParameters;
prefs->writeConfig();
+ //release the cache that other views can access the changed values instantanious
+ ExternalAppHandler::instance()->loadConfig();
+
emit changed( false );
}
void KDEPIMConfigWidget::defaults(KPimGlobalPrefs* prefs)
{
DefaultAppItem* dai = ExternalAppHandler::instance()->getDefaultItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::NONE_EMC);
mEmailClient = dai->_id;
mEmailOtherChannel = dai->_channel;
mEmailOtherMessage = dai->_message;
mEmailOtherMessageParameters = dai->_parameters;
mEmailOtherMessage2 = dai->_message2;
mEmailOtherMessageParameters2 = dai->_parameters2;
dai = ExternalAppHandler::instance()->getDefaultItem(ExternalAppHandler::PHONE, KPimGlobalPrefs::NONE_PHC);
mPhoneClient = dai->_id;
mPhoneOtherChannel = dai->_channel;
mPhoneOtherMessage = dai->_message;
mPhoneOtherMessageParameters = dai->_parameters;
dai = ExternalAppHandler::instance()->getDefaultItem(ExternalAppHandler::FAX, KPimGlobalPrefs::NONE_FAC);