author | zautrix <zautrix> | 2005-10-12 11:14:13 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-10-12 11:14:13 (UTC) |
commit | a72f3f3acfac791715a1c512fc4cc4c3facdbb62 (patch) (unidiff) | |
tree | 202c588777f8d4585a8c57164b1b412d7ad73e8a | |
parent | 3ecfc912f657a710ed35c93dc6eb2991cce06835 (diff) | |
download | kdepimpi-a72f3f3acfac791715a1c512fc4cc4c3facdbb62.zip kdepimpi-a72f3f3acfac791715a1c512fc4cc4c3facdbb62.tar.gz kdepimpi-a72f3f3acfac791715a1c512fc4cc4c3facdbb62.tar.bz2 |
fix
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 8 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 75 | ||||
-rw-r--r-- | korganizer/mainwindow.h | 4 |
3 files changed, 70 insertions, 17 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index ea653b2..e8b54fd 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -1555,19 +1555,27 @@ | |||
1555 | { "Check NonAllday with Allday","Prüfe NichtGanzTag mit GanzTag" }, | 1555 | { "Check NonAllday with Allday","Prüfe NichtGanzTag mit GanzTag" }, |
1556 | { "Check NonAllday with NonAllday","Prüfe NichtGanzTag mit NichtGanzTag" }, | 1556 | { "Check NonAllday with NonAllday","Prüfe NichtGanzTag mit NichtGanzTag" }, |
1557 | { "Conflict detection","Konflikterkennung" }, | 1557 | { "Conflict detection","Konflikterkennung" }, |
1558 | { "Loading calendar files ... please wait","Lade Kalenderdateien ... bitte warten" }, | 1558 | { "Loading calendar files ... please wait","Lade Kalenderdateien ... bitte warten" }, |
1559 | { "Show multiday allday ev. in date nav.","Zeige Multi-Ganzt.Term.in Datums Nav." }, | 1559 | { "Show multiday allday ev. in date nav.","Zeige Multi-Ganzt.Term.in Datums Nav." }, |
1560 | { "Include events which "show as free"","Inklusive Termine mit "Zeige Zeit als frei"" }, | 1560 | { "Include events which "show as free"","Inklusive Termine mit "Zeige Zeit als frei"" }, |
1561 | { "Conflict detection checks an <b>edited event</b> with <b>other events</b> for overlapping.","Konflikterkennung prüft einen <b>bearbeiteten Termin</b> auf Überschneidungen mit <b>anderen Terminen</b>." }, | 1561 | { "Conflict detection checks an <b>edited event</b> with <b>other events</b> for overlapping.","Konflikterkennung prüft einen <b>bearbeiteten Termin</b> auf Überschneidungen mit <b>anderen Terminen</b>." }, |
1562 | { " Yes, close "," Ja, beenden " }, | 1562 | { " Yes, close "," Ja, beenden " }, |
1563 | { "Export All Data","Exportiere alle Daten" }, | 1563 | { "Export All Data","Exportiere alle Daten" }, |
1564 | { "You can save all data\nto another file via\nFile->Export->Export All Data","Sie können alle Daten in\neine andere Datei speichern unter\nDatei->Exportiere->Exportiere alle Daten" }, | 1564 | { "You can save all data\nto another file via\nFile->Export->Export All Data","Sie können alle Daten in\neine andere Datei speichern unter\nDatei->Exportiere->Exportiere alle Daten" }, |
1565 | { "<p><b>Duration:</b> %1 days</p>","<p><b>Dauer:</b> %1 Tage</p>" }, | 1565 | { "<p><b>Duration:</b> %1 days</p>","<p><b>Dauer:</b> %1 Tage</p>" }, |
1566 | { " (Duration: %1 days)"," (Dauer: %1 Tage)" }, | 1566 | { " (Duration: %1 days)"," (Dauer: %1 Tage)" }, |
1567 | { "Autosave enabled!","Auto-Speichern angeschaltet!" }, | ||
1568 | { "Autosave disabled! Save timer stopped!","Auto-Speichern ausgeschaltet! Speicher Timer gestoppt!" }, | ||
1569 | { "Autosave disabled!","Auto-Speichern ist ausgeschaltet!" }, | ||
1570 | { "Yes, Save!","Ja, Speichern!" }, | ||
1571 | { "Calendar is modified\nbut Autosave is disabled!\nDo you want\nto save the data?","Der Kalender wurde verändert,\naber Auto-Speichern ist\nabgeschaltet. Möchten Sie\ndie Daten speichern?" }, | ||
1572 | { "<p><b>C+ctrl</b>: Dis/enable automatic saving</p>\n","<p><b>C+ctrl</b>: Auto-Speichern ab/anschalten</p>\n" }, | ||
1573 | { "","" }, | ||
1574 | { "","" }, | ||
1567 | { "","" }, | 1575 | { "","" }, |
1568 | { "","" }, | 1576 | { "","" }, |
1569 | { "","" }, | 1577 | { "","" }, |
1570 | { "","" }, | 1578 | { "","" }, |
1571 | { "","" }, | 1579 | { "","" }, |
1572 | { "","" }, | 1580 | { "","" }, |
1573 | { "","" }, | 1581 | { "","" }, |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index c597138..66bb19b 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -161,24 +161,25 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : | |||
161 | } | 161 | } |
162 | sgListViewJournalPix = &journalPix; | 162 | sgListViewJournalPix = &journalPix; |
163 | sgListViewJournalPix->resize( 11, 11 ); | 163 | sgListViewJournalPix->resize( 11, 11 ); |
164 | sgListViewJournalPix->fill( Qt::white ); | 164 | sgListViewJournalPix->fill( Qt::white ); |
165 | { | 165 | { |
166 | QPainter p ( sgListViewJournalPix ); | 166 | QPainter p ( sgListViewJournalPix ); |
167 | p.drawRect( 0,0,11,11); | 167 | p.drawRect( 0,0,11,11); |
168 | p.drawLine( 2,3,5,3); | 168 | p.drawLine( 2,3,5,3); |
169 | p.drawLine( 2,5,8,5); | 169 | p.drawLine( 2,5,8,5); |
170 | p.drawLine( 2,7,6,7); | 170 | p.drawLine( 2,7,6,7); |
171 | } | 171 | } |
172 | } | 172 | } |
173 | mAutoSaveDisabled = false; | ||
173 | mClosed = false; | 174 | mClosed = false; |
174 | //QString confFile = KStandardDirs::appDir() + "config/korganizerrc"; | 175 | //QString confFile = KStandardDirs::appDir() + "config/korganizerrc"; |
175 | QString confFile = locateLocal("config","korganizerrc"); | 176 | QString confFile = locateLocal("config","korganizerrc"); |
176 | QFileInfo finf ( confFile ); | 177 | QFileInfo finf ( confFile ); |
177 | bool showWarning = !finf.exists(); | 178 | bool showWarning = !finf.exists(); |
178 | setIcon(SmallIcon( "ko24" ) ); | 179 | setIcon(SmallIcon( "ko24" ) ); |
179 | mBlockAtStartup = true; | 180 | mBlockAtStartup = true; |
180 | mFlagKeyPressed = false; | 181 | mFlagKeyPressed = false; |
181 | setCaption("KO/Pi"); | 182 | setCaption("KO/Pi"); |
182 | KOPrefs *p = KOPrefs::instance(); | 183 | KOPrefs *p = KOPrefs::instance(); |
183 | //KPimGlobalPrefs::instance()->setGlobalConfig(); | 184 | //KPimGlobalPrefs::instance()->setGlobalConfig(); |
184 | p->mCurrentDisplayedView = 0; | 185 | p->mCurrentDisplayedView = 0; |
@@ -528,51 +529,69 @@ bool MainWindow::askForQuitOnSaveError() | |||
528 | i18n("You can save all data\nto another file via\nFile->Export->Export All Data") + "!\n" + | 529 | i18n("You can save all data\nto another file via\nFile->Export->Export All Data") + "!\n" + |
529 | i18n("Do you really want\nto close KO/Pi?"), | 530 | i18n("Do you really want\nto close KO/Pi?"), |
530 | i18n(" Yes, close "), i18n("No"), | 531 | i18n(" Yes, close "), i18n("No"), |
531 | 0, 1 ) ) { | 532 | 0, 1 ) ) { |
532 | case 0: | 533 | case 0: |
533 | retval = true; | 534 | retval = true; |
534 | break; | 535 | break; |
535 | default: | 536 | default: |
536 | break; | 537 | break; |
537 | } | 538 | } |
538 | return retval; | 539 | return retval; |
539 | } | 540 | } |
540 | 541 | bool MainWindow::checkAutosave() | |
542 | { | ||
543 | bool savedata = true; | ||
544 | if ( mAutoSaveDisabled && mCalendarModifiedFlag ) { | ||
545 | switch( QMessageBox::information( this, "KO/Pi", | ||
546 | i18n("Calendar is modified\nbut Autosave is disabled!\nDo you want\nto save the data?"), | ||
547 | i18n("Yes, Save!"), i18n("No"), | ||
548 | 0, 0 ) ) { | ||
549 | case 1: | ||
550 | case 2: | ||
551 | savedata = false; | ||
552 | break; | ||
553 | default: | ||
554 | break; | ||
555 | } | ||
556 | } | ||
557 | return savedata; | ||
558 | } | ||
541 | void MainWindow::closeEvent( QCloseEvent* ce ) | 559 | void MainWindow::closeEvent( QCloseEvent* ce ) |
542 | { | 560 | { |
543 | |||
544 | |||
545 | |||
546 | if ( ! KOPrefs::instance()->mAskForQuit ) { | 561 | if ( ! KOPrefs::instance()->mAskForQuit ) { |
547 | saveOnClose(); | 562 | if ( checkAutosave() ) { |
548 | if ( mCalendarModifiedFlag && !askForQuitOnSaveError() ) { | 563 | saveOnClose(); |
549 | ce->ignore(); | 564 | if ( mCalendarModifiedFlag && !askForQuitOnSaveError() ) { |
550 | return; | 565 | ce->ignore(); |
566 | return; | ||
567 | } | ||
551 | } | 568 | } |
552 | mClosed = true; | 569 | mClosed = true; |
553 | ce->accept(); | 570 | ce->accept(); |
554 | return; | 571 | return; |
555 | 572 | ||
556 | } | 573 | } |
557 | 574 | ||
558 | switch( QMessageBox::information( this, "KO/Pi", | 575 | switch( QMessageBox::information( this, "KO/Pi", |
559 | i18n("Do you really want\nto close KO/Pi?"), | 576 | i18n("Do you really want\nto close KO/Pi?"), |
560 | i18n("Close"), i18n("No"), | 577 | i18n("Close"), i18n("No"), |
561 | 0, 0 ) ) { | 578 | 0, 0 ) ) { |
562 | case 0: | 579 | case 0: |
563 | saveOnClose(); | 580 | if ( checkAutosave() ) { |
564 | if ( mCalendarModifiedFlag && !askForQuitOnSaveError() ) { | 581 | saveOnClose(); |
565 | ce->ignore(); | 582 | if ( mCalendarModifiedFlag && !askForQuitOnSaveError() ) { |
566 | return; | 583 | ce->ignore(); |
584 | return; | ||
585 | } | ||
567 | } | 586 | } |
568 | mClosed = true; | 587 | mClosed = true; |
569 | ce->accept(); | 588 | ce->accept(); |
570 | break; | 589 | break; |
571 | case 1: | 590 | case 1: |
572 | ce->ignore(); | 591 | ce->ignore(); |
573 | break; | 592 | break; |
574 | case 2: | 593 | case 2: |
575 | 594 | ||
576 | default: | 595 | default: |
577 | break; | 596 | break; |
578 | } | 597 | } |
@@ -1648,24 +1667,25 @@ void MainWindow::about() | |||
1648 | #else | 1667 | #else |
1649 | i18n("PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n") + | 1668 | i18n("PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n") + |
1650 | #endif | 1669 | #endif |
1651 | i18n("(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!") ); | 1670 | i18n("(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!") ); |
1652 | } | 1671 | } |
1653 | void MainWindow::keyBindings() | 1672 | void MainWindow::keyBindings() |
1654 | { | 1673 | { |
1655 | QString cap = i18n("KO/Pi Keys + Colors"); | 1674 | QString cap = i18n("KO/Pi Keys + Colors"); |
1656 | QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + | 1675 | QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + |
1657 | i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ | 1676 | i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ |
1658 | i18n("<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n") + | 1677 | i18n("<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n") + |
1659 | i18n("<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n") + | 1678 | i18n("<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n") + |
1679 | i18n("<p><b>C+ctrl</b>: Dis/enable automatic saving</p>\n") + | ||
1660 | i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + | 1680 | i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + |
1661 | i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ | 1681 | i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ |
1662 | i18n("<p><b>R</b>: Toggle Resource View |<b>F</b>: Edit filter </p>\n")+ | 1682 | i18n("<p><b>R</b>: Toggle Resource View |<b>F</b>: Edit filter </p>\n")+ |
1663 | i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ | 1683 | i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ |
1664 | i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ | 1684 | i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ |
1665 | i18n("<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ")+ | 1685 | i18n("<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ")+ |
1666 | i18n("<p><b>Q</b>: Show next date with conflicting events\n ")+ | 1686 | i18n("<p><b>Q</b>: Show next date with conflicting events\n ")+ |
1667 | i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ | 1687 | i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ |
1668 | i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ | 1688 | i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ |
1669 | i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ | 1689 | i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ |
1670 | i18n("<p><b>K</b>: Week view in Month view syle</p>\n")+ | 1690 | i18n("<p><b>K</b>: Week view in Month view syle</p>\n")+ |
1671 | i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ | 1691 | i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ |
@@ -1963,43 +1983,55 @@ void MainWindow::saveOnClose() | |||
1963 | } | 1983 | } |
1964 | #endif | 1984 | #endif |
1965 | save(); | 1985 | save(); |
1966 | mView->writeSettings(); | 1986 | mView->writeSettings(); |
1967 | mView->checkSuspendAlarm(); | 1987 | mView->checkSuspendAlarm(); |
1968 | } | 1988 | } |
1969 | void MainWindow::slotModifiedChanged( bool ) | 1989 | void MainWindow::slotModifiedChanged( bool ) |
1970 | { | 1990 | { |
1971 | if ( mBlockAtStartup ) | 1991 | if ( mBlockAtStartup ) |
1972 | return; | 1992 | return; |
1973 | 1993 | ||
1974 | int msec; | 1994 | int msec; |
1995 | if ( mAutoSaveDisabled ) { | ||
1996 | QTimer::singleShot( 0, this , SLOT ( autoSaveWarning() ) ); | ||
1997 | qDebug("KO: Autosave disabled (data change deteced)!"); | ||
1998 | } | ||
1975 | if ( mCalendarModifiedFlag ) { | 1999 | if ( mCalendarModifiedFlag ) { |
1976 | //qDebug(" MainWindow timer is running "); | 2000 | //qDebug(" MainWindow timer is running "); |
1977 | return; | 2001 | return; |
1978 | } | 2002 | } |
2003 | mCalendarModifiedFlag = true; | ||
2004 | if ( mAutoSaveDisabled ) { | ||
2005 | return; | ||
2006 | } | ||
1979 | // we store the changes after 1 minute, | 2007 | // we store the changes after 1 minute, |
1980 | // and for safety reasons after 10 minutes again | 2008 | // and for safety reasons after 10 minutes again |
1981 | if ( !mSyncManager->blockSave() ) | 2009 | if ( !mSyncManager->blockSave() ) |
1982 | msec = (1000 * 60*KOPrefs::instance()->mAutoSaveInterval) +1000; | 2010 | msec = (1000 * 60*KOPrefs::instance()->mAutoSaveInterval) +1000; |
1983 | else | 2011 | else |
1984 | msec = 1000 * 600; | 2012 | msec = 1000 * 600; |
1985 | mSaveTimer.start( msec, true ); // 1 minute | 2013 | mSaveTimer.start( msec, true ); // 1 minute |
1986 | mSaveTimerStart = QDateTime::currentDateTime(); | 2014 | mSaveTimerStart = QDateTime::currentDateTime(); |
1987 | mSaveDelay = msec/1000; | 2015 | mSaveDelay = msec/1000; |
1988 | qDebug("KO: Saving File in %d secs!", msec/1000); | 2016 | qDebug("KO: Saving File in %d secs!", msec/1000); |
1989 | mCalendarModifiedFlag = true; | 2017 | } |
2018 | void MainWindow::autoSaveWarning() | ||
2019 | { | ||
2020 | setCaption(i18n("Autosave disabled!" )); | ||
1990 | } | 2021 | } |
1991 | void MainWindow::saveStopTimer() | 2022 | void MainWindow::saveStopTimer() |
1992 | { | 2023 | { |
1993 | mSaveTimer.stop(); | 2024 | mSaveTimer.stop(); |
2025 | mSaveDelay = 0; | ||
1994 | } | 2026 | } |
1995 | void MainWindow::backupAllFiles() | 2027 | void MainWindow::backupAllFiles() |
1996 | { | 2028 | { |
1997 | QDate reference ( 2000,1,1); | 2029 | QDate reference ( 2000,1,1); |
1998 | int daysTo = reference.daysTo ( QDate::currentDate() ); | 2030 | int daysTo = reference.daysTo ( QDate::currentDate() ); |
1999 | setCaption(i18n("Creating backup ... please wait ..." )); | 2031 | setCaption(i18n("Creating backup ... please wait ..." )); |
2000 | qDebug("KO: Last backup was %d days ago ", daysTo - KOPrefs::instance()->mLastBackupDate); | 2032 | qDebug("KO: Last backup was %d days ago ", daysTo - KOPrefs::instance()->mLastBackupDate); |
2001 | // we need the file path, the backup dir and the number of bups as param | 2033 | // we need the file path, the backup dir and the number of bups as param |
2002 | QString bupDir = KPimGlobalPrefs::instance()->mBackupDatadir; | 2034 | QString bupDir = KPimGlobalPrefs::instance()->mBackupDatadir; |
2003 | if ( KPimGlobalPrefs::instance()->mBackupUseDefaultDir) | 2035 | if ( KPimGlobalPrefs::instance()->mBackupUseDefaultDir) |
2004 | bupDir = KGlobalSettings::backupDataDir(); | 2036 | bupDir = KGlobalSettings::backupDataDir(); |
2005 | int retval = KApplication::createBackup( defaultFileName(), bupDir, KPimGlobalPrefs::instance()->mBackupNumbers ); | 2037 | int retval = KApplication::createBackup( defaultFileName(), bupDir, KPimGlobalPrefs::instance()->mBackupNumbers ); |
@@ -2198,26 +2230,37 @@ void MainWindow::keyPressEvent ( QKeyEvent * e ) | |||
2198 | case Qt::Key_W: | 2230 | case Qt::Key_W: |
2199 | mView->viewManager()->showWhatsNextView(); | 2231 | mView->viewManager()->showWhatsNextView(); |
2200 | break; | 2232 | break; |
2201 | case Qt::Key_L: | 2233 | case Qt::Key_L: |
2202 | mView->viewManager()->showListView(); | 2234 | mView->viewManager()->showListView(); |
2203 | break; | 2235 | break; |
2204 | case Qt::Key_N: | 2236 | case Qt::Key_N: |
2205 | mView->viewManager()->showNextView(); | 2237 | mView->viewManager()->showNextView(); |
2206 | break; | 2238 | break; |
2207 | case Qt::Key_V: | 2239 | case Qt::Key_V: |
2208 | mView->viewManager()->showTodoView(); | 2240 | mView->viewManager()->showTodoView(); |
2209 | break; | 2241 | break; |
2210 | case Qt::Key_C: | 2242 | case Qt::Key_C: |
2211 | mView->viewManager()->agendaView()->setStartHour( QTime::currentTime ().hour() ); | 2243 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton ) { |
2244 | if ( mAutoSaveDisabled ) { | ||
2245 | mAutoSaveDisabled = false; | ||
2246 | setCaption(i18n("Autosave enabled!" )); | ||
2247 | return; | ||
2248 | } else { | ||
2249 | mAutoSaveDisabled = true; | ||
2250 | saveStopTimer(); | ||
2251 | setCaption(i18n("Autosave disabled! Save timer stopped!" )); | ||
2252 | } | ||
2253 | } else | ||
2254 | mView->viewManager()->agendaView()->setStartHour( QTime::currentTime ().hour() ); | ||
2212 | break; | 2255 | break; |
2213 | case Qt::Key_P: | 2256 | case Qt::Key_P: |
2214 | mView->showDatePicker( ); | 2257 | mView->showDatePicker( ); |
2215 | break; | 2258 | break; |
2216 | case Qt::Key_F: | 2259 | case Qt::Key_F: |
2217 | mView->editFilters(); | 2260 | mView->editFilters(); |
2218 | break; | 2261 | break; |
2219 | case Qt::Key_R: | 2262 | case Qt::Key_R: |
2220 | mView->toggleFilter(); | 2263 | mView->toggleFilter(); |
2221 | break; | 2264 | break; |
2222 | case Qt::Key_X: | 2265 | case Qt::Key_X: |
2223 | if ( e->state() == Qt::ControlButton ) | 2266 | if ( e->state() == Qt::ControlButton ) |
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index 71c069b..d8018b6 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h | |||
@@ -43,24 +43,25 @@ class MainWindow : public QMainWindow | |||
43 | static QString resourcePath(); | 43 | static QString resourcePath(); |
44 | public slots: | 44 | public slots: |
45 | void setUsesBigPixmaps ( bool ); | 45 | void setUsesBigPixmaps ( bool ); |
46 | void setCaption ( const QString & ); | 46 | void setCaption ( const QString & ); |
47 | void updateWeekNum(const KCal::DateList &); | 47 | void updateWeekNum(const KCal::DateList &); |
48 | void updateWeek(QDate); | 48 | void updateWeek(QDate); |
49 | void updateFilterToolbar(); | 49 | void updateFilterToolbar(); |
50 | virtual void showMaximized (); | 50 | virtual void showMaximized (); |
51 | void configureAgenda( int ); | 51 | void configureAgenda( int ); |
52 | void recieve( const QCString& msg, const QByteArray& data ); | 52 | void recieve( const QCString& msg, const QByteArray& data ); |
53 | void receiveStart( const QCString& msg, const QByteArray& data ); | 53 | void receiveStart( const QCString& msg, const QByteArray& data ); |
54 | protected slots: | 54 | protected slots: |
55 | void autoSaveWarning(); | ||
55 | void loadDataAfterStart(); | 56 | void loadDataAfterStart(); |
56 | void calHint(); | 57 | void calHint(); |
57 | void startMultiSync(); | 58 | void startMultiSync(); |
58 | void setCaptionToDates(); | 59 | void setCaptionToDates(); |
59 | void weekAction(); | 60 | void weekAction(); |
60 | void about(); | 61 | void about(); |
61 | void licence(); | 62 | void licence(); |
62 | void faq(); | 63 | void faq(); |
63 | void usertrans(); | 64 | void usertrans(); |
64 | void features(); | 65 | void features(); |
65 | void synchowto(); | 66 | void synchowto(); |
66 | void storagehowto(); | 67 | void storagehowto(); |
@@ -112,25 +113,26 @@ class MainWindow : public QMainWindow | |||
112 | void getFile( bool ); | 113 | void getFile( bool ); |
113 | void syncFileRequest(); | 114 | void syncFileRequest(); |
114 | 115 | ||
115 | protected: | 116 | protected: |
116 | int mFocusLoop; | 117 | int mFocusLoop; |
117 | void hideEvent ( QHideEvent * ); | 118 | void hideEvent ( QHideEvent * ); |
118 | QString sentSyncFile(); | 119 | QString sentSyncFile(); |
119 | void displayText( QString, QString); | 120 | void displayText( QString, QString); |
120 | void enableIncidenceActions( bool ); | 121 | void enableIncidenceActions( bool ); |
121 | bool askForQuitOnSaveError(); | 122 | bool askForQuitOnSaveError(); |
122 | 123 | ||
123 | private: | 124 | private: |
124 | 125 | bool mAutoSaveDisabled; | |
126 | bool checkAutosave(); | ||
125 | QCString mCStringMess; | 127 | QCString mCStringMess; |
126 | QByteArray mByteData; | 128 | QByteArray mByteData; |
127 | 129 | ||
128 | //void setMenuBar( QMenuBar * ); | 130 | //void setMenuBar( QMenuBar * ); |
129 | bool mBRdisabled; | 131 | bool mBRdisabled; |
130 | #ifndef DESKTOP_VERSION | 132 | #ifndef DESKTOP_VERSION |
131 | QCopChannel* infrared; | 133 | QCopChannel* infrared; |
132 | #endif | 134 | #endif |
133 | QAction* brAction; | 135 | QAction* brAction; |
134 | KSyncManager* mSyncManager; | 136 | KSyncManager* mSyncManager; |
135 | bool mClosed; | 137 | bool mClosed; |
136 | void saveOnClose(); | 138 | void saveOnClose(); |