summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show 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
@@ -85,4 +85,5 @@ KDEPIMConfigWidget::KDEPIMConfigWidget( QWidget *parent, const char *name )
mExternalAppsMap.insert(ExternalAppHandler::FAX, i18n("Fax"));
mExternalAppsMap.insert(ExternalAppHandler::PAGER, i18n("Pager"));
+ mExternalAppsMap.insert(ExternalAppHandler::SIP, i18n("SIP"));
@@ -200,4 +201,7 @@ void KDEPIMConfigWidget::externalapp_changed( int newApp )
mCurrentClient = mPagerClient;
break;
+ case(ExternalAppHandler::SIP):
+ mCurrentClient = mSipClient;
+ break;
default:
return;
@@ -248,4 +252,7 @@ void KDEPIMConfigWidget::saveEditFieldSettings()
mPagerClient = mClient->currentItem();
break;
+ case(ExternalAppHandler::SIP):
+ mSipClient = mClient->currentItem();
+ break;
default:
return;
@@ -285,4 +292,10 @@ void KDEPIMConfigWidget::saveEditFieldSettings()
mPagerOtherMessageParameters = mParameters->text();
}
+ else if ((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC))
+ {
+ mSipOtherChannel = mChannel->text();
+ mSipOtherMessage = mMessage->text();
+ mSipOtherMessageParameters = mParameters->text();
+ }
@@ -354,4 +367,10 @@ void KDEPIMConfigWidget::updateClientWidgets()
mParameters->setText(mPagerOtherMessageParameters);
}
+ else if ((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::OTHER_SIC))
+ {
+ mChannel->setText(mSipOtherChannel);
+ mMessage->setText(mSipOtherMessage);
+ mParameters->setText(mSipOtherMessageParameters);
+ }
}
@@ -364,5 +383,6 @@ void KDEPIMConfigWidget::updateClientWidgets()
||((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;
@@ -377,5 +397,6 @@ void KDEPIMConfigWidget::updateClientWidgets()
||((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;
@@ -459,4 +480,9 @@ void KDEPIMConfigWidget::restoreSettings(KPimGlobalPrefs* prefs)
mPagerOtherMessageParameters = prefs->mPagerOtherMessageParameters;
+ mSipClient = prefs->mPagerClient;
+ mSipOtherChannel = prefs->mSipOtherChannel;
+ mSipOtherMessage = prefs->mSipOtherMessage;
+ mSipOtherMessageParameters = prefs->mSipOtherMessageParameters;
+
mCurrentApp = ExternalAppHandler::EMAIL;
mCurrentClient = mEmailClient;
@@ -501,4 +527,10 @@ void KDEPIMConfigWidget::saveSettings(KPimGlobalPrefs* prefs)
prefs->mPagerOtherMessageParameters = mPagerOtherMessageParameters;
+
+ prefs->mSipClient = mSipClient;
+ prefs->mSipOtherChannel = mSipOtherChannel;
+ prefs->mSipOtherMessage = mSipOtherMessage;
+ prefs->mSipOtherMessageParameters = mSipOtherMessageParameters;
+
prefs->writeConfig();
@@ -551,4 +583,12 @@ 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
@@ -131,4 +131,9 @@ class KDEPIMConfigWidget : public QWidget
QString mPagerOtherMessageParameters;
+ 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
@@ -42,5 +42,5 @@ static KStaticDeleter<KPimGlobalPrefs> staticDeleter;
KPimGlobalPrefs::KPimGlobalPrefs( const QString &name )
- : KPrefs("kkdepimrc")
+ : KPrefs("microkdeglobalrc")
{
KPrefs::setCurrentGroup( "ExternalApplications" );
@@ -73,4 +73,9 @@ KPimGlobalPrefs::KPimGlobalPrefs( const QString &name )
addItemString( "PagerChannelParameters", &mPagerOtherMessageParameters, "" );
+ 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
@@ -73,4 +73,9 @@ class KPimGlobalPrefs : public KPrefs
};
+ enum SIPClients {
+ NONE_SIC = 0,
+ OTHER_SIC = 1
+ };
+
private:
KPimGlobalPrefs( const QString &name = QString::null );
@@ -107,4 +112,9 @@ class KPimGlobalPrefs : public KPrefs
QString mPagerOtherMessageParameters;
+ int mSipClient;
+ QString mSipOtherChannel;
+ QString mSipOtherMessage;
+ QString mSipOtherMessageParameters;
+
};