Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
frmContactEditor: Fix issue with intValueSeek not being incremented properly
[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         frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
42         frameCENickname->SetEditorMode(FALSE, CE_HOME);
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     intValueSeek++;
57 }
59 void frmContactEditor::ModifyHomeNickname( wxCommandEvent& event )
60 {
61         
62         // Bring up window to modify nickname.
63         
64         long longSelected = -1;
65         int intSelectedData = 0;
66     
67         if (lboHomeNicknames->GetItemCount() == 0 || !GetSelectedItem(lboHomeNicknames,
68                 &longSelected,
69                 &intSelectedData)){
70                 return;
71         }
72     
73         frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
74         frameCENickname->SetupPointers(&ContactEditorData.HomeNicknamesList,
75                 &ContactEditorData.HomeNicknamesListAltID,
76                 &ContactEditorData.HomeNicknamesListPID,
77                 &ContactEditorData.HomeNicknamesListType,
78                 &ContactEditorData.HomeNicknamesListLanguage,
79                 &ContactEditorData.HomeNicknamesListTokens,
80                 &ContactEditorData.HomeNicknamesListPref,
81                 lboHomeNicknames,
82                 intSelectedData);
83         frameCENickname->SetEditorMode(TRUE, CE_HOME);
84         frameCENickname->ShowModal();
85         delete frameCENickname;
86         frameCENickname = NULL;
87         
88 }
90 void frmContactEditor::DeleteHomeNickname( wxCommandEvent& event )
91 {
92     
93         // Bring up window to delete nickname.
94         
95         long longSelected = -1;
96         int intSelectedData = 0;
97     
98         if (lboHomeNicknames->GetItemCount() == 0 || !GetSelectedItem(lboHomeNicknames,
99                 &longSelected,
100                 &intSelectedData)){
101                 return;
102         }
103     
104         lboHomeNicknames->DeleteItem(longSelected);
105     
106         DeleteMapData(intSelectedData,
107                 &ContactEditorData.HomeNicknamesList,
108                 &ContactEditorData.HomeNicknamesListLanguage,
109                 &ContactEditorData.HomeNicknamesListAltID,
110                 &ContactEditorData.HomeNicknamesListPID,
111                 &ContactEditorData.HomeNicknamesListTokens,
112                 &ContactEditorData.HomeNicknamesListType,
113                 &ContactEditorData.HomeNicknamesListPref);
117 void frmContactEditor::AddHomeAddress( wxCommandEvent& event )
119         
120         // Bring up window to add address.      
121         
122         frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
123         frameCEAddress->SetEditorMode(FALSE, CE_HOME);
124         frameCEAddress->SetupPointers(&ContactEditorData.HomeAddressList,
125                 &ContactEditorData.HomeAddressListTown,
126                 &ContactEditorData.HomeAddressListCounty,
127                 &ContactEditorData.HomeAddressListPostCode,
128                 &ContactEditorData.HomeAddressListCountry,
129                 &ContactEditorData.HomeAddressListLabel,
130                 &ContactEditorData.HomeAddressListLang,
131                 &ContactEditorData.HomeAddressListAltID,
132                 &ContactEditorData.HomeAddressListPID,
133                 &ContactEditorData.HomeAddressListTokens,
134                 &ContactEditorData.HomeAddressListGeo,
135                 &ContactEditorData.HomeAddressListTimezone,
136                 &ContactEditorData.HomeAddressListType,
137                 &ContactEditorData.HomeAddressListMediatype,
138                 &ContactEditorData.HomeAddressListPref,
139                 lboHomeAddresses,
140                 (intValueSeek));
141         frameCEAddress->ShowModal();
142         delete frameCEAddress;
143         frameCEAddress = NULL;
144     intValueSeek++;
148 void frmContactEditor::ModifyHomeAddress( wxCommandEvent& event )
150         
151         // Bring up window to modify address.
152         
153         long longSelected = -1;
154         int intSelectedData = 0;
155     
156         if (lboHomeAddresses->GetItemCount() == 0 || !GetSelectedItem(lboHomeAddresses,
157                 &longSelected,
158                 &intSelectedData)){
159                 return;
160         }
161     
162         frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
163         frameCEAddress->SetupPointers(&ContactEditorData.HomeAddressList,
164                 &ContactEditorData.HomeAddressListTown,
165                 &ContactEditorData.HomeAddressListCounty,
166                 &ContactEditorData.HomeAddressListPostCode,
167                 &ContactEditorData.HomeAddressListCountry,
168                 &ContactEditorData.HomeAddressListLabel,
169                 &ContactEditorData.HomeAddressListLang,
170                 &ContactEditorData.HomeAddressListAltID,
171                 &ContactEditorData.HomeAddressListPID,
172                 &ContactEditorData.HomeAddressListTokens,
173                 &ContactEditorData.HomeAddressListGeo,
174                 &ContactEditorData.HomeAddressListTimezone,
175                 &ContactEditorData.HomeAddressListType,
176                 &ContactEditorData.HomeAddressListMediatype,
177                 &ContactEditorData.HomeAddressListPref,
178                 lboHomeAddresses,
179                 intSelectedData);
180         frameCEAddress->SetEditorMode(TRUE, CE_HOME);
181         frameCEAddress->ShowModal();
182         delete frameCEAddress;
183         frameCEAddress = NULL;
184         
187 void frmContactEditor::DeleteHomeAddress( wxCommandEvent& event )
189  
190         // Bring up window to delete address.
191         
192         long longSelected = -1;
193         int intSelectedData = 0;
194     
195         if (lboHomeAddresses->GetItemCount() == 0 || !GetSelectedItem(lboHomeAddresses,
196                 &longSelected,
197                 &intSelectedData)){
198                 return;
199         }
200     
201         lboHomeAddresses->DeleteItem(longSelected);
202     
203         DeleteMapData(intSelectedData, &ContactEditorData.HomeAddressList,
204                 &ContactEditorData.HomeAddressListTown, &ContactEditorData.HomeAddressListCounty,
205                 &ContactEditorData.HomeAddressListPostCode, &ContactEditorData.HomeAddressListCountry,
206                 &ContactEditorData.HomeAddressList, &ContactEditorData.HomeAddressListLabel,
207                 &ContactEditorData.HomeAddressListLang, &ContactEditorData.HomeAddressListAltID,
208                 &ContactEditorData.HomeAddressListPID, &ContactEditorData.HomeAddressListTokens,
209                 &ContactEditorData.HomeAddressListGeo, &ContactEditorData.HomeAddressListTimezone,
210                 &ContactEditorData.HomeAddressListType, &ContactEditorData.HomeAddressListMediatype,
211                 &ContactEditorData.HomeAddressListPref);
212     
215 void frmContactEditor::AddHomeEmail( wxCommandEvent& event )
217         
218         // Bring up window to add email.
219         
220         frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
221         frameCEEmail->SetEditorMode(FALSE, CE_HOME);
222         frameCEEmail->SetupPointers(&ContactEditorData.HomeEmailList,
223                 &ContactEditorData.HomeEmailListAltID,
224                 &ContactEditorData.HomeEmailListPID,
225                 &ContactEditorData.HomeEmailListType,
226                 &ContactEditorData.HomeEmailListTokens,
227                 &ContactEditorData.HomeEmailListPref,
228                 lboHomeEmails,
229                 (intValueSeek));
230         frameCEEmail->ShowModal();
231         delete frameCEEmail;
232         frameCEEmail = NULL;
233     intValueSeek++;
237 void frmContactEditor::ModifyHomeEmail( wxCommandEvent& event )
239         
240         // Bring up window to modify email.
241         
242         long longSelected = -1;
243         int intSelectedData = 0;
244     
245         if (lboHomeEmails->GetItemCount() == 0 || !GetSelectedItem(lboHomeEmails,
246                 &longSelected,
247                 &intSelectedData)){
248                 return;
249         }
250     
251         frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
252         frameCEEmail->SetupPointers(&ContactEditorData.HomeEmailList,
253                 &ContactEditorData.HomeEmailListAltID,
254                 &ContactEditorData.HomeEmailListPID,
255                 &ContactEditorData.HomeEmailListType,
256                 &ContactEditorData.HomeEmailListTokens,
257                 &ContactEditorData.HomeEmailListPref,
258                 lboHomeEmails,
259                 intSelectedData);
260         frameCEEmail->SetEditorMode(TRUE, CE_HOME);
261         frameCEEmail->ShowModal();
262         delete frameCEEmail;
263         frameCEEmail = NULL;
264         
268 void frmContactEditor::DeleteHomeEmail( wxCommandEvent& event )
270         
271         // Bring up window to delete email.
272         
273         long longSelected = -1;
274         int intSelectedData = 0;
275     
276         if (lboHomeEmails->GetItemCount() == 0 || !GetSelectedItem(lboHomeEmails,
277                 &longSelected,
278                 &intSelectedData)){
279                 return;
280         }
281     
282         lboHomeEmails->DeleteItem(longSelected);
283     
284         DeleteMapData(intSelectedData, &ContactEditorData.HomeEmailList,
285                 &ContactEditorData.HomeEmailListAltID, &ContactEditorData.HomeEmailListPID,
286                 &ContactEditorData.HomeEmailListType, &ContactEditorData.HomeEmailListTokens,
287                 &ContactEditorData.HomeEmailListPref);
288         
292 void frmContactEditor::AddHomeIM( wxCommandEvent& event )
294         
295         // Bring up window to add IM.
296         
297         frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
298         frameCEIM->SetEditorMode(FALSE, CE_HOME);
299         frameCEIM->SetupPointers(&ContactEditorData.HomeIMList,
300                 &ContactEditorData.HomeIMListAltID,
301                 &ContactEditorData.HomeIMListPID,
302                 &ContactEditorData.HomeIMListType,
303                 &ContactEditorData.HomeIMListTypeInfo,
304                 &ContactEditorData.HomeIMListTokens,
305                 &ContactEditorData.HomeIMListMediatype,
306                 &ContactEditorData.HomeIMListPref,
307                 lboHomeIM,
308                 (intValueSeek));
309         frameCEIM->ShowModal();
310         delete frameCEIM;
311         frameCEIM = NULL;
312     intValueSeek++;
316 void frmContactEditor::ModifyHomeIM( wxCommandEvent& event )
319         // Bring up window to modify IM.
320         
321         long longSelected = -1;
322         int intSelectedData = 0;
323     
324         if (lboHomeIM->GetItemCount() == 0 || !GetSelectedItem(lboHomeIM,
325                 &longSelected,
326                 &intSelectedData)){
327                 return;
328         }
329     
330         frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
331         frameCEIM->SetupPointers(&ContactEditorData.HomeIMList,
332                 &ContactEditorData.HomeIMListAltID,
333                 &ContactEditorData.HomeIMListPID,
334                 &ContactEditorData.HomeIMListType,
335                 &ContactEditorData.HomeIMListTypeInfo,
336                 &ContactEditorData.HomeIMListTokens,
337                 &ContactEditorData.HomeIMListMediatype,
338                 &ContactEditorData.HomeIMListPref,
339                 lboHomeIM,
340                 intSelectedData);
341         frameCEIM->SetEditorMode(TRUE, CE_HOME);
342         frameCEIM->ShowModal();
343         delete frameCEIM;
344         frameCEIM = NULL;
345     
348 void frmContactEditor::DeleteHomeIM( wxCommandEvent& event )
350         
351         // Bring up window to delete IM.
353         long longSelected = -1;
354         int intSelectedData = 0;
355     
356         if (lboHomeIM->GetItemCount() == 0 || !GetSelectedItem(lboHomeIM,
357                 &longSelected,
358                 &intSelectedData)){
359                 return;
360         }
361     
362         lboHomeIM->DeleteItem(longSelected);
363     
364         DeleteMapData(intSelectedData, &ContactEditorData.HomeIMList,
365                 &ContactEditorData.HomeIMListAltID, &ContactEditorData.HomeIMListPID,
366                 &ContactEditorData.HomeIMListType, &ContactEditorData.HomeIMListTypeInfo,
367                 &ContactEditorData.HomeIMListTokens, &ContactEditorData.HomeIMListMediatype, 
368                 &ContactEditorData.HomeIMListPref);
369     
372 void frmContactEditor::AddHomeTelephone( wxCommandEvent& event )
374         
375         // Bring up window to add telephone.
376         
377         frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
378         frameCETel->SetEditorMode(FALSE, CE_HOME);
379         frameCETel->SetupPointers(&ContactEditorData.HomeTelephoneList,
380                 &ContactEditorData.HomeTelephoneListAltID,
381                 &ContactEditorData.HomeTelephoneListPID,
382                 &ContactEditorData.HomeTelephoneListType,
383                 &ContactEditorData.HomeTelephoneListTypeInfo,
384                 &ContactEditorData.HomeTelephoneListTokens,
385                 &ContactEditorData.HomeTelephoneListPref,
386                 lboHomeTelephone,
387                 (intValueSeek));
388         frameCETel->ShowModal();
389         delete frameCETel;
390         frameCETel = NULL;
391     intValueSeek++;
395 void frmContactEditor::ModifyHomeTelephone( wxCommandEvent& event )
397         
398         // Bring up window to modify telephone.
399         
400         long longSelected = -1;
401         int intSelectedData = 0;
402     
403         if (lboHomeTelephone->GetItemCount() == 0 || !GetSelectedItem(lboHomeTelephone,
404                 &longSelected,
405                 &intSelectedData)){
406                 return;
407         }
408     
409         frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
410         frameCETel->SetupPointers(&ContactEditorData.HomeTelephoneList,
411                 &ContactEditorData.HomeTelephoneListAltID,
412                 &ContactEditorData.HomeTelephoneListPID,
413                 &ContactEditorData.HomeTelephoneListType,
414                 &ContactEditorData.HomeTelephoneListTypeInfo,
415                 &ContactEditorData.HomeTelephoneListTokens,
416                 &ContactEditorData.HomeTelephoneListPref,
417                 lboHomeTelephone,
418                 intSelectedData);
419         frameCETel->SetEditorMode(TRUE, CE_HOME);
420         frameCETel->ShowModal();
421         delete frameCETel;
422         frameCETel = NULL;
423         
424 }       
426 void frmContactEditor::DeleteHomeTelephone( wxCommandEvent& event )
428         
429         // Bring up window to delete telephone. 
430         
431         long longSelected = -1;
432         int intSelectedData = 0;
433     
434         if (lboHomeTelephone->GetItemCount() == 0 || !GetSelectedItem(lboHomeTelephone,
435                 &longSelected,
436                 &intSelectedData)){
437                 return;
438         }
439     
440         lboHomeTelephone->DeleteItem(longSelected);
441     
442         DeleteMapData(intSelectedData, &ContactEditorData.HomeTelephoneList,
443                 &ContactEditorData.HomeTelephoneListAltID, &ContactEditorData.HomeTelephoneListPID,
444                 &ContactEditorData.HomeTelephoneListType, &ContactEditorData.HomeTelephoneListTypeInfo,
445                 &ContactEditorData.HomeTelephoneListTokens, &ContactEditorData.HomeTelephoneListPref);
446     
449 void frmContactEditor::AddHomeLanguage( wxCommandEvent& event )
451         
452         // Bring up window to add language.
453         
454         frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
455         frameCELang->SetEditorMode(FALSE, CE_HOME);
456         frameCELang->SetupPointers(&ContactEditorData.HomeLanguageList,
457                 &ContactEditorData.HomeLanguageListAltID,
458                 &ContactEditorData.HomeLanguageListPID,
459                 &ContactEditorData.HomeLanguageListType,
460                 &ContactEditorData.HomeLanguageListTokens,
461                 &ContactEditorData.HomeLanguageListPref,
462                 lboHomeLanguages,
463                 (intValueSeek));
464         frameCELang->ShowModal();
465         delete frameCELang;
466         frameCELang = NULL;
467     intValueSeek++;
471 void frmContactEditor::ModifyHomeLanguage( wxCommandEvent& event )
473         
474         // Bring up window to modify language.
475         
476         long longSelected = -1;
477         int intSelectedData = 0;
478     
479         if (lboHomeLanguages->GetItemCount() == 0 || !GetSelectedItem(lboHomeLanguages,
480                 &longSelected,
481                 &intSelectedData)){
482                 return;
483         }
484     
485         frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
486         frameCELang->SetupPointers(&ContactEditorData.HomeLanguageList,
487                 &ContactEditorData.HomeLanguageListAltID,
488                 &ContactEditorData.HomeLanguageListPID,
489                 &ContactEditorData.HomeLanguageListType,
490                 &ContactEditorData.HomeLanguageListTokens,
491                 &ContactEditorData.HomeLanguageListPref,
492                 lboHomeLanguages,
493                 intSelectedData);
494         frameCELang->SetEditorMode(TRUE, CE_HOME);
495         frameCELang->ShowModal();
496         delete frameCELang;
497         frameCELang = NULL;
498         
501 void frmContactEditor::DeleteHomeLanguage( wxCommandEvent& event )
503         
504         // Bring up window to delete language.
505         
506         long longSelected = -1;
507         int intSelectedData = 0;
508     
509         if (lboHomeLanguages->GetItemCount() == 0 || !GetSelectedItem(lboHomeLanguages,
510                 &longSelected,
511                 &intSelectedData)){
512                 return;
513         }
514     
515         lboHomeLanguages->DeleteItem(longSelected);
516     
517         DeleteMapData(intSelectedData, &ContactEditorData.HomeLanguageList,
518                 &ContactEditorData.HomeLanguageListAltID, &ContactEditorData.HomeLanguageListPID,
519                 &ContactEditorData.HomeLanguageListType, &ContactEditorData.HomeLanguageListTokens,
520                 &ContactEditorData.HomeLanguageListPref);
521     
524 void frmContactEditor::AddHomeTimezone( wxCommandEvent& event )
526         
527         // Bring up window to add timezone.
528         
529         frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
530         frameCETZ->SetEditorMode(FALSE, CE_HOME);
531         frameCETZ->SetupPointers(&ContactEditorData.HomeTZList,
532                 &ContactEditorData.HomeTZListAltID,
533                 &ContactEditorData.HomeTZListPID,
534                 &ContactEditorData.HomeTZListType,
535                 &ContactEditorData.HomeTZListTokens,
536                 &ContactEditorData.HomeTZListMediatype,
537                 &ContactEditorData.HomeTZListPref,
538                 lboHomeTimezones,
539                 (intValueSeek));
540         frameCETZ->ShowModal();
541         delete frameCETZ;
542         frameCETZ = NULL;
543     intValueSeek++;
547 void frmContactEditor::ModifyHomeTimezone( wxCommandEvent& event )
549         
550         // Bring up window to modify timezone.
551         
552         long longSelected = -1;
553         int intSelectedData = 0;
554     
555         if (lboHomeTimezones->GetItemCount() == 0 || !GetSelectedItem(lboHomeTimezones,
556                 &longSelected,
557                 &intSelectedData)){
558                 return;
559         }
560     
561         frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
562         frameCETZ->SetupPointers(&ContactEditorData.HomeTZList,
563                 &ContactEditorData.HomeTZListAltID,
564                 &ContactEditorData.HomeTZListPID,
565                 &ContactEditorData.HomeTZListType,
566                 &ContactEditorData.HomeTZListTokens,
567                 &ContactEditorData.HomeTZListMediatype,
568                 &ContactEditorData.HomeTZListPref,
569                 lboHomeTimezones,
570                 intSelectedData);
571         frameCETZ->SetEditorMode(TRUE, CE_HOME);
572         frameCETZ->ShowModal();
573         delete frameCETZ;
574         frameCETZ = NULL;
575         
578 void frmContactEditor::DeleteHomeTimezone( wxCommandEvent& event )
580         
581         // Bring up window to delete timezone.
582         
583         long longSelected = -1;
584         int intSelectedData = 0;
585     
586         if (lboHomeTimezones->GetItemCount() == 0 || !GetSelectedItem(lboHomeTimezones,
587                 &longSelected,
588                 &intSelectedData)){
589                 return;
590         }
591     
592         lboHomeTimezones->DeleteItem(longSelected);
593     
594         DeleteMapData(intSelectedData, &ContactEditorData.HomeTZList,
595                 &ContactEditorData.HomeTZListAltID, &ContactEditorData.HomeTZListPID,
596                 &ContactEditorData.HomeTZListType, &ContactEditorData.HomeTZListTokens,
597                 &ContactEditorData.HomeTZListMediatype, &ContactEditorData.HomeTZListPref);
598     
601 void frmContactEditor::AddHomeGeoposition( wxCommandEvent& event )
604         // Bring up window to add geoposition.
605         
606         frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
607         frameCEGeo->SetEditorMode(FALSE, CE_HOME);
608         frameCEGeo->SetupPointers(&ContactEditorData.HomeGeographyList,
609                 &ContactEditorData.HomeGeographyListAltID,
610                 &ContactEditorData.HomeGeographyListPID,
611                 &ContactEditorData.HomeGeographyListType,
612                 &ContactEditorData.HomeGeographyListDataType,
613                 &ContactEditorData.HomeGeographyListTokens,
614                 &ContactEditorData.HomeGeographyListMediatype,
615                 &ContactEditorData.HomeGeographyListPref,
616                 lboHomeGeoposition,
617                 (intValueSeek));
618         frameCEGeo->ShowModal();
619         delete frameCEGeo;
620         frameCEGeo = NULL;
621     intValueSeek++;
625 void frmContactEditor::ModifyHomeGeoposition( wxCommandEvent& event )
627         
628         // Bring up window to modify geoposition.
629         
630         long longSelected = -1;
631         int intSelectedData = 0;
632     
633         if (lboHomeGeoposition->GetItemCount() == 0 || !GetSelectedItem(lboHomeGeoposition,
634                 &longSelected,
635                 &intSelectedData)){
636                 return;
637         }
638     
639         frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
640         frameCEGeo->SetupPointers(&ContactEditorData.HomeGeographyList,
641                 &ContactEditorData.HomeGeographyListAltID,
642                 &ContactEditorData.HomeGeographyListPID,
643                 &ContactEditorData.HomeGeographyListType,
644                 &ContactEditorData.HomeGeographyListDataType,
645                 &ContactEditorData.HomeGeographyListTokens,
646                 &ContactEditorData.HomeGeographyListMediatype,
647                 &ContactEditorData.HomeGeographyListPref,
648                 lboHomeGeoposition,
649                 intSelectedData);
650         frameCEGeo->SetEditorMode(TRUE, CE_HOME);
651         frameCEGeo->ShowModal();
652         delete frameCEGeo;
653         frameCEGeo = NULL;
654         
657 void frmContactEditor::DeleteHomeGeoposition( wxCommandEvent& event )
659         
660         // Bring up window to delete geoposition.
661         
662         long longSelected = -1;
663         int intSelectedData = 0;
664     
665         if (lboHomeGeoposition->GetItemCount() == 0 || !GetSelectedItem(lboHomeGeoposition,
666                 &longSelected,
667                 &intSelectedData)){
668                 return;
669         }
670     
671         lboHomeGeoposition->DeleteItem(longSelected);
672     
673         DeleteMapData(intSelectedData, &ContactEditorData.HomeGeographyList,
674                 &ContactEditorData.HomeGeographyListAltID, &ContactEditorData.HomeGeographyListPID,
675                 &ContactEditorData.HomeGeographyListType, &ContactEditorData.HomeGeographyListTokens,
676                 &ContactEditorData.HomeGeographyListDataType, &ContactEditorData.HomeGeographyListMediatype, 
677                 &ContactEditorData.HomeGeographyListPref);
678     
681 void frmContactEditor::AddHomeWebsite( wxCommandEvent& event )
684         // Bring up window to add website.
685         
686         frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
687         frameCEWeb->SetEditorMode(FALSE, CE_HOME);
688         frameCEWeb->SetupPointers(&ContactEditorData.HomeWebsiteList,
689                 &ContactEditorData.HomeWebsiteListAltID,
690                 &ContactEditorData.HomeWebsiteListPID,
691                 &ContactEditorData.HomeWebsiteListType,
692                 &ContactEditorData.HomeWebsiteListTokens,
693                 &ContactEditorData.HomeWebsiteListMediatype,
694                 &ContactEditorData.HomeWebsiteListPref,
695                 lboHomeWebsites,
696                 (intValueSeek));
697         frameCEWeb->ShowModal();
698         delete frameCEWeb;
699         frameCEWeb = NULL;
700     intValueSeek++;
704 void frmContactEditor::ModifyHomeWebsite( wxCommandEvent& event )
706         
707         // Bring up window to modify website.
708         
709         long longSelected = -1;
710         int intSelectedData = 0;
711     
712         if (lboHomeWebsites->GetItemCount() == 0 || !GetSelectedItem(lboHomeWebsites,
713                 &longSelected,
714                 &intSelectedData)){
715                 return;
716         }
717     
718         frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
719         frameCEWeb->SetupPointers(&ContactEditorData.HomeWebsiteList,
720                 &ContactEditorData.HomeWebsiteListAltID,
721                 &ContactEditorData.HomeWebsiteListPID,
722                 &ContactEditorData.HomeWebsiteListType,
723                 &ContactEditorData.HomeWebsiteListTokens,
724                 &ContactEditorData.HomeWebsiteListMediatype,
725                 &ContactEditorData.HomeWebsiteListPref,
726                 lboHomeWebsites,
727                 intSelectedData);
728         frameCEWeb->SetEditorMode(TRUE, CE_HOME);
729         frameCEWeb->ShowModal();
730         delete frameCEWeb;
731         frameCEWeb = NULL;
732         
735 void frmContactEditor::DeleteHomeWebsite( wxCommandEvent& event )
737         
738         // Bring up window to delete website.
739         
740         long longSelected = -1;
741         int intSelectedData = 0;
742     
743         if (lboHomeWebsites->GetItemCount() == 0 || !GetSelectedItem(lboHomeWebsites,
744                 &longSelected,
745                 &intSelectedData)){
746                 return;
747         }
748     
749         lboHomeWebsites->DeleteItem(longSelected);
750     
751         DeleteMapData(intSelectedData, &ContactEditorData.HomeWebsiteList,
752                 &ContactEditorData.HomeWebsiteListAltID, &ContactEditorData.HomeWebsiteListPID,
753                 &ContactEditorData.HomeWebsiteListType, &ContactEditorData.HomeWebsiteListTokens,
754                 &ContactEditorData.HomeWebsiteListMediatype, &ContactEditorData.HomeWebsiteListPref);
755     
758 void frmContactEditor::AddHomeTitle( wxCommandEvent& event )
760         
761         // Bring up window to add title.
762         
763         frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
764         frameCETitle->SetEditorMode(FALSE, CE_HOME);
765         frameCETitle->SetupPointers(&ContactEditorData.HomeTitleList,
766                 &ContactEditorData.HomeTitleListLanguage,
767                 &ContactEditorData.HomeTitleListAltID,
768                 &ContactEditorData.HomeTitleListPID,
769                 &ContactEditorData.HomeTitleListType,
770                 &ContactEditorData.HomeTitleListTokens,
771                 &ContactEditorData.HomeTitleListPref,
772                 lboHomeTitles,
773                 (intValueSeek));
774         frameCETitle->ShowModal();
775         delete frameCETitle;
776         frameCETitle = NULL;
777     intValueSeek++;
781 void frmContactEditor::ModifyHomeTitle( wxCommandEvent& event )
783         
784         // Bring up window to modify title.
785         
786         long longSelected = -1;
787         int intSelectedData = 0;
788     
789         if (lboHomeTitles->GetItemCount() == 0 || !GetSelectedItem(lboHomeTitles,
790                 &longSelected,
791                 &intSelectedData)){
792                 return;
793         }
794     
795         frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
796         frameCETitle->SetupPointers(&ContactEditorData.HomeTitleList,
797                 &ContactEditorData.HomeTitleListLanguage,
798                 &ContactEditorData.HomeTitleListAltID,
799                 &ContactEditorData.HomeTitleListPID,
800                 &ContactEditorData.HomeTitleListType,
801                 &ContactEditorData.HomeTitleListTokens,
802                 &ContactEditorData.HomeTitleListPref,
803                 lboHomeTitles,
804                 intSelectedData);
805         frameCETitle->SetEditorMode(TRUE, CE_HOME);
806         frameCETitle->ShowModal();
807         delete frameCETitle;
808         frameCETitle = NULL;
809         
812 void frmContactEditor::DeleteHomeTitle( wxCommandEvent& event )
814         
815         // Bring up window to delete title.
816         
817         long longSelected = -1;
818         int intSelectedData = 0;
819     
820         if (lboHomeTitles->GetItemCount() == 0 || !GetSelectedItem(lboHomeTitles,
821                 &longSelected,
822                 &intSelectedData)){
823                 return;
824         }
825     
826         lboHomeTitles->DeleteItem(longSelected);
827     
828         DeleteMapData(intSelectedData, &ContactEditorData.HomeTitleList,
829                 &ContactEditorData.HomeTitleListLanguage, &ContactEditorData.HomeTitleListAltID,
830                 &ContactEditorData.HomeTitleListPID, &ContactEditorData.HomeTitleListType,
831                 &ContactEditorData.HomeTitleListTokens, &ContactEditorData.HomeTitleListPref);
832     
835 void frmContactEditor::AddHomeRole( wxCommandEvent& event )
837         
838         // Bring up window to add role.
839         
840         frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
841         frameCERole->SetEditorMode(FALSE, CE_HOME);
842         frameCERole->SetupPointers(&ContactEditorData.HomeRoleList,
843                 &ContactEditorData.HomeRoleListLanguage,
844                 &ContactEditorData.HomeRoleListAltID,
845                 &ContactEditorData.HomeRoleListPID,
846                 &ContactEditorData.HomeRoleListType,
847                 &ContactEditorData.HomeRoleListTokens,
848                 &ContactEditorData.HomeRoleListPref,
849                 lboHomeRoles,
850                 (intValueSeek));
851         frameCERole->ShowModal();
852         delete frameCERole;
853         frameCERole = NULL;
854     intValueSeek++;
858 void frmContactEditor::ModifyHomeRole( wxCommandEvent& event )
861         // Bring up window to modify role.
862         
863         long longSelected = -1;
864         int intSelectedData = 0;
865     
866         if (lboHomeRoles->GetItemCount() == 0 || !GetSelectedItem(lboHomeRoles,
867                 &longSelected,
868                 &intSelectedData)){
869                 return;
870         }
871     
872         frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
873         frameCERole->SetupPointers(&ContactEditorData.HomeRoleList,
874                 &ContactEditorData.HomeRoleListLanguage,
875                 &ContactEditorData.HomeRoleListAltID,
876                 &ContactEditorData.HomeRoleListPID,
877                 &ContactEditorData.HomeRoleListType,
878                 &ContactEditorData.HomeRoleListTokens,
879                 &ContactEditorData.HomeRoleListPref,
880                 lboHomeRoles,
881                 intSelectedData);
882         frameCERole->SetEditorMode(TRUE, CE_HOME);
883         frameCERole->ShowModal();
884         delete frameCERole;
885         frameCERole = NULL;
886         
889 void frmContactEditor::DeleteHomeRole( wxCommandEvent& event )
891         
892         // Bring up window to delete role.
893         
894         long longSelected = -1;
895         int intSelectedData = 0;
896     
897         if (lboHomeRoles->GetItemCount() == 0 || !GetSelectedItem(lboHomeRoles,
898                 &longSelected,
899                 &intSelectedData)){
900                 return;
901         }
902     
903         lboHomeRoles->DeleteItem(longSelected);
904     
905         DeleteMapData(intSelectedData, &ContactEditorData.HomeRoleList,
906                 &ContactEditorData.HomeRoleListLanguage, &ContactEditorData.HomeRoleListAltID,
907                 &ContactEditorData.HomeRoleListPID, &ContactEditorData.HomeRoleListType,
908                 &ContactEditorData.HomeRoleListTokens, &ContactEditorData.HomeRoleListPref);
909     
912 void frmContactEditor::AddHomeOrganisation( wxCommandEvent& event )
914         
915         // Bring up window to add organisation.
916         
917         frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
918         frameCEOrg->SetEditorMode(FALSE, CE_HOME);
919         frameCEOrg->SetupPointers(&ContactEditorData.HomeOrganisationsList,
920                 &ContactEditorData.HomeOrganisationsListLanguage,
921                 &ContactEditorData.HomeOrganisationsListSortAs,
922                 &ContactEditorData.HomeOrganisationsListAltID,
923                 &ContactEditorData.HomeOrganisationsListPID,
924                 &ContactEditorData.HomeOrganisationsListType,
925                 &ContactEditorData.HomeOrganisationsListTokens,
926                 &ContactEditorData.HomeOrganisationsListPref,
927                 lboHomeOrganisations,
928                 (intValueSeek));
929         frameCEOrg->ShowModal();
930         delete frameCEOrg;
931         frameCEOrg = NULL;
932     intValueSeek++;
936 void frmContactEditor::ModifyHomeOrganisation( wxCommandEvent& event )
938         
939         // Bring up window to modify organisation.
940         
941         long longSelected = -1;
942         int intSelectedData = 0;
943     
944         if (lboHomeOrganisations->GetItemCount() == 0 || !GetSelectedItem(lboHomeOrganisations,
945                 &longSelected,
946                 &intSelectedData)){
947                 return;
948         }
949     
950         frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
951         frameCEOrg->SetupPointers(&ContactEditorData.HomeOrganisationsList,
952                 &ContactEditorData.HomeOrganisationsListLanguage,
953                 &ContactEditorData.HomeOrganisationsListSortAs,
954                 &ContactEditorData.HomeOrganisationsListAltID,
955                 &ContactEditorData.HomeOrganisationsListPID,
956                 &ContactEditorData.HomeOrganisationsListType,
957                 &ContactEditorData.HomeOrganisationsListTokens,
958                 &ContactEditorData.HomeOrganisationsListPref,
959                 lboHomeOrganisations,
960                 intSelectedData);
961         frameCEOrg->SetEditorMode(TRUE, CE_HOME);
962         frameCEOrg->ShowModal();
963         delete frameCEOrg;
964         frameCEOrg = NULL;
965         
968 void frmContactEditor::DeleteHomeOrganisation( wxCommandEvent& event )
970         
971         // Bring up window to delete organisation.
972         
973         long longSelected = -1;
974         int intSelectedData = 0;
975     
976         if (lboHomeOrganisations->GetItemCount() == 0 ||!GetSelectedItem(lboHomeOrganisations,
977                 &longSelected,
978                 &intSelectedData)){
979                 return;
980         }
981     
982         lboHomeOrganisations->DeleteItem(longSelected);
984         DeleteMapData(intSelectedData, &ContactEditorData.HomeOrganisationsList,
985                 &ContactEditorData.HomeOrganisationsListLanguage, &ContactEditorData.HomeOrganisationsListSortAs,
986                 &ContactEditorData.HomeOrganisationsListAltID, &ContactEditorData.HomeOrganisationsListPID,
987                 &ContactEditorData.HomeOrganisationsListType, &ContactEditorData.HomeOrganisationsListTokens,
988                 &ContactEditorData.HomeOrganisationsListPref);
989     
992 void frmContactEditor::AddHomeNote( wxCommandEvent& event )
994         
995         // Bring up window to add note.
996         
997         frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
998         frameCENote->SetEditorMode(FALSE, CE_HOME);
999         frameCENote->SetupPointers(&ContactEditorData.HomeNoteList,
1000                 &ContactEditorData.HomeNoteListLanguage,
1001                 &ContactEditorData.HomeNoteListAltID,
1002                 &ContactEditorData.HomeNoteListPID,
1003                 &ContactEditorData.HomeNoteListType,
1004                 &ContactEditorData.HomeNoteListTokens,
1005                 &ContactEditorData.HomeNoteListPref,
1006                 lboHomeNotes,
1007                 (intValueSeek));
1008         frameCENote->ShowModal();
1009         delete frameCENote;
1010         frameCENote = NULL;
1011     intValueSeek++;
1015 void frmContactEditor::ModifyHomeNote( wxCommandEvent& event )
1017         
1018         // Bring up window to modify note.
1019         
1020         long longSelected = -1;
1021         int intSelectedData = 0;
1022     
1023         if (lboHomeNotes->GetItemCount() == 0 || !GetSelectedItem(lboHomeNotes,
1024                 &longSelected,
1025                 &intSelectedData)){
1026                 return;
1027         }
1028     
1029         frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
1030         frameCENote->SetupPointers(&ContactEditorData.HomeNoteList,
1031                 &ContactEditorData.HomeNoteListLanguage,
1032                 &ContactEditorData.HomeNoteListAltID,
1033                 &ContactEditorData.HomeNoteListPID,
1034                 &ContactEditorData.HomeNoteListType,
1035                 &ContactEditorData.HomeNoteListTokens,
1036                 &ContactEditorData.HomeNoteListPref,
1037                 lboHomeNotes,
1038                 intSelectedData);
1039         frameCENote->SetEditorMode(TRUE, CE_HOME);
1040         frameCENote->ShowModal();
1041         delete frameCENote;
1042         frameCENote = NULL;
1043         
1046 void frmContactEditor::DeleteHomeNote( wxCommandEvent& event )
1048         
1049         // Bring up window to delete note.
1050         
1051         long longSelected = -1;
1052         int intSelectedData = 0;
1053     
1054         if (lboHomeNotes->GetItemCount() == 0 || !GetSelectedItem(lboHomeNotes,
1055                 &longSelected,
1056                 &intSelectedData)){
1057                 return;
1058         }
1059     
1060         lboHomeNotes->DeleteItem(longSelected);
1061     
1062         DeleteMapData(intSelectedData, &ContactEditorData.HomeNoteList,
1063                 &ContactEditorData.HomeNoteListLanguage, &ContactEditorData.HomeNoteListAltID,
1064                 &ContactEditorData.HomeNoteListPID, &ContactEditorData.HomeNoteListType,
1065                 &ContactEditorData.HomeNoteListTokens, &ContactEditorData.HomeNoteListPref);
1066     
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