summaryrefslogtreecommitdiffabout
path: root/libkdepim/kcmconfigs
Side-by-side diff
Diffstat (limited to 'libkdepim/kcmconfigs') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/kcmconfigs/kdepimconfigwidget.cpp44
-rw-r--r--libkdepim/kcmconfigs/kdepimconfigwidget.h5
2 files changed, 47 insertions, 2 deletions
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
index 4f4cc6a..703aeb1 100644
--- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
+++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
@@ -84,6 +84,7 @@ KDEPIMConfigWidget::KDEPIMConfigWidget( QWidget *parent, const char *name )
mExternalAppsMap.insert(ExternalAppHandler::SMS, i18n("SMS"));
mExternalAppsMap.insert(ExternalAppHandler::FAX, i18n("Fax"));
mExternalAppsMap.insert(ExternalAppHandler::PAGER, i18n("Pager"));
+ mExternalAppsMap.insert(ExternalAppHandler::SIP, i18n("SIP"));
QVBoxLayout *topLayout = new QVBoxLayout( this, 0,
@@ -199,6 +200,9 @@ void KDEPIMConfigWidget::externalapp_changed( int newApp )
case(ExternalAppHandler::PAGER):
mCurrentClient = mPagerClient;
break;
+ case(ExternalAppHandler::SIP):
+ mCurrentClient = mSipClient;
+ break;
default:
return;
}
@@ -247,6 +251,9 @@ void KDEPIMConfigWidget::saveEditFieldSettings()
case(ExternalAppHandler::PAGER):
mPagerClient = mClient->currentItem();
break;
+ case(ExternalAppHandler::SIP):
+ mSipClient = mClient->currentItem();
+ break;
default:
return;
}
@@ -284,6 +291,12 @@ void KDEPIMConfigWidget::saveEditFieldSettings()
mPagerOtherMessage = mMessage->text();
mPagerOtherMessageParameters = mParameters->text();
}
+ else if ((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC))
+ {
+ mSipOtherChannel = mChannel->text();
+ mSipOtherMessage = mMessage->text();
+ mSipOtherMessageParameters = mParameters->text();
+ }
}
@@ -353,6 +366,12 @@ void KDEPIMConfigWidget::updateClientWidgets()
mMessage->setText(mPagerOtherMessage);
mParameters->setText(mPagerOtherMessageParameters);
}
+ else if ((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC))
+ {
+ mChannel->setText(mSipOtherChannel);
+ mMessage->setText(mSipOtherMessage);
+ mParameters->setText(mSipOtherMessageParameters);
+ }
}
}
@@ -363,7 +382,8 @@ void KDEPIMConfigWidget::updateClientWidgets()
||((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::OTHER_PHC))
||((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::OTHER_SMC))
||((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::OTHER_FAC))
- ||((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC)))
+ ||((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::OTHER_PAC))
+ ||((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC)))
{
readonly = false;
}
@@ -376,7 +396,8 @@ void KDEPIMConfigWidget::updateClientWidgets()
||((mCurrentApp == ExternalAppHandler::PHONE) && (mCurrentClient == KPimGlobalPrefs::NONE_PHC))
||((mCurrentApp == ExternalAppHandler::SMS) && (mCurrentClient == KPimGlobalPrefs::NONE_SMC))
||((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::NONE_FAC))
- ||((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::NONE_PAC)))
+ ||((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::NONE_PAC))
+ ||((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::NONE_SIC)))
{
enabled = false;
}
@@ -458,6 +479,11 @@ void KDEPIMConfigWidget::restoreSettings(KPimGlobalPrefs* prefs)
mPagerOtherMessage = prefs->mPagerOtherMessage;
mPagerOtherMessageParameters = prefs->mPagerOtherMessageParameters;
+ mSipClient = prefs->mPagerClient;
+ mSipOtherChannel = prefs->mSipOtherChannel;
+ mSipOtherMessage = prefs->mSipOtherMessage;
+ mSipOtherMessageParameters = prefs->mSipOtherMessageParameters;
+
mCurrentApp = ExternalAppHandler::EMAIL;
mCurrentClient = mEmailClient;
@@ -500,6 +526,12 @@ void KDEPIMConfigWidget::saveSettings(KPimGlobalPrefs* prefs)
prefs->mPagerOtherMessage = mPagerOtherMessage;
prefs->mPagerOtherMessageParameters = mPagerOtherMessageParameters;
+
+ prefs->mSipClient = mSipClient;
+ prefs->mSipOtherChannel = mSipOtherChannel;
+ prefs->mSipOtherMessage = mSipOtherMessage;
+ prefs->mSipOtherMessageParameters = mSipOtherMessageParameters;
+
prefs->writeConfig();
//release the cache that other views can access the changed values instantanious
@@ -550,6 +582,14 @@ void KDEPIMConfigWidget::defaults(KPimGlobalPrefs* prefs)
mPagerOtherMessageParameters = dai->_parameters;
+ dai = ExternalAppHandler::instance()->getDefaultItem(ExternalAppHandler::SIP, KPimGlobalPrefs::NONE_SIC);
+
+ mSipClient = dai->_id;
+ mSipOtherChannel = dai->_channel;
+ mSipOtherMessage = dai->_message;
+ mSipOtherMessageParameters = dai->_parameters;
+
+
emit changed( true );
}
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.h b/libkdepim/kcmconfigs/kdepimconfigwidget.h
index 6e02544..e3cfd81 100644
--- a/libkdepim/kcmconfigs/kdepimconfigwidget.h
+++ b/libkdepim/kcmconfigs/kdepimconfigwidget.h
@@ -130,6 +130,11 @@ class KDEPIMConfigWidget : public QWidget
QString mPagerOtherMessage;
QString mPagerOtherMessageParameters;
+ int mSipClient;
+ QString mSipOtherChannel;
+ QString mSipOtherMessage;
+ QString mSipOtherMessageParameters;
+
QMap<ExternalAppHandler::Types, QString> mExternalAppsMap;