[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/kplato
From: Dag Andersen <danders () get2net ! dk>
Date: 2010-09-23 11:54:34
Message-ID: 20100923115434.B387AAC888 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1178628 by danders:
Improve tooltips.
Set sane project target times when loading templates.
M +2 -0 kptpart.cpp
M +12 -4 libs/models/kptresourcemodel.cpp
--- trunk/koffice/kplato/kptpart.cpp #1178627:1178628
@@ -761,6 +761,8 @@
if ( m_loadingTemplate ) {
//kDebug()<<"Loading template, generate unique ids";
m_project->generateUniqueIds();
+ m_project->setConstraintStartTime( KDateTime::currentLocalDateTime() );
+ m_project->setConstraintEndTime( m_project->constraintStartTime().addYears( \
2 ) ); } else if ( isImporting() ) {
// NOTE: I don't think this is a good idea.
// Let the filter generate ids for non-kplato files.
--- trunk/koffice/kplato/libs/models/kptresourcemodel.cpp #1178627:1178628
@@ -263,8 +263,12 @@
return res->availableFrom().dateTime();
case Qt::TextAlignmentRole:
return Qt::AlignCenter;
- case Qt::ToolTipRole:
- return i18n( "Available from: %1", KGlobal::locale()->formatDateTime( \
res->availableFrom(), KLocale::LongDate, KLocale::TimeZone ) ); + case \
Qt::ToolTipRole: { + if ( res->availableFrom().isValid() ) {
+ return i18nc( "infor:tooltip", "Available from: %1", \
KGlobal::locale()->formatDateTime( res->availableFrom(), KLocale::LongDate, \
KLocale::TimeZone ) ); + }
+ return i18nc( "infor:tooltip", "Available from project target start \
time: %1", KGlobal::locale()->formatDateTime( m_project->constraintStartTime(), \
KLocale::LongDate, KLocale::TimeZone ) ); + }
case Qt::StatusTipRole:
case Qt::WhatsThisRole:
return QVariant();
@@ -281,8 +285,12 @@
return res->availableUntil().dateTime();
case Qt::TextAlignmentRole:
return Qt::AlignCenter;
- case Qt::ToolTipRole:
- return i18n( "Available until: %1", KGlobal::locale()->formatDateTime( \
res->availableUntil(), KLocale::LongDate, KLocale::TimeZone ) ); + case \
Qt::ToolTipRole: { + if ( res->availableFrom().isValid() ) {
+ return i18nc( "infor:tooltip", "Available until: %1", \
KGlobal::locale()->formatDateTime( res->availableUntil(), KLocale::LongDate, \
KLocale::TimeZone ) ); + }
+ return i18nc( "infor:tooltip", "Available from project target finish \
time: %1", KGlobal::locale()->formatDateTime( m_project->constraintEndTime(), \
KLocale::LongDate, KLocale::TimeZone ) ); + }
case Qt::StatusTipRole:
case Qt::WhatsThisRole:
return QVariant();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic