Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.1:kernel-2.6.32
kdepim4
r899977.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File r899977.diff of Package kdepim4
Subject: korganizer: paint the all-day item headers From: wstephenson@suse.de Bug: Patch-upstream: 899977 --- korganizer/koagendaitem.cpp (revision 899976) +++ korganizer/koagendaitem.cpp (revision 899977) @@ -31,6 +31,7 @@ #include <kcal/icaldrag.h> #include <kcal/incidence.h> +#include <kcal/event.h> #include <kcal/todo.h> #include <kcal/incidenceformatter.h> #include <kcal/vcaldrag.h> @@ -978,15 +979,33 @@ void KOAgendaItem::paintEvent( QPaintEve if ( mIncidence->allDay() ) { shortH = longH = ""; + if ( mIncidence->type() == "Event" ) { + if ( static_cast<Event*>( mIncidence )->isMultiDay( KOPrefs::instance()->timeSpec() ) ) { + // multi-day, all-day event + shortH = + i18n( "%1 - %2", + KGlobal::locale()->formatDate( + mIncidence->dtStart().toTimeSpec( KOPrefs::instance()->timeSpec() ).date() ), + KGlobal::locale()->formatDate( + mIncidence->dtEnd().toTimeSpec( KOPrefs::instance()->timeSpec() ).date() ) ); + longH = shortH; + + // paint headline + drawRoundedRect( + &p, + QRect( fmargin, fmargin, width() - fmargin * 2, - fmargin * 2 + margin + hlHeight ), + mSelected, frameColor, false, ft, roundTop, false ); + } else { + // single-day, all-day event - if ( ( mIncidence->type() != "Todo" ) && - ( mIncidence->dtStart() != mIncidence->dtEnd() ) ) { // multi days - shortH = longH = - i18n( "%1 - %2", - KGlobal::locale()->formatDate( - mIncidence->dtStart().toTimeSpec( KOPrefs::instance()->timeSpec() ).date() ), - KGlobal::locale()->formatDate( - mIncidence->dtEnd().toTimeSpec( KOPrefs::instance()->timeSpec() ).date() ) ); + // paint headline + drawRoundedRect( + &p, + QRect( fmargin, fmargin, width() - fmargin * 2, - fmargin * 2 + margin + hlHeight ), + mSelected, frameColor, false, ft, roundTop, false ); + } + } else { + // to-do // paint headline drawRoundedRect( Index: korganizer/koagendaitem.cpp ===================================================================
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor