From cc29364f06178f8f6b457384f2ec37a042bd9d43 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 1 Sep 2010 00:37:02 +0000 Subject: * 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 --- kontact/src/main.cpp | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) (limited to 'kontact/src/main.cpp') 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 // 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 profiles = Kontact::ProfileManager::self()->profiles(); + for( TQValueListIterator 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 profiles = Kontact::ProfileManager::self()->profiles(); + for( TQValueListIterator 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; -- cgit v1.2.1