-rw-r--r-- | korganizer/calendarview.cpp | 21 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 3 |
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 @@ -943,17 +943,17 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int QPtrList<Event> eventLSyncSharp = local->getExternLastSyncEvents(); bool fullDateRange = false; local->resetTempSyncStat(); mLastCalendarSync = QDateTime::currentDateTime(); if ( mSyncManager->syncWithDesktop() ) { remote->resetPilotStat(1); if ( KSyncManager::mRequestedSyncEvent.isValid() ) { mLastCalendarSync = KSyncManager::mRequestedSyncEvent; - qDebug("using extern time for calendar sync: %s ", mLastCalendarSync.toString().latin1() ); + qDebug("KO: using extern time for calendar sync: %s ", mLastCalendarSync.toString().latin1() ); } else { qDebug("KSyncManager::mRequestedSyncEvent has invalid datatime "); } } QDateTime modifiedCalendar = mLastCalendarSync; eventLSync = getLastSyncEvent(); eventR = remote->event("last-syncEvent-"+mCurrentSyncName ); if ( eventR ) { @@ -992,17 +992,17 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int else mLastCalendarSync = eventLSync->dtStart(); // for resyncing if own file has changed if ( mCurrentSyncDevice == "deleteaftersync" ) { mLastCalendarSync = loadedFileVersion; //qDebug("setting mLastCalendarSync "); } //qDebug("*************************** "); - qDebug("mLastCalendarSync %s full: %d",mLastCalendarSync.toString().latin1(), fullDateRange); + qDebug("KO: mLastCalendarSync %s .Full: %d",mLastCalendarSync.toString().latin1(), fullDateRange); QPtrList<Incidence> er = remote->rawIncidences(); Incidence* inR = er.first(); Incidence* inL; QProgressBar bar( er.count(),0 ); bar.setCaption (i18n("Syncing - close to abort!") ); // ************** setting up filter ************* CalFilter *filterIN = 0; @@ -1219,35 +1219,36 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int eventLSync->setReadOnly( false ); eventLSync->setDtStart( mLastCalendarSync ); eventRSync->setDtStart( mLastCalendarSync ); eventLSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) ); eventRSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) ); eventRSync->setLocation( i18n("Remote from: ")+mCurrentSyncName ) ; eventLSync->setLocation(i18n("Local from: ") + mCurrentSyncName ); eventLSync->setReadOnly( true ); - qDebug("********** %d %d ", mGlobalSyncMode == SYNC_MODE_NORMAL, mSyncManager->syncWithDesktop() ); + qDebug("KO: Normal sync: %d ",mGlobalSyncMode == SYNC_MODE_NORMAL ); if ( mGlobalSyncMode == SYNC_MODE_NORMAL && !mSyncManager->syncWithDesktop()) // kde is abnormal... remote->addEvent( eventRSync ); else delete eventRSync; + qDebug("KO: Sync with desktop %d ",mSyncManager->syncWithDesktop() ); QString mes; 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 ); QString delmess; if ( delFut ) { 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); mes += delmess; } mes = i18n("Local calendar changed!\n") +mes; mCalendar->checkAlarmForIncidence( 0, true ); qDebug( mes ); if ( mSyncManager->mShowSyncSummary ) { if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes, i18n("KO/Pi Synchronization"),i18n("Write back"))) { - qDebug("cancelled "); + qDebug("KO: WB cancelled "); return false; } } return syncOK; } void CalendarView::setSyncDevice( QString s ) { @@ -1435,24 +1436,24 @@ bool CalendarView::importBday() } // This method will be called from Ka/Pi as a response to requestBirthdayListFromKAPI void CalendarView::insertBirthdays(const QString& uid, const QStringList& birthdayList, const QStringList& anniversaryList, const QStringList& realNameList, const QStringList& emailList, const QStringList& assembledNameList, const QStringList& uidList) { - qDebug("CalendarView::insertBirthdays"); + //qDebug("KO::CalendarView::insertBirthdays"); if (uid == this->name()) { int count = birthdayList.count(); int addCount = 0; KCal::Attendee* a = 0; - qDebug("CalView 1 %i", count); + //qDebug("CalView 1 %i", count); QProgressBar bar(count,0 ); int w = 300; if ( QApplication::desktop()->width() < 320 ) w = 220; int h = bar.sizeHint().height() ; int dw = QApplication::desktop()->width(); int dh = QApplication::desktop()->height(); @@ -2504,32 +2505,32 @@ void CalendarView::showDatePicker( ) void CalendarView::showEventEditor() { #ifdef DESKTOP_VERSION mEventEditor->show(); #else if ( mEventEditor->width() < QApplication::desktop()->width() -60 || mEventEditor->width() > QApplication::desktop()->width() ) { topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); - qDebug("CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() ); + qDebug("KO: CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() ); delete mEventEditor; mEventEditor = mDialogManager->getEventEditor(); } mEventEditor->showMaximized(); topLevelWidget()->setCaption( i18n("") ); #endif } void CalendarView::showTodoEditor() { #ifdef DESKTOP_VERSION mTodoEditor->show(); #else if ( mTodoEditor->width() < QApplication::desktop()->width() -60|| mTodoEditor->width() > QApplication::desktop()->width() ) { topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); - qDebug("CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() ); + qDebug("KO: CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() ); delete mTodoEditor; mTodoEditor = mDialogManager->getTodoEditor(); } mTodoEditor->showMaximized(); topLevelWidget()->setCaption( i18n("") ); #endif } @@ -3852,17 +3853,17 @@ void CalendarView::keyPressEvent ( QKeyEvent *e) e->ignore(); } bool CalendarView::sync(KSyncManager* manager, QString filename, int mode) { // mSyncManager = manager; if ( filename == QDir::homeDirPath ()+"/.kdecalendardump.ics" ) { - qDebug("SyncKDE request detected!"); + qDebug("KO: SyncKDE request detected!"); } mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice(); mCurrentSyncName = mSyncManager->getCurrentSyncName(); return syncCalendar( filename, mode ); } bool CalendarView::syncExternal(KSyncManager* manager, QString resource) { //mSyncManager = manager; @@ -3877,17 +3878,17 @@ bool CalendarView::syncExternal(KSyncManager* manager, QString resource) } void CalendarView::setSyncManager(KSyncManager* manager) { mSyncManager = manager; } void CalendarView::removeSyncInfo( QString syncProfile) { - qDebug("removeSyncInfo for profile %s ", syncProfile.latin1()); + qDebug("KO: removeSyncInfo for profile %s ", syncProfile.latin1()); mCalendar->removeSyncInfo( syncProfile ); } void CalendarView::undo_delete() { //qDebug("undo_delete() "); Incidence* undo = mCalendar->undoIncidence(); diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 26ea1e2..877b6f2 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -602,17 +602,18 @@ void MainWindow::initActions() action->addTo( viewMenu ); connect( action, SIGNAL( activated() ), mView, SLOT( toggleDateNavigatorWidget() ) ); icon = loadPixmap( pathString + "filter" ); action = new QAction( i18n("Toggle FilterView"), icon, i18n("Toggle FilterView"), 0, this ); action->addTo( viewMenu ); connect( action, SIGNAL( activated() ), mView, SLOT( toggleFilter() ) ); - action = new QAction( i18n("Toggle Allday"), i18n("Toggle Allday"), 0, this ); + icon = loadPixmap( pathString + "allday" ); + action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); action->addTo( viewMenu ); connect( action, SIGNAL( activated() ), mView, SLOT( toggleAllDaySize() ) ); viewMenu->insertSeparator(); icon = loadPixmap( pathString + "picker" ); action = new QAction( i18n("Date Picker"), icon, i18n("Date Picker"), 0, this ); action->addTo( viewMenu ); |