From 58a4e6e5dcc24e2f5c17ef9f0e6879d625b5f764 Mon Sep 17 00:00:00 2001 From: zautrix Date: Sat, 02 Jul 2005 07:02:47 +0000 Subject: fixes --- (limited to 'korganizer') diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 678143d..5c88abd 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -2096,7 +2096,7 @@ bool CalendarView::checkFileVersion(QString fn) qDebug("file on disk version %s %s", fn.latin1(),dt.toString().latin1()); if ( dt <= loadedFileVersion ) return true; - int km = KMessageBox::warningYesNoCancel(this, i18n("\nThe file\n%1\n on disk has changed!\nFile size: %2 bytes.\nLast modified: %3\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n").arg(fn).arg( QString::number( finf.size())).arg( KGlobal::locale()->formatDateTime(finf.lastModified (), true, true)) , + int km = KMessageBox::warningYesNoCancel(this, i18n("\nThe file\n%1\non disk has changed!\nFile size: %2 bytes.\nLast modified: %3\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n").arg(KGlobal::formatMessage(fn,0)).arg( QString::number( finf.size())).arg( KGlobal::locale()->formatDateTime(finf.lastModified (), true, true)) , i18n("KO/Pi Warning"),i18n("Overwrite"), i18n("Sync+save")); diff --git a/korganizer/kofilterview.h b/korganizer/kofilterview.h index 874fc6a..4322299 100644 --- a/korganizer/kofilterview.h +++ b/korganizer/kofilterview.h @@ -25,6 +25,7 @@ #include #include +#include #include #include #include diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 264cf28..4fc447e 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -1792,13 +1792,15 @@ void KOMonthView::setKeyBoardFocus() shootAgain = !mWeekLabels[mNumWeeks]->hasFocus(); mWeekLabels[mNumWeeks]->setFocus(); } - if ( shootAgain ) { - QTimer::singleShot( 0, this, SLOT ( setKeyBFocus() ) ); + --mKBFcounter; + if ( shootAgain && mKBFcounter > 0 ) { + QTimer::singleShot( 50, this, SLOT ( setKeyBoardFocus() ) ); } } void KOMonthView::setKeyBFocus() { //qDebug("KOMonthView::setKeyBFocus() "); + mKBFcounter = 10; QTimer::singleShot( 0, this, SLOT ( setKeyBoardFocus() ) ); } void KOMonthView::resizeEvent(QResizeEvent * e) @@ -1816,7 +1818,7 @@ void KOMonthView::slotComputeLayout() mComputeLayoutTimer->stop(); //qDebug("KOMonthView::Post - resizeEvent %d %d ", width(), height() ); computeLayout(); - clPending = true; + clPending = true; setKeyBFocus(); } void KOMonthView::computeLayoutWeek() diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h index 0bd6b1c..a41eb54 100644 --- a/korganizer/komonthview.h +++ b/korganizer/komonthview.h @@ -278,10 +278,10 @@ class KOMonthView: public KOEventView void setSelectedCell( MonthViewCell * ); void setPopupCell( MonthViewCell * ); void switchView(); - void setKeyBoardFocus(); void setKeyBFocus(); protected slots: + void setKeyBoardFocus(); void slotNewTodo(); void slotNewEvent(); void slotEditJournal(); @@ -302,6 +302,7 @@ class KOMonthView: public KOEventView void updateDayLabels(); private: + int mKBFcounter; QTimer* mComputeLayoutTimer; NavigatorBar* mNavigatorBar; int currentWeek(); diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 862d437..f68f032 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -1912,6 +1912,7 @@ void MainWindow::backupAllFiles() } void MainWindow::save() { + if ( mView->viewManager()->journalView() ) mView->viewManager()->journalView()->checkModified(); if ( !mCalendarModifiedFlag ) { @@ -1931,7 +1932,8 @@ void MainWindow::save() ; // KPimGlobalPrefs::instance()->mLastBackupDate } QTime neededSaveTime = QDateTime::currentDateTime().time(); - setCaption(i18n("KO/Pi:Saving Data to File ..." )); + if ( !isMinimized () ) + setCaption(i18n("KO/Pi:Saving Data to File ..." )); qDebug("KO: Start saving data to file!"); mView->saveCalendars(); mCalendarModifiedFlag = false; @@ -1939,7 +1941,10 @@ void MainWindow::save() qDebug("KO: Needed %d ms for saving.",msNeeded ); QString savemes; savemes.sprintf(i18n("KO/Pi:File Saved. Needed %d sec, %d ms"),(msNeeded/1000)%100,msNeeded%1000 ); - setCaption(savemes); + if ( !isMinimized () ) + setCaption(savemes); + else + qDebug(savemes); } else setCaption(i18n("Saving cancelled!")); mSyncManager->setBlockSave( false ); -- cgit v0.9.0.2