Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added comments to describe functions in contacteditor/frmContactEditor-General.cpp
[xestiaab/.git] / source / contacteditor / frmContactEditor-General.cpp
1 // frmContactEditor-General.cpp - frmContactEditor General 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::AddGeneralNickname( wxCommandEvent& event )
37 {
39         // Bring up the window for adding a nickname.
40         
41         int intResult = 0;
42     
43         frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
44         frameCENickname->SetEditorMode(FALSE, CE_GENERAL);
45         intResult = GetLastInt(&ContactEditorData.GeneralNicknamesList);
46         frameCENickname->SetupPointers(&ContactEditorData.GeneralNicknamesList,
47                 &ContactEditorData.GeneralNicknamesListAltID,
48                 &ContactEditorData.GeneralNicknamesListPID,
49                 &ContactEditorData.GeneralNicknamesListType,
50                 &ContactEditorData.GeneralNicknamesListLanguage,
51                 &ContactEditorData.GeneralNicknamesListTokens,
52                 &ContactEditorData.GeneralNicknamesListPref,
53                 lboNicknames,
54                 (intValueSeek));
55         frameCENickname->ShowModal();
56         delete frameCENickname;
57         frameCENickname = NULL;
58         
59 }
61 void frmContactEditor::ModifyGeneralNickname( wxCommandEvent& event )
62 {
63     
64         // Bring up the window for modifying a nickname.
65     
66         long longSelected = -1;
67         int intSelectedData = 0;
68     
69         if (!GetSelectedItem(lboNicknames,
70                 &longSelected,
71                 &intSelectedData)){
72                 return;
73         }
74     
75         frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
76         frameCENickname->SetupPointers(&ContactEditorData.GeneralNicknamesList,
77                 &ContactEditorData.GeneralNicknamesListAltID,
78                 &ContactEditorData.GeneralNicknamesListPID,
79                 &ContactEditorData.GeneralNicknamesListType,
80                 &ContactEditorData.GeneralNicknamesListLanguage,
81                 &ContactEditorData.GeneralNicknamesListTokens,
82                 &ContactEditorData.GeneralNicknamesListPref,
83                 lboNicknames,
84                 intSelectedData);
85         frameCENickname->SetEditorMode(TRUE, CE_GENERAL);
86         frameCENickname->ShowModal();
87         delete frameCENickname;
88         frameCENickname = NULL;
89     
90 }
92 void frmContactEditor::DeleteGeneralNickname( wxCommandEvent& event )
93 {
94     
95         // Bring up the window for deleting a nickname.
96     
97         long longSelected = -1;
98         int intSelectedData = 0;
99     
100         if (!GetSelectedItem(lboNicknames,
101                 &longSelected,
102                 &intSelectedData)){
103                 return;
104         }
105     
106         lboNicknames->DeleteItem(longSelected);
107     
108         DeleteMapData(intSelectedData,
109                 &ContactEditorData.GeneralNicknamesList,
110                 &ContactEditorData.GeneralNicknamesListLanguage,
111                 &ContactEditorData.GeneralNicknamesListAltID,
112                 &ContactEditorData.GeneralNicknamesListPID,
113                 &ContactEditorData.GeneralNicknamesListTokens,
114                 &ContactEditorData.GeneralNicknamesListType,
115                 &ContactEditorData.GeneralNicknamesListPref);
116     
119 void frmContactEditor::AddGeneralAddress( wxCommandEvent& event )
121     
122         // Bring up the window for adding an address.
123     
124         int intResult = 0;
125     
126         frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
127         frameCEAddress->SetEditorMode(FALSE, CE_GENERAL);
128         intResult = GetLastInt(&ContactEditorData.GeneralAddressList);
129         frameCEAddress->SetupPointers(&ContactEditorData.GeneralAddressList,
130                 &ContactEditorData.GeneralAddressListTown,
131                 &ContactEditorData.GeneralAddressListCounty,
132                 &ContactEditorData.GeneralAddressListPostCode,
133                 &ContactEditorData.GeneralAddressListCountry,
134                 &ContactEditorData.GeneralAddressListLabel,
135                 &ContactEditorData.GeneralAddressListLang,
136                 &ContactEditorData.GeneralAddressListAltID,
137                 &ContactEditorData.GeneralAddressListPID,
138                 &ContactEditorData.GeneralAddressListTokens,
139                 &ContactEditorData.GeneralAddressListGeo,
140                 &ContactEditorData.GeneralAddressListTimezone,
141                 &ContactEditorData.GeneralAddressListType,
142                 &ContactEditorData.GeneralAddressListMediatype,
143                 &ContactEditorData.GeneralAddressListPref,
144                 lboAddresses,
145                 (intValueSeek));
146         frameCEAddress->ShowModal();
147         delete frameCEAddress;
148         frameCEAddress = NULL;
149         
152 void frmContactEditor::ModifyGeneralAddress( wxCommandEvent& event )
155         // Bring up the window for editing an address.
156     
157         long longSelected = -1;
158         int intSelectedData = 0;
159     
160         if (!GetSelectedItem(lboAddresses,
161                 &longSelected,
162                 &intSelectedData)){
163         
164                 return;
165         
166         }
167     
168         if (longSelected == -1){
169         
170                 return;
171                 
172         }
173     
174         frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
175         frameCEAddress->SetupPointers(&ContactEditorData.GeneralAddressList,
176                 &ContactEditorData.GeneralAddressListTown,
177                 &ContactEditorData.GeneralAddressListCounty,
178                 &ContactEditorData.GeneralAddressListPostCode,
179                 &ContactEditorData.GeneralAddressListCountry,
180                 &ContactEditorData.GeneralAddressListLabel,
181                 &ContactEditorData.GeneralAddressListLang,
182                 &ContactEditorData.GeneralAddressListAltID,
183                 &ContactEditorData.GeneralAddressListPID,
184                 &ContactEditorData.GeneralAddressListTokens,
185                 &ContactEditorData.GeneralAddressListGeo,
186                 &ContactEditorData.GeneralAddressListTimezone,
187                 &ContactEditorData.GeneralAddressListType,
188                 &ContactEditorData.GeneralAddressListMediatype,
189                 &ContactEditorData.GeneralAddressListPref,
190                 lboAddresses,
191                 intSelectedData);
192         frameCEAddress->SetEditorMode(TRUE, CE_GENERAL);
193         frameCEAddress->ShowModal();
194         delete frameCEAddress;
195         frameCEAddress = NULL;
196     
199 void frmContactEditor::DeleteGeneralAddress( wxCommandEvent& event )
201     
202         // Bring up the window for deleting a nickname.
203     
204         long longSelected = -1;
205         int intSelectedData = 0;
206     
207         if (!GetSelectedItem(lboAddresses,
208                 &longSelected,
209                 &intSelectedData)){
210         
211                 return;
212                 
213         }
214     
215         lboAddresses->DeleteItem(longSelected);
216     
217         DeleteMapData(intSelectedData, &ContactEditorData.GeneralAddressList,
218                 &ContactEditorData.GeneralAddressListTown, &ContactEditorData.GeneralAddressListCounty,
219                 &ContactEditorData.GeneralAddressListPostCode, &ContactEditorData.GeneralAddressListCountry,
220                 &ContactEditorData.GeneralAddressList, &ContactEditorData.GeneralAddressListLabel,
221                 &ContactEditorData.GeneralAddressListLang, &ContactEditorData.GeneralAddressListAltID,
222                 &ContactEditorData.GeneralAddressListPID, &ContactEditorData.GeneralAddressListTokens,
223                 &ContactEditorData.GeneralAddressListGeo, &ContactEditorData.GeneralAddressListTimezone,
224                 &ContactEditorData.GeneralAddressListType, &ContactEditorData.GeneralAddressListMediatype,
225                 &ContactEditorData.GeneralAddressListPref);
226     
229 void frmContactEditor::AddGeneralEmail( wxCommandEvent& event )
232         // Bring up the window for adding an email.
234         int intResult = 0;
235     
236         frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
237         frameCEEmail->SetEditorMode(FALSE, CE_GENERAL);
238         intResult = GetLastInt(&ContactEditorData.GeneralAddressList);
239         frameCEEmail->SetupPointers(&ContactEditorData.GeneralEmailList,
240                 &ContactEditorData.GeneralEmailListAltID,
241                 &ContactEditorData.GeneralEmailListPID,
242                 &ContactEditorData.GeneralEmailListType,
243                 &ContactEditorData.GeneralEmailListTokens,
244                 &ContactEditorData.GeneralEmailListPref,
245                 lboEmails,
246                 (intValueSeek));
247         frameCEEmail->ShowModal();
248         delete frameCEEmail;
249         frameCEEmail = NULL;
250         
253 void frmContactEditor::ModifyGeneralEmail( wxCommandEvent& event )
256         // Bring up the window for modifying an email.
258         long longSelected = -1;
259         int intSelectedData = 0;
260     
261         if (!GetSelectedItem(lboEmails,
262                 &longSelected,
263                 &intSelectedData)){
264         
265                 return;
266                 
267         }
268     
269         frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
270         frameCEEmail->SetupPointers(&ContactEditorData.GeneralEmailList,
271                 &ContactEditorData.GeneralEmailListAltID,
272                 &ContactEditorData.GeneralEmailListPID,
273                 &ContactEditorData.GeneralEmailListType,
274                 &ContactEditorData.GeneralEmailListTokens,
275                 &ContactEditorData.GeneralEmailListPref,
276                 lboEmails,
277                 intSelectedData);
278         frameCEEmail->SetEditorMode(TRUE, CE_GENERAL);
279         frameCEEmail->ShowModal();
280         delete frameCEEmail;
281         frameCEEmail = NULL;
282         
285 void frmContactEditor::DeleteGeneralEmail( wxCommandEvent& event )
288         // Bring up the window for deleting an email.
290         long longSelected = -1;
291         int intSelectedData = 0;
292     
293         if (!GetSelectedItem(lboEmails,
294                 &longSelected,
295                 &intSelectedData)){
296         
297                 return;
298         
299         }
300     
301         lboEmails->DeleteItem(longSelected);
302     
303         DeleteMapData(intSelectedData, &ContactEditorData.GeneralEmailList,
304                 &ContactEditorData.GeneralEmailListAltID, &ContactEditorData.GeneralEmailListPID,
305                 &ContactEditorData.GeneralEmailListType, &ContactEditorData.GeneralEmailListTokens,
306                 &ContactEditorData.GeneralEmailListPref);
310 void frmContactEditor::AddGeneralIM( wxCommandEvent& event )
313         // Bring up the window for adding a IM address.
315         int intResult = 0;
316     
317         frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
318         frameCEIM->SetEditorMode(FALSE, CE_GENERAL);
319         intResult = GetLastInt(&ContactEditorData.GeneralIMList);
320         frameCEIM->SetupPointers(&ContactEditorData.GeneralIMList,
321                 &ContactEditorData.GeneralIMListAltID,
322                 &ContactEditorData.GeneralIMListPID,
323                 &ContactEditorData.GeneralIMListType,
324                 &ContactEditorData.GeneralIMListTypeInfo,
325                 &ContactEditorData.GeneralIMListTokens,
326                 &ContactEditorData.GeneralIMListMediatype,
327                 &ContactEditorData.GeneralIMListPref,
328                 lboIM,
329                 (intValueSeek));
330         frameCEIM->ShowModal();
331         delete frameCEIM;
332         frameCEIM = NULL;
333         
336 void frmContactEditor::ModifyGeneralIM( wxCommandEvent& event )
339         // Bring up the window for editing a IM address.
341         long longSelected = -1;
342         int intSelectedData = 0;
343     
344         if (!GetSelectedItem(lboIM,
345                 &longSelected,
346                 &intSelectedData)){
347                 
348                 return;
349                 
350         }
352         frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
353         frameCEIM->SetupPointers(&ContactEditorData.GeneralIMList,
354                 &ContactEditorData.GeneralIMListAltID,
355                 &ContactEditorData.GeneralIMListPID,
356                 &ContactEditorData.GeneralIMListType,
357                 &ContactEditorData.GeneralIMListTypeInfo,
358                 &ContactEditorData.GeneralIMListTokens,
359                 &ContactEditorData.GeneralIMListMediatype,
360                 &ContactEditorData.GeneralIMListPref,
361                 lboIM,
362                 intSelectedData);
363         frameCEIM->SetEditorMode(TRUE, CE_GENERAL);
364         frameCEIM->ShowModal();
365         delete frameCEIM;
366         frameCEIM = NULL;
367         
370 void frmContactEditor::DeleteGeneralIM( wxCommandEvent& event )
373         // Bring up the window for deleting an IM address.
375         long longSelected = -1;
376         int intSelectedData = 0;
377     
378         if (!GetSelectedItem(lboIM,
379                 &longSelected,
380                 &intSelectedData)){
381                 
382                 return;
383         }
384     
385         lboIM->DeleteItem(longSelected);
386     
387         DeleteMapData(intSelectedData, &ContactEditorData.GeneralIMList,
388                 &ContactEditorData.GeneralIMListAltID, &ContactEditorData.GeneralIMListPID,
389                 &ContactEditorData.GeneralIMListType, &ContactEditorData.GeneralIMListTypeInfo,
390                 &ContactEditorData.GeneralIMListTokens, &ContactEditorData.GeneralIMListMediatype, 
391                 &ContactEditorData.GeneralIMListPref);
392     
395 void frmContactEditor::AddGeneralTelephone( wxCommandEvent& event )
398         // Bring up the window for adding a telephone.
400         int intResult = 0;
401     
402         frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
403         frameCETel->SetEditorMode(FALSE, CE_GENERAL);
404         intResult = GetLastInt(&ContactEditorData.GeneralTelephoneList);
405         frameCETel->SetupPointers(&ContactEditorData.GeneralTelephoneList,
406                 &ContactEditorData.GeneralTelephoneListAltID,
407                 &ContactEditorData.GeneralTelephoneListPID,
408                 &ContactEditorData.GeneralTelephoneListType,
409                 &ContactEditorData.GeneralTelephoneListTypeInfo,
410                 &ContactEditorData.GeneralTelephoneListTokens,
411                 &ContactEditorData.GeneralTelephoneListPref,
412                 lboTelephone,
413                 (intValueSeek));
414         frameCETel->ShowModal();
415         delete frameCETel;
416         frameCETel = NULL;
417         
420 void frmContactEditor::ModifyGeneralTelephone( wxCommandEvent& event )
423         // Bring up the window for editing a telephone.
425         long longSelected = -1;
426         int intSelectedData = 0;
427     
428         if (!GetSelectedItem(lboTelephone,
429                 &longSelected,
430                 &intSelectedData)){
431                 
432                 return;
433                 
434         }
435     
436         frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
437         frameCETel->SetupPointers(&ContactEditorData.GeneralTelephoneList,
438                 &ContactEditorData.GeneralTelephoneListAltID,
439                 &ContactEditorData.GeneralTelephoneListPID,
440                 &ContactEditorData.GeneralTelephoneListType,
441                 &ContactEditorData.GeneralTelephoneListTypeInfo,
442                 &ContactEditorData.GeneralTelephoneListTokens,
443                 &ContactEditorData.GeneralTelephoneListPref,
444                 lboTelephone,
445                 intSelectedData);
446         frameCETel->SetEditorMode(TRUE, CE_GENERAL);
447         frameCETel->ShowModal();
448         delete frameCETel;
449         frameCETel = NULL;
450         
453 void frmContactEditor::DeleteGeneralTelephone( wxCommandEvent& event )
456         // Bring up the window for deleting a telephone.
458         long longSelected = -1;
459         int intSelectedData = 0;
460     
461         if (!GetSelectedItem(lboTelephone,
462                 &longSelected,
463                 &intSelectedData)){
464                 
465                 return;
466         
467         }
468     
469         lboTelephone->DeleteItem(longSelected);
470     
471         DeleteMapData(intSelectedData, &ContactEditorData.GeneralTelephoneList,
472                 &ContactEditorData.GeneralTelephoneListAltID, &ContactEditorData.GeneralTelephoneListPID,
473                 &ContactEditorData.GeneralTelephoneListType, &ContactEditorData.GeneralTelephoneListTypeInfo,
474                 &ContactEditorData.GeneralTelephoneListTokens, &ContactEditorData.GeneralTelephoneListPref);
475     
478 void frmContactEditor::AddGeneralLanguages( wxCommandEvent& event )
481         // Bring up the window for adding a language.
483         int intResult = 0;
484     
485         frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
486         frameCELang->SetEditorMode(FALSE, CE_GENERAL);
487         intResult = GetLastInt(&ContactEditorData.GeneralLanguageList);
488         frameCELang->SetupPointers(&ContactEditorData.GeneralLanguageList,
489                 &ContactEditorData.GeneralLanguageListAltID,
490                 &ContactEditorData.GeneralLanguageListPID,
491                 &ContactEditorData.GeneralLanguageListType,
492                 &ContactEditorData.GeneralLanguageListTokens,
493                 &ContactEditorData.GeneralLanguageListPref,
494                 lboLanguages,
495                 (intValueSeek));
496         frameCELang->ShowModal();
497         delete frameCELang;
498         frameCELang = NULL;
499         
502 void frmContactEditor::ModifyGeneralLanguages( wxCommandEvent& event )
505         // Bring up the window for modifying a language.
507         long longSelected = -1;
508         int intSelectedData = 0;
509     
510         if (!GetSelectedItem(lboLanguages,
511                 &longSelected,
512                 &intSelectedData)){
513         
514                 return;
515                 
516         }
517     
518         frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
519         frameCELang->SetupPointers(&ContactEditorData.GeneralLanguageList,
520                 &ContactEditorData.GeneralLanguageListAltID,
521                 &ContactEditorData.GeneralLanguageListPID,
522                 &ContactEditorData.GeneralLanguageListType,
523                 &ContactEditorData.GeneralLanguageListTokens,
524                 &ContactEditorData.GeneralLanguageListPref,
525                 lboLanguages,
526                 intSelectedData);
527         frameCELang->SetEditorMode(TRUE, CE_GENERAL);
528         frameCELang->ShowModal();
529         delete frameCELang;
530         frameCELang = NULL;
531         
534 void frmContactEditor::DeleteGeneralLanguage( wxCommandEvent& event )
537         // Bring up the window for deleting a language.
539         long longSelected = -1;
540         int intSelectedData = 0;
541     
542         if (!GetSelectedItem(lboLanguages,
543                 &longSelected,
544                 &intSelectedData)){
545                 
546                 return;
547         }
548     
549         lboLanguages->DeleteItem(longSelected);
550     
551         DeleteMapData(intSelectedData, &ContactEditorData.GeneralLanguageList,
552                 &ContactEditorData.GeneralLanguageListAltID, &ContactEditorData.GeneralLanguageListPID,
553                 &ContactEditorData.GeneralLanguageListType, &ContactEditorData.GeneralLanguageListTokens,
554                 &ContactEditorData.GeneralLanguageListPref);
555     
558 void frmContactEditor::AddGeneralTimezone( wxCommandEvent& event )
561         // Bring up the window for adding a timezone.
563         int intResult = 0;
564     
565         frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
566         frameCETZ->SetEditorMode(FALSE, CE_GENERAL);
567         intResult = GetLastInt(&ContactEditorData.GeneralTZList);
568         frameCETZ->SetupPointers(&ContactEditorData.GeneralTZList,
569                 &ContactEditorData.GeneralTZListAltID,
570                 &ContactEditorData.GeneralTZListPID,
571                 &ContactEditorData.GeneralTZListType,
572                 &ContactEditorData.GeneralTZListTokens,
573                 &ContactEditorData.GeneralTZListMediatype,
574                 &ContactEditorData.GeneralTZListPref,
575                 lboTimezones,
576                 (intValueSeek));
577         frameCETZ->ShowModal();
578         delete frameCETZ;
579         frameCETZ = NULL;
580         
583 void frmContactEditor::ModifyGeneralTimezone( wxCommandEvent& event )
586         // Bring up a window for editing a timezone.
588         long longSelected = -1;
589         int intSelectedData = 0;
590     
591         if (!GetSelectedItem(lboTimezones,
592                 &longSelected,
593                 &intSelectedData)){
594                 
595                 return;
596         }
597     
598         frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
599         frameCETZ->SetupPointers(&ContactEditorData.GeneralTZList,
600                 &ContactEditorData.GeneralTZListAltID,
601                 &ContactEditorData.GeneralTZListPID,
602                 &ContactEditorData.GeneralTZListType,
603                 &ContactEditorData.GeneralTZListTokens,
604                 &ContactEditorData.GeneralTZListMediatype,
605                 &ContactEditorData.GeneralTZListPref,
606                 lboTimezones,
607                 intSelectedData);
608         frameCETZ->SetEditorMode(TRUE, CE_GENERAL);
609         frameCETZ->ShowModal();
610         delete frameCETZ;
611         frameCETZ = NULL;
612         
615 void frmContactEditor::DeleteGeneralTimezone( wxCommandEvent& event )
618         // Bring up the window for deleting a timezone.
620         long longSelected = -1;
621         int intSelectedData = 0;
622     
623         if (!GetSelectedItem(lboTimezones,
624                 &longSelected,
625                 &intSelectedData)){
626                 
627                 return;
628                 
629         }
630     
631         lboTimezones->DeleteItem(longSelected);
632     
633         DeleteMapData(intSelectedData, &ContactEditorData.GeneralTZList,
634                 &ContactEditorData.GeneralTZListAltID, &ContactEditorData.GeneralTZListPID,
635                 &ContactEditorData.GeneralTZListType, &ContactEditorData.GeneralTZListTokens,
636                 &ContactEditorData.GeneralTZListMediatype, &ContactEditorData.GeneralTZListPref);
637     
640 void frmContactEditor::AddGeneralGeoposition( wxCommandEvent& event )
643         // Bring up the window for adding a geoposition location.
645         int intResult = 0;
646     
647         frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
648         frameCEGeo->SetEditorMode(FALSE, CE_GENERAL);
649         intResult = GetLastInt(&ContactEditorData.GeneralGeographyList);
650         frameCEGeo->SetupPointers(&ContactEditorData.GeneralGeographyList,
651                 &ContactEditorData.GeneralGeographyListAltID,
652                 &ContactEditorData.GeneralGeographyListPID,
653                 &ContactEditorData.GeneralGeographyListType,
654                 &ContactEditorData.GeneralGeographyListDataType,
655                 &ContactEditorData.GeneralGeographyListTokens,
656                 &ContactEditorData.GeneralGeographyListMediatype,
657                 &ContactEditorData.GeneralGeographyListPref,
658                 lboGeoposition,
659                 (intValueSeek));
660         frameCEGeo->ShowModal();
661         delete frameCEGeo;
662         frameCEGeo = NULL;
663         
666 void frmContactEditor::ModifyGeneralGeoposition( wxCommandEvent& event )
669         // Bring up the window for editing a geoposition location.
671         long longSelected = -1;
672         int intSelectedData = 0;
673     
674         if (!GetSelectedItem(lboGeoposition,
675                 &longSelected,
676                 &intSelectedData)){
677                 
678                 return;
679                 
680         }
681     
682         frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
683         frameCEGeo->SetupPointers(&ContactEditorData.GeneralGeographyList,
684                 &ContactEditorData.GeneralGeographyListAltID,
685                 &ContactEditorData.GeneralGeographyListPID,
686                 &ContactEditorData.GeneralGeographyListType,
687                 &ContactEditorData.GeneralGeographyListDataType,
688                 &ContactEditorData.GeneralGeographyListTokens,
689                 &ContactEditorData.GeneralGeographyListMediatype,
690                 &ContactEditorData.GeneralGeographyListPref,
691                 lboGeoposition,
692                 intSelectedData);
693                 
694         frameCEGeo->SetEditorMode(TRUE, CE_GENERAL);
695         frameCEGeo->ShowModal();
696         delete frameCEGeo;
697         frameCEGeo = NULL;
698         
701 void frmContactEditor::DeleteGeneralGeoposition( wxCommandEvent& event )
704         // Bring up the window for deleting a geoposition location.
706         long longSelected = -1;
707         int intSelectedData = 0;
708     
709         if (!GetSelectedItem(lboGeoposition,
710                 &longSelected,
711                 &intSelectedData)){
712                 
713                 return;
714                 
715         }
716     
717         lboGeoposition->DeleteItem(longSelected);
718     
719         DeleteMapData(intSelectedData, &ContactEditorData.GeneralGeographyList,
720                 &ContactEditorData.GeneralGeographyListAltID, &ContactEditorData.GeneralGeographyListPID,
721                 &ContactEditorData.GeneralGeographyListType, &ContactEditorData.GeneralGeographyListDataType,
722                 &ContactEditorData.GeneralGeographyListTokens, &ContactEditorData.GeneralGeographyListMediatype, 
723                 &ContactEditorData.GeneralGeographyListPref);
724     
727 void frmContactEditor::AddGeneralRelated( wxCommandEvent& event )
730         // Bring up the window for adding a relation.
732         int intResult = 0;
733     
734         frmContactEditorRelated *frameCERel = new frmContactEditorRelated ( this );
735         frameCERel->SetEditorMode(FALSE, CE_GENERAL);
736         intResult = GetLastInt(&ContactEditorData.GeneralRelatedList);
737         frameCERel->SetupPointers(&ContactEditorData.GeneralRelatedList,
738                 &ContactEditorData.GeneralRelatedListRelType,
739                 &ContactEditorData.GeneralRelatedListAltID,
740                 &ContactEditorData.GeneralRelatedListPID,
741                 &ContactEditorData.GeneralRelatedListType,
742                 &ContactEditorData.GeneralRelatedListTokens,
743                 &ContactEditorData.GeneralRelatedListPref,
744                 lboRelated,
745                 (intValueSeek));
746         frameCERel->ShowModal();
747         delete frameCERel;
748         frameCERel = NULL;
749         
752 void frmContactEditor::ModifyGeneralRelated( wxCommandEvent& event )
755         // Bring up the window for editing a relation.
757         long longSelected = -1;
758         int intSelectedData = 0;
759     
760         if (!GetSelectedItem(lboRelated,
761                 &longSelected,
762                 &intSelectedData)){
763                 
764                 return;
765                 
766         }
767     
768         frmContactEditorRelated *frameCERel = new frmContactEditorRelated ( this );
769         frameCERel->SetupPointers(&ContactEditorData.GeneralRelatedList,
770                 &ContactEditorData.GeneralRelatedListRelType,
771                 &ContactEditorData.GeneralRelatedListAltID,
772                 &ContactEditorData.GeneralRelatedListPID,
773                 &ContactEditorData.GeneralRelatedListType,
774                 &ContactEditorData.GeneralRelatedListTokens,
775                 &ContactEditorData.GeneralRelatedListPref,
776                 lboRelated,
777                 intSelectedData);
778         frameCERel->SetEditorMode(TRUE, CE_GENERAL);
779         frameCERel->ShowModal();
780         delete frameCERel;
781         frameCERel = NULL;
782         
785 void frmContactEditor::DeleteGeneralRelated( wxCommandEvent& event )
788         // Bring up a window for deleting a relation.
790         long longSelected = -1;
791         int intSelectedData = 0;
792     
793         if (!GetSelectedItem(lboRelated,
794                 &longSelected,
795                 &intSelectedData)){
796                 
797                 return;
798                 
799         }
800     
801         lboRelated->DeleteItem(longSelected);
802     
803         DeleteMapData(intSelectedData, &ContactEditorData.GeneralRelatedList,
804                 &ContactEditorData.GeneralRelatedListRelType, &ContactEditorData.GeneralRelatedListAltID,
805                 &ContactEditorData.GeneralRelatedListPID, &ContactEditorData.GeneralRelatedListType,
806                 &ContactEditorData.GeneralRelatedListTokens, &ContactEditorData.GeneralRelatedListPref);
807     
810 void frmContactEditor::AddGeneralWebsite( wxCommandEvent& event )
813         // Bring up a window for adding a website.
815         int intResult = 0;
816     
817         frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
818         frameCEWeb->SetEditorMode(FALSE, CE_GENERAL);
819         intResult = GetLastInt(&ContactEditorData.GeneralWebsiteList);
820         frameCEWeb->SetupPointers(&ContactEditorData.GeneralWebsiteList,
821                 &ContactEditorData.GeneralWebsiteListAltID,
822                 &ContactEditorData.GeneralWebsiteListPID,
823                 &ContactEditorData.GeneralWebsiteListType,
824                 &ContactEditorData.GeneralWebsiteListTokens,
825                 &ContactEditorData.GeneralWebsiteListMediatype,
826                 &ContactEditorData.GeneralWebsiteListPref,
827                 lboWebsites,
828                 (intValueSeek));
829         frameCEWeb->ShowModal();
830         delete frameCEWeb;
831         frameCEWeb = NULL;
832         
835 void frmContactEditor::ModifyGeneralWebsite( wxCommandEvent& event )
837     
838         // Bring up a window for editing a website.
839     
840         long longSelected = -1;
841         int intSelectedData = 0;
842     
843         if (!GetSelectedItem(lboWebsites,
844                 &longSelected,
845                 &intSelectedData)){
846                 
847                 return;
848                 
849         }
850     
851         frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
852         frameCEWeb->SetupPointers(&ContactEditorData.GeneralWebsiteList,
853                 &ContactEditorData.GeneralWebsiteListAltID,
854                 &ContactEditorData.GeneralWebsiteListPID,
855                 &ContactEditorData.GeneralWebsiteListType,
856                 &ContactEditorData.GeneralWebsiteListTokens,
857                 &ContactEditorData.GeneralWebsiteListMediatype,
858                 &ContactEditorData.GeneralWebsiteListPref,
859                 lboWebsites,
860                 intSelectedData);
861         frameCEWeb->SetEditorMode(TRUE, CE_GENERAL);
862         frameCEWeb->ShowModal();
863         delete frameCEWeb;
864         frameCEWeb = NULL;
865         
868 void frmContactEditor::DeleteGeneralWebsite( wxCommandEvent& event )
871         // Bring up a window for deleting a website.
873         long longSelected = -1;
874         int intSelectedData = 0;
875     
876         if (!GetSelectedItem(lboWebsites,
877                 &longSelected,
878                 &intSelectedData)){
879                 
880                 return;
881                 
882         }
883     
884         lboWebsites->DeleteItem(longSelected);
885     
886         DeleteMapData(intSelectedData, &ContactEditorData.GeneralWebsiteList,
887                 &ContactEditorData.GeneralWebsiteListAltID, &ContactEditorData.GeneralWebsiteListPID,
888                 &ContactEditorData.GeneralWebsiteListType, &ContactEditorData.GeneralWebsiteListTokens,
889                 &ContactEditorData.GeneralWebsiteListMediatype, &ContactEditorData.GeneralWebsiteListPref);
890     
893 void frmContactEditor::AddGeneralTitle( wxCommandEvent& event )
896         // Bring up the window for adding a title.
898         int intResult = 0;
899     
900         frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
901         frameCETitle->SetEditorMode(FALSE, CE_GENERAL);
902         intResult = GetLastInt(&ContactEditorData.GeneralTitleList);
903         frameCETitle->SetupPointers(&ContactEditorData.GeneralTitleList,
904                 &ContactEditorData.GeneralTitleListLanguage,
905                 &ContactEditorData.GeneralTitleListAltID,
906                 &ContactEditorData.GeneralTitleListPID,
907                 &ContactEditorData.GeneralTitleListType,
908                 &ContactEditorData.GeneralTitleListTokens,
909                 &ContactEditorData.GeneralTitleListPref,
910                 lboTitles,
911                 (intValueSeek));
912         frameCETitle->ShowModal();
913         delete frameCETitle;
914         frameCETitle = NULL;
915         
918 void frmContactEditor::ModifyGeneralTitle( wxCommandEvent& event )
921         // Bring up the window for editing a title.
923         long longSelected = -1;
924         int intSelectedData = 0;
925     
926         if (!GetSelectedItem(lboTitles,
927                 &longSelected,
928                 &intSelectedData)){
929                 
930                 return;
931                 
932         }
933     
934         frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
935         frameCETitle->SetupPointers(&ContactEditorData.GeneralTitleList,
936                 &ContactEditorData.GeneralTitleListLanguage,
937                 &ContactEditorData.GeneralTitleListAltID,
938                 &ContactEditorData.GeneralTitleListPID,
939                 &ContactEditorData.GeneralTitleListType,
940                 &ContactEditorData.GeneralTitleListTokens,
941                 &ContactEditorData.GeneralTitleListPref,
942                 lboTitles,
943                 intSelectedData);
944         frameCETitle->SetEditorMode(TRUE, CE_GENERAL);
945         frameCETitle->ShowModal();
946         delete frameCETitle;
947         frameCETitle = NULL;
948         
951 void frmContactEditor::DeleteGeneralTitle( wxCommandEvent& event )
954         // Bring up the window for deleting a title.
956         long longSelected = -1;
957         int intSelectedData = 0;
958     
959         if (!GetSelectedItem(lboTitles,
960                 &longSelected,
961                 &intSelectedData)){
962                 
963                 return;
964                 
965         }
966     
967         lboTitles->DeleteItem(longSelected);
968     
969         DeleteMapData(intSelectedData, &ContactEditorData.GeneralTitleList,
970                 &ContactEditorData.GeneralTitleListLanguage, &ContactEditorData.GeneralTitleListAltID,
971                 &ContactEditorData.GeneralTitleListPID, &ContactEditorData.GeneralTitleListType,
972                 &ContactEditorData.GeneralTitleListTokens, &ContactEditorData.GeneralTitleListPref);
973     
976 void frmContactEditor::AddGeneralRole( wxCommandEvent& event )
979         // Bring up the window for adding a role.
981         int intResult = 0;
982     
983         frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
984         frameCERole->SetEditorMode(FALSE, CE_GENERAL);
985         intResult = GetLastInt(&ContactEditorData.GeneralRoleList);
986         frameCERole->SetupPointers(&ContactEditorData.GeneralRoleList,
987                 &ContactEditorData.GeneralRoleListLanguage,
988                 &ContactEditorData.GeneralRoleListAltID,
989                 &ContactEditorData.GeneralRoleListPID,
990                 &ContactEditorData.GeneralRoleListType,
991                 &ContactEditorData.GeneralRoleListTokens,
992                 &ContactEditorData.GeneralRoleListPref,
993                 lboRoles,
994                 (intValueSeek));
995         frameCERole->ShowModal();
996         delete frameCERole;
997         frameCERole = NULL;
998         
1001 void frmContactEditor::ModifyGeneralRole( wxCommandEvent& event )
1004         // Bring up the window for editing a role.
1006         long longSelected = -1;
1007         int intSelectedData = 0;
1008     
1009         if (!GetSelectedItem(lboRoles,
1010                 &longSelected,
1011                 &intSelectedData)){
1012                 
1013                 return;
1014                 
1015         }
1016     
1017         frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
1018         frameCERole->SetupPointers(&ContactEditorData.GeneralRoleList,
1019                 &ContactEditorData.GeneralRoleListLanguage,
1020                 &ContactEditorData.GeneralRoleListAltID,
1021                 &ContactEditorData.GeneralRoleListPID,
1022                 &ContactEditorData.GeneralRoleListType,
1023                 &ContactEditorData.GeneralRoleListTokens,
1024                 &ContactEditorData.GeneralRoleListPref,
1025                 lboRoles,
1026                 intSelectedData);
1027         frameCERole->SetEditorMode(TRUE, CE_GENERAL);
1028         frameCERole->ShowModal();
1029         delete frameCERole;
1030         frameCERole = NULL;
1031         
1034 void frmContactEditor::DeleteGeneralRole( wxCommandEvent& event )
1037         // Bring up the window for deleting a role.
1039         long longSelected = -1;
1040         int intSelectedData = 0;
1041     
1042         if (!GetSelectedItem(lboRoles,
1043                 &longSelected,
1044                 &intSelectedData)){
1045                 
1046                 return;
1047                 
1048         }
1049     
1050         lboRoles->DeleteItem(longSelected);
1051     
1052         DeleteMapData(intSelectedData, &ContactEditorData.GeneralRoleList,
1053                 &ContactEditorData.GeneralRoleListLanguage, &ContactEditorData.GeneralRoleListAltID,
1054                 &ContactEditorData.GeneralRoleListPID, &ContactEditorData.GeneralRoleListType,
1055                 &ContactEditorData.GeneralRoleListTokens, &ContactEditorData.GeneralRoleListPref);
1056     
1059 void frmContactEditor::AddGeneralOrganisation( wxCommandEvent& event )
1062         // Bring up the window for adding an organisation.
1064         int intResult = 0;
1065     
1066         frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
1067         frameCEOrg->SetEditorMode(FALSE, CE_GENERAL);
1068         intResult = GetLastInt(&ContactEditorData.GeneralOrganisationsList);
1069         frameCEOrg->SetupPointers(&ContactEditorData.GeneralOrganisationsList,
1070                 &ContactEditorData.GeneralOrganisationsListLanguage,
1071                 &ContactEditorData.GeneralOrganisationsListSortAs,
1072                 &ContactEditorData.GeneralOrganisationsListAltID,
1073                 &ContactEditorData.GeneralOrganisationsListPID,
1074                 &ContactEditorData.GeneralOrganisationsListType,
1075                 &ContactEditorData.GeneralOrganisationsListTokens,
1076                 &ContactEditorData.GeneralOrganisationsListPref,
1077                 lboOrganisations,
1078                 (intValueSeek));
1079         frameCEOrg->ShowModal();
1080         delete frameCEOrg;
1081         frameCEOrg = NULL;
1082         
1085 void frmContactEditor::ModifyGeneralOrganisation( wxCommandEvent& event )
1088         // Bring up the window for editing an organisation.
1090         long longSelected = -1;
1091         int intSelectedData = 0;
1092     
1093         if (!GetSelectedItem(lboOrganisations,
1094                 &longSelected,
1095                 &intSelectedData)){
1096                 
1097                 return;
1098                 
1099         }
1100     
1101         frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
1102         frameCEOrg->SetupPointers(&ContactEditorData.GeneralOrganisationsList,
1103                 &ContactEditorData.GeneralOrganisationsListLanguage,
1104                 &ContactEditorData.GeneralOrganisationsListSortAs,
1105                 &ContactEditorData.GeneralOrganisationsListAltID,
1106                 &ContactEditorData.GeneralOrganisationsListPID,
1107                 &ContactEditorData.GeneralOrganisationsListType,
1108                 &ContactEditorData.GeneralOrganisationsListTokens,
1109                 &ContactEditorData.GeneralOrganisationsListPref,
1110                 lboOrganisations,
1111                 intSelectedData);
1112         frameCEOrg->SetEditorMode(TRUE, CE_GENERAL);
1113         frameCEOrg->ShowModal();
1114         delete frameCEOrg;
1115         frameCEOrg = NULL;
1116         
1119 void frmContactEditor::DeleteGeneralOrganisation( wxCommandEvent& event )
1122         // Bring up the window for deleting an organisation.
1124         long longSelected = -1;
1125         int intSelectedData = 0;
1126     
1127         if (!GetSelectedItem(lboOrganisations,
1128                 &longSelected,
1129                 &intSelectedData)){
1130                 
1131                 return;
1132         
1133         }
1134     
1135         lboOrganisations->DeleteItem(longSelected);
1136     
1137         DeleteMapData(intSelectedData, &ContactEditorData.GeneralOrganisationsList,
1138                 &ContactEditorData.GeneralOrganisationsListLanguage, &ContactEditorData.GeneralOrganisationsListSortAs,
1139                 &ContactEditorData.GeneralOrganisationsListAltID, &ContactEditorData.GeneralOrganisationsListPID,
1140                 &ContactEditorData.GeneralOrganisationsListType, &ContactEditorData.GeneralOrganisationsListTokens,
1141                 &ContactEditorData.GeneralOrganisationsListPref);
1142     
1145 void frmContactEditor::AddGeneralNote( wxCommandEvent& event )
1148         // Bring up the window for adding a note.
1150         int intResult = 0;
1151     
1152         frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
1153         frameCENote->SetEditorMode(FALSE, CE_GENERAL);
1154         intResult = GetLastInt(&ContactEditorData.GeneralNoteList);
1155         frameCENote->SetupPointers(&ContactEditorData.GeneralNoteList,
1156                 &ContactEditorData.GeneralNoteListLanguage,
1157                 &ContactEditorData.GeneralNoteListAltID,
1158                 &ContactEditorData.GeneralNoteListPID,
1159                 &ContactEditorData.GeneralNoteListType,
1160                 &ContactEditorData.GeneralNoteListTokens,
1161                 &ContactEditorData.GeneralNoteListPref,
1162                 lboNotes,
1163                 (intValueSeek));
1164         frameCENote->ShowModal();
1165         delete frameCENote;
1166         frameCENote = NULL;
1167         
1170 void frmContactEditor::ModifyGeneralNote( wxCommandEvent& event )
1173         // Bring up the window for editing a note.
1175         long longSelected = -1;
1176         int intSelectedData = 0;
1177     
1178         if (!GetSelectedItem(lboNotes,
1179                 &longSelected,
1180                 &intSelectedData)){
1181                 
1182                 return;
1183         
1184         }
1185     
1186         frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
1187         frameCENote->SetupPointers(&ContactEditorData.GeneralNoteList,
1188                 &ContactEditorData.GeneralNoteListLanguage,
1189                 &ContactEditorData.GeneralNoteListAltID,
1190                 &ContactEditorData.GeneralNoteListPID,
1191                 &ContactEditorData.GeneralNoteListType,
1192                 &ContactEditorData.GeneralNoteListTokens,
1193                 &ContactEditorData.GeneralNoteListPref,
1194                 lboNotes,
1195                 intSelectedData);
1196         frameCENote->SetEditorMode(TRUE, CE_GENERAL);
1197         frameCENote->ShowModal();
1198         delete frameCENote;
1199         frameCENote = NULL;
1200         
1203 void frmContactEditor::DeleteGeneralNote( wxCommandEvent& event )
1206         // Bring up a window for deleting a note.
1208         long longSelected = -1;
1209         int intSelectedData = 0;
1210     
1211         if (!GetSelectedItem(lboNotes,
1212                 &longSelected,
1213                 &intSelectedData)){
1214                 
1215                 return;
1216         }
1217     
1218         lboNotes->DeleteItem(longSelected);
1219     
1220         DeleteMapData(intSelectedData, &ContactEditorData.GeneralNoteList,
1221                 &ContactEditorData.GeneralNoteListLanguage, &ContactEditorData.GeneralNoteListAltID,
1222                 &ContactEditorData.GeneralNoteListPID, &ContactEditorData.GeneralNoteListType,
1223                 &ContactEditorData.GeneralNoteListTokens, &ContactEditorData.GeneralNoteListPref);
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