-rw-r--r-- | libopie2/opiepim/core/opimrecord.cpp | 4 | ||||
-rw-r--r-- | libopie2/opiepim/core/opimrecord.h | 2 | ||||
-rw-r--r-- | libopie2/opiepim/ocontact.cpp | 4 | ||||
-rw-r--r-- | libopie2/opiepim/otodo.cpp | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/libopie2/opiepim/core/opimrecord.cpp b/libopie2/opiepim/core/opimrecord.cpp index ac0f4a9..d45417a 100644 --- a/libopie2/opiepim/core/opimrecord.cpp +++ b/libopie2/opiepim/core/opimrecord.cpp @@ -21,32 +21,32 @@ OPimRecord::OPimRecord( const OPimRecord& rec ) (*this) = rec; } OPimRecord &OPimRecord::operator=( const OPimRecord& rec) { Qtopia::Record::operator=( rec ); m_xrefman = rec.m_xrefman; return *this; } /* * category names */ -QStringList OPimRecord::categoryNames()const { +QStringList OPimRecord::categoryNames( const QString& appname ) const { QStringList list; QArray<int> cats = categories(); Categories catDB; catDB.load( categoryFileName() ); for (uint i = 0; i < cats.count(); i++ ) { - list << catDB.label("Todo List", cats[i] ); + list << catDB.label( appname, cats[i] ); } return list; } void OPimRecord::setCategoryNames( const QStringList& ) { } void OPimRecord::addCategoryName( const QString& ) { Categories catDB; catDB.load( categoryFileName() ); diff --git a/libopie2/opiepim/core/opimrecord.h b/libopie2/opiepim/core/opimrecord.h index 665530f..c7f9460 100644 --- a/libopie2/opiepim/core/opimrecord.h +++ b/libopie2/opiepim/core/opimrecord.h @@ -29,25 +29,25 @@ public: * copy c'tor */ OPimRecord( const OPimRecord& rec ); /** * copy operator */ OPimRecord &operator=( const OPimRecord& ); /** * category names resolved */ - QStringList categoryNames()const; + QStringList categoryNames( const QString& appname )const; /** * set category names they will be resolved */ void setCategoryNames( const QStringList& ); /** * addCategoryName adds a name * to the internal category list */ void addCategoryName( const QString& ); diff --git a/libopie2/opiepim/ocontact.cpp b/libopie2/opiepim/ocontact.cpp index 178559b..9cccfc8 100644 --- a/libopie2/opiepim/ocontact.cpp +++ b/libopie2/opiepim/ocontact.cpp @@ -618,27 +618,27 @@ QString OContact::toRichText() const + Qtopia::escapeString(str) + "<br>"; } str = children(); if ( !str.isEmpty() ) text += "<b>" + QObject::tr("Children: ") + "</b>" + Qtopia::escapeString(str) + "<br>"; str = nickname(); if ( !str.isEmpty() ) text += "<b>" + QObject::tr("Nickname: ") + "</b>" + Qtopia::escapeString(str) + "<br>"; - if ( categoryNames().count() ){ + if ( categoryNames("Contacts").count() ){ text += "<b>" + QObject::tr( "Category:") + "</b> "; - text += categoryNames().join(", "); + text += categoryNames("Contacts").join(", "); text += "<br>"; } // notes last if ( !(value = notes()).isEmpty() ) { text += "<br><hr><b>" + QObject::tr( "Notes:") + "</b> "; QRegExp reg("\n"); //QString tmp = Qtopia::escapeString(value); QString tmp = QStyleSheet::convertFromPlainText(value); //tmp.replace( reg, "<br>" ); text += "<br>" + tmp + "<br>"; diff --git a/libopie2/opiepim/otodo.cpp b/libopie2/opiepim/otodo.cpp index cde2b3d..b4d4aa9 100644 --- a/libopie2/opiepim/otodo.cpp +++ b/libopie2/opiepim/otodo.cpp @@ -246,25 +246,25 @@ QString OTodo::toRichText() const text += "<b>" + QObject::tr( "Priority:") +" </b>" + QString::number( priority() ) + " <br>"; text += "<b>" + QObject::tr( "Progress:") + " </b>" + QString::number( progress() ) + " %<br>"; if (hasDueDate() ){ text += "<b>" + QObject::tr( "Deadline:") + " </b>"; text += dueDate().toString(); text += "<br>"; } text += "<b>" + QObject::tr( "Category:") + "</b> "; - text += categoryNames().join(", "); + text += categoryNames( "Todo List" ).join(", "); text += "<br>"; return text; } OPimNotifyManager& OTodo::notifiers() { return data->notifiers; } bool OTodo::operator<( const OTodo &toDoEvent )const{ if( !hasDueDate() && !toDoEvent.hasDueDate() ) return true; if( !hasDueDate() && toDoEvent.hasDueDate() ) return false; if( hasDueDate() && toDoEvent.hasDueDate() ){ |