diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-01 00:37:02 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-01 00:37:02 +0000 |
commit | cc29364f06178f8f6b457384f2ec37a042bd9d43 (patch) | |
tree | 7c77a3184c698bbf9d98cef09fb1ba8124daceba /kontact/src/main.cpp | |
parent | 4f6c584bacc8c3c694228f36ada3de77a76614a6 (diff) | |
download | tdepim-cc29364f06178f8f6b457384f2ec37a042bd9d43.tar.gz tdepim-cc29364f06178f8f6b457384f2ec37a042bd9d43.zip |
* Massive set of changes to bring in all fixes and enhancements from the Enterprise PIM branch
* Ensured that the Trinity changes were applied on top of those enhancements, and any redundancy removed
* Added journal read support to the CalDAV resource
* Fixed CalDAV resource to use events URL for tasks and journals when separate URL checkbox unchecked
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1170461 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kontact/src/main.cpp')
-rw-r--r-- | kontact/src/main.cpp | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/kontact/src/main.cpp b/kontact/src/main.cpp index c19872357..ee098180e 100644 --- a/kontact/src/main.cpp +++ b/kontact/src/main.cpp @@ -40,17 +40,21 @@ #include "alarmclient.h" #include "mainwindow.h" #include <uniqueapphandler.h> // in ../interfaces +#include "profilemanager.h" using namespace std; static const char description[] = I18N_NOOP( "KDE personal information manager" ); -static const char version[] = "1.2.9"; +static const char version[] = "1.2.9 (enterprise35 0.20100827.1168748)"; class KontactApp : public KUniqueApplication { public: - KontactApp() : mMainWindow( 0 ), mSessionRestored( false ) {} + KontactApp() : mMainWindow( 0 ), mSessionRestored( false ) + { + KGlobal::iconLoader()->addAppDir( "kdepim" ); + } ~KontactApp() {} int newInstance(); @@ -84,6 +88,14 @@ static void listPlugins() } } +static void listProfiles() +{ + TQValueList<Kontact::Profile> profiles = Kontact::ProfileManager::self()->profiles(); + for( TQValueListIterator<Kontact::Profile> it = profiles.begin() ; it != profiles.end(); ++it ) { + cout << (*it).name().latin1() << endl; + } +} + int KontactApp::newInstance() { KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); @@ -112,6 +124,16 @@ int KontactApp::newInstance() } } + if ( args->isSet( "profile" ) ) { + TQValueList<Kontact::Profile> profiles = Kontact::ProfileManager::self()->profiles(); + for( TQValueListIterator<Kontact::Profile> it = profiles.begin(); it != profiles.end(); ++it ){ + if( args->getOption("profile") == (*it).name().latin1() ) { + Kontact::ProfileManager::self()->loadProfile( (*it).id() ); + break; + } + } + } + AlarmClient alarmclient; alarmclient.startDaemon(); @@ -143,6 +165,11 @@ int main( int argc, char **argv ) return 0; } + if ( args->isSet( "listprofiles" ) ) { + listProfiles(); + return 0; + } + if ( !KontactApp::start() ) { // Already running, brought to the foreground. return 0; |