summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-09-08 10:12:21 (UTC)
committer zautrix <zautrix>2004-09-08 10:12:21 (UTC)
commitcdff4506a9148c47406af86968da73c0dbfca0ba (patch) (unidiff)
tree10cf9302bfd14d768005e7ac3192f936364bd77d
parent848c77f86b7105095b27a6034a0fefac8a7a0891 (diff)
downloadkdepimpi-cdff4506a9148c47406af86968da73c0dbfca0ba.zip
kdepimpi-cdff4506a9148c47406af86968da73c0dbfca0ba.tar.gz
kdepimpi-cdff4506a9148c47406af86968da73c0dbfca0ba.tar.bz2
Changing sync profiles filename
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp6
-rw-r--r--libkdepim/ksyncprefsdialog.cpp4
2 files changed, 5 insertions, 5 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 7978b46..9e326a1 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -847,25 +847,25 @@ void MainWindow::initActions()
847 QWhatsThis::whatsThisButton ( iconToolBar ); 847 QWhatsThis::whatsThisButton ( iconToolBar );
848 connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); 848 connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) );
849 configureAgenda( p->mHourSize ); 849 configureAgenda( p->mHourSize );
850 connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) ); 850 connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) );
851} 851}
852void MainWindow::fillSyncMenu() 852void MainWindow::fillSyncMenu()
853{ 853{
854 syncMenu->clear(); 854 syncMenu->clear();
855 syncMenu->insertItem( i18n("Configure..."), 0 ); 855 syncMenu->insertItem( i18n("Configure..."), 0 );
856 syncMenu->insertSeparator(); 856 syncMenu->insertSeparator();
857 syncMenu->insertItem( i18n("Multiple sync"), 1 ); 857 syncMenu->insertItem( i18n("Multiple sync"), 1 );
858 syncMenu->insertSeparator(); 858 syncMenu->insertSeparator();
859 KConfig config ( locateLocal( "config","syncprofilesrc" ) ); 859 KConfig config ( locateLocal( "config","ksyncprofilesrc" ) );
860 config.setGroup("General"); 860 config.setGroup("General");
861 QStringList prof = config.readListEntry("SyncProfileNames"); 861 QStringList prof = config.readListEntry("SyncProfileNames");
862 KOPrefs::instance()->mLocalMachineName = config.readEntry("LocalMachineName","undefined"); 862 KOPrefs::instance()->mLocalMachineName = config.readEntry("LocalMachineName","undefined");
863 if ( prof.count() < 3 ) { 863 if ( prof.count() < 3 ) {
864 prof.clear(); 864 prof.clear();
865 prof << i18n("Sharp_DTM"); 865 prof << i18n("Sharp_DTM");
866 prof << i18n("Local_file"); 866 prof << i18n("Local_file");
867 prof << i18n("Last_file"); 867 prof << i18n("Last_file");
868 KSyncProfile* temp = new KSyncProfile (); 868 KSyncProfile* temp = new KSyncProfile ();
869 temp->setName( prof[0] ); 869 temp->setName( prof[0] );
870 temp->writeConfig(&config); 870 temp->writeConfig(&config);
871 temp->setName( prof[1] ); 871 temp->setName( prof[1] );
@@ -890,25 +890,25 @@ void MainWindow::fillSyncMenu()
890 QDir app_dir; 890 QDir app_dir;
891 if ( !app_dir.exists(QDir::homeDirPath()+"/Applications/dtm" ) ) { 891 if ( !app_dir.exists(QDir::homeDirPath()+"/Applications/dtm" ) ) {
892 syncMenu->setItemEnabled( false , 1000 ); 892 syncMenu->setItemEnabled( false , 1000 );
893 } 893 }
894 mView->setupExternSyncProfiles(); 894 mView->setupExternSyncProfiles();
895} 895}
896 896
897int MainWindow::ringSync() 897int MainWindow::ringSync()
898{ 898{
899 int syncedProfiles = 0; 899 int syncedProfiles = 0;
900 int i; 900 int i;
901 QTime timer; 901 QTime timer;
902 KConfig config ( locateLocal( "config","syncprofilesrc" ) ); 902 KConfig config ( locateLocal( "config","ksyncprofilesrc" ) );
903 QStringList syncProfileNames = KOPrefs::instance()->mSyncProfileNames; 903 QStringList syncProfileNames = KOPrefs::instance()->mSyncProfileNames;
904 KSyncProfile* temp = new KSyncProfile (); 904 KSyncProfile* temp = new KSyncProfile ();
905 KOPrefs::instance()->mAskForPreferences = false; 905 KOPrefs::instance()->mAskForPreferences = false;
906 for ( i = 0; i < syncProfileNames.count(); ++i ) { 906 for ( i = 0; i < syncProfileNames.count(); ++i ) {
907 mCurrentSyncProfile = i; 907 mCurrentSyncProfile = i;
908 temp->setName(syncProfileNames[mCurrentSyncProfile]); 908 temp->setName(syncProfileNames[mCurrentSyncProfile]);
909 temp->readConfig(&config); 909 temp->readConfig(&config);
910 if ( temp->getIncludeInRingSync() && ( i < 1 || i > 2 )) { 910 if ( temp->getIncludeInRingSync() && ( i < 1 || i > 2 )) {
911 setCaption(i18n("Profile ")+syncProfileNames[mCurrentSyncProfile]+ i18n(" is synced ... ")); 911 setCaption(i18n("Profile ")+syncProfileNames[mCurrentSyncProfile]+ i18n(" is synced ... "));
912 ++syncedProfiles; 912 ++syncedProfiles;
913 // KOPrefs::instance()->mAskForPreferences = temp->getAskForPreferences(); 913 // KOPrefs::instance()->mAskForPreferences = temp->getAskForPreferences();
914 KOPrefs::instance()->mWriteBackFile = temp->getWriteBackFile(); 914 KOPrefs::instance()->mWriteBackFile = temp->getWriteBackFile();
@@ -994,25 +994,25 @@ void MainWindow::slotSyncMenu( int action )
994 } 994 }
995 if ( action == 1 ) { 995 if ( action == 1 ) {
996 multiSync( true ); 996 multiSync( true );
997 return; 997 return;
998 } 998 }
999 999
1000 if (mBlockSaveFlag) 1000 if (mBlockSaveFlag)
1001 return; 1001 return;
1002 mBlockSaveFlag = true; 1002 mBlockSaveFlag = true;
1003 mCurrentSyncProfile = action - 1000 ; 1003 mCurrentSyncProfile = action - 1000 ;
1004 mView->setSyncDevice(KOPrefs::instance()->mSyncProfileNames[mCurrentSyncProfile] ); 1004 mView->setSyncDevice(KOPrefs::instance()->mSyncProfileNames[mCurrentSyncProfile] );
1005 mView->setSyncName( KOPrefs::instance()->mLocalMachineName ); 1005 mView->setSyncName( KOPrefs::instance()->mLocalMachineName );
1006 KConfig config ( locateLocal( "config","syncprofilesrc" ) ); 1006 KConfig config ( locateLocal( "config","ksyncprofilesrc" ) );
1007 KSyncProfile* temp = new KSyncProfile (); 1007 KSyncProfile* temp = new KSyncProfile ();
1008 temp->setName(KOPrefs::instance()->mSyncProfileNames[mCurrentSyncProfile]); 1008 temp->setName(KOPrefs::instance()->mSyncProfileNames[mCurrentSyncProfile]);
1009 temp->readConfig(&config); 1009 temp->readConfig(&config);
1010 KOPrefs::instance()->mAskForPreferences = temp->getAskForPreferences(); 1010 KOPrefs::instance()->mAskForPreferences = temp->getAskForPreferences();
1011 KOPrefs::instance()->mSyncAlgoPrefs = temp->getSyncPrefs(); 1011 KOPrefs::instance()->mSyncAlgoPrefs = temp->getSyncPrefs();
1012 KOPrefs::instance()->mWriteBackFile = temp->getWriteBackFile(); 1012 KOPrefs::instance()->mWriteBackFile = temp->getWriteBackFile();
1013 KOPrefs::instance()->mWriteBackExistingOnly = temp->getWriteBackExisting(); 1013 KOPrefs::instance()->mWriteBackExistingOnly = temp->getWriteBackExisting();
1014 KOPrefs::instance()->mShowSyncSummary = temp->getShowSummaryAfterSync(); 1014 KOPrefs::instance()->mShowSyncSummary = temp->getShowSummaryAfterSync();
1015 if ( action == 1000 ) { 1015 if ( action == 1000 ) {
1016 syncSharp(); 1016 syncSharp();
1017 1017
1018 } else if ( action == 1001 ) { 1018 } else if ( action == 1001 ) {
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp
index 67a3f52..857ceac 100644
--- a/libkdepim/ksyncprefsdialog.cpp
+++ b/libkdepim/ksyncprefsdialog.cpp
@@ -533,49 +533,49 @@ void KSyncPrefsDialog::setLocalMachineName ( const QString& name )
533QString KSyncPrefsDialog::getLocalMachineName ( ) 533QString KSyncPrefsDialog::getLocalMachineName ( )
534{ 534{
535 return mMyMachineName->text(); 535 return mMyMachineName->text();
536} 536}
537 537
538QStringList KSyncPrefsDialog::getSyncProfileNames() 538QStringList KSyncPrefsDialog::getSyncProfileNames()
539{ 539{
540 return mSyncProfileNames; 540 return mSyncProfileNames;
541} 541}
542void KSyncPrefsDialog::usrReadConfig() 542void KSyncPrefsDialog::usrReadConfig()
543{ 543{
544 //KConfig *config = KOGlobals::config(); 544 //KConfig *config = KOGlobals::config();
545 KConfig config ( locateLocal( "config","syncprofilesrc" ) ); 545 KConfig config ( locateLocal( "config","ksyncprofilesrc" ) );
546 config.setGroup("General"); 546 config.setGroup("General");
547 mSyncProfileNames =config.readListEntry("SyncProfileNames"); 547 mSyncProfileNames =config.readListEntry("SyncProfileNames");
548 mMyMachineName->setText(config.readEntry("LocalMachineName","undefined")); 548 mMyMachineName->setText(config.readEntry("LocalMachineName","undefined"));
549 int i; 549 int i;
550 KSyncProfile* temp ; 550 KSyncProfile* temp ;
551 mSyncProfiles.clear(); 551 mSyncProfiles.clear();
552 for ( i = 0; i < mSyncProfileNames.count();++i ) { 552 for ( i = 0; i < mSyncProfileNames.count();++i ) {
553 temp = new KSyncProfile (); 553 temp = new KSyncProfile ();
554 temp->setName( mSyncProfileNames[i] ); 554 temp->setName( mSyncProfileNames[i] );
555 temp->readConfig( &config ); 555 temp->readConfig( &config );
556 mSyncProfiles.append( temp ); 556 mSyncProfiles.append( temp );
557 } 557 }
558 insertProfiles(); 558 insertProfiles();
559 //mMyMachineName->setText(KOPrefs::instance()->mLocalMachineName ); 559 //mMyMachineName->setText(KOPrefs::instance()->mLocalMachineName );
560} 560}
561 561
562 562
563void KSyncPrefsDialog::usrWriteConfig() 563void KSyncPrefsDialog::usrWriteConfig()
564{ 564{
565 saveProfile(); 565 saveProfile();
566 if ( currentSelection >= 0 ) 566 if ( currentSelection >= 0 )
567 profileChanged(currentSelection); 567 profileChanged(currentSelection);
568 //KConfig *config = KOGlobals::config(); 568 //KConfig *config = KOGlobals::config();
569 KConfig config ( locateLocal( "config","syncprofilesrc" ) ); 569 KConfig config ( locateLocal( "config","ksyncprofilesrc" ) );
570 KSyncProfile* prof = mSyncProfiles.first(); 570 KSyncProfile* prof = mSyncProfiles.first();
571 QStringList externalSyncProfileNames; 571 QStringList externalSyncProfileNames;
572 externalSyncProfileNames.append("Sharp_DTM");; 572 externalSyncProfileNames.append("Sharp_DTM");;
573 while ( prof ) { 573 while ( prof ) {
574 prof->writeConfig(&config); 574 prof->writeConfig(&config);
575 if ( prof->getIsPhoneSync( ) ) 575 if ( prof->getIsPhoneSync( ) )
576 externalSyncProfileNames.append(prof->getName( ) ); 576 externalSyncProfileNames.append(prof->getName( ) );
577 prof = mSyncProfiles.next(); 577 prof = mSyncProfiles.next();
578 } 578 }
579 //KOPrefs::instance()->mSyncProfileNames = mSyncProfileNames; 579 //KOPrefs::instance()->mSyncProfileNames = mSyncProfileNames;
580 //KOPrefs::instance()->mLocalMachineName = mMyMachineName->text(); 580 //KOPrefs::instance()->mLocalMachineName = mMyMachineName->text();
581 config.setGroup("General"); 581 config.setGroup("General");