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 /core/pim | |
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 | 103 | ||||
-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, 80 insertions, 58 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 | |||
@@ -20,5 +20,2 @@ 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 | ||
@@ -28,4 +25,2 @@ Bugs but not in addressbook: | |||
28 | 25 | ||
29 | - Exporting and reimporting of Jobtitle was reported to fail (Could not reproduce this ! (se)) | ||
30 | |||
31 | 26 | ||
@@ -33,5 +28,2 @@ 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 |
@@ -44,6 +36,2 @@ Important: | |||
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) |
@@ -56,2 +44,8 @@ Less important: | |||
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 | ||
@@ -119 +113,4 @@ Fixed/Ready: | |||
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 | |||
@@ -164,2 +164,3 @@ void ContactEditor::init() { | |||
164 | 164 | ||
165 | // Chooser 1 | ||
165 | cmbChooserField1 = new QComboBox( FALSE, container ); | 166 | cmbChooserField1 = new QComboBox( FALSE, container ); |
@@ -167,5 +168,11 @@ void ContactEditor::init() { | |||
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 ); |
@@ -173,5 +180,11 @@ void ContactEditor::init() { | |||
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 ); |
@@ -179,4 +192,9 @@ void ContactEditor::init() { | |||
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 | ||
@@ -459,2 +477,3 @@ void ContactEditor::init() { | |||
459 | 477 | ||
478 | // Chooser 4 | ||
460 | cmbChooserField4 = new QComboBox( FALSE, container ); | 479 | cmbChooserField4 = new QComboBox( FALSE, container ); |
@@ -462,4 +481,9 @@ void ContactEditor::init() { | |||
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 | ||
@@ -702,3 +726,3 @@ void ContactEditor::populateDefaultEmailCmb(){ | |||
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]; |
@@ -713,3 +737,3 @@ bool ContactEditor::cmbChooserChange( int index, QLineEdit *inputWid, int widget | |||
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 ) && |
@@ -720,23 +744,19 @@ bool ContactEditor::cmbChooserChange( int index, QLineEdit *inputWid, int widget | |||
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 | 753 | ||
734 | connect( cmbDefaultEmail,SIGNAL( activated(int) ), | 754 | inputStack -> addWidget( cmbo, Combo ); |
735 | SLOT( defaultEmailChanged(int) ) ); | 755 | inputStack -> raiseWidget( Combo ); |
736 | |||
737 | cmbDefaultEmail->clear(); | ||
738 | cmbDefaultEmail->insertStringList( emails ); | ||
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 | ||
@@ -751,4 +771,9 @@ bool ContactEditor::cmbChooserChange( int index, QLineEdit *inputWid, int widget | |||
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 | ||
@@ -804,3 +829,3 @@ void ContactEditor::chooserChange( const QString &textChanged, int index, | |||
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", |
@@ -814,8 +839,2 @@ void ContactEditor::chooserChange( const QString &textChanged, int index, | |||
814 | 839 | ||
815 | }else if (defaultEmailChooserPosition == widgetPos){ | ||
816 | qDebug("cmbDefaultEmail->hide()"); | ||
817 | |||
818 | if (cmbDefaultEmail) cmbDefaultEmail->hide(); | ||
819 | widgetPos=-1; | ||
820 | |||
821 | }else if (type == "Emails"){ | 840 | }else if (type == "Emails"){ |
@@ -921,3 +940,3 @@ 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 | ||
@@ -933,3 +952,3 @@ void ContactEditor::slotCmbChooser2Change( int index ) { | |||
933 | 952 | ||
934 | if ( !cmbChooserChange( cmbChooserField2->currentItem(), txtChooserField2, 2) ){ | 953 | if ( !cmbChooserChange( cmbChooserField2->currentItem(), m_widgetStack2, 2) ){ |
935 | 954 | ||
@@ -944,3 +963,3 @@ void ContactEditor::slotCmbChooser3Change( int index ) { | |||
944 | 963 | ||
945 | if ( !cmbChooserChange( cmbChooserField3->currentItem(), txtChooserField3, 3) ){ | 964 | if ( !cmbChooserChange( cmbChooserField3->currentItem(), m_widgetStack3, 3) ){ |
946 | 965 | ||
@@ -955,3 +974,3 @@ void ContactEditor::slotCmbChooser4Change( int index ) { | |||
955 | 974 | ||
956 | if ( !cmbChooserChange( cmbChooserField4->currentItem(), txtChooserField4, 4) ){ | 975 | if ( !cmbChooserChange( cmbChooserField4->currentItem(), m_widgetStack4, 4) ){ |
957 | 976 | ||
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 | |||
@@ -31,2 +31,3 @@ | |||
31 | #include <qstringlist.h> | 31 | #include <qstringlist.h> |
32 | #include <qwidgetstack.h> | ||
32 | 33 | ||
@@ -108,2 +109,3 @@ class ContactEditor : public QDialog { | |||
108 | private: | 109 | private: |
110 | enum StackWidgets { TextField = 1, Combo }; | ||
109 | int defaultEmailChooserPosition; | 111 | int defaultEmailChooserPosition; |
@@ -111,3 +113,3 @@ class ContactEditor : public QDialog { | |||
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; |
@@ -156,2 +158,6 @@ class ContactEditor : public QDialog { | |||
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; |
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 | |||
@@ -422,3 +422,3 @@ void OContactFields::setFieldOrder( int num, int index ){ | |||
422 | 422 | ||
423 | fieldOrder[num] = QString::number( index )[0]; | 423 | fieldOrder[num] = QString::number( index, 16 )[0]; |
424 | 424 | ||
@@ -443,3 +443,3 @@ int OContactFields::getFieldOrder( int num, int defIndex ){ | |||
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 |
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 | |||
@@ -5,3 +5,3 @@ | |||
5 | #define SUBVERSION "2" | 5 | #define SUBVERSION "2" |
6 | #define PATCHVERSION "1" | 6 | #define PATCHVERSION "2" |
7 | 7 | ||