summaryrefslogtreecommitdiffabout
path: root/libkdepim
Side-by-side diff
Diffstat (limited to 'libkdepim') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/kcmconfigs/kdepimconfigwidget.cpp44
-rw-r--r--libkdepim/kcmconfigs/kdepimconfigwidget.h5
-rw-r--r--libkdepim/kpimglobalprefs.cpp7
-rw-r--r--libkdepim/kpimglobalprefs.h10
4 files changed, 63 insertions, 3 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
@@ -86,2 +86,3 @@ KDEPIMConfigWidget::KDEPIMConfigWidget( QWidget *parent, const char *name )
mExternalAppsMap.insert(ExternalAppHandler::PAGER, i18n("Pager"));
+ mExternalAppsMap.insert(ExternalAppHandler::SIP, i18n("SIP"));
@@ -201,2 +202,5 @@ void KDEPIMConfigWidget::externalapp_changed( int newApp )
break;
+ case(ExternalAppHandler::SIP):
+ mCurrentClient = mSipClient;
+ break;
default:
@@ -249,2 +253,5 @@ void KDEPIMConfigWidget::saveEditFieldSettings()
break;
+ case(ExternalAppHandler::SIP):
+ mSipClient = mClient->currentItem();
+ break;
default:
@@ -286,2 +293,8 @@ void KDEPIMConfigWidget::saveEditFieldSettings()
}
+ else if ((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC))
+ {
+ mSipOtherChannel = mChannel->text();
+ mSipOtherMessage = mMessage->text();
+ mSipOtherMessageParameters = mParameters->text();
+ }
@@ -355,2 +368,8 @@ void KDEPIMConfigWidget::updateClientWidgets()
}
+ else if ((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC))
+ {
+ mChannel->setText(mSipOtherChannel);
+ mMessage->setText(mSipOtherMessage);
+ mParameters->setText(mSipOtherMessageParameters);
+ }
}
@@ -365,3 +384,4 @@ void KDEPIMConfigWidget::updateClientWidgets()
||((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)))
{
@@ -378,3 +398,4 @@ void KDEPIMConfigWidget::updateClientWidgets()
||((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)))
{
@@ -460,2 +481,7 @@ void KDEPIMConfigWidget::restoreSettings(KPimGlobalPrefs* prefs)
+ mSipClient = prefs->mPagerClient;
+ mSipOtherChannel = prefs->mSipOtherChannel;
+ mSipOtherMessage = prefs->mSipOtherMessage;
+ mSipOtherMessageParameters = prefs->mSipOtherMessageParameters;
+
mCurrentApp = ExternalAppHandler::EMAIL;
@@ -502,2 +528,8 @@ void KDEPIMConfigWidget::saveSettings(KPimGlobalPrefs* prefs)
+
+ prefs->mSipClient = mSipClient;
+ prefs->mSipOtherChannel = mSipOtherChannel;
+ prefs->mSipOtherMessage = mSipOtherMessage;
+ prefs->mSipOtherMessageParameters = mSipOtherMessageParameters;
+
prefs->writeConfig();
@@ -552,2 +584,10 @@ void KDEPIMConfigWidget::defaults(KPimGlobalPrefs* prefs)
+ 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
@@ -132,2 +132,7 @@ class KDEPIMConfigWidget : public QWidget
+ int mSipClient;
+ QString mSipOtherChannel;
+ QString mSipOtherMessage;
+ QString mSipOtherMessageParameters;
+
diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp
index 7f683a8..eb8f1de 100644
--- a/libkdepim/kpimglobalprefs.cpp
+++ b/libkdepim/kpimglobalprefs.cpp
@@ -43,3 +43,3 @@ static KStaticDeleter<KPimGlobalPrefs> staticDeleter;
KPimGlobalPrefs::KPimGlobalPrefs( const QString &name )
- : KPrefs("kkdepimrc")
+ : KPrefs("microkdeglobalrc")
{
@@ -74,2 +74,7 @@ KPimGlobalPrefs::KPimGlobalPrefs( const QString &name )
+ addItemInt( "SIPChannelType", &mSipClient, NONE_SIC );
+ addItemString( "SIPChannel", &mSipOtherChannel, "" );
+ addItemString( "SIPChannelMessage", &mSipOtherMessage, "" );
+ addItemString( "SIPChannelParameters", &mSipOtherMessageParameters, "" );
+
}
diff --git a/libkdepim/kpimglobalprefs.h b/libkdepim/kpimglobalprefs.h
index 80b2c4f..8bd543d 100644
--- a/libkdepim/kpimglobalprefs.h
+++ b/libkdepim/kpimglobalprefs.h
@@ -74,2 +74,7 @@ class KPimGlobalPrefs : public KPrefs
+ enum SIPClients {
+ NONE_SIC = 0,
+ OTHER_SIC = 1
+ };
+
private:
@@ -108,2 +113,7 @@ class KPimGlobalPrefs : public KPrefs
+ int mSipClient;
+ QString mSipOtherChannel;
+ QString mSipOtherMessage;
+ QString mSipOtherMessageParameters;
+