summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 9e326a1..d8aa43a 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -848,12 +848,13 @@ void MainWindow::initActions()
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 if ( syncMenu->count() )
854 syncMenu->clear(); 855 syncMenu->clear();
855 syncMenu->insertItem( i18n("Configure..."), 0 ); 856 syncMenu->insertItem( i18n("Configure..."), 0 );
856 syncMenu->insertSeparator(); 857 syncMenu->insertSeparator();
857 syncMenu->insertItem( i18n("Multiple sync"), 1 ); 858 syncMenu->insertItem( i18n("Multiple sync"), 1 );
858 syncMenu->insertSeparator(); 859 syncMenu->insertSeparator();
859 KConfig config ( locateLocal( "config","ksyncprofilesrc" ) ); 860 KConfig config ( locateLocal( "config","ksyncprofilesrc" ) );
@@ -985,13 +986,18 @@ void MainWindow::multiSync( bool askforPrefs )
985} 986}
986void MainWindow::slotSyncMenu( int action ) 987void MainWindow::slotSyncMenu( int action )
987{ 988{
988 //qDebug("syncaction %d ", action); 989 //qDebug("syncaction %d ", action);
989 if ( action == 0 ) { 990 if ( action == 0 ) {
990 991
991 confSync(); 992 // seems to be a Qt2 event handling bug
993 // syncmenu.clear causes a segfault at first time
994 // when we call it after the main event loop, it is ok
995 // same behaviour when calling OM/Pi via QCOP for the first time
996 QTimer::singleShot ( 1, this, SLOT ( confSync() ) );
997 //confSync();
992 998
993 return; 999 return;
994 } 1000 }
995 if ( action == 1 ) { 1001 if ( action == 1 ) {
996 multiSync( true ); 1002 multiSync( true );
997 return; 1003 return;
@@ -1909,15 +1915,12 @@ void MainWindow::quickSyncLocalFile()
1909} 1915}
1910 1916
1911void MainWindow::confSync() 1917void MainWindow::confSync()
1912{ 1918{
1913 mView->confSync(); 1919 mView->confSync();
1914 fillSyncMenu(); 1920 fillSyncMenu();
1915 //mView->writeSettings();
1916
1917
1918} 1921}
1919void MainWindow::syncRemote( KSyncProfile* prof, bool ask) 1922void MainWindow::syncRemote( KSyncProfile* prof, bool ask)
1920{ 1923{
1921 QString question; 1924 QString question;
1922 if ( ask ) { 1925 if ( ask ) {
1923 question = i18n("Do you really want\nto remote sync\nwith profile \n")+ prof->getName()+" ?\n"; 1926 question = i18n("Do you really want\nto remote sync\nwith profile \n")+ prof->getName()+" ?\n";