summaryrefslogtreecommitdiff
path: root/core/pim/addressbook/contacteditor.cpp
authortux_mike <tux_mike>2002-04-02 01:42:34 (UTC)
committer tux_mike <tux_mike>2002-04-02 01:42:34 (UTC)
commitf830e73250189b0c9ca06df437c04d1c29e81359 (patch) (side-by-side diff)
tree15280430b5283ddcca3d0fd8eb2d236b2e2d9d57 /core/pim/addressbook/contacteditor.cpp
parent83d80c254e77aee34e579fc01679ffb0bfa4599b (diff)
downloadopie-f830e73250189b0c9ca06df437c04d1c29e81359.zip
opie-f830e73250189b0c9ca06df437c04d1c29e81359.tar.gz
opie-f830e73250189b0c9ca06df437c04d1c29e81359.tar.bz2
Minor changes for Sharp rom compatability, fixed an annoying bug with edit and the chooser fields.
Diffstat (limited to 'core/pim/addressbook/contacteditor.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/contacteditor.cpp56
1 files changed, 39 insertions, 17 deletions
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp
index 66e94ef..6d92ac3 100644
--- a/core/pim/addressbook/contacteditor.cpp
+++ b/core/pim/addressbook/contacteditor.cpp
@@ -451,5 +451,5 @@ void ContactEditor::init() {
- cmbChooserField1->setCurrentItem( 1 );
- cmbChooserField2->setCurrentItem( 2 );
- cmbChooserField3->setCurrentItem( 3 );
+ cmbChooserField1->setCurrentItem( 0 );
+ cmbChooserField2->setCurrentItem( 1 );
+ cmbChooserField3->setCurrentItem( 2 );
@@ -961,2 +961,3 @@ void ContactEditor::setEntry( const Contact &entry ) {
+
ent = entry;
@@ -1016,2 +1017,7 @@ void ContactEditor::setEntry( const Contact &entry ) {
+ if (hasCountry) {
+ (*slHomeAddress)[6] = ent.homeCountry();
+ (*slBusinessAddress)[6] = ent.businessCountry();
+ }
+
QStringList::ConstIterator it;
@@ -1057,3 +1063,3 @@ void ContactEditor::setEntry( const Contact &entry ) {
- if ( *it == "Business Phone" )
+ if ( *it == "Business Phone" || *it == "Work Phone" )
*itV = ent.businessPhone();
@@ -1063,6 +1069,6 @@ void ContactEditor::setEntry( const Contact &entry ) {
*/
- if ( *it == "Business Fax" )
+ if ( *it == "Business Fax" || *it == "Work Fax" )
*itV = ent.businessFax();
- if ( *it == "Business Mobile" )
+ if ( *it == "Business Mobile" || *it == "work Mobile" )
*itV = ent.businessMobile();
@@ -1099,3 +1105,3 @@ void ContactEditor::setEntry( const Contact &entry ) {
*/
- if ( *it == "Business Pager" )
+ if ( *it == "Business Pager" || *it == "Work Pager" )
*itV = ent.businessPager();
@@ -1122,3 +1128,3 @@ void ContactEditor::setEntry( const Contact &entry ) {
*itV = ent.homeWebpage();
- if ( *it == "Business Web Page" )
+ if ( *it == "Business Web Page" || *it == "Work Web Page" )
*itV = ent.businessWebpage();
@@ -1135,2 +1141,8 @@ void ContactEditor::setEntry( const Contact &entry ) {
+ slotCmbChooser1Change( cmbChooserField1->currentItem() );
+ slotCmbChooser2Change( cmbChooserField2->currentItem() );
+ slotCmbChooser3Change( cmbChooserField3->currentItem() );
+
+ slotAddressTypeChange( cmbAddress->currentItem() );
+
}
@@ -1200,2 +1212,7 @@ void ContactEditor::saveEntry() {
}
+
+ if (hasCountry) {
+ ent.setHomeCountry( (*slHomeAddress)[6] );
+ ent.setBusinessCountry( (*slBusinessAddress)[6] );
+ }
@@ -1242,3 +1259,3 @@ void ContactEditor::saveEntry() {
- if ( *it == "Business Phone" )
+ if ( *it == "Business Phone" || *it == "Work Phone" )
ent.setBusinessPhone( *itV );
@@ -1248,6 +1265,6 @@ void ContactEditor::saveEntry() {
*/
- if ( *it == "Business Fax" )
+ if ( *it == "Business Fax" || *it == "Work Fax" )
ent.setBusinessFax( *itV );
- if ( *it == "Business Mobile" )
+ if ( *it == "Business Mobile" || *it == "Work Mobile" )
ent.setBusinessMobile( *itV );
@@ -1257,7 +1274,12 @@ void ContactEditor::saveEntry() {
*/
- if ( *it == "Default Email" )
- ent.setDefaultEmail( *itV );
-
- if ( *it == "Emails" )
+ //if ( *it == "Default Email" )
+ //ent.setDefaultEmail( *itV );
+
+ if ( *it == "Emails" ) {
+ QString allemail;
+ QString defaultmail;
+ parseEmailFrom( *itV, defaultmail, allemail );
+ ent.setDefaultEmail( defaultmail );
ent.setEmails( *itV );
+ }
@@ -1284,3 +1306,3 @@ void ContactEditor::saveEntry() {
*/
- if ( *it == "Business Pager" )
+ if ( *it == "Business Pager" || *it == "Work Pager" )
ent.setBusinessPager( *itV );
@@ -1307,3 +1329,3 @@ void ContactEditor::saveEntry() {
ent.setHomeWebpage( *itV );
- if ( *it == "Business Web Page" )
+ if ( *it == "Business Web Page" || *it == "Work Web Page" )
ent.setBusinessWebpage( *itV );