1 #include "frmContactEditor.h"
3 void frmContactEditor::ClearContact(){
5 // Clear out the GUI and values.
12 txtOtherNames->Clear();
14 cmbDisplayAs->Clear();
15 cmbDisplayAs->SetValue(wxT(""));
18 dapAnniversary->SetValue(EmptyDate);
19 dapBirthday->SetValue(EmptyDate);
21 txtAnniversary->Clear();
23 txtGenderDescription->Clear();
25 lboNicknames->DeleteAllItems();
26 lboHomeNicknames->DeleteAllItems();
27 lboBusinessNicknames->DeleteAllItems();
29 lboAddresses->DeleteAllItems();
30 lboHomeAddresses->DeleteAllItems();
31 lboBusinessAddresses->DeleteAllItems();
33 lboEmails->DeleteAllItems();
34 lboHomeEmails->DeleteAllItems();
35 lboBusinessEmail->DeleteAllItems();
37 lboIM->DeleteAllItems();
38 lboHomeIM->DeleteAllItems();
39 lboBusinessIM->DeleteAllItems();
41 lboTelephone->DeleteAllItems();
42 lboHomeTelephone->DeleteAllItems();
43 lboBusinessTelephone->DeleteAllItems();
45 lboLanguages->DeleteAllItems();
46 lboHomeLanguages->DeleteAllItems();
47 lboBusinessLanguages->DeleteAllItems();
49 lboTimezones->DeleteAllItems();
50 lboHomeTimezones->DeleteAllItems();
51 lboBusinessTimezones->DeleteAllItems();
53 lboGeoposition->DeleteAllItems();
54 lboHomeGeoposition->DeleteAllItems();
55 lboBusinessGeoposition->DeleteAllItems();
57 lboRelated->DeleteAllItems();
59 lboWebsites->DeleteAllItems();
60 lboHomeWebsites->DeleteAllItems();
61 lboBusinessWebsites->DeleteAllItems();
63 lboTitles->DeleteAllItems();
64 lboHomeTitles->DeleteAllItems();
65 lboBusinessTitles->DeleteAllItems();
67 lboRoles->DeleteAllItems();
68 lboHomeRoles->DeleteAllItems();
69 lboBusinessRoles->DeleteAllItems();
71 lboOrganisations->DeleteAllItems();
72 lboHomeOrganisations->DeleteAllItems();
73 lboBusinessOrganisations->DeleteAllItems();
75 lboNotes->DeleteAllItems();
76 lboHomeNotes->DeleteAllItems();
77 lboBusinessNotes->DeleteAllItems();
79 lboCategories->DeleteAllItems();
81 lboGroups->DeleteAllItems();
84 lboPictures->DeleteAllItems();
85 imgPicture->SetBitmap(EmptyBitmap);
88 lboLogos->DeleteAllItems();
89 imgLogo->SetBitmap(EmptyBitmap);
91 lboSounds->DeleteAllItems();
93 lboCalendarAddresses->DeleteAllItems();
94 lboCalendarRequestAddress->DeleteAllItems();
95 lboFreeBusyAddresses->DeleteAllItems();
97 lboKeys->DeleteAllItems();
99 lboVendorNamespace->DeleteAllItems();
100 lboXToken->DeleteAllItems();
105 wxString NameForename;
106 wxString NameSurname;
107 wxString NameOtherNames;
109 wxString NameNickname;
110 wxString NameDisplayAs;
111 wxString NameLanguage;
116 wxString BirthdayAltID;
117 wxString BirthdayCalScale;
118 wxString BirthdayTokens;
119 wxString Anniversary;
120 wxString AnniversaryAltID;
121 wxString AnniversaryCalScale;
122 wxString AnniversaryTokens;
125 wxString GenderDetails;
126 wxString GenderTokens;
130 /* We don't use these at the moment but we want to keep
131 them for compatability reasons */
133 /*std::map<int, wxString> ExtraFullNames;*/
134 /*std::map<int, wxString> ExtraNicknames;*/
136 FullNamesList.clear();
137 FullNamesListType.clear();
138 FullNamesListLanguage.clear();
139 FullNamesListAltID.clear();
140 FullNamesListPID.clear();
141 FullNamesListTokens.clear();
142 FullNamesListPref.clear();
144 GeneralNicknamesList.clear();
145 GeneralNicknamesListType.clear();
146 GeneralNicknamesListLanguage.clear();
147 GeneralNicknamesListAltID.clear();
148 GeneralNicknamesListPID.clear();
149 GeneralNicknamesListTokens.clear();
150 GeneralNicknamesListPref.clear();
152 GeneralAddressList.clear();
153 GeneralAddressListTown.clear();
154 GeneralAddressListCounty.clear();
155 GeneralAddressListPostCode.clear();
156 GeneralAddressListCountry.clear();
157 GeneralAddressListLabel.clear();
158 GeneralAddressListLang.clear();
159 GeneralAddressListAltID.clear();
160 GeneralAddressListPID.clear();
161 GeneralAddressListTokens.clear();
162 GeneralAddressListGeo.clear();
163 GeneralAddressListTimezone.clear();
164 GeneralAddressListType.clear();
165 GeneralAddressListMediatype.clear();
166 GeneralAddressListPref.clear();
168 GeneralEmailList.clear();
169 GeneralEmailListAltID.clear();
170 GeneralEmailListPID.clear();
171 GeneralEmailListType.clear();
172 GeneralEmailListTokens.clear();
173 GeneralEmailListPref.clear();
175 GeneralIMList.clear();
176 GeneralIMListAltID.clear();
177 GeneralIMListPID.clear();
178 GeneralIMListType.clear();
179 GeneralIMListTokens.clear();
180 GeneralIMListMediatype.clear();
181 GeneralIMListPref.clear();
183 GeneralTelephoneList.clear();
184 GeneralTelephoneListAltID.clear();
185 GeneralTelephoneListPID.clear();
186 GeneralTelephoneListType.clear();
187 GeneralTelephoneListTokens.clear();
188 GeneralTelephoneListPref.clear();
190 GeneralLanguageList.clear();
191 GeneralLanguageListAltID.clear();
192 GeneralLanguageListPID.clear();
193 GeneralLanguageListType.clear();
194 GeneralLanguageListTokens.clear();
195 GeneralLanguageListPref.clear();
197 GeneralTZList.clear();
198 GeneralTZListAltID.clear();
199 GeneralTZListPID.clear();
200 GeneralTZListType.clear();
201 GeneralTZListTokens.clear();
202 GeneralTZListMediatype.clear();
203 GeneralTZListPref.clear();
205 GeneralGeographyList.clear();
206 GeneralGeographyListAltID.clear();
207 GeneralGeographyListPID.clear();
208 GeneralGeographyListType.clear();
209 GeneralGeographyListTokens.clear();
210 GeneralGeographyListMediatype.clear();
211 GeneralGeographyListPref.clear();
213 GeneralRelatedList.clear();
214 GeneralRelatedListRelType.clear();
215 GeneralRelatedListLanguage.clear();
216 GeneralRelatedListAltID.clear();
217 GeneralRelatedListPID.clear();
218 GeneralRelatedListType.clear();
219 GeneralRelatedListTokens.clear();
220 GeneralRelatedListPref.clear();
222 GeneralWebsiteList.clear();
223 GeneralWebsiteListAltID.clear();
224 GeneralWebsiteListPID.clear();
225 GeneralWebsiteListType.clear();
226 GeneralWebsiteListTokens.clear();
227 GeneralWebsiteListMediatype.clear();
228 GeneralWebsiteListPref.clear();
230 GeneralTitleList.clear();
231 GeneralTitleListLanguage.clear();
232 GeneralTitleListAltID.clear();
233 GeneralTitleListPID.clear();
234 GeneralTitleListType.clear();
235 GeneralTitleListTokens.clear();
236 GeneralTitleListPref.clear();
238 GeneralRoleList.clear();
239 GeneralRoleListLanguage.clear();
240 GeneralRoleListAltID.clear();
241 GeneralRoleListPID.clear();
242 GeneralRoleListType.clear();
243 GeneralRoleListTokens.clear();
244 GeneralRoleListPref.clear();
246 GeneralOrganisationsList.clear();
247 GeneralOrganisationsListLanguage.clear();
248 GeneralOrganisationsListAltID.clear();
249 GeneralOrganisationsListPID.clear();
250 GeneralOrganisationsListType.clear();
251 GeneralOrganisationsListTokens.clear();
252 GeneralOrganisationsListSortAs.clear();
253 GeneralOrganisationsListPref.clear();
255 GeneralNoteList.clear();
256 GeneralNoteListLanguage.clear();
257 GeneralNoteListAltID.clear();
258 GeneralNoteListPID.clear();
259 GeneralNoteListType.clear();
260 GeneralNoteListTokens.clear();
261 GeneralNoteListPref.clear();
263 /* Items on Home Tab */
265 HomeNicknamesList.clear();
266 HomeNicknamesListType.clear();
267 HomeNicknamesListLanguage.clear();
268 HomeNicknamesListAltID.clear();
269 HomeNicknamesListPID.clear();
270 HomeNicknamesListTokens.clear();
271 HomeNicknamesListPref.clear();
273 HomeAddressList.clear();
274 HomeAddressListTown.clear();
275 HomeAddressListCounty.clear();
276 HomeAddressListPostCode.clear();
277 HomeAddressListCountry.clear();
278 HomeAddressListLabel.clear();
279 HomeAddressListLang.clear();
280 HomeAddressListAltID.clear();
281 HomeAddressListPID.clear();
282 HomeAddressListTokens.clear();
283 HomeAddressListGeo.clear();
284 HomeAddressListTimezone.clear();
285 HomeAddressListType.clear();
286 HomeAddressListMediatype.clear();
287 HomeAddressListPref.clear();
289 HomeEmailList.clear();
290 HomeEmailListAltID.clear();
291 HomeEmailListPID.clear();
292 HomeEmailListType.clear();
293 HomeEmailListTokens.clear();
294 HomeEmailListPref.clear();
297 HomeIMListAltID.clear();
298 HomeIMListPID.clear();
299 HomeIMListType.clear();
300 HomeIMListTokens.clear();
301 HomeIMListMediatype.clear();
302 HomeIMListPref.clear();
304 HomeTelephoneList.clear();
305 HomeTelephoneListAltID.clear();
306 HomeTelephoneListPID.clear();
307 HomeTelephoneListType.clear();
308 HomeTelephoneListTokens.clear();
309 HomeTelephoneListPref.clear();
311 HomeLanguageList.clear();
312 HomeLanguageListAltID.clear();
313 HomeLanguageListPID.clear();
314 HomeLanguageListType.clear();
315 HomeLanguageListTokens.clear();
316 HomeLanguageListPref.clear();
319 HomeTZListAltID.clear();
320 HomeTZListPID.clear();
321 HomeTZListType.clear();
322 HomeTZListTokens.clear();
323 HomeTZListMediatype.clear();
324 HomeTZListPref.clear();
326 HomeGeographyList.clear();
327 HomeGeographyListAltID.clear();
328 HomeGeographyListPID.clear();
329 HomeGeographyListType.clear();
330 HomeGeographyListTokens.clear();
331 HomeGeographyListMediatype.clear();
332 HomeGeographyListPref.clear();
334 HomeRelatedList.clear();
335 HomeRelatedListRelType.clear();
336 HomeRelatedListLanguage.clear();
337 HomeRelatedListAltID.clear();
338 HomeRelatedListPID.clear();
339 HomeRelatedListType.clear();
340 HomeRelatedListTokens.clear();
341 HomeRelatedListPref.clear();
343 HomeWebsiteList.clear();
344 HomeWebsiteListAltID.clear();
345 HomeWebsiteListPID.clear();
346 HomeWebsiteListType.clear();
347 HomeWebsiteListTokens.clear();
348 HomeWebsiteListMediatype.clear();
349 HomeWebsiteListPref.clear();
351 HomeTitleList.clear();
352 HomeTitleListLanguage.clear();
353 HomeTitleListAltID.clear();
354 HomeTitleListPID.clear();
355 HomeTitleListType.clear();
356 HomeTitleListTokens.clear();
357 HomeTitleListPref.clear();
359 HomeRoleList.clear();
360 HomeRoleListLanguage.clear();
361 HomeRoleListAltID.clear();
362 HomeRoleListPID.clear();
363 HomeRoleListType.clear();
364 HomeRoleListTokens.clear();
365 HomeRoleListPref.clear();
367 HomeOrganisationsList.clear();
368 HomeOrganisationsListLanguage.clear();
369 HomeOrganisationsListAltID.clear();
370 HomeOrganisationsListPID.clear();
371 HomeOrganisationsListType.clear();
372 HomeOrganisationsListTokens.clear();
373 HomeOrganisationsListSortAs.clear();
374 HomeOrganisationsListPref.clear();
376 HomeNoteList.clear();
377 HomeNoteListLanguage.clear();
378 HomeNoteListAltID.clear();
379 HomeNoteListPID.clear();
380 HomeNoteListType.clear();
381 HomeNoteListTokens.clear();
382 HomeNoteListPref.clear();
384 /* Items on the Business tab */
386 BusinessNicknamesList.clear();
387 BusinessNicknamesListType.clear();
388 BusinessNicknamesListLanguage.clear();
389 BusinessNicknamesListAltID.clear();
390 BusinessNicknamesListPID.clear();
391 BusinessNicknamesListTokens.clear();
392 BusinessNicknamesListPref.clear();
394 BusinessAddressList.clear();
395 BusinessAddressListTown.clear();
396 BusinessAddressListCounty.clear();
397 BusinessAddressListPostCode.clear();
398 BusinessAddressListCountry.clear();
399 BusinessAddressListLabel.clear();
400 BusinessAddressListLang.clear();
401 BusinessAddressListAltID.clear();
402 BusinessAddressListPID.clear();
403 BusinessAddressListTokens.clear();
404 BusinessAddressListGeo.clear();
405 BusinessAddressListTimezone.clear();
406 BusinessAddressListType.clear();
407 BusinessAddressListMediatype.clear();
408 BusinessAddressListPref.clear();
410 BusinessEmailList.clear();
411 BusinessEmailListAltID.clear();
412 BusinessEmailListPID.clear();
413 BusinessEmailListType.clear();
414 BusinessEmailListTokens.clear();
415 BusinessEmailListPref.clear();
417 BusinessIMList.clear();
418 BusinessIMListAltID.clear();
419 BusinessIMListPID.clear();
420 BusinessIMListType.clear();
421 BusinessIMListTokens.clear();
422 BusinessIMListMediatype.clear();
423 BusinessIMListPref.clear();
425 BusinessTelephoneList.clear();
426 BusinessTelephoneListAltID.clear();
427 BusinessTelephoneListPID.clear();
428 BusinessTelephoneListType.clear();
429 BusinessTelephoneListTokens.clear();
430 BusinessTelephoneListPref.clear();
432 BusinessLanguageList.clear();
433 BusinessLanguageListAltID.clear();
434 BusinessLanguageListPID.clear();
435 BusinessLanguageListType.clear();
436 BusinessLanguageListTokens.clear();
437 BusinessLanguageListPref.clear();
439 BusinessTZList.clear();
440 BusinessTZListAltID.clear();
441 BusinessTZListPID.clear();
442 BusinessTZListType.clear();
443 BusinessTZListTokens.clear();
444 BusinessTZListMediatype.clear();
445 BusinessTZListPref.clear();
447 BusinessGeographyList.clear();
448 BusinessGeographyListAltID.clear();
449 BusinessGeographyListPID.clear();
450 BusinessGeographyListType.clear();
451 BusinessGeographyListTokens.clear();
452 BusinessGeographyListMediatype.clear();
453 BusinessGeographyListPref.clear();
455 BusinessRelatedList.clear();
456 BusinessRelatedListRelType.clear();
457 BusinessRelatedListLanguage.clear();
458 BusinessRelatedListAltID.clear();
459 BusinessRelatedListPID.clear();
460 BusinessRelatedListType.clear();
461 BusinessRelatedListTokens.clear();
462 BusinessRelatedListPref.clear();
464 BusinessWebsiteList.clear();
465 BusinessWebsiteListAltID.clear();
466 BusinessWebsiteListPID.clear();
467 BusinessWebsiteListType.clear();
468 BusinessWebsiteListTokens.clear();
469 BusinessWebsiteListMediatype.clear();
470 BusinessWebsiteListPref.clear();
472 BusinessTitleList.clear();
473 BusinessTitleListLanguage.clear();
474 BusinessTitleListAltID.clear();
475 BusinessTitleListPID.clear();
476 BusinessTitleListType.clear();
477 BusinessTitleListTokens.clear();
478 BusinessTitleListPref.clear();
480 BusinessRoleList.clear();
481 BusinessRoleListLanguage.clear();
482 BusinessRoleListAltID.clear();
483 BusinessRoleListPID.clear();
484 BusinessRoleListType.clear();
485 BusinessRoleListTokens.clear();
486 BusinessRoleListPref.clear();
488 BusinessOrganisationsList.clear();
489 BusinessOrganisationsListLanguage.clear();
490 BusinessOrganisationsListAltID.clear();
491 BusinessOrganisationsListPID.clear();
492 BusinessOrganisationsListType.clear();
493 BusinessOrganisationsListTokens.clear();
494 BusinessOrganisationsListSortAs.clear();
495 BusinessOrganisationsListPref.clear();
497 BusinessNoteList.clear();
498 BusinessNoteListLanguage.clear();
499 BusinessNoteListAltID.clear();
500 BusinessNoteListPID.clear();
501 BusinessNoteListType.clear();
502 BusinessNoteListTokens.clear();
503 BusinessNoteListPref.clear();
505 /* Items on the Categories tab */
507 CategoriesList.clear();
508 CategoriesListAltID.clear();
509 CategoriesListPID.clear();
510 CategoriesListType.clear();
511 CategoriesListTokens.clear();
512 CategoriesListPref.clear();
514 /* Items on the Groups tab */
517 GroupsListAltID.clear();
518 GroupsListPID.clear();
519 GroupsListType.clear();
520 GroupsListTokens.clear();
521 GroupsListPref.clear();
523 /* Items on the Pictures tab */
525 PicturesList.clear();
526 PicturesListAltID.clear();
527 PicturesListPID.clear();
528 PicturesListType.clear();
529 PicturesListPicEncType.clear();
530 PicturesListPictureType.clear();
531 PicturesListTokens.clear();
532 PicturesListMediatype.clear();
533 PicturesListPref.clear();
535 /* Items on the Logos tab */
538 LogosListAltID.clear();
539 LogosListPID.clear();
540 LogosListType.clear();
541 LogosListPicEncType.clear();
542 LogosListPictureType.clear();
543 LogosListTokens.clear();
544 LogosListMediatype.clear();
545 LogosListPref.clear();
547 /* Items on the Sounds tab */
550 SoundsListAltID.clear();
551 SoundsListPID.clear();
552 SoundsListType.clear();
553 SoundsListAudioEncType.clear();
554 SoundsListAudioType.clear();
555 SoundsListTokens.clear();
556 SoundsListMediatype.clear();
557 SoundsListPref.clear();
559 /* Items on the Calendaring tab */
561 CalendarList.clear();
562 CalendarListAltID.clear();
563 CalendarListPID.clear();
564 CalendarListType.clear();
565 CalendarListTokens.clear();
566 CalendarListMediatype.clear();
567 CalendarListPref.clear();
569 CalendarRequestList.clear();
570 CalendarRequestListAltID.clear();
571 CalendarRequestListPID.clear();
572 CalendarRequestListType.clear();
573 CalendarRequestListTokens.clear();
574 CalendarRequestListMediatype.clear();
575 CalendarRequestListPref.clear();
577 FreeBusyList.clear();
578 FreeBusyListAltID.clear();
579 FreeBusyListPID.clear();
580 FreeBusyListType.clear();
581 FreeBusyListTokens.clear();
582 FreeBusyListMediatype.clear();
583 FreeBusyListPref.clear();
585 /* Items on the Security tab */
588 KeyListAltID.clear();
590 KeyListKeyType.clear();
591 KeyListDataType.clear();
592 KeyListDataEncType.clear();
594 KeyListTokens.clear();
597 /* Items on the Other tab */
600 VendorListPEN.clear();
601 VendorListElement.clear();
604 XTokenListTokens.clear();
606 wxSContactFilename.Clear();
607 boolContactModified = FALSE;
608 intSeekSelectedData = 0;
610 /* Section for saving/loading data */
613 ETagOriginal.Clear();
624 BinaryDataProc = FALSE;
628 PictureImage = wxNullBitmap;
629 LogoImage = wxNullBitmap;