Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added comments to describe functions in contacteditor/frmContactEditor-Home.cpp
[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         
39         // Bring up window to add nickname.
40         
41         int intResult = 0;
42     
43         frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
44         frameCENickname->SetEditorMode(FALSE, CE_HOME);
45         intResult = GetLastInt(&ContactEditorData.HomeNicknamesList);
46         frameCENickname->SetupPointers(&ContactEditorData.HomeNicknamesList,
47                 &ContactEditorData.HomeNicknamesListAltID,
48                 &ContactEditorData.HomeNicknamesListPID,
49                 &ContactEditorData.HomeNicknamesListType,
50                 &ContactEditorData.HomeNicknamesListLanguage,
51                 &ContactEditorData.HomeNicknamesListTokens,
52                 &ContactEditorData.HomeNicknamesListPref,
53                 lboHomeNicknames,
54                 (intValueSeek));
55         frameCENickname->ShowModal();
56         delete frameCENickname;
57         frameCENickname = NULL;
58         
59 }
61 void frmContactEditor::ModifyHomeNickname( wxCommandEvent& event )
62 {
63         
64         // Bring up window to modify nickname.
65         
66         long longSelected = -1;
67         int intSelectedData = 0;
68     
69         if (!GetSelectedItem(lboHomeNicknames,
70                 &longSelected,
71                 &intSelectedData)){
72                 return;
73         }
74     
75         frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
76         frameCENickname->SetupPointers(&ContactEditorData.HomeNicknamesList,
77                 &ContactEditorData.HomeNicknamesListAltID,
78                 &ContactEditorData.HomeNicknamesListPID,
79                 &ContactEditorData.HomeNicknamesListType,
80                 &ContactEditorData.HomeNicknamesListLanguage,
81                 &ContactEditorData.HomeNicknamesListTokens,
82                 &ContactEditorData.HomeNicknamesListPref,
83                 lboHomeNicknames,
84                 intSelectedData);
85         frameCENickname->SetEditorMode(TRUE, CE_HOME);
86         frameCENickname->ShowModal();
87         delete frameCENickname;
88         frameCENickname = NULL;
89         
90 }
92 void frmContactEditor::DeleteHomeNickname( wxCommandEvent& event )
93 {
94     
95         // Bring up window to delete nickname.
96         
97         long longSelected = -1;
98         int intSelectedData = 0;
99     
100         if (!GetSelectedItem(lboHomeNicknames,
101                 &longSelected,
102                 &intSelectedData)){
103                 return;
104         }
105     
106         lboHomeNicknames->DeleteItem(longSelected);
107     
108         DeleteMapData(intSelectedData,
109                 &ContactEditorData.HomeNicknamesList,
110                 &ContactEditorData.HomeNicknamesListLanguage,
111                 &ContactEditorData.HomeNicknamesListAltID,
112                 &ContactEditorData.HomeNicknamesListPID,
113                 &ContactEditorData.HomeNicknamesListTokens,
114                 &ContactEditorData.HomeNicknamesListType,
115                 &ContactEditorData.HomeNicknamesListPref);
119 void frmContactEditor::AddHomeAddress( wxCommandEvent& event )
121         
122         // Bring up window to add address.      
123         
124         int intResult = 0;
125     
126         frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
127         frameCEAddress->SetEditorMode(FALSE, CE_HOME);
128         intResult = GetLastInt(&ContactEditorData.HomeAddressList);
129         frameCEAddress->SetupPointers(&ContactEditorData.HomeAddressList,
130                 &ContactEditorData.HomeAddressListTown,
131                 &ContactEditorData.HomeAddressListCounty,
132                 &ContactEditorData.HomeAddressListPostCode,
133                 &ContactEditorData.HomeAddressListCountry,
134                 &ContactEditorData.HomeAddressListLabel,
135                 &ContactEditorData.HomeAddressListLang,
136                 &ContactEditorData.HomeAddressListAltID,
137                 &ContactEditorData.HomeAddressListPID,
138                 &ContactEditorData.HomeAddressListTokens,
139                 &ContactEditorData.HomeAddressListGeo,
140                 &ContactEditorData.HomeAddressListTimezone,
141                 &ContactEditorData.HomeAddressListType,
142                 &ContactEditorData.HomeAddressListMediatype,
143                 &ContactEditorData.HomeAddressListPref,
144                 lboHomeAddresses,
145                 (intValueSeek));
146         frameCEAddress->ShowModal();
147         delete frameCEAddress;
148         frameCEAddress = NULL;
149         
152 void frmContactEditor::ModifyHomeAddress( wxCommandEvent& event )
154         
155         // Bring up window to modify address.
156         
157         long longSelected = -1;
158         int intSelectedData = 0;
159     
160         if (!GetSelectedItem(lboHomeAddresses,
161                 &longSelected,
162                 &intSelectedData)){
163                 return;
164         }
165     
166         frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
167         frameCEAddress->SetupPointers(&ContactEditorData.HomeAddressList,
168                 &ContactEditorData.HomeAddressListTown,
169                 &ContactEditorData.HomeAddressListCounty,
170                 &ContactEditorData.HomeAddressListPostCode,
171                 &ContactEditorData.HomeAddressListCountry,
172                 &ContactEditorData.HomeAddressListLabel,
173                 &ContactEditorData.HomeAddressListLang,
174                 &ContactEditorData.HomeAddressListAltID,
175                 &ContactEditorData.HomeAddressListPID,
176                 &ContactEditorData.HomeAddressListTokens,
177                 &ContactEditorData.HomeAddressListGeo,
178                 &ContactEditorData.HomeAddressListTimezone,
179                 &ContactEditorData.HomeAddressListType,
180                 &ContactEditorData.HomeAddressListMediatype,
181                 &ContactEditorData.HomeAddressListPref,
182                 lboHomeAddresses,
183                 intSelectedData);
184         frameCEAddress->SetEditorMode(TRUE, CE_HOME);
185         frameCEAddress->ShowModal();
186         delete frameCEAddress;
187         frameCEAddress = NULL;
188         
191 void frmContactEditor::DeleteHomeAddress( wxCommandEvent& event )
193  
194         // Bring up window to delete address.
195         
196         long longSelected = -1;
197         int intSelectedData = 0;
198     
199         if (!GetSelectedItem(lboHomeAddresses,
200                 &longSelected,
201                 &intSelectedData)){
202                 return;
203         }
204     
205         lboHomeAddresses->DeleteItem(longSelected);
206     
207         DeleteMapData(intSelectedData, &ContactEditorData.HomeAddressList,
208                 &ContactEditorData.HomeAddressListTown, &ContactEditorData.HomeAddressListCounty,
209                 &ContactEditorData.HomeAddressListPostCode, &ContactEditorData.HomeAddressListCountry,
210                 &ContactEditorData.HomeAddressList, &ContactEditorData.HomeAddressListLabel,
211                 &ContactEditorData.HomeAddressListLang, &ContactEditorData.HomeAddressListAltID,
212                 &ContactEditorData.HomeAddressListPID, &ContactEditorData.HomeAddressListTokens,
213                 &ContactEditorData.HomeAddressListGeo, &ContactEditorData.HomeAddressListTimezone,
214                 &ContactEditorData.HomeAddressListType, &ContactEditorData.HomeAddressListMediatype,
215                 &ContactEditorData.HomeAddressListPref);
216     
219 void frmContactEditor::AddHomeEmail( wxCommandEvent& event )
221         
222         // Bring up window to add email.
223         
224         int intResult = 0;
225     
226         frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
227         frameCEEmail->SetEditorMode(FALSE, CE_HOME);
228         intResult = GetLastInt(&ContactEditorData.HomeAddressList);
229         frameCEEmail->SetupPointers(&ContactEditorData.HomeEmailList,
230                 &ContactEditorData.HomeEmailListAltID,
231                 &ContactEditorData.HomeEmailListPID,
232                 &ContactEditorData.HomeEmailListType,
233                 &ContactEditorData.HomeEmailListTokens,
234                 &ContactEditorData.HomeEmailListPref,
235                 lboHomeEmails,
236                 (intValueSeek));
237         frameCEEmail->ShowModal();
238         delete frameCEEmail;
239         frameCEEmail = NULL;
240         
243 void frmContactEditor::ModifyHomeEmail( wxCommandEvent& event )
245         
246         // Bring up window to modify email.
247         
248         long longSelected = -1;
249         int intSelectedData = 0;
250     
251         if (!GetSelectedItem(lboHomeEmails,
252                 &longSelected,
253                 &intSelectedData)){
254                 return;
255         }
256     
257         frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
258         frameCEEmail->SetupPointers(&ContactEditorData.HomeEmailList,
259                 &ContactEditorData.HomeEmailListAltID,
260                 &ContactEditorData.HomeEmailListPID,
261                 &ContactEditorData.HomeEmailListType,
262                 &ContactEditorData.HomeEmailListTokens,
263                 &ContactEditorData.HomeEmailListPref,
264                 lboHomeEmails,
265                 intSelectedData);
266         frameCEEmail->SetEditorMode(TRUE, CE_HOME);
267         frameCEEmail->ShowModal();
268         delete frameCEEmail;
269         frameCEEmail = NULL;
270         
274 void frmContactEditor::DeleteHomeEmail( wxCommandEvent& event )
276         
277         // Bring up window to delete email.
278         
279         long longSelected = -1;
280         int intSelectedData = 0;
281     
282         if (!GetSelectedItem(lboHomeEmails,
283                 &longSelected,
284                 &intSelectedData)){
285                 return;
286         }
287     
288         lboHomeEmails->DeleteItem(longSelected);
289     
290         DeleteMapData(intSelectedData, &ContactEditorData.HomeEmailList,
291                 &ContactEditorData.HomeEmailListAltID, &ContactEditorData.HomeEmailListPID,
292                 &ContactEditorData.HomeEmailListType, &ContactEditorData.HomeEmailListTokens,
293                 &ContactEditorData.HomeEmailListPref);
294         
298 void frmContactEditor::AddHomeIM( wxCommandEvent& event )
300         
301         // Bring up window to add IM.
302         
303         int intResult = 0;
304     
305         frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
306         frameCEIM->SetEditorMode(FALSE, CE_HOME);
307         intResult = GetLastInt(&ContactEditorData.HomeIMList);
308         frameCEIM->SetupPointers(&ContactEditorData.HomeIMList,
309                 &ContactEditorData.HomeIMListAltID,
310                 &ContactEditorData.HomeIMListPID,
311                 &ContactEditorData.HomeIMListType,
312                 &ContactEditorData.HomeIMListTypeInfo,
313                 &ContactEditorData.HomeIMListTokens,
314                 &ContactEditorData.HomeIMListMediatype,
315                 &ContactEditorData.HomeIMListPref,
316                 lboHomeIM,
317                 (intValueSeek));
318         frameCEIM->ShowModal();
319         delete frameCEIM;
320         frameCEIM = NULL;
321         
324 void frmContactEditor::ModifyHomeIM( wxCommandEvent& event )
327         // Bring up window to modify IM.
328         
329         long longSelected = -1;
330         int intSelectedData = 0;
331     
332         if (!GetSelectedItem(lboHomeIM,
333                 &longSelected,
334                 &intSelectedData)){
335                 return;
336         }
337     
338         frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
339         frameCEIM->SetupPointers(&ContactEditorData.HomeIMList,
340                 &ContactEditorData.HomeIMListAltID,
341                 &ContactEditorData.HomeIMListPID,
342                 &ContactEditorData.HomeIMListType,
343                 &ContactEditorData.HomeIMListTypeInfo,
344                 &ContactEditorData.HomeIMListTokens,
345                 &ContactEditorData.HomeIMListMediatype,
346                 &ContactEditorData.HomeIMListPref,
347                 lboHomeIM,
348                 intSelectedData);
349         frameCEIM->SetEditorMode(TRUE, CE_HOME);
350         frameCEIM->ShowModal();
351         delete frameCEIM;
352         frameCEIM = NULL;
353     
356 void frmContactEditor::DeleteHomeIM( wxCommandEvent& event )
358         
359         // Bring up window to delete IM.
361         long longSelected = -1;
362         int intSelectedData = 0;
363     
364         if (!GetSelectedItem(lboHomeIM,
365                 &longSelected,
366                 &intSelectedData)){
367                 return;
368         }
369     
370         lboHomeIM->DeleteItem(longSelected);
371     
372         DeleteMapData(intSelectedData, &ContactEditorData.HomeIMList,
373                 &ContactEditorData.HomeIMListAltID, &ContactEditorData.HomeIMListPID,
374                 &ContactEditorData.HomeIMListType, &ContactEditorData.HomeIMListTypeInfo,
375                 &ContactEditorData.HomeIMListTokens, &ContactEditorData.HomeIMListMediatype, 
376                 &ContactEditorData.HomeIMListPref);
377     
380 void frmContactEditor::AddHomeTelephone( wxCommandEvent& event )
382         
383         // Bring up window to add telephone.
384         
385         int intResult = 0;
386     
387         frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
388         frameCETel->SetEditorMode(FALSE, CE_HOME);
389         intResult = GetLastInt(&ContactEditorData.HomeTelephoneList);
390         frameCETel->SetupPointers(&ContactEditorData.HomeTelephoneList,
391                 &ContactEditorData.HomeTelephoneListAltID,
392                 &ContactEditorData.HomeTelephoneListPID,
393                 &ContactEditorData.HomeTelephoneListType,
394                 &ContactEditorData.HomeTelephoneListTypeInfo,
395                 &ContactEditorData.HomeTelephoneListTokens,
396                 &ContactEditorData.HomeTelephoneListPref,
397                 lboHomeTelephone,
398                 (intValueSeek));
399         frameCETel->ShowModal();
400         delete frameCETel;
401         frameCETel = NULL;
402         
405 void frmContactEditor::ModifyHomeTelephone( wxCommandEvent& event )
407         
408         // Bring up window to modify telephone.
409         
410         long longSelected = -1;
411         int intSelectedData = 0;
412     
413         if (!GetSelectedItem(lboHomeTelephone,
414                 &longSelected,
415                 &intSelectedData)){
416                 return;
417         }
418     
419         frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
420         frameCETel->SetupPointers(&ContactEditorData.HomeTelephoneList,
421                 &ContactEditorData.HomeTelephoneListAltID,
422                 &ContactEditorData.HomeTelephoneListPID,
423                 &ContactEditorData.HomeTelephoneListType,
424                 &ContactEditorData.HomeTelephoneListTypeInfo,
425                 &ContactEditorData.HomeTelephoneListTokens,
426                 &ContactEditorData.HomeTelephoneListPref,
427                 lboHomeTelephone,
428                 intSelectedData);
429         frameCETel->SetEditorMode(TRUE, CE_HOME);
430         frameCETel->ShowModal();
431         delete frameCETel;
432         frameCETel = NULL;
433         
434 }       
436 void frmContactEditor::DeleteHomeTelephone( wxCommandEvent& event )
438         
439         // Bring up window to delete telephone. 
440         
441         long longSelected = -1;
442         int intSelectedData = 0;
443     
444         if (!GetSelectedItem(lboHomeTelephone,
445                 &longSelected,
446                 &intSelectedData)){
447                 return;
448         }
449     
450         lboHomeTelephone->DeleteItem(longSelected);
451     
452         DeleteMapData(intSelectedData, &ContactEditorData.HomeTelephoneList,
453                 &ContactEditorData.HomeTelephoneListAltID, &ContactEditorData.HomeTelephoneListPID,
454                 &ContactEditorData.HomeTelephoneListType, &ContactEditorData.HomeTelephoneListTypeInfo,
455                 &ContactEditorData.HomeTelephoneListTokens, &ContactEditorData.HomeTelephoneListPref);
456     
459 void frmContactEditor::AddHomeLanguage( wxCommandEvent& event )
461         
462         // Bring up window to add language.
463         
464         int intResult = 0;
465     
466         frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
467         frameCELang->SetEditorMode(FALSE, CE_HOME);
468         intResult = GetLastInt(&ContactEditorData.HomeLanguageList);
469         
470         frameCELang->SetupPointers(&ContactEditorData.HomeLanguageList,
471                 &ContactEditorData.HomeLanguageListAltID,
472                 &ContactEditorData.HomeLanguageListPID,
473                 &ContactEditorData.HomeLanguageListType,
474                 &ContactEditorData.HomeLanguageListTokens,
475                 &ContactEditorData.HomeLanguageListPref,
476                 lboHomeLanguages,
477                 (intValueSeek));
478         frameCELang->ShowModal();
479         delete frameCELang;
480         frameCELang = NULL;
481         
484 void frmContactEditor::ModifyHomeLanguage( wxCommandEvent& event )
486         
487         // Bring up window to modify language.
488         
489         long longSelected = -1;
490         int intSelectedData = 0;
491     
492         if (!GetSelectedItem(lboHomeLanguages,
493                 &longSelected,
494                 &intSelectedData)){
495                 return;
496         }
497     
498         frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
499         frameCELang->SetupPointers(&ContactEditorData.HomeLanguageList,
500                 &ContactEditorData.HomeLanguageListAltID,
501                 &ContactEditorData.HomeLanguageListPID,
502                 &ContactEditorData.HomeLanguageListType,
503                 &ContactEditorData.HomeLanguageListTokens,
504                 &ContactEditorData.HomeLanguageListPref,
505                 lboHomeLanguages,
506                 intSelectedData);
507         frameCELang->SetEditorMode(TRUE, CE_HOME);
508         frameCELang->ShowModal();
509         delete frameCELang;
510         frameCELang = NULL;
511         
514 void frmContactEditor::DeleteHomeLanguage( wxCommandEvent& event )
516         
517         // Bring up window to delete language.
518         
519         long longSelected = -1;
520         int intSelectedData = 0;
521     
522         if (!GetSelectedItem(lboHomeLanguages,
523                 &longSelected,
524                 &intSelectedData)){
525                 return;
526         }
527     
528         lboHomeLanguages->DeleteItem(longSelected);
529     
530         DeleteMapData(intSelectedData, &ContactEditorData.HomeLanguageList,
531                 &ContactEditorData.HomeLanguageListAltID, &ContactEditorData.HomeLanguageListPID,
532                 &ContactEditorData.HomeLanguageListType, &ContactEditorData.HomeLanguageListTokens,
533                 &ContactEditorData.HomeLanguageListPref);
534     
537 void frmContactEditor::AddHomeTimezone( wxCommandEvent& event )
539         
540         // Bring up window to add timezone.
541         
542         int intResult = 0;
543     
544         frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
545         frameCETZ->SetEditorMode(FALSE, CE_HOME);
546         intResult = GetLastInt(&ContactEditorData.HomeTZList);
547         frameCETZ->SetupPointers(&ContactEditorData.HomeTZList,
548                 &ContactEditorData.HomeTZListAltID,
549                 &ContactEditorData.HomeTZListPID,
550                 &ContactEditorData.HomeTZListType,
551                 &ContactEditorData.HomeTZListTokens,
552                 &ContactEditorData.HomeTZListMediatype,
553                 &ContactEditorData.HomeTZListPref,
554                 lboHomeTimezones,
555                 (intValueSeek));
556         frameCETZ->ShowModal();
557         delete frameCETZ;
558         frameCETZ = NULL;
559         
562 void frmContactEditor::ModifyHomeTimezone( wxCommandEvent& event )
564         
565         // Bring up window to modify timezone.
566         
567         long longSelected = -1;
568         int intSelectedData = 0;
569     
570         if (!GetSelectedItem(lboHomeTimezones,
571                 &longSelected,
572                 &intSelectedData)){
573                 return;
574         }
575     
576         frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
577         frameCETZ->SetupPointers(&ContactEditorData.HomeTZList,
578                 &ContactEditorData.HomeTZListAltID,
579                 &ContactEditorData.HomeTZListPID,
580                 &ContactEditorData.HomeTZListType,
581                 &ContactEditorData.HomeTZListTokens,
582                 &ContactEditorData.HomeTZListMediatype,
583                 &ContactEditorData.HomeTZListPref,
584                 lboHomeTimezones,
585                 intSelectedData);
586         frameCETZ->SetEditorMode(TRUE, CE_HOME);
587         frameCETZ->ShowModal();
588         delete frameCETZ;
589         frameCETZ = NULL;
590         
593 void frmContactEditor::DeleteHomeTimezone( wxCommandEvent& event )
595         
596         // Bring up window to delete timezone.
597         
598         long longSelected = -1;
599         int intSelectedData = 0;
600     
601         if (!GetSelectedItem(lboHomeTimezones,
602                 &longSelected,
603                 &intSelectedData)){
604                 return;
605         }
606     
607         lboHomeTimezones->DeleteItem(longSelected);
608     
609         DeleteMapData(intSelectedData, &ContactEditorData.HomeTZList,
610                 &ContactEditorData.HomeTZListAltID, &ContactEditorData.HomeTZListPID,
611                 &ContactEditorData.HomeTZListType, &ContactEditorData.HomeTZListTokens,
612                 &ContactEditorData.HomeTZListMediatype, &ContactEditorData.HomeTZListPref);
613     
616 void frmContactEditor::AddHomeGeoposition( wxCommandEvent& event )
619         // Bring up window to add geoposition.
620         
621         int intResult = 0;
622     
623         frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
624         frameCEGeo->SetEditorMode(FALSE, CE_HOME);
625         intResult = GetLastInt(&ContactEditorData.HomeGeographyList);
626         frameCEGeo->SetupPointers(&ContactEditorData.HomeGeographyList,
627                 &ContactEditorData.HomeGeographyListAltID,
628                 &ContactEditorData.HomeGeographyListPID,
629                 &ContactEditorData.HomeGeographyListType,
630                 &ContactEditorData.HomeGeographyListDataType,
631                 &ContactEditorData.HomeGeographyListTokens,
632                 &ContactEditorData.HomeGeographyListMediatype,
633                 &ContactEditorData.HomeGeographyListPref,
634                 lboHomeGeoposition,
635                 (intValueSeek));
636         frameCEGeo->ShowModal();
637         delete frameCEGeo;
638         frameCEGeo = NULL;
639         
642 void frmContactEditor::ModifyHomeGeoposition( wxCommandEvent& event )
644         
645         // Bring up window to modify geoposition.
646         
647         long longSelected = -1;
648         int intSelectedData = 0;
649     
650         if (!GetSelectedItem(lboHomeGeoposition,
651                 &longSelected,
652                 &intSelectedData)){
653                 return;
654         }
655     
656         frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
657         frameCEGeo->SetupPointers(&ContactEditorData.HomeGeographyList,
658                 &ContactEditorData.HomeGeographyListAltID,
659                 &ContactEditorData.HomeGeographyListPID,
660                 &ContactEditorData.HomeGeographyListType,
661                 &ContactEditorData.HomeGeographyListDataType,
662                 &ContactEditorData.HomeGeographyListTokens,
663                 &ContactEditorData.HomeGeographyListMediatype,
664                 &ContactEditorData.HomeGeographyListPref,
665                 lboHomeGeoposition,
666                 intSelectedData);
667         frameCEGeo->SetEditorMode(TRUE, CE_HOME);
668         frameCEGeo->ShowModal();
669         delete frameCEGeo;
670         frameCEGeo = NULL;
671         
674 void frmContactEditor::DeleteHomeGeoposition( wxCommandEvent& event )
676         
677         // Bring up window to delete geoposition.
678         
679         long longSelected = -1;
680         int intSelectedData = 0;
681     
682         if (!GetSelectedItem(lboHomeGeoposition,
683                 &longSelected,
684                 &intSelectedData)){
685                 return;
686         }
687     
688         lboHomeGeoposition->DeleteItem(longSelected);
689     
690         DeleteMapData(intSelectedData, &ContactEditorData.HomeGeographyList,
691                 &ContactEditorData.HomeGeographyListAltID, &ContactEditorData.HomeGeographyListPID,
692                 &ContactEditorData.HomeGeographyListType, &ContactEditorData.HomeGeographyListTokens,
693                 &ContactEditorData.HomeGeographyListDataType, &ContactEditorData.HomeGeographyListMediatype, 
694                 &ContactEditorData.HomeGeographyListPref);
695     
698 void frmContactEditor::AddHomeWebsite( wxCommandEvent& event )
701         // Bring up window to add website.
702         
703         int intResult = 0;
704     
705         frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
706         frameCEWeb->SetEditorMode(FALSE, CE_HOME);
707         intResult = GetLastInt(&ContactEditorData.HomeWebsiteList);
708         frameCEWeb->SetupPointers(&ContactEditorData.HomeWebsiteList,
709                 &ContactEditorData.HomeWebsiteListAltID,
710                 &ContactEditorData.HomeWebsiteListPID,
711                 &ContactEditorData.HomeWebsiteListType,
712                 &ContactEditorData.HomeWebsiteListTokens,
713                 &ContactEditorData.HomeWebsiteListMediatype,
714                 &ContactEditorData.HomeWebsiteListPref,
715                 lboHomeWebsites,
716                 (intValueSeek));
717         frameCEWeb->ShowModal();
718         delete frameCEWeb;
719         frameCEWeb = NULL;
720         
723 void frmContactEditor::ModifyHomeWebsite( wxCommandEvent& event )
725         
726         // Bring up window to modify website.
727         
728         long longSelected = -1;
729         int intSelectedData = 0;
730     
731         if (!GetSelectedItem(lboHomeWebsites,
732                 &longSelected,
733                 &intSelectedData)){
734                 return;
735         }
736     
737         frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
738         frameCEWeb->SetupPointers(&ContactEditorData.HomeWebsiteList,
739                 &ContactEditorData.HomeWebsiteListAltID,
740                 &ContactEditorData.HomeWebsiteListPID,
741                 &ContactEditorData.HomeWebsiteListType,
742                 &ContactEditorData.HomeWebsiteListTokens,
743                 &ContactEditorData.HomeWebsiteListMediatype,
744                 &ContactEditorData.HomeWebsiteListPref,
745                 lboHomeWebsites,
746                 intSelectedData);
747         frameCEWeb->SetEditorMode(TRUE, CE_HOME);
748         frameCEWeb->ShowModal();
749         delete frameCEWeb;
750         frameCEWeb = NULL;
751         
754 void frmContactEditor::DeleteHomeWebsite( wxCommandEvent& event )
756         
757         // Bring up window to delete website.
758         
759         long longSelected = -1;
760         int intSelectedData = 0;
761     
762         if (!GetSelectedItem(lboHomeWebsites,
763                 &longSelected,
764                 &intSelectedData)){
765                 return;
766         }
767     
768         lboHomeWebsites->DeleteItem(longSelected);
769     
770         DeleteMapData(intSelectedData, &ContactEditorData.HomeWebsiteList,
771                 &ContactEditorData.HomeWebsiteListAltID, &ContactEditorData.HomeWebsiteListPID,
772                 &ContactEditorData.HomeWebsiteListType, &ContactEditorData.HomeWebsiteListTokens,
773                 &ContactEditorData.HomeWebsiteListMediatype, &ContactEditorData.HomeWebsiteListPref);
774     
777 void frmContactEditor::AddHomeTitle( wxCommandEvent& event )
779         
780         // Bring up window to add title.
781         
782         int intResult = 0;
783     
784         frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
785         frameCETitle->SetEditorMode(FALSE, CE_HOME);
786         intResult = GetLastInt(&ContactEditorData.HomeTitleList);
787         frameCETitle->SetupPointers(&ContactEditorData.HomeTitleList,
788                 &ContactEditorData.HomeTitleListLanguage,
789                 &ContactEditorData.HomeTitleListAltID,
790                 &ContactEditorData.HomeTitleListPID,
791                 &ContactEditorData.HomeTitleListType,
792                 &ContactEditorData.HomeTitleListTokens,
793                 &ContactEditorData.HomeTitleListPref,
794                 lboHomeTitles,
795                 (intValueSeek));
796         frameCETitle->ShowModal();
797         delete frameCETitle;
798         frameCETitle = NULL;
799         
802 void frmContactEditor::ModifyHomeTitle( wxCommandEvent& event )
804         
805         // Bring up window to modify title.
806         
807         long longSelected = -1;
808         int intSelectedData = 0;
809     
810         if (!GetSelectedItem(lboHomeTitles,
811                 &longSelected,
812                 &intSelectedData)){
813                 return;
814         }
815     
816         frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
817         frameCETitle->SetupPointers(&ContactEditorData.HomeTitleList,
818                 &ContactEditorData.HomeTitleListLanguage,
819                 &ContactEditorData.HomeTitleListAltID,
820                 &ContactEditorData.HomeTitleListPID,
821                 &ContactEditorData.HomeTitleListType,
822                 &ContactEditorData.HomeTitleListTokens,
823                 &ContactEditorData.HomeTitleListPref,
824                 lboHomeTitles,
825                 intSelectedData);
826         frameCETitle->SetEditorMode(TRUE, CE_HOME);
827         frameCETitle->ShowModal();
828         delete frameCETitle;
829         frameCETitle = NULL;
830         
833 void frmContactEditor::DeleteHomeTitle( wxCommandEvent& event )
835         
836         // Bring up window to delete title.
837         
838         long longSelected = -1;
839         int intSelectedData = 0;
840     
841         if (!GetSelectedItem(lboHomeTitles,
842                 &longSelected,
843                 &intSelectedData)){
844                 return;
845         }
846     
847         lboHomeTitles->DeleteItem(longSelected);
848     
849         DeleteMapData(intSelectedData, &ContactEditorData.HomeTitleList,
850                 &ContactEditorData.HomeTitleListLanguage, &ContactEditorData.HomeTitleListAltID,
851                 &ContactEditorData.HomeTitleListPID, &ContactEditorData.HomeTitleListType,
852                 &ContactEditorData.HomeTitleListTokens, &ContactEditorData.HomeTitleListPref);
853     
856 void frmContactEditor::AddHomeRole( wxCommandEvent& event )
858         
859         // Bring up window to add role.
860         
861         int intResult = 0;
862     
863         frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
864         frameCERole->SetEditorMode(FALSE, CE_HOME);
865         intResult = GetLastInt(&ContactEditorData.HomeRoleList);
866         frameCERole->SetupPointers(&ContactEditorData.HomeRoleList,
867                 &ContactEditorData.HomeRoleListLanguage,
868                 &ContactEditorData.HomeRoleListAltID,
869                 &ContactEditorData.HomeRoleListPID,
870                 &ContactEditorData.HomeRoleListType,
871                 &ContactEditorData.HomeRoleListTokens,
872                 &ContactEditorData.HomeRoleListPref,
873                 lboHomeRoles,
874                 (intValueSeek));
875         frameCERole->ShowModal();
876         delete frameCERole;
877         frameCERole = NULL;
878         
881 void frmContactEditor::ModifyHomeRole( wxCommandEvent& event )
884         // Bring up window to modify role.
885         
886         long longSelected = -1;
887         int intSelectedData = 0;
888     
889         if (!GetSelectedItem(lboHomeRoles,
890                 &longSelected,
891                 &intSelectedData)){
892                 return;
893         }
894     
895         frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
896         frameCERole->SetupPointers(&ContactEditorData.HomeRoleList,
897                 &ContactEditorData.HomeRoleListLanguage,
898                 &ContactEditorData.HomeRoleListAltID,
899                 &ContactEditorData.HomeRoleListPID,
900                 &ContactEditorData.HomeRoleListType,
901                 &ContactEditorData.HomeRoleListTokens,
902                 &ContactEditorData.HomeRoleListPref,
903                 lboHomeRoles,
904                 intSelectedData);
905         frameCERole->SetEditorMode(TRUE, CE_HOME);
906         frameCERole->ShowModal();
907         delete frameCERole;
908         frameCERole = NULL;
909         
912 void frmContactEditor::DeleteHomeRole( wxCommandEvent& event )
914         
915         // Bring up window to delete role.
916         
917         long longSelected = -1;
918         int intSelectedData = 0;
919     
920         if (!GetSelectedItem(lboHomeRoles,
921                 &longSelected,
922                 &intSelectedData)){
923                 return;
924         }
925     
926         lboHomeRoles->DeleteItem(longSelected);
927     
928         DeleteMapData(intSelectedData, &ContactEditorData.HomeRoleList,
929                 &ContactEditorData.HomeRoleListLanguage, &ContactEditorData.HomeRoleListAltID,
930                 &ContactEditorData.HomeRoleListPID, &ContactEditorData.HomeRoleListType,
931                 &ContactEditorData.HomeRoleListTokens, &ContactEditorData.HomeRoleListPref);
932     
935 void frmContactEditor::AddHomeOrganisation( wxCommandEvent& event )
937         
938         // Bring up window to add organisation.
939         
940         int intResult = 0;
941     
942         frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
943         frameCEOrg->SetEditorMode(FALSE, CE_HOME);
944         intResult = GetLastInt(&ContactEditorData.HomeOrganisationsList);
945         frameCEOrg->SetupPointers(&ContactEditorData.HomeOrganisationsList,
946                 &ContactEditorData.HomeOrganisationsListLanguage,
947                 &ContactEditorData.HomeOrganisationsListSortAs,
948                 &ContactEditorData.HomeOrganisationsListAltID,
949                 &ContactEditorData.HomeOrganisationsListPID,
950                 &ContactEditorData.HomeOrganisationsListType,
951                 &ContactEditorData.HomeOrganisationsListTokens,
952                 &ContactEditorData.HomeOrganisationsListPref,
953                 lboHomeOrganisations,
954                 (intValueSeek));
955         frameCEOrg->ShowModal();
956         delete frameCEOrg;
957         frameCEOrg = NULL;
958         
961 void frmContactEditor::ModifyHomeOrganisation( wxCommandEvent& event )
963         
964         // Bring up window to modify organisation.
965         
966         long longSelected = -1;
967         int intSelectedData = 0;
968     
969         if (!GetSelectedItem(lboHomeOrganisations,
970                 &longSelected,
971                 &intSelectedData)){
972                 return;
973         }
974     
975         frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
976         frameCEOrg->SetupPointers(&ContactEditorData.HomeOrganisationsList,
977                 &ContactEditorData.HomeOrganisationsListLanguage,
978                 &ContactEditorData.HomeOrganisationsListSortAs,
979                 &ContactEditorData.HomeOrganisationsListAltID,
980                 &ContactEditorData.HomeOrganisationsListPID,
981                 &ContactEditorData.HomeOrganisationsListType,
982                 &ContactEditorData.HomeOrganisationsListTokens,
983                 &ContactEditorData.HomeOrganisationsListPref,
984                 lboHomeOrganisations,
985                 intSelectedData);
986         frameCEOrg->SetEditorMode(TRUE, CE_HOME);
987         frameCEOrg->ShowModal();
988         delete frameCEOrg;
989         frameCEOrg = NULL;
990         
993 void frmContactEditor::DeleteHomeOrganisation( wxCommandEvent& event )
995         
996         // Bring up window to delete organisation.
997         
998         long longSelected = -1;
999         int intSelectedData = 0;
1000     
1001         if (!GetSelectedItem(lboHomeOrganisations,
1002                 &longSelected,
1003                 &intSelectedData)){
1004                 return;
1005         }
1006     
1007         lboHomeOrganisations->DeleteItem(longSelected);
1009         DeleteMapData(intSelectedData, &ContactEditorData.HomeOrganisationsList,
1010                 &ContactEditorData.HomeOrganisationsListLanguage, &ContactEditorData.HomeOrganisationsListSortAs,
1011                 &ContactEditorData.HomeOrganisationsListAltID, &ContactEditorData.HomeOrganisationsListPID,
1012                 &ContactEditorData.HomeOrganisationsListType, &ContactEditorData.HomeOrganisationsListTokens,
1013                 &ContactEditorData.HomeOrganisationsListPref);
1014     
1017 void frmContactEditor::AddHomeNote( wxCommandEvent& event )
1019         
1020         // Bring up window to add note.
1021         
1022         int intResult = 0;
1023     
1024         frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
1025         frameCENote->SetEditorMode(FALSE, CE_HOME);
1026         intResult = GetLastInt(&ContactEditorData.HomeNoteList);
1027         frameCENote->SetupPointers(&ContactEditorData.HomeNoteList,
1028                 &ContactEditorData.HomeNoteListLanguage,
1029                 &ContactEditorData.HomeNoteListAltID,
1030                 &ContactEditorData.HomeNoteListPID,
1031                 &ContactEditorData.HomeNoteListType,
1032                 &ContactEditorData.HomeNoteListTokens,
1033                 &ContactEditorData.HomeNoteListPref,
1034                 lboHomeNotes,
1035                 (intValueSeek));
1036         frameCENote->ShowModal();
1037         delete frameCENote;
1038         frameCENote = NULL;
1039         
1042 void frmContactEditor::ModifyHomeNote( wxCommandEvent& event )
1044         
1045         // Bring up window to modify note.
1046         
1047         long longSelected = -1;
1048         int intSelectedData = 0;
1049     
1050         if (!GetSelectedItem(lboHomeNotes,
1051                 &longSelected,
1052                 &intSelectedData)){
1053                 return;
1054         }
1055     
1056         frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
1057         frameCENote->SetupPointers(&ContactEditorData.HomeNoteList,
1058                 &ContactEditorData.HomeNoteListLanguage,
1059                 &ContactEditorData.HomeNoteListAltID,
1060                 &ContactEditorData.HomeNoteListPID,
1061                 &ContactEditorData.HomeNoteListType,
1062                 &ContactEditorData.HomeNoteListTokens,
1063                 &ContactEditorData.HomeNoteListPref,
1064                 lboHomeNotes,
1065                 intSelectedData);
1066         frameCENote->SetEditorMode(TRUE, CE_HOME);
1067         frameCENote->ShowModal();
1068         delete frameCENote;
1069         frameCENote = NULL;
1070         
1073 void frmContactEditor::DeleteHomeNote( wxCommandEvent& event )
1075         
1076         // Bring up window to delete note.
1077         
1078         long longSelected = -1;
1079         int intSelectedData = 0;
1080     
1081         if (!GetSelectedItem(lboHomeNotes,
1082                 &longSelected,
1083                 &intSelectedData)){
1084                 return;
1085         }
1086     
1087         lboNotes->DeleteItem(longSelected);
1088     
1089         DeleteMapData(intSelectedData, &ContactEditorData.HomeNoteList,
1090                 &ContactEditorData.HomeNoteListLanguage, &ContactEditorData.HomeNoteListAltID,
1091                 &ContactEditorData.HomeNoteListPID, &ContactEditorData.HomeNoteListType,
1092                 &ContactEditorData.HomeNoteListTokens, &ContactEditorData.HomeNoteListPref);
1093     
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