Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added copyright and license header to the C++ source and header files in the contacte...
[xestiaab/.git] / source / contacteditor / frmContactEditor-General.cpp
1 // frmContactEditor-General.cpp - frmContactEditor General tab subroutines.
2 //
3 // (c) 2012-2015 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::AddGeneralNickname( wxCommandEvent& event )
37 {
38     int intResult = 0;
39     
40     frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
41     frameCENickname->SetEditorMode(FALSE, CE_GENERAL);
42     intResult = GetLastInt(&GeneralNicknamesList);
43     frameCENickname->SetupPointers(&GeneralNicknamesList,
44                                    &GeneralNicknamesListAltID,
45                                    &GeneralNicknamesListPID,
46                                    &GeneralNicknamesListType,
47                                    &GeneralNicknamesListLanguage,
48                                    &GeneralNicknamesListTokens,
49                                    &GeneralNicknamesListPref,
50                                    lboNicknames,
51                                    (intValueSeek));
52     frameCENickname->ShowModal();
53     delete frameCENickname;
54     frameCENickname = NULL;
55 }
57 void frmContactEditor::ModifyGeneralNickname( wxCommandEvent& event )
58 {
59     
60     long longSelected = -1;
61     int intSelectedData = 0;
62     
63     if (!GetSelectedItem(lboNicknames,
64                          &longSelected,
65                          &intSelectedData)){
66         return;
67     }
68     
69     frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
70     frameCENickname->SetupPointers(&GeneralNicknamesList,
71                                    &GeneralNicknamesListAltID,
72                                    &GeneralNicknamesListPID,
73                                    &GeneralNicknamesListType,
74                                    &GeneralNicknamesListLanguage,
75                                    &GeneralNicknamesListTokens,
76                                    &GeneralNicknamesListPref,
77                                    lboNicknames,
78                                    intSelectedData);
79     frameCENickname->SetEditorMode(TRUE, CE_GENERAL);
80     frameCENickname->ShowModal();
81     delete frameCENickname;
82     frameCENickname = NULL;
83     
84 }
86 void frmContactEditor::DeleteGeneralNickname( wxCommandEvent& event )
87 {
88     
89     long longSelected = -1;
90     int intSelectedData = 0;
91     
92     if (!GetSelectedItem(lboNicknames,
93                          &longSelected,
94                          &intSelectedData)){
95         return;
96     }
97     
98     lboNicknames->DeleteItem(longSelected);
99     
100     DeleteMapData(intSelectedData,
101                   &GeneralNicknamesList,
102                   &GeneralNicknamesListLanguage,
103                   &GeneralNicknamesListAltID,
104                   &GeneralNicknamesListPID,
105                   &GeneralNicknamesListTokens,
106                   &GeneralNicknamesListType,
107                   &GeneralNicknamesListPref);
108     
111 void frmContactEditor::AddGeneralAddress( wxCommandEvent& event )
113     
114     int intResult = 0;
115     
116     frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
117     frameCEAddress->SetEditorMode(FALSE, CE_GENERAL);
118     intResult = GetLastInt(&GeneralAddressList);
119     frameCEAddress->SetupPointers(&GeneralAddressList,
120                                   &GeneralAddressListTown,
121                                   &GeneralAddressListCounty,
122                                   &GeneralAddressListPostCode,
123                                   &GeneralAddressListCountry,
124                                   &GeneralAddressListLabel,
125                                   &GeneralAddressListLang,
126                                   &GeneralAddressListAltID,
127                                   &GeneralAddressListPID,
128                                   &GeneralAddressListTokens,
129                                   &GeneralAddressListGeo,
130                                   &GeneralAddressListTimezone,
131                                   &GeneralAddressListType,
132                                   &GeneralAddressListMediatype,
133                                   &GeneralAddressListPref,
134                                   lboAddresses,
135                                   (intValueSeek));
136     frameCEAddress->ShowModal();
137     delete frameCEAddress;
138     frameCEAddress = NULL;
141 void frmContactEditor::ModifyGeneralAddress( wxCommandEvent& event )
143     
144     long longSelected = -1;
145     int intSelectedData = 0;
146     
147     if (!GetSelectedItem(lboAddresses,
148                          &longSelected,
149                          &intSelectedData)){
150         return;
151     }
152     
153     if (longSelected == -1){
154         return;
155     }
156     
157     frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
158     frameCEAddress->SetupPointers(&GeneralAddressList,
159                                   &GeneralAddressListTown,
160                                   &GeneralAddressListCounty,
161                                   &GeneralAddressListPostCode,
162                                   &GeneralAddressListCountry,
163                                   &GeneralAddressListLabel,
164                                   &GeneralAddressListLang,
165                                   &GeneralAddressListAltID,
166                                   &GeneralAddressListPID,
167                                   &GeneralAddressListTokens,
168                                   &GeneralAddressListGeo,
169                                   &GeneralAddressListTimezone,
170                                   &GeneralAddressListType,
171                                   &GeneralAddressListMediatype,
172                                   &GeneralAddressListPref,
173                                   lboAddresses,
174                                   intSelectedData);
175     frameCEAddress->SetEditorMode(TRUE, CE_GENERAL);
176     frameCEAddress->ShowModal();
177     delete frameCEAddress;
178     frameCEAddress = NULL;
179     
182 void frmContactEditor::DeleteGeneralAddress( wxCommandEvent& event )
184     
185     long longSelected = -1;
186     int intSelectedData = 0;
187     
188     if (!GetSelectedItem(lboAddresses,
189                          &longSelected,
190                          &intSelectedData)){
191         return;
192     }
193     
194     lboAddresses->DeleteItem(longSelected);
195     
196     DeleteMapData(intSelectedData, &GeneralAddressList,
197                   &GeneralAddressListTown, &GeneralAddressListCounty,
198                   &GeneralAddressListPostCode, &GeneralAddressListCountry,
199                   &GeneralAddressList, &GeneralAddressListLabel,
200                   &GeneralAddressListLang, &GeneralAddressListAltID,
201                   &GeneralAddressListPID, &GeneralAddressListTokens,
202                   &GeneralAddressListGeo, &GeneralAddressListTimezone,
203                   &GeneralAddressListType, &GeneralAddressListMediatype,
204                   &GeneralAddressListPref);
205     
208 void frmContactEditor::AddGeneralEmail( wxCommandEvent& event )
210     int intResult = 0;
211     
212     frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
213     frameCEEmail->SetEditorMode(FALSE, CE_GENERAL);
214     intResult = GetLastInt(&GeneralAddressList);
215     frameCEEmail->SetupPointers(&GeneralEmailList,
216                                 &GeneralEmailListAltID,
217                                 &GeneralEmailListPID,
218                                 &GeneralEmailListType,
219                                 &GeneralEmailListTokens,
220                                 &GeneralEmailListPref,
221                                 lboEmails,
222                                 (intValueSeek));
223     frameCEEmail->ShowModal();
224     delete frameCEEmail;
225     frameCEEmail = NULL;
228 void frmContactEditor::ModifyGeneralEmail( wxCommandEvent& event )
230     long longSelected = -1;
231     int intSelectedData = 0;
232     
233     if (!GetSelectedItem(lboEmails,
234                          &longSelected,
235                          &intSelectedData)){
236         return;
237     }
238     
239     frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
240     frameCEEmail->SetupPointers(&GeneralEmailList,
241                                 &GeneralEmailListAltID,
242                                 &GeneralEmailListPID,
243                                 &GeneralEmailListType,
244                                 &GeneralEmailListTokens,
245                                 &GeneralEmailListPref,
246                                 lboEmails,
247                                 intSelectedData);
248     frameCEEmail->SetEditorMode(TRUE, CE_GENERAL);
249     frameCEEmail->ShowModal();
250     delete frameCEEmail;
251     frameCEEmail = NULL;
254 void frmContactEditor::DeleteGeneralEmail( wxCommandEvent& event )
256     long longSelected = -1;
257     int intSelectedData = 0;
258     
259     if (!GetSelectedItem(lboEmails,
260                          &longSelected,
261                          &intSelectedData)){
262         return;
263     }
264     
265     lboEmails->DeleteItem(longSelected);
266     
267     DeleteMapData(intSelectedData, &GeneralEmailList,
268                   &GeneralEmailListAltID, &GeneralEmailListPID,
269                   &GeneralEmailListType, &GeneralEmailListTokens,
270                   &GeneralEmailListPref);
271     
274 void frmContactEditor::AddGeneralIM( wxCommandEvent& event )
276     int intResult = 0;
277     
278     frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
279     frameCEIM->SetEditorMode(FALSE, CE_GENERAL);
280     intResult = GetLastInt(&GeneralIMList);
281     frameCEIM->SetupPointers(&GeneralIMList,
282                              &GeneralIMListAltID,
283                              &GeneralIMListPID,
284                              &GeneralIMListType,
285                              &GeneralIMListTokens,
286                              &GeneralIMListMediatype,
287                              &GeneralIMListPref,
288                              lboIM,
289                              (intValueSeek));
290     frameCEIM->ShowModal();
291     delete frameCEIM;
292     frameCEIM = NULL;
295 void frmContactEditor::ModifyGeneralIM( wxCommandEvent& event )
297     long longSelected = -1;
298     int intSelectedData = 0;
299     
300     if (!GetSelectedItem(lboIM,
301                          &longSelected,
302                          &intSelectedData)){
303         return;
304     }
305     
306     frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
307     frameCEIM->SetupPointers(&GeneralIMList,
308                              &GeneralIMListAltID,
309                              &GeneralIMListPID,
310                              &GeneralIMListType,
311                              &GeneralIMListTokens,
312                              &GeneralIMListMediatype,
313                              &GeneralIMListPref,
314                              lboIM,
315                              intSelectedData);
316     frameCEIM->SetEditorMode(TRUE, CE_GENERAL);
317     frameCEIM->ShowModal();
318     delete frameCEIM;
319     frameCEIM = NULL;
322 void frmContactEditor::DeleteGeneralIM( wxCommandEvent& event )
324     long longSelected = -1;
325     int intSelectedData = 0;
326     
327     if (!GetSelectedItem(lboIM,
328                          &longSelected,
329                          &intSelectedData)){
330         return;
331     }
332     
333     lboIM->DeleteItem(longSelected);
334     
335     DeleteMapData(intSelectedData, &GeneralIMList,
336                   &GeneralIMListAltID, &GeneralIMListPID,
337                   &GeneralIMListType, &GeneralIMListTokens,
338                   &GeneralIMListMediatype, &GeneralIMListPref);
339     
342 void frmContactEditor::AddGeneralTelephone( wxCommandEvent& event )
344     int intResult = 0;
345     
346     frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
347     frameCETel->SetEditorMode(FALSE, CE_GENERAL);
348     intResult = GetLastInt(&GeneralTelephoneList);
349     frameCETel->SetupPointers(&GeneralTelephoneList,
350                               &GeneralTelephoneListAltID,
351                               &GeneralTelephoneListPID,
352                               &GeneralTelephoneListType,
353                               &GeneralTelephoneListTokens,
354                               &GeneralTelephoneListPref,
355                               lboTelephone,
356                               (intValueSeek));
357     frameCETel->ShowModal();
358     delete frameCETel;
359     frameCETel = NULL;
362 void frmContactEditor::ModifyGeneralTelephone( wxCommandEvent& event )
364     long longSelected = -1;
365     int intSelectedData = 0;
366     
367     if (!GetSelectedItem(lboTelephone,
368                          &longSelected,
369                          &intSelectedData)){
370         return;
371     }
372     
373     frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
374     frameCETel->SetupPointers(&GeneralTelephoneList,
375                               &GeneralTelephoneListAltID,
376                               &GeneralTelephoneListPID,
377                               &GeneralTelephoneListType,
378                               &GeneralTelephoneListTokens,
379                               &GeneralTelephoneListPref,
380                               lboTelephone,
381                               intSelectedData);
382     frameCETel->SetEditorMode(TRUE, CE_GENERAL);
383     frameCETel->ShowModal();
384     delete frameCETel;
385     frameCETel = NULL;
388 void frmContactEditor::DeleteGeneralTelephone( wxCommandEvent& event )
390     long longSelected = -1;
391     int intSelectedData = 0;
392     
393     if (!GetSelectedItem(lboTelephone,
394                          &longSelected,
395                          &intSelectedData)){
396         return;
397     }
398     
399     lboTelephone->DeleteItem(longSelected);
400     
401     DeleteMapData(intSelectedData, &GeneralTelephoneList,
402                   &GeneralTelephoneListAltID, &GeneralTelephoneListPID,
403                   &GeneralTelephoneListType, &GeneralTelephoneListTokens,
404                   &GeneralTelephoneListPref);
405     
408 void frmContactEditor::AddGeneralLanguages( wxCommandEvent& event )
410     int intResult = 0;
411     
412     frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
413     frameCELang->SetEditorMode(FALSE, CE_GENERAL);
414     intResult = GetLastInt(&GeneralLanguageList);
415     frameCELang->SetupPointers(&GeneralLanguageList,
416                                &GeneralLanguageListAltID,
417                                &GeneralLanguageListPID,
418                                &GeneralLanguageListType,
419                                &GeneralLanguageListTokens,
420                                &GeneralLanguageListPref,
421                                lboLanguages,
422                                (intValueSeek));
423     frameCELang->ShowModal();
424     delete frameCELang;
425     frameCELang = NULL;
428 void frmContactEditor::ModifyGeneralLanguages( wxCommandEvent& event )
430     long longSelected = -1;
431     int intSelectedData = 0;
432     
433     if (!GetSelectedItem(lboLanguages,
434                          &longSelected,
435                          &intSelectedData)){
436         return;
437     }
438     
439     frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
440     frameCELang->SetupPointers(&GeneralLanguageList,
441                                &GeneralLanguageListAltID,
442                                &GeneralLanguageListPID,
443                                &GeneralLanguageListType,
444                                &GeneralLanguageListTokens,
445                                &GeneralLanguageListPref,
446                                lboLanguages,
447                                intSelectedData);
448     frameCELang->SetEditorMode(TRUE, CE_GENERAL);
449     frameCELang->ShowModal();
450     delete frameCELang;
451     frameCELang = NULL;
454 void frmContactEditor::DeleteGeneralLanguage( wxCommandEvent& event )
456     long longSelected = -1;
457     int intSelectedData = 0;
458     
459     if (!GetSelectedItem(lboLanguages,
460                          &longSelected,
461                          &intSelectedData)){
462         return;
463     }
464     
465     lboLanguages->DeleteItem(longSelected);
466     
467     DeleteMapData(intSelectedData, &GeneralLanguageList,
468                   &GeneralLanguageListAltID, &GeneralLanguageListPID,
469                   &GeneralLanguageListType, &GeneralLanguageListTokens,
470                   &GeneralLanguageListPref);
471     
474 void frmContactEditor::AddGeneralTimezone( wxCommandEvent& event )
476     int intResult = 0;
477     
478     frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
479     frameCETZ->SetEditorMode(FALSE, CE_GENERAL);
480     intResult = GetLastInt(&GeneralTZList);
481     frameCETZ->SetupPointers(&GeneralTZList,
482                              &GeneralTZListAltID,
483                              &GeneralTZListPID,
484                              &GeneralTZListType,
485                              &GeneralTZListTokens,
486                              &GeneralTZListMediatype,
487                              &GeneralTZListPref,
488                              lboTimezones,
489                              (intValueSeek));
490     frameCETZ->ShowModal();
491     delete frameCETZ;
492     frameCETZ = NULL;
495 void frmContactEditor::ModifyGeneralTimezone( wxCommandEvent& event )
497     long longSelected = -1;
498     int intSelectedData = 0;
499     
500     if (!GetSelectedItem(lboTimezones,
501                          &longSelected,
502                          &intSelectedData)){
503         return;
504     }
505     
506     frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
507     frameCETZ->SetupPointers(&GeneralTZList,
508                              &GeneralTZListAltID,
509                              &GeneralTZListPID,
510                              &GeneralTZListType,
511                              &GeneralTZListTokens,
512                              &GeneralTZListMediatype,
513                              &GeneralTZListPref,
514                              lboTimezones,
515                              intSelectedData);
516     frameCETZ->SetEditorMode(TRUE, CE_GENERAL);
517     frameCETZ->ShowModal();
518     delete frameCETZ;
519     frameCETZ = NULL;
522 void frmContactEditor::DeleteGeneralTimezone( wxCommandEvent& event )
524     long longSelected = -1;
525     int intSelectedData = 0;
526     
527     if (!GetSelectedItem(lboTimezones,
528                          &longSelected,
529                          &intSelectedData)){
530         return;
531     }
532     
533     lboTimezones->DeleteItem(longSelected);
534     
535     DeleteMapData(intSelectedData, &GeneralTZList,
536                   &GeneralTZListAltID, &GeneralTZListPID,
537                   &GeneralTZListType, &GeneralTZListTokens,
538                   &GeneralTZListMediatype, &GeneralTZListPref);
539     
542 void frmContactEditor::AddGeneralGeoposition( wxCommandEvent& event )
544     int intResult = 0;
545     
546     frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
547     frameCEGeo->SetEditorMode(FALSE, CE_GENERAL);
548     intResult = GetLastInt(&GeneralGeographyList);
549     frameCEGeo->SetupPointers(&GeneralGeographyList,
550                               &GeneralGeographyListAltID,
551                               &GeneralGeographyListPID,
552                               &GeneralGeographyListType,
553                               &GeneralGeographyListTokens,
554                               &GeneralGeographyListMediatype,
555                               &GeneralGeographyListPref,
556                               lboGeoposition,
557                               (intValueSeek));
558     frameCEGeo->ShowModal();
559     delete frameCEGeo;
560     frameCEGeo = NULL;
563 void frmContactEditor::ModifyGeneralGeoposition( wxCommandEvent& event )
565     long longSelected = -1;
566     int intSelectedData = 0;
567     
568     if (!GetSelectedItem(lboGeoposition,
569                          &longSelected,
570                          &intSelectedData)){
571         return;
572     }
573     
574     frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
575     frameCEGeo->SetupPointers(&GeneralGeographyList,
576                               &GeneralGeographyListAltID,
577                               &GeneralGeographyListPID,
578                               &GeneralGeographyListType,
579                               &GeneralGeographyListTokens,
580                               &GeneralGeographyListMediatype,
581                               &GeneralGeographyListPref,
582                               lboGeoposition,
583                               intSelectedData);
584     frameCEGeo->SetEditorMode(TRUE, CE_GENERAL);
585     frameCEGeo->ShowModal();
586     delete frameCEGeo;
587     frameCEGeo = NULL;
590 void frmContactEditor::DeleteGeneralGeoposition( wxCommandEvent& event )
592     long longSelected = -1;
593     int intSelectedData = 0;
594     
595     if (!GetSelectedItem(lboGeoposition,
596                          &longSelected,
597                          &intSelectedData)){
598         return;
599     }
600     
601     lboGeoposition->DeleteItem(longSelected);
602     
603     DeleteMapData(intSelectedData, &GeneralGeographyList,
604                   &GeneralGeographyListAltID, &GeneralGeographyListPID,
605                   &GeneralGeographyListType, &GeneralGeographyListTokens,
606                   &GeneralGeographyListMediatype, &GeneralGeographyListPref);
607     
610 void frmContactEditor::AddGeneralRelated( wxCommandEvent& event )
612     int intResult = 0;
613     
614     frmContactEditorRelated *frameCERel = new frmContactEditorRelated ( this );
615     frameCERel->SetEditorMode(FALSE, CE_GENERAL);
616     intResult = GetLastInt(&GeneralRelatedList);
617     frameCERel->SetupPointers(&GeneralRelatedList,
618                               &GeneralRelatedListRelType,
619                               &GeneralRelatedListAltID,
620                               &GeneralRelatedListPID,
621                               &GeneralRelatedListType,
622                               &GeneralRelatedListTokens,
623                               &GeneralRelatedListPref,
624                               lboRelated,
625                               (intValueSeek));
626     frameCERel->ShowModal();
627     delete frameCERel;
628     frameCERel = NULL;
631 void frmContactEditor::ModifyGeneralRelated( wxCommandEvent& event )
633     long longSelected = -1;
634     int intSelectedData = 0;
635     
636     if (!GetSelectedItem(lboRelated,
637                          &longSelected,
638                          &intSelectedData)){
639         return;
640     }
641     
642     frmContactEditorRelated *frameCERel = new frmContactEditorRelated ( this );
643     frameCERel->SetupPointers(&GeneralRelatedList,
644                               &GeneralRelatedListRelType,
645                               &GeneralRelatedListAltID,
646                               &GeneralRelatedListPID,
647                               &GeneralRelatedListType,
648                               &GeneralRelatedListTokens,
649                               &GeneralRelatedListPref,
650                               lboRelated,
651                               intSelectedData);
652     frameCERel->SetEditorMode(TRUE, CE_GENERAL);
653     frameCERel->ShowModal();
654     delete frameCERel;
655     frameCERel = NULL;
658 void frmContactEditor::DeleteGeneralRelated( wxCommandEvent& event )
660     long longSelected = -1;
661     int intSelectedData = 0;
662     
663     if (!GetSelectedItem(lboRelated,
664                          &longSelected,
665                          &intSelectedData)){
666         return;
667     }
668     
669     lboRelated->DeleteItem(longSelected);
670     
671     GeneralRelatedList.erase(intSelectedData);
672     GeneralRelatedListRelType.erase(intSelectedData);
673     GeneralRelatedListAltID.erase(intSelectedData);
674     GeneralRelatedListPID.erase(intSelectedData);
675     GeneralRelatedListType.erase(intSelectedData);
676     GeneralRelatedListTokens.erase(intSelectedData);
677     GeneralRelatedListPref.erase(intSelectedData);
680 void frmContactEditor::AddGeneralWebsite( wxCommandEvent& event )
682     int intResult = 0;
683     
684     frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
685     frameCEWeb->SetEditorMode(FALSE, CE_GENERAL);
686     intResult = GetLastInt(&GeneralWebsiteList);
687     frameCEWeb->SetupPointers(&GeneralWebsiteList,
688                               &GeneralWebsiteListAltID,
689                               &GeneralWebsiteListPID,
690                               &GeneralWebsiteListType,
691                               &GeneralWebsiteListTokens,
692                               &GeneralWebsiteListMediatype,
693                               &GeneralWebsiteListPref,
694                               lboWebsites,
695                               (intValueSeek));
696     frameCEWeb->ShowModal();
697     delete frameCEWeb;
698     frameCEWeb = NULL;
701 void frmContactEditor::ModifyGeneralWebsite( wxCommandEvent& event )
703     long longSelected = -1;
704     int intSelectedData = 0;
705     
706     if (!GetSelectedItem(lboWebsites,
707                          &longSelected,
708                          &intSelectedData)){
709         return;
710     }
711     
712     frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
713     frameCEWeb->SetupPointers(&GeneralWebsiteList,
714                               &GeneralWebsiteListAltID,
715                               &GeneralWebsiteListPID,
716                               &GeneralWebsiteListType,
717                               &GeneralWebsiteListTokens,
718                               &GeneralWebsiteListMediatype,
719                               &GeneralWebsiteListPref,
720                               lboWebsites,
721                               intSelectedData);
722     frameCEWeb->SetEditorMode(TRUE, CE_GENERAL);
723     frameCEWeb->ShowModal();
724     delete frameCEWeb;
725     frameCEWeb = NULL;
728 void frmContactEditor::DeleteGeneralWebsite( wxCommandEvent& event )
730     long longSelected = -1;
731     int intSelectedData = 0;
732     
733     if (!GetSelectedItem(lboWebsites,
734                          &longSelected,
735                          &intSelectedData)){
736         return;
737     }
738     
739     lboWebsites->DeleteItem(longSelected);
740     
741     DeleteMapData(intSelectedData, &GeneralWebsiteList,
742                   &GeneralWebsiteListAltID, &GeneralWebsiteListPID,
743                   &GeneralWebsiteListType, &GeneralWebsiteListTokens,
744                   &GeneralWebsiteListMediatype, &GeneralWebsiteListPref);
745     
748 void frmContactEditor::AddGeneralTitle( wxCommandEvent& event )
750     int intResult = 0;
751     
752     frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
753     frameCETitle->SetEditorMode(FALSE, CE_GENERAL);
754     intResult = GetLastInt(&GeneralTitleList);
755     frameCETitle->SetupPointers(&GeneralTitleList,
756                                 &GeneralTitleListLanguage,
757                                 &GeneralTitleListAltID,
758                                 &GeneralTitleListPID,
759                                 &GeneralTitleListType,
760                                 &GeneralTitleListTokens,
761                                 &GeneralTitleListPref,
762                                 lboTitles,
763                                 (intValueSeek));
764     frameCETitle->ShowModal();
765     delete frameCETitle;
766     frameCETitle = NULL;
769 void frmContactEditor::ModifyGeneralTitle( wxCommandEvent& event )
771     long longSelected = -1;
772     int intSelectedData = 0;
773     
774     if (!GetSelectedItem(lboTitles,
775                          &longSelected,
776                          &intSelectedData)){
777         return;
778     }
779     
780     frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
781     frameCETitle->SetupPointers(&GeneralTitleList,
782                                 &GeneralTitleListLanguage,
783                                 &GeneralTitleListAltID,
784                                 &GeneralTitleListPID,
785                                 &GeneralTitleListType,
786                                 &GeneralTitleListTokens,
787                                 &GeneralTitleListPref,
788                                 lboTitles,
789                                 intSelectedData);
790     frameCETitle->SetEditorMode(TRUE, CE_GENERAL);
791     frameCETitle->ShowModal();
792     delete frameCETitle;
793     frameCETitle = NULL;
796 void frmContactEditor::DeleteGeneralTitle( wxCommandEvent& event )
798     long longSelected = -1;
799     int intSelectedData = 0;
800     
801     if (!GetSelectedItem(lboTitles,
802                          &longSelected,
803                          &intSelectedData)){
804         return;
805     }
806     
807     lboTitles->DeleteItem(longSelected);
808     
809     DeleteMapData(intSelectedData, &GeneralTitleList,
810                   &GeneralTitleListLanguage, &GeneralTitleListAltID,
811                   &GeneralTitleListPID, &GeneralTitleListType,
812                   &GeneralTitleListTokens, &GeneralTitleListPref);
813     
816 void frmContactEditor::AddGeneralRole( wxCommandEvent& event )
818     int intResult = 0;
819     
820     frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
821     frameCERole->SetEditorMode(FALSE, CE_GENERAL);
822     intResult = GetLastInt(&GeneralRoleList);
823     frameCERole->SetupPointers(&GeneralRoleList,
824                                &GeneralRoleListLanguage,
825                                &GeneralRoleListAltID,
826                                &GeneralRoleListPID,
827                                &GeneralRoleListType,
828                                &GeneralRoleListTokens,
829                                &GeneralRoleListPref,
830                                lboRoles,
831                                (intValueSeek));
832     frameCERole->ShowModal();
833     delete frameCERole;
834     frameCERole = NULL;
837 void frmContactEditor::ModifyGeneralRole( wxCommandEvent& event )
839     long longSelected = -1;
840     int intSelectedData = 0;
841     
842     if (!GetSelectedItem(lboRoles,
843                          &longSelected,
844                          &intSelectedData)){
845         return;
846     }
847     
848     frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
849     frameCERole->SetupPointers(&GeneralRoleList,
850                                &GeneralRoleListLanguage,
851                                &GeneralRoleListAltID,
852                                &GeneralRoleListPID,
853                                &GeneralRoleListType,
854                                &GeneralRoleListTokens,
855                                &GeneralRoleListPref,
856                                lboRoles,
857                                intSelectedData);
858     frameCERole->SetEditorMode(TRUE, CE_GENERAL);
859     frameCERole->ShowModal();
860     delete frameCERole;
861     frameCERole = NULL;
864 void frmContactEditor::DeleteGeneralRole( wxCommandEvent& event )
866     long longSelected = -1;
867     int intSelectedData = 0;
868     
869     if (!GetSelectedItem(lboRoles,
870                          &longSelected,
871                          &intSelectedData)){
872         return;
873     }
874     
875     lboRoles->DeleteItem(longSelected);
876     
877     DeleteMapData(intSelectedData, &GeneralRoleList,
878                   &GeneralRoleListLanguage, &GeneralRoleListAltID,
879                   &GeneralRoleListPID, &GeneralRoleListType,
880                   &GeneralRoleListTokens, &GeneralRoleListPref);
881     
884 void frmContactEditor::AddGeneralOrganisation( wxCommandEvent& event )
886     int intResult = 0;
887     
888     frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
889     frameCEOrg->SetEditorMode(FALSE, CE_GENERAL);
890     intResult = GetLastInt(&GeneralOrganisationsList);
891     frameCEOrg->SetupPointers(&GeneralOrganisationsList,
892                               &GeneralOrganisationsListLanguage,
893                               &GeneralOrganisationsListSortAs,
894                               &GeneralOrganisationsListAltID,
895                               &GeneralOrganisationsListPID,
896                               &GeneralOrganisationsListType,
897                               &GeneralOrganisationsListTokens,
898                               &GeneralOrganisationsListPref,
899                               lboOrganisations,
900                               (intValueSeek));
901     frameCEOrg->ShowModal();
902     delete frameCEOrg;
903     frameCEOrg = NULL;
906 void frmContactEditor::ModifyGeneralOrganisation( wxCommandEvent& event )
908     long longSelected = -1;
909     int intSelectedData = 0;
910     
911     if (!GetSelectedItem(lboOrganisations,
912                          &longSelected,
913                          &intSelectedData)){
914         return;
915     }
916     
917     frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
918     frameCEOrg->SetupPointers(&GeneralOrganisationsList,
919                               &GeneralOrganisationsListLanguage,
920                               &GeneralOrganisationsListSortAs,
921                               &GeneralOrganisationsListAltID,
922                               &GeneralOrganisationsListPID,
923                               &GeneralOrganisationsListType,
924                               &GeneralOrganisationsListTokens,
925                               &GeneralOrganisationsListPref,
926                               lboOrganisations,
927                               intSelectedData);
928     frameCEOrg->SetEditorMode(TRUE, CE_GENERAL);
929     frameCEOrg->ShowModal();
930     delete frameCEOrg;
931     frameCEOrg = NULL;
934 void frmContactEditor::DeleteGeneralOrganisation( wxCommandEvent& event )
936     long longSelected = -1;
937     int intSelectedData = 0;
938     
939     if (!GetSelectedItem(lboOrganisations,
940                          &longSelected,
941                          &intSelectedData)){
942         return;
943     }
944     
945     lboOrganisations->DeleteItem(longSelected);
946     
947     DeleteMapData(intSelectedData, &GeneralOrganisationsList,
948                   &GeneralOrganisationsListLanguage, &GeneralOrganisationsListSortAs,
949                   &GeneralOrganisationsListAltID, &GeneralOrganisationsListPID,
950                   &GeneralOrganisationsListType, &GeneralOrganisationsListTokens,
951                   &GeneralOrganisationsListPref);
952     
955 void frmContactEditor::AddGeneralNote( wxCommandEvent& event )
957     int intResult = 0;
958     
959     frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
960     frameCENote->SetEditorMode(FALSE, CE_GENERAL);
961     intResult = GetLastInt(&GeneralNoteList);
962     frameCENote->SetupPointers(&GeneralNoteList,
963                                &GeneralNoteListLanguage,
964                                &GeneralNoteListAltID,
965                                &GeneralNoteListPID,
966                                &GeneralNoteListType,
967                                &GeneralNoteListTokens,
968                                &GeneralNoteListPref,
969                                lboNotes,
970                                (intValueSeek));
971     frameCENote->ShowModal();
972     delete frameCENote;
973     frameCENote = NULL;
976 void frmContactEditor::ModifyGeneralNote( wxCommandEvent& event )
978     long longSelected = -1;
979     int intSelectedData = 0;
980     
981     if (!GetSelectedItem(lboNotes,
982                          &longSelected,
983                          &intSelectedData)){
984         return;
985     }
986     
987     frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
988     frameCENote->SetupPointers(&GeneralNoteList,
989                                &GeneralNoteListLanguage,
990                                &GeneralNoteListAltID,
991                                &GeneralNoteListPID,
992                                &GeneralNoteListType,
993                                &GeneralNoteListTokens,
994                                &GeneralNoteListPref,
995                                lboNotes,
996                                intSelectedData);
997     frameCENote->SetEditorMode(TRUE, CE_GENERAL);
998     frameCENote->ShowModal();
999     delete frameCENote;
1000     frameCENote = NULL;
1003 void frmContactEditor::DeleteGeneralNote( wxCommandEvent& event )
1005     long longSelected = -1;
1006     int intSelectedData = 0;
1007     
1008     if (!GetSelectedItem(lboNotes,
1009                          &longSelected,
1010                          &intSelectedData)){
1011         return;
1012     }
1013     
1014     lboNotes->DeleteItem(longSelected);
1015     
1016     DeleteMapData(intSelectedData, &GeneralNoteList,
1017                   &GeneralNoteListLanguage, &GeneralNoteListAltID,
1018                   &GeneralNoteListPID, &GeneralNoteListType,
1019                   &GeneralNoteListTokens, &GeneralNoteListPref);
1020     
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