Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
0d45448f194d23fb164b62fda090db0e409e675a
[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.HomeIMListTokens,
278                              &ContactEditorData.HomeIMListMediatype,
279                              &ContactEditorData.HomeIMListPref,
280                              lboHomeIM,
281                              (intValueSeek));
282     frameCEIM->ShowModal();
283     delete frameCEIM;
284     frameCEIM = NULL;
287 void frmContactEditor::ModifyHomeIM( wxCommandEvent& event )
289     long longSelected = -1;
290     int intSelectedData = 0;
291     
292     if (!GetSelectedItem(lboHomeIM,
293                          &longSelected,
294                          &intSelectedData)){
295         return;
296     }
297     
298     frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
299     frameCEIM->SetupPointers(&ContactEditorData.HomeIMList,
300                              &ContactEditorData.HomeIMListAltID,
301                              &ContactEditorData.HomeIMListPID,
302                              &ContactEditorData.HomeIMListType,
303                              &ContactEditorData.HomeIMListTokens,
304                              &ContactEditorData.HomeIMListMediatype,
305                              &ContactEditorData.HomeIMListPref,
306                              lboHomeIM,
307                              intSelectedData);
308     frameCEIM->SetEditorMode(TRUE, CE_HOME);
309     frameCEIM->ShowModal();
310     delete frameCEIM;
311     frameCEIM = NULL;
314 void frmContactEditor::DeleteHomeIM( wxCommandEvent& event )
316     long longSelected = -1;
317     int intSelectedData = 0;
318     
319     if (!GetSelectedItem(lboHomeIM,
320                          &longSelected,
321                          &intSelectedData)){
322         return;
323     }
324     
325     lboHomeIM->DeleteItem(longSelected);
326     
327     DeleteMapData(intSelectedData, &ContactEditorData.HomeIMList,
328                   &ContactEditorData.HomeIMListAltID, &ContactEditorData.HomeIMListPID,
329                   &ContactEditorData.HomeIMListType, &ContactEditorData.HomeIMListTokens,
330                   &ContactEditorData.HomeIMListMediatype, &ContactEditorData.HomeIMListPref);
331     
334 void frmContactEditor::AddHomeTelephone( wxCommandEvent& event )
336     int intResult = 0;
337     
338     frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
339     frameCETel->SetEditorMode(FALSE, CE_HOME);
340     intResult = GetLastInt(&ContactEditorData.HomeTelephoneList);
341     frameCETel->SetupPointers(&ContactEditorData.HomeTelephoneList,
342                               &ContactEditorData.HomeTelephoneListAltID,
343                               &ContactEditorData.HomeTelephoneListPID,
344                               &ContactEditorData.HomeTelephoneListType,
345                               &ContactEditorData.HomeTelephoneListTokens,
346                               &ContactEditorData.HomeTelephoneListPref,
347                               lboHomeTelephone,
348                               (intValueSeek));
349     frameCETel->ShowModal();
350     delete frameCETel;
351     frameCETel = NULL;
354 void frmContactEditor::ModifyHomeTelephone( wxCommandEvent& event )
356     long longSelected = -1;
357     int intSelectedData = 0;
358     
359     if (!GetSelectedItem(lboHomeTelephone,
360                          &longSelected,
361                          &intSelectedData)){
362         return;
363     }
364     
365     frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
366     frameCETel->SetupPointers(&ContactEditorData.HomeTelephoneList,
367                               &ContactEditorData.HomeTelephoneListAltID,
368                               &ContactEditorData.HomeTelephoneListPID,
369                               &ContactEditorData.HomeTelephoneListType,
370                               &ContactEditorData.HomeTelephoneListTokens,
371                               &ContactEditorData.HomeTelephoneListPref,
372                               lboHomeTelephone,
373                               intSelectedData);
374     frameCETel->SetEditorMode(TRUE, CE_HOME);
375     frameCETel->ShowModal();
376     delete frameCETel;
377     frameCETel = NULL;
380 void frmContactEditor::DeleteHomeTelephone( wxCommandEvent& event )
382     long longSelected = -1;
383     int intSelectedData = 0;
384     
385     if (!GetSelectedItem(lboHomeTelephone,
386                          &longSelected,
387                          &intSelectedData)){
388         return;
389     }
390     
391     lboHomeTelephone->DeleteItem(longSelected);
392     
393     DeleteMapData(intSelectedData, &ContactEditorData.HomeTelephoneList,
394                   &ContactEditorData.HomeTelephoneListAltID, &ContactEditorData.HomeTelephoneListPID,
395                   &ContactEditorData.HomeTelephoneListType, &ContactEditorData.HomeTelephoneListTokens,
396                   &ContactEditorData.HomeTelephoneListPref);
397     
400 void frmContactEditor::AddHomeLanguage( wxCommandEvent& event )
402     int intResult = 0;
403     
404     frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
405     frameCELang->SetEditorMode(FALSE, CE_HOME);
406     intResult = GetLastInt(&ContactEditorData.HomeLanguageList);
407     frameCELang->SetupPointers(&ContactEditorData.HomeLanguageList,
408                                &ContactEditorData.HomeLanguageListAltID,
409                                &ContactEditorData.HomeLanguageListPID,
410                                &ContactEditorData.HomeLanguageListType,
411                                &ContactEditorData.HomeLanguageListTokens,
412                                &ContactEditorData.HomeLanguageListPref,
413                                lboHomeLanguages,
414                                (intValueSeek));
415     frameCELang->ShowModal();
416     delete frameCELang;
417     frameCELang = NULL;
420 void frmContactEditor::ModifyHomeLanguage( wxCommandEvent& event )
422     long longSelected = -1;
423     int intSelectedData = 0;
424     
425     if (!GetSelectedItem(lboHomeLanguages,
426                          &longSelected,
427                          &intSelectedData)){
428         return;
429     }
430     
431     frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
432     frameCELang->SetupPointers(&ContactEditorData.HomeLanguageList,
433                                &ContactEditorData.HomeLanguageListAltID,
434                                &ContactEditorData.HomeLanguageListPID,
435                                &ContactEditorData.HomeLanguageListType,
436                                &ContactEditorData.HomeLanguageListTokens,
437                                &ContactEditorData.HomeLanguageListPref,
438                                lboHomeLanguages,
439                                intSelectedData);
440     frameCELang->SetEditorMode(TRUE, CE_HOME);
441     frameCELang->ShowModal();
442     delete frameCELang;
443     frameCELang = NULL;
446 void frmContactEditor::DeleteHomeLanguage( wxCommandEvent& event )
448     long longSelected = -1;
449     int intSelectedData = 0;
450     
451     if (!GetSelectedItem(lboHomeLanguages,
452                          &longSelected,
453                          &intSelectedData)){
454         return;
455     }
456     
457     lboHomeLanguages->DeleteItem(longSelected);
458     
459     DeleteMapData(intSelectedData, &ContactEditorData.HomeLanguageList,
460                   &ContactEditorData.HomeLanguageListAltID, &ContactEditorData.HomeLanguageListPID,
461                   &ContactEditorData.HomeLanguageListType, &ContactEditorData.HomeLanguageListTokens,
462                   &ContactEditorData.HomeLanguageListPref);
463     
466 void frmContactEditor::AddHomeTimezone( wxCommandEvent& event )
468     int intResult = 0;
469     
470     frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
471     frameCETZ->SetEditorMode(FALSE, CE_HOME);
472     intResult = GetLastInt(&ContactEditorData.HomeTZList);
473     frameCETZ->SetupPointers(&ContactEditorData.HomeTZList,
474                              &ContactEditorData.HomeTZListAltID,
475                              &ContactEditorData.HomeTZListPID,
476                              &ContactEditorData.HomeTZListType,
477                              &ContactEditorData.HomeTZListTokens,
478                              &ContactEditorData.HomeTZListMediatype,
479                              &ContactEditorData.HomeTZListPref,
480                              lboHomeTimezones,
481                              (intValueSeek));
482     frameCETZ->ShowModal();
483     delete frameCETZ;
484     frameCETZ = NULL;
487 void frmContactEditor::ModifyHomeTimezone( wxCommandEvent& event )
489     long longSelected = -1;
490     int intSelectedData = 0;
491     
492     if (!GetSelectedItem(lboHomeTimezones,
493                          &longSelected,
494                          &intSelectedData)){
495         return;
496     }
497     
498     frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
499     frameCETZ->SetupPointers(&ContactEditorData.HomeTZList,
500                              &ContactEditorData.HomeTZListAltID,
501                              &ContactEditorData.HomeTZListPID,
502                              &ContactEditorData.HomeTZListType,
503                              &ContactEditorData.HomeTZListTokens,
504                              &ContactEditorData.HomeTZListMediatype,
505                              &ContactEditorData.HomeTZListPref,
506                              lboHomeTimezones,
507                              intSelectedData);
508     frameCETZ->SetEditorMode(TRUE, CE_HOME);
509     frameCETZ->ShowModal();
510     delete frameCETZ;
511     frameCETZ = NULL;
514 void frmContactEditor::DeleteHomeTimezone( wxCommandEvent& event )
516     long longSelected = -1;
517     int intSelectedData = 0;
518     
519     if (!GetSelectedItem(lboHomeTimezones,
520                          &longSelected,
521                          &intSelectedData)){
522         return;
523     }
524     
525     lboHomeTimezones->DeleteItem(longSelected);
526     
527     DeleteMapData(intSelectedData, &ContactEditorData.HomeTZList,
528                   &ContactEditorData.HomeTZListAltID, &ContactEditorData.HomeTZListPID,
529                   &ContactEditorData.HomeTZListType, &ContactEditorData.HomeTZListTokens,
530                   &ContactEditorData.HomeTZListMediatype, &ContactEditorData.HomeTZListPref);
531     
534 void frmContactEditor::AddHomeGeoposition( wxCommandEvent& event )
536     int intResult = 0;
537     
538     frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
539     frameCEGeo->SetEditorMode(FALSE, CE_HOME);
540     intResult = GetLastInt(&ContactEditorData.HomeGeographyList);
541     frameCEGeo->SetupPointers(&ContactEditorData.HomeGeographyList,
542                               &ContactEditorData.HomeGeographyListAltID,
543                               &ContactEditorData.HomeGeographyListPID,
544                               &ContactEditorData.HomeGeographyListType,
545                               &ContactEditorData.HomeGeographyListTokens,
546                               &ContactEditorData.HomeGeographyListMediatype,
547                               &ContactEditorData.HomeGeographyListPref,
548                               lboHomeGeoposition,
549                               (intValueSeek));
550     frameCEGeo->ShowModal();
551     delete frameCEGeo;
552     frameCEGeo = NULL;
555 void frmContactEditor::ModifyHomeGeoposition( wxCommandEvent& event )
557     long longSelected = -1;
558     int intSelectedData = 0;
559     
560     if (!GetSelectedItem(lboHomeGeoposition,
561                          &longSelected,
562                          &intSelectedData)){
563         return;
564     }
565     
566     frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
567     frameCEGeo->SetupPointers(&ContactEditorData.HomeGeographyList,
568                               &ContactEditorData.HomeGeographyListAltID,
569                               &ContactEditorData.HomeGeographyListPID,
570                               &ContactEditorData.HomeGeographyListType,
571                               &ContactEditorData.HomeGeographyListTokens,
572                               &ContactEditorData.HomeGeographyListMediatype,
573                               &ContactEditorData.HomeGeographyListPref,
574                               lboHomeGeoposition,
575                               intSelectedData);
576     frameCEGeo->SetEditorMode(TRUE, CE_HOME);
577     frameCEGeo->ShowModal();
578     delete frameCEGeo;
579     frameCEGeo = NULL;
582 void frmContactEditor::DeleteHomeGeoposition( wxCommandEvent& event )
584     long longSelected = -1;
585     int intSelectedData = 0;
586     
587     if (!GetSelectedItem(lboHomeGeoposition,
588                          &longSelected,
589                          &intSelectedData)){
590         return;
591     }
592     
593     lboHomeGeoposition->DeleteItem(longSelected);
594     
595     DeleteMapData(intSelectedData, &ContactEditorData.HomeGeographyList,
596                   &ContactEditorData.HomeGeographyListAltID, &ContactEditorData.HomeGeographyListPID,
597                   &ContactEditorData.HomeGeographyListType, &ContactEditorData.HomeGeographyListTokens,
598                   &ContactEditorData.HomeGeographyListMediatype, &ContactEditorData.HomeGeographyListPref);
599     
602 void frmContactEditor::AddHomeWebsite( wxCommandEvent& event )
604     int intResult = 0;
605     
606     frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
607     frameCEWeb->SetEditorMode(FALSE, CE_HOME);
608     intResult = GetLastInt(&ContactEditorData.HomeWebsiteList);
609     frameCEWeb->SetupPointers(&ContactEditorData.HomeWebsiteList,
610                               &ContactEditorData.HomeWebsiteListAltID,
611                               &ContactEditorData.HomeWebsiteListPID,
612                               &ContactEditorData.HomeWebsiteListType,
613                               &ContactEditorData.HomeWebsiteListTokens,
614                               &ContactEditorData.HomeWebsiteListMediatype,
615                               &ContactEditorData.HomeWebsiteListPref,
616                               lboHomeWebsites,
617                               (intValueSeek));
618     frameCEWeb->ShowModal();
619     delete frameCEWeb;
620     frameCEWeb = NULL;
623 void frmContactEditor::ModifyHomeWebsite( wxCommandEvent& event )
625     long longSelected = -1;
626     int intSelectedData = 0;
627     
628     if (!GetSelectedItem(lboHomeWebsites,
629                          &longSelected,
630                          &intSelectedData)){
631         return;
632     }
633     
634     frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
635     frameCEWeb->SetupPointers(&ContactEditorData.HomeWebsiteList,
636                               &ContactEditorData.HomeWebsiteListAltID,
637                               &ContactEditorData.HomeWebsiteListPID,
638                               &ContactEditorData.HomeWebsiteListType,
639                               &ContactEditorData.HomeWebsiteListTokens,
640                               &ContactEditorData.HomeWebsiteListMediatype,
641                               &ContactEditorData.HomeWebsiteListPref,
642                               lboHomeWebsites,
643                               intSelectedData);
644     frameCEWeb->SetEditorMode(TRUE, CE_HOME);
645     frameCEWeb->ShowModal();
646     delete frameCEWeb;
647     frameCEWeb = NULL;
650 void frmContactEditor::DeleteHomeWebsite( wxCommandEvent& event )
652     long longSelected = -1;
653     int intSelectedData = 0;
654     
655     if (!GetSelectedItem(lboHomeWebsites,
656                          &longSelected,
657                          &intSelectedData)){
658         return;
659     }
660     
661     lboHomeWebsites->DeleteItem(longSelected);
662     
663     DeleteMapData(intSelectedData, &ContactEditorData.HomeWebsiteList,
664                   &ContactEditorData.HomeWebsiteListAltID, &ContactEditorData.HomeWebsiteListPID,
665                   &ContactEditorData.HomeWebsiteListType, &ContactEditorData.HomeWebsiteListTokens,
666                   &ContactEditorData.HomeWebsiteListMediatype, &ContactEditorData.HomeWebsiteListPref);
667     
670 void frmContactEditor::AddHomeTitle( wxCommandEvent& event )
672     int intResult = 0;
673     
674     frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
675     frameCETitle->SetEditorMode(FALSE, CE_HOME);
676     intResult = GetLastInt(&ContactEditorData.HomeTitleList);
677     frameCETitle->SetupPointers(&ContactEditorData.HomeTitleList,
678                                 &ContactEditorData.HomeTitleListLanguage,
679                                 &ContactEditorData.HomeTitleListAltID,
680                                 &ContactEditorData.HomeTitleListPID,
681                                 &ContactEditorData.HomeTitleListType,
682                                 &ContactEditorData.HomeTitleListTokens,
683                                 &ContactEditorData.HomeTitleListPref,
684                                 lboHomeTitles,
685                                 (intValueSeek));
686     frameCETitle->ShowModal();
687     delete frameCETitle;
688     frameCETitle = NULL;
691 void frmContactEditor::ModifyHomeTitle( wxCommandEvent& event )
693     long longSelected = -1;
694     int intSelectedData = 0;
695     
696     if (!GetSelectedItem(lboHomeTitles,
697                          &longSelected,
698                          &intSelectedData)){
699         return;
700     }
701     
702     frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
703     frameCETitle->SetupPointers(&ContactEditorData.HomeTitleList,
704                                 &ContactEditorData.HomeTitleListLanguage,
705                                 &ContactEditorData.HomeTitleListAltID,
706                                 &ContactEditorData.HomeTitleListPID,
707                                 &ContactEditorData.HomeTitleListType,
708                                 &ContactEditorData.HomeTitleListTokens,
709                                 &ContactEditorData.HomeTitleListPref,
710                                 lboHomeTitles,
711                                 intSelectedData);
712     frameCETitle->SetEditorMode(TRUE, CE_HOME);
713     frameCETitle->ShowModal();
714     delete frameCETitle;
715     frameCETitle = NULL;
718 void frmContactEditor::DeleteHomeTitle( wxCommandEvent& event )
720     long longSelected = -1;
721     int intSelectedData = 0;
722     
723     if (!GetSelectedItem(lboHomeTitles,
724                          &longSelected,
725                          &intSelectedData)){
726         return;
727     }
728     
729     lboHomeTitles->DeleteItem(longSelected);
730     
731     DeleteMapData(intSelectedData, &ContactEditorData.HomeTitleList,
732                   &ContactEditorData.HomeTitleListLanguage, &ContactEditorData.HomeTitleListAltID,
733                   &ContactEditorData.HomeTitleListPID, &ContactEditorData.HomeTitleListType,
734                   &ContactEditorData.HomeTitleListTokens, &ContactEditorData.HomeTitleListPref);
735     
738 void frmContactEditor::AddHomeRole( wxCommandEvent& event )
740     int intResult = 0;
741     
742     frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
743     frameCERole->SetEditorMode(FALSE, CE_HOME);
744     intResult = GetLastInt(&ContactEditorData.HomeRoleList);
745     frameCERole->SetupPointers(&ContactEditorData.HomeRoleList,
746                                &ContactEditorData.HomeRoleListLanguage,
747                                &ContactEditorData.HomeRoleListAltID,
748                                &ContactEditorData.HomeRoleListPID,
749                                &ContactEditorData.HomeRoleListType,
750                                &ContactEditorData.HomeRoleListTokens,
751                                &ContactEditorData.HomeRoleListPref,
752                                lboHomeRoles,
753                                (intValueSeek));
754     frameCERole->ShowModal();
755     delete frameCERole;
756     frameCERole = NULL;
759 void frmContactEditor::ModifyHomeRole( wxCommandEvent& event )
761     long longSelected = -1;
762     int intSelectedData = 0;
763     
764     if (!GetSelectedItem(lboHomeRoles,
765                          &longSelected,
766                          &intSelectedData)){
767         return;
768     }
769     
770     frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
771     frameCERole->SetupPointers(&ContactEditorData.HomeRoleList,
772                                &ContactEditorData.HomeRoleListLanguage,
773                                &ContactEditorData.HomeRoleListAltID,
774                                &ContactEditorData.HomeRoleListPID,
775                                &ContactEditorData.HomeRoleListType,
776                                &ContactEditorData.HomeRoleListTokens,
777                                &ContactEditorData.HomeRoleListPref,
778                                lboHomeRoles,
779                                intSelectedData);
780     frameCERole->SetEditorMode(TRUE, CE_HOME);
781     frameCERole->ShowModal();
782     delete frameCERole;
783     frameCERole = NULL;
786 void frmContactEditor::DeleteHomeRole( wxCommandEvent& event )
788     long longSelected = -1;
789     int intSelectedData = 0;
790     
791     if (!GetSelectedItem(lboHomeRoles,
792                          &longSelected,
793                          &intSelectedData)){
794         return;
795     }
796     
797     lboHomeRoles->DeleteItem(longSelected);
798     
799     DeleteMapData(intSelectedData, &ContactEditorData.HomeRoleList,
800                   &ContactEditorData.HomeRoleListLanguage, &ContactEditorData.HomeRoleListAltID,
801                   &ContactEditorData.HomeRoleListPID, &ContactEditorData.HomeRoleListType,
802                   &ContactEditorData.HomeRoleListTokens, &ContactEditorData.HomeRoleListPref);
803     
806 void frmContactEditor::AddHomeOrganisation( wxCommandEvent& event )
808     int intResult = 0;
809     
810     frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
811     frameCEOrg->SetEditorMode(FALSE, CE_HOME);
812     intResult = GetLastInt(&ContactEditorData.HomeOrganisationsList);
813     frameCEOrg->SetupPointers(&ContactEditorData.HomeOrganisationsList,
814                               &ContactEditorData.HomeOrganisationsListLanguage,
815                               &ContactEditorData.HomeOrganisationsListSortAs,
816                               &ContactEditorData.HomeOrganisationsListAltID,
817                               &ContactEditorData.HomeOrganisationsListPID,
818                               &ContactEditorData.HomeOrganisationsListType,
819                               &ContactEditorData.HomeOrganisationsListTokens,
820                               &ContactEditorData.HomeOrganisationsListPref,
821                               lboHomeOrganisations,
822                               (intValueSeek));
823     frameCEOrg->ShowModal();
824     delete frameCEOrg;
825     frameCEOrg = NULL;
828 void frmContactEditor::ModifyHomeOrganisation( wxCommandEvent& event )
830     long longSelected = -1;
831     int intSelectedData = 0;
832     
833     if (!GetSelectedItem(lboHomeOrganisations,
834                          &longSelected,
835                          &intSelectedData)){
836         return;
837     }
838     
839     frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
840     frameCEOrg->SetupPointers(&ContactEditorData.HomeOrganisationsList,
841                               &ContactEditorData.HomeOrganisationsListLanguage,
842                               &ContactEditorData.HomeOrganisationsListSortAs,
843                               &ContactEditorData.HomeOrganisationsListAltID,
844                               &ContactEditorData.HomeOrganisationsListPID,
845                               &ContactEditorData.HomeOrganisationsListType,
846                               &ContactEditorData.HomeOrganisationsListTokens,
847                               &ContactEditorData.HomeOrganisationsListPref,
848                               lboHomeOrganisations,
849                               intSelectedData);
850     frameCEOrg->SetEditorMode(TRUE, CE_HOME);
851     frameCEOrg->ShowModal();
852     delete frameCEOrg;
853     frameCEOrg = NULL;
856 void frmContactEditor::DeleteHomeOrganisation( wxCommandEvent& event )
858     long longSelected = -1;
859     int intSelectedData = 0;
860     
861     if (!GetSelectedItem(lboHomeOrganisations,
862                          &longSelected,
863                          &intSelectedData)){
864         return;
865     }
866     
867     lboHomeOrganisations->DeleteItem(longSelected);
868     
869     DeleteMapData(intSelectedData, &ContactEditorData.HomeOrganisationsList,
870                   &ContactEditorData.HomeOrganisationsListLanguage, &ContactEditorData.HomeOrganisationsListSortAs,
871                   &ContactEditorData.HomeOrganisationsListAltID, &ContactEditorData.HomeOrganisationsListPID,
872                   &ContactEditorData.HomeOrganisationsListType, &ContactEditorData.HomeOrganisationsListTokens,
873                   &ContactEditorData.HomeOrganisationsListPref);
874     
877 void frmContactEditor::AddHomeNote( wxCommandEvent& event )
879     int intResult = 0;
880     
881     frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
882     frameCENote->SetEditorMode(FALSE, CE_HOME);
883     intResult = GetLastInt(&ContactEditorData.HomeNoteList);
884     frameCENote->SetupPointers(&ContactEditorData.HomeNoteList,
885                                &ContactEditorData.HomeNoteListLanguage,
886                                &ContactEditorData.HomeNoteListAltID,
887                                &ContactEditorData.HomeNoteListPID,
888                                &ContactEditorData.HomeNoteListType,
889                                &ContactEditorData.HomeNoteListTokens,
890                                &ContactEditorData.HomeNoteListPref,
891                                lboHomeNotes,
892                                (intValueSeek));
893     frameCENote->ShowModal();
894     delete frameCENote;
895     frameCENote = NULL;
898 void frmContactEditor::ModifyHomeNote( wxCommandEvent& event )
900     long longSelected = -1;
901     int intSelectedData = 0;
902     
903     if (!GetSelectedItem(lboHomeNotes,
904                          &longSelected,
905                          &intSelectedData)){
906         return;
907     }
908     
909     frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
910     frameCENote->SetupPointers(&ContactEditorData.HomeNoteList,
911                                &ContactEditorData.HomeNoteListLanguage,
912                                &ContactEditorData.HomeNoteListAltID,
913                                &ContactEditorData.HomeNoteListPID,
914                                &ContactEditorData.HomeNoteListType,
915                                &ContactEditorData.HomeNoteListTokens,
916                                &ContactEditorData.HomeNoteListPref,
917                                lboHomeNotes,
918                                intSelectedData);
919     frameCENote->SetEditorMode(TRUE, CE_HOME);
920     frameCENote->ShowModal();
921     delete frameCENote;
922     frameCENote = NULL;
925 void frmContactEditor::DeleteHomeNote( wxCommandEvent& event )
927     long longSelected = -1;
928     int intSelectedData = 0;
929     
930     if (!GetSelectedItem(lboHomeNotes,
931                          &longSelected,
932                          &intSelectedData)){
933         return;
934     }
935     
936     lboNotes->DeleteItem(longSelected);
937     
938     DeleteMapData(intSelectedData, &ContactEditorData.HomeNoteList,
939                   &ContactEditorData.HomeNoteListLanguage, &ContactEditorData.HomeNoteListAltID,
940                   &ContactEditorData.HomeNoteListPID, &ContactEditorData.HomeNoteListType,
941                   &ContactEditorData.HomeNoteListTokens, &ContactEditorData.HomeNoteListPref);
942     
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