author | zautrix <zautrix> | 2005-07-01 18:39:59 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-01 18:39:59 (UTC) |
commit | c53efbe8f53f468d21d93f5e19b625d1a4beb242 (patch) (unidiff) | |
tree | f8fe2180733b6bd3514c02845cefa9f26e967e27 | |
parent | 98d29d15275c4b8e9a3348742925f6e6d03f7a07 (diff) | |
download | kdepimpi-c53efbe8f53f468d21d93f5e19b625d1a4beb242.zip kdepimpi-c53efbe8f53f468d21d93f5e19b625d1a4beb242.tar.gz kdepimpi-c53efbe8f53f468d21d93f5e19b625d1a4beb242.tar.bz2 |
fixxx
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 13 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 15 | ||||
-rw-r--r-- | korganizer/calendarview.h | 1 | ||||
-rw-r--r-- | korganizer/kofilterview.cpp | 2 | ||||
-rw-r--r-- | korganizer/kofilterview.h | 1 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 7 |
6 files changed, 28 insertions, 11 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index 593806b..708ac19 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -1451,31 +1451,42 @@ | |||
1451 | { "Department","Abteilung" }, | 1451 | { "Department","Abteilung" }, |
1452 | { "Backup cancelled","Backup abgebrochen" }, | 1452 | { "Backup cancelled","Backup abgebrochen" }, |
1453 | { "Backup globally disabled","Backup global abgeschaltet" }, | 1453 | { "Backup globally disabled","Backup global abgeschaltet" }, |
1454 | { "Backup succesfully finished","Backup erfolgreich beendet" }, | 1454 | { "Backup succesfully finished","Backup erfolgreich beendet" }, |
1455 | { "(Hint: You can enable automatic backup in the global settings!)","(Hinweis: Sie können ein automatisches Backup in den globalen Einstellungen konfigurieren!)" }, | 1455 | { "(Hint: You can enable automatic backup in the global settings!)","(Hinweis: Sie können ein automatisches Backup in den globalen Einstellungen konfigurieren!)" }, |
1456 | { "This will <b>backup all calendar files</b> to the directory %1 %2","Das schreibt ein <b>Backup aller Kalenderdateien</b> in das Verzeichnis %1 %2" }, | 1456 | { "This will <b>backup all calendar files</b> to the directory %1 %2","Das schreibt ein <b>Backup aller Kalenderdateien</b> in das Verzeichnis %1 %2" }, |
1457 | { "Birthdays","Geburtstage" }, | 1457 | { "Birthdays","Geburtstage" }, |
1458 | { "KO/Pi import information!","KO/Pi Import Information!" }, | 1458 | { "KO/Pi import information!","KO/Pi Import Information!" }, |
1459 | { "Start this todo\nand stop all running","Starte dieses Todo\nund stoppe alle Laufenden" }, | 1459 | { "Start this todo\nand stop all running","Starte dieses Todo\nund stoppe alle Laufenden" }, |
1460 | { "Cancel - do not start"," Abbrechen - Todo nicht starten" }, | 1460 | { "Cancel - do not start"," Abbrechen - Todo nicht starten" }, |
1461 | { "The timezone has changed!\nShould the calendar be reloaded\nto shift the time of the events?\nPlease read Menu: Help->FAQ:\n"How do I change the timezone?"\nas well!","Die Zeitzone wurde geändert!\nSollen die Kalender neu geladen\nwerden num die Zeiten\nder Termine zu ändern?\nBitte lesen Sie auch\nMenu: Help->FAQ:\n"How do I change the timezone?"" }, | 1461 | { "The timezone has changed!\nShould the calendar be reloaded\nto shift the time of the events?\nPlease read Menu: Help->FAQ:\n"How do I change the timezone?"\nas well!","Die Zeitzone wurde geändert!\nSollen die Kalender neu geladen\nwerden num die Zeiten\nder Termine zu ändern?\nBitte lesen Sie auch\nMenu: Help->FAQ:\n"How do I change the timezone?"" }, |
1462 | { "Reload","Neu laden" }, | 1462 | { "Reload","Neu laden" }, |
1463 | { "Timezone settings","Zeitzoneneinstellung" }, | 1463 | { "Timezone settings","Zeitzoneneinstellung" }, |
1464 | { "Title: ","Titel: " }, | 1464 | { "Title: ","Titel: " }, |
1465 | { "Journal from: ","Journal vom: " }, | 1465 | { "Journal from: ","Journal vom: " }, |
1466 | { "Journal: %1 from ","Journal: %1 vom " }, | 1466 | { "Journal: %1 from ","Journal: %1 vom " }, |
1467 | { "<b>Click here to edit categories: </b>","<b>Klicke hier um Kategorien zu ändern: </b>" }, | 1467 | { "<b>Click here to edit categories: </b>","<b>Klicke hier um Kategorien zu ändern: </b>" }, |
1468 | { "Selected Item","Ausgewähltes Item" }, | 1468 | { "Selected Item","Ausgewähltes Item" }, |
1469 | { "Select Date...","Wähle Datum..." }, | 1469 | { "Select Date...","Wähle Datum..." }, |
1470 | { "After importing/loading/syncing there may be new categories in events or todos which are not added automatically to the category list. Please choose what to do <b>now</b>:","Nach dem Importieren/Laden/Syncen kann es neue Kategorien in den Terminen oder Todos geben, die nicht automatisch der Kategorieliste hinzugefügt werden. Bitte wählen Sie, was <b>jetzt</b> passieren soll:" }, | 1470 | { "After importing/loading/syncing there may be new categories in events or todos which are not added automatically to the category list. Please choose what to do <b>now</b>:","Nach dem Importieren/Laden/Syncen kann es neue Kategorien in den Terminen oder Todos geben, die nicht automatisch der Kategorieliste hinzugefügt werden. Bitte wählen Sie, was <b>jetzt</b> passieren soll:" }, |
1471 | { "Change category list now!","Ändere Kategorieliste jetzt!" }, | 1471 | { "Change category list now!","Ändere Kategorieliste jetzt!" }, |
1472 | { "Edit category list...","Ändere Kategorieliste..." }, | 1472 | { "Edit category list...","Ändere Kategorieliste..." }, |
1473 | { "Toolbar changes needs a restart!","Neustart benötigt für Toolbaränderungen!" }, | 1473 | { "Toolbar changes needs a restart!","Neustart benötigt für Toolbaränderungen!" }, |
1474 | { "Filepath: ","Dateipfad: " }, | 1474 | { "Filepath: ","Dateipfad: " }, |
1475 | { "The loading of one or more calendar failed:","Das Laden eines oder mehrerer Kalender schlug fehl:" }, | ||
1476 | { "You can try to reload the calendar in the Resource View!","In der Resourcenansicht können Sie erneut versuchen den Kalender zu laden!" }, | 1475 | { "You can try to reload the calendar in the Resource View!","In der Resourcenansicht können Sie erneut versuchen den Kalender zu laden!" }, |
1477 | { "<b>WARNING:</b> There is a pending suspended alarm!","<b>WARNUNG:</b> Es gibt einen laufenden Suspendalarm!" }, | 1476 | { "<b>WARNING:</b> There is a pending suspended alarm!","<b>WARNUNG:</b> Es gibt einen laufenden Suspendalarm!" }, |
1478 | { "Pending Suspend Alarm","Laufender Suspend Alarm" }, | 1477 | { "Pending Suspend Alarm","Laufender Suspend Alarm" }, |
1478 | { "Error loading calendar %1","Fehler beim Laden von Kalender %1" }, | ||
1479 | { "Calendar(s) not loaded:","Nicht geladene(r) Kalender:" }, | ||
1480 | { "Loding of calendar(s) failed","Laden von Kalendern fehlgeschlagen" }, | ||
1481 | { "","" }, | ||
1482 | { "","" }, | ||
1483 | { "","" }, | ||
1484 | { "","" }, | ||
1485 | { "","" }, | ||
1486 | { "","" }, | ||
1487 | { "","" }, | ||
1488 | { "","" }, | ||
1489 | { "","" }, | ||
1479 | { "","" }, | 1490 | { "","" }, |
1480 | { "","" }, | 1491 | { "","" }, |
1481 | { "","" }, \ No newline at end of file | 1492 | { "","" }, \ No newline at end of file |
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 70a1d2d..678143d 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -453,48 +453,49 @@ void CalendarView::init() | |||
453 | if ( QApplication::desktop()->width() < 800 ) | 453 | if ( QApplication::desktop()->width() < 800 ) |
454 | mDateScrollBar->hide(); | 454 | mDateScrollBar->hide(); |
455 | #endif | 455 | #endif |
456 | //mainBoxLayout->addWidget (mLeftFrame); | 456 | //mainBoxLayout->addWidget (mLeftFrame); |
457 | mDateNavigator = new DateNavigatorContainer( mLeftFrame, | 457 | mDateNavigator = new DateNavigatorContainer( mLeftFrame, |
458 | "CalendarView::DateNavigator" ); | 458 | "CalendarView::DateNavigator" ); |
459 | #if 0 | 459 | #if 0 |
460 | // FIXME | 460 | // FIXME |
461 | mDateNavigator = new KDateNavigator(mLeftFrame, mCalendar, TRUE, | 461 | mDateNavigator = new KDateNavigator(mLeftFrame, mCalendar, TRUE, |
462 | "CalendarView::DateNavigator", QDate::currentDate()); | 462 | "CalendarView::DateNavigator", QDate::currentDate()); |
463 | #endif | 463 | #endif |
464 | // mDateNavigator->blockSignals( true ); | 464 | // mDateNavigator->blockSignals( true ); |
465 | //leftFrameLayout->addWidget( mDateNavigator ); | 465 | //leftFrameLayout->addWidget( mDateNavigator ); |
466 | mTodoList = new KOTodoView(mCalendar, mLeftFrame, "todolistsmall"); | 466 | mTodoList = new KOTodoView(mCalendar, mLeftFrame, "todolistsmall"); |
467 | mFilterView = new KOFilterView(&mFilters,mLeftFrame,"CalendarView::FilterView"); | 467 | mFilterView = new KOFilterView(&mFilters,mLeftFrame,"CalendarView::FilterView"); |
468 | mCalEditView = new KOCalEditView(mLeftFrame,"CalendarView::CaleditView"); | 468 | mCalEditView = new KOCalEditView(mLeftFrame,"CalendarView::CaleditView"); |
469 | connect( mCalEditView, SIGNAL( calendarEnabled (int,bool) ),mCalendar, SLOT( setCalendarEnabled(int,bool)) ); | 469 | connect( mCalEditView, SIGNAL( calendarEnabled (int,bool) ),mCalendar, SLOT( setCalendarEnabled(int,bool)) ); |
470 | connect( mCalEditView, SIGNAL( alarmEnabled(int,bool) ),mCalendar, SLOT( setAlarmEnabled(int,bool)) ); | 470 | connect( mCalEditView, SIGNAL( alarmEnabled(int,bool) ),mCalendar, SLOT( setAlarmEnabled(int,bool)) ); |
471 | connect( mCalEditView, SIGNAL( calendarReadonly(int,bool) ),mCalendar, SLOT( setReadOnly(int,bool)) ); | 471 | connect( mCalEditView, SIGNAL( calendarReadonly(int,bool) ),mCalendar, SLOT( setReadOnly(int,bool)) ); |
472 | connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mCalendar, SLOT( setDefaultCalendar(int)) ); | 472 | connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mCalendar, SLOT( setDefaultCalendar(int)) ); |
473 | connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mViewManager, SLOT( setDefaultCalendar(int)) ); | 473 | connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mViewManager, SLOT( setDefaultCalendar(int)) ); |
474 | connect( mCalEditView, SIGNAL( removeCalendar(int) ),mCalendar, SLOT( setCalendarRemove(int)) ); | 474 | connect( mCalEditView, SIGNAL( removeCalendar(int) ),mCalendar, SLOT( setCalendarRemove(int)) ); |
475 | connect( mCalEditView, SIGNAL( calendarAdded(int) ),this, SLOT( addCalendarId(int)) ); | 475 | connect( mCalEditView, SIGNAL( calendarAdded(int) ),this, SLOT( addCalendarId(int)) ); |
476 | connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateView()) ); | 476 | connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateView()) ); |
477 | connect( mCalEditView, SIGNAL( checkCalendar() ),this, SLOT( checkFiles() )); | ||
477 | connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateUnmanagedViews()) ); | 478 | connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateUnmanagedViews()) ); |
478 | 479 | ||
479 | mTodoList->setNavigator( mNavigator ); | 480 | mTodoList->setNavigator( mNavigator ); |
480 | #if 0 | 481 | #if 0 |
481 | if ( QApplication::desktop()->width() < 480 ) { | 482 | if ( QApplication::desktop()->width() < 480 ) { |
482 | leftFrameLayout->addWidget(mFilterView); | 483 | leftFrameLayout->addWidget(mFilterView); |
483 | leftFrameLayout->addWidget(mTodoList, 2 ); | 484 | leftFrameLayout->addWidget(mTodoList, 2 ); |
484 | 485 | ||
485 | } else { | 486 | } else { |
486 | leftFrameLayout->addWidget(mTodoList,2 ); | 487 | leftFrameLayout->addWidget(mTodoList,2 ); |
487 | leftFrameLayout->addWidget(mFilterView ); | 488 | leftFrameLayout->addWidget(mFilterView ); |
488 | } | 489 | } |
489 | #endif | 490 | #endif |
490 | mFilterView->hide(); | 491 | mFilterView->hide(); |
491 | mCalEditView->hide(); | 492 | mCalEditView->hide(); |
492 | QWidget *rightBox = new QWidget( mMainFrame ); | 493 | QWidget *rightBox = new QWidget( mMainFrame ); |
493 | //mainBoxLayout->addWidget ( rightBox, 10 ); | 494 | //mainBoxLayout->addWidget ( rightBox, 10 ); |
494 | QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); | 495 | QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); |
495 | mRightFrame = new QWidgetStack( rightBox ); | 496 | mRightFrame = new QWidgetStack( rightBox ); |
496 | rightLayout->addWidget( mRightFrame, 10 ); | 497 | rightLayout->addWidget( mRightFrame, 10 ); |
497 | 498 | ||
498 | //mLeftFrame = (QWidget *)leftFrame; | 499 | //mLeftFrame = (QWidget *)leftFrame; |
499 | if ( KOPrefs::instance()->mVerticalScreen ) { | 500 | if ( KOPrefs::instance()->mVerticalScreen ) { |
500 | //mDateNavigator->setFixedHeight( mDateNavigator->sizeHint().height() ); | 501 | //mDateNavigator->setFixedHeight( mDateNavigator->sizeHint().height() ); |
@@ -660,65 +661,69 @@ void CalendarView::setScrollBarStep(int val ) | |||
660 | #endif | 661 | #endif |
661 | } | 662 | } |
662 | void CalendarView::scrollBarValue(int val ) | 663 | void CalendarView::scrollBarValue(int val ) |
663 | { | 664 | { |
664 | #ifdef DESKTOP_VERSION | 665 | #ifdef DESKTOP_VERSION |
665 | if ( QApplication::desktop()->width() < 800 ) return; | 666 | if ( QApplication::desktop()->width() < 800 ) return; |
666 | static bool block = false; | 667 | static bool block = false; |
667 | if ( block ) return; | 668 | if ( block ) return; |
668 | block = true; | 669 | block = true; |
669 | val = val/mDateScrollBar->lineStep ()*mDateScrollBar->lineStep(); | 670 | val = val/mDateScrollBar->lineStep ()*mDateScrollBar->lineStep(); |
670 | //qDebug("VAL %d ",val ); | 671 | //qDebug("VAL %d ",val ); |
671 | int count = mNavigator->selectedDates().count(); | 672 | int count = mNavigator->selectedDates().count(); |
672 | int year = mNavigator->selectedDates().first().year(); | 673 | int year = mNavigator->selectedDates().first().year(); |
673 | int day = mNavigator->selectedDates().first().dayOfYear(); | 674 | int day = mNavigator->selectedDates().first().dayOfYear(); |
674 | if ( val == day -1 ) { | 675 | if ( val == day -1 ) { |
675 | block = false; | 676 | block = false; |
676 | return; | 677 | return; |
677 | } | 678 | } |
678 | QDate d ( year,1,1 ); | 679 | QDate d ( year,1,1 ); |
679 | mNavigator->selectDates( d.addDays( val ), count ); | 680 | mNavigator->selectDates( d.addDays( val ), count ); |
680 | block = false; | 681 | block = false; |
681 | #endif | 682 | #endif |
682 | 683 | ||
683 | } | 684 | } |
684 | 685 | void CalendarView::checkFiles() | |
685 | void CalendarView::checkAlarms() | ||
686 | { | 686 | { |
687 | |||
688 | QString message; | 687 | QString message; |
689 | QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; | 688 | QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; |
690 | KopiCalendarFile * cal = calendars.first(); | 689 | KopiCalendarFile * cal = calendars.first(); |
691 | while ( cal ) { | 690 | while ( cal ) { |
692 | if ( cal->mErrorOnLoad ) { | 691 | if ( cal->mErrorOnLoad ) { |
693 | message += cal->mName +"\n"+KGlobal::formatMessage ( "(" +i18n( "Filepath: ")+ cal->mFileName+")" ,0 )+"\n"; | 692 | message += cal->mName +"\n"+KGlobal::formatMessage ( "(" +i18n( "Filepath: ")+ cal->mFileName+")" ,0 )+"\n"; |
694 | } | 693 | } |
695 | cal = calendars.next(); | 694 | cal = calendars.next(); |
696 | } | 695 | } |
697 | if ( !message.isEmpty() ) { | 696 | if ( !message.isEmpty() ) { |
698 | message = KGlobal::formatMessage( i18n("The loading of one or more calendar failed:"),0 )+"\n" + message +KGlobal::formatMessage(i18n("You can try to reload the calendar in the Resource View!"),0); | 697 | message = KGlobal::formatMessage( i18n("Calendar(s) not loaded:"),0 )+"\n" + message +KGlobal::formatMessage(i18n("You can try to reload the calendar in the Resource View!"),0); |
699 | KMessageBox::error(this,message); | 698 | KMessageBox::error(this,message, i18n("Loding of calendar(s) failed")); |
700 | } | 699 | } |
700 | QTimer::singleShot( 2000, this, SLOT ( checkAlarms() )); | ||
701 | } | ||
702 | void CalendarView::checkAlarms() | ||
703 | { | ||
704 | |||
705 | |||
701 | KConfig *config = KOGlobals::config(); | 706 | KConfig *config = KOGlobals::config(); |
702 | config->setGroup( "AppRun" ); | 707 | config->setGroup( "AppRun" ); |
703 | QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); | 708 | QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); |
704 | int daysto = dt.daysTo( QDate::currentDate() ); | 709 | int daysto = dt.daysTo( QDate::currentDate() ); |
705 | int days = config->readNumEntry( "LatestProgramStopDays" , daysto); | 710 | int days = config->readNumEntry( "LatestProgramStopDays" , daysto); |
706 | dt = dt.addDays( days ); | 711 | dt = dt.addDays( days ); |
707 | int secto = dt.secsTo( QDateTime::currentDateTime() ); | 712 | int secto = dt.secsTo( QDateTime::currentDateTime() ); |
708 | int secs = config->readNumEntry( "LatestProgramStopSecs" , secto) - 30; | 713 | int secs = config->readNumEntry( "LatestProgramStopSecs" , secto) - 30; |
709 | //qDebug("KO: Reading program stop %d ", secs); | 714 | //qDebug("KO: Reading program stop %d ", secs); |
710 | //secs -= ( 3600 * 24*3 ); // debug only | 715 | //secs -= ( 3600 * 24*3 ); // debug only |
711 | QDateTime latest = dt.addSecs ( secs ); | 716 | QDateTime latest = dt.addSecs ( secs ); |
712 | qDebug("KO: Last termination on %s ", latest.toString().latin1()); | 717 | qDebug("KO: Last termination on %s ", latest.toString().latin1()); |
713 | //qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() ); | 718 | //qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() ); |
714 | QPtrList<Incidence> el = mCalendar->rawIncidences(); | 719 | QPtrList<Incidence> el = mCalendar->rawIncidences(); |
715 | QPtrList<Incidence> al; | 720 | QPtrList<Incidence> al; |
716 | Incidence* inL = el.first(); | 721 | Incidence* inL = el.first(); |
717 | QDateTime cur = QDateTime::currentDateTime().addSecs(-59); | 722 | QDateTime cur = QDateTime::currentDateTime().addSecs(-59); |
718 | qDebug("KO: Checking alarm until %s ", cur.toString().latin1()); | 723 | qDebug("KO: Checking alarm until %s ", cur.toString().latin1()); |
719 | while ( inL ) { | 724 | while ( inL ) { |
720 | bool ok = false; | 725 | bool ok = false; |
721 | int offset = 0; | 726 | int offset = 0; |
722 | QDateTime next = inL->getNextAlarmDateTime(& ok, &offset, latest ) ; | 727 | QDateTime next = inL->getNextAlarmDateTime(& ok, &offset, latest ) ; |
723 | if ( ok ) { | 728 | if ( ok ) { |
724 | //qDebug("OK %s",next.toString().latin1()); | 729 | //qDebug("OK %s",next.toString().latin1()); |
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index c9e9870..651194b 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h | |||
@@ -180,48 +180,49 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser | |||
180 | void todoSelected( bool ); | 180 | void todoSelected( bool ); |
181 | 181 | ||
182 | /** | 182 | /** |
183 | Emitted, when clipboard content changes. Parameter indicates if paste | 183 | Emitted, when clipboard content changes. Parameter indicates if paste |
184 | is possible or not. | 184 | is possible or not. |
185 | */ | 185 | */ |
186 | void pasteEnabled(bool); | 186 | void pasteEnabled(bool); |
187 | 187 | ||
188 | /** Emitted, when the number of incoming messages has changed. */ | 188 | /** Emitted, when the number of incoming messages has changed. */ |
189 | void numIncomingChanged(int); | 189 | void numIncomingChanged(int); |
190 | 190 | ||
191 | /** Emitted, when the number of outgoing messages has changed. */ | 191 | /** Emitted, when the number of outgoing messages has changed. */ |
192 | void numOutgoingChanged(int); | 192 | void numOutgoingChanged(int); |
193 | 193 | ||
194 | /** Send status message, which can e.g. be displayed in the status bar. */ | 194 | /** Send status message, which can e.g. be displayed in the status bar. */ |
195 | void statusMessage(const QString &); | 195 | void statusMessage(const QString &); |
196 | 196 | ||
197 | void calendarViewExpanded( bool ); | 197 | void calendarViewExpanded( bool ); |
198 | void updateSearchDialog(); | 198 | void updateSearchDialog(); |
199 | void filtersUpdated(); | 199 | void filtersUpdated(); |
200 | 200 | ||
201 | 201 | ||
202 | public slots: | 202 | public slots: |
203 | void checkAlarms(); | 203 | void checkAlarms(); |
204 | void checkFiles(); | ||
204 | void slotprintSelInc(); | 205 | void slotprintSelInc(); |
205 | void showNextAlarms(); | 206 | void showNextAlarms(); |
206 | void showOpenError(); | 207 | void showOpenError(); |
207 | void watchSavedFile(); | 208 | void watchSavedFile(); |
208 | void recheckTimerAlarm(); | 209 | void recheckTimerAlarm(); |
209 | void checkNextTimerAlarm(); | 210 | void checkNextTimerAlarm(); |
210 | void addAlarm(const QDateTime &qdt, const QString ¬i ); | 211 | void addAlarm(const QDateTime &qdt, const QString ¬i ); |
211 | void addSuspendAlarm(const QDateTime &qdt, const QString ¬i ); | 212 | void addSuspendAlarm(const QDateTime &qdt, const QString ¬i ); |
212 | void removeAlarm(const QDateTime &qdt, const QString ¬i ); | 213 | void removeAlarm(const QDateTime &qdt, const QString ¬i ); |
213 | 214 | ||
214 | /** options dialog made a changed to the configuration. we catch this | 215 | /** options dialog made a changed to the configuration. we catch this |
215 | * and notify all widgets which need to update their configuration. */ | 216 | * and notify all widgets which need to update their configuration. */ |
216 | void updateConfig(); | 217 | void updateConfig(); |
217 | 218 | ||
218 | void insertBirthdays(const QString& uid, const QStringList& birthdayList, | 219 | void insertBirthdays(const QString& uid, const QStringList& birthdayList, |
219 | const QStringList& anniversaryList, const QStringList& realNameList, | 220 | const QStringList& anniversaryList, const QStringList& realNameList, |
220 | const QStringList& emailList, const QStringList& assembledNameList, | 221 | const QStringList& emailList, const QStringList& assembledNameList, |
221 | const QStringList& uidList); | 222 | const QStringList& uidList); |
222 | 223 | ||
223 | /** | 224 | /** |
224 | Load calendar from file \a filename. If \a merge is true, load | 225 | Load calendar from file \a filename. If \a merge is true, load |
225 | calendar into existing one, if it is false, clear calendar, before | 226 | calendar into existing one, if it is false, clear calendar, before |
226 | loading. Return true, if calendar could be successfully loaded. | 227 | loading. Return true, if calendar could be successfully loaded. |
227 | */ | 228 | */ |
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp index 3cde103..20118aa 100644 --- a/korganizer/kofilterview.cpp +++ b/korganizer/kofilterview.cpp | |||
@@ -194,48 +194,49 @@ void KOCalEditView::setColor( const QColor& c, int id ) | |||
194 | emit needsUpdate(); | 194 | emit needsUpdate(); |
195 | } | 195 | } |
196 | void KOCalEditView::deleteCal( int id ) | 196 | void KOCalEditView::deleteCal( int id ) |
197 | { | 197 | { |
198 | KopiCalendarFile * kkf = KOPrefs::instance()->getCalendar( id ); | 198 | KopiCalendarFile * kkf = KOPrefs::instance()->getCalendar( id ); |
199 | QString name = kkf->mName; | 199 | QString name = kkf->mName; |
200 | QString file = KGlobal::formatMessage ( kkf->mFileName ,0 ); | 200 | QString file = KGlobal::formatMessage ( kkf->mFileName ,0 ); |
201 | if ( KMessageBox::warningContinueCancel( this, i18n("The calendar <b>%1</b> is displaying file <b>%2</b>. Do you want to remove this calendar from KO/Pi? (The file is not removed!)").arg(name).arg(file) ) != KMessageBox::Continue ) return; | 201 | if ( KMessageBox::warningContinueCancel( this, i18n("The calendar <b>%1</b> is displaying file <b>%2</b>. Do you want to remove this calendar from KO/Pi? (The file is not removed!)").arg(name).arg(file) ) != KMessageBox::Continue ) return; |
202 | if ( kkf->isStandard ) | 202 | if ( kkf->isStandard ) |
203 | selectStdCal( 1, true ); | 203 | selectStdCal( 1, true ); |
204 | emit removeCalendar ( id ); | 204 | emit removeCalendar ( id ); |
205 | KOPrefs::instance()->mCalendars.remove ( kkf ); | 205 | KOPrefs::instance()->mCalendars.remove ( kkf ); |
206 | emit needsUpdate(); | 206 | emit needsUpdate(); |
207 | QTimer::singleShot( 0, this, SLOT ( readConfig() ) ); | 207 | QTimer::singleShot( 0, this, SLOT ( readConfig() ) ); |
208 | } | 208 | } |
209 | void KOCalEditView::infoCal( int id ) | 209 | void KOCalEditView::infoCal( int id ) |
210 | { | 210 | { |
211 | QString name = KOPrefs::instance()->getCalendar( id )->mName; | 211 | QString name = KOPrefs::instance()->getCalendar( id )->mName; |
212 | QString file = KGlobal::formatMessage ( KOPrefs::instance()->getCalendar( id )->mFileName, 0 ); | 212 | QString file = KGlobal::formatMessage ( KOPrefs::instance()->getCalendar( id )->mFileName, 0 ); |
213 | if ( KOPrefs::instance()->getCalendar( id )->mErrorOnLoad ) { | 213 | if ( KOPrefs::instance()->getCalendar( id )->mErrorOnLoad ) { |
214 | if ( KMessageBox::Yes == KMessageBox::questionYesNo( this, i18n("The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>").arg(name).arg(file) ) ) { | 214 | if ( KMessageBox::Yes == KMessageBox::questionYesNo( this, i18n("The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>").arg(name).arg(file) ) ) { |
215 | emit calendarAdded( id ); | 215 | emit calendarAdded( id ); |
216 | emit needsUpdate(); | 216 | emit needsUpdate(); |
217 | QTimer::singleShot( 0, this, SLOT ( readConfig() ) ); | 217 | QTimer::singleShot( 0, this, SLOT ( readConfig() ) ); |
218 | QTimer::singleShot( 100, this, SIGNAL ( checkCalendar() ) ); | ||
218 | } | 219 | } |
219 | } | 220 | } |
220 | else | 221 | else |
221 | KMessageBox::information( this, i18n("The calendar <b>%1</b> is displaying file <b>%2</b>").arg(name).arg(file) ); | 222 | KMessageBox::information( this, i18n("The calendar <b>%1</b> is displaying file <b>%2</b>").arg(name).arg(file) ); |
222 | } | 223 | } |
223 | void KOCalEditView::readConfig() | 224 | void KOCalEditView::readConfig() |
224 | { | 225 | { |
225 | 226 | ||
226 | mStdandardB.clear(); | 227 | mStdandardB.clear(); |
227 | mEnabledB.clear(); | 228 | mEnabledB.clear(); |
228 | mAlarmB.clear(); | 229 | mAlarmB.clear(); |
229 | mROB.clear(); | 230 | mROB.clear(); |
230 | 231 | ||
231 | if ( mw ) delete mw; | 232 | if ( mw ) delete mw; |
232 | mw = new QWidget ( viewport() ); | 233 | mw = new QWidget ( viewport() ); |
233 | addChild(mw); | 234 | addChild(mw); |
234 | int ii = 0; | 235 | int ii = 0; |
235 | mainLayout = new QGridLayout ( mw , 2, 8 ); | 236 | mainLayout = new QGridLayout ( mw , 2, 8 ); |
236 | mainLayout->setMargin( 2 ); | 237 | mainLayout->setMargin( 2 ); |
237 | mainLayout->setSpacing( 2 ); | 238 | mainLayout->setSpacing( 2 ); |
238 | QPushButton * addBut = new QPushButton ( mw ); | 239 | QPushButton * addBut = new QPushButton ( mw ); |
239 | addBut->setFocusPolicy(NoFocus); | 240 | addBut->setFocusPolicy(NoFocus); |
240 | mainLayout->addWidget( addBut,0,0 ); | 241 | mainLayout->addWidget( addBut,0,0 ); |
241 | addBut->setText( "D"); | 242 | addBut->setText( "D"); |
@@ -358,48 +359,49 @@ void KOCalEditView::addCal() | |||
358 | prefs.url->setURL( file ); | 359 | prefs.url->setURL( file ); |
359 | if ( ! prefs.exec() ) | 360 | if ( ! prefs.exec() ) |
360 | return; | 361 | return; |
361 | name = prefs.calName(); | 362 | name = prefs.calName(); |
362 | file = prefs.calFileName(); | 363 | file = prefs.calFileName(); |
363 | tryagain = false; | 364 | tryagain = false; |
364 | KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); | 365 | KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); |
365 | while ( kkf ) { | 366 | while ( kkf ) { |
366 | if ( kkf->mName == name ) { | 367 | if ( kkf->mName == name ) { |
367 | KMessageBox::information( this, i18n("Sorry, the calendar name \n%1\nalready exists!\nPlease choose another name!").arg( name ) ); | 368 | KMessageBox::information( this, i18n("Sorry, the calendar name \n%1\nalready exists!\nPlease choose another name!").arg( name ) ); |
368 | name = ""; | 369 | name = ""; |
369 | tryagain = true; | 370 | tryagain = true; |
370 | break; | 371 | break; |
371 | } | 372 | } |
372 | if ( kkf->mFileName == file ) { | 373 | if ( kkf->mFileName == file ) { |
373 | KMessageBox::information( this, i18n("Sorry, the file \n%1\nis already loaded!\nPlease choose another file!").arg( KGlobal::formatMessage (file, 0 )) ); | 374 | KMessageBox::information( this, i18n("Sorry, the file \n%1\nis already loaded!\nPlease choose another file!").arg( KGlobal::formatMessage (file, 0 )) ); |
374 | tryagain = true; | 375 | tryagain = true; |
375 | file = ""; | 376 | file = ""; |
376 | break; | 377 | break; |
377 | } | 378 | } |
378 | kkf = KOPrefs::instance()->mCalendars.next(); | 379 | kkf = KOPrefs::instance()->mCalendars.next(); |
379 | } | 380 | } |
380 | } | 381 | } |
381 | addCalendar ( name, file ); | 382 | addCalendar ( name, file ); |
383 | QTimer::singleShot( 100, this, SIGNAL ( checkCalendar() ) ); | ||
382 | } | 384 | } |
383 | int KOCalEditView::addCalendar( QString name, QString file, bool ask ) | 385 | int KOCalEditView::addCalendar( QString name, QString file, bool ask ) |
384 | { | 386 | { |
385 | 387 | ||
386 | QFileInfo fi ( file ); | 388 | QFileInfo fi ( file ); |
387 | if (!fi.exists() ) { | 389 | if (!fi.exists() ) { |
388 | if ( ask ) | 390 | if ( ask ) |
389 | if ( KMessageBox::questionYesNo(this, i18n("The file\n%1\ndoes not exist!\nShall I create it for you?").arg( file ) )== KMessageBox::No ) | 391 | if ( KMessageBox::questionYesNo(this, i18n("The file\n%1\ndoes not exist!\nShall I create it for you?").arg( file ) )== KMessageBox::No ) |
390 | return 0; | 392 | return 0; |
391 | QFile fileIn( file ); | 393 | QFile fileIn( file ); |
392 | if (!fileIn.open( IO_WriteOnly ) ) { | 394 | if (!fileIn.open( IO_WriteOnly ) ) { |
393 | KMessageBox::sorry( this, i18n("Sorry, cannot create the file\n%1!\nNo calendar added!").arg( file ) ); | 395 | KMessageBox::sorry( this, i18n("Sorry, cannot create the file\n%1!\nNo calendar added!").arg( file ) ); |
394 | return 0; | 396 | return 0; |
395 | } | 397 | } |
396 | QTextStream tsIn( &fileIn ); | 398 | QTextStream tsIn( &fileIn ); |
397 | tsIn.setCodec( QTextCodec::codecForName("utf8") ); | 399 | tsIn.setCodec( QTextCodec::codecForName("utf8") ); |
398 | tsIn << "BEGIN:VCALENDAR\nPRODID:-//KDE-Pim//Platform-independent 2.1.0\nVERSION:2.0\nEND:VCALENDAR\n"; | 400 | tsIn << "BEGIN:VCALENDAR\nPRODID:-//KDE-Pim//Platform-independent 2.1.0\nVERSION:2.0\nEND:VCALENDAR\n"; |
399 | fileIn.close(); | 401 | fileIn.close(); |
400 | } | 402 | } |
401 | KopiCalendarFile * kkf = KOPrefs::instance()->getNewCalendar(); | 403 | KopiCalendarFile * kkf = KOPrefs::instance()->getNewCalendar(); |
402 | kkf->mName = name; | 404 | kkf->mName = name; |
403 | kkf->mFileName = file; | 405 | kkf->mFileName = file; |
404 | emit calendarAdded( kkf->mCalNumber ); | 406 | emit calendarAdded( kkf->mCalNumber ); |
405 | if ( ask ) | 407 | if ( ask ) |
diff --git a/korganizer/kofilterview.h b/korganizer/kofilterview.h index 54fe2c5..02107cf 100644 --- a/korganizer/kofilterview.h +++ b/korganizer/kofilterview.h | |||
@@ -212,38 +212,39 @@ class KOCalEditView : public QScrollView | |||
212 | int getBirtdayID(); | 212 | int getBirtdayID(); |
213 | public slots: | 213 | public slots: |
214 | void addCal(); | 214 | void addCal(); |
215 | void enableAll(); | 215 | void enableAll(); |
216 | void enableAlarm(); | 216 | void enableAlarm(); |
217 | void disableRO(); | 217 | void disableRO(); |
218 | void deleteAll(); | 218 | void deleteAll(); |
219 | void selectStdCal(int,bool ); | 219 | void selectStdCal(int,bool ); |
220 | void selectCal(int,bool ); | 220 | void selectCal(int,bool ); |
221 | void selectCalAlarm(int,bool ); | 221 | void selectCalAlarm(int,bool ); |
222 | void selectReadOnly(int,bool ); | 222 | void selectReadOnly(int,bool ); |
223 | void setColor(const QColor &,int) ; | 223 | void setColor(const QColor &,int) ; |
224 | void deleteCal(int) ; | 224 | void deleteCal(int) ; |
225 | void infoCal(int) ; | 225 | void infoCal(int) ; |
226 | void readConfig(); | 226 | void readConfig(); |
227 | void defaultInfo(); | 227 | void defaultInfo(); |
228 | signals: | 228 | signals: |
229 | void alarmEnabled ( int cal, bool enable ); | 229 | void alarmEnabled ( int cal, bool enable ); |
230 | void calendarEnabled ( int cal, bool enable ); | 230 | void calendarEnabled ( int cal, bool enable ); |
231 | void calendarReadonly ( int cal, bool readonly ); | 231 | void calendarReadonly ( int cal, bool readonly ); |
232 | void setCalendarDefault ( int cal ); | 232 | void setCalendarDefault ( int cal ); |
233 | void removeCalendar ( int cal ); | 233 | void removeCalendar ( int cal ); |
234 | void calendarAdded( int ); | 234 | void calendarAdded( int ); |
235 | void needsUpdate(); | 235 | void needsUpdate(); |
236 | void checkCalendar(); | ||
236 | 237 | ||
237 | private: | 238 | private: |
238 | QWidget *mw; | 239 | QWidget *mw; |
239 | void toggleList ( QPtrList<KOCalCheckButton> ); | 240 | void toggleList ( QPtrList<KOCalCheckButton> ); |
240 | QPtrList<KOCalRadioButton> mStdandardB; | 241 | QPtrList<KOCalRadioButton> mStdandardB; |
241 | QPtrList<KOCalCheckButton> mEnabledB; | 242 | QPtrList<KOCalCheckButton> mEnabledB; |
242 | QPtrList<KOCalCheckButton> mAlarmB; | 243 | QPtrList<KOCalCheckButton> mAlarmB; |
243 | QPtrList<KOCalCheckButton> mROB; | 244 | QPtrList<KOCalCheckButton> mROB; |
244 | QGridLayout* mainLayout; | 245 | QGridLayout* mainLayout; |
245 | }; | 246 | }; |
246 | 247 | ||
247 | 248 | ||
248 | 249 | ||
249 | #endif // KOFILTERVIEW_H | 250 | #endif // KOFILTERVIEW_H |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index b797d8c..501eed5 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -377,53 +377,50 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : | |||
377 | 377 | ||
378 | 378 | ||
379 | 379 | ||
380 | mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins ); | 380 | mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins ); |
381 | if ( showWarning ) { | 381 | if ( showWarning ) { |
382 | KMessageBox::information( this, | 382 | KMessageBox::information( this, |
383 | "You are starting KO/Pi for the first time.\nPlease read menu: Help-What's New,\nif you did an update!\nPlease choose your timezone in the \nConfigure Dialog TAB Time Zone!\nPlease choose your language\nin the TAB Locale!\nYou get the Configure Dialog\nvia Menu: Actions - Configure....\nClick OK to show the Configure Dialog!\n", "KO/Pi information"); | 383 | "You are starting KO/Pi for the first time.\nPlease read menu: Help-What's New,\nif you did an update!\nPlease choose your timezone in the \nConfigure Dialog TAB Time Zone!\nPlease choose your language\nin the TAB Locale!\nYou get the Configure Dialog\nvia Menu: Actions - Configure....\nClick OK to show the Configure Dialog!\n", "KO/Pi information"); |
384 | qApp->processEvents(); | 384 | qApp->processEvents(); |
385 | mView->dialogManager()->showSyncOptions(); | 385 | mView->dialogManager()->showSyncOptions(); |
386 | } | 386 | } |
387 | 387 | ||
388 | //US listen for result adressed from Ka/Pi | 388 | //US listen for result adressed from Ka/Pi |
389 | #ifndef DESKTOP_VERSION | 389 | #ifndef DESKTOP_VERSION |
390 | connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); | 390 | connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); |
391 | #endif | 391 | #endif |
392 | #ifndef DESKTOP_VERSION | 392 | #ifndef DESKTOP_VERSION |
393 | infrared = 0; | 393 | infrared = 0; |
394 | #endif | 394 | #endif |
395 | updateFilterToolbar(); | 395 | updateFilterToolbar(); |
396 | updateWeek( mView->startDate() ); | 396 | updateWeek( mView->startDate() ); |
397 | connect( mView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ), | 397 | connect( mView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ), |
398 | SLOT( updateWeekNum( const KCal::DateList & ) ) ); | 398 | SLOT( updateWeekNum( const KCal::DateList & ) ) ); |
399 | mBRdisabled = false; | 399 | mBRdisabled = false; |
400 | //toggleBeamReceive(); | 400 | //toggleBeamReceive(); |
401 | int tiint= 3000; | 401 | |
402 | #ifndef DESKTOP_VERSION | 402 | QTimer::singleShot( 1000, mView, SLOT ( checkFiles() )); |
403 | tiint = 5000; | ||
404 | #endif | ||
405 | QTimer::singleShot( tiint, mView, SLOT ( checkAlarms() )); | ||
406 | } | 403 | } |
407 | MainWindow::~MainWindow() | 404 | MainWindow::~MainWindow() |
408 | { | 405 | { |
409 | //qDebug("MainWindow::~MainWindow() "); | 406 | //qDebug("MainWindow::~MainWindow() "); |
410 | //save toolbar location | 407 | //save toolbar location |
411 | delete mCalendar; | 408 | delete mCalendar; |
412 | delete mSyncManager; | 409 | delete mSyncManager; |
413 | #ifndef DESKTOP_VERSION | 410 | #ifndef DESKTOP_VERSION |
414 | if ( infrared ) | 411 | if ( infrared ) |
415 | delete infrared; | 412 | delete infrared; |
416 | #endif | 413 | #endif |
417 | 414 | ||
418 | 415 | ||
419 | } | 416 | } |
420 | 417 | ||
421 | void MainWindow::disableBR(bool b) | 418 | void MainWindow::disableBR(bool b) |
422 | { | 419 | { |
423 | #ifndef DESKTOP_VERSION | 420 | #ifndef DESKTOP_VERSION |
424 | if ( b ) { | 421 | if ( b ) { |
425 | if ( infrared ) { | 422 | if ( infrared ) { |
426 | toggleBeamReceive(); | 423 | toggleBeamReceive(); |
427 | mBRdisabled = true; | 424 | mBRdisabled = true; |
428 | } | 425 | } |
429 | mBRdisabled = true; | 426 | mBRdisabled = true; |