summaryrefslogtreecommitdiffabout
path: root/korganizer/mainwindow.cpp
Unidiff
Diffstat (limited to 'korganizer/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 589ab2d..d0d1f3b 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -800,61 +800,63 @@ void MainWindow::initActions()
800 configureToolBarMenu->setItemChecked( 300, true ); 800 configureToolBarMenu->setItemChecked( 300, true );
801 801
802 QLabel* dummy = new QLabel( iconToolBar ); 802 QLabel* dummy = new QLabel( iconToolBar );
803 dummy->setBackgroundColor( iconToolBar->backgroundColor() ); 803 dummy->setBackgroundColor( iconToolBar->backgroundColor() );
804 if (!p-> mShowIconStretch) 804 if (!p-> mShowIconStretch)
805 iconToolBar->setStretchableWidget ( dummy ) ; 805 iconToolBar->setStretchableWidget ( dummy ) ;
806 else 806 else
807 configureToolBarMenu->setItemChecked( 5, true ); 807 configureToolBarMenu->setItemChecked( 5, true );
808 if (p-> mShowIconWhatsThis) 808 if (p-> mShowIconWhatsThis)
809 QWhatsThis::whatsThisButton ( iconToolBar ); 809 QWhatsThis::whatsThisButton ( iconToolBar );
810 connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); 810 connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) );
811 configureAgenda( p->mHourSize ); 811 configureAgenda( p->mHourSize );
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;
849 if ( !app_dir.exists(QDir::homeDirPath()+"/Applications/dtm" ) ) { 851 if ( !app_dir.exists(QDir::homeDirPath()+"/Applications/dtm" ) ) {
850 syncMenu->setItemEnabled( false , 1000 ); 852 syncMenu->setItemEnabled( false , 1000 );
851 } 853 }
852} 854}
853 855
854int MainWindow::ringSync() 856int MainWindow::ringSync()
855{ 857{
856 int syncedProfiles = 0; 858 int syncedProfiles = 0;
857 int i; 859 int i;
858 QTime timer; 860 QTime timer;
859 KConfig *config = KOGlobals::config(); 861 KConfig *config = KOGlobals::config();
860 QStringList syncProfileNames = KOPrefs::instance()->mSyncProfileNames; 862 QStringList syncProfileNames = KOPrefs::instance()->mSyncProfileNames;