summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-06-04 09:25:09 (UTC)
committer zautrix <zautrix>2005-06-04 09:25:09 (UTC)
commitd40cf5135c640506011334364274b8ee5df9998b (patch) (unidiff)
tree56895a78e170856ff641dfa13f2f6eb4cc2b3488
parent0e0ac7a92ac2fe052b3e72d49e505a078b05e7f3 (diff)
downloadkdepimpi-d40cf5135c640506011334364274b8ee5df9998b.zip
kdepimpi-d40cf5135c640506011334364274b8ee5df9998b.tar.gz
kdepimpi-d40cf5135c640506011334364274b8ee5df9998b.tar.bz2
fix
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt2
-rw-r--r--korganizer/calendarview.cpp10
-rw-r--r--korganizer/calendarview.h1
-rw-r--r--korganizer/mainwindow.cpp7
4 files changed, 14 insertions, 6 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index cc8102c..5a27a10 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1325,57 +1325,57 @@
1325{ "%1min","%1min" }, 1325{ "%1min","%1min" },
1326{ "( %1 before )","( %1 vorher )" }, 1326{ "( %1 before )","( %1 vorher )" },
1327{ "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" }, 1327{ "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" },
1328{ "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" }, 1328{ "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" },
1329{ "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." }, 1329{ "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." },
1330{ "Show Sync Events","Zeige Sync-Ereignisse" }, 1330{ "Show Sync Events","Zeige Sync-Ereignisse" },
1331{ "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" }, 1331{ "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" },
1332{ "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" }, 1332{ "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" },
1333{ " on "," am " }, 1333{ " on "," am " },
1334{ "On: ","Am: " }, 1334{ "On: ","Am: " },
1335{ "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" }, 1335{ "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" },
1336{ "Start/Stop todo...","Starte/Stoppe Todo..." }, 1336{ "Start/Stop todo...","Starte/Stoppe Todo..." },
1337{ "Color for running todos:","Farbe für laufende Todos:" }, 1337{ "Color for running todos:","Farbe für laufende Todos:" },
1338{ "The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?","Das Todo\n%1\nist gestartet.\nWollen Sie es\nauf gestoppt setzen?" }, 1338{ "The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?","Das Todo\n%1\nist gestartet.\nWollen Sie es\nauf gestoppt setzen?" },
1339{ "Todo is started","Todo ist gestartet" }, 1339{ "Todo is started","Todo ist gestartet" },
1340{ "Stop todo","Stoppe Todo" }, 1340{ "Stop todo","Stoppe Todo" },
1341{ "Todo is stopped","Todo ist gestoppt" }, 1341{ "Todo is stopped","Todo ist gestoppt" },
1342{ "Start todo","Starte Todo" }, 1342{ "Start todo","Starte Todo" },
1343{ "The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?","Das Todo\n%1\nist gestoppt.\nWollen Sie es auf\ngestartet setzen?" }, 1343{ "The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?","Das Todo\n%1\nist gestoppt.\nWollen Sie es auf\ngestartet setzen?" },
1344{ "The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?","Das Todo\n%1\nwird geklont!\nEs hat Untertodos!\nMöchten Sie alle\nUntertodos auch klonen?" }, 1344{ "The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?","Das Todo\n%1\nwird geklont!\nEs hat Untertodos!\nMöchten Sie alle\nUntertodos auch klonen?" },
1345{ "Todo has subtodos","Todo hat Untertodos" }, 1345{ "Todo has subtodos","Todo hat Untertodos" },
1346{ "Block popup until mouse button release","Sperre Popup bis Mausknopf losgelassen" }, 1346{ "Block popup until mouse button release","Sperre Popup bis Mausknopf losgelassen" },
1347{ "Colors","Farben" }, 1347{ "Colors","Farben" },
1348{ "Click on new parent item","Klicke auf neues Übertodo" }, 1348{ "Click on new parent item","Klicke auf neues Übertodo" },
1349{ "Reparenting aborted!","Übertodo setzen abgebrochen" }, 1349{ "Reparenting aborted!","Übertodo setzen abgebrochen" },
1350{ "Cannot move Todo to itself\nor a child of itself","Kann nicht Todo auf\nsich selbst oder\nein Untertodo verschieben" }, 1350{ "Cannot move Todo to itself\nor a child of itself","Kann nicht Todo auf\nsich selbst oder\nein Untertodo verschieben" },
1351{ "Recursive reparenting not possible!","Rekursives Verschieben nicht möglich" }, 1351{ "Recursive reparenting not possible!","Rekursives Verschieben nicht möglich" },
1352{ "Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)","Entferne alle erledigten Todos?\n(Erledigte wiederholende Todos\nwerden nicht gelöscht!)" }, 1352{ "Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)","Entferne alle erledigten Todos?\n(Erledigte wiederholende Todos\nwerden nicht gelöscht!)" },
1353{ "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, 1353{ "Alternating background of list views","Abwechselnder Hintergrund für Listen" },
1354{ "times","Zeiten" }, 1354{ "times","Zeiten" },
1355{ "The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?","Das Todo\n%1\nhat Untertodos!\nMöchten Sie die Kategorien\nauch für alle Untertodos setzen?" }, 1355{ "The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?","Das Todo\n%1\nhat Untertodos!\nMöchten Sie die Kategorien\nauch für alle Untertodos setzen?" },
1356{ "Backup enabled","Backup angeschaltet" }, 1356{ "Backup enabled","Backup angeschaltet" },
1357{ "Use standard backup dir","Standard Backupverzeichnis" }, 1357{ "Use standard backup dir","Standard Backupverzeichnis" },
1358{ "Number of Backups:","Anzahl der Backups" }, 1358{ "Number of Backups:","Anzahl der Backups" },
1359{ "Make backup every ","Mache ein Backup alle " }, 1359{ "Make backup every ","Mache ein Backup alle " },
1360{ " days"," Tage" }, 1360{ " days"," Tage" },
1361{ "Creating backup ... please wait ...","Erzeuge Backup ... bitte warten ..." }, 1361{ "Creating backup ... please wait ...","Erzeuge Backup ... bitte warten ..." },
1362{ "Backup Failed!","Backup Problem!" }, 1362{ "Backup Failed!","Backup Problem!" },
1363{ "Try again now","Versuche jetzt nochmal" }, 1363{ "Try again now","Versuche jetzt nochmal" },
1364{ "Try again later","Versuche später nochmal" }, 1364{ "Try again later","Versuche später nochmal" },
1365{ "Try again tomorrow","Versuche morgen nochmal" }, 1365{ "Try again tomorrow","Versuche morgen nochmal" },
1366{ "Disable backup","Schalte Backup ab" }, 1366{ "Disable backup","Schalte Backup ab" },
1367{ "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" }, 1367{ "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" },
1368{ "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" }, 1368{ "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" },
1369{ "Choose action","Wähle Aktion" }, 1369{ "Choose action","Wähle Aktion" },
1370{ "Comment for todo:","Kommentar zum Todo:" }, 1370{ "Comment for todo:","Kommentar zum Todo:" },
1371{ "Stop+note","Stop+Notiz" }, 1371{ "Stop+note","Stop+Notiz" },
1372{ "Agenda view shows completed todos","Agenda Ansicht zeigt erledigte Todos" }, 1372{ "Agenda view shows completed todos","Agenda Ansicht zeigt erledigte Todos" },
1373{ "KO/Pi: Missing alarm notification!","KO/Pi: Benachrichtigung über verpasste Alarme!" }, 1373{ "KO/Pi: Missing alarms!","KO/Pi: Verpasste Alarme!" },
1374{ "You missed the alarms for the following events or todos:","Sie verpassten die Alarme für folgende Termine oder Todos:" }, 1374{ "You missed the alarms for the following events or todos:","Sie verpassten die Alarme für folgende Termine oder Todos:" },
1375{ "","" }, 1375{ "","" },
1376{ "","" }, 1376{ "","" },
1377{ "","" }, 1377{ "","" },
1378{ "","" }, 1378{ "","" },
1379{ "","" }, 1379{ "","" },
1380{ "","" }, 1380{ "","" },
1381{ "","" }, \ No newline at end of file 1381{ "","" }, \ No newline at end of file
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 5132f98..42166ab 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -166,96 +166,100 @@ MissedAlarmTextBrowser::MissedAlarmTextBrowser(QWidget *parent, QPtrList<Inciden
166 mText += "<table>"; 166 mText += "<table>";
167 while ( inc ) { 167 while ( inc ) {
168 QDateTime dt ; 168 QDateTime dt ;
169 QString tempText = "<a "; 169 QString tempText = "<a ";
170 bool ok; 170 bool ok;
171 dt = inc->getNextOccurence( start, &ok ); 171 dt = inc->getNextOccurence( start, &ok );
172 if ( !ok ) continue; 172 if ( !ok ) continue;
173 if ( inc->type() == "Event" ) { 173 if ( inc->type() == "Event" ) {
174 tempText += "href=\"event:"; 174 tempText += "href=\"event:";
175 } else if ( inc->type() == "Todo" ) { 175 } else if ( inc->type() == "Todo" ) {
176 tempText += "href=\"todo:"; 176 tempText += "href=\"todo:";
177 } 177 }
178 tempText += inc->uid() + "\">"; 178 tempText += inc->uid() + "\">";
179 if ( inc->type() == "Todo" ) 179 if ( inc->type() == "Todo" )
180 tempText += i18n("Todo: "); 180 tempText += i18n("Todo: ");
181 if ( inc->summary().length() > 0 ) 181 if ( inc->summary().length() > 0 )
182 tempText += inc->summary(); 182 tempText += inc->summary();
183 else 183 else
184 tempText += i18n("-no summary-"); 184 tempText += i18n("-no summary-");
185 QString timestr; 185 QString timestr;
186 if (!inc->doesFloat()) 186 if (!inc->doesFloat())
187 timestr = KGlobal::locale()->formatDateTime( dt, KOPrefs::instance()->mShortDateInViewer) +": "; 187 timestr = KGlobal::locale()->formatDateTime( dt, KOPrefs::instance()->mShortDateInViewer) +": ";
188 else 188 else
189 timestr = KGlobal::locale()->formatDate( dt.date() , KOPrefs::instance()->mShortDateInViewer) +": "; 189 timestr = KGlobal::locale()->formatDate( dt.date() , KOPrefs::instance()->mShortDateInViewer) +": ";
190 if ( dt.date() == QDate::currentDate() && time == 0 ) { 190 if ( dt.date() == QDate::currentDate() && time == 0 ) {
191 time = 1; 191 time = 1;
192 mText +="</table>"; 192 mText +="</table>";
193 mText += "</td></tr>\n<tr bgcolor=\"#FFDC64\"><td>"; 193 mText += "</td></tr>\n<tr bgcolor=\"#FFDC64\"><td>";
194 mText += "<table>"; 194 mText += "<table>";
195 195
196 } 196 }
197 if ( dt.date() > QDate::currentDate() && time != 2 ) { 197 if ( dt.date() > QDate::currentDate() && time != 2 ) {
198 time = 2; 198 time = 2;
199 mText +="</table>"; 199 mText +="</table>";
200 mText += "</td></tr>\n<tr bgcolor=\"#6AFF6A\"><td>"; 200 mText += "</td></tr>\n<tr bgcolor=\"#6AFF6A\"><td>";
201 mText += "<table>"; 201 mText += "<table>";
202 } 202 }
203 mText +="<tr><td><b>"; 203 mText +="<tr><td><b>";
204 mText += timestr; 204 mText += timestr;
205 mText += "</b></td><td>"; 205 mText += "</b></td><td>";
206 mText += tempText; 206 mText += tempText;
207 mText += "</td></tr>\n"; 207 mText += "</td></tr>\n";
208 inc = getNextInc( start ); 208 inc = getNextInc( start );
209 } 209 }
210 mText +="</table>"; 210 mText +="</table>";
211 setText( mText ); 211 setText( mText );
212} 212}
213 213
214MissedAlarmTextBrowser::~MissedAlarmTextBrowser()
215{
216 //qDebug("delete MissedAlarmTextBrowser::~MissedAlarmTextBrowser() ");
217}
214Incidence * MissedAlarmTextBrowser::getNextInc( QDateTime start ) 218Incidence * MissedAlarmTextBrowser::getNextInc( QDateTime start )
215{ 219{
216 QDateTime dt ; 220 QDateTime dt ;
217 Incidence * retInc; 221 Incidence * retInc;
218 Incidence * inc = mAlarms.first(); 222 Incidence * inc = mAlarms.first();
219 if ( inc == 0 ) 223 if ( inc == 0 )
220 return 0; 224 return 0;
221 bool ok; 225 bool ok;
222 dt = inc->getNextOccurence( start, &ok ); 226 dt = inc->getNextOccurence( start, &ok );
223 if ( ! ok ) return 0; 227 if ( ! ok ) return 0;
224 QDateTime dtn ; 228 QDateTime dtn ;
225 retInc = inc; 229 retInc = inc;
226 inc = mAlarms.next(); 230 inc = mAlarms.next();
227 while ( inc ) { 231 while ( inc ) {
228 dtn = inc->getNextOccurence( start, &ok ); 232 dtn = inc->getNextOccurence( start, &ok );
229 if ( ! ok ) return 0; 233 if ( ! ok ) return 0;
230 if ( dtn < dt ) { 234 if ( dtn < dt ) {
231 dt = dtn; 235 dt = dtn;
232 retInc = inc; 236 retInc = inc;
233 } 237 }
234 inc = mAlarms.next(); 238 inc = mAlarms.next();
235 } 239 }
236 mAlarms.remove( retInc ); 240 mAlarms.remove( retInc );
237 return retInc; 241 return retInc;
238 242
239} 243}
240void MissedAlarmTextBrowser::setSource(const QString & n) 244void MissedAlarmTextBrowser::setSource(const QString & n)
241{ 245{
242 if (n.startsWith("event:")) { 246 if (n.startsWith("event:")) {
243#ifdef DESKTOP_VERSION 247#ifdef DESKTOP_VERSION
244 emit showIncidence(n.mid(8)); 248 emit showIncidence(n.mid(8));
245#else 249#else
246 emit showIncidence(n.mid(6)); 250 emit showIncidence(n.mid(6));
247#endif 251#endif
248 return; 252 return;
249 } else if (n.startsWith("todo:")) { 253 } else if (n.startsWith("todo:")) {
250#ifdef DESKTOP_VERSION 254#ifdef DESKTOP_VERSION
251 emit showIncidence(n.mid(7)); 255 emit showIncidence(n.mid(7));
252#else 256#else
253 emit showIncidence(n.mid(5)); 257 emit showIncidence(n.mid(5));
254#endif 258#endif
255 return; 259 return;
256 } 260 }
257} 261}
258 262
259 263
260class KOBeamPrefs : public QDialog 264class KOBeamPrefs : public QDialog
261{ 265{
@@ -599,104 +603,104 @@ void CalendarView::init()
599 connect( mAlarmTimer, SIGNAL( timeout () ), SLOT( timerAlarm() ) ); 603 connect( mAlarmTimer, SIGNAL( timeout () ), SLOT( timerAlarm() ) );
600 mAlarmDialog = new AlarmDialog( this ); 604 mAlarmDialog = new AlarmDialog( this );
601 connect( mAlarmDialog, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addSuspendAlarm(const QDateTime &, const QString & ) ) ); 605 connect( mAlarmDialog, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addSuspendAlarm(const QDateTime &, const QString & ) ) );
602 mAlarmDialog->setServerNotification( false ); 606 mAlarmDialog->setServerNotification( false );
603 mAlarmDialog->setSuspendTime( KOPrefs::instance()->mAlarmSuspendTime ); 607 mAlarmDialog->setSuspendTime( KOPrefs::instance()->mAlarmSuspendTime );
604 608
605 609
606#ifndef DESKTOP_VERSION 610#ifndef DESKTOP_VERSION
607//US listen for arriving address resultsets 611//US listen for arriving address resultsets
608 connect(ExternalAppHandler::instance(), SIGNAL(receivedBirthdayListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)), 612 connect(ExternalAppHandler::instance(), SIGNAL(receivedBirthdayListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)),
609 this, SLOT(insertBirthdays(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&))); 613 this, SLOT(insertBirthdays(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)));
610#endif 614#endif
611 mDateNavigator->setCalendar( mCalendar ); 615 mDateNavigator->setCalendar( mCalendar );
612} 616}
613 617
614 618
615CalendarView::~CalendarView() 619CalendarView::~CalendarView()
616{ 620{
617 // kdDebug() << "~CalendarView()" << endl; 621 // kdDebug() << "~CalendarView()" << endl;
618 //qDebug("CalendarView::~CalendarView() "); 622 //qDebug("CalendarView::~CalendarView() ");
619 delete mDialogManager; 623 delete mDialogManager;
620 delete mViewManager; 624 delete mViewManager;
621 delete mStorage; 625 delete mStorage;
622 delete mDateFrame ; 626 delete mDateFrame ;
623 delete beamDialog; 627 delete beamDialog;
624 delete mEventViewerDialog; 628 delete mEventViewerDialog;
625 //kdDebug() << "~CalendarView() done" << endl; 629 //kdDebug() << "~CalendarView() done" << endl;
626} 630}
627void CalendarView::checkAlarms() 631void CalendarView::checkAlarms()
628{ 632{
629 KConfig *config = KOGlobals::config(); 633 KConfig *config = KOGlobals::config();
630 config->setGroup( "AppRun" ); 634 config->setGroup( "AppRun" );
631 QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); 635 QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) );
632 int secs = config->readNumEntry( "LatestProgramStop" ) - 30; 636 int secs = config->readNumEntry( "LatestProgramStop" ) - 30;
633 secs -= ( 3600 * 24*3 ); // debug only 637 secs -= ( 3600 * 24*3 ); // debug only
634 QDateTime latest = dt.addSecs ( secs ); 638 QDateTime latest = dt.addSecs ( secs );
635 qDebug("KO: Last termination on %s ", latest.toString().latin1()); 639 qDebug("KO: Last termination on %s ", latest.toString().latin1());
636 QPtrList<Incidence> el = mCalendar->rawIncidences(); 640 QPtrList<Incidence> el = mCalendar->rawIncidences();
637 QPtrList<Incidence> al; 641 QPtrList<Incidence> al;
638 Incidence* inL = el.first(); 642 Incidence* inL = el.first();
639 while ( inL ) { 643 while ( inL ) {
640 bool ok = false; 644 bool ok = false;
641 int offset = 0; 645 int offset = 0;
642 QDateTime next = inL->getNextAlarmDateTime(& ok, &offset, latest ) ; 646 QDateTime next = inL->getNextAlarmDateTime(& ok, &offset, latest ) ;
643 if ( ok ) { 647 if ( ok ) {
644 //qDebug("OK %s",next.toString().latin1()); 648 //qDebug("OK %s",next.toString().latin1());
645 if ( next < QDateTime::currentDateTime() ) { 649 if ( next < QDateTime::currentDateTime() ) {
646 al.append( inL ); 650 al.append( inL );
647 qDebug("found missed alarm: %s ", inL->summary().latin1() ); 651 //qDebug("found missed alarm: %s ", inL->summary().latin1() );
648 } 652 }
649 } 653 }
650 inL = el.next(); 654 inL = el.next();
651 } 655 }
652 if ( al.count() ) { 656 if ( al.count() ) {
653 QDialog* dia = new QDialog( this, "huhu", false ); 657 QDialog* dia = new QDialog( this, "huhu", false, WDestructiveClose | WStyle_StaysOnTop );
654 dia->setCaption( i18n("KO/Pi: Missing alarm notification!") ); 658 dia->setCaption( i18n("KO/Pi: Missing alarms!") );
655 QVBoxLayout* lay = new QVBoxLayout( dia ); 659 QVBoxLayout* lay = new QVBoxLayout( dia );
656 lay->setSpacing( 0 ); 660 lay->setSpacing( 0 );
657 lay->setMargin( 0 ); 661 lay->setMargin( 0 );
658 MissedAlarmTextBrowser* matb = new MissedAlarmTextBrowser ( dia, al, latest ); 662 MissedAlarmTextBrowser* matb = new MissedAlarmTextBrowser ( dia, al, latest );
659 connect( matb, SIGNAL( showIncidence( QString ) ),SLOT( showIncidence( QString ) )); 663 connect( matb, SIGNAL( showIncidence( QString ) ),SLOT( showIncidence( QString ) ));
660 lay->addWidget( matb ); 664 lay->addWidget( matb );
661 int si = 220; 665 int si = 220;
662 if ( QApplication::desktop()->width() > 470 ) 666 if ( QApplication::desktop()->width() > 470 )
663 si = 400; 667 si = 400;
664 dia->resize(si,si/2); 668 dia->resize(si,si/2);
665 dia->setBackgroundColor( QColor( 255, 255, 255 ) ); 669 dia->setBackgroundColor( QColor( 255, 255, 255 ) );
666 dia->show(); 670 dia->show();
667 671
668 } 672 }
669} 673}
670void CalendarView::showDay( QDate d ) 674void CalendarView::showDay( QDate d )
671{ 675{
672 dateNavigator()->blockSignals( true ); 676 dateNavigator()->blockSignals( true );
673 dateNavigator()->selectDate( d ); 677 dateNavigator()->selectDate( d );
674 dateNavigator()->blockSignals( false ); 678 dateNavigator()->blockSignals( false );
675 mViewManager->showDayView(); 679 mViewManager->showDayView();
676 //dateNavigator()->selectDate( d ); 680 //dateNavigator()->selectDate( d );
677} 681}
678void CalendarView::timerAlarm() 682void CalendarView::timerAlarm()
679{ 683{
680 //qDebug("CalendarView::timerAlarm() "); 684 //qDebug("CalendarView::timerAlarm() ");
681 computeAlarm(mAlarmNotification ); 685 computeAlarm(mAlarmNotification );
682} 686}
683 687
684void CalendarView::suspendAlarm() 688void CalendarView::suspendAlarm()
685{ 689{
686 //qDebug(" CalendarView::suspendAlarm() "); 690 //qDebug(" CalendarView::suspendAlarm() ");
687 computeAlarm(mSuspendAlarmNotification ); 691 computeAlarm(mSuspendAlarmNotification );
688 692
689} 693}
690 694
691void CalendarView::startAlarm( QString mess , QString filename) 695void CalendarView::startAlarm( QString mess , QString filename)
692{ 696{
693 697
694 topLevelWidget()->showNormal(); 698 topLevelWidget()->showNormal();
695 topLevelWidget()->setActiveWindow(); 699 topLevelWidget()->setActiveWindow();
696 topLevelWidget()->raise(); 700 topLevelWidget()->raise();
697 701
698 mAlarmDialog->eventNotification( mess, KOPrefs::instance()->mAlarmPlayBeeps, filename, true,KOPrefs::instance()->mAlarmBeepInterval ,KOPrefs::instance()->mAlarmSuspendCount ); 702 mAlarmDialog->eventNotification( mess, KOPrefs::instance()->mAlarmPlayBeeps, filename, true,KOPrefs::instance()->mAlarmBeepInterval ,KOPrefs::instance()->mAlarmSuspendCount );
699 QTimer::singleShot( 3000, this, SLOT( checkNextTimerAlarm() ) ); 703 QTimer::singleShot( 3000, this, SLOT( checkNextTimerAlarm() ) );
700 704
701} 705}
702 706
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index 1eca905..084b6db 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -43,96 +43,97 @@
43 43
44#include <korganizer/calendarviewbase.h> 44#include <korganizer/calendarviewbase.h>
45 45
46#include <ksyncmanager.h> 46#include <ksyncmanager.h>
47 47
48class QWidgetStack; 48class QWidgetStack;
49class QSplitter; 49class QSplitter;
50 50
51class CalPrinter; 51class CalPrinter;
52class KOFilterView; 52class KOFilterView;
53class KOViewManager; 53class KOViewManager;
54class KODialogManager; 54class KODialogManager;
55class KOTodoView; 55class KOTodoView;
56class KDateNavigator; 56class KDateNavigator;
57class DateNavigatorContainer; 57class DateNavigatorContainer;
58class DateNavigator; 58class DateNavigator;
59class KOIncidenceEditor; 59class KOIncidenceEditor;
60class KDatePicker; 60class KDatePicker;
61class ResourceView; 61class ResourceView;
62class KOEventEditor; 62class KOEventEditor;
63class KOTodoEditor ; 63class KOTodoEditor ;
64class KOEventViewerDialog; 64class KOEventViewerDialog;
65class KOBeamPrefs; 65class KOBeamPrefs;
66class KSyncProfile; 66class KSyncProfile;
67class AlarmDialog; 67class AlarmDialog;
68class KCal::Attendee; 68class KCal::Attendee;
69 69
70namespace KCal { class FileStorage; } 70namespace KCal { class FileStorage; }
71 71
72using namespace KCal; 72using namespace KCal;
73 73
74/** 74/**
75 This is the main calendar widget. It provides the different vies on t he 75 This is the main calendar widget. It provides the different vies on t he
76 calendar data as well as the date navigator. It also handles synchronisation 76 calendar data as well as the date navigator. It also handles synchronisation
77 of the different views and controls the different dialogs like preferences, 77 of the different views and controls the different dialogs like preferences,
78 event editor, search dialog etc. 78 event editor, search dialog etc.
79 79
80 @short main calendar view widget 80 @short main calendar view widget
81 @author Cornelius Schumacher 81 @author Cornelius Schumacher
82*/ 82*/
83 83
84#include <qtextbrowser.h> 84#include <qtextbrowser.h>
85#include <qtextcodec.h> 85#include <qtextcodec.h>
86 86
87class MissedAlarmTextBrowser : public QTextBrowser { 87class MissedAlarmTextBrowser : public QTextBrowser {
88 Q_OBJECT 88 Q_OBJECT
89 public: 89 public:
90 MissedAlarmTextBrowser(QWidget *parent, QPtrList<Incidence> alarms ,QDateTime start); 90 MissedAlarmTextBrowser(QWidget *parent, QPtrList<Incidence> alarms ,QDateTime start);
91 ~MissedAlarmTextBrowser();
91 void setSource(const QString & n); 92 void setSource(const QString & n);
92 93
93 private: 94 private:
94 Incidence * getNextInc(QDateTime start ); 95 Incidence * getNextInc(QDateTime start );
95 QPtrList<Incidence> mAlarms; 96 QPtrList<Incidence> mAlarms;
96 signals: 97 signals:
97 void showIncidence( QString uid); 98 void showIncidence( QString uid);
98}; 99};
99 100
100 101
101class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Observer, public KSyncInterface 102class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Observer, public KSyncInterface
102{ 103{
103 Q_OBJECT 104 Q_OBJECT
104 public: 105 public:
105 /** 106 /**
106 Constructs a new calendar view widget. 107 Constructs a new calendar view widget.
107 108
108 @param calendar calendar document 109 @param calendar calendar document
109 @param parent parent window 110 @param parent parent window
110 @param name Qt internal widget object name 111 @param name Qt internal widget object name
111 */ 112 */
112 CalendarView( CalendarResources *calendar, QWidget *parent = 0, 113 CalendarView( CalendarResources *calendar, QWidget *parent = 0,
113 const char *name = 0 ); 114 const char *name = 0 );
114 CalendarView( Calendar *calendar, QWidget *parent = 0, 115 CalendarView( Calendar *calendar, QWidget *parent = 0,
115 const char *name = 0 ); 116 const char *name = 0 );
116 virtual ~CalendarView(); 117 virtual ~CalendarView();
117 118
118 Calendar *calendar() { return mCalendar; } 119 Calendar *calendar() { return mCalendar; }
119 120
120 KOViewManager *viewManager(); 121 KOViewManager *viewManager();
121 KODialogManager *dialogManager(); 122 KODialogManager *dialogManager();
122 123
123 QDate startDate(); 124 QDate startDate();
124 QDate endDate(); 125 QDate endDate();
125 126
126 QWidgetStack *viewStack(); 127 QWidgetStack *viewStack();
127 QWidget *leftFrame(); 128 QWidget *leftFrame();
128 129
129 DateNavigator *dateNavigator(); 130 DateNavigator *dateNavigator();
130 KDateNavigator *dateNavigatorWidget(); 131 KDateNavigator *dateNavigatorWidget();
131 132
132 void addView(KOrg::BaseView *); 133 void addView(KOrg::BaseView *);
133 void showView(KOrg::BaseView *); 134 void showView(KOrg::BaseView *);
134 KOEventViewerDialog* getEventViewerDialog(); 135 KOEventViewerDialog* getEventViewerDialog();
135 Incidence *currentSelection(); 136 Incidence *currentSelection();
136 137
137 signals: 138 signals:
138 void save (); 139 void save ();
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 1320231..63053a5 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -327,98 +327,101 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
327 SLOT( disableBR(bool) ) ); 327 SLOT( disableBR(bool) ) );
328 connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) ); 328 connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) );
329 mView->setModified( false ); 329 mView->setModified( false );
330 mBlockAtStartup = false; 330 mBlockAtStartup = false;
331 mView->setModified( false ); 331 mView->setModified( false );
332 setCentralWidget( mView ); 332 setCentralWidget( mView );
333 globalFlagBlockStartup = 0; 333 globalFlagBlockStartup = 0;
334 mView->show(); 334 mView->show();
335 delete splash; 335 delete splash;
336 if ( newFile ) 336 if ( newFile )
337 mView->updateConfig(); 337 mView->updateConfig();
338 // qApp->processEvents(); 338 // qApp->processEvents();
339 //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); 339 //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ());
340 //fillSyncMenu(); 340 //fillSyncMenu();
341 341
342 342
343 connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) ); 343 connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) );
344 connect(mView , SIGNAL( save() ), this, SLOT( save() ) ); 344 connect(mView , SIGNAL( save() ), this, SLOT( save() ) );
345 connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) ); 345 connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) );
346 connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); 346 connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) );
347 connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); 347 connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) );
348 mSyncManager->setDefaultFileName( sentSyncFile()); 348 mSyncManager->setDefaultFileName( sentSyncFile());
349 connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) ); 349 connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) );
350 mSyncManager->fillSyncMenu(); 350 mSyncManager->fillSyncMenu();
351 351
352 352
353 353
354 mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins ); 354 mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins );
355 if ( showWarning ) { 355 if ( showWarning ) {
356 KMessageBox::information( this, 356 KMessageBox::information( this,
357 "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"); 357 "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");
358 qApp->processEvents(); 358 qApp->processEvents();
359 mView->dialogManager()->showSyncOptions(); 359 mView->dialogManager()->showSyncOptions();
360 } 360 }
361 361
362 //US listen for result adressed from Ka/Pi 362 //US listen for result adressed from Ka/Pi
363#ifndef DESKTOP_VERSION 363#ifndef DESKTOP_VERSION
364 connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); 364 connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
365#endif 365#endif
366#ifndef DESKTOP_VERSION 366#ifndef DESKTOP_VERSION
367 infrared = 0; 367 infrared = 0;
368#endif 368#endif
369 updateFilterToolbar(); 369 updateFilterToolbar();
370 updateWeek( mView->startDate() ); 370 updateWeek( mView->startDate() );
371 connect( mView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ), 371 connect( mView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ),
372 SLOT( updateWeekNum( const KCal::DateList & ) ) ); 372 SLOT( updateWeekNum( const KCal::DateList & ) ) );
373 mBRdisabled = false; 373 mBRdisabled = false;
374 //toggleBeamReceive(); 374 //toggleBeamReceive();
375 375 int tiint= 3000;
376 QTimer::singleShot( 1000, mView, SLOT ( checkAlarms() )); 376#ifndef DESKTOP_VERSION
377 tiint = 5000;
378#endif
379 QTimer::singleShot( tiint, mView, SLOT ( checkAlarms() ));
377} 380}
378MainWindow::~MainWindow() 381MainWindow::~MainWindow()
379{ 382{
380 //qDebug("MainWindow::~MainWindow() "); 383 //qDebug("MainWindow::~MainWindow() ");
381 //save toolbar location 384 //save toolbar location
382 delete mCalendar; 385 delete mCalendar;
383 delete mSyncManager; 386 delete mSyncManager;
384#ifndef DESKTOP_VERSION 387#ifndef DESKTOP_VERSION
385 if ( infrared ) 388 if ( infrared )
386 delete infrared; 389 delete infrared;
387#endif 390#endif
388 391
389 392
390} 393}
391 394
392void MainWindow::disableBR(bool b) 395void MainWindow::disableBR(bool b)
393{ 396{
394#ifndef DESKTOP_VERSION 397#ifndef DESKTOP_VERSION
395 if ( b ) { 398 if ( b ) {
396 if ( infrared ) { 399 if ( infrared ) {
397 toggleBeamReceive(); 400 toggleBeamReceive();
398 mBRdisabled = true; 401 mBRdisabled = true;
399 } 402 }
400 mBRdisabled = true; 403 mBRdisabled = true;
401 } else { 404 } else {
402 if ( mBRdisabled ) { 405 if ( mBRdisabled ) {
403 mBRdisabled = false; 406 mBRdisabled = false;
404 //makes no sense,because other cal ap is probably running 407 //makes no sense,because other cal ap is probably running
405 // toggleBeamReceive(); 408 // toggleBeamReceive();
406 } 409 }
407 } 410 }
408#endif 411#endif
409 412
410} 413}
411bool MainWindow::beamReceiveEnabled() 414bool MainWindow::beamReceiveEnabled()
412{ 415{
413#ifndef DESKTOP_VERSION 416#ifndef DESKTOP_VERSION
414 return ( infrared != 0 ); 417 return ( infrared != 0 );
415#endif 418#endif
416 return false; 419 return false;
417} 420}
418 421
419void MainWindow::toggleBeamReceive() 422void MainWindow::toggleBeamReceive()
420{ 423{
421 if ( mBRdisabled ) 424 if ( mBRdisabled )
422 return; 425 return;
423#ifndef DESKTOP_VERSION 426#ifndef DESKTOP_VERSION
424 if ( infrared ) { 427 if ( infrared ) {