-rw-r--r-- | core/pim/addressbook/addressbook.cpp | 2 | ||||
-rw-r--r-- | core/pim/addressbook/contacteditor.cpp | 12 | ||||
-rw-r--r-- | core/pim/todo/todotable.h | 11 |
3 files changed, 14 insertions, 11 deletions
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp index e11cf4c..3255269 100644 --- a/core/pim/addressbook/addressbook.cpp +++ b/core/pim/addressbook/addressbook.cpp | |||
@@ -524,17 +524,17 @@ void AddressbookWindow::appMessage(const QCString &msg, const QByteArray &data) | |||
524 | 524 | ||
525 | Contact cnt; | 525 | Contact cnt; |
526 | QString fn, mn, ln; | 526 | QString fn, mn, ln; |
527 | parseName( name, &fn, &mn, &ln ); | 527 | parseName( name, &fn, &mn, &ln ); |
528 | // qDebug( " %s - %s - %s", fn.latin1(), mn.latin1(), ln.latin1() ); | 528 | // qDebug( " %s - %s - %s", fn.latin1(), mn.latin1(), ln.latin1() ); |
529 | cnt.setFirstName( fn ); | 529 | cnt.setFirstName( fn ); |
530 | cnt.setMiddleName( mn ); | 530 | cnt.setMiddleName( mn ); |
531 | cnt.setLastName( ln ); | 531 | cnt.setLastName( ln ); |
532 | cnt.setEmails( email ); | 532 | cnt.insertEmails( email ); |
533 | cnt.setDefaultEmail( email ); | 533 | cnt.setDefaultEmail( email ); |
534 | cnt.setFileAs(); | 534 | cnt.setFileAs(); |
535 | 535 | ||
536 | if ( bAbEditFirstTime ) { | 536 | if ( bAbEditFirstTime ) { |
537 | abEditor = new ContactEditor( cnt, &orderedFields, &slOrderedFields, | 537 | abEditor = new ContactEditor( cnt, &orderedFields, &slOrderedFields, |
538 | this, "editor" ); | 538 | this, "editor" ); |
539 | bAbEditFirstTime = FALSE; | 539 | bAbEditFirstTime = FALSE; |
540 | } else { | 540 | } else { |
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp index 39bd63c..ae86ed0 100644 --- a/core/pim/addressbook/contacteditor.cpp +++ b/core/pim/addressbook/contacteditor.cpp | |||
@@ -106,17 +106,17 @@ void ContactEditor::init() { | |||
106 | for ( i = 0; it != slOrdered.end(); i++, ++it ) { | 106 | for ( i = 0; it != slOrdered.end(); i++, ++it ) { |
107 | 107 | ||
108 | if ( (*it) == tr( "Business Fax" ) ) { | 108 | if ( (*it) == tr( "Business Fax" ) ) { |
109 | slChooserNames.append( *it ); | 109 | slChooserNames.append( *it ); |
110 | slChooserValues.append("" ); | 110 | slChooserValues.append("" ); |
111 | //slDynamicEntries->remove( it ); | 111 | //slDynamicEntries->remove( it ); |
112 | continue; | 112 | continue; |
113 | } | 113 | } |
114 | 114 | ||
115 | if ( (*it) == tr( "Home Fax" ) ) { | 115 | if ( (*it) == tr( "Home Fax" ) ) { |
116 | slChooserNames.append( *it ); | 116 | slChooserNames.append( *it ); |
117 | slChooserValues.append("" ); | 117 | slChooserValues.append("" ); |
118 | //slDynamicEntries->remove( it ); | 118 | //slDynamicEntries->remove( it ); |
119 | continue; | 119 | continue; |
120 | } | 120 | } |
121 | 121 | ||
122 | 122 | ||
@@ -186,17 +186,17 @@ void ContactEditor::init() { | |||
186 | } | 186 | } |
187 | 187 | ||
188 | if ( *it == tr( "Emails" ) ) { | 188 | if ( *it == tr( "Emails" ) ) { |
189 | slChooserNames.append( *it ); | 189 | slChooserNames.append( *it ); |
190 | slChooserValues.append( "" ); | 190 | slChooserValues.append( "" ); |
191 | //slDynamicEntries->remove( it ); | 191 | //slDynamicEntries->remove( it ); |
192 | continue; | 192 | continue; |
193 | } | 193 | } |
194 | 194 | ||
195 | if ( *it == "Name Title" || *it == "First Name" || *it == "Middle Name" || *it == "Last Name" || *it == "File As" || *it == "Default Email" || *it == "Emails" || *it == "Groups" ) | 195 | if ( *it == "Name Title" || *it == "First Name" || *it == "Middle Name" || *it == "Last Name" || *it == "File As" || *it == "Default Email" || *it == "Emails" || *it == "Groups" ) |
196 | continue; | 196 | continue; |
197 | 197 | ||
198 | if ( *it == tr( "Name Title" ) ) { | 198 | if ( *it == tr( "Name Title" ) ) { |
199 | //slDynamicEntries->remove( it ); | 199 | //slDynamicEntries->remove( it ); |
200 | continue; | 200 | continue; |
201 | } | 201 | } |
202 | 202 | ||
@@ -265,17 +265,17 @@ void ContactEditor::init() { | |||
265 | //slDynamicEntries->remove( it ); | 265 | //slDynamicEntries->remove( it ); |
266 | continue; | 266 | continue; |
267 | } | 267 | } |
268 | /* | 268 | /* |
269 | if ( (*it).right( 8 ) == tr( "Street 2" ) ) { | 269 | if ( (*it).right( 8 ) == tr( "Street 2" ) ) { |
270 | hasStreet2 = TRUE; | 270 | hasStreet2 = TRUE; |
271 | //slDynamicEntries->remove( it ); | 271 | //slDynamicEntries->remove( it ); |
272 | continue; | 272 | continue; |
273 | } | 273 | } |
274 | 274 | ||
275 | if ( (*it).right( 8 ) == tr( "P.O. Box" ) ) { | 275 | if ( (*it).right( 8 ) == tr( "P.O. Box" ) ) { |
276 | hasPOBox = TRUE; | 276 | hasPOBox = TRUE; |
277 | //slDynamicEntries->remove( it ); | 277 | //slDynamicEntries->remove( it ); |
278 | continue; | 278 | continue; |
279 | } */ | 279 | } */ |
280 | 280 | ||
281 | if ( (*it) == tr( "Business City" ) ) { | 281 | if ( (*it) == tr( "Business City" ) ) { |
@@ -1029,17 +1029,17 @@ void ContactEditor::slotName() { | |||
1029 | if (useFullName == TRUE) { | 1029 | if (useFullName == TRUE) { |
1030 | txtFirstName->setText( parseName(txtFullName->text(), NAME_F) ); | 1030 | txtFirstName->setText( parseName(txtFullName->text(), NAME_F) ); |
1031 | txtMiddleName->setText( parseName(txtFullName->text(), NAME_M) ); | 1031 | txtMiddleName->setText( parseName(txtFullName->text(), NAME_M) ); |
1032 | txtLastName->setText( parseName(txtFullName->text(), NAME_L) ); | 1032 | txtLastName->setText( parseName(txtFullName->text(), NAME_L) ); |
1033 | txtSuffix->setText( parseName(txtFullName->text(), NAME_S) ); | 1033 | txtSuffix->setText( parseName(txtFullName->text(), NAME_S) ); |
1034 | } | 1034 | } |
1035 | dlgName->showMaximized(); | 1035 | dlgName->showMaximized(); |
1036 | if ( dlgName->exec() ) { | 1036 | if ( dlgName->exec() ) { |
1037 | 1037 | ||
1038 | tmpName = txtFirstName->text() + " " + txtMiddleName->text() + " " + txtLastName->text() + " " + txtSuffix->text(); | 1038 | tmpName = txtFirstName->text() + " " + txtMiddleName->text() + " " + txtLastName->text() + " " + txtSuffix->text(); |
1039 | txtFullName->setText( tmpName.simplifyWhiteSpace() ); | 1039 | txtFullName->setText( tmpName.simplifyWhiteSpace() ); |
1040 | slotFullNameChange( txtFullName->text() ); | 1040 | slotFullNameChange( txtFullName->text() ); |
1041 | useFullName = FALSE; | 1041 | useFullName = FALSE; |
1042 | } | 1042 | } |
1043 | 1043 | ||
1044 | } | 1044 | } |
1045 | 1045 | ||
@@ -1412,17 +1412,17 @@ void ContactEditor::setEntry( const Contact &entry ) { | |||
1412 | /* | 1412 | /* |
1413 | if ( *it == "Company Phone" ) | 1413 | if ( *it == "Company Phone" ) |
1414 | *itV = ent.companyPhone(); | 1414 | *itV = ent.companyPhone(); |
1415 | */ | 1415 | */ |
1416 | if ( *it == tr("Default Email" )) | 1416 | if ( *it == tr("Default Email" )) |
1417 | *itV = ent.defaultEmail(); | 1417 | *itV = ent.defaultEmail(); |
1418 | 1418 | ||
1419 | if ( *it == tr("Emails" )) | 1419 | if ( *it == tr("Emails" )) |
1420 | *itV = ent.emails(); | 1420 | *itV = ent.emailList().join(";"); |
1421 | 1421 | ||
1422 | if ( *it == tr("Home Phone" )) | 1422 | if ( *it == tr("Home Phone" )) |
1423 | *itV = ent.homePhone(); | 1423 | *itV = ent.homePhone(); |
1424 | /* | 1424 | /* |
1425 | if ( *it == "Home 2 Phone" ) | 1425 | if ( *it == "Home 2 Phone" ) |
1426 | *itV = ent.home2Phone(); | 1426 | *itV = ent.home2Phone(); |
1427 | */ | 1427 | */ |
1428 | if ( *it == tr("Home Fax" )) | 1428 | if ( *it == tr("Home Fax" )) |
@@ -1613,17 +1613,17 @@ void ContactEditor::saveEntry() { | |||
1613 | //if ( *it == "Default Email" ) | 1613 | //if ( *it == "Default Email" ) |
1614 | //ent.setDefaultEmail( *itV ); | 1614 | //ent.setDefaultEmail( *itV ); |
1615 | 1615 | ||
1616 | if ( *it == tr("Emails" )) { | 1616 | if ( *it == tr("Emails" )) { |
1617 | QString allemail; | 1617 | QString allemail; |
1618 | QString defaultmail; | 1618 | QString defaultmail; |
1619 | parseEmailFrom( *itV, defaultmail, allemail ); | 1619 | parseEmailFrom( *itV, defaultmail, allemail ); |
1620 | ent.setDefaultEmail( defaultmail ); | 1620 | ent.setDefaultEmail( defaultmail ); |
1621 | ent.setEmails( *itV ); | 1621 | ent.insertEmails( *itV ); |
1622 | } | 1622 | } |
1623 | 1623 | ||
1624 | if ( *it == tr("Home Phone" )) | 1624 | if ( *it == tr("Home Phone" )) |
1625 | ent.setHomePhone( *itV ); | 1625 | ent.setHomePhone( *itV ); |
1626 | /* | 1626 | /* |
1627 | if ( *it == "Home 2 Phone" ) | 1627 | if ( *it == "Home 2 Phone" ) |
1628 | ent.setHome2Phone( *itV ); | 1628 | ent.setHome2Phone( *itV ); |
1629 | */ | 1629 | */ |
diff --git a/core/pim/todo/todotable.h b/core/pim/todo/todotable.h index 39e00d1..7539df1 100644 --- a/core/pim/todo/todotable.h +++ b/core/pim/todo/todotable.h | |||
@@ -66,17 +66,17 @@ public: | |||
66 | private: | 66 | private: |
67 | QGuardedPtr<QComboBox> cb; | 67 | QGuardedPtr<QComboBox> cb; |
68 | 68 | ||
69 | }; | 69 | }; |
70 | 70 | ||
71 | class TodoTextItem : public QTableItem | 71 | class TodoTextItem : public QTableItem |
72 | { | 72 | { |
73 | public: | 73 | public: |
74 | TodoTextItem( QTable *t, const QString & str ) | 74 | TodoTextItem( QTable *t, const QString & str ) |
75 | :QTableItem( t, QTableItem::Never, str ) {} | 75 | :QTableItem( t, QTableItem::Never, str ) {} |
76 | 76 | ||
77 | QString key () const { return Qtopia::buildSortKey( text() ); } | 77 | QString key () const { return Qtopia::buildSortKey( text() ); } |
78 | }; | 78 | }; |
79 | 79 | ||
80 | class DueTextItem : public QTableItem | 80 | class DueTextItem : public QTableItem |
81 | { | 81 | { |
82 | public: | 82 | public: |
@@ -187,30 +187,33 @@ private: | |||
187 | Categories mCat; | 187 | Categories mCat; |
188 | int currFindRow; | 188 | int currFindRow; |
189 | bool showDeadl:1; | 189 | bool showDeadl:1; |
190 | }; | 190 | }; |
191 | 191 | ||
192 | 192 | ||
193 | inline void TodoTable::insertIntoTable( ToDoEvent *todo, int row ) | 193 | inline void TodoTable::insertIntoTable( ToDoEvent *todo, int row ) |
194 | { | 194 | { |
195 | QString sortKey = (char) ((todo->isCompleted() ? 'a' : 'A') | 195 | int rows = numRows(); |
196 | + todo->priority() ) | 196 | ++rows; |
197 | setNumRows( rows ); | ||
198 | QString sortKey = (char) ((todo->isCompleted() ? 'a' : 'A') | ||
199 | + todo->priority() ) | ||
197 | + Qtopia::buildSortKey( todo->description() ); | 200 | + Qtopia::buildSortKey( todo->description() ); |
198 | CheckItem *chk = new CheckItem( this, sortKey ); | 201 | CheckItem *chk = new CheckItem( this, sortKey ); |
199 | chk->setChecked( todo->isCompleted() ); | 202 | chk->setChecked( todo->isCompleted() ); |
200 | ComboItem *cmb = new ComboItem( this, QTableItem::WhenCurrent ); | 203 | ComboItem *cmb = new ComboItem( this, QTableItem::WhenCurrent ); |
201 | cmb->setText( QString::number( todo->priority() ) ); | 204 | cmb->setText( QString::number( todo->priority() ) ); |
202 | QString sum = todo->summary(); | 205 | QString sum = todo->summary(); |
203 | QTableItem *ti = new TodoTextItem( this, sum.isEmpty() ? todo->description().left(40).simplifyWhiteSpace() : sum ); | 206 | QTableItem *ti = new TodoTextItem( this, sum.isEmpty() ? todo->description().left(40).simplifyWhiteSpace() : sum ); |
204 | ti->setReplaceable( false ); | 207 | ti->setReplaceable( false ); |
205 | 208 | ||
206 | DueTextItem *due = new DueTextItem(this, todo ); | 209 | DueTextItem *due = new DueTextItem(this, todo ); |
207 | setItem( row, 3, due); | 210 | setItem( row, 3, due); |
208 | 211 | ||
209 | setItem( row, 0, chk ); | 212 | setItem( row, 0, chk ); |
210 | setItem( row, 1, cmb ); | 213 | setItem( row, 1, cmb ); |
211 | setItem( row, 2, ti ); | 214 | setItem( row, 2, ti ); |
212 | 215 | ||
213 | 216 | ||
214 | todoList.insert( chk, todo ); | 217 | todoList.insert( chk, todo ); |
215 | } | 218 | } |
216 | 219 | ||