summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-01-26 00:32:18 (UTC)
committer zautrix <zautrix>2005-01-26 00:32:18 (UTC)
commitc3ec0a5a43fb328f2d190b8adee1ef662746fb41 (patch) (unidiff)
treedd34f587205f8567a59bf7abb6161e1ba6667444 /korganizer
parenteeb9059d1cbf2ffb13300d0491b4b61126507373 (diff)
downloadkdepimpi-c3ec0a5a43fb328f2d190b8adee1ef662746fb41.zip
kdepimpi-c3ec0a5a43fb328f2d190b8adee1ef662746fb41.tar.gz
kdepimpi-c3ec0a5a43fb328f2d190b8adee1ef662746fb41.tar.bz2
debug fixes
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp21
-rw-r--r--korganizer/mainwindow.cpp3
2 files changed, 13 insertions, 11 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 038da54..06454c2 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -945,13 +945,13 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
945 local->resetTempSyncStat(); 945 local->resetTempSyncStat();
946 mLastCalendarSync = QDateTime::currentDateTime(); 946 mLastCalendarSync = QDateTime::currentDateTime();
947 if ( mSyncManager->syncWithDesktop() ) { 947 if ( mSyncManager->syncWithDesktop() ) {
948 remote->resetPilotStat(1); 948 remote->resetPilotStat(1);
949 if ( KSyncManager::mRequestedSyncEvent.isValid() ) { 949 if ( KSyncManager::mRequestedSyncEvent.isValid() ) {
950 mLastCalendarSync = KSyncManager::mRequestedSyncEvent; 950 mLastCalendarSync = KSyncManager::mRequestedSyncEvent;
951 qDebug("using extern time for calendar sync: %s ", mLastCalendarSync.toString().latin1() ); 951 qDebug("KO: using extern time for calendar sync: %s ", mLastCalendarSync.toString().latin1() );
952 } else { 952 } else {
953 qDebug("KSyncManager::mRequestedSyncEvent has invalid datatime "); 953 qDebug("KSyncManager::mRequestedSyncEvent has invalid datatime ");
954 } 954 }
955 } 955 }
956 QDateTime modifiedCalendar = mLastCalendarSync; 956 QDateTime modifiedCalendar = mLastCalendarSync;
957 eventLSync = getLastSyncEvent(); 957 eventLSync = getLastSyncEvent();
@@ -994,13 +994,13 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
994 // for resyncing if own file has changed 994 // for resyncing if own file has changed
995 if ( mCurrentSyncDevice == "deleteaftersync" ) { 995 if ( mCurrentSyncDevice == "deleteaftersync" ) {
996 mLastCalendarSync = loadedFileVersion; 996 mLastCalendarSync = loadedFileVersion;
997 //qDebug("setting mLastCalendarSync "); 997 //qDebug("setting mLastCalendarSync ");
998 } 998 }
999 //qDebug("*************************** "); 999 //qDebug("*************************** ");
1000 qDebug("mLastCalendarSync %s full: %d",mLastCalendarSync.toString().latin1(), fullDateRange); 1000 qDebug("KO: mLastCalendarSync %s .Full: %d",mLastCalendarSync.toString().latin1(), fullDateRange);
1001 QPtrList<Incidence> er = remote->rawIncidences(); 1001 QPtrList<Incidence> er = remote->rawIncidences();
1002 Incidence* inR = er.first(); 1002 Incidence* inR = er.first();
1003 Incidence* inL; 1003 Incidence* inL;
1004 QProgressBar bar( er.count(),0 ); 1004 QProgressBar bar( er.count(),0 );
1005 bar.setCaption (i18n("Syncing - close to abort!") ); 1005 bar.setCaption (i18n("Syncing - close to abort!") );
1006 1006
@@ -1221,17 +1221,18 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
1221 eventRSync->setDtStart( mLastCalendarSync ); 1221 eventRSync->setDtStart( mLastCalendarSync );
1222 eventLSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) ); 1222 eventLSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) );
1223 eventRSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) ); 1223 eventRSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) );
1224 eventRSync->setLocation( i18n("Remote from: ")+mCurrentSyncName ) ; 1224 eventRSync->setLocation( i18n("Remote from: ")+mCurrentSyncName ) ;
1225 eventLSync->setLocation(i18n("Local from: ") + mCurrentSyncName ); 1225 eventLSync->setLocation(i18n("Local from: ") + mCurrentSyncName );
1226 eventLSync->setReadOnly( true ); 1226 eventLSync->setReadOnly( true );
1227 qDebug("********** %d %d ", mGlobalSyncMode == SYNC_MODE_NORMAL, mSyncManager->syncWithDesktop() ); 1227 qDebug("KO: Normal sync: %d ",mGlobalSyncMode == SYNC_MODE_NORMAL );
1228 if ( mGlobalSyncMode == SYNC_MODE_NORMAL && !mSyncManager->syncWithDesktop()) // kde is abnormal... 1228 if ( mGlobalSyncMode == SYNC_MODE_NORMAL && !mSyncManager->syncWithDesktop()) // kde is abnormal...
1229 remote->addEvent( eventRSync ); 1229 remote->addEvent( eventRSync );
1230 else 1230 else
1231 delete eventRSync; 1231 delete eventRSync;
1232 qDebug("KO: Sync with desktop %d ",mSyncManager->syncWithDesktop() );
1232 QString mes; 1233 QString mes;
1233 mes .sprintf( i18n("Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n"),addedEvent, addedEventR, changedLocal, changedRemote, deletedEventL, deletedEventR, filteredIN, filteredOUT ); 1234 mes .sprintf( i18n("Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n"),addedEvent, addedEventR, changedLocal, changedRemote, deletedEventL, deletedEventR, filteredIN, filteredOUT );
1234 QString delmess; 1235 QString delmess;
1235 if ( delFut ) { 1236 if ( delFut ) {
1236 delmess.sprintf( i18n("%d items skipped on remote,\nbecause they are more\nthan %d weeks in the past or\nmore than %d weeks in the future.\nAfter skipping, remote has\n%d calendar/todo items."), delFut,mSyncManager->mWriteBackInPast,mSyncManager->mWriteBackInFuture, remRem-delFut); 1237 delmess.sprintf( i18n("%d items skipped on remote,\nbecause they are more\nthan %d weeks in the past or\nmore than %d weeks in the future.\nAfter skipping, remote has\n%d calendar/todo items."), delFut,mSyncManager->mWriteBackInPast,mSyncManager->mWriteBackInFuture, remRem-delFut);
1237 mes += delmess; 1238 mes += delmess;
@@ -1239,13 +1240,13 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
1239 mes = i18n("Local calendar changed!\n") +mes; 1240 mes = i18n("Local calendar changed!\n") +mes;
1240 mCalendar->checkAlarmForIncidence( 0, true ); 1241 mCalendar->checkAlarmForIncidence( 0, true );
1241 qDebug( mes ); 1242 qDebug( mes );
1242 if ( mSyncManager->mShowSyncSummary ) { 1243 if ( mSyncManager->mShowSyncSummary ) {
1243 if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes, 1244 if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes,
1244 i18n("KO/Pi Synchronization"),i18n("Write back"))) { 1245 i18n("KO/Pi Synchronization"),i18n("Write back"))) {
1245 qDebug("cancelled "); 1246 qDebug("KO: WB cancelled ");
1246 return false; 1247 return false;
1247 } 1248 }
1248 } 1249 }
1249 return syncOK; 1250 return syncOK;
1250} 1251}
1251 1252
@@ -1437,20 +1438,20 @@ bool CalendarView::importBday()
1437// This method will be called from Ka/Pi as a response to requestBirthdayListFromKAPI 1438// This method will be called from Ka/Pi as a response to requestBirthdayListFromKAPI
1438void CalendarView::insertBirthdays(const QString& uid, const QStringList& birthdayList, 1439void CalendarView::insertBirthdays(const QString& uid, const QStringList& birthdayList,
1439 const QStringList& anniversaryList, const QStringList& realNameList, 1440 const QStringList& anniversaryList, const QStringList& realNameList,
1440 const QStringList& emailList, const QStringList& assembledNameList, 1441 const QStringList& emailList, const QStringList& assembledNameList,
1441 const QStringList& uidList) 1442 const QStringList& uidList)
1442{ 1443{
1443 qDebug("CalendarView::insertBirthdays"); 1444 //qDebug("KO::CalendarView::insertBirthdays");
1444 if (uid == this->name()) 1445 if (uid == this->name())
1445 { 1446 {
1446 int count = birthdayList.count(); 1447 int count = birthdayList.count();
1447 int addCount = 0; 1448 int addCount = 0;
1448 KCal::Attendee* a = 0; 1449 KCal::Attendee* a = 0;
1449 1450
1450 qDebug("CalView 1 %i", count); 1451 //qDebug("CalView 1 %i", count);
1451 1452
1452 QProgressBar bar(count,0 ); 1453 QProgressBar bar(count,0 );
1453 int w = 300; 1454 int w = 300;
1454 if ( QApplication::desktop()->width() < 320 ) 1455 if ( QApplication::desktop()->width() < 320 )
1455 w = 220; 1456 w = 220;
1456 int h = bar.sizeHint().height() ; 1457 int h = bar.sizeHint().height() ;
@@ -2506,13 +2507,13 @@ void CalendarView::showEventEditor()
2506{ 2507{
2507#ifdef DESKTOP_VERSION 2508#ifdef DESKTOP_VERSION
2508 mEventEditor->show(); 2509 mEventEditor->show();
2509#else 2510#else
2510 if ( mEventEditor->width() < QApplication::desktop()->width() -60 || mEventEditor->width() > QApplication::desktop()->width() ) { 2511 if ( mEventEditor->width() < QApplication::desktop()->width() -60 || mEventEditor->width() > QApplication::desktop()->width() ) {
2511 topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); 2512 topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") );
2512 qDebug("CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() ); 2513 qDebug("KO: CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() );
2513 delete mEventEditor; 2514 delete mEventEditor;
2514 mEventEditor = mDialogManager->getEventEditor(); 2515 mEventEditor = mDialogManager->getEventEditor();
2515 } 2516 }
2516 mEventEditor->showMaximized(); 2517 mEventEditor->showMaximized();
2517 topLevelWidget()->setCaption( i18n("") ); 2518 topLevelWidget()->setCaption( i18n("") );
2518#endif 2519#endif
@@ -2521,13 +2522,13 @@ void CalendarView::showTodoEditor()
2521{ 2522{
2522#ifdef DESKTOP_VERSION 2523#ifdef DESKTOP_VERSION
2523 mTodoEditor->show(); 2524 mTodoEditor->show();
2524#else 2525#else
2525 if ( mTodoEditor->width() < QApplication::desktop()->width() -60|| mTodoEditor->width() > QApplication::desktop()->width() ) { 2526 if ( mTodoEditor->width() < QApplication::desktop()->width() -60|| mTodoEditor->width() > QApplication::desktop()->width() ) {
2526 topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); 2527 topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") );
2527 qDebug("CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() ); 2528 qDebug("KO: CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() );
2528 delete mTodoEditor; 2529 delete mTodoEditor;
2529 mTodoEditor = mDialogManager->getTodoEditor(); 2530 mTodoEditor = mDialogManager->getTodoEditor();
2530 } 2531 }
2531 mTodoEditor->showMaximized(); 2532 mTodoEditor->showMaximized();
2532 topLevelWidget()->setCaption( i18n("") ); 2533 topLevelWidget()->setCaption( i18n("") );
2533#endif 2534#endif
@@ -3854,13 +3855,13 @@ void CalendarView::keyPressEvent ( QKeyEvent *e)
3854 3855
3855 3856
3856bool CalendarView::sync(KSyncManager* manager, QString filename, int mode) 3857bool CalendarView::sync(KSyncManager* manager, QString filename, int mode)
3857{ 3858{
3858 // mSyncManager = manager; 3859 // mSyncManager = manager;
3859 if ( filename == QDir::homeDirPath ()+"/.kdecalendardump.ics" ) { 3860 if ( filename == QDir::homeDirPath ()+"/.kdecalendardump.ics" ) {
3860 qDebug("SyncKDE request detected!"); 3861 qDebug("KO: SyncKDE request detected!");
3861 } 3862 }
3862 mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice(); 3863 mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice();
3863 mCurrentSyncName = mSyncManager->getCurrentSyncName(); 3864 mCurrentSyncName = mSyncManager->getCurrentSyncName();
3864 return syncCalendar( filename, mode ); 3865 return syncCalendar( filename, mode );
3865} 3866}
3866bool CalendarView::syncExternal(KSyncManager* manager, QString resource) 3867bool CalendarView::syncExternal(KSyncManager* manager, QString resource)
@@ -3879,13 +3880,13 @@ void CalendarView::setSyncManager(KSyncManager* manager)
3879{ 3880{
3880 mSyncManager = manager; 3881 mSyncManager = manager;
3881} 3882}
3882 3883
3883void CalendarView::removeSyncInfo( QString syncProfile) 3884void CalendarView::removeSyncInfo( QString syncProfile)
3884{ 3885{
3885 qDebug("removeSyncInfo for profile %s ", syncProfile.latin1()); 3886 qDebug("KO: removeSyncInfo for profile %s ", syncProfile.latin1());
3886 mCalendar->removeSyncInfo( syncProfile ); 3887 mCalendar->removeSyncInfo( syncProfile );
3887 3888
3888} 3889}
3889 3890
3890void CalendarView::undo_delete() 3891void CalendarView::undo_delete()
3891{ 3892{
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 26ea1e2..877b6f2 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -604,13 +604,14 @@ void MainWindow::initActions()
604 mView, SLOT( toggleDateNavigatorWidget() ) ); 604 mView, SLOT( toggleDateNavigatorWidget() ) );
605 icon = loadPixmap( pathString + "filter" ); 605 icon = loadPixmap( pathString + "filter" );
606 action = new QAction( i18n("Toggle FilterView"), icon, i18n("Toggle FilterView"), 0, this ); 606 action = new QAction( i18n("Toggle FilterView"), icon, i18n("Toggle FilterView"), 0, this );
607 action->addTo( viewMenu ); 607 action->addTo( viewMenu );
608 connect( action, SIGNAL( activated() ), 608 connect( action, SIGNAL( activated() ),
609 mView, SLOT( toggleFilter() ) ); 609 mView, SLOT( toggleFilter() ) );
610 action = new QAction( i18n("Toggle Allday"), i18n("Toggle Allday"), 0, this ); 610 icon = loadPixmap( pathString + "allday" );
611 action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this );
611 action->addTo( viewMenu ); 612 action->addTo( viewMenu );
612 connect( action, SIGNAL( activated() ), 613 connect( action, SIGNAL( activated() ),
613 mView, SLOT( toggleAllDaySize() ) ); 614 mView, SLOT( toggleAllDaySize() ) );
614 615
615 viewMenu->insertSeparator(); 616 viewMenu->insertSeparator();
616 icon = loadPixmap( pathString + "picker" ); 617 icon = loadPixmap( pathString + "picker" );