-rw-r--r-- | korganizer/koeventviewer.cpp | 9 | ||||
-rw-r--r-- | korganizer/komonthview.cpp | 4 |
2 files changed, 6 insertions, 7 deletions
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index c8c2f28..6315827 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp | |||
@@ -277,30 +277,32 @@ void KOEventViewer::appendEvent(Event *event, int mode ) | |||
277 | { | 277 | { |
278 | mMailSubject = ""; | 278 | mMailSubject = ""; |
279 | mCurrentIncidence = event; | 279 | mCurrentIncidence = event; |
280 | bool shortDate = KOPrefs::instance()->mShortDateInViewer; | 280 | bool shortDate = KOPrefs::instance()->mShortDateInViewer; |
281 | bool wideScreen = ( QApplication::desktop()->width() >= 640 ); | 281 | bool wideScreen = ( QApplication::desktop()->width() >= 640 ); |
282 | topLevelWidget()->setCaption(i18n("Event Viewer")); | 282 | topLevelWidget()->setCaption(i18n("Event Viewer")); |
283 | if ( mode == 0 ) { | 283 | if ( mode == 0 ) { |
284 | addTag("h2",deTag(event->summary())); | 284 | addTag("h2",deTag(event->summary())); |
285 | formatReadOnly(event); | ||
285 | } | 286 | } |
286 | else { | 287 | else { |
287 | if ( mColorMode == 1 ) { | 288 | if ( mColorMode == 1 ) { |
288 | mText +="<font color=\"#00A000\">"; | 289 | mText +="<font color=\"#00A000\">"; |
289 | } | 290 | } |
290 | if ( mColorMode == 2 ) { | 291 | if ( mColorMode == 2 ) { |
291 | mText +="<font color=\"#C00000\">"; | 292 | mText +="<font color=\"#C00000\">"; |
292 | } | 293 | } |
293 | // mText +="<font color=\"#F00000\">" + i18n("O-due!") + "</font>"; | 294 | // mText +="<font color=\"#F00000\">" + i18n("O-due!") + "</font>"; |
294 | if ( mode == 1 ) { | 295 | if ( mode == 1 ) { |
295 | addTag("h2",i18n( "Local: " ) +deTag(event->summary())); | 296 | addTag("h2",i18n( "Local: " ) +deTag(event->summary())); |
296 | } else { | 297 | } else { |
297 | addTag("h2",i18n( "Remote: " ) +deTag(event->summary())); | 298 | addTag("h2",i18n( "Remote: " ) +deTag(event->summary())); |
298 | } | 299 | } |
300 | formatReadOnly(event); | ||
299 | addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); | 301 | addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); |
300 | if ( mColorMode ) | 302 | if ( mColorMode ) |
301 | mText += "</font>"; | 303 | mText += "</font>"; |
302 | } | 304 | } |
303 | mMailSubject += i18n( "Meeting " )+ event->summary(); | 305 | mMailSubject += i18n( "Meeting " )+ event->summary(); |
304 | if (event->cancelled ()) { | 306 | if (event->cancelled ()) { |
305 | mText +="<font color=\"#B00000\">"; | 307 | mText +="<font color=\"#B00000\">"; |
306 | addTag("i",i18n("This event has been cancelled!")); | 308 | addTag("i",i18n("This event has been cancelled!")); |
@@ -383,17 +385,16 @@ void KOEventViewer::appendEvent(Event *event, int mode ) | |||
383 | } | 385 | } |
384 | //addTag("p",s); | 386 | //addTag("p",s); |
385 | } | 387 | } |
386 | 388 | ||
387 | addTag("p","<b>"+i18n("Access: ") + "</b>" + event->secrecyStr()); | 389 | addTag("p","<b>"+i18n("Access: ") + "</b>" + event->secrecyStr()); |
388 | 390 | ||
389 | formatCategories(event); | 391 | formatCategories(event); |
390 | 392 | ||
391 | formatReadOnly(event); | ||
392 | formatAttendees(event); | 393 | formatAttendees(event); |
393 | 394 | ||
394 | if ( KOPrefs::instance()->mEVshowCreated ) { | 395 | if ( KOPrefs::instance()->mEVshowCreated ) { |
395 | if(wideScreen ){ | 396 | if(wideScreen ){ |
396 | addTag("p",i18n("<b>Created: ") +" </b>"+KGlobal::locale()->formatDateTime( event->created(), shortDate )); | 397 | addTag("p",i18n("<b>Created: ") +" </b>"+KGlobal::locale()->formatDateTime( event->created(), shortDate )); |
397 | }else{ | 398 | }else{ |
398 | addTag("p",i18n("<b>Created: ") +" </b>"); | 399 | addTag("p",i18n("<b>Created: ") +" </b>"); |
399 | addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); | 400 | addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); |
@@ -423,30 +424,33 @@ void KOEventViewer::appendEvent(Event *event, int mode ) | |||
423 | 424 | ||
424 | void KOEventViewer::appendTodo(Todo *event, int mode ) | 425 | void KOEventViewer::appendTodo(Todo *event, int mode ) |
425 | { | 426 | { |
426 | mMailSubject = ""; | 427 | mMailSubject = ""; |
427 | mCurrentIncidence = event; | 428 | mCurrentIncidence = event; |
428 | topLevelWidget()->setCaption(i18n("Todo Viewer")); | 429 | topLevelWidget()->setCaption(i18n("Todo Viewer")); |
429 | bool shortDate = KOPrefs::instance()->mShortDateInViewer; | 430 | bool shortDate = KOPrefs::instance()->mShortDateInViewer; |
430 | bool wideScreen = ( QApplication::desktop()->width() >= 640 ); | 431 | bool wideScreen = ( QApplication::desktop()->width() >= 640 ); |
431 | if (mode == 0 ) | 432 | if (mode == 0 ) { |
432 | addTag("h2",deTag(event->summary())); | 433 | addTag("h2",deTag(event->summary())); |
434 | formatReadOnly(event); | ||
435 | } | ||
433 | else { | 436 | else { |
434 | if ( mColorMode == 1 ) { | 437 | if ( mColorMode == 1 ) { |
435 | mText +="<font color=\"#00A000\">"; | 438 | mText +="<font color=\"#00A000\">"; |
436 | } | 439 | } |
437 | if ( mColorMode == 2 ) { | 440 | if ( mColorMode == 2 ) { |
438 | mText +="<font color=\"#B00000\">"; | 441 | mText +="<font color=\"#B00000\">"; |
439 | } | 442 | } |
440 | if ( mode == 1 ) { | 443 | if ( mode == 1 ) { |
441 | addTag("h2",i18n( "Local: " ) +deTag(event->summary())); | 444 | addTag("h2",i18n( "Local: " ) +deTag(event->summary())); |
442 | } else { | 445 | } else { |
443 | addTag("h2",i18n( "Remote: " ) +deTag(event->summary())); | 446 | addTag("h2",i18n( "Remote: " ) +deTag(event->summary())); |
444 | } | 447 | } |
448 | formatReadOnly(event); | ||
445 | addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); | 449 | addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); |
446 | if ( mColorMode ) | 450 | if ( mColorMode ) |
447 | mText += "</font>"; | 451 | mText += "</font>"; |
448 | } | 452 | } |
449 | mMailSubject += i18n( "Todo " )+ event->summary(); | 453 | mMailSubject += i18n( "Todo " )+ event->summary(); |
450 | 454 | ||
451 | if ( event->percentComplete() == 100 && event->hasCompletedDate() ) { | 455 | if ( event->percentComplete() == 100 && event->hasCompletedDate() ) { |
452 | mText +="<font color=\"#B00000\">"; | 456 | mText +="<font color=\"#B00000\">"; |
@@ -498,17 +502,16 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) | |||
498 | addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); | 502 | addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); |
499 | } | 503 | } |
500 | } | 504 | } |
501 | 505 | ||
502 | addTag("p","<b>"+i18n("Access: ") + "</b>" + event->secrecyStr()); | 506 | addTag("p","<b>"+i18n("Access: ") + "</b>" + event->secrecyStr()); |
503 | 507 | ||
504 | formatCategories(event); | 508 | formatCategories(event); |
505 | 509 | ||
506 | formatReadOnly(event); | ||
507 | formatAttendees(event); | 510 | formatAttendees(event); |
508 | 511 | ||
509 | if ( KOPrefs::instance()->mEVshowCreated ) { | 512 | if ( KOPrefs::instance()->mEVshowCreated ) { |
510 | if(wideScreen ){ | 513 | if(wideScreen ){ |
511 | 514 | ||
512 | addTag("p",i18n("<b>Created: ") +" </b>"+KGlobal::locale()->formatDateTime( event->created(), shortDate )); | 515 | addTag("p",i18n("<b>Created: ") +" </b>"+KGlobal::locale()->formatDateTime( event->created(), shortDate )); |
513 | 516 | ||
514 | } else { | 517 | } else { |
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 475bb4a..cba85fa 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp | |||
@@ -310,18 +310,16 @@ void MonthViewItem::paint(QPainter *p) | |||
310 | if ( mblockRepaint ) { | 310 | if ( mblockRepaint ) { |
311 | return; | 311 | return; |
312 | } | 312 | } |
313 | #if QT_VERSION >= 0x030000 | 313 | #if QT_VERSION >= 0x030000 |
314 | bool sel = isSelected(); | 314 | bool sel = isSelected(); |
315 | #else | 315 | #else |
316 | bool sel = selected(); | 316 | bool sel = selected(); |
317 | #endif | 317 | #endif |
318 | |||
319 | |||
320 | int heihei = height( listBox () ); | 318 | int heihei = height( listBox () ); |
321 | int x = 1; | 319 | int x = 1; |
322 | if (KOPrefs::instance()->mMonthViewUsesCategoryColor) | 320 | if (KOPrefs::instance()->mMonthViewUsesCategoryColor) |
323 | { | 321 | { |
324 | p->setBackgroundColor( palette().color( QPalette::Normal, \ | 322 | p->setBackgroundColor( palette().color( QPalette::Normal, \ |
325 | sel ? QColorGroup::Highlight : QColorGroup::Background ) ); | 323 | sel ? QColorGroup::Highlight : QColorGroup::Background ) ); |
326 | p->eraseRect( 0, 0, listBox()->maxItemWidth(), heihei ); | 324 | p->eraseRect( 0, 0, listBox()->maxItemWidth(), heihei ); |
327 | } | 325 | } |
@@ -332,17 +330,16 @@ void MonthViewItem::paint(QPainter *p) | |||
332 | size = 3; | 330 | size = 3; |
333 | int y = (heihei - size -1 ) /2; | 331 | int y = (heihei - size -1 ) /2; |
334 | 332 | ||
335 | if ( mIncidence->calID() > 1 ) { | 333 | if ( mIncidence->calID() > 1 ) { |
336 | p->fillRect ( x, y-2,size,size+4, KOPrefs::instance()->defaultColor( mIncidence->calID() ) ); | 334 | p->fillRect ( x, y-2,size,size+4, KOPrefs::instance()->defaultColor( mIncidence->calID() ) ); |
337 | p->drawRect ( x, y-2,size,size+4); | 335 | p->drawRect ( x, y-2,size,size+4); |
338 | x += size + 1; | 336 | x += size + 1; |
339 | } | 337 | } |
340 | |||
341 | if ( KOPrefs::instance()->mMonthShowIcons ) { | 338 | if ( KOPrefs::instance()->mMonthShowIcons ) { |
342 | if ( mInfo ) { | 339 | if ( mInfo ) { |
343 | p->fillRect ( x, y,size,size, Qt::darkGreen ); | 340 | p->fillRect ( x, y,size,size, Qt::darkGreen ); |
344 | x += size + 1; | 341 | x += size + 1; |
345 | } | 342 | } |
346 | if ( mRecur ) { | 343 | if ( mRecur ) { |
347 | p->fillRect ( x, y,size,size, Qt::blue ); | 344 | p->fillRect ( x, y,size,size, Qt::blue ); |
348 | x += size + 1; | 345 | x += size + 1; |
@@ -372,17 +369,16 @@ void MonthViewItem::paint(QPainter *p) | |||
372 | QPointArray pa ( 3 ); | 369 | QPointArray pa ( 3 ); |
373 | pa.setPoint (0, x+sizeM +sizeM/2, yyy ); | 370 | pa.setPoint (0, x+sizeM +sizeM/2, yyy ); |
374 | pa.setPoint (1, x+sizeM, yyy+sizeM/2 ); | 371 | pa.setPoint (1, x+sizeM, yyy+sizeM/2 ); |
375 | pa.setPoint (2, x+sizeM, yyy-sizeM/2 ); | 372 | pa.setPoint (2, x+sizeM, yyy-sizeM/2 ); |
376 | p->drawPolygon( pa ); | 373 | p->drawPolygon( pa ); |
377 | } | 374 | } |
378 | if ( mMultiday == 1 ) { | 375 | if ( mMultiday == 1 ) { |
379 | // p->fillRect ( x, yyy-sizeM/2+1, sizeM/2, size, QBrush ( QBrush::SolidPattern ) ); | 376 | // p->fillRect ( x, yyy-sizeM/2+1, sizeM/2, size, QBrush ( QBrush::SolidPattern ) ); |
380 | |||
381 | p->drawLine ( x+1, yyy-sizeM/2, x+1, yyy+sizeM/2 ); | 377 | p->drawLine ( x+1, yyy-sizeM/2, x+1, yyy+sizeM/2 ); |
382 | } | 378 | } |
383 | if ( mMultiday == 3 ) { | 379 | if ( mMultiday == 3 ) { |
384 | // p->fillRect ( x+sizeM, yyy-sizeM/2+1, sizeM/2, size, QBrush ( QBrush::SolidPattern ) ); | 380 | // p->fillRect ( x+sizeM, yyy-sizeM/2+1, sizeM/2, size, QBrush ( QBrush::SolidPattern ) ); |
385 | p->drawLine ( x+sizeM +sizeM/2-1, yyy-sizeM/2, x+sizeM +sizeM/2-1, yyy+sizeM/2 ); | 381 | p->drawLine ( x+sizeM +sizeM/2-1, yyy-sizeM/2, x+sizeM +sizeM/2-1, yyy+sizeM/2 ); |
386 | 382 | ||
387 | } | 383 | } |
388 | x += sizeM/2 + 1; | 384 | x += sizeM/2 + 1; |