author | eilers <eilers> | 2003-03-01 18:06:49 (UTC) |
---|---|---|
committer | eilers <eilers> | 2003-03-01 18:06:49 (UTC) |
commit | a0ae7d2b8cfef3f643c4aa536bdf25d7da510142 (patch) (unidiff) | |
tree | 7658121cba0f106d019ecf34682fe9cc079cbf73 | |
parent | 7dd36872a3eb63eb1c3c7a17549f3eeba92f1b32 (diff) | |
download | opie-a0ae7d2b8cfef3f643c4aa536bdf25d7da510142.zip opie-a0ae7d2b8cfef3f643c4aa536bdf25d7da510142.tar.gz opie-a0ae7d2b8cfef3f643c4aa536bdf25d7da510142.tar.bz2 |
Fixing following bugs:
default email chooser jumped sometimes through the widget
default email chooser not completely hiding the textfield
storing the position of the chooser for
the home webpage failed
-rw-r--r-- | core/pim/addressbook/TODO | 21 | ||||
-rw-r--r-- | core/pim/addressbook/contacteditor.cpp | 107 | ||||
-rw-r--r-- | core/pim/addressbook/contacteditor.h | 8 | ||||
-rw-r--r-- | core/pim/addressbook/ocontactfields.cpp | 4 | ||||
-rw-r--r-- | core/pim/addressbook/version.h | 2 |
5 files changed, 82 insertions, 60 deletions
diff --git a/core/pim/addressbook/TODO b/core/pim/addressbook/TODO index 719b720..a0d50a3 100644 --- a/core/pim/addressbook/TODO +++ b/core/pim/addressbook/TODO | |||
@@ -13,52 +13,46 @@ Feature requests: | |||
13 | - Beaming of multiple contacts (current list/ by search or by category) | 13 | - Beaming of multiple contacts (current list/ by search or by category) |
14 | - Configure the letter-picker: lastname/fullname search | 14 | - Configure the letter-picker: lastname/fullname search |
15 | - User center of the joypad to switch back from card to listview ! | 15 | - User center of the joypad to switch back from card to listview ! |
16 | - Cursor-UP/Down: Should additionally scroll cardview if it is too large | 16 | - Cursor-UP/Down: Should additionally scroll cardview if it is too large |
17 | (behaviour should be selectable by configuration) | 17 | (behaviour should be selectable by configuration) |
18 | 18 | ||
19 | Known Bugs: | 19 | Known Bugs: |
20 | ----------- | 20 | ----------- |
21 | - Default Email-button: A lot of problems: | ||
22 | If on second tab: The combo chooser is on the top left of the screen ! :( | ||
23 | - Default Email-Button: Sometimes not hiding the textfields completely | ||
24 | 21 | ||
25 | Bugs but not in addressbook: | 22 | Bugs but not in addressbook: |
26 | ----------------------------- | 23 | ----------------------------- |
27 | - VCARD: If umlaut (äöüß) in address, the parser gets confused.. | 24 | - VCARD: If umlaut (äöüß) in address, the parser gets confused.. |
28 | 25 | ||
29 | - Exporting and reimporting of Jobtitle was reported to fail (Could not reproduce this ! (se)) | ||
30 | |||
31 | 26 | ||
32 | Urgent: | 27 | Urgent: |
33 | -------- | 28 | -------- |
34 | ContactEditor: | ||
35 | - Contact-Editor is temporarely reenabled. Wait for replacement. | ||
36 | - Redesign of Contacteditor | ||
37 | - Category is on the wrong position after changing to personal and back to normal | 29 | - Category is on the wrong position after changing to personal and back to normal |
38 | ( Temporarily workaround: Category is never deactivated.. :S ) | 30 | ( Temporarily workaround: Category is never deactivated.. :S ) |
39 | 31 | ||
40 | - Fix handling of 3 Firstnames | 32 | - Fix handling of 3 Firstnames |
41 | 33 | ||
42 | Important: | 34 | Important: |
43 | ---------- | 35 | ---------- |
44 | 36 | ||
45 | - If new contact is added (contacteditor closed): focus (table, card) to | ||
46 | this entry ! | ||
47 | - After search (Started with Return): KeyFocus should be on Tabelle | ||
48 | |||
49 | - "What's this" should be added (Deleyed after Feature Freeze) | 37 | - "What's this" should be added (Deleyed after Feature Freeze) |
50 | 38 | ||
51 | Less important: | 39 | Less important: |
52 | --------------- | 40 | --------------- |
53 | - Reload if contacts were changed externally | 41 | - Reload if contacts were changed externally |
54 | - The picker (alphabetical sort widget) should be | 42 | - The picker (alphabetical sort widget) should be |
55 | placed verticaly or horizontally (configurable) | 43 | placed verticaly or horizontally (configurable) |
56 | - Find a smart solution for activating/deactivating the "send email" event | 44 | - Find a smart solution for activating/deactivating the "send email" event |
45 | - If new contact is added (contacteditor closed): focus (table, card) to | ||
46 | this entry ! | ||
47 | - After search (Started with Return): KeyFocus should be on Tabelle | ||
48 | |||
49 | ContactEditor: | ||
50 | - Redesign of Contacteditor | ||
57 | 51 | ||
58 | Should be Fixed (not absolute sure, need further validation): | 52 | Should be Fixed (not absolute sure, need further validation): |
59 | ------------------------------------------------------------- | 53 | ------------------------------------------------------------- |
60 | 54 | ||
61 | 55 | ||
62 | Fixed/Ready: | 56 | Fixed/Ready: |
63 | ------- | 57 | ------- |
64 | - Syncing: abtable not reloaded after sync. | 58 | - Syncing: abtable not reloaded after sync. |
@@ -112,8 +106,11 @@ Fixed/Ready: | |||
112 | 1. Configure nicht übersetzt (alles leer). | 106 | 1. Configure nicht übersetzt (alles leer). |
113 | 2. Contacteditor nur teilweise übersetzt. | 107 | 2. Contacteditor nur teilweise übersetzt. |
114 | 3. Kategorie-Picker geht nicht. | 108 | 3. Kategorie-Picker geht nicht. |
115 | - Plugin for Today for Birthdays and Anniversaries | 109 | - Plugin for Today for Birthdays and Anniversaries |
116 | - Implement a picker/combo for the default email. | 110 | - Implement a picker/combo for the default email. |
117 | - Overview window cleanup needed.. | 111 | - Overview window cleanup needed.. |
118 | - Store last settings of combo-boxes | 112 | - Store last settings of combo-boxes |
119 | - Personal and Business Web-page is not editable | 113 | - Personal and Business Web-page is not editable |
114 | - Default Email-button: A lot of problems: | ||
115 | If on second tab: The combo chooser is on the top left of the screen ! :( | ||
116 | - Default Email-Button: Sometimes not hiding the textfields completely | ||
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp index b60f2dd..d1338f6 100644 --- a/core/pim/addressbook/contacteditor.cpp +++ b/core/pim/addressbook/contacteditor.cpp | |||
@@ -157,33 +157,51 @@ void ContactEditor::init() { | |||
157 | txtJobTitle = new QLineEdit( container ); | 157 | txtJobTitle = new QLineEdit( container ); |
158 | gl->addWidget( txtJobTitle, 1, 1 ); | 158 | gl->addWidget( txtJobTitle, 1, 1 ); |
159 | 159 | ||
160 | l = new QLabel( tr( "Organization" ), container ); | 160 | l = new QLabel( tr( "Organization" ), container ); |
161 | gl->addWidget( l, 2, 0 ); | 161 | gl->addWidget( l, 2, 0 ); |
162 | txtOrganization = new QLineEdit( container ); | 162 | txtOrganization = new QLineEdit( container ); |
163 | gl->addWidget( txtOrganization, 2, 1 ); | 163 | gl->addWidget( txtOrganization, 2, 1 ); |
164 | 164 | ||
165 | // Chooser 1 | ||
165 | cmbChooserField1 = new QComboBox( FALSE, container ); | 166 | cmbChooserField1 = new QComboBox( FALSE, container ); |
166 | cmbChooserField1->setMaximumWidth( 90 ); | 167 | cmbChooserField1->setMaximumWidth( 90 ); |
167 | gl->addWidget( cmbChooserField1, 3, 0 ); | 168 | gl->addWidget( cmbChooserField1, 3, 0 ); |
168 | txtChooserField1 = new QLineEdit( container ); | 169 | // Textfield for chooser 1. |
169 | gl->addWidget( txtChooserField1, 3, 1 ); | 170 | // Now use Widgetstack to contain the textfield and the default-email combo ! |
170 | 171 | m_widgetStack1 = new QWidgetStack( container ); | |
172 | txtChooserField1 = new QLineEdit( m_widgetStack1 ); | ||
173 | m_widgetStack1 -> addWidget( txtChooserField1, TextField ); | ||
174 | gl->addWidget( m_widgetStack1, 3, 1 ); | ||
175 | m_widgetStack1 -> raiseWidget( TextField ); | ||
176 | |||
177 | // Chooser 2 | ||
171 | cmbChooserField2 = new QComboBox( FALSE, container ); | 178 | cmbChooserField2 = new QComboBox( FALSE, container ); |
172 | cmbChooserField2->setMaximumWidth( 90 ); | 179 | cmbChooserField2->setMaximumWidth( 90 ); |
173 | gl->addWidget( cmbChooserField2, 4, 0 ); | 180 | gl->addWidget( cmbChooserField2, 4, 0 ); |
174 | txtChooserField2 = new QLineEdit( container ); | 181 | // Textfield for chooser 2 |
175 | gl->addWidget( txtChooserField2, 4, 1 ); | 182 | // Now use WidgetStack to contain the textfield and the default-email combo! |
176 | 183 | m_widgetStack2 = new QWidgetStack( container ); | |
184 | txtChooserField2 = new QLineEdit( m_widgetStack2 ); | ||
185 | m_widgetStack2 -> addWidget( txtChooserField2, TextField ); | ||
186 | gl->addWidget( m_widgetStack2, 4, 1 ); | ||
187 | m_widgetStack2 -> raiseWidget( TextField ); | ||
188 | |||
189 | // Chooser 3 | ||
177 | cmbChooserField3 = new QComboBox( FALSE, container ); | 190 | cmbChooserField3 = new QComboBox( FALSE, container ); |
178 | cmbChooserField3->setMaximumWidth( 90 ); | 191 | cmbChooserField3->setMaximumWidth( 90 ); |
179 | gl->addWidget( cmbChooserField3, 5, 0 ); | 192 | gl->addWidget( cmbChooserField3, 5, 0 ); |
180 | txtChooserField3 = new QLineEdit( container ); | 193 | // Textfield for chooser 2 |
181 | gl->addWidget( txtChooserField3, 5, 1 ); | 194 | // Now use WidgetStack to contain the textfield and the default-email combo! |
195 | m_widgetStack3 = new QWidgetStack( container ); | ||
196 | txtChooserField3 = new QLineEdit( m_widgetStack3 ); | ||
197 | m_widgetStack3 -> addWidget( txtChooserField3, TextField ); | ||
198 | gl->addWidget( m_widgetStack3, 5, 1 ); | ||
199 | m_widgetStack3 -> raiseWidget( TextField ); | ||
182 | 200 | ||
183 | l = new QLabel( tr( "File As" ), container ); | 201 | l = new QLabel( tr( "File As" ), container ); |
184 | gl->addWidget( l, 6, 0 ); | 202 | gl->addWidget( l, 6, 0 ); |
185 | cmbFileAs = new QComboBox( TRUE, container ); | 203 | cmbFileAs = new QComboBox( TRUE, container ); |
186 | gl->addWidget( cmbFileAs, 6, 1 ); | 204 | gl->addWidget( cmbFileAs, 6, 1 ); |
187 | 205 | ||
188 | labCat = new QLabel( tr( "Category" ), container ); | 206 | labCat = new QLabel( tr( "Category" ), container ); |
189 | gl->addWidget( labCat, 7, 0 ); | 207 | gl->addWidget( labCat, 7, 0 ); |
@@ -452,21 +470,27 @@ void ContactEditor::init() { | |||
452 | cmbCountry->insertItem( tr ( "Zimbabwe" ) ); | 470 | cmbCountry->insertItem( tr ( "Zimbabwe" ) ); |
453 | if (cmbCountry->listBox()!=0) | 471 | if (cmbCountry->listBox()!=0) |
454 | cmbCountry->listBox()->sort(); | 472 | cmbCountry->listBox()->sort(); |
455 | 473 | ||
456 | cmbCountry->setMaximumWidth( 135 ); | 474 | cmbCountry->setMaximumWidth( 135 ); |
457 | 475 | ||
458 | gl->addMultiCellWidget( cmbCountry, 5, 5, 1, 2 ); | 476 | gl->addMultiCellWidget( cmbCountry, 5, 5, 1, 2 ); |
459 | 477 | ||
478 | // Chooser 4 | ||
460 | cmbChooserField4 = new QComboBox( FALSE, container ); | 479 | cmbChooserField4 = new QComboBox( FALSE, container ); |
461 | cmbChooserField4->setMaximumWidth( 90 ); | 480 | cmbChooserField4->setMaximumWidth( 90 ); |
462 | gl->addWidget( cmbChooserField4, 6, 0 ); | 481 | gl->addWidget( cmbChooserField4, 6, 0 ); |
463 | txtChooserField4 = new QLineEdit( container ); | 482 | // Textfield for chooser 2 |
464 | gl->addMultiCellWidget( txtChooserField4, 6, 6, 1, 2 ); | 483 | // Now use WidgetStack to contain the textfield and the default-email combo! |
484 | m_widgetStack4 = new QWidgetStack( container ); | ||
485 | txtChooserField4 = new QLineEdit( m_widgetStack4 ); | ||
486 | m_widgetStack4 -> addWidget( txtChooserField4, TextField ); | ||
487 | gl->addMultiCellWidget( m_widgetStack4, 6, 6, 1, 2 ); | ||
488 | m_widgetStack4 -> raiseWidget( TextField ); | ||
465 | 489 | ||
466 | QSpacerItem *space = new QSpacerItem(1,1, | 490 | QSpacerItem *space = new QSpacerItem(1,1, |
467 | QSizePolicy::Maximum, | 491 | QSizePolicy::Maximum, |
468 | QSizePolicy::MinimumExpanding ); | 492 | QSizePolicy::MinimumExpanding ); |
469 | gl->addItem( space, 7, 0 ); | 493 | gl->addItem( space, 7, 0 ); |
470 | 494 | ||
471 | tabMain->insertTab( tabViewport, tr( "Address" ) ); | 495 | tabMain->insertTab( tabViewport, tr( "Address" ) ); |
472 | 496 | ||
@@ -695,67 +719,68 @@ void ContactEditor::populateDefaultEmailCmb(){ | |||
695 | // first one.. | 719 | // first one.. |
696 | if ( !found ) | 720 | if ( !found ) |
697 | defaultEmail = cmbDefaultEmail->text(0); | 721 | defaultEmail = cmbDefaultEmail->text(0); |
698 | } | 722 | } |
699 | 723 | ||
700 | // Called when any combobox was changed. | 724 | // Called when any combobox was changed. |
701 | // "true" returned if the change was chandled by this function, else it should | 725 | // "true" returned if the change was chandled by this function, else it should |
702 | // be handled by something else.. | 726 | // be handled by something else.. |
703 | bool ContactEditor::cmbChooserChange( int index, QLineEdit *inputWid, int widgetPos ) { | 727 | bool ContactEditor::cmbChooserChange( int index, QWidgetStack* inputStack, int widgetPos ) { |
704 | QString type = slChooserNames[index]; | 728 | QString type = slChooserNames[index]; |
705 | qWarning("ContactEditor::cmbChooserChange -> Type: %s, WidgetPos: %d", type.latin1(), widgetPos ); | 729 | qWarning("ContactEditor::cmbChooserChange -> Type: %s, WidgetPos: %d", type.latin1(), widgetPos ); |
706 | 730 | ||
707 | if ( !initializing ) | 731 | if ( !initializing ) |
708 | contactfields.setFieldOrder( widgetPos-1, index ); | 732 | contactfields.setFieldOrder( widgetPos-1, index ); |
709 | 733 | ||
710 | // Create and connect combobox for selecting the default email | 734 | // Create and connect combobox for selecting the default email |
711 | if ( type == "Default Email"){ | 735 | if ( type == "Default Email"){ |
712 | qWarning("Choosing default-email (defaultEmailChooserPosition= %d) ", defaultEmailChooserPosition); | 736 | qWarning("Choosing default-email (defaultEmailChooserPosition= %d) ", defaultEmailChooserPosition); |
713 | 737 | ||
714 | // More than one defaul-email chooser is not allowed ! | 738 | // More than one default-email chooser is not allowed ! |
715 | if ( ( defaultEmailChooserPosition != -1 ) && | 739 | if ( ( defaultEmailChooserPosition != -1 ) && |
716 | defaultEmailChooserPosition != widgetPos && !initializing){ | 740 | defaultEmailChooserPosition != widgetPos && !initializing){ |
717 | chooserError( widgetPos ); | 741 | chooserError( widgetPos ); |
718 | return true; | 742 | return true; |
719 | } | 743 | } |
720 | 744 | ||
721 | if ( cmbDefaultEmail ){ | 745 | QComboBox* cmbo = ( QComboBox* ) inputStack -> widget( Combo ); |
722 | delete cmbDefaultEmail; | 746 | if ( cmbo ){ |
723 | cmbDefaultEmail = 0l; | 747 | inputStack->raiseWidget( TextField ); |
748 | inputStack -> removeWidget( cmbo ); | ||
749 | delete cmbo; | ||
724 | } | 750 | } |
725 | cmbDefaultEmail = new QComboBox(inputWid->parentWidget()); | 751 | cmbo = new QComboBox( inputStack ); |
726 | cmbDefaultEmail->setGeometry(inputWid->frameGeometry()); /* :SX */ | 752 | cmbo -> insertStringList( emails ); |
727 | |||
728 | QRect rect = inputWid->frameGeometry(); | ||
729 | qWarning("Geometrie: X=%d, Y=%d, Left=%d, Top=%d, Right=%d, Bottom=%d", | ||
730 | rect.x(), rect.y(), rect.left(), rect.top(), rect.right(), rect.bottom()); | ||
731 | QPoint pnt = inputWid->pos(); | ||
732 | qWarning("Position : X=%d, Y=%d", pnt.x(), pnt.y() ); | ||
733 | |||
734 | connect( cmbDefaultEmail,SIGNAL( activated(int) ), | ||
735 | SLOT( defaultEmailChanged(int) ) ); | ||
736 | 753 | ||
737 | cmbDefaultEmail->clear(); | 754 | inputStack -> addWidget( cmbo, Combo ); |
738 | cmbDefaultEmail->insertStringList( emails ); | 755 | inputStack -> raiseWidget( Combo ); |
739 | cmbDefaultEmail->show(); | ||
740 | 756 | ||
741 | defaultEmailChooserPosition = widgetPos; | 757 | defaultEmailChooserPosition = widgetPos; |
758 | cmbDefaultEmail = cmbo; | ||
759 | |||
760 | connect( cmbo,SIGNAL( activated(int) ), | ||
761 | SLOT( defaultEmailChanged(int) ) ); | ||
742 | 762 | ||
743 | // Set current default email | 763 | // Set current default email |
744 | populateDefaultEmailCmb(); | 764 | populateDefaultEmailCmb(); |
745 | 765 | ||
746 | 766 | ||
747 | } else { | 767 | } else { |
748 | // Something else was selected: Hide combo.. | 768 | // Something else was selected: Hide combo.. |
749 | qWarning(" Hiding default-email combo" ); | 769 | qWarning(" Hiding default-email combo" ); |
750 | if ( defaultEmailChooserPosition == widgetPos ){ | 770 | if ( defaultEmailChooserPosition == widgetPos ){ |
751 | defaultEmailChooserPosition = -1; | 771 | defaultEmailChooserPosition = -1; |
752 | if ( cmbDefaultEmail ) | 772 | QComboBox* cmbo = ( QComboBox* ) inputStack -> widget( Combo ); |
753 | cmbDefaultEmail->hide(); | 773 | if ( cmbo ){ |
774 | inputStack->raiseWidget( TextField ); | ||
775 | inputStack -> removeWidget( cmbo ); | ||
776 | cmbDefaultEmail = 0l; | ||
777 | delete cmbo; | ||
778 | } | ||
754 | 779 | ||
755 | } | 780 | } |
756 | 781 | ||
757 | // Caller should initialize the responsible textfield, therefore | 782 | // Caller should initialize the responsible textfield, therefore |
758 | // "false" is returned | 783 | // "false" is returned |
759 | return false; | 784 | return false; |
760 | } | 785 | } |
761 | 786 | ||
@@ -797,33 +822,27 @@ void ContactEditor::chooserError( int index ) | |||
797 | break; | 822 | break; |
798 | } | 823 | } |
799 | } | 824 | } |
800 | 825 | ||
801 | // Called when something was changed in a textfield (shouldn't it called textchanged? (se)) | 826 | // Called when something was changed in a textfield (shouldn't it called textchanged? (se)) |
802 | void ContactEditor::chooserChange( const QString &textChanged, int index, | 827 | void ContactEditor::chooserChange( const QString &textChanged, int index, |
803 | QLineEdit* , int widgetPos ) { | 828 | QLineEdit* , int widgetPos ) { |
804 | 829 | ||
805 | QString type = slChooserNames[index]; | 830 | QString type = slChooserNames[index]; // :SX |
806 | qDebug("ContactEditor::chooserChange( type=>%s<, textChanged=>%s< index=%i, widgetPos=%i", | 831 | qDebug("ContactEditor::chooserChange( type=>%s<, textChanged=>%s< index=%i, widgetPos=%i", |
807 | type.latin1(),textChanged.latin1(), index, widgetPos ); | 832 | type.latin1(),textChanged.latin1(), index, widgetPos ); |
808 | 833 | ||
809 | if ( type == "Default Email"){ | 834 | if ( type == "Default Email"){ |
810 | qWarning ("??? Wozu??: %s", textChanged.latin1()); | 835 | qWarning ("??? Wozu??: %s", textChanged.latin1()); |
811 | defaultEmail = textChanged; | 836 | defaultEmail = textChanged; |
812 | 837 | ||
813 | populateDefaultEmailCmb(); | 838 | populateDefaultEmailCmb(); |
814 | 839 | ||
815 | }else if (defaultEmailChooserPosition == widgetPos){ | 840 | }else if (type == "Emails"){ |
816 | qDebug("cmbDefaultEmail->hide()"); | ||
817 | |||
818 | if (cmbDefaultEmail) cmbDefaultEmail->hide(); | ||
819 | widgetPos=-1; | ||
820 | |||
821 | }else if (type == "Emails"){ | ||
822 | qDebug("emails"); | 841 | qDebug("emails"); |
823 | 842 | ||
824 | QString de; | 843 | QString de; |
825 | emails = QStringList::split (",", textChanged ); | 844 | emails = QStringList::split (",", textChanged ); |
826 | 845 | ||
827 | populateDefaultEmailCmb(); | 846 | populateDefaultEmailCmb(); |
828 | } | 847 | } |
829 | 848 | ||
@@ -914,51 +933,51 @@ void ContactEditor::slotCountryChange( const QString &textChanged ) { | |||
914 | } else { | 933 | } else { |
915 | slHomeAddress[6] = textChanged; | 934 | slHomeAddress[6] = textChanged; |
916 | } | 935 | } |
917 | } | 936 | } |
918 | 937 | ||
919 | 938 | ||
920 | void ContactEditor::slotCmbChooser1Change( int index ) { | 939 | void ContactEditor::slotCmbChooser1Change( int index ) { |
921 | qWarning("ContactEditor::slotCmbChooser1Change( %d )", index); | 940 | qWarning("ContactEditor::slotCmbChooser1Change( %d )", index); |
922 | if ( !cmbChooserChange( cmbChooserField1->currentItem(), txtChooserField1, 1) ){ | 941 | if ( !cmbChooserChange( cmbChooserField1->currentItem(), m_widgetStack1, 1) ){ |
923 | 942 | ||
924 | txtChooserField1->setText( slChooserValues[index] ); | 943 | txtChooserField1->setText( slChooserValues[index] ); |
925 | txtChooserField1->setFocus(); | 944 | txtChooserField1->setFocus(); |
926 | 945 | ||
927 | } | 946 | } |
928 | 947 | ||
929 | } | 948 | } |
930 | 949 | ||
931 | void ContactEditor::slotCmbChooser2Change( int index ) { | 950 | void ContactEditor::slotCmbChooser2Change( int index ) { |
932 | qWarning("ContactEditor::slotCmbChooser2Change( %d )", index); | 951 | qWarning("ContactEditor::slotCmbChooser2Change( %d )", index); |
933 | 952 | ||
934 | if ( !cmbChooserChange( cmbChooserField2->currentItem(), txtChooserField2, 2) ){ | 953 | if ( !cmbChooserChange( cmbChooserField2->currentItem(), m_widgetStack2, 2) ){ |
935 | 954 | ||
936 | txtChooserField2->setText( slChooserValues[index] ); | 955 | txtChooserField2->setText( slChooserValues[index] ); |
937 | txtChooserField2->setFocus(); | 956 | txtChooserField2->setFocus(); |
938 | 957 | ||
939 | } | 958 | } |
940 | } | 959 | } |
941 | 960 | ||
942 | void ContactEditor::slotCmbChooser3Change( int index ) { | 961 | void ContactEditor::slotCmbChooser3Change( int index ) { |
943 | qWarning("ContactEditor::slotCmbChooser3Change( %d )", index); | 962 | qWarning("ContactEditor::slotCmbChooser3Change( %d )", index); |
944 | 963 | ||
945 | if ( !cmbChooserChange( cmbChooserField3->currentItem(), txtChooserField3, 3) ){ | 964 | if ( !cmbChooserChange( cmbChooserField3->currentItem(), m_widgetStack3, 3) ){ |
946 | 965 | ||
947 | txtChooserField3->setText( slChooserValues[index] ); | 966 | txtChooserField3->setText( slChooserValues[index] ); |
948 | txtChooserField3->setFocus(); | 967 | txtChooserField3->setFocus(); |
949 | 968 | ||
950 | } | 969 | } |
951 | } | 970 | } |
952 | 971 | ||
953 | void ContactEditor::slotCmbChooser4Change( int index ) { | 972 | void ContactEditor::slotCmbChooser4Change( int index ) { |
954 | qWarning("ContactEditor::slotCmbChooser4Change( %d )", index); | 973 | qWarning("ContactEditor::slotCmbChooser4Change( %d )", index); |
955 | 974 | ||
956 | if ( !cmbChooserChange( cmbChooserField4->currentItem(), txtChooserField4, 4) ){ | 975 | if ( !cmbChooserChange( cmbChooserField4->currentItem(), m_widgetStack4, 4) ){ |
957 | 976 | ||
958 | txtChooserField4->setText( slChooserValues[index] ); | 977 | txtChooserField4->setText( slChooserValues[index] ); |
959 | txtChooserField4->setFocus(); | 978 | txtChooserField4->setFocus(); |
960 | 979 | ||
961 | } | 980 | } |
962 | } | 981 | } |
963 | 982 | ||
964 | void ContactEditor::slotAddressTypeChange( int index ) { | 983 | void ContactEditor::slotAddressTypeChange( int index ) { |
diff --git a/core/pim/addressbook/contacteditor.h b/core/pim/addressbook/contacteditor.h index 95f9f2d..703e702 100644 --- a/core/pim/addressbook/contacteditor.h +++ b/core/pim/addressbook/contacteditor.h | |||
@@ -24,16 +24,17 @@ | |||
24 | #include <opie/ocontact.h> | 24 | #include <opie/ocontact.h> |
25 | 25 | ||
26 | #include <qpe/datebookmonth.h> | 26 | #include <qpe/datebookmonth.h> |
27 | 27 | ||
28 | #include <qdialog.h> | 28 | #include <qdialog.h> |
29 | #include <qlist.h> | 29 | #include <qlist.h> |
30 | #include <qmap.h> | 30 | #include <qmap.h> |
31 | #include <qstringlist.h> | 31 | #include <qstringlist.h> |
32 | #include <qwidgetstack.h> | ||
32 | 33 | ||
33 | #include "ocontactfields.h" | 34 | #include "ocontactfields.h" |
34 | 35 | ||
35 | const int NAME_LF = 0; | 36 | const int NAME_LF = 0; |
36 | const int NAME_LFM = 1; | 37 | const int NAME_LFM = 1; |
37 | const int NAME_FL = 2; | 38 | const int NAME_FL = 2; |
38 | const int NAME_FMLS = 3; | 39 | const int NAME_FMLS = 3; |
39 | 40 | ||
@@ -101,20 +102,21 @@ class ContactEditor : public QDialog { | |||
101 | void slotFullNameChange( const QString &textChanged ); | 102 | void slotFullNameChange( const QString &textChanged ); |
102 | void slotAnniversaryDateChanged( int year, int month, int day); | 103 | void slotAnniversaryDateChanged( int year, int month, int day); |
103 | void slotBirthdayDateChanged( int year, int month, int day); | 104 | void slotBirthdayDateChanged( int year, int month, int day); |
104 | void slotRemoveBirthday(); | 105 | void slotRemoveBirthday(); |
105 | void slotRemoveAnniversary(); | 106 | void slotRemoveAnniversary(); |
106 | void defaultEmailChanged(int); | 107 | void defaultEmailChanged(int); |
107 | 108 | ||
108 | private: | 109 | private: |
110 | enum StackWidgets { TextField = 1, Combo }; | ||
109 | int defaultEmailChooserPosition; | 111 | int defaultEmailChooserPosition; |
110 | void populateDefaultEmailCmb(); | 112 | void populateDefaultEmailCmb(); |
111 | void chooserChange( const QString&, int , QLineEdit*, int ); | 113 | void chooserChange( const QString&, int , QLineEdit*, int ); |
112 | bool cmbChooserChange( int , QLineEdit*, int ); | 114 | bool cmbChooserChange( int , QWidgetStack*, int ); |
113 | OContactFields contactfields; | 115 | OContactFields contactfields; |
114 | 116 | ||
115 | bool useFullName; | 117 | bool useFullName; |
116 | 118 | ||
117 | OContact ent; | 119 | OContact ent; |
118 | 120 | ||
119 | QDialog *dlgNote; | 121 | QDialog *dlgNote; |
120 | QDialog *dlgName; | 122 | QDialog *dlgName; |
@@ -149,16 +151,20 @@ class ContactEditor : public QDialog { | |||
149 | QPushButton *btnNote; | 151 | QPushButton *btnNote; |
150 | QLineEdit *txtFullName; | 152 | QLineEdit *txtFullName; |
151 | QLineEdit *txtJobTitle; | 153 | QLineEdit *txtJobTitle; |
152 | QLineEdit *txtOrganization; | 154 | QLineEdit *txtOrganization; |
153 | QLineEdit *txtChooserField1; | 155 | QLineEdit *txtChooserField1; |
154 | QLineEdit *txtChooserField2; | 156 | QLineEdit *txtChooserField2; |
155 | QLineEdit *txtChooserField3; | 157 | QLineEdit *txtChooserField3; |
156 | QLineEdit *txtChooserField4; | 158 | QLineEdit *txtChooserField4; |
159 | QWidgetStack* m_widgetStack1; | ||
160 | QWidgetStack* m_widgetStack2; | ||
161 | QWidgetStack* m_widgetStack3; | ||
162 | QWidgetStack* m_widgetStack4; | ||
157 | QComboBox *cmbChooserField1; | 163 | QComboBox *cmbChooserField1; |
158 | QComboBox *cmbChooserField2; | 164 | QComboBox *cmbChooserField2; |
159 | QComboBox *cmbChooserField3; | 165 | QComboBox *cmbChooserField3; |
160 | QComboBox *cmbChooserField4; | 166 | QComboBox *cmbChooserField4; |
161 | QComboBox *cmbDefaultEmail; | 167 | QComboBox *cmbDefaultEmail; |
162 | QComboBox *cmbFileAs; | 168 | QComboBox *cmbFileAs; |
163 | CategorySelect *cmbCat; | 169 | CategorySelect *cmbCat; |
164 | QLabel *labCat; | 170 | QLabel *labCat; |
diff --git a/core/pim/addressbook/ocontactfields.cpp b/core/pim/addressbook/ocontactfields.cpp index ffb88e8..831a596 100644 --- a/core/pim/addressbook/ocontactfields.cpp +++ b/core/pim/addressbook/ocontactfields.cpp | |||
@@ -415,17 +415,17 @@ void OContactFields::loadFromRecord( const OContact &cnt ){ | |||
415 | 415 | ||
416 | 416 | ||
417 | qDebug("effective fieldOrder in loadFromRecord >%s<",fieldOrder.latin1()); | 417 | qDebug("effective fieldOrder in loadFromRecord >%s<",fieldOrder.latin1()); |
418 | } | 418 | } |
419 | 419 | ||
420 | void OContactFields::setFieldOrder( int num, int index ){ | 420 | void OContactFields::setFieldOrder( int num, int index ){ |
421 | qDebug("qcontactfields setfieldorder pos %i -> %i",num,index); | 421 | qDebug("qcontactfields setfieldorder pos %i -> %i",num,index); |
422 | 422 | ||
423 | fieldOrder[num] = QString::number( index )[0]; | 423 | fieldOrder[num] = QString::number( index, 16 )[0]; |
424 | 424 | ||
425 | // We will store this new fieldorder globally to | 425 | // We will store this new fieldorder globally to |
426 | // remember it for contacts which have none | 426 | // remember it for contacts which have none |
427 | globalFieldOrder = fieldOrder; | 427 | globalFieldOrder = fieldOrder; |
428 | changedFieldOrder = true; | 428 | changedFieldOrder = true; |
429 | 429 | ||
430 | qDebug("fieldOrder >%s<",fieldOrder.latin1()); | 430 | qDebug("fieldOrder >%s<",fieldOrder.latin1()); |
431 | } | 431 | } |
@@ -436,17 +436,17 @@ int OContactFields::getFieldOrder( int num, int defIndex ){ | |||
436 | 436 | ||
437 | // Get index of combo as char.. | 437 | // Get index of combo as char.. |
438 | QChar poschar = fieldOrder[num]; | 438 | QChar poschar = fieldOrder[num]; |
439 | 439 | ||
440 | bool ok; | 440 | bool ok; |
441 | int ret = 0; | 441 | int ret = 0; |
442 | // Convert char to number.. | 442 | // Convert char to number.. |
443 | if ( !( poschar == QChar::null ) ) | 443 | if ( !( poschar == QChar::null ) ) |
444 | ret = QString( poschar ).toInt(&ok, 10); | 444 | ret = QString( poschar ).toInt(&ok, 16); |
445 | else | 445 | else |
446 | ok = false; | 446 | ok = false; |
447 | 447 | ||
448 | // Return default value if index for | 448 | // Return default value if index for |
449 | // num was not set or if anything else happened.. | 449 | // num was not set or if anything else happened.. |
450 | if ( !ok ) ret = defIndex; | 450 | if ( !ok ) ret = defIndex; |
451 | 451 | ||
452 | qDebug("returning >%i<",ret); | 452 | qDebug("returning >%i<",ret); |
diff --git a/core/pim/addressbook/version.h b/core/pim/addressbook/version.h index 3c1e5ee..3becfdc 100644 --- a/core/pim/addressbook/version.h +++ b/core/pim/addressbook/version.h | |||
@@ -1,10 +1,10 @@ | |||
1 | #ifndef _VERSION_H_ | 1 | #ifndef _VERSION_H_ |
2 | #define _VERSION_H_ | 2 | #define _VERSION_H_ |
3 | 3 | ||
4 | #define MAINVERSION "0" | 4 | #define MAINVERSION "0" |
5 | #define SUBVERSION "2" | 5 | #define SUBVERSION "2" |
6 | #define PATCHVERSION "1" | 6 | #define PATCHVERSION "2" |
7 | 7 | ||
8 | #define APPNAME "OPIE_ADDRESSBOOK" | 8 | #define APPNAME "OPIE_ADDRESSBOOK" |
9 | 9 | ||
10 | #endif | 10 | #endif |