From a7939017000e165e711e3f0cffeab46852a9fb2e Mon Sep 17 00:00:00 2001 From: zautrix Date: Sat, 04 Jun 2005 10:29:18 +0000 Subject: fixes --- (limited to 'korganizer') diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 42166ab..608b73b 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -142,7 +142,7 @@ MissedAlarmTextBrowser::MissedAlarmTextBrowser(QWidget *parent, QPtrListsetBackgroundColor( QColor( 255, 255, 255 ) ); QString mText = "\n"; //mText += "\n\n\n

"; #ifdef DESKTOP_VERSION @@ -159,11 +159,11 @@ MissedAlarmTextBrowser::MissedAlarmTextBrowser(QWidget *parent, QPtrList " + i18n("You missed the alarms for the following events or todos:")+"

"; #endif - mText += "
"; + //mText += "
"; Incidence * inc = getNextInc( start ); int time = 0; - mText += ""; + //mText += "
"; while ( inc ) { QDateTime dt ; QString tempText = "formatDateTime( dt, KOPrefs::instance()->mShortDateInViewer) +": "; else timestr = KGlobal::locale()->formatDate( dt.date() , KOPrefs::instance()->mShortDateInViewer) +": "; - if ( dt.date() == QDate::currentDate() && time == 0 ) { + if ( dt.date() < QDate::currentDate() && time == 0 ) { + mText += "\n
"; + mText += ""; time = 1; - mText +="
"; + } + if ( dt.date() == QDate::currentDate() && time <= 1 ) { + if ( time > 0 ) + mText +="
"; mText += "
"; mText += ""; + time = 2; } - if ( dt.date() > QDate::currentDate() && time != 2 ) { - time = 2; - mText +="
"; + if ( dt.date() > QDate::currentDate() && time <= 2 ) { + if ( time > 0 ) + mText +="
"; mText += "\n"; mText += ""; + time = 3; } mText +="
"; mText += timestr; @@ -634,7 +641,7 @@ void CalendarView::checkAlarms() config->setGroup( "AppRun" ); QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); int secs = config->readNumEntry( "LatestProgramStop" ) - 30; - secs -= ( 3600 * 24*3 ); // debug only + //secs -= ( 3600 * 24*3 ); // debug only QDateTime latest = dt.addSecs ( secs ); qDebug("KO: Last termination on %s ", latest.toString().latin1()); QPtrList el = mCalendar->rawIncidences(); @@ -662,10 +669,17 @@ void CalendarView::checkAlarms() MissedAlarmTextBrowser* matb = new MissedAlarmTextBrowser ( dia, al, latest ); connect( matb, SIGNAL( showIncidence( QString ) ),SLOT( showIncidence( QString ) )); lay->addWidget( matb ); - int si = 220; - if ( QApplication::desktop()->width() > 470 ) - si = 400; - dia->resize(si,si/2); + if ( QApplication::desktop()->width() == 480 || QApplication::desktop()->width() == 640 ) { + int wid = 210; + int x = QApplication::desktop()->width() - wid - 7; + int y = QApplication::desktop()->height() - wid - 70; + dia->setGeometry ( x,y,wid,wid); + } else { + int si = 220; + if ( QApplication::desktop()->width() > 470 ) + si = 400; + dia->resize(si,si/2); + } dia->setBackgroundColor( QColor( 255, 255, 255 ) ); dia->show(); -- cgit v0.9.0.2