Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Updated TEL processing when saving a contact with frmContactEditor
[xestiaab/.git] / source / contacteditor / frmContactEditor-Home.cpp
1 // frmContactEditor-Home.cpp - frmContactEditor Home tab subroutines.
2 //
3 // (c) 2012-2016 Xestia Software Development.
4 //
5 // This file is part of Xestia Address Book.
6 //
7 // Xestia Address Book is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by the
9 // Free Software Foundation, version 3 of the license.
10 //
11 // Xestia Address Book is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License along
17 // with Xestia Address Book. If not, see <http://www.gnu.org/licenses/>
19 #include "frmContactEditor.h"
20 #include "frmContactEditorNickname.h"
21 #include "frmContactEditorAddress.h"
22 #include "frmContactEditorEmail.h"
23 #include "frmContactEditorIM.h"
24 #include "frmContactEditorTelephone.h"
25 #include "frmContactEditorLanguages.h"
26 #include "frmContactEditorTimezones.h"
27 #include "frmContactEditorRelated.h"
28 #include "frmContactEditorWebsites.h"
29 #include "frmContactEditorTitles.h"
30 #include "frmContactEditorRoles.h"
31 #include "frmContactEditorGeoposition.h"
32 #include "frmContactEditorGroups.h"
33 #include "frmContactEditorOrganisations.h"
34 #include "frmContactEditorNotes.h"
36 void frmContactEditor::AddHomeNickname( wxCommandEvent& event )
37 {
38     int intResult = 0;
39     
40     frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
41     frameCENickname->SetEditorMode(FALSE, CE_HOME);
42     intResult = GetLastInt(&ContactEditorData.HomeNicknamesList);
43     frameCENickname->SetupPointers(&ContactEditorData.HomeNicknamesList,
44                                    &ContactEditorData.HomeNicknamesListAltID,
45                                    &ContactEditorData.HomeNicknamesListPID,
46                                    &ContactEditorData.HomeNicknamesListType,
47                                    &ContactEditorData.HomeNicknamesListLanguage,
48                                    &ContactEditorData.HomeNicknamesListTokens,
49                                    &ContactEditorData.HomeNicknamesListPref,
50                                    lboHomeNicknames,
51                                    (intValueSeek));
52     frameCENickname->ShowModal();
53     delete frameCENickname;
54     frameCENickname = NULL;
55 }
57 void frmContactEditor::ModifyHomeNickname( wxCommandEvent& event )
58 {
59     long longSelected = -1;
60     int intSelectedData = 0;
61     
62     if (!GetSelectedItem(lboHomeNicknames,
63                          &longSelected,
64                          &intSelectedData)){
65         return;
66     }
67     
68     frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
69     frameCENickname->SetupPointers(&ContactEditorData.HomeNicknamesList,
70                                    &ContactEditorData.HomeNicknamesListAltID,
71                                    &ContactEditorData.HomeNicknamesListPID,
72                                    &ContactEditorData.HomeNicknamesListType,
73                                    &ContactEditorData.HomeNicknamesListLanguage,
74                                    &ContactEditorData.HomeNicknamesListTokens,
75                                    &ContactEditorData.HomeNicknamesListPref,
76                                    lboHomeNicknames,
77                                    intSelectedData);
78     frameCENickname->SetEditorMode(TRUE, CE_HOME);
79     frameCENickname->ShowModal();
80     delete frameCENickname;
81     frameCENickname = NULL;
82 }
84 void frmContactEditor::DeleteHomeNickname( wxCommandEvent& event )
85 {
86     
87     long longSelected = -1;
88     int intSelectedData = 0;
89     
90     if (!GetSelectedItem(lboHomeNicknames,
91                          &longSelected,
92                          &intSelectedData)){
93         return;
94     }
95     
96     lboHomeNicknames->DeleteItem(longSelected);
97     
98     DeleteMapData(intSelectedData,
99                   &ContactEditorData.HomeNicknamesList,
100                   &ContactEditorData.HomeNicknamesListLanguage,
101                   &ContactEditorData.HomeNicknamesListAltID,
102                   &ContactEditorData.HomeNicknamesListPID,
103                   &ContactEditorData.HomeNicknamesListTokens,
104                   &ContactEditorData.HomeNicknamesListType,
105                   &ContactEditorData.HomeNicknamesListPref);
106     
109 void frmContactEditor::AddHomeAddress( wxCommandEvent& event )
111     int intResult = 0;
112     
113     frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
114     frameCEAddress->SetEditorMode(FALSE, CE_HOME);
115     intResult = GetLastInt(&ContactEditorData.HomeAddressList);
116     frameCEAddress->SetupPointers(&ContactEditorData.HomeAddressList,
117                                   &ContactEditorData.HomeAddressListTown,
118                                   &ContactEditorData.HomeAddressListCounty,
119                                   &ContactEditorData.HomeAddressListPostCode,
120                                   &ContactEditorData.HomeAddressListCountry,
121                                   &ContactEditorData.HomeAddressListLabel,
122                                   &ContactEditorData.HomeAddressListLang,
123                                   &ContactEditorData.HomeAddressListAltID,
124                                   &ContactEditorData.HomeAddressListPID,
125                                   &ContactEditorData.HomeAddressListTokens,
126                                   &ContactEditorData.HomeAddressListGeo,
127                                   &ContactEditorData.HomeAddressListTimezone,
128                                   &ContactEditorData.HomeAddressListType,
129                                   &ContactEditorData.HomeAddressListMediatype,
130                                   &ContactEditorData.HomeAddressListPref,
131                                   lboHomeAddresses,
132                                   (intValueSeek));
133     frameCEAddress->ShowModal();
134     delete frameCEAddress;
135     frameCEAddress = NULL;
138 void frmContactEditor::ModifyHomeAddress( wxCommandEvent& event )
140     long longSelected = -1;
141     int intSelectedData = 0;
142     
143     if (!GetSelectedItem(lboHomeAddresses,
144                          &longSelected,
145                          &intSelectedData)){
146         return;
147     }
148     
149     frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
150     frameCEAddress->SetupPointers(&ContactEditorData.HomeAddressList,
151                                   &ContactEditorData.HomeAddressListTown,
152                                   &ContactEditorData.HomeAddressListCounty,
153                                   &ContactEditorData.HomeAddressListPostCode,
154                                   &ContactEditorData.HomeAddressListCountry,
155                                   &ContactEditorData.HomeAddressListLabel,
156                                   &ContactEditorData.HomeAddressListLang,
157                                   &ContactEditorData.HomeAddressListAltID,
158                                   &ContactEditorData.HomeAddressListPID,
159                                   &ContactEditorData.HomeAddressListTokens,
160                                   &ContactEditorData.HomeAddressListGeo,
161                                   &ContactEditorData.HomeAddressListTimezone,
162                                   &ContactEditorData.HomeAddressListType,
163                                   &ContactEditorData.HomeAddressListMediatype,
164                                   &ContactEditorData.HomeAddressListPref,
165                                   lboHomeAddresses,
166                                   intSelectedData);
167     frameCEAddress->SetEditorMode(TRUE, CE_HOME);
168     frameCEAddress->ShowModal();
169     delete frameCEAddress;
170     frameCEAddress = NULL;
173 void frmContactEditor::DeleteHomeAddress( wxCommandEvent& event )
175     
176     long longSelected = -1;
177     int intSelectedData = 0;
178     
179     if (!GetSelectedItem(lboHomeAddresses,
180                          &longSelected,
181                          &intSelectedData)){
182         return;
183     }
184     
185     lboHomeAddresses->DeleteItem(longSelected);
186     
187     DeleteMapData(intSelectedData, &ContactEditorData.HomeAddressList,
188                   &ContactEditorData.HomeAddressListTown, &ContactEditorData.HomeAddressListCounty,
189                   &ContactEditorData.HomeAddressListPostCode, &ContactEditorData.HomeAddressListCountry,
190                   &ContactEditorData.HomeAddressList, &ContactEditorData.HomeAddressListLabel,
191                   &ContactEditorData.HomeAddressListLang, &ContactEditorData.HomeAddressListAltID,
192                   &ContactEditorData.HomeAddressListPID, &ContactEditorData.HomeAddressListTokens,
193                   &ContactEditorData.HomeAddressListGeo, &ContactEditorData.HomeAddressListTimezone,
194                   &ContactEditorData.HomeAddressListType, &ContactEditorData.HomeAddressListMediatype,
195                   &ContactEditorData.HomeAddressListPref);
196     
199 void frmContactEditor::AddHomeEmail( wxCommandEvent& event )
201     int intResult = 0;
202     
203     frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
204     frameCEEmail->SetEditorMode(FALSE, CE_HOME);
205     intResult = GetLastInt(&ContactEditorData.HomeAddressList);
206     frameCEEmail->SetupPointers(&ContactEditorData.HomeEmailList,
207                                 &ContactEditorData.HomeEmailListAltID,
208                                 &ContactEditorData.HomeEmailListPID,
209                                 &ContactEditorData.HomeEmailListType,
210                                 &ContactEditorData.HomeEmailListTokens,
211                                 &ContactEditorData.HomeEmailListPref,
212                                 lboHomeEmails,
213                                 (intValueSeek));
214     frameCEEmail->ShowModal();
215     delete frameCEEmail;
216     frameCEEmail = NULL;
219 void frmContactEditor::ModifyHomeEmail( wxCommandEvent& event )
221     long longSelected = -1;
222     int intSelectedData = 0;
223     
224     if (!GetSelectedItem(lboHomeEmails,
225                          &longSelected,
226                          &intSelectedData)){
227         return;
228     }
229     
230     frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
231     frameCEEmail->SetupPointers(&ContactEditorData.HomeEmailList,
232                                 &ContactEditorData.HomeEmailListAltID,
233                                 &ContactEditorData.HomeEmailListPID,
234                                 &ContactEditorData.HomeEmailListType,
235                                 &ContactEditorData.HomeEmailListTokens,
236                                 &ContactEditorData.HomeEmailListPref,
237                                 lboHomeEmails,
238                                 intSelectedData);
239     frameCEEmail->SetEditorMode(TRUE, CE_HOME);
240     frameCEEmail->ShowModal();
241     delete frameCEEmail;
242     frameCEEmail = NULL;
246 void frmContactEditor::DeleteHomeEmail( wxCommandEvent& event )
248     long longSelected = -1;
249     int intSelectedData = 0;
250     
251     if (!GetSelectedItem(lboHomeEmails,
252                          &longSelected,
253                          &intSelectedData)){
254         return;
255     }
256     
257     lboHomeEmails->DeleteItem(longSelected);
258     
259     DeleteMapData(intSelectedData, &ContactEditorData.HomeEmailList,
260                   &ContactEditorData.HomeEmailListAltID, &ContactEditorData.HomeEmailListPID,
261                   &ContactEditorData.HomeEmailListType, &ContactEditorData.HomeEmailListTokens,
262                   &ContactEditorData.HomeEmailListPref);
266 void frmContactEditor::AddHomeIM( wxCommandEvent& event )
268     int intResult = 0;
269     
270     frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
271     frameCEIM->SetEditorMode(FALSE, CE_HOME);
272     intResult = GetLastInt(&ContactEditorData.HomeIMList);
273     frameCEIM->SetupPointers(&ContactEditorData.HomeIMList,
274                              &ContactEditorData.HomeIMListAltID,
275                              &ContactEditorData.HomeIMListPID,
276                              &ContactEditorData.HomeIMListType,
277                              &ContactEditorData.HomeIMListTypeInfo,
278                              &ContactEditorData.HomeIMListTokens,
279                              &ContactEditorData.HomeIMListMediatype,
280                              &ContactEditorData.HomeIMListPref,
281                              lboHomeIM,
282                              (intValueSeek));
283     frameCEIM->ShowModal();
284     delete frameCEIM;
285     frameCEIM = NULL;
288 void frmContactEditor::ModifyHomeIM( wxCommandEvent& event )
290     long longSelected = -1;
291     int intSelectedData = 0;
292     
293     if (!GetSelectedItem(lboHomeIM,
294                          &longSelected,
295                          &intSelectedData)){
296         return;
297     }
298     
299     frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
300     frameCEIM->SetupPointers(&ContactEditorData.HomeIMList,
301                              &ContactEditorData.HomeIMListAltID,
302                              &ContactEditorData.HomeIMListPID,
303                              &ContactEditorData.HomeIMListType,
304                              &ContactEditorData.HomeIMListTypeInfo,
305                              &ContactEditorData.HomeIMListTokens,
306                              &ContactEditorData.HomeIMListMediatype,
307                              &ContactEditorData.HomeIMListPref,
308                              lboHomeIM,
309                              intSelectedData);
310     frameCEIM->SetEditorMode(TRUE, CE_HOME);
311     frameCEIM->ShowModal();
312     delete frameCEIM;
313     frameCEIM = NULL;
316 void frmContactEditor::DeleteHomeIM( wxCommandEvent& event )
318     long longSelected = -1;
319     int intSelectedData = 0;
320     
321     if (!GetSelectedItem(lboHomeIM,
322                          &longSelected,
323                          &intSelectedData)){
324         return;
325     }
326     
327     lboHomeIM->DeleteItem(longSelected);
328     
329     DeleteMapData(intSelectedData, &ContactEditorData.HomeIMList,
330                   &ContactEditorData.HomeIMListAltID, &ContactEditorData.HomeIMListPID,
331                   &ContactEditorData.HomeIMListType, &ContactEditorData.HomeIMListTypeInfo,
332                   &ContactEditorData.HomeIMListTokens, &ContactEditorData.HomeIMListMediatype, 
333                   &ContactEditorData.HomeIMListPref);
334     
337 void frmContactEditor::AddHomeTelephone( wxCommandEvent& event )
339     int intResult = 0;
340     
341     frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
342     frameCETel->SetEditorMode(FALSE, CE_HOME);
343     intResult = GetLastInt(&ContactEditorData.HomeTelephoneList);
344     frameCETel->SetupPointers(&ContactEditorData.HomeTelephoneList,
345                               &ContactEditorData.HomeTelephoneListAltID,
346                               &ContactEditorData.HomeTelephoneListPID,
347                               &ContactEditorData.HomeTelephoneListType,
348                               &ContactEditorData.HomeTelephoneListTypeInfo,
349                               &ContactEditorData.HomeTelephoneListTokens,
350                               &ContactEditorData.HomeTelephoneListPref,
351                               lboHomeTelephone,
352                               (intValueSeek));
353     frameCETel->ShowModal();
354     delete frameCETel;
355     frameCETel = NULL;
358 void frmContactEditor::ModifyHomeTelephone( wxCommandEvent& event )
360     long longSelected = -1;
361     int intSelectedData = 0;
362     
363     if (!GetSelectedItem(lboHomeTelephone,
364                          &longSelected,
365                          &intSelectedData)){
366         return;
367     }
368     
369     frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
370     frameCETel->SetupPointers(&ContactEditorData.HomeTelephoneList,
371                               &ContactEditorData.HomeTelephoneListAltID,
372                               &ContactEditorData.HomeTelephoneListPID,
373                               &ContactEditorData.HomeTelephoneListType,
374                               &ContactEditorData.HomeTelephoneListTypeInfo,
375                               &ContactEditorData.HomeTelephoneListTokens,
376                               &ContactEditorData.HomeTelephoneListPref,
377                               lboHomeTelephone,
378                               intSelectedData);
379     frameCETel->SetEditorMode(TRUE, CE_HOME);
380     frameCETel->ShowModal();
381     delete frameCETel;
382     frameCETel = NULL;
385 void frmContactEditor::DeleteHomeTelephone( wxCommandEvent& event )
387     long longSelected = -1;
388     int intSelectedData = 0;
389     
390     if (!GetSelectedItem(lboHomeTelephone,
391                          &longSelected,
392                          &intSelectedData)){
393         return;
394     }
395     
396     lboHomeTelephone->DeleteItem(longSelected);
397     
398     DeleteMapData(intSelectedData, &ContactEditorData.HomeTelephoneList,
399                   &ContactEditorData.HomeTelephoneListAltID, &ContactEditorData.HomeTelephoneListPID,
400                   &ContactEditorData.HomeTelephoneListType, &ContactEditorData.HomeTelephoneListTypeInfo,
401                   &ContactEditorData.HomeTelephoneListTokens, &ContactEditorData.HomeTelephoneListPref);
402     
405 void frmContactEditor::AddHomeLanguage( wxCommandEvent& event )
407     int intResult = 0;
408     
409     frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
410     frameCELang->SetEditorMode(FALSE, CE_HOME);
411     intResult = GetLastInt(&ContactEditorData.HomeLanguageList);
412     frameCELang->SetupPointers(&ContactEditorData.HomeLanguageList,
413                                &ContactEditorData.HomeLanguageListAltID,
414                                &ContactEditorData.HomeLanguageListPID,
415                                &ContactEditorData.HomeLanguageListType,
416                                &ContactEditorData.HomeLanguageListTokens,
417                                &ContactEditorData.HomeLanguageListPref,
418                                lboHomeLanguages,
419                                (intValueSeek));
420     frameCELang->ShowModal();
421     delete frameCELang;
422     frameCELang = NULL;
425 void frmContactEditor::ModifyHomeLanguage( wxCommandEvent& event )
427     long longSelected = -1;
428     int intSelectedData = 0;
429     
430     if (!GetSelectedItem(lboHomeLanguages,
431                          &longSelected,
432                          &intSelectedData)){
433         return;
434     }
435     
436     frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
437     frameCELang->SetupPointers(&ContactEditorData.HomeLanguageList,
438                                &ContactEditorData.HomeLanguageListAltID,
439                                &ContactEditorData.HomeLanguageListPID,
440                                &ContactEditorData.HomeLanguageListType,
441                                &ContactEditorData.HomeLanguageListTokens,
442                                &ContactEditorData.HomeLanguageListPref,
443                                lboHomeLanguages,
444                                intSelectedData);
445     frameCELang->SetEditorMode(TRUE, CE_HOME);
446     frameCELang->ShowModal();
447     delete frameCELang;
448     frameCELang = NULL;
451 void frmContactEditor::DeleteHomeLanguage( wxCommandEvent& event )
453     long longSelected = -1;
454     int intSelectedData = 0;
455     
456     if (!GetSelectedItem(lboHomeLanguages,
457                          &longSelected,
458                          &intSelectedData)){
459         return;
460     }
461     
462     lboHomeLanguages->DeleteItem(longSelected);
463     
464     DeleteMapData(intSelectedData, &ContactEditorData.HomeLanguageList,
465                   &ContactEditorData.HomeLanguageListAltID, &ContactEditorData.HomeLanguageListPID,
466                   &ContactEditorData.HomeLanguageListType, &ContactEditorData.HomeLanguageListTokens,
467                   &ContactEditorData.HomeLanguageListPref);
468     
471 void frmContactEditor::AddHomeTimezone( wxCommandEvent& event )
473     int intResult = 0;
474     
475     frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
476     frameCETZ->SetEditorMode(FALSE, CE_HOME);
477     intResult = GetLastInt(&ContactEditorData.HomeTZList);
478     frameCETZ->SetupPointers(&ContactEditorData.HomeTZList,
479                              &ContactEditorData.HomeTZListAltID,
480                              &ContactEditorData.HomeTZListPID,
481                              &ContactEditorData.HomeTZListType,
482                              &ContactEditorData.HomeTZListTokens,
483                              &ContactEditorData.HomeTZListMediatype,
484                              &ContactEditorData.HomeTZListPref,
485                              lboHomeTimezones,
486                              (intValueSeek));
487     frameCETZ->ShowModal();
488     delete frameCETZ;
489     frameCETZ = NULL;
492 void frmContactEditor::ModifyHomeTimezone( wxCommandEvent& event )
494     long longSelected = -1;
495     int intSelectedData = 0;
496     
497     if (!GetSelectedItem(lboHomeTimezones,
498                          &longSelected,
499                          &intSelectedData)){
500         return;
501     }
502     
503     frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
504     frameCETZ->SetupPointers(&ContactEditorData.HomeTZList,
505                              &ContactEditorData.HomeTZListAltID,
506                              &ContactEditorData.HomeTZListPID,
507                              &ContactEditorData.HomeTZListType,
508                              &ContactEditorData.HomeTZListTokens,
509                              &ContactEditorData.HomeTZListMediatype,
510                              &ContactEditorData.HomeTZListPref,
511                              lboHomeTimezones,
512                              intSelectedData);
513     frameCETZ->SetEditorMode(TRUE, CE_HOME);
514     frameCETZ->ShowModal();
515     delete frameCETZ;
516     frameCETZ = NULL;
519 void frmContactEditor::DeleteHomeTimezone( wxCommandEvent& event )
521     long longSelected = -1;
522     int intSelectedData = 0;
523     
524     if (!GetSelectedItem(lboHomeTimezones,
525                          &longSelected,
526                          &intSelectedData)){
527         return;
528     }
529     
530     lboHomeTimezones->DeleteItem(longSelected);
531     
532     DeleteMapData(intSelectedData, &ContactEditorData.HomeTZList,
533                   &ContactEditorData.HomeTZListAltID, &ContactEditorData.HomeTZListPID,
534                   &ContactEditorData.HomeTZListType, &ContactEditorData.HomeTZListTokens,
535                   &ContactEditorData.HomeTZListMediatype, &ContactEditorData.HomeTZListPref);
536     
539 void frmContactEditor::AddHomeGeoposition( wxCommandEvent& event )
541     int intResult = 0;
542     
543     frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
544     frameCEGeo->SetEditorMode(FALSE, CE_HOME);
545     intResult = GetLastInt(&ContactEditorData.HomeGeographyList);
546     frameCEGeo->SetupPointers(&ContactEditorData.HomeGeographyList,
547                               &ContactEditorData.HomeGeographyListAltID,
548                               &ContactEditorData.HomeGeographyListPID,
549                               &ContactEditorData.HomeGeographyListType,
550                               &ContactEditorData.HomeGeographyListDataType,
551                               &ContactEditorData.HomeGeographyListTokens,
552                               &ContactEditorData.HomeGeographyListMediatype,
553                               &ContactEditorData.HomeGeographyListPref,
554                               lboHomeGeoposition,
555                               (intValueSeek));
556     frameCEGeo->ShowModal();
557     delete frameCEGeo;
558     frameCEGeo = NULL;
561 void frmContactEditor::ModifyHomeGeoposition( wxCommandEvent& event )
563     long longSelected = -1;
564     int intSelectedData = 0;
565     
566     if (!GetSelectedItem(lboHomeGeoposition,
567                          &longSelected,
568                          &intSelectedData)){
569         return;
570     }
571     
572     frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
573     frameCEGeo->SetupPointers(&ContactEditorData.HomeGeographyList,
574                               &ContactEditorData.HomeGeographyListAltID,
575                               &ContactEditorData.HomeGeographyListPID,
576                               &ContactEditorData.HomeGeographyListType,
577                               &ContactEditorData.HomeGeographyListDataType,
578                               &ContactEditorData.HomeGeographyListTokens,
579                               &ContactEditorData.HomeGeographyListMediatype,
580                               &ContactEditorData.HomeGeographyListPref,
581                               lboHomeGeoposition,
582                               intSelectedData);
583     frameCEGeo->SetEditorMode(TRUE, CE_HOME);
584     frameCEGeo->ShowModal();
585     delete frameCEGeo;
586     frameCEGeo = NULL;
589 void frmContactEditor::DeleteHomeGeoposition( wxCommandEvent& event )
591     long longSelected = -1;
592     int intSelectedData = 0;
593     
594     if (!GetSelectedItem(lboHomeGeoposition,
595                          &longSelected,
596                          &intSelectedData)){
597         return;
598     }
599     
600     lboHomeGeoposition->DeleteItem(longSelected);
601     
602     DeleteMapData(intSelectedData, &ContactEditorData.HomeGeographyList,
603                   &ContactEditorData.HomeGeographyListAltID, &ContactEditorData.HomeGeographyListPID,
604                   &ContactEditorData.HomeGeographyListType, &ContactEditorData.HomeGeographyListTokens,
605                   &ContactEditorData.HomeGeographyListDataType, &ContactEditorData.HomeGeographyListMediatype, 
606                   &ContactEditorData.HomeGeographyListPref);
607     
610 void frmContactEditor::AddHomeWebsite( wxCommandEvent& event )
612     int intResult = 0;
613     
614     frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
615     frameCEWeb->SetEditorMode(FALSE, CE_HOME);
616     intResult = GetLastInt(&ContactEditorData.HomeWebsiteList);
617     frameCEWeb->SetupPointers(&ContactEditorData.HomeWebsiteList,
618                               &ContactEditorData.HomeWebsiteListAltID,
619                               &ContactEditorData.HomeWebsiteListPID,
620                               &ContactEditorData.HomeWebsiteListType,
621                               &ContactEditorData.HomeWebsiteListTokens,
622                               &ContactEditorData.HomeWebsiteListMediatype,
623                               &ContactEditorData.HomeWebsiteListPref,
624                               lboHomeWebsites,
625                               (intValueSeek));
626     frameCEWeb->ShowModal();
627     delete frameCEWeb;
628     frameCEWeb = NULL;
631 void frmContactEditor::ModifyHomeWebsite( wxCommandEvent& event )
633     long longSelected = -1;
634     int intSelectedData = 0;
635     
636     if (!GetSelectedItem(lboHomeWebsites,
637                          &longSelected,
638                          &intSelectedData)){
639         return;
640     }
641     
642     frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
643     frameCEWeb->SetupPointers(&ContactEditorData.HomeWebsiteList,
644                               &ContactEditorData.HomeWebsiteListAltID,
645                               &ContactEditorData.HomeWebsiteListPID,
646                               &ContactEditorData.HomeWebsiteListType,
647                               &ContactEditorData.HomeWebsiteListTokens,
648                               &ContactEditorData.HomeWebsiteListMediatype,
649                               &ContactEditorData.HomeWebsiteListPref,
650                               lboHomeWebsites,
651                               intSelectedData);
652     frameCEWeb->SetEditorMode(TRUE, CE_HOME);
653     frameCEWeb->ShowModal();
654     delete frameCEWeb;
655     frameCEWeb = NULL;
658 void frmContactEditor::DeleteHomeWebsite( wxCommandEvent& event )
660     long longSelected = -1;
661     int intSelectedData = 0;
662     
663     if (!GetSelectedItem(lboHomeWebsites,
664                          &longSelected,
665                          &intSelectedData)){
666         return;
667     }
668     
669     lboHomeWebsites->DeleteItem(longSelected);
670     
671     DeleteMapData(intSelectedData, &ContactEditorData.HomeWebsiteList,
672                   &ContactEditorData.HomeWebsiteListAltID, &ContactEditorData.HomeWebsiteListPID,
673                   &ContactEditorData.HomeWebsiteListType, &ContactEditorData.HomeWebsiteListTokens,
674                   &ContactEditorData.HomeWebsiteListMediatype, &ContactEditorData.HomeWebsiteListPref);
675     
678 void frmContactEditor::AddHomeTitle( wxCommandEvent& event )
680     int intResult = 0;
681     
682     frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
683     frameCETitle->SetEditorMode(FALSE, CE_HOME);
684     intResult = GetLastInt(&ContactEditorData.HomeTitleList);
685     frameCETitle->SetupPointers(&ContactEditorData.HomeTitleList,
686                                 &ContactEditorData.HomeTitleListLanguage,
687                                 &ContactEditorData.HomeTitleListAltID,
688                                 &ContactEditorData.HomeTitleListPID,
689                                 &ContactEditorData.HomeTitleListType,
690                                 &ContactEditorData.HomeTitleListTokens,
691                                 &ContactEditorData.HomeTitleListPref,
692                                 lboHomeTitles,
693                                 (intValueSeek));
694     frameCETitle->ShowModal();
695     delete frameCETitle;
696     frameCETitle = NULL;
699 void frmContactEditor::ModifyHomeTitle( wxCommandEvent& event )
701     long longSelected = -1;
702     int intSelectedData = 0;
703     
704     if (!GetSelectedItem(lboHomeTitles,
705                          &longSelected,
706                          &intSelectedData)){
707         return;
708     }
709     
710     frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
711     frameCETitle->SetupPointers(&ContactEditorData.HomeTitleList,
712                                 &ContactEditorData.HomeTitleListLanguage,
713                                 &ContactEditorData.HomeTitleListAltID,
714                                 &ContactEditorData.HomeTitleListPID,
715                                 &ContactEditorData.HomeTitleListType,
716                                 &ContactEditorData.HomeTitleListTokens,
717                                 &ContactEditorData.HomeTitleListPref,
718                                 lboHomeTitles,
719                                 intSelectedData);
720     frameCETitle->SetEditorMode(TRUE, CE_HOME);
721     frameCETitle->ShowModal();
722     delete frameCETitle;
723     frameCETitle = NULL;
726 void frmContactEditor::DeleteHomeTitle( wxCommandEvent& event )
728     long longSelected = -1;
729     int intSelectedData = 0;
730     
731     if (!GetSelectedItem(lboHomeTitles,
732                          &longSelected,
733                          &intSelectedData)){
734         return;
735     }
736     
737     lboHomeTitles->DeleteItem(longSelected);
738     
739     DeleteMapData(intSelectedData, &ContactEditorData.HomeTitleList,
740                   &ContactEditorData.HomeTitleListLanguage, &ContactEditorData.HomeTitleListAltID,
741                   &ContactEditorData.HomeTitleListPID, &ContactEditorData.HomeTitleListType,
742                   &ContactEditorData.HomeTitleListTokens, &ContactEditorData.HomeTitleListPref);
743     
746 void frmContactEditor::AddHomeRole( wxCommandEvent& event )
748     int intResult = 0;
749     
750     frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
751     frameCERole->SetEditorMode(FALSE, CE_HOME);
752     intResult = GetLastInt(&ContactEditorData.HomeRoleList);
753     frameCERole->SetupPointers(&ContactEditorData.HomeRoleList,
754                                &ContactEditorData.HomeRoleListLanguage,
755                                &ContactEditorData.HomeRoleListAltID,
756                                &ContactEditorData.HomeRoleListPID,
757                                &ContactEditorData.HomeRoleListType,
758                                &ContactEditorData.HomeRoleListTokens,
759                                &ContactEditorData.HomeRoleListPref,
760                                lboHomeRoles,
761                                (intValueSeek));
762     frameCERole->ShowModal();
763     delete frameCERole;
764     frameCERole = NULL;
767 void frmContactEditor::ModifyHomeRole( wxCommandEvent& event )
769     long longSelected = -1;
770     int intSelectedData = 0;
771     
772     if (!GetSelectedItem(lboHomeRoles,
773                          &longSelected,
774                          &intSelectedData)){
775         return;
776     }
777     
778     frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
779     frameCERole->SetupPointers(&ContactEditorData.HomeRoleList,
780                                &ContactEditorData.HomeRoleListLanguage,
781                                &ContactEditorData.HomeRoleListAltID,
782                                &ContactEditorData.HomeRoleListPID,
783                                &ContactEditorData.HomeRoleListType,
784                                &ContactEditorData.HomeRoleListTokens,
785                                &ContactEditorData.HomeRoleListPref,
786                                lboHomeRoles,
787                                intSelectedData);
788     frameCERole->SetEditorMode(TRUE, CE_HOME);
789     frameCERole->ShowModal();
790     delete frameCERole;
791     frameCERole = NULL;
794 void frmContactEditor::DeleteHomeRole( wxCommandEvent& event )
796     long longSelected = -1;
797     int intSelectedData = 0;
798     
799     if (!GetSelectedItem(lboHomeRoles,
800                          &longSelected,
801                          &intSelectedData)){
802         return;
803     }
804     
805     lboHomeRoles->DeleteItem(longSelected);
806     
807     DeleteMapData(intSelectedData, &ContactEditorData.HomeRoleList,
808                   &ContactEditorData.HomeRoleListLanguage, &ContactEditorData.HomeRoleListAltID,
809                   &ContactEditorData.HomeRoleListPID, &ContactEditorData.HomeRoleListType,
810                   &ContactEditorData.HomeRoleListTokens, &ContactEditorData.HomeRoleListPref);
811     
814 void frmContactEditor::AddHomeOrganisation( wxCommandEvent& event )
816     int intResult = 0;
817     
818     frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
819     frameCEOrg->SetEditorMode(FALSE, CE_HOME);
820     intResult = GetLastInt(&ContactEditorData.HomeOrganisationsList);
821     frameCEOrg->SetupPointers(&ContactEditorData.HomeOrganisationsList,
822                               &ContactEditorData.HomeOrganisationsListLanguage,
823                               &ContactEditorData.HomeOrganisationsListSortAs,
824                               &ContactEditorData.HomeOrganisationsListAltID,
825                               &ContactEditorData.HomeOrganisationsListPID,
826                               &ContactEditorData.HomeOrganisationsListType,
827                               &ContactEditorData.HomeOrganisationsListTokens,
828                               &ContactEditorData.HomeOrganisationsListPref,
829                               lboHomeOrganisations,
830                               (intValueSeek));
831     frameCEOrg->ShowModal();
832     delete frameCEOrg;
833     frameCEOrg = NULL;
836 void frmContactEditor::ModifyHomeOrganisation( wxCommandEvent& event )
838     long longSelected = -1;
839     int intSelectedData = 0;
840     
841     if (!GetSelectedItem(lboHomeOrganisations,
842                          &longSelected,
843                          &intSelectedData)){
844         return;
845     }
846     
847     frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
848     frameCEOrg->SetupPointers(&ContactEditorData.HomeOrganisationsList,
849                               &ContactEditorData.HomeOrganisationsListLanguage,
850                               &ContactEditorData.HomeOrganisationsListSortAs,
851                               &ContactEditorData.HomeOrganisationsListAltID,
852                               &ContactEditorData.HomeOrganisationsListPID,
853                               &ContactEditorData.HomeOrganisationsListType,
854                               &ContactEditorData.HomeOrganisationsListTokens,
855                               &ContactEditorData.HomeOrganisationsListPref,
856                               lboHomeOrganisations,
857                               intSelectedData);
858     frameCEOrg->SetEditorMode(TRUE, CE_HOME);
859     frameCEOrg->ShowModal();
860     delete frameCEOrg;
861     frameCEOrg = NULL;
864 void frmContactEditor::DeleteHomeOrganisation( wxCommandEvent& event )
866     long longSelected = -1;
867     int intSelectedData = 0;
868     
869     if (!GetSelectedItem(lboHomeOrganisations,
870                          &longSelected,
871                          &intSelectedData)){
872         return;
873     }
874     
875     lboHomeOrganisations->DeleteItem(longSelected);
876     
877     DeleteMapData(intSelectedData, &ContactEditorData.HomeOrganisationsList,
878                   &ContactEditorData.HomeOrganisationsListLanguage, &ContactEditorData.HomeOrganisationsListSortAs,
879                   &ContactEditorData.HomeOrganisationsListAltID, &ContactEditorData.HomeOrganisationsListPID,
880                   &ContactEditorData.HomeOrganisationsListType, &ContactEditorData.HomeOrganisationsListTokens,
881                   &ContactEditorData.HomeOrganisationsListPref);
882     
885 void frmContactEditor::AddHomeNote( wxCommandEvent& event )
887     int intResult = 0;
888     
889     frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
890     frameCENote->SetEditorMode(FALSE, CE_HOME);
891     intResult = GetLastInt(&ContactEditorData.HomeNoteList);
892     frameCENote->SetupPointers(&ContactEditorData.HomeNoteList,
893                                &ContactEditorData.HomeNoteListLanguage,
894                                &ContactEditorData.HomeNoteListAltID,
895                                &ContactEditorData.HomeNoteListPID,
896                                &ContactEditorData.HomeNoteListType,
897                                &ContactEditorData.HomeNoteListTokens,
898                                &ContactEditorData.HomeNoteListPref,
899                                lboHomeNotes,
900                                (intValueSeek));
901     frameCENote->ShowModal();
902     delete frameCENote;
903     frameCENote = NULL;
906 void frmContactEditor::ModifyHomeNote( wxCommandEvent& event )
908     long longSelected = -1;
909     int intSelectedData = 0;
910     
911     if (!GetSelectedItem(lboHomeNotes,
912                          &longSelected,
913                          &intSelectedData)){
914         return;
915     }
916     
917     frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
918     frameCENote->SetupPointers(&ContactEditorData.HomeNoteList,
919                                &ContactEditorData.HomeNoteListLanguage,
920                                &ContactEditorData.HomeNoteListAltID,
921                                &ContactEditorData.HomeNoteListPID,
922                                &ContactEditorData.HomeNoteListType,
923                                &ContactEditorData.HomeNoteListTokens,
924                                &ContactEditorData.HomeNoteListPref,
925                                lboHomeNotes,
926                                intSelectedData);
927     frameCENote->SetEditorMode(TRUE, CE_HOME);
928     frameCENote->ShowModal();
929     delete frameCENote;
930     frameCENote = NULL;
933 void frmContactEditor::DeleteHomeNote( wxCommandEvent& event )
935     long longSelected = -1;
936     int intSelectedData = 0;
937     
938     if (!GetSelectedItem(lboHomeNotes,
939                          &longSelected,
940                          &intSelectedData)){
941         return;
942     }
943     
944     lboNotes->DeleteItem(longSelected);
945     
946     DeleteMapData(intSelectedData, &ContactEditorData.HomeNoteList,
947                   &ContactEditorData.HomeNoteListLanguage, &ContactEditorData.HomeNoteListAltID,
948                   &ContactEditorData.HomeNoteListPID, &ContactEditorData.HomeNoteListType,
949                   &ContactEditorData.HomeNoteListTokens, &ContactEditorData.HomeNoteListPref);
950     
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy