-rw-r--r-- | core/pim/addressbook/TODO | 1 | ||||
-rw-r--r-- | core/pim/addressbook/contacteditor.cpp | 8 | ||||
-rw-r--r-- | core/pim/addressbook/version.h | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/core/pim/addressbook/TODO b/core/pim/addressbook/TODO index 906b462..719b720 100644 --- a/core/pim/addressbook/TODO +++ b/core/pim/addressbook/TODO | |||
@@ -1,118 +1,119 @@ | |||
1 | Stuff todo until OPIE 1.0 : | 1 | Stuff todo until OPIE 1.0 : |
2 | =========================== | 2 | =========================== |
3 | 3 | ||
4 | Feature requests: | 4 | Feature requests: |
5 | ----------------- | 5 | ----------------- |
6 | - Dial by mobile phone by tapping the number.. | 6 | - Dial by mobile phone by tapping the number.. |
7 | (Maybe using gsmtool. And we may | 7 | (Maybe using gsmtool. And we may |
8 | add a library class for this) | 8 | add a library class for this) |
9 | - dial with dtmfdial in case it's installed and there's no mobile | 9 | - dial with dtmfdial in case it's installed and there's no mobile |
10 | - 3rd column for 2. Contact | 10 | - 3rd column for 2. Contact |
11 | - Implementing additional Views (Phonebook, ...) | 11 | - Implementing additional Views (Phonebook, ...) |
12 | - Birthday & Anniversary Reminder | 12 | - Birthday & Anniversary Reminder |
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: | 21 | - Default Email-button: A lot of problems: |
22 | If on second tab: The combo chooser is on the top left of the screen ! :( | 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 | 23 | - Default Email-Button: Sometimes not hiding the textfields completely |
24 | 24 | ||
25 | Bugs but not in addressbook: | 25 | Bugs but not in addressbook: |
26 | ----------------------------- | 26 | ----------------------------- |
27 | - VCARD: If umlaut (äöüß) in address, the parser gets confused.. | 27 | - VCARD: If umlaut (äöüß) in address, the parser gets confused.. |
28 | 28 | ||
29 | - Exporting and reimporting of Jobtitle was reported to fail (Could not reproduce this ! (se)) | 29 | - Exporting and reimporting of Jobtitle was reported to fail (Could not reproduce this ! (se)) |
30 | 30 | ||
31 | 31 | ||
32 | Urgent: | 32 | Urgent: |
33 | -------- | 33 | -------- |
34 | ContactEditor: | 34 | ContactEditor: |
35 | - Contact-Editor is temporarely reenabled. Wait for replacement. | 35 | - Contact-Editor is temporarely reenabled. Wait for replacement. |
36 | - Redesign of Contacteditor | 36 | - Redesign of Contacteditor |
37 | - Category is on the wrong position after changing to personal and back to normal | 37 | - Category is on the wrong position after changing to personal and back to normal |
38 | ( Temporarily workaround: Category is never deactivated.. :S ) | 38 | ( Temporarily workaround: Category is never deactivated.. :S ) |
39 | 39 | ||
40 | - Fix handling of 3 Firstnames | ||
40 | 41 | ||
41 | Important: | 42 | Important: |
42 | ---------- | 43 | ---------- |
43 | 44 | ||
44 | - If new contact is added (contacteditor closed): focus (table, card) to | 45 | - If new contact is added (contacteditor closed): focus (table, card) to |
45 | this entry ! | 46 | this entry ! |
46 | - After search (Started with Return): KeyFocus should be on Tabelle | 47 | - After search (Started with Return): KeyFocus should be on Tabelle |
47 | 48 | ||
48 | - "What's this" should be added (Deleyed after Feature Freeze) | 49 | - "What's this" should be added (Deleyed after Feature Freeze) |
49 | 50 | ||
50 | Less important: | 51 | Less important: |
51 | --------------- | 52 | --------------- |
52 | - Reload if contacts were changed externally | 53 | - Reload if contacts were changed externally |
53 | - The picker (alphabetical sort widget) should be | 54 | - The picker (alphabetical sort widget) should be |
54 | placed verticaly or horizontally (configurable) | 55 | placed verticaly or horizontally (configurable) |
55 | - Find a smart solution for activating/deactivating the "send email" event | 56 | - Find a smart solution for activating/deactivating the "send email" event |
56 | 57 | ||
57 | Should be Fixed (not absolute sure, need further validation): | 58 | Should be Fixed (not absolute sure, need further validation): |
58 | ------------------------------------------------------------- | 59 | ------------------------------------------------------------- |
59 | 60 | ||
60 | 61 | ||
61 | Fixed/Ready: | 62 | Fixed/Ready: |
62 | ------- | 63 | ------- |
63 | - Syncing: abtable not reloaded after sync. | 64 | - Syncing: abtable not reloaded after sync. |
64 | - Find widget should be replaced by something like | 65 | - Find widget should be replaced by something like |
65 | qpdf has. | 66 | qpdf has. |
66 | - Adding a configuration dialog | 67 | - Adding a configuration dialog |
67 | - Picker: Activated letter schould be more visible | 68 | - Picker: Activated letter schould be more visible |
68 | - Advanced handling of cursor keys (search..) | 69 | - Advanced handling of cursor keys (search..) |
69 | - Mail-Icon is missing | 70 | - Mail-Icon is missing |
70 | - Use opie-mail insted of qt-mail if possible. | 71 | - Use opie-mail insted of qt-mail if possible. |
71 | - Font menu is invisible using german translation | 72 | - Font menu is invisible using german translation |
72 | - Personal contact editor: Disable categories | 73 | - Personal contact editor: Disable categories |
73 | - "Nonenglish" translation bug has to be fixed. | 74 | - "Nonenglish" translation bug has to be fixed. |
74 | - contacteditor: Birthday, annyversary, ... : Use Dateselector | 75 | - contacteditor: Birthday, annyversary, ... : Use Dateselector |
75 | - The names of the countries are sorted by there english names, only.. | 76 | - The names of the countries are sorted by there english names, only.. |
76 | Even if they are translated.. :S | 77 | Even if they are translated.. :S |
77 | - Cursor keys should work in detail-view (ablabel) | 78 | - Cursor keys should work in detail-view (ablabel) |
78 | -> Ablabel should be removed and Abtable should be increased with | 79 | -> Ablabel should be removed and Abtable should be increased with |
79 | different views (as started by darwin zins).. | 80 | different views (as started by darwin zins).. |
80 | - Use advanced database functions in abtable to decrease | 81 | - Use advanced database functions in abtable to decrease |
81 | memory footprint and to make everything more easy ! | 82 | memory footprint and to make everything more easy ! |
82 | (abtable should store Iterator for selected Category) | 83 | (abtable should store Iterator for selected Category) |
83 | - Abtable: Configure Contact column (internally already available, | 84 | - Abtable: Configure Contact column (internally already available, |
84 | need configuration) | 85 | need configuration) |
85 | - Select of primary contact (see #274 on mantis) | 86 | - Select of primary contact (see #274 on mantis) |
86 | - Category-select does not work completely: "Unfiled" is always in listview .. | 87 | - Category-select does not work completely: "Unfiled" is always in listview .. |
87 | - Return from Contacteditor: Category resettet to all | 88 | - Return from Contacteditor: Category resettet to all |
88 | - Personal Details not working | 89 | - Personal Details not working |
89 | - If category changed, the letterpicker should be resetted | 90 | - If category changed, the letterpicker should be resetted |
90 | - There should be some icons for List and Cardview | 91 | - There should be some icons for List and Cardview |
91 | - If in Cardview and a category change removes all entries: | 92 | - If in Cardview and a category change removes all entries: |
92 | There are already entries in Cardview after up/down | 93 | There are already entries in Cardview after up/down |
93 | - Personal Details: Anniversary zeigt Fantasie-Werte | 94 | - Personal Details: Anniversary zeigt Fantasie-Werte |
94 | - Unfiled shown just in Category "All" and "Unfiled". | 95 | - Unfiled shown just in Category "All" and "Unfiled". |
95 | - After finising search and after Edit: Clear Picker | 96 | - After finising search and after Edit: Clear Picker |
96 | - After Edit: Table position back to edited entry. | 97 | - After Edit: Table position back to edited entry. |
97 | - Optimize Table Update... | 98 | - Optimize Table Update... |
98 | - Change MyDialog to Config | 99 | - Change MyDialog to Config |
99 | - Store position and state of toolbar | 100 | - Store position and state of toolbar |
100 | - Searchwidget closed: Selected user is jumping | 101 | - Searchwidget closed: Selected user is jumping |
101 | - Wenn suchen beendet, dann dauert das Tabellenupdate (was überhaupt überflüssig ist) | 102 | - Wenn suchen beendet, dann dauert das Tabellenupdate (was überhaupt überflüssig ist) |
102 | zu lange.. | 103 | zu lange.. |
103 | - VCARD: Import of Anniversary does not work correctly (currently disabled) | 104 | - VCARD: Import of Anniversary does not work correctly (currently disabled) |
104 | - Name order selected in "contacteditor" not used in list view. | 105 | - Name order selected in "contacteditor" not used in list view. |
105 | - OK-Key does not switch from Detailview (ablable) to Listview | 106 | - OK-Key does not switch from Detailview (ablable) to Listview |
106 | - Receiving of beams should open a dialog | 107 | - Receiving of beams should open a dialog |
107 | - Fix start of opie-mail | 108 | - Fix start of opie-mail |
108 | - Implement Button Pics | 109 | - Implement Button Pics |
109 | - Add a dialog to accept and optionally edit received contacts by IRDA. | 110 | - Add a dialog to accept and optionally edit received contacts by IRDA. |
110 | - Language not English (tested with german opie-translation): | 111 | - Language not English (tested with german opie-translation): |
111 | 1. Configure nicht übersetzt (alles leer). | 112 | 1. Configure nicht übersetzt (alles leer). |
112 | 2. Contacteditor nur teilweise übersetzt. | 113 | 2. Contacteditor nur teilweise übersetzt. |
113 | 3. Kategorie-Picker geht nicht. | 114 | 3. Kategorie-Picker geht nicht. |
114 | - Plugin for Today for Birthdays and Anniversaries | 115 | - Plugin for Today for Birthdays and Anniversaries |
115 | - Implement a picker/combo for the default email. | 116 | - Implement a picker/combo for the default email. |
116 | - Overview window cleanup needed.. | 117 | - Overview window cleanup needed.. |
117 | - Store last settings of combo-boxes | 118 | - Store last settings of combo-boxes |
118 | - Personal and Business Web-page is not editable | 119 | - Personal and Business Web-page is not editable |
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp index 97573af..b60f2dd 100644 --- a/core/pim/addressbook/contacteditor.cpp +++ b/core/pim/addressbook/contacteditor.cpp | |||
@@ -1110,689 +1110,689 @@ QString ContactEditor::parseName( const QString fullName, int type ) { | |||
1110 | } | 1110 | } |
1111 | strFirstName = simplifiedName; | 1111 | strFirstName = simplifiedName; |
1112 | break; | 1112 | break; |
1113 | 1113 | ||
1114 | case 1: | 1114 | case 1: |
1115 | spPos = simplifiedName.find( ' ', 0, TRUE ); | 1115 | spPos = simplifiedName.find( ' ', 0, TRUE ); |
1116 | strFirstName = simplifiedName.left( spPos ); | 1116 | strFirstName = simplifiedName.left( spPos ); |
1117 | strLastName = simplifiedName.mid( spPos + 1 ); | 1117 | strLastName = simplifiedName.mid( spPos + 1 ); |
1118 | break; | 1118 | break; |
1119 | 1119 | ||
1120 | case 2: | 1120 | case 2: |
1121 | spPos = simplifiedName.find( ' ', 0, TRUE ); | 1121 | spPos = simplifiedName.find( ' ', 0, TRUE ); |
1122 | strFirstName = simplifiedName.left( spPos ); | 1122 | strFirstName = simplifiedName.left( spPos ); |
1123 | spPos2 = simplifiedName.find( ' ', spPos + 1, TRUE ); | 1123 | spPos2 = simplifiedName.find( ' ', spPos + 1, TRUE ); |
1124 | strMiddleName = simplifiedName.mid( spPos + 1, (spPos2 - 1) - spPos ); | 1124 | strMiddleName = simplifiedName.mid( spPos + 1, (spPos2 - 1) - spPos ); |
1125 | strLastName = simplifiedName.mid( spPos2 + 1 ); | 1125 | strLastName = simplifiedName.mid( spPos2 + 1 ); |
1126 | break; | 1126 | break; |
1127 | 1127 | ||
1128 | case 3: | 1128 | case 3: |
1129 | spPos = simplifiedName.find( ' ', 0, TRUE ); | 1129 | spPos = simplifiedName.find( ' ', 0, TRUE ); |
1130 | strFirstName = simplifiedName.left( spPos ); | 1130 | strFirstName = simplifiedName.left( spPos ); |
1131 | spPos2 = simplifiedName.find( ' ', spPos + 1, TRUE ); | 1131 | spPos2 = simplifiedName.find( ' ', spPos + 1, TRUE ); |
1132 | strMiddleName = simplifiedName.mid( spPos + 1, (spPos2 - 1) - spPos ); | 1132 | strMiddleName = simplifiedName.mid( spPos + 1, (spPos2 - 1) - spPos ); |
1133 | spPos = simplifiedName.find( ' ', spPos2 + 1, TRUE ); | 1133 | spPos = simplifiedName.find( ' ', spPos2 + 1, TRUE ); |
1134 | strLastName = simplifiedName.mid( spPos2 + 1, (spPos - 1) - spPos2 ); | 1134 | strLastName = simplifiedName.mid( spPos2 + 1, (spPos - 1) - spPos2 ); |
1135 | strSuffix = simplifiedName.mid( spPos + 1 ); | 1135 | strSuffix = simplifiedName.mid( spPos + 1 ); |
1136 | break; | 1136 | break; |
1137 | 1137 | ||
1138 | case 4: | 1138 | case 4: |
1139 | spPos = simplifiedName.find( ' ', 0, TRUE ); | 1139 | spPos = simplifiedName.find( ' ', 0, TRUE ); |
1140 | strTitle = simplifiedName.left( spPos ); | 1140 | strTitle = simplifiedName.left( spPos ); |
1141 | spPos2 = simplifiedName.find( ' ', spPos + 1, TRUE ); | 1141 | spPos2 = simplifiedName.find( ' ', spPos + 1, TRUE ); |
1142 | strFirstName = simplifiedName.mid( spPos + 1, (spPos2 - 1) - spPos ); | 1142 | strFirstName = simplifiedName.mid( spPos + 1, (spPos2 - 1) - spPos ); |
1143 | spPos = simplifiedName.find( ' ', spPos2 + 1, TRUE ); | 1143 | spPos = simplifiedName.find( ' ', spPos2 + 1, TRUE ); |
1144 | strMiddleName = simplifiedName.mid( spPos2 + 1, (spPos - 1) - spPos2 ); | 1144 | strMiddleName = simplifiedName.mid( spPos2 + 1, (spPos - 1) - spPos2 ); |
1145 | spPos2 = simplifiedName.find( ' ', spPos + 1, TRUE ); | 1145 | spPos2 = simplifiedName.find( ' ', spPos + 1, TRUE ); |
1146 | strLastName = simplifiedName.mid( spPos + 1, (spPos2 - 1) - spPos ); | 1146 | strLastName = simplifiedName.mid( spPos + 1, (spPos2 - 1) - spPos ); |
1147 | strSuffix = simplifiedName.mid( spPos2 + 1 ); | 1147 | strSuffix = simplifiedName.mid( spPos2 + 1 ); |
1148 | break; | 1148 | break; |
1149 | 1149 | ||
1150 | default: | 1150 | default: |
1151 | spPos = simplifiedName.find( ' ', 0, TRUE ); | 1151 | spPos = simplifiedName.find( ' ', 0, TRUE ); |
1152 | strTitle = simplifiedName.left( spPos ); | 1152 | strTitle = simplifiedName.left( spPos ); |
1153 | spPos2 = simplifiedName.find( ' ', spPos + 1, TRUE ); | 1153 | spPos2 = simplifiedName.find( ' ', spPos + 1, TRUE ); |
1154 | strFirstName = simplifiedName.mid( spPos + 1, (spPos2 - 1) - spPos ); | 1154 | strFirstName = simplifiedName.mid( spPos + 1, (spPos2 - 1) - spPos ); |
1155 | spPos = simplifiedName.find( ' ', spPos2 + 1, TRUE ); | 1155 | spPos = simplifiedName.find( ' ', spPos2 + 1, TRUE ); |
1156 | strMiddleName = simplifiedName.mid( spPos2 + 1, (spPos - 1) - spPos2 ); | 1156 | strMiddleName = simplifiedName.mid( spPos2 + 1, (spPos - 1) - spPos2 ); |
1157 | spPos2 = simplifiedName.find( ' ', spPos + 1, TRUE ); | 1157 | spPos2 = simplifiedName.find( ' ', spPos + 1, TRUE ); |
1158 | strLastName = simplifiedName.mid( spPos + 1, (spPos2 - 1) - spPos ); | 1158 | strLastName = simplifiedName.mid( spPos + 1, (spPos2 - 1) - spPos ); |
1159 | strSuffix = simplifiedName.mid( spPos2 + 1 ); | 1159 | strSuffix = simplifiedName.mid( spPos2 + 1 ); |
1160 | break; | 1160 | break; |
1161 | } | 1161 | } |
1162 | } else { | 1162 | } else { |
1163 | simplifiedName.replace( commapos, 1, " " ); | 1163 | simplifiedName.replace( commapos, 1, " " ); |
1164 | simplifiedName = simplifiedName.simplifyWhiteSpace(); | 1164 | simplifiedName = simplifiedName.simplifyWhiteSpace(); |
1165 | 1165 | ||
1166 | switch (spCount) { | 1166 | switch (spCount) { |
1167 | case 0: | 1167 | case 0: |
1168 | //return simplifiedName; | 1168 | //return simplifiedName; |
1169 | if (txtLastName->text() != "") { | 1169 | if (txtLastName->text() != "") { |
1170 | strLastName = simplifiedName; | 1170 | strLastName = simplifiedName; |
1171 | break; | 1171 | break; |
1172 | } | 1172 | } |
1173 | if (txtMiddleName->text() != "") { | 1173 | if (txtMiddleName->text() != "") { |
1174 | strMiddleName = simplifiedName; | 1174 | strMiddleName = simplifiedName; |
1175 | break; | 1175 | break; |
1176 | } | 1176 | } |
1177 | if (txtSuffix->text() != "") { | 1177 | if (txtSuffix->text() != "") { |
1178 | strSuffix = simplifiedName; | 1178 | strSuffix = simplifiedName; |
1179 | break; | 1179 | break; |
1180 | } | 1180 | } |
1181 | strFirstName = simplifiedName; | 1181 | strFirstName = simplifiedName; |
1182 | break; | 1182 | break; |
1183 | 1183 | ||
1184 | case 1: | 1184 | case 1: |
1185 | spPos = simplifiedName.find( ' ', 0, TRUE ); | 1185 | spPos = simplifiedName.find( ' ', 0, TRUE ); |
1186 | strLastName = simplifiedName.left( spPos ); | 1186 | strLastName = simplifiedName.left( spPos ); |
1187 | strFirstName = simplifiedName.mid( spPos + 1 ); | 1187 | strFirstName = simplifiedName.mid( spPos + 1 ); |
1188 | break; | 1188 | break; |
1189 | 1189 | ||
1190 | case 2: | 1190 | case 2: |
1191 | spPos = simplifiedName.find( ' ', 0, TRUE ); | 1191 | spPos = simplifiedName.find( ' ', 0, TRUE ); |
1192 | strLastName = simplifiedName.left( spPos ); | 1192 | strLastName = simplifiedName.left( spPos ); |
1193 | spPos2 = simplifiedName.find( ' ', spPos + 1, TRUE ); | 1193 | spPos2 = simplifiedName.find( ' ', spPos + 1, TRUE ); |
1194 | strFirstName = simplifiedName.mid( spPos + 1, (spPos2 - 1) - spPos ); | 1194 | strFirstName = simplifiedName.mid( spPos + 1, (spPos2 - 1) - spPos ); |
1195 | strMiddleName = simplifiedName.mid( spPos2 + 1 ); | 1195 | strMiddleName = simplifiedName.mid( spPos2 + 1 ); |
1196 | break; | 1196 | break; |
1197 | 1197 | ||
1198 | case 3: | 1198 | case 3: |
1199 | spPos = simplifiedName.find( ' ', 0, TRUE ); | 1199 | spPos = simplifiedName.find( ' ', 0, TRUE ); |
1200 | strLastName = simplifiedName.left( spPos ); | 1200 | strLastName = simplifiedName.left( spPos ); |
1201 | spPos2 = simplifiedName.find( ' ', spPos + 1, TRUE ); | 1201 | spPos2 = simplifiedName.find( ' ', spPos + 1, TRUE ); |
1202 | strFirstName = simplifiedName.mid( spPos + 1, (spPos2 - 1) - spPos ); | 1202 | strFirstName = simplifiedName.mid( spPos + 1, (spPos2 - 1) - spPos ); |
1203 | spPos = simplifiedName.find( ' ', spPos2 + 1, TRUE ); | 1203 | spPos = simplifiedName.find( ' ', spPos2 + 1, TRUE ); |
1204 | strMiddleName = simplifiedName.mid( spPos2 + 1, (spPos - 1) - spPos2 ); | 1204 | strMiddleName = simplifiedName.mid( spPos2 + 1, (spPos - 1) - spPos2 ); |
1205 | strSuffix = simplifiedName.mid( spPos + 1 ); | 1205 | strSuffix = simplifiedName.mid( spPos + 1 ); |
1206 | break; | 1206 | break; |
1207 | 1207 | ||
1208 | case 4: | 1208 | case 4: |
1209 | spPos = simplifiedName.find( ' ', 0, TRUE ); | 1209 | spPos = simplifiedName.find( ' ', 0, TRUE ); |
1210 | strLastName = simplifiedName.left( spPos ); | 1210 | strLastName = simplifiedName.left( spPos ); |
1211 | spPos2 = simplifiedName.find( ' ', spPos + 1, TRUE ); | 1211 | spPos2 = simplifiedName.find( ' ', spPos + 1, TRUE ); |
1212 | strTitle = simplifiedName.mid( spPos + 1, (spPos2 - 1) - spPos ); | 1212 | strTitle = simplifiedName.mid( spPos + 1, (spPos2 - 1) - spPos ); |
1213 | spPos = simplifiedName.find( ' ', spPos2 + 1, TRUE ); | 1213 | spPos = simplifiedName.find( ' ', spPos2 + 1, TRUE ); |
1214 | strFirstName = simplifiedName.mid( spPos2 + 1, (spPos - 1) - spPos2 ); | 1214 | strFirstName = simplifiedName.mid( spPos2 + 1, (spPos - 1) - spPos2 ); |
1215 | spPos2 = simplifiedName.find( ' ', spPos + 1, TRUE ); | 1215 | spPos2 = simplifiedName.find( ' ', spPos + 1, TRUE ); |
1216 | strMiddleName = simplifiedName.mid( spPos + 1, (spPos2 - 1) - spPos ); | 1216 | strMiddleName = simplifiedName.mid( spPos + 1, (spPos2 - 1) - spPos ); |
1217 | strSuffix = simplifiedName.mid( spPos2 + 1 ); | 1217 | strSuffix = simplifiedName.mid( spPos2 + 1 ); |
1218 | break; | 1218 | break; |
1219 | 1219 | ||
1220 | default: | 1220 | default: |
1221 | spPos = simplifiedName.find( ' ', 0, TRUE ); | 1221 | spPos = simplifiedName.find( ' ', 0, TRUE ); |
1222 | strLastName = simplifiedName.left( spPos ); | 1222 | strLastName = simplifiedName.left( spPos ); |
1223 | spPos2 = simplifiedName.find( ' ', spPos + 1, TRUE ); | 1223 | spPos2 = simplifiedName.find( ' ', spPos + 1, TRUE ); |
1224 | strTitle = simplifiedName.mid( spPos + 1, (spPos2 - 1) - spPos ); | 1224 | strTitle = simplifiedName.mid( spPos + 1, (spPos2 - 1) - spPos ); |
1225 | spPos = simplifiedName.find( ' ', spPos2 + 1, TRUE ); | 1225 | spPos = simplifiedName.find( ' ', spPos2 + 1, TRUE ); |
1226 | strFirstName = simplifiedName.mid( spPos2 + 1, (spPos - 1) - spPos ); | 1226 | strFirstName = simplifiedName.mid( spPos2 + 1, (spPos - 1) - spPos ); |
1227 | spPos2 = simplifiedName.find( ' ', spPos + 1, TRUE ); | 1227 | spPos2 = simplifiedName.find( ' ', spPos + 1, TRUE ); |
1228 | strMiddleName = simplifiedName.mid( spPos + 1, (spPos2 - 1) - spPos ); | 1228 | strMiddleName = simplifiedName.mid( spPos + 1, (spPos2 - 1) - spPos ); |
1229 | strSuffix = simplifiedName.mid( spPos2 + 1 ); | 1229 | strSuffix = simplifiedName.mid( spPos2 + 1 ); |
1230 | break; | 1230 | break; |
1231 | } | 1231 | } |
1232 | } | 1232 | } |
1233 | switch (type) { | 1233 | switch (type) { |
1234 | case NAME_FL: | 1234 | case NAME_FL: |
1235 | return strFirstName + " " + strLastName; | 1235 | return strFirstName + " " + strLastName; |
1236 | 1236 | ||
1237 | case NAME_LF: | 1237 | case NAME_LF: |
1238 | return strLastName + ", " + strFirstName; | 1238 | return strLastName + ", " + strFirstName; |
1239 | 1239 | ||
1240 | case NAME_LFM: | 1240 | case NAME_LFM: |
1241 | return strLastName + ", " + strFirstName + " " + strMiddleName; | 1241 | return strLastName + ", " + strFirstName + " " + strMiddleName; |
1242 | 1242 | ||
1243 | case NAME_FMLS: | 1243 | case NAME_FMLS: |
1244 | return strFirstName + " " + strMiddleName + " " + strLastName + " " + strSuffix; | 1244 | return strFirstName + " " + strMiddleName + " " + strLastName + " " + strSuffix; |
1245 | 1245 | ||
1246 | case NAME_F: | 1246 | case NAME_F: |
1247 | return strFirstName; | 1247 | return strFirstName; |
1248 | 1248 | ||
1249 | case NAME_M: | 1249 | case NAME_M: |
1250 | return strMiddleName; | 1250 | return strMiddleName; |
1251 | 1251 | ||
1252 | case NAME_L: | 1252 | case NAME_L: |
1253 | return strLastName; | 1253 | return strLastName; |
1254 | 1254 | ||
1255 | case NAME_S: | 1255 | case NAME_S: |
1256 | return strSuffix; | 1256 | return strSuffix; |
1257 | 1257 | ||
1258 | } | 1258 | } |
1259 | return QString::null; | 1259 | return QString::null; |
1260 | } | 1260 | } |
1261 | 1261 | ||
1262 | void ContactEditor::cleanupFields() { | 1262 | void ContactEditor::cleanupFields() { |
1263 | QStringList::Iterator it = slChooserValues.begin(); | 1263 | QStringList::Iterator it = slChooserValues.begin(); |
1264 | 1264 | ||
1265 | for ( int i = 0; it != slChooserValues.end(); i++, ++it ) { | 1265 | for ( int i = 0; it != slChooserValues.end(); i++, ++it ) { |
1266 | (*it) = ""; | 1266 | (*it) = ""; |
1267 | } | 1267 | } |
1268 | 1268 | ||
1269 | for ( int i = 0; i < 7; i++ ) { | 1269 | for ( int i = 0; i < 7; i++ ) { |
1270 | slHomeAddress[i] = ""; | 1270 | slHomeAddress[i] = ""; |
1271 | slBusinessAddress[i] = ""; | 1271 | slBusinessAddress[i] = ""; |
1272 | } | 1272 | } |
1273 | 1273 | ||
1274 | QListIterator<QLineEdit> itLV( listValue ); | 1274 | QListIterator<QLineEdit> itLV( listValue ); |
1275 | for ( ; itLV.current(); ++itLV ) { | 1275 | for ( ; itLV.current(); ++itLV ) { |
1276 | (*itLV)->setText( "" ); | 1276 | (*itLV)->setText( "" ); |
1277 | } | 1277 | } |
1278 | 1278 | ||
1279 | txtFirstName->setText(""); | 1279 | txtFirstName->setText(""); |
1280 | txtMiddleName->setText(""); | 1280 | txtMiddleName->setText(""); |
1281 | txtLastName->setText(""); | 1281 | txtLastName->setText(""); |
1282 | txtSuffix->setText(""); | 1282 | txtSuffix->setText(""); |
1283 | txtNote->setText(""); | 1283 | txtNote->setText(""); |
1284 | txtFullName->setText(""); | 1284 | txtFullName->setText(""); |
1285 | txtJobTitle->setText(""); | 1285 | txtJobTitle->setText(""); |
1286 | txtOrganization->setText(""); | 1286 | txtOrganization->setText(""); |
1287 | txtChooserField1->setText(""); | 1287 | txtChooserField1->setText(""); |
1288 | txtChooserField2->setText(""); | 1288 | txtChooserField2->setText(""); |
1289 | txtChooserField3->setText(""); | 1289 | txtChooserField3->setText(""); |
1290 | txtAddress->setText(""); | 1290 | txtAddress->setText(""); |
1291 | txtCity->setText(""); | 1291 | txtCity->setText(""); |
1292 | txtState->setText(""); | 1292 | txtState->setText(""); |
1293 | txtZip->setText(""); | 1293 | txtZip->setText(""); |
1294 | QLineEdit *txtTmp = cmbCountry->lineEdit(); | 1294 | QLineEdit *txtTmp = cmbCountry->lineEdit(); |
1295 | txtTmp->setText(""); | 1295 | txtTmp->setText(""); |
1296 | txtTmp = cmbFileAs->lineEdit(); | 1296 | txtTmp = cmbFileAs->lineEdit(); |
1297 | txtTmp->setText(""); | 1297 | txtTmp->setText(""); |
1298 | 1298 | ||
1299 | } | 1299 | } |
1300 | 1300 | ||
1301 | void ContactEditor::setEntry( const OContact &entry ) { | 1301 | void ContactEditor::setEntry( const OContact &entry ) { |
1302 | 1302 | ||
1303 | initializing = true; | 1303 | initializing = true; |
1304 | 1304 | ||
1305 | cleanupFields(); | 1305 | cleanupFields(); |
1306 | 1306 | ||
1307 | ent = entry; | 1307 | ent = entry; |
1308 | 1308 | ||
1309 | emails = QStringList(ent.emailList()); | 1309 | emails = QStringList(ent.emailList()); |
1310 | defaultEmail = ent.defaultEmail(); | 1310 | defaultEmail = ent.defaultEmail(); |
1311 | if (defaultEmail.isEmpty()) defaultEmail = emails[0]; | 1311 | if (defaultEmail.isEmpty()) defaultEmail = emails[0]; |
1312 | qDebug("default email=%s",defaultEmail.latin1()); | 1312 | qDebug("default email=%s",defaultEmail.latin1()); |
1313 | 1313 | ||
1314 | useFullName = false; | 1314 | useFullName = false; |
1315 | txtFirstName->setText( ent.firstName() ); | 1315 | txtFirstName->setText( ent.firstName() ); |
1316 | txtMiddleName->setText( ent.middleName() ); | 1316 | txtMiddleName->setText( ent.middleName() ); |
1317 | txtLastName->setText( ent.lastName() ); | 1317 | txtLastName->setText( ent.lastName() ); |
1318 | txtSuffix->setText( ent.suffix() ); | 1318 | txtSuffix->setText( ent.suffix() ); |
1319 | 1319 | ||
1320 | QString *tmpString = new QString; | 1320 | QString *tmpString = new QString; |
1321 | *tmpString = ent.firstName() + " " + ent.middleName() + | 1321 | *tmpString = ent.firstName() + " " + ent.middleName() + |
1322 | + " " + ent.lastName() + " " + ent.suffix(); | 1322 | + " " + ent.lastName() + " " + ent.suffix(); |
1323 | 1323 | ||
1324 | txtFullName->setText( tmpString->simplifyWhiteSpace() ); | 1324 | txtFullName->setText( tmpString->simplifyWhiteSpace() ); |
1325 | 1325 | ||
1326 | cmbFileAs->setEditText( ent.fileAs() ); | 1326 | cmbFileAs->setEditText( ent.fileAs() ); |
1327 | 1327 | ||
1328 | //if (hasTitle) | 1328 | //if (hasTitle) |
1329 | txtJobTitle->setText( ent.jobTitle() ); | 1329 | txtJobTitle->setText( ent.jobTitle() ); |
1330 | 1330 | ||
1331 | //if (hasCompany) | 1331 | //if (hasCompany) |
1332 | txtOrganization->setText( ent.company() ); | 1332 | txtOrganization->setText( ent.company() ); |
1333 | 1333 | ||
1334 | //if (hasNotes) | 1334 | //if (hasNotes) |
1335 | txtNote->setText( ent.notes() ); | 1335 | txtNote->setText( ent.notes() ); |
1336 | 1336 | ||
1337 | //if (hasStreet) { | 1337 | //if (hasStreet) { |
1338 | slHomeAddress[0] = ent.homeStreet(); | 1338 | slHomeAddress[0] = ent.homeStreet(); |
1339 | slBusinessAddress[0] = ent.businessStreet(); | 1339 | slBusinessAddress[0] = ent.businessStreet(); |
1340 | //} | 1340 | //} |
1341 | 1341 | ||
1342 | //if (hasCity) { | 1342 | //if (hasCity) { |
1343 | slHomeAddress[3] = ent.homeCity(); | 1343 | slHomeAddress[3] = ent.homeCity(); |
1344 | slBusinessAddress[3] = ent.businessCity(); | 1344 | slBusinessAddress[3] = ent.businessCity(); |
1345 | //} | 1345 | //} |
1346 | 1346 | ||
1347 | //if (hasState) { | 1347 | //if (hasState) { |
1348 | slHomeAddress[4] = ent.homeState(); | 1348 | slHomeAddress[4] = ent.homeState(); |
1349 | slBusinessAddress[4] = ent.businessState(); | 1349 | slBusinessAddress[4] = ent.businessState(); |
1350 | //} | 1350 | //} |
1351 | 1351 | ||
1352 | //if (hasZip) { | 1352 | //if (hasZip) { |
1353 | slHomeAddress[5] = ent.homeZip(); | 1353 | slHomeAddress[5] = ent.homeZip(); |
1354 | slBusinessAddress[5] = ent.businessZip(); | 1354 | slBusinessAddress[5] = ent.businessZip(); |
1355 | //} | 1355 | //} |
1356 | 1356 | ||
1357 | //if (hasCountry) { | 1357 | //if (hasCountry) { |
1358 | slHomeAddress[6] = ent.homeCountry(); | 1358 | slHomeAddress[6] = ent.homeCountry(); |
1359 | slBusinessAddress[6] = ent.businessCountry(); | 1359 | slBusinessAddress[6] = ent.businessCountry(); |
1360 | //} | 1360 | //} |
1361 | 1361 | ||
1362 | QStringList::ConstIterator it; | 1362 | QStringList::ConstIterator it; |
1363 | QListIterator<QLineEdit> itLE( listValue ); | 1363 | QListIterator<QLineEdit> itLE( listValue ); |
1364 | for ( it = slDynamicEntries.begin(); itLE.current()/* != slDynamicEntries.end()*/; ++it, ++itLE) { | 1364 | for ( it = slDynamicEntries.begin(); itLE.current()/* != slDynamicEntries.end()*/; ++it, ++itLE) { |
1365 | 1365 | ||
1366 | qWarning(" Filling dynamic Field: %s", (*it).latin1() ); | 1366 | qWarning(" Filling dynamic Field: %s", (*it).latin1() ); |
1367 | 1367 | ||
1368 | if ( *it == "Department" ) | 1368 | if ( *it == "Department" ) |
1369 | (*itLE)->setText( ent.department() ); | 1369 | (*itLE)->setText( ent.department() ); |
1370 | 1370 | ||
1371 | if ( *it == "Company" ) | 1371 | if ( *it == "Company" ) |
1372 | (*itLE)->setText( ent.company() ); | 1372 | (*itLE)->setText( ent.company() ); |
1373 | 1373 | ||
1374 | if ( *it == "Office" ) | 1374 | if ( *it == "Office" ) |
1375 | (*itLE)->setText( ent.office() ); | 1375 | (*itLE)->setText( ent.office() ); |
1376 | 1376 | ||
1377 | if ( *it == "Profession" ) | 1377 | if ( *it == "Profession" ) |
1378 | (*itLE)->setText( ent.profession() ); | 1378 | (*itLE)->setText( ent.profession() ); |
1379 | 1379 | ||
1380 | if ( *it == "Assistant" ) | 1380 | if ( *it == "Assistant" ) |
1381 | (*itLE)->setText( ent.assistant() ); | 1381 | (*itLE)->setText( ent.assistant() ); |
1382 | 1382 | ||
1383 | if ( *it == "Manager" ) | 1383 | if ( *it == "Manager" ) |
1384 | (*itLE)->setText( ent.manager() ); | 1384 | (*itLE)->setText( ent.manager() ); |
1385 | 1385 | ||
1386 | if ( *it == "Spouse" ) | 1386 | if ( *it == "Spouse" ) |
1387 | (*itLE)->setText( ent.spouse() ); | 1387 | (*itLE)->setText( ent.spouse() ); |
1388 | 1388 | ||
1389 | if ( *it == "Nickname" ){ | 1389 | if ( *it == "Nickname" ){ |
1390 | qWarning("**** Nichname: %s", ent.nickname().latin1() ); | 1390 | qWarning("**** Nichname: %s", ent.nickname().latin1() ); |
1391 | (*itLE)->setText( ent.nickname() ); | 1391 | (*itLE)->setText( ent.nickname() ); |
1392 | } | 1392 | } |
1393 | 1393 | ||
1394 | if ( *it == "Children" ) | 1394 | if ( *it == "Children" ) |
1395 | (*itLE)->setText( ent.children() ); | 1395 | (*itLE)->setText( ent.children() ); |
1396 | 1396 | ||
1397 | } | 1397 | } |
1398 | 1398 | ||
1399 | QStringList::Iterator itV; | 1399 | QStringList::Iterator itV; |
1400 | for ( it = slChooserNames.begin(), itV = slChooserValues.begin(); it != slChooserNames.end(); ++it, ++itV ) { | 1400 | for ( it = slChooserNames.begin(), itV = slChooserValues.begin(); it != slChooserNames.end(); ++it, ++itV ) { |
1401 | 1401 | ||
1402 | if ( ( *it == "Business Phone") || ( *it == "Work Phone" ) ) | 1402 | if ( ( *it == "Business Phone") || ( *it == "Work Phone" ) ) |
1403 | *itV = ent.businessPhone(); | 1403 | *itV = ent.businessPhone(); |
1404 | /* | 1404 | /* |
1405 | if ( *it == "Business 2 Phone" ) | 1405 | if ( *it == "Business 2 Phone" ) |
1406 | *itV = ent.business2Phone(); | 1406 | *itV = ent.business2Phone(); |
1407 | */ | 1407 | */ |
1408 | if ( ( *it == "Business Fax") || ( *it == "Work Fax" ) ) | 1408 | if ( ( *it == "Business Fax") || ( *it == "Work Fax" ) ) |
1409 | *itV = ent.businessFax(); | 1409 | *itV = ent.businessFax(); |
1410 | 1410 | ||
1411 | if ( ( *it == "Business Mobile" ) || ( *it == "work Mobile" ) ) | 1411 | if ( ( *it == "Business Mobile" ) || ( *it == "work Mobile" ) ) |
1412 | *itV = ent.businessMobile(); | 1412 | *itV = ent.businessMobile(); |
1413 | /* | 1413 | /* |
1414 | if ( *it == "Company Phone" ) | 1414 | if ( *it == "Company Phone" ) |
1415 | *itV = ent.companyPhone(); | 1415 | *itV = ent.companyPhone(); |
1416 | */ | 1416 | */ |
1417 | if ( *it == "Default Email" ) | 1417 | if ( *it == "Default Email" ) |
1418 | *itV = ent.defaultEmail(); | 1418 | *itV = ent.defaultEmail(); |
1419 | 1419 | ||
1420 | if ( *it == "Emails" ) | 1420 | if ( *it == "Emails" ) |
1421 | *itV = ent.emailList().join(", "); // :SX | 1421 | *itV = ent.emailList().join(", "); // :SX |
1422 | 1422 | ||
1423 | if ( *it == "Home Phone" ) | 1423 | if ( *it == "Home Phone" ) |
1424 | *itV = ent.homePhone(); | 1424 | *itV = ent.homePhone(); |
1425 | /* | 1425 | /* |
1426 | if ( *it == "Home 2 Phone" ) | 1426 | if ( *it == "Home 2 Phone" ) |
1427 | *itV = ent.home2Phone(); | 1427 | *itV = ent.home2Phone(); |
1428 | */ | 1428 | */ |
1429 | if ( *it == "Home Fax" ) | 1429 | if ( *it == "Home Fax" ) |
1430 | *itV = ent.homeFax(); | 1430 | *itV = ent.homeFax(); |
1431 | 1431 | ||
1432 | if ( *it == "Home Mobile" ) | 1432 | if ( *it == "Home Mobile" ) |
1433 | *itV = ent.homeMobile(); | 1433 | *itV = ent.homeMobile(); |
1434 | /* | 1434 | /* |
1435 | if ( *it == "Car Phone" ) | 1435 | if ( *it == "Car Phone" ) |
1436 | *itV = ent.carPhone(); | 1436 | *itV = ent.carPhone(); |
1437 | 1437 | ||
1438 | if ( *it == "ISDN Phone" ) | 1438 | if ( *it == "ISDN Phone" ) |
1439 | *itV = ent.ISDNPhone(); | 1439 | *itV = ent.ISDNPhone(); |
1440 | 1440 | ||
1441 | if ( *it == "Other Phone" ) | 1441 | if ( *it == "Other Phone" ) |
1442 | *itV = ent.otherPhone(); | 1442 | *itV = ent.otherPhone(); |
1443 | */ | 1443 | */ |
1444 | if ( ( *it == "Business Pager" ) || ( *it == "Work Pager" ) ) | 1444 | if ( ( *it == "Business Pager" ) || ( *it == "Work Pager" ) ) |
1445 | *itV = ent.businessPager(); | 1445 | *itV = ent.businessPager(); |
1446 | /* | 1446 | /* |
1447 | if ( *it == "Home Pager") | 1447 | if ( *it == "Home Pager") |
1448 | *itV = ent.homePager(); | 1448 | *itV = ent.homePager(); |
1449 | 1449 | ||
1450 | if ( *it == "AIM IM" ) | 1450 | if ( *it == "AIM IM" ) |
1451 | *itV = ent.AIMIM(); | 1451 | *itV = ent.AIMIM(); |
1452 | 1452 | ||
1453 | if ( *it == "ICQ IM" ) | 1453 | if ( *it == "ICQ IM" ) |
1454 | *itV = ent.ICQIM(); | 1454 | *itV = ent.ICQIM(); |
1455 | 1455 | ||
1456 | if ( *it == "Jabber IM" ) | 1456 | if ( *it == "Jabber IM" ) |
1457 | *itV = ent.jabberIM(); | 1457 | *itV = ent.jabberIM(); |
1458 | 1458 | ||
1459 | if ( *it == "MSN IM" ) | 1459 | if ( *it == "MSN IM" ) |
1460 | *itV = ent.MSNIM(); | 1460 | *itV = ent.MSNIM(); |
1461 | 1461 | ||
1462 | if ( *it == "Yahoo IM" ) | 1462 | if ( *it == "Yahoo IM" ) |
1463 | *itV = ent.yahooIM(); | 1463 | *itV = ent.yahooIM(); |
1464 | */ | 1464 | */ |
1465 | if ( *it == "Home Web Page" ) | 1465 | if ( *it == "Home Web Page" ) |
1466 | *itV = ent.homeWebpage(); | 1466 | *itV = ent.homeWebpage(); |
1467 | 1467 | ||
1468 | if ( ( *it == "Business WebPage" ) || ( *it == "Work Web Page" ) ) | 1468 | if ( ( *it == "Business WebPage" ) || ( *it == "Work Web Page" ) ) |
1469 | *itV = ent.businessWebpage(); | 1469 | *itV = ent.businessWebpage(); |
1470 | 1470 | ||
1471 | 1471 | ||
1472 | } | 1472 | } |
1473 | 1473 | ||
1474 | 1474 | ||
1475 | cmbCat->setCategories( ent.categories(), "Contacts", tr("Contacts") ); | 1475 | cmbCat->setCategories( ent.categories(), "Contacts", tr("Contacts") ); |
1476 | 1476 | ||
1477 | QString gender = ent.gender(); | 1477 | QString gender = ent.gender(); |
1478 | cmbGender->setCurrentItem( gender.toInt() ); | 1478 | cmbGender->setCurrentItem( gender.toInt() ); |
1479 | 1479 | ||
1480 | txtNote->setText( ent.notes() ); | 1480 | txtNote->setText( ent.notes() ); |
1481 | 1481 | ||
1482 | slotAddressTypeChange( cmbAddress->currentItem() ); | 1482 | slotAddressTypeChange( cmbAddress->currentItem() ); |
1483 | 1483 | ||
1484 | // Calling "show()" to arrange all widgets. Otherwise we will get | 1484 | // Calling "show()" to arrange all widgets. Otherwise we will get |
1485 | // a wrong position of the textfields and are unable to put our | 1485 | // a wrong position of the textfields and are unable to put our |
1486 | // default-email combo over it.. This is very ugly ! | 1486 | // default-email combo over it.. This is very ugly ! |
1487 | // Does anybody has a better solution ? | 1487 | // Does anybody has a better solution ? |
1488 | // Basically we should rethink the strategy to hide | 1488 | // Basically we should rethink the strategy to hide |
1489 | // a textfield with overwriting.. (se) | 1489 | // a textfield with overwriting.. (se) |
1490 | show(); | 1490 | show(); |
1491 | 1491 | ||
1492 | // Get combo-settings from contact and set preset.. | 1492 | // Get combo-settings from contact and set preset.. |
1493 | contactfields.loadFromRecord( ent ); | 1493 | contactfields.loadFromRecord( ent ); |
1494 | cmbChooserField1->setCurrentItem( contactfields.getFieldOrder(0, 0) ); | 1494 | cmbChooserField1->setCurrentItem( contactfields.getFieldOrder(0, 7) ); |
1495 | cmbChooserField2->setCurrentItem( contactfields.getFieldOrder(1, 1) ); | 1495 | cmbChooserField2->setCurrentItem( contactfields.getFieldOrder(1, 9) ); |
1496 | cmbChooserField3->setCurrentItem( contactfields.getFieldOrder(2, 2) ); | 1496 | cmbChooserField3->setCurrentItem( contactfields.getFieldOrder(2, 0) ); |
1497 | cmbChooserField4->setCurrentItem( contactfields.getFieldOrder(3, 5) ); | 1497 | cmbChooserField4->setCurrentItem( contactfields.getFieldOrder(3, 6) ); |
1498 | cmbAddress->setCurrentItem( contactfields.getFieldOrder(4, 1) ); | 1498 | cmbAddress->setCurrentItem( contactfields.getFieldOrder(4, 1) ); |
1499 | slotCmbChooser1Change( cmbChooserField1->currentItem() ); | 1499 | slotCmbChooser1Change( cmbChooserField1->currentItem() ); |
1500 | slotCmbChooser2Change( cmbChooserField2->currentItem() ); | 1500 | slotCmbChooser2Change( cmbChooserField2->currentItem() ); |
1501 | slotCmbChooser3Change( cmbChooserField3->currentItem() ); | 1501 | slotCmbChooser3Change( cmbChooserField3->currentItem() ); |
1502 | slotCmbChooser4Change( cmbChooserField4->currentItem() ); | 1502 | slotCmbChooser4Change( cmbChooserField4->currentItem() ); |
1503 | slotAddressTypeChange( cmbAddress->currentItem() ); | 1503 | slotAddressTypeChange( cmbAddress->currentItem() ); |
1504 | 1504 | ||
1505 | updateDatePicker(); | 1505 | updateDatePicker(); |
1506 | 1506 | ||
1507 | initializing = false; | 1507 | initializing = false; |
1508 | } | 1508 | } |
1509 | void ContactEditor::updateDatePicker() | 1509 | void ContactEditor::updateDatePicker() |
1510 | { | 1510 | { |
1511 | // Set DatePicker | 1511 | // Set DatePicker |
1512 | if ( !ent.birthday().isNull() ){ | 1512 | if ( !ent.birthday().isNull() ){ |
1513 | birthdayButton->setText( TimeString::numberDateString( ent.birthday() ) ); | 1513 | birthdayButton->setText( TimeString::numberDateString( ent.birthday() ) ); |
1514 | birthdayPicker->setDate( ent.birthday() ); | 1514 | birthdayPicker->setDate( ent.birthday() ); |
1515 | } else | 1515 | } else |
1516 | birthdayButton->setText( tr ("Unknown") ); | 1516 | birthdayButton->setText( tr ("Unknown") ); |
1517 | 1517 | ||
1518 | if ( !ent.anniversary().isNull() ){ | 1518 | if ( !ent.anniversary().isNull() ){ |
1519 | anniversaryButton->setText( TimeString::numberDateString( ent.anniversary() ) ); | 1519 | anniversaryButton->setText( TimeString::numberDateString( ent.anniversary() ) ); |
1520 | anniversaryPicker->setDate( ent.anniversary() ); | 1520 | anniversaryPicker->setDate( ent.anniversary() ); |
1521 | } else | 1521 | } else |
1522 | anniversaryButton->setText( tr ("Unknown") ); | 1522 | anniversaryButton->setText( tr ("Unknown") ); |
1523 | 1523 | ||
1524 | } | 1524 | } |
1525 | 1525 | ||
1526 | void ContactEditor::saveEntry() { | 1526 | void ContactEditor::saveEntry() { |
1527 | 1527 | ||
1528 | // Store current combo into contact | 1528 | // Store current combo into contact |
1529 | contactfields.saveToRecord( ent ); | 1529 | contactfields.saveToRecord( ent ); |
1530 | 1530 | ||
1531 | if ( useFullName ) { | 1531 | if ( useFullName ) { |
1532 | txtFirstName->setText( parseName( txtFullName->text(), NAME_F ) ); | 1532 | txtFirstName->setText( parseName( txtFullName->text(), NAME_F ) ); |
1533 | txtMiddleName->setText( parseName( txtFullName->text(), NAME_M ) ); | 1533 | txtMiddleName->setText( parseName( txtFullName->text(), NAME_M ) ); |
1534 | txtLastName->setText( parseName( txtFullName->text(), NAME_L ) ); | 1534 | txtLastName->setText( parseName( txtFullName->text(), NAME_L ) ); |
1535 | txtSuffix->setText( parseName( txtFullName->text(), NAME_S ) ); | 1535 | txtSuffix->setText( parseName( txtFullName->text(), NAME_S ) ); |
1536 | 1536 | ||
1537 | useFullName = false; | 1537 | useFullName = false; |
1538 | } | 1538 | } |
1539 | 1539 | ||
1540 | ent.setFirstName( txtFirstName->text() ); | 1540 | ent.setFirstName( txtFirstName->text() ); |
1541 | ent.setLastName( txtLastName->text() ); | 1541 | ent.setLastName( txtLastName->text() ); |
1542 | ent.setMiddleName( txtMiddleName->text() ); | 1542 | ent.setMiddleName( txtMiddleName->text() ); |
1543 | ent.setSuffix( txtSuffix->text() ); | 1543 | ent.setSuffix( txtSuffix->text() ); |
1544 | 1544 | ||
1545 | ent.setFileAs( cmbFileAs->currentText() ); | 1545 | ent.setFileAs( cmbFileAs->currentText() ); |
1546 | 1546 | ||
1547 | ent.setCategories( cmbCat->currentCategories() ); | 1547 | ent.setCategories( cmbCat->currentCategories() ); |
1548 | 1548 | ||
1549 | 1549 | ||
1550 | //if (hasTitle) | 1550 | //if (hasTitle) |
1551 | ent.setJobTitle( txtJobTitle->text() ); | 1551 | ent.setJobTitle( txtJobTitle->text() ); |
1552 | 1552 | ||
1553 | //if (hasCompany) | 1553 | //if (hasCompany) |
1554 | ent.setCompany( txtOrganization->text() ); | 1554 | ent.setCompany( txtOrganization->text() ); |
1555 | 1555 | ||
1556 | //if (hasNotes) | 1556 | //if (hasNotes) |
1557 | ent.setNotes( txtNote->text() ); | 1557 | ent.setNotes( txtNote->text() ); |
1558 | 1558 | ||
1559 | //if (hasStreet) { | 1559 | //if (hasStreet) { |
1560 | ent.setHomeStreet( slHomeAddress[0] ); | 1560 | ent.setHomeStreet( slHomeAddress[0] ); |
1561 | ent.setBusinessStreet( slBusinessAddress[0] ); | 1561 | ent.setBusinessStreet( slBusinessAddress[0] ); |
1562 | //} | 1562 | //} |
1563 | 1563 | ||
1564 | //if (hasCity) { | 1564 | //if (hasCity) { |
1565 | ent.setHomeCity( slHomeAddress[3] ); | 1565 | ent.setHomeCity( slHomeAddress[3] ); |
1566 | ent.setBusinessCity( slBusinessAddress[3] ); | 1566 | ent.setBusinessCity( slBusinessAddress[3] ); |
1567 | //} | 1567 | //} |
1568 | 1568 | ||
1569 | //if (hasState) { | 1569 | //if (hasState) { |
1570 | ent.setHomeState( slHomeAddress[4] ); | 1570 | ent.setHomeState( slHomeAddress[4] ); |
1571 | ent.setBusinessState( slBusinessAddress[4] ); | 1571 | ent.setBusinessState( slBusinessAddress[4] ); |
1572 | //} | 1572 | //} |
1573 | 1573 | ||
1574 | //if (hasZip) { | 1574 | //if (hasZip) { |
1575 | ent.setHomeZip( slHomeAddress[5] ); | 1575 | ent.setHomeZip( slHomeAddress[5] ); |
1576 | ent.setBusinessZip( slBusinessAddress[5] ); | 1576 | ent.setBusinessZip( slBusinessAddress[5] ); |
1577 | //} | 1577 | //} |
1578 | 1578 | ||
1579 | //if (hasCountry) { | 1579 | //if (hasCountry) { |
1580 | ent.setHomeCountry( slHomeAddress[6] ); | 1580 | ent.setHomeCountry( slHomeAddress[6] ); |
1581 | ent.setBusinessCountry( slBusinessAddress[6] ); | 1581 | ent.setBusinessCountry( slBusinessAddress[6] ); |
1582 | //} | 1582 | //} |
1583 | 1583 | ||
1584 | QStringList::ConstIterator it; | 1584 | QStringList::ConstIterator it; |
1585 | QListIterator<QLineEdit> itLE( listValue ); | 1585 | QListIterator<QLineEdit> itLE( listValue ); |
1586 | for ( it = slDynamicEntries.begin(); itLE.current() && it != slDynamicEntries.end(); ++it, ++itLE) { | 1586 | for ( it = slDynamicEntries.begin(); itLE.current() && it != slDynamicEntries.end(); ++it, ++itLE) { |
1587 | 1587 | ||
1588 | if ( *it == "Department" ) | 1588 | if ( *it == "Department" ) |
1589 | ent.setDepartment( (*itLE)->text() ); | 1589 | ent.setDepartment( (*itLE)->text() ); |
1590 | 1590 | ||
1591 | if ( *it == "Company" ) | 1591 | if ( *it == "Company" ) |
1592 | ent.setCompany( (*itLE)->text() ); | 1592 | ent.setCompany( (*itLE)->text() ); |
1593 | 1593 | ||
1594 | if ( *it == "Office" ) | 1594 | if ( *it == "Office" ) |
1595 | ent.setOffice( (*itLE)->text() ); | 1595 | ent.setOffice( (*itLE)->text() ); |
1596 | 1596 | ||
1597 | if ( *it == "Profession" ) | 1597 | if ( *it == "Profession" ) |
1598 | ent.setProfession( (*itLE)->text() ); | 1598 | ent.setProfession( (*itLE)->text() ); |
1599 | 1599 | ||
1600 | if ( *it == "Assistant" ) | 1600 | if ( *it == "Assistant" ) |
1601 | ent.setAssistant( (*itLE)->text() ); | 1601 | ent.setAssistant( (*itLE)->text() ); |
1602 | 1602 | ||
1603 | if ( *it == "Manager" ) | 1603 | if ( *it == "Manager" ) |
1604 | ent.setManager( (*itLE)->text() ); | 1604 | ent.setManager( (*itLE)->text() ); |
1605 | 1605 | ||
1606 | if ( *it == "Spouse" ) | 1606 | if ( *it == "Spouse" ) |
1607 | ent.setSpouse( (*itLE)->text() ); | 1607 | ent.setSpouse( (*itLE)->text() ); |
1608 | 1608 | ||
1609 | if ( *it == "Nickname" ) | 1609 | if ( *it == "Nickname" ) |
1610 | ent.setNickname( (*itLE)->text() ); | 1610 | ent.setNickname( (*itLE)->text() ); |
1611 | 1611 | ||
1612 | if ( *it == "Children" ) | 1612 | if ( *it == "Children" ) |
1613 | ent.setChildren( (*itLE)->text() ); | 1613 | ent.setChildren( (*itLE)->text() ); |
1614 | 1614 | ||
1615 | } | 1615 | } |
1616 | 1616 | ||
1617 | 1617 | ||
1618 | QStringList::ConstIterator itV; | 1618 | QStringList::ConstIterator itV; |
1619 | for ( it = slChooserNames.begin(), itV = slChooserValues.begin(); it != slChooserNames.end(); ++it, ++itV ) { | 1619 | for ( it = slChooserNames.begin(), itV = slChooserValues.begin(); it != slChooserNames.end(); ++it, ++itV ) { |
1620 | 1620 | ||
1621 | if ( ( *it == "Business Phone" ) || ( *it == "Work Phone" ) ) | 1621 | if ( ( *it == "Business Phone" ) || ( *it == "Work Phone" ) ) |
1622 | ent.setBusinessPhone( *itV ); | 1622 | ent.setBusinessPhone( *itV ); |
1623 | 1623 | ||
1624 | if ( ( *it == "Business Fax" ) || ( *it == "Work Fax" ) ) | 1624 | if ( ( *it == "Business Fax" ) || ( *it == "Work Fax" ) ) |
1625 | ent.setBusinessFax( *itV ); | 1625 | ent.setBusinessFax( *itV ); |
1626 | 1626 | ||
1627 | if ( ( *it == "Business Mobile" ) || ( *it == "Work Mobile" ) ) | 1627 | if ( ( *it == "Business Mobile" ) || ( *it == "Work Mobile" ) ) |
1628 | ent.setBusinessMobile( *itV ); | 1628 | ent.setBusinessMobile( *itV ); |
1629 | 1629 | ||
1630 | if ( *it == "Emails" ){ | 1630 | if ( *it == "Emails" ){ |
1631 | QString allemail; | 1631 | QString allemail; |
1632 | QString defaultmail; | 1632 | QString defaultmail; |
1633 | parseEmailFrom( emails.join(","), defaultmail, allemail ); | 1633 | parseEmailFrom( emails.join(","), defaultmail, allemail ); |
1634 | if ( defaultEmail.isEmpty() ){ | 1634 | if ( defaultEmail.isEmpty() ){ |
1635 | qWarning("Default email was not set by user!"); | 1635 | qWarning("Default email was not set by user!"); |
1636 | qWarning("Using first email in list: %s", defaultmail.latin1()); | 1636 | qWarning("Using first email in list: %s", defaultmail.latin1()); |
1637 | ent.setDefaultEmail( defaultmail ); | 1637 | ent.setDefaultEmail( defaultmail ); |
1638 | } | 1638 | } |
1639 | ent.setEmails( allemail ); | 1639 | ent.setEmails( allemail ); |
1640 | } | 1640 | } |
1641 | 1641 | ||
1642 | if ( *it == "Default Email") | 1642 | if ( *it == "Default Email") |
1643 | ent.setDefaultEmail( defaultEmail /* *itV */ ); | 1643 | ent.setDefaultEmail( defaultEmail /* *itV */ ); |
1644 | 1644 | ||
1645 | if ( *it == "Home Phone" ) | 1645 | if ( *it == "Home Phone" ) |
1646 | ent.setHomePhone( *itV ); | 1646 | ent.setHomePhone( *itV ); |
1647 | 1647 | ||
1648 | if ( *it == "Home Fax" ) | 1648 | if ( *it == "Home Fax" ) |
1649 | ent.setHomeFax( *itV ); | 1649 | ent.setHomeFax( *itV ); |
1650 | 1650 | ||
1651 | if ( *it == "Home Mobile" ) | 1651 | if ( *it == "Home Mobile" ) |
1652 | ent.setHomeMobile( *itV ); | 1652 | ent.setHomeMobile( *itV ); |
1653 | 1653 | ||
1654 | if ( ( *it == "Business Pager" ) || ( *it == "Work Pager" ) ) | 1654 | if ( ( *it == "Business Pager" ) || ( *it == "Work Pager" ) ) |
1655 | ent.setBusinessPager( *itV ); | 1655 | ent.setBusinessPager( *itV ); |
1656 | 1656 | ||
1657 | if ( *it == "Home Web Page" ) | 1657 | if ( *it == "Home Web Page" ) |
1658 | ent.setHomeWebpage( *itV ); | 1658 | ent.setHomeWebpage( *itV ); |
1659 | 1659 | ||
1660 | if ( ( *it == "Business WebPage" ) || ( *it == "Work Web Page" ) ) | 1660 | if ( ( *it == "Business WebPage" ) || ( *it == "Work Web Page" ) ) |
1661 | ent.setBusinessWebpage( *itV ); | 1661 | ent.setBusinessWebpage( *itV ); |
1662 | 1662 | ||
1663 | 1663 | ||
1664 | } | 1664 | } |
1665 | 1665 | ||
1666 | int gender = cmbGender->currentItem(); | 1666 | int gender = cmbGender->currentItem(); |
1667 | ent.setGender( QString::number( gender ) ); | 1667 | ent.setGender( QString::number( gender ) ); |
1668 | 1668 | ||
1669 | QString str = txtNote->text(); | 1669 | QString str = txtNote->text(); |
1670 | if ( !str.isNull() ) | 1670 | if ( !str.isNull() ) |
1671 | ent.setNotes( str ); | 1671 | ent.setNotes( str ); |
1672 | 1672 | ||
1673 | } | 1673 | } |
1674 | 1674 | ||
1675 | void parseEmailFrom( const QString &txt, QString &strDefaultEmail, | 1675 | void parseEmailFrom( const QString &txt, QString &strDefaultEmail, |
1676 | QString &strAll ) | 1676 | QString &strAll ) |
1677 | { | 1677 | { |
1678 | int where, | 1678 | int where, |
1679 | start; | 1679 | start; |
1680 | if ( txt.isEmpty() ) | 1680 | if ( txt.isEmpty() ) |
1681 | return; | 1681 | return; |
1682 | // find the first | 1682 | // find the first |
1683 | where = txt.find( ',' ); | 1683 | where = txt.find( ',' ); |
1684 | if ( where < 0 ) { | 1684 | if ( where < 0 ) { |
1685 | strDefaultEmail = txt; | 1685 | strDefaultEmail = txt; |
1686 | strAll = txt; | 1686 | strAll = txt; |
1687 | } else { | 1687 | } else { |
1688 | strDefaultEmail = txt.left( where ).stripWhiteSpace(); | 1688 | strDefaultEmail = txt.left( where ).stripWhiteSpace(); |
1689 | strAll = strDefaultEmail; | 1689 | strAll = strDefaultEmail; |
1690 | while ( where > -1 ) { | 1690 | while ( where > -1 ) { |
1691 | strAll.append(" "); | 1691 | strAll.append(" "); |
1692 | start = where; | 1692 | start = where; |
1693 | where = txt.find( ',', where + 1 ); | 1693 | where = txt.find( ',', where + 1 ); |
1694 | if ( where > - 1 ) | 1694 | if ( where > - 1 ) |
1695 | strAll.append( txt.mid(start + 1, where - start - 1).stripWhiteSpace() ); | 1695 | strAll.append( txt.mid(start + 1, where - start - 1).stripWhiteSpace() ); |
1696 | else // grab until the end... | 1696 | else // grab until the end... |
1697 | strAll.append( txt.right(txt.length() - start - 1).stripWhiteSpace() ); | 1697 | strAll.append( txt.right(txt.length() - start - 1).stripWhiteSpace() ); |
1698 | } | 1698 | } |
1699 | } | 1699 | } |
1700 | } | 1700 | } |
1701 | 1701 | ||
1702 | void parseEmailTo( const QString &strDefaultEmail, | 1702 | void parseEmailTo( const QString &strDefaultEmail, |
1703 | const QString &strOtherEmail, QString &strBack ) | 1703 | const QString &strOtherEmail, QString &strBack ) |
1704 | { | 1704 | { |
1705 | // create a comma dilimeted set of emails... | 1705 | // create a comma dilimeted set of emails... |
1706 | // use the power of short circuiting... | 1706 | // use the power of short circuiting... |
1707 | bool foundDefault = false; | 1707 | bool foundDefault = false; |
1708 | QString strTmp; | 1708 | QString strTmp; |
1709 | int start = 0; | 1709 | int start = 0; |
1710 | int where; | 1710 | int where; |
1711 | // start at the beginng. | 1711 | // start at the beginng. |
1712 | strBack = strDefaultEmail; | 1712 | strBack = strDefaultEmail; |
1713 | where = 0; | 1713 | where = 0; |
1714 | while ( where > -1 ) { | 1714 | while ( where > -1 ) { |
1715 | start = where; | 1715 | start = where; |
1716 | where = strOtherEmail.find( ' ', where + 1 ); | 1716 | where = strOtherEmail.find( ' ', where + 1 ); |
1717 | if ( where > 0 ) { | 1717 | if ( where > 0 ) { |
1718 | strTmp = strOtherEmail.mid( start, where - start ).stripWhiteSpace(); | 1718 | strTmp = strOtherEmail.mid( start, where - start ).stripWhiteSpace(); |
1719 | } else | 1719 | } else |
1720 | strTmp = strOtherEmail.right( strOtherEmail.length() - start ).stripWhiteSpace(); | 1720 | strTmp = strOtherEmail.right( strOtherEmail.length() - start ).stripWhiteSpace(); |
1721 | if ( foundDefault || strTmp != strDefaultEmail ) { | 1721 | if ( foundDefault || strTmp != strDefaultEmail ) { |
1722 | strBack.append( ", " ); | 1722 | strBack.append( ", " ); |
1723 | strBack.append( strTmp ); | 1723 | strBack.append( strTmp ); |
1724 | } else | 1724 | } else |
1725 | foundDefault = true; | 1725 | foundDefault = true; |
1726 | } | 1726 | } |
1727 | } | 1727 | } |
1728 | 1728 | ||
1729 | 1729 | ||
1730 | static inline bool containsAlphaNum( const QString &str ) | 1730 | static inline bool containsAlphaNum( const QString &str ) |
1731 | { | 1731 | { |
1732 | int i, | 1732 | int i, |
1733 | count = str.length(); | 1733 | count = str.length(); |
1734 | for ( i = 0; i < count; i++ ) | 1734 | for ( i = 0; i < count; i++ ) |
1735 | if ( !str[i].isSpace() ) | 1735 | if ( !str[i].isSpace() ) |
1736 | return TRUE; | 1736 | return TRUE; |
1737 | return FALSE; | 1737 | return FALSE; |
1738 | } | 1738 | } |
1739 | 1739 | ||
1740 | static inline bool constainsWhiteSpace( const QString &str ) | 1740 | static inline bool constainsWhiteSpace( const QString &str ) |
1741 | { | 1741 | { |
1742 | int i, | 1742 | int i, |
1743 | count = str.length(); | 1743 | count = str.length(); |
1744 | for (i = 0; i < count; i++ ) | 1744 | for (i = 0; i < count; i++ ) |
1745 | if ( str[i].isSpace() ) | 1745 | if ( str[i].isSpace() ) |
1746 | return TRUE; | 1746 | return TRUE; |
1747 | return FALSE; | 1747 | return FALSE; |
1748 | } | 1748 | } |
1749 | 1749 | ||
1750 | void ContactEditor::setPersonalView( bool personal ) | 1750 | void ContactEditor::setPersonalView( bool personal ) |
1751 | { | 1751 | { |
1752 | m_personalView = personal; | 1752 | m_personalView = personal; |
1753 | 1753 | ||
1754 | // Currently disbled due to the fact that | 1754 | // Currently disbled due to the fact that |
1755 | // show will not work... | 1755 | // show will not work... |
1756 | return; | 1756 | return; |
1757 | 1757 | ||
1758 | if ( personal ){ | 1758 | if ( personal ){ |
1759 | cmbCat->hide(); | 1759 | cmbCat->hide(); |
1760 | labCat->hide(); | 1760 | labCat->hide(); |
1761 | 1761 | ||
1762 | } else{ | 1762 | } else{ |
1763 | cmbCat->show(); | 1763 | cmbCat->show(); |
1764 | labCat->show(); | 1764 | labCat->show(); |
1765 | } | 1765 | } |
1766 | } | 1766 | } |
1767 | 1767 | ||
1768 | void ContactEditor::slotAnniversaryDateChanged( int year, int month, int day) | 1768 | void ContactEditor::slotAnniversaryDateChanged( int year, int month, int day) |
1769 | { | 1769 | { |
1770 | QDate date; | 1770 | QDate date; |
1771 | date.setYMD( year, month, day ); | 1771 | date.setYMD( year, month, day ); |
1772 | QString dateString = TimeString::numberDateString( date ); | 1772 | QString dateString = TimeString::numberDateString( date ); |
1773 | anniversaryButton->setText( dateString ); | 1773 | anniversaryButton->setText( dateString ); |
1774 | ent.setAnniversary ( date ); | 1774 | ent.setAnniversary ( date ); |
1775 | } | 1775 | } |
1776 | 1776 | ||
1777 | void ContactEditor::slotBirthdayDateChanged( int year, int month, int day) | 1777 | void ContactEditor::slotBirthdayDateChanged( int year, int month, int day) |
1778 | { | 1778 | { |
1779 | QDate date; | 1779 | QDate date; |
1780 | date.setYMD( year, month, day ); | 1780 | date.setYMD( year, month, day ); |
1781 | QString dateString = TimeString::numberDateString( date ); | 1781 | QString dateString = TimeString::numberDateString( date ); |
1782 | birthdayButton->setText( dateString ); | 1782 | birthdayButton->setText( dateString ); |
1783 | ent.setBirthday ( date ); | 1783 | ent.setBirthday ( date ); |
1784 | } | 1784 | } |
1785 | 1785 | ||
1786 | void ContactEditor::slotRemoveBirthday() | 1786 | void ContactEditor::slotRemoveBirthday() |
1787 | { | 1787 | { |
1788 | qWarning("void ContactEditor::slotRemoveBirthday()"); | 1788 | qWarning("void ContactEditor::slotRemoveBirthday()"); |
1789 | ent.setBirthday( QDate() ); | 1789 | ent.setBirthday( QDate() ); |
1790 | updateDatePicker(); | 1790 | updateDatePicker(); |
1791 | } | 1791 | } |
1792 | 1792 | ||
1793 | void ContactEditor::slotRemoveAnniversary() | 1793 | void ContactEditor::slotRemoveAnniversary() |
1794 | { | 1794 | { |
1795 | qWarning("void ContactEditor::slotRemoveAnniversary()"); | 1795 | qWarning("void ContactEditor::slotRemoveAnniversary()"); |
1796 | ent.setAnniversary( QDate() ); | 1796 | ent.setAnniversary( QDate() ); |
1797 | updateDatePicker(); | 1797 | updateDatePicker(); |
1798 | } | 1798 | } |
diff --git a/core/pim/addressbook/version.h b/core/pim/addressbook/version.h index e716fe4..3c1e5ee 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 "0" | 6 | #define PATCHVERSION "1" |
7 | 7 | ||
8 | #define APPNAME "OPIE_ADDRESSBOOK" | 8 | #define APPNAME "OPIE_ADDRESSBOOK" |
9 | 9 | ||
10 | #endif | 10 | #endif |