author | eilers <eilers> | 2002-10-14 09:26:18 (UTC) |
---|---|---|
committer | eilers <eilers> | 2002-10-14 09:26:18 (UTC) |
commit | 0bccef01b70fec98e744fab286f5ea443287cdad (patch) (unidiff) | |
tree | 3a602e633dcbe81eca22f490402d39467c4eb32a | |
parent | 59d6018e53537e15d27cd0174adefba2ec8b8f6e (diff) | |
download | opie-0bccef01b70fec98e744fab286f5ea443287cdad.zip opie-0bccef01b70fec98e744fab286f5ea443287cdad.tar.gz opie-0bccef01b70fec98e744fab286f5ea443287cdad.tar.bz2 |
Last patch for language bug. I am not really happy with it, but it should work now.
Please use the current release of libopie with this application. Otherwise the
app will fail !
-rw-r--r-- | core/pim/addressbook/addressbook.cpp | 3 | ||||
-rw-r--r-- | core/pim/addressbook/contacteditor.cpp | 88 |
2 files changed, 53 insertions, 38 deletions
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp index 472b13e..2eb9ddf 100644 --- a/core/pim/addressbook/addressbook.cpp +++ b/core/pim/addressbook/addressbook.cpp | |||
@@ -10,49 +10,49 @@ | |||
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** OContact info@trolltech.com if any conditions of this licensing are | 16 | ** OContact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #define QTOPIA_INTERNAL_FD | 21 | #define QTOPIA_INTERNAL_FD |
22 | 22 | ||
23 | #include "contacteditor.h" | 23 | #include "contacteditor.h" |
24 | #include "ablabel.h" | 24 | #include "ablabel.h" |
25 | #include "abtable.h" | 25 | #include "abtable.h" |
26 | #include "addresssettings.h" | 26 | #include "addresssettings.h" |
27 | #include "addressbook.h" | 27 | #include "addressbook.h" |
28 | 28 | ||
29 | 29 | ||
30 | #include <opie/ofileselector.h> | 30 | #include <opie/ofileselector.h> |
31 | #include <opie/ofiledialog.h> | 31 | #include <opie/ofiledialog.h> |
32 | #include <qpe/qpeapplication.h> | 32 | #include <qpe/qpeapplication.h> |
33 | #include <qpe/config.h> | 33 | #include <qpe/config.h> |
34 | #include <qpe/contact.h> | 34 | #include <opie/ocontact.h> |
35 | 35 | ||
36 | #ifndef MAKE_FOR_SHARP_ROM | 36 | #ifndef MAKE_FOR_SHARP_ROM |
37 | #include <qpe/finddialog.h> | 37 | #include <qpe/finddialog.h> |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | #include <qpe/global.h> | 40 | #include <qpe/global.h> |
41 | #include <qpe/resource.h> | 41 | #include <qpe/resource.h> |
42 | #include <qpe/ir.h> | 42 | #include <qpe/ir.h> |
43 | #include <qpe/qpemessagebox.h> | 43 | #include <qpe/qpemessagebox.h> |
44 | #include <qpe/qcopenvelope_qws.h> | 44 | #include <qpe/qcopenvelope_qws.h> |
45 | 45 | ||
46 | #include <qaction.h> | 46 | #include <qaction.h> |
47 | #include <qdialog.h> | 47 | #include <qdialog.h> |
48 | #include <qdir.h> | 48 | #include <qdir.h> |
49 | #include <qfile.h> | 49 | #include <qfile.h> |
50 | #include <qimage.h> | 50 | #include <qimage.h> |
51 | #include <qlayout.h> | 51 | #include <qlayout.h> |
52 | #include <qpe/qpemenubar.h> | 52 | #include <qpe/qpemenubar.h> |
53 | #include <qmessagebox.h> | 53 | #include <qmessagebox.h> |
54 | #include <qpixmap.h> | 54 | #include <qpixmap.h> |
55 | #include <qpopupmenu.h> | 55 | #include <qpopupmenu.h> |
56 | #include <qpe/qpetoolbar.h> | 56 | #include <qpe/qpetoolbar.h> |
57 | #include <qstringlist.h> | 57 | #include <qstringlist.h> |
58 | #include <qtoolbutton.h> | 58 | #include <qtoolbutton.h> |
@@ -836,48 +836,49 @@ void AddressbookWindow::initFields() | |||
836 | 836 | ||
837 | if ( version >= ADDRESSVERSION ) { | 837 | if ( version >= ADDRESSVERSION ) { |
838 | 838 | ||
839 | cfg.setGroup( "ImportantCategory" ); | 839 | cfg.setGroup( "ImportantCategory" ); |
840 | 840 | ||
841 | zn = cfg.readEntry( "Category" + QString::number(i), QString::null ); | 841 | zn = cfg.readEntry( "Category" + QString::number(i), QString::null ); |
842 | while ( !zn.isNull() ) { | 842 | while ( !zn.isNull() ) { |
843 | if ( zn.contains( "Work" ) || zn.contains( "Mb" ) ) { | 843 | if ( zn.contains( "Work" ) || zn.contains( "Mb" ) ) { |
844 | slOrderedFields.clear(); | 844 | slOrderedFields.clear(); |
845 | break; | 845 | break; |
846 | } | 846 | } |
847 | slOrderedFields.append( zn ); | 847 | slOrderedFields.append( zn ); |
848 | zn = cfg.readEntry( "Category" + QString::number(++i), QString::null ); | 848 | zn = cfg.readEntry( "Category" + QString::number(++i), QString::null ); |
849 | } | 849 | } |
850 | cfg.setGroup( "Font" ); | 850 | cfg.setGroup( "Font" ); |
851 | startFontSize = cfg.readNumEntry( "fontSize", 1 ); | 851 | startFontSize = cfg.readNumEntry( "fontSize", 1 ); |
852 | 852 | ||
853 | 853 | ||
854 | } else { | 854 | } else { |
855 | QString str; | 855 | QString str; |
856 | str = getenv("HOME"); | 856 | str = getenv("HOME"); |
857 | str += "/Settings/AddressBook.conf"; | 857 | str += "/Settings/AddressBook.conf"; |
858 | QFile::remove( str ); | 858 | QFile::remove( str ); |
859 | } | 859 | } |
860 | |||
860 | if ( slOrderedFields.count() > 0 ) { | 861 | if ( slOrderedFields.count() > 0 ) { |
861 | for( QStringList::ConstIterator it = slOrderedFields.begin(); | 862 | for( QStringList::ConstIterator it = slOrderedFields.begin(); |
862 | it != slOrderedFields.end(); ++it ) { | 863 | it != slOrderedFields.end(); ++it ) { |
863 | QValueList<int>::ConstIterator itVl; | 864 | QValueList<int>::ConstIterator itVl; |
864 | QStringList::ConstIterator itVis; | 865 | QStringList::ConstIterator itVis; |
865 | itVl = allFields.begin(); | 866 | itVl = allFields.begin(); |
866 | for ( itVis = visibleFields.begin(); | 867 | for ( itVis = visibleFields.begin(); |
867 | itVis != visibleFields.end() && itVl != allFields.end(); | 868 | itVis != visibleFields.end() && itVl != allFields.end(); |
868 | ++itVis, ++itVl ) { | 869 | ++itVis, ++itVl ) { |
869 | if ( *it == *itVis && itVl != allFields.end() ) { | 870 | if ( *it == *itVis && itVl != allFields.end() ) { |
870 | orderedFields.append( *itVl ); | 871 | orderedFields.append( *itVl ); |
871 | } | 872 | } |
872 | } | 873 | } |
873 | } | 874 | } |
874 | } else { | 875 | } else { |
875 | QValueList<int>::ConstIterator it; | 876 | QValueList<int>::ConstIterator it; |
876 | for ( it = allFields.begin(); it != allFields.end(); ++it ) | 877 | for ( it = allFields.begin(); it != allFields.end(); ++it ) |
877 | orderedFields.append( *it ); | 878 | orderedFields.append( *it ); |
878 | 879 | ||
879 | slOrderedFields = visibleFields; | 880 | slOrderedFields = visibleFields; |
880 | orderedFields.remove( Qtopia::AddressUid ); | 881 | orderedFields.remove( Qtopia::AddressUid ); |
881 | orderedFields.remove( Qtopia::Title ); | 882 | orderedFields.remove( Qtopia::Title ); |
882 | orderedFields.remove( Qtopia::Groups ); | 883 | orderedFields.remove( Qtopia::Groups ); |
883 | orderedFields.remove( Qtopia::AddressCategory ); | 884 | orderedFields.remove( Qtopia::AddressCategory ); |
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp index b01583f..bae3a2b 100644 --- a/core/pim/addressbook/contacteditor.cpp +++ b/core/pim/addressbook/contacteditor.cpp | |||
@@ -63,151 +63,165 @@ ContactEditor::ContactEditor( const OContact &entry, | |||
63 | init(); | 63 | init(); |
64 | initMap(); | 64 | initMap(); |
65 | setEntry( entry ); | 65 | setEntry( entry ); |
66 | qDebug("finish"); | 66 | qDebug("finish"); |
67 | } | 67 | } |
68 | 68 | ||
69 | ContactEditor::~ContactEditor() { | 69 | ContactEditor::~ContactEditor() { |
70 | } | 70 | } |
71 | 71 | ||
72 | void ContactEditor::init() { | 72 | void ContactEditor::init() { |
73 | 73 | ||
74 | useFullName = TRUE; | 74 | useFullName = TRUE; |
75 | 75 | ||
76 | int i = 0; | 76 | int i = 0; |
77 | /** SHut up and stop leaking | 77 | /** SHut up and stop leaking |
78 | slHomeAddress = new QStringList; | 78 | slHomeAddress = new QStringList; |
79 | slBusinessAddress = new QStringList; | 79 | slBusinessAddress = new QStringList; |
80 | slChooserNames = new QStringList; | 80 | slChooserNames = new QStringList; |
81 | slChooserValues = new QStringList; | 81 | slChooserValues = new QStringList; |
82 | 82 | ||
83 | slDynamicEntries = new QStringList; | 83 | slDynamicEntries = new QStringList; |
84 | */ | 84 | */ |
85 | //*slDynamicEntries = *slOrdered; | 85 | //*slDynamicEntries = *slOrdered; |
86 | 86 | ||
87 | QStringList trlChooserNames; | ||
88 | |||
87 | for (i = 0; i <= 6; i++) { | 89 | for (i = 0; i <= 6; i++) { |
88 | slHomeAddress.append( "" ); | 90 | slHomeAddress.append( "" ); |
89 | slBusinessAddress.append( "" ); | 91 | slBusinessAddress.append( "" ); |
90 | } | 92 | } |
91 | 93 | ||
92 | { | 94 | { |
93 | hasGender = FALSE; | 95 | hasGender = FALSE; |
94 | hasTitle = FALSE; | 96 | hasTitle = FALSE; |
95 | hasCompany = FALSE; | 97 | hasCompany = FALSE; |
96 | hasNotes = FALSE; | 98 | hasNotes = FALSE; |
97 | hasStreet = FALSE; | 99 | hasStreet = FALSE; |
98 | hasStreet2 = FALSE; | 100 | hasStreet2 = FALSE; |
99 | hasPOBox = FALSE; | 101 | hasPOBox = FALSE; |
100 | hasCity = FALSE; | 102 | hasCity = FALSE; |
101 | hasState = FALSE; | 103 | hasState = FALSE; |
102 | hasZip = FALSE; | 104 | hasZip = FALSE; |
103 | hasCountry = FALSE; | 105 | hasCountry = FALSE; |
104 | 106 | ||
105 | QStringList::ConstIterator it = slOrdered.begin(); | 107 | QStringList::ConstIterator it = slOrdered.begin(); |
108 | |||
106 | for ( i = 0; it != slOrdered.end(); i++, ++it ) { | 109 | for ( i = 0; it != slOrdered.end(); i++, ++it ) { |
107 | 110 | ||
108 | if ( (*it) == "Business Fax" ) { | 111 | if ( (*it) == "Business Fax" ) { |
109 | slChooserNames.append( tr( "Business Fax" ) ); | 112 | trlChooserNames.append( tr( "Business Fax" ) ); |
113 | slChooserNames.append( *it ); | ||
110 | slChooserValues.append("" ); | 114 | slChooserValues.append("" ); |
111 | //slDynamicEntries->remove( it ); | 115 | //slDynamicEntries->remove( it ); |
112 | continue; | 116 | continue; |
113 | } | 117 | } |
114 | 118 | ||
115 | if ( (*it) == "Home Fax" ) { | 119 | if ( (*it) == "Home Fax" ) { |
116 | slChooserNames.append( tr( "Home Fax" ) ); | 120 | trlChooserNames.append( tr( "Home Fax" ) ); |
121 | slChooserNames.append( *it ); | ||
117 | slChooserValues.append("" ); | 122 | slChooserValues.append("" ); |
118 | //slDynamicEntries->remove( it ); | 123 | //slDynamicEntries->remove( it ); |
119 | continue; | 124 | continue; |
120 | } | 125 | } |
121 | 126 | ||
122 | 127 | ||
123 | if ( (*it) == "Business Phone" ) { | 128 | if ( (*it) == "Business Phone" ) { |
124 | slChooserNames.append( tr( "Business Phone" ) ); | 129 | trlChooserNames.append( tr( "Business Phone" ) ); |
130 | slChooserNames.append( *it ); | ||
125 | slChooserValues.append( "" ); | 131 | slChooserValues.append( "" ); |
126 | //slDynamicEntries->remove( it ); | 132 | //slDynamicEntries->remove( it ); |
127 | continue; | 133 | continue; |
128 | } | 134 | } |
129 | 135 | ||
130 | if ( (*it) == "Home Phone" ) { | 136 | if ( (*it) == "Home Phone" ) { |
131 | slChooserNames.append( tr( "Home Phone" ) ); | 137 | trlChooserNames.append( tr( "Home Phone" ) ); |
138 | slChooserNames.append( *it ); | ||
132 | slChooserValues.append( "" ); | 139 | slChooserValues.append( "" ); |
133 | //slDynamicEntries->remove( it ); | 140 | //slDynamicEntries->remove( it ); |
134 | continue; | 141 | continue; |
135 | } | 142 | } |
136 | 143 | ||
137 | /* | 144 | /* |
138 | if ( (*it).right( 2 ) == tr( "IM" ) ) { | 145 | if ( (*it).right( 2 ) == tr( "IM" ) ) { |
139 | slChooserNames.append( *it ); | 146 | slChooserNames.append( *it ); |
140 | slChooserValues.append( "" ); | 147 | slChooserValues.append( "" ); |
141 | //slDynamicEntries->remove( it ); | 148 | //slDynamicEntries->remove( it ); |
142 | continue; | 149 | continue; |
143 | } */ | 150 | } */ |
144 | 151 | ||
145 | if ( (*it) == "Business Mobile" ) { | 152 | if ( (*it) == "Business Mobile" ) { |
146 | slChooserNames.append( tr( "Business Mobile" ) ); | 153 | trlChooserNames.append( tr( "Business Mobile" ) ); |
154 | slChooserNames.append( *it ); | ||
147 | slChooserValues.append( "" ); | 155 | slChooserValues.append( "" ); |
148 | //slDynamicEntries->remove( it ); | 156 | //slDynamicEntries->remove( it ); |
149 | continue; | 157 | continue; |
150 | } | 158 | } |
151 | 159 | ||
152 | if ( (*it) == "Home Mobile" ) { | 160 | if ( (*it) == "Home Mobile" ) { |
153 | slChooserNames.append( tr( "Home Mobile" ) ); | 161 | trlChooserNames.append( tr( "Home Mobile" ) ); |
162 | slChooserNames.append( *it ); | ||
154 | slChooserValues.append( "" ); | 163 | slChooserValues.append( "" ); |
155 | //slDynamicEntries->remove( it ); | 164 | //slDynamicEntries->remove( it ); |
156 | continue; | 165 | continue; |
157 | } | 166 | } |
158 | 167 | ||
159 | 168 | ||
160 | if ( (*it) == "Business WebPage" ) { | 169 | if ( (*it) == "Business WebPage" ) { |
161 | slChooserNames.append( tr( "Business WebPage" ) ); | 170 | trlChooserNames.append( tr( "Business WebPage" ) ); |
171 | slChooserNames.append( *it ); | ||
162 | slChooserValues.append( "" ); | 172 | slChooserValues.append( "" ); |
163 | //slDynamicEntries->remove( it ); | 173 | //slDynamicEntries->remove( it ); |
164 | continue; | 174 | continue; |
165 | } | 175 | } |
166 | 176 | ||
167 | if ( (*it) == "Home Web Page" ) { | 177 | if ( (*it) == "Home Web Page" ) { |
168 | slChooserNames.append( tr( "Home Web Page" ) ); | 178 | trlChooserNames.append( tr( "Home Web Page" ) ); |
179 | slChooserNames.append( *it ); | ||
169 | slChooserValues.append( "" ); | 180 | slChooserValues.append( "" ); |
170 | //slDynamicEntries->remove( it ); | 181 | //slDynamicEntries->remove( it ); |
171 | continue; | 182 | continue; |
172 | } | 183 | } |
173 | 184 | ||
174 | if ( (*it) == "Business Pager" ) { | 185 | if ( (*it) == "Business Pager" ) { |
175 | slChooserNames.append( tr( "Business Pager" ) ); | 186 | trlChooserNames.append( tr( "Business Pager" ) ); |
187 | slChooserNames.append( *it ); | ||
176 | slChooserValues.append( "" ); | 188 | slChooserValues.append( "" ); |
177 | //slDynamicEntries->remove( it ); | 189 | //slDynamicEntries->remove( it ); |
178 | continue; | 190 | continue; |
179 | } | 191 | } |
180 | 192 | ||
181 | if ( *it == "Default Email" ) { | 193 | if ( *it == "Default Email" ) { |
182 | slChooserNames.append( tr( "Default Email" ) ); | 194 | trlChooserNames.append( tr( "Default Email" ) ); |
195 | slChooserNames.append( *it ); | ||
183 | slChooserValues.append( "" ); | 196 | slChooserValues.append( "" ); |
184 | //slDynamicEntries->remove( it ); | 197 | //slDynamicEntries->remove( it ); |
185 | continue; | 198 | continue; |
186 | } | 199 | } |
187 | 200 | ||
188 | if ( *it == "Emails" ) { | 201 | if ( *it == "Emails" ) { |
189 | slChooserNames.append( tr( "Emails" ) ); | 202 | trlChooserNames.append( tr( "Emails" ) ); |
203 | slChooserNames.append( *it ); | ||
190 | slChooserValues.append( "" ); | 204 | slChooserValues.append( "" ); |
191 | //slDynamicEntries->remove( it ); | 205 | //slDynamicEntries->remove( it ); |
192 | continue; | 206 | continue; |
193 | } | 207 | } |
194 | 208 | ||
195 | if ( *it == "Name Title" || *it == "First Name" || *it == "Middle Name" || *it == "Last Name" || *it == "File As" || *it == "Default Email" || *it == "Emails" || *it == "Groups" ) | 209 | 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; | 210 | continue; |
197 | 211 | ||
198 | if ( *it == "Name Title" ) { | 212 | if ( *it == "Name Title" ) { |
199 | //slDynamicEntries->remove( it ); | 213 | //slDynamicEntries->remove( it ); |
200 | continue; | 214 | continue; |
201 | } | 215 | } |
202 | 216 | ||
203 | if ( *it == "First Name" ) { | 217 | if ( *it == "First Name" ) { |
204 | //slDynamicEntries->remove( it ); | 218 | //slDynamicEntries->remove( it ); |
205 | continue; | 219 | continue; |
206 | } | 220 | } |
207 | 221 | ||
208 | if ( *it == "Middle Name" ) { | 222 | if ( *it == "Middle Name" ) { |
209 | //slDynamicEntries->remove( it ); | 223 | //slDynamicEntries->remove( it ); |
210 | continue; | 224 | continue; |
211 | } | 225 | } |
212 | 226 | ||
213 | if ( *it == "Last Name" ) { | 227 | if ( *it == "Last Name" ) { |
@@ -728,52 +742,52 @@ void ContactEditor::init() { | |||
728 | l = new QLabel( tr("First Name"), dlgName ); | 742 | l = new QLabel( tr("First Name"), dlgName ); |
729 | gl->addWidget( l, 0, 0 ); | 743 | gl->addWidget( l, 0, 0 ); |
730 | txtFirstName = new QLineEdit( dlgName ); | 744 | txtFirstName = new QLineEdit( dlgName ); |
731 | gl->addWidget( txtFirstName, 0, 1 ); | 745 | gl->addWidget( txtFirstName, 0, 1 ); |
732 | 746 | ||
733 | l = new QLabel( tr("Middle Name"), dlgName ); | 747 | l = new QLabel( tr("Middle Name"), dlgName ); |
734 | gl->addWidget( l, 1, 0 ); | 748 | gl->addWidget( l, 1, 0 ); |
735 | txtMiddleName = new QLineEdit( dlgName ); | 749 | txtMiddleName = new QLineEdit( dlgName ); |
736 | gl->addWidget( txtMiddleName, 1, 1 ); | 750 | gl->addWidget( txtMiddleName, 1, 1 ); |
737 | 751 | ||
738 | l = new QLabel( tr("Last Name"), dlgName ); | 752 | l = new QLabel( tr("Last Name"), dlgName ); |
739 | gl->addWidget( l, 2, 0 ); | 753 | gl->addWidget( l, 2, 0 ); |
740 | txtLastName = new QLineEdit( dlgName ); | 754 | txtLastName = new QLineEdit( dlgName ); |
741 | gl->addWidget( txtLastName, 2, 1 ); | 755 | gl->addWidget( txtLastName, 2, 1 ); |
742 | 756 | ||
743 | l = new QLabel( tr("Suffix"), dlgName ); | 757 | l = new QLabel( tr("Suffix"), dlgName ); |
744 | gl->addWidget( l, 3, 0 ); | 758 | gl->addWidget( l, 3, 0 ); |
745 | txtSuffix = new QLineEdit( dlgName ); | 759 | txtSuffix = new QLineEdit( dlgName ); |
746 | gl->addWidget( txtSuffix, 3, 1 ); | 760 | gl->addWidget( txtSuffix, 3, 1 ); |
747 | space = new QSpacerItem(1,1, | 761 | space = new QSpacerItem(1,1, |
748 | QSizePolicy::Maximum, | 762 | QSizePolicy::Maximum, |
749 | QSizePolicy::MinimumExpanding ); | 763 | QSizePolicy::MinimumExpanding ); |
750 | gl->addItem( space, 4, 0 ); | 764 | gl->addItem( space, 4, 0 ); |
751 | 765 | ||
752 | cmbChooserField1->insertStringList( slChooserNames ); | 766 | cmbChooserField1->insertStringList( trlChooserNames ); |
753 | cmbChooserField2->insertStringList( slChooserNames ); | 767 | cmbChooserField2->insertStringList( trlChooserNames ); |
754 | cmbChooserField3->insertStringList( slChooserNames ); | 768 | cmbChooserField3->insertStringList( trlChooserNames ); |
755 | cmbChooserField4->insertStringList( slChooserNames ); | 769 | cmbChooserField4->insertStringList( trlChooserNames ); |
756 | 770 | ||
757 | cmbChooserField1->setCurrentItem( 0 ); | 771 | cmbChooserField1->setCurrentItem( 0 ); |
758 | cmbChooserField2->setCurrentItem( 1 ); | 772 | cmbChooserField2->setCurrentItem( 1 ); |
759 | cmbChooserField3->setCurrentItem( 2 ); | 773 | cmbChooserField3->setCurrentItem( 2 ); |
760 | 774 | ||
761 | connect( btnFullName, SIGNAL(clicked()), this, SLOT(slotName()) ); | 775 | connect( btnFullName, SIGNAL(clicked()), this, SLOT(slotName()) ); |
762 | 776 | ||
763 | connect( txtFullName, SIGNAL(textChanged(const QString &)), this, SLOT(slotFullNameChange(const QString &)) ); | 777 | connect( txtFullName, SIGNAL(textChanged(const QString &)), this, SLOT(slotFullNameChange(const QString &)) ); |
764 | 778 | ||
765 | connect( txtChooserField1, SIGNAL(textChanged(const QString &)), | 779 | connect( txtChooserField1, SIGNAL(textChanged(const QString &)), |
766 | this, SLOT(slotChooser1Change(const QString &)) ); | 780 | this, SLOT(slotChooser1Change(const QString &)) ); |
767 | connect( txtChooserField2, SIGNAL(textChanged(const QString &)), | 781 | connect( txtChooserField2, SIGNAL(textChanged(const QString &)), |
768 | this, SLOT(slotChooser2Change(const QString &)) ); | 782 | this, SLOT(slotChooser2Change(const QString &)) ); |
769 | connect( txtChooserField3, SIGNAL(textChanged(const QString &)), | 783 | connect( txtChooserField3, SIGNAL(textChanged(const QString &)), |
770 | this, SLOT(slotChooser3Change(const QString &)) ); | 784 | this, SLOT(slotChooser3Change(const QString &)) ); |
771 | connect( txtChooserField4, SIGNAL(textChanged(const QString &)), | 785 | connect( txtChooserField4, SIGNAL(textChanged(const QString &)), |
772 | this, SLOT(slotChooser4Change(const QString &)) ); | 786 | this, SLOT(slotChooser4Change(const QString &)) ); |
773 | connect( txtAddress, SIGNAL(textChanged(const QString &)), | 787 | connect( txtAddress, SIGNAL(textChanged(const QString &)), |
774 | this, SLOT(slotAddressChange(const QString &)) ); | 788 | this, SLOT(slotAddressChange(const QString &)) ); |
775 | //connect( txtAddress2, SIGNAL(textChanged(const QString &)), this, SLOT(slotAddress2Change(const QString &)) ); | 789 | //connect( txtAddress2, SIGNAL(textChanged(const QString &)), this, SLOT(slotAddress2Change(const QString &)) ); |
776 | //connect( txtPOBox, SIGNAL(textChanged(const QString &)), this, SLOT(slotPOBoxChange(const QString &)) ); | 790 | //connect( txtPOBox, SIGNAL(textChanged(const QString &)), this, SLOT(slotPOBoxChange(const QString &)) ); |
777 | connect( txtCity, SIGNAL(textChanged(const QString &)), | 791 | connect( txtCity, SIGNAL(textChanged(const QString &)), |
778 | this, SLOT(slotCityChange(const QString &)) ); | 792 | this, SLOT(slotCityChange(const QString &)) ); |
779 | connect( txtState, SIGNAL(textChanged(const QString &)), | 793 | connect( txtState, SIGNAL(textChanged(const QString &)), |
@@ -1339,79 +1353,79 @@ void ContactEditor::setEntry( const OContact &entry ) { | |||
1339 | */ | 1353 | */ |
1340 | if (hasCity) { | 1354 | if (hasCity) { |
1341 | slHomeAddress[3] = ent.homeCity(); | 1355 | slHomeAddress[3] = ent.homeCity(); |
1342 | slBusinessAddress[3] = ent.businessCity(); | 1356 | slBusinessAddress[3] = ent.businessCity(); |
1343 | } | 1357 | } |
1344 | 1358 | ||
1345 | if (hasState) { | 1359 | if (hasState) { |
1346 | slHomeAddress[4] = ent.homeState(); | 1360 | slHomeAddress[4] = ent.homeState(); |
1347 | slBusinessAddress[4] = ent.businessState(); | 1361 | slBusinessAddress[4] = ent.businessState(); |
1348 | } | 1362 | } |
1349 | 1363 | ||
1350 | if (hasZip) { | 1364 | if (hasZip) { |
1351 | slHomeAddress[5] = ent.homeZip(); | 1365 | slHomeAddress[5] = ent.homeZip(); |
1352 | slBusinessAddress[5] = ent.businessZip(); | 1366 | slBusinessAddress[5] = ent.businessZip(); |
1353 | } | 1367 | } |
1354 | 1368 | ||
1355 | if (hasCountry) { | 1369 | if (hasCountry) { |
1356 | slHomeAddress[6] = ent.homeCountry(); | 1370 | slHomeAddress[6] = ent.homeCountry(); |
1357 | slBusinessAddress[6] = ent.businessCountry(); | 1371 | slBusinessAddress[6] = ent.businessCountry(); |
1358 | } | 1372 | } |
1359 | 1373 | ||
1360 | QStringList::ConstIterator it; | 1374 | QStringList::ConstIterator it; |
1361 | QListIterator<QLineEdit> itLE( listValue ); | 1375 | QListIterator<QLineEdit> itLE( listValue ); |
1362 | for ( it = slDynamicEntries.begin(); it != slDynamicEntries.end(); ++it, ++itLE) { | 1376 | for ( it = slDynamicEntries.begin(); it != slDynamicEntries.end(); ++it, ++itLE) { |
1363 | if ( *it =="Department" ) | 1377 | if ( *it == tr( "Department" ) ) |
1364 | (*itLE)->setText( ent.department() ); | 1378 | (*itLE)->setText( ent.department() ); |
1365 | 1379 | ||
1366 | if ( *it == "Company" ) | 1380 | if ( *it == tr( "Company" ) ) |
1367 | (*itLE)->setText( ent.company() ); | 1381 | (*itLE)->setText( ent.company() ); |
1368 | 1382 | ||
1369 | if ( *it == "Office" ) | 1383 | if ( *it == tr( "Office" ) ) |
1370 | (*itLE)->setText( ent.office() ); | 1384 | (*itLE)->setText( ent.office() ); |
1371 | 1385 | ||
1372 | if ( *it == "Profession" ) | 1386 | if ( *it == tr( "Profession" ) ) |
1373 | (*itLE)->setText( ent.profession() ); | 1387 | (*itLE)->setText( ent.profession() ); |
1374 | 1388 | ||
1375 | if ( *it == "Assistant" ) | 1389 | if ( *it == tr( "Assistant" ) ) |
1376 | (*itLE)->setText( ent.assistant() ); | 1390 | (*itLE)->setText( ent.assistant() ); |
1377 | 1391 | ||
1378 | if ( *it == "Manager" ) | 1392 | if ( *it == tr( "Manager" ) ) |
1379 | (*itLE)->setText( ent.manager() ); | 1393 | (*itLE)->setText( ent.manager() ); |
1380 | 1394 | ||
1381 | if ( *it == "Spouse" ) | 1395 | if ( *it == tr( "Spouse" ) ) |
1382 | (*itLE)->setText( ent.spouse() ); | 1396 | (*itLE)->setText( ent.spouse() ); |
1383 | 1397 | ||
1384 | if ( *it == "Birthday" ) | 1398 | if ( *it == tr( "Birthday" ) ) |
1385 | (*itLE)->setText( ent.birthday() ); | 1399 | (*itLE)->setText( ent.birthday() ); |
1386 | 1400 | ||
1387 | if ( *it == "Anniversary" ) | 1401 | if ( *it == tr( "Anniversary" ) ) |
1388 | (*itLE)->setText( ent.anniversary() ); | 1402 | (*itLE)->setText( ent.anniversary() ); |
1389 | 1403 | ||
1390 | if ( *it == "Nickname" ) | 1404 | if ( *it == tr( "Nickname" ) ) |
1391 | (*itLE)->setText( ent.nickname() ); | 1405 | (*itLE)->setText( ent.nickname() ); |
1392 | 1406 | ||
1393 | if ( *it == "Children" ) | 1407 | if ( *it == tr( "Children" ) ) |
1394 | (*itLE)->setText( ent.children() ); | 1408 | (*itLE)->setText( ent.children() ); |
1395 | 1409 | ||
1396 | } | 1410 | } |
1397 | 1411 | ||
1398 | QStringList::Iterator itV; | 1412 | QStringList::Iterator itV; |
1399 | for ( it = slChooserNames.begin(), itV = slChooserValues.begin(); it != slChooserNames.end(); ++it, ++itV ) { | 1413 | for ( it = slChooserNames.begin(), itV = slChooserValues.begin(); it != slChooserNames.end(); ++it, ++itV ) { |
1400 | 1414 | ||
1401 | if ( ( *it == "Business Phone") || ( *it == "Work Phone" ) ) | 1415 | if ( ( *it == "Business Phone") || ( *it == "Work Phone" ) ) |
1402 | *itV = ent.businessPhone(); | 1416 | *itV = ent.businessPhone(); |
1403 | /* | 1417 | /* |
1404 | if ( *it == "Business 2 Phone" ) | 1418 | if ( *it == "Business 2 Phone" ) |
1405 | *itV = ent.business2Phone(); | 1419 | *itV = ent.business2Phone(); |
1406 | */ | 1420 | */ |
1407 | if ( ( *it == "Business Fax") || ( *it == "Work Fax" ) ) | 1421 | if ( ( *it == "Business Fax") || ( *it == "Work Fax" ) ) |
1408 | *itV = ent.businessFax(); | 1422 | *itV = ent.businessFax(); |
1409 | 1423 | ||
1410 | if ( ( *it == "Business Mobile" ) || ( *it == "work Mobile" ) ) | 1424 | if ( ( *it == "Business Mobile" ) || ( *it == "work Mobile" ) ) |
1411 | *itV = ent.businessMobile(); | 1425 | *itV = ent.businessMobile(); |
1412 | /* | 1426 | /* |
1413 | if ( *it == "Company Phone" ) | 1427 | if ( *it == "Company Phone" ) |
1414 | *itV = ent.companyPhone(); | 1428 | *itV = ent.companyPhone(); |
1415 | */ | 1429 | */ |
1416 | if ( *it == "Default Email" ) | 1430 | if ( *it == "Default Email" ) |
1417 | *itV = ent.defaultEmail(); | 1431 | *itV = ent.defaultEmail(); |
@@ -1537,79 +1551,79 @@ void ContactEditor::saveEntry() { | |||
1537 | */ | 1551 | */ |
1538 | if (hasCity) { | 1552 | if (hasCity) { |
1539 | ent.setHomeCity( slHomeAddress[3] ); | 1553 | ent.setHomeCity( slHomeAddress[3] ); |
1540 | ent.setBusinessCity( slBusinessAddress[3] ); | 1554 | ent.setBusinessCity( slBusinessAddress[3] ); |
1541 | } | 1555 | } |
1542 | 1556 | ||
1543 | if (hasState) { | 1557 | if (hasState) { |
1544 | ent.setHomeState( slHomeAddress[4] ); | 1558 | ent.setHomeState( slHomeAddress[4] ); |
1545 | ent.setBusinessState( slBusinessAddress[4] ); | 1559 | ent.setBusinessState( slBusinessAddress[4] ); |
1546 | } | 1560 | } |
1547 | 1561 | ||
1548 | if (hasZip) { | 1562 | if (hasZip) { |
1549 | ent.setHomeZip( slHomeAddress[5] ); | 1563 | ent.setHomeZip( slHomeAddress[5] ); |
1550 | ent.setBusinessZip( slBusinessAddress[5] ); | 1564 | ent.setBusinessZip( slBusinessAddress[5] ); |
1551 | } | 1565 | } |
1552 | 1566 | ||
1553 | if (hasCountry) { | 1567 | if (hasCountry) { |
1554 | ent.setHomeCountry( slHomeAddress[6] ); | 1568 | ent.setHomeCountry( slHomeAddress[6] ); |
1555 | ent.setBusinessCountry( slBusinessAddress[6] ); | 1569 | ent.setBusinessCountry( slBusinessAddress[6] ); |
1556 | } | 1570 | } |
1557 | 1571 | ||
1558 | QStringList::ConstIterator it; | 1572 | QStringList::ConstIterator it; |
1559 | QListIterator<QLineEdit> itLE( listValue ); | 1573 | QListIterator<QLineEdit> itLE( listValue ); |
1560 | for ( it = slDynamicEntries.begin(); it != slDynamicEntries.end(); ++it, ++itLE) { | 1574 | for ( it = slDynamicEntries.begin(); it != slDynamicEntries.end(); ++it, ++itLE) { |
1561 | if ( *it == "Department" ) | 1575 | if ( *it == tr( "Department" ) ) |
1562 | ent.setDepartment( (*itLE)->text() ); | 1576 | ent.setDepartment( (*itLE)->text() ); |
1563 | 1577 | ||
1564 | if ( *it == "Company" ) | 1578 | if ( *it == tr( "Company" ) ) |
1565 | ent.setCompany( (*itLE)->text() ); | 1579 | ent.setCompany( (*itLE)->text() ); |
1566 | 1580 | ||
1567 | if ( *it == "Office" ) | 1581 | if ( *it == tr( "Office" ) ) |
1568 | ent.setOffice( (*itLE)->text() ); | 1582 | ent.setOffice( (*itLE)->text() ); |
1569 | 1583 | ||
1570 | if ( *it == "Profession" ) | 1584 | if ( *it == tr( "Profession" ) ) |
1571 | ent.setProfession( (*itLE)->text() ); | 1585 | ent.setProfession( (*itLE)->text() ); |
1572 | 1586 | ||
1573 | if ( *it == "Assistant" ) | 1587 | if ( *it == tr( "Assistant" ) ) |
1574 | ent.setAssistant( (*itLE)->text() ); | 1588 | ent.setAssistant( (*itLE)->text() ); |
1575 | 1589 | ||
1576 | if ( *it == "Manager" ) | 1590 | if ( *it == tr( "Manager" ) ) |
1577 | ent.setManager( (*itLE)->text() ); | 1591 | ent.setManager( (*itLE)->text() ); |
1578 | 1592 | ||
1579 | if ( *it == "Spouse" ) | 1593 | if ( *it == tr( "Spouse" ) ) |
1580 | ent.setSpouse( (*itLE)->text() ); | 1594 | ent.setSpouse( (*itLE)->text() ); |
1581 | 1595 | ||
1582 | if ( *it == "Birthday" ) | 1596 | if ( *it == tr( "Birthday" ) ) |
1583 | ent.setBirthday( (*itLE)->text() ); | 1597 | ent.setBirthday( (*itLE)->text() ); |
1584 | 1598 | ||
1585 | if ( *it == "Anniversary" ) | 1599 | if ( *it == tr( "Anniversary" ) ) |
1586 | ent.setAnniversary( (*itLE)->text() ); | 1600 | ent.setAnniversary( (*itLE)->text() ); |
1587 | 1601 | ||
1588 | if ( *it == "Nickname" ) | 1602 | if ( *it == tr( "Nickname" ) ) |
1589 | ent.setNickname( (*itLE)->text() ); | 1603 | ent.setNickname( (*itLE)->text() ); |
1590 | 1604 | ||
1591 | if ( *it == "Children" ) | 1605 | if ( *it == tr( "Children" ) ) |
1592 | ent.setChildren( (*itLE)->text() ); | 1606 | ent.setChildren( (*itLE)->text() ); |
1593 | 1607 | ||
1594 | } | 1608 | } |
1595 | 1609 | ||
1596 | QStringList::ConstIterator itV; | 1610 | QStringList::ConstIterator itV; |
1597 | for ( it = slChooserNames.begin(), itV = slChooserValues.begin(); it != slChooserNames.end(); ++it, ++itV ) { | 1611 | for ( it = slChooserNames.begin(), itV = slChooserValues.begin(); it != slChooserNames.end(); ++it, ++itV ) { |
1598 | 1612 | ||
1599 | if ( ( *it == "Business Phone" ) || ( *it == "Work Phone" ) ) | 1613 | if ( ( *it == "Business Phone" ) || ( *it == "Work Phone" ) ) |
1600 | ent.setBusinessPhone( *itV ); | 1614 | ent.setBusinessPhone( *itV ); |
1601 | /* | 1615 | /* |
1602 | if ( *it == tr("Business 2 Phone" ) | 1616 | if ( *it == tr("Business 2 Phone" ) |
1603 | ent.setBusiness2Phone( *itV ); | 1617 | ent.setBusiness2Phone( *itV ); |
1604 | */ | 1618 | */ |
1605 | if ( ( *it == "Business Fax" ) || ( *it == "Work Fax" ) ) | 1619 | if ( ( *it == "Business Fax" ) || ( *it == "Work Fax" ) ) |
1606 | ent.setBusinessFax( *itV ); | 1620 | ent.setBusinessFax( *itV ); |
1607 | 1621 | ||
1608 | if ( ( *it == "Business Mobile" ) || ( *it == "Work Mobile" ) ) | 1622 | if ( ( *it == "Business Mobile" ) || ( *it == "Work Mobile" ) ) |
1609 | ent.setBusinessMobile( *itV ); | 1623 | ent.setBusinessMobile( *itV ); |
1610 | /* | 1624 | /* |
1611 | if ( *it == "Company Phone" ) | 1625 | if ( *it == "Company Phone" ) |
1612 | ent.setCompanyPhone( *itV ); | 1626 | ent.setCompanyPhone( *itV ); |
1613 | */ | 1627 | */ |
1614 | //if ( *it == "Default Email" ) | 1628 | //if ( *it == "Default Email" ) |
1615 | //ent.setDefaultEmail( *itV ); | 1629 | //ent.setDefaultEmail( *itV ); |