summaryrefslogtreecommitdiff
authoreilers <eilers>2003-02-18 11:55:59 (UTC)
committer eilers <eilers>2003-02-18 11:55:59 (UTC)
commit00e9f7731c19604a8e79df9e935ec833fc1937f8 (patch) (side-by-side diff)
tree7bf9b8230832e2138af7e73740b28eafc4c33101
parent065f26b161f6df269cfbf9c75751c09453350995 (diff)
downloadopie-00e9f7731c19604a8e79df9e935ec833fc1937f8.zip
opie-00e9f7731c19604a8e79df9e935ec833fc1937f8.tar.gz
opie-00e9f7731c19604a8e79df9e935ec833fc1937f8.tar.bz2
Fixing categoryNames in opimrecord which was just checking for Todo List
Now we get the categories in addressbook, too !
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libopie/pim/ocontact.cpp4
-rw-r--r--libopie/pim/opimrecord.cpp4
-rw-r--r--libopie/pim/opimrecord.h2
-rw-r--r--libopie/pim/otodo.cpp2
-rw-r--r--libopie2/opiepim/core/opimrecord.cpp4
-rw-r--r--libopie2/opiepim/core/opimrecord.h2
-rw-r--r--libopie2/opiepim/ocontact.cpp4
-rw-r--r--libopie2/opiepim/otodo.cpp2
8 files changed, 12 insertions, 12 deletions
diff --git a/libopie/pim/ocontact.cpp b/libopie/pim/ocontact.cpp
index 178559b..9cccfc8 100644
--- a/libopie/pim/ocontact.cpp
+++ b/libopie/pim/ocontact.cpp
@@ -624,15 +624,15 @@ QString OContact::toRichText() const
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> ";
diff --git a/libopie/pim/opimrecord.cpp b/libopie/pim/opimrecord.cpp
index ac0f4a9..d45417a 100644
--- a/libopie/pim/opimrecord.cpp
+++ b/libopie/pim/opimrecord.cpp
@@ -27,20 +27,20 @@ OPimRecord &OPimRecord::operator=( const OPimRecord& rec) {
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& ) {
diff --git a/libopie/pim/opimrecord.h b/libopie/pim/opimrecord.h
index 665530f..c7f9460 100644
--- a/libopie/pim/opimrecord.h
+++ b/libopie/pim/opimrecord.h
@@ -35,13 +35,13 @@ public:
*/
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& );
diff --git a/libopie/pim/otodo.cpp b/libopie/pim/otodo.cpp
index cde2b3d..b4d4aa9 100644
--- a/libopie/pim/otodo.cpp
+++ b/libopie/pim/otodo.cpp
@@ -252,13 +252,13 @@ QString OTodo::toRichText() const
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;
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
@@ -27,20 +27,20 @@ OPimRecord &OPimRecord::operator=( const OPimRecord& rec) {
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& ) {
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
@@ -35,13 +35,13 @@ public:
*/
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& );
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
@@ -624,15 +624,15 @@ QString OContact::toRichText() const
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> ";
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
@@ -252,13 +252,13 @@ QString OTodo::toRichText() const
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;