Diffstat (limited to 'core/pim/addressbook/abeditor.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/addressbook/abeditor.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/core/pim/addressbook/abeditor.cpp b/core/pim/addressbook/abeditor.cpp index 91e8722..75e7ede 100644 --- a/core/pim/addressbook/abeditor.cpp +++ b/core/pim/addressbook/abeditor.cpp @@ -437,184 +437,183 @@ void AbEditor::saveEntry() break; case Qtopia::HomeFax: ent.setHomeFax( it.current()->text() ); break; case Qtopia::HomeMobile: ent.setHomeMobile( it.current()->text() ); break; case Qtopia::HomeWebPage: ent.setHomeWebpage( it.current()->text() ); break; // business case Qtopia::Company: ent.setCompany( it.current()->text() ); break; case Qtopia::BusinessStreet: ent.setBusinessStreet( it.current()->text() ); break; case Qtopia::BusinessCity: ent.setBusinessCity( it.current()->text() ); break; case Qtopia::BusinessState: ent.setBusinessState( it.current()->text() ); break; case Qtopia::BusinessZip: ent.setBusinessZip( it.current()->text() ); break; case Qtopia::BusinessCountry: ent.setBusinessCountry( it.current()->text() ); break; case Qtopia::BusinessWebPage: ent.setBusinessWebpage( it.current()->text() ); break; case Qtopia::JobTitle: ent.setJobTitle( it.current()->text() ); break; case Qtopia::Department: ent.setDepartment( it.current()->text() ); break; case Qtopia::Office: ent.setOffice( it.current()->text() ); break; case Qtopia::BusinessPhone: ent.setBusinessPhone( it.current()->text() ); break; case Qtopia::BusinessFax: ent.setBusinessFax( it.current()->text() ); break; case Qtopia::BusinessMobile: ent.setBusinessMobile( it.current()->text() ); break; case Qtopia::BusinessPager: ent.setBusinessPager( it.current()->text() ); break; case Qtopia::Profession: ent.setProfession( it.current()->text() ); break; case Qtopia::Assistant: ent.setAssistant( it.current()->text() ); break; case Qtopia::Manager: ent.setManager( it.current()->text() ); break; // personal case Qtopia::Spouse: ent.setSpouse( it.current()->text() ); break; case Qtopia::Children: ent.setChildren( it.current()->text() ); break; case Qtopia::Birthday: ent.setBirthday( it.current()->text() ); break; case Qtopia::Anniversary: ent.setAnniversary( it.current()->text() ); break; case Qtopia::Nickname: ent.setNickname( it.current()->text() ); break; default: break; } } int gender = genderCombo->currentItem(); ent.setGender( QString::number( gender ) ); QString str = txtNote->text(); if ( !str.isNull() ) ent.setNotes( str ); } void AbEditor::slotNote() { - dlgNote->showMaximized(); - if ( !dlgNote->exec() ) { + if ( ! QPEApplication::execDialog( &dlgNote ) ) { // reset the note... txtNote->setText( ent.notes() ); } } void AbEditor::setNameFocus() { firstEdit->setFocus(); } void parseEmailFrom( const QString &txt, QString &strDefaultEmail, QString &strAll ) { int where, start; if ( txt.isEmpty() ) return; // find the first where = txt.find( ',' ); if ( where < 0 ) { strDefaultEmail = txt; strAll = txt; } else { strDefaultEmail = txt.left( where ).stripWhiteSpace(); strAll = strDefaultEmail; while ( where > -1 ) { strAll.append(" "); start = where; where = txt.find( ',', where + 1 ); if ( where > - 1 ) strAll.append( txt.mid(start + 1, where - start - 1).stripWhiteSpace() ); else // grab until the end... strAll.append( txt.right(txt.length() - start - 1).stripWhiteSpace() ); } } } void parseEmailTo( const QString &strDefaultEmail, const QString &strOtherEmail, QString &strBack ) { // create a comma dilimeted set of emails... // use the power of short circuiting... bool foundDefault = false; QString strTmp; int start = 0; int where; // start at the beginng. strBack = strDefaultEmail; where = 0; while ( where > -1 ) { start = where; where = strOtherEmail.find( ' ', where + 1 ); if ( where > 0 ) { strTmp = strOtherEmail.mid( start, where - start ).stripWhiteSpace(); } else strTmp = strOtherEmail.right( strOtherEmail.length() - start ).stripWhiteSpace(); if ( foundDefault || strTmp != strDefaultEmail ) { strBack.append( ", " ); strBack.append( strTmp ); } else foundDefault = true; } } static inline bool containsAlphaNum( const QString &str ) { int i, count = str.length(); for ( i = 0; i < count; i++ ) if ( !str[i].isSpace() ) return TRUE; return FALSE; } static inline bool constainsWhiteSpace( const QString &str ) { int i, count = str.length(); for (i = 0; i < count; i++ ) if ( str[i].isSpace() ) return TRUE; return FALSE; } |