summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp1
-rw-r--r--korganizer/mainwindow.cpp4
2 files changed, 3 insertions, 2 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 387b751..cfc6b10 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -680,25 +680,24 @@ void CalendarView::createPrinter()
680 mCalPrinter = new CalPrinter(this, mCalendar); 680 mCalPrinter = new CalPrinter(this, mCalendar);
681 connect(this, SIGNAL(configChanged()), mCalPrinter, SLOT(updateConfig())); 681 connect(this, SIGNAL(configChanged()), mCalPrinter, SLOT(updateConfig()));
682 } 682 }
683#endif 683#endif
684} 684}
685 685
686void CalendarView::confSync() 686void CalendarView::confSync()
687{ 687{
688 static KSyncPrefsDialog* sp = 0; 688 static KSyncPrefsDialog* sp = 0;
689 if ( ! sp ) { 689 if ( ! sp ) {
690 sp = new KSyncPrefsDialog( this, "syncprefs", true ); 690 sp = new KSyncPrefsDialog( this, "syncprefs", true );
691 } 691 }
692 sp->setLocalMachineName ( KOPrefs::instance()->mLocalMachineName );
693 sp->usrReadConfig(); 692 sp->usrReadConfig();
694#ifndef DESKTOP_VERSION 693#ifndef DESKTOP_VERSION
695 sp->showMaximized(); 694 sp->showMaximized();
696#else 695#else
697 sp->show(); 696 sp->show();
698#endif 697#endif
699 sp->exec(); 698 sp->exec();
700 KOPrefs::instance()->mSyncProfileNames = sp->getSyncProfileNames(); 699 KOPrefs::instance()->mSyncProfileNames = sp->getSyncProfileNames();
701 KOPrefs::instance()->mLocalMachineName = sp->getLocalMachineName (); 700 KOPrefs::instance()->mLocalMachineName = sp->getLocalMachineName ();
702} 701}
703 702
704 703
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 589ab2d..d0d1f3b 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -812,37 +812,39 @@ void MainWindow::initActions()
812 connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) ); 812 connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) );
813} 813}
814void MainWindow::fillSyncMenu() 814void MainWindow::fillSyncMenu()
815{ 815{
816 syncMenu->clear(); 816 syncMenu->clear();
817 syncMenu->insertItem( i18n("Configure..."), 0 ); 817 syncMenu->insertItem( i18n("Configure..."), 0 );
818 syncMenu->insertSeparator(); 818 syncMenu->insertSeparator();
819 syncMenu->insertItem( i18n("Multiple sync"), 1 ); 819 syncMenu->insertItem( i18n("Multiple sync"), 1 );
820 syncMenu->insertSeparator(); 820 syncMenu->insertSeparator();
821 KConfig config ( locateLocal( "config","syncprofilesrc" ) ); 821 KConfig config ( locateLocal( "config","syncprofilesrc" ) );
822 config.setGroup("SyncProfiles"); 822 config.setGroup("SyncProfiles");
823 QStringList prof = config.readListEntry("SyncProfileNames"); 823 QStringList prof = config.readListEntry("SyncProfileNames");
824 824 KOPrefs::instance()->mLocalMachineName = config.readEntry("LocalMachineName","undefined");
825 if ( prof.count() < 3 ) { 825 if ( prof.count() < 3 ) {
826 prof.clear(); 826 prof.clear();
827 prof << i18n("Sharp-DTM"); 827 prof << i18n("Sharp-DTM");
828 prof << i18n("Local file"); 828 prof << i18n("Local file");
829 prof << i18n("Last file"); 829 prof << i18n("Last file");
830 KSyncProfile* temp = new KSyncProfile (); 830 KSyncProfile* temp = new KSyncProfile ();
831 temp->setName( prof[0] ); 831 temp->setName( prof[0] );
832 temp->writeConfig(&config); 832 temp->writeConfig(&config);
833 temp->setName( prof[1] ); 833 temp->setName( prof[1] );
834 temp->writeConfig(&config); 834 temp->writeConfig(&config);
835 temp->setName( prof[2] ); 835 temp->setName( prof[2] );
836 temp->writeConfig(&config); 836 temp->writeConfig(&config);
837 config.setGroup("SyncProfiles");
838 config.writeEntry("SyncProfileNames",prof);
837 config.sync(); 839 config.sync();
838 delete temp; 840 delete temp;
839 } 841 }
840 KOPrefs::instance()->mSyncProfileNames = prof; 842 KOPrefs::instance()->mSyncProfileNames = prof;
841 int i; 843 int i;
842 for ( i = 0; i < prof.count(); ++i ) { 844 for ( i = 0; i < prof.count(); ++i ) {
843 845
844 syncMenu->insertItem( prof[i], 1000+i ); 846 syncMenu->insertItem( prof[i], 1000+i );
845 if ( i == 2 ) 847 if ( i == 2 )
846 syncMenu->insertSeparator(); 848 syncMenu->insertSeparator();
847 } 849 }
848 QDir app_dir; 850 QDir app_dir;