Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Unit Tests: Updated copyright year on modified files
[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         frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
42         frameCENickname->SetEditorMode(FALSE, CE_GENERAL);
43         frameCENickname->SetupPointers(&ContactEditorData.GeneralNicknamesList,
44                 &ContactEditorData.GeneralNicknamesListAltID,
45                 &ContactEditorData.GeneralNicknamesListPID,
46                 &ContactEditorData.GeneralNicknamesListType,
47                 &ContactEditorData.GeneralNicknamesListLanguage,
48                 &ContactEditorData.GeneralNicknamesListTokens,
49                 &ContactEditorData.GeneralNicknamesListPref,
50                 lboNicknames,
51                 (intValueSeek));
52         frameCENickname->ShowModal();
53         delete frameCENickname;
54         frameCENickname = NULL;
55     intValueSeek++;
56         
57 }
59 void frmContactEditor::ModifyGeneralNickname( wxCommandEvent& event )
60 {
61     
62         // Bring up the window for modifying a nickname.
63     
64         long longSelected = -1;
65         int intSelectedData = 0;
66     
67         if (lboNicknames->GetItemCount() == 0 || !GetSelectedItem(lboNicknames,
68                 &longSelected,
69                 &intSelectedData)){
70                 return;
71         }
72     
73         frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
74         frameCENickname->SetupPointers(&ContactEditorData.GeneralNicknamesList,
75                 &ContactEditorData.GeneralNicknamesListAltID,
76                 &ContactEditorData.GeneralNicknamesListPID,
77                 &ContactEditorData.GeneralNicknamesListType,
78                 &ContactEditorData.GeneralNicknamesListLanguage,
79                 &ContactEditorData.GeneralNicknamesListTokens,
80                 &ContactEditorData.GeneralNicknamesListPref,
81                 lboNicknames,
82                 intSelectedData);
83         frameCENickname->SetEditorMode(TRUE, CE_GENERAL);
84         frameCENickname->ShowModal();
85         delete frameCENickname;
86         frameCENickname = NULL;
87     
88 }
90 void frmContactEditor::DeleteGeneralNickname( wxCommandEvent& event )
91 {
92     
93         // Bring up the window for deleting a nickname.
94     
95         long longSelected = -1;
96         int intSelectedData = 0;
97     
98         if (lboNicknames->GetItemCount() == 0 || !GetSelectedItem(lboNicknames,
99                 &longSelected,
100                 &intSelectedData)){
101                 return;
102         }
103     
104         lboNicknames->DeleteItem(longSelected);
105     
106         DeleteMapData(intSelectedData,
107                 &ContactEditorData.GeneralNicknamesList,
108                 &ContactEditorData.GeneralNicknamesListLanguage,
109                 &ContactEditorData.GeneralNicknamesListAltID,
110                 &ContactEditorData.GeneralNicknamesListPID,
111                 &ContactEditorData.GeneralNicknamesListTokens,
112                 &ContactEditorData.GeneralNicknamesListType,
113                 &ContactEditorData.GeneralNicknamesListPref);
114     
117 void frmContactEditor::AddGeneralAddress( wxCommandEvent& event )
119     
120         // Bring up the window for adding an address.
121     
122         frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
123         frameCEAddress->SetEditorMode(FALSE, CE_GENERAL);
124         frameCEAddress->SetupPointers(&ContactEditorData.GeneralAddressList,
125                 &ContactEditorData.GeneralAddressListTown,
126                 &ContactEditorData.GeneralAddressListCounty,
127                 &ContactEditorData.GeneralAddressListPostCode,
128                 &ContactEditorData.GeneralAddressListCountry,
129                 &ContactEditorData.GeneralAddressListLabel,
130                 &ContactEditorData.GeneralAddressListLang,
131                 &ContactEditorData.GeneralAddressListAltID,
132                 &ContactEditorData.GeneralAddressListPID,
133                 &ContactEditorData.GeneralAddressListTokens,
134                 &ContactEditorData.GeneralAddressListGeo,
135                 &ContactEditorData.GeneralAddressListTimezone,
136                 &ContactEditorData.GeneralAddressListType,
137                 &ContactEditorData.GeneralAddressListMediatype,
138                 &ContactEditorData.GeneralAddressListPref,
139                 lboAddresses,
140                 (intValueSeek));
141         frameCEAddress->ShowModal();
142         delete frameCEAddress;
143         frameCEAddress = NULL;
144     intValueSeek++;
148 void frmContactEditor::ModifyGeneralAddress( wxCommandEvent& event )
151         // Bring up the window for editing an address.
152     
153         long longSelected = -1;
154         int intSelectedData = 0;
155     
156         if (lboAddresses->GetItemCount() == 0 || !GetSelectedItem(lboAddresses,
157                 &longSelected,
158                 &intSelectedData)){
159         
160                 return;
161         
162         }
163     
164         if (longSelected == -1){
165         
166                 return;
167                 
168         }
169     
170         frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
171         frameCEAddress->SetupPointers(&ContactEditorData.GeneralAddressList,
172                 &ContactEditorData.GeneralAddressListTown,
173                 &ContactEditorData.GeneralAddressListCounty,
174                 &ContactEditorData.GeneralAddressListPostCode,
175                 &ContactEditorData.GeneralAddressListCountry,
176                 &ContactEditorData.GeneralAddressListLabel,
177                 &ContactEditorData.GeneralAddressListLang,
178                 &ContactEditorData.GeneralAddressListAltID,
179                 &ContactEditorData.GeneralAddressListPID,
180                 &ContactEditorData.GeneralAddressListTokens,
181                 &ContactEditorData.GeneralAddressListGeo,
182                 &ContactEditorData.GeneralAddressListTimezone,
183                 &ContactEditorData.GeneralAddressListType,
184                 &ContactEditorData.GeneralAddressListMediatype,
185                 &ContactEditorData.GeneralAddressListPref,
186                 lboAddresses,
187                 intSelectedData);
188         frameCEAddress->SetEditorMode(TRUE, CE_GENERAL);
189         frameCEAddress->ShowModal();
190         delete frameCEAddress;
191         frameCEAddress = NULL;
192     
195 void frmContactEditor::DeleteGeneralAddress( wxCommandEvent& event )
197     
198         // Bring up the window for deleting a nickname.
199     
200         long longSelected = -1;
201         int intSelectedData = 0;
202     
203         if (lboAddresses->GetItemCount() == 0 || !GetSelectedItem(lboAddresses,
204                 &longSelected,
205                 &intSelectedData)){
206         
207                 return;
208                 
209         }
210     
211         lboAddresses->DeleteItem(longSelected);
212     
213         DeleteMapData(intSelectedData, &ContactEditorData.GeneralAddressList,
214                 &ContactEditorData.GeneralAddressListTown, &ContactEditorData.GeneralAddressListCounty,
215                 &ContactEditorData.GeneralAddressListPostCode, &ContactEditorData.GeneralAddressListCountry,
216                 &ContactEditorData.GeneralAddressList, &ContactEditorData.GeneralAddressListLabel,
217                 &ContactEditorData.GeneralAddressListLang, &ContactEditorData.GeneralAddressListAltID,
218                 &ContactEditorData.GeneralAddressListPID, &ContactEditorData.GeneralAddressListTokens,
219                 &ContactEditorData.GeneralAddressListGeo, &ContactEditorData.GeneralAddressListTimezone,
220                 &ContactEditorData.GeneralAddressListType, &ContactEditorData.GeneralAddressListMediatype,
221                 &ContactEditorData.GeneralAddressListPref);
222     
225 void frmContactEditor::AddGeneralEmail( wxCommandEvent& event )
228         // Bring up the window for adding an email.
230         frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
231         frameCEEmail->SetEditorMode(FALSE, CE_GENERAL);
232         frameCEEmail->SetupPointers(&ContactEditorData.GeneralEmailList,
233                 &ContactEditorData.GeneralEmailListAltID,
234                 &ContactEditorData.GeneralEmailListPID,
235                 &ContactEditorData.GeneralEmailListType,
236                 &ContactEditorData.GeneralEmailListTokens,
237                 &ContactEditorData.GeneralEmailListPref,
238                 lboEmails,
239                 (intValueSeek));
240         frameCEEmail->ShowModal();
241         delete frameCEEmail;
242         frameCEEmail = NULL;
243     intValueSeek++;
247 void frmContactEditor::ModifyGeneralEmail( wxCommandEvent& event )
250         // Bring up the window for modifying an email.
252         long longSelected = -1;
253         int intSelectedData = 0;
254     
255         if (lboEmails->GetItemCount() == 0 || !GetSelectedItem(lboEmails,
256                 &longSelected,
257                 &intSelectedData)){
258         
259                 return;
260                 
261         }
262     
263         frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
264         frameCEEmail->SetupPointers(&ContactEditorData.GeneralEmailList,
265                 &ContactEditorData.GeneralEmailListAltID,
266                 &ContactEditorData.GeneralEmailListPID,
267                 &ContactEditorData.GeneralEmailListType,
268                 &ContactEditorData.GeneralEmailListTokens,
269                 &ContactEditorData.GeneralEmailListPref,
270                 lboEmails,
271                 intSelectedData);
272         frameCEEmail->SetEditorMode(TRUE, CE_GENERAL);
273         frameCEEmail->ShowModal();
274         delete frameCEEmail;
275         frameCEEmail = NULL;
276         
279 void frmContactEditor::DeleteGeneralEmail( wxCommandEvent& event )
282         // Bring up the window for deleting an email.
284         long longSelected = -1;
285         int intSelectedData = 0;
286     
287         if (lboEmails->GetItemCount() == 0 || !GetSelectedItem(lboEmails,
288                 &longSelected,
289                 &intSelectedData)){
290         
291                 return;
292         
293         }
294     
295         lboEmails->DeleteItem(longSelected);
296     
297         DeleteMapData(intSelectedData, &ContactEditorData.GeneralEmailList,
298                 &ContactEditorData.GeneralEmailListAltID, &ContactEditorData.GeneralEmailListPID,
299                 &ContactEditorData.GeneralEmailListType, &ContactEditorData.GeneralEmailListTokens,
300                 &ContactEditorData.GeneralEmailListPref);
304 void frmContactEditor::AddGeneralIM( wxCommandEvent& event )
307         // Bring up the window for adding a IM address.
308     
309         frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
310         frameCEIM->SetEditorMode(FALSE, CE_GENERAL);
311         frameCEIM->SetupPointers(&ContactEditorData.GeneralIMList,
312                 &ContactEditorData.GeneralIMListAltID,
313                 &ContactEditorData.GeneralIMListPID,
314                 &ContactEditorData.GeneralIMListType,
315                 &ContactEditorData.GeneralIMListTypeInfo,
316                 &ContactEditorData.GeneralIMListTokens,
317                 &ContactEditorData.GeneralIMListMediatype,
318                 &ContactEditorData.GeneralIMListPref,
319                 lboIM,
320                 (intValueSeek));
321         frameCEIM->ShowModal();
322         delete frameCEIM;
323         frameCEIM = NULL;
324     intValueSeek++;
328 void frmContactEditor::ModifyGeneralIM( wxCommandEvent& event )
331         // Bring up the window for editing a IM address.
333         long longSelected = -1;
334         int intSelectedData = 0;
335     
336         if (lboIM->GetItemCount() == 0 || !GetSelectedItem(lboIM,
337                 &longSelected,
338                 &intSelectedData)){
339                 
340                 return;
341                 
342         }
344         frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
345         frameCEIM->SetupPointers(&ContactEditorData.GeneralIMList,
346                 &ContactEditorData.GeneralIMListAltID,
347                 &ContactEditorData.GeneralIMListPID,
348                 &ContactEditorData.GeneralIMListType,
349                 &ContactEditorData.GeneralIMListTypeInfo,
350                 &ContactEditorData.GeneralIMListTokens,
351                 &ContactEditorData.GeneralIMListMediatype,
352                 &ContactEditorData.GeneralIMListPref,
353                 lboIM,
354                 intSelectedData);
355         frameCEIM->SetEditorMode(TRUE, CE_GENERAL);
356         frameCEIM->ShowModal();
357         delete frameCEIM;
358         frameCEIM = NULL;
359         
362 void frmContactEditor::DeleteGeneralIM( wxCommandEvent& event )
365         // Bring up the window for deleting an IM address.
367         long longSelected = -1;
368         int intSelectedData = 0;
369     
370         if (lboIM->GetItemCount() == 0 || !GetSelectedItem(lboIM,
371                 &longSelected,
372                 &intSelectedData)){
373                 
374                 return;
375         }
376     
377         lboIM->DeleteItem(longSelected);
378     
379         DeleteMapData(intSelectedData, &ContactEditorData.GeneralIMList,
380                 &ContactEditorData.GeneralIMListAltID, &ContactEditorData.GeneralIMListPID,
381                 &ContactEditorData.GeneralIMListType, &ContactEditorData.GeneralIMListTypeInfo,
382                 &ContactEditorData.GeneralIMListTokens, &ContactEditorData.GeneralIMListMediatype, 
383                 &ContactEditorData.GeneralIMListPref);
384     
387 void frmContactEditor::AddGeneralTelephone( wxCommandEvent& event )
390         // Bring up the window for adding a telephone.
391     
392         frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
393         frameCETel->SetEditorMode(FALSE, CE_GENERAL);
394         frameCETel->SetupPointers(&ContactEditorData.GeneralTelephoneList,
395                 &ContactEditorData.GeneralTelephoneListAltID,
396                 &ContactEditorData.GeneralTelephoneListPID,
397                 &ContactEditorData.GeneralTelephoneListType,
398                 &ContactEditorData.GeneralTelephoneListTypeInfo,
399                 &ContactEditorData.GeneralTelephoneListTokens,
400                 &ContactEditorData.GeneralTelephoneListPref,
401                 lboTelephone,
402                 (intValueSeek));
403         frameCETel->ShowModal();
404         delete frameCETel;
405         frameCETel = NULL;
406     intValueSeek++;
410 void frmContactEditor::ModifyGeneralTelephone( wxCommandEvent& event )
413         // Bring up the window for editing a telephone.
415         long longSelected = -1;
416         int intSelectedData = 0;
417     
418         if (lboTelephone->GetItemCount() == 0 || !GetSelectedItem(lboTelephone,
419                 &longSelected,
420                 &intSelectedData)){
421                 
422                 return;
423                 
424         }
425     
426         frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
427         frameCETel->SetupPointers(&ContactEditorData.GeneralTelephoneList,
428                 &ContactEditorData.GeneralTelephoneListAltID,
429                 &ContactEditorData.GeneralTelephoneListPID,
430                 &ContactEditorData.GeneralTelephoneListType,
431                 &ContactEditorData.GeneralTelephoneListTypeInfo,
432                 &ContactEditorData.GeneralTelephoneListTokens,
433                 &ContactEditorData.GeneralTelephoneListPref,
434                 lboTelephone,
435                 intSelectedData);
436         frameCETel->SetEditorMode(TRUE, CE_GENERAL);
437         frameCETel->ShowModal();
438         delete frameCETel;
439         frameCETel = NULL;
440         
443 void frmContactEditor::DeleteGeneralTelephone( wxCommandEvent& event )
446         // Bring up the window for deleting a telephone.
448         long longSelected = -1;
449         int intSelectedData = 0;
450     
451         if (lboTelephone->GetItemCount() == 0 || !GetSelectedItem(lboTelephone,
452                 &longSelected,
453                 &intSelectedData)){
454                 
455                 return;
456         
457         }
458     
459         lboTelephone->DeleteItem(longSelected);
460     
461         DeleteMapData(intSelectedData, &ContactEditorData.GeneralTelephoneList,
462                 &ContactEditorData.GeneralTelephoneListAltID, &ContactEditorData.GeneralTelephoneListPID,
463                 &ContactEditorData.GeneralTelephoneListType, &ContactEditorData.GeneralTelephoneListTypeInfo,
464                 &ContactEditorData.GeneralTelephoneListTokens, &ContactEditorData.GeneralTelephoneListPref);
465     
468 void frmContactEditor::AddGeneralLanguages( wxCommandEvent& event )
471         // Bring up the window for adding a language.
472     
473         frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
474         frameCELang->SetEditorMode(FALSE, CE_GENERAL);
475         frameCELang->SetupPointers(&ContactEditorData.GeneralLanguageList,
476                 &ContactEditorData.GeneralLanguageListAltID,
477                 &ContactEditorData.GeneralLanguageListPID,
478                 &ContactEditorData.GeneralLanguageListType,
479                 &ContactEditorData.GeneralLanguageListTokens,
480                 &ContactEditorData.GeneralLanguageListPref,
481                 lboLanguages,
482                 (intValueSeek));
483         frameCELang->ShowModal();
484         delete frameCELang;
485         frameCELang = NULL;
486     intValueSeek++;
490 void frmContactEditor::ModifyGeneralLanguages( wxCommandEvent& event )
493         // Bring up the window for modifying a language.
495         long longSelected = -1;
496         int intSelectedData = 0;
497     
498         if (lboLanguages->GetItemCount() == 0 || !GetSelectedItem(lboLanguages,
499                 &longSelected,
500                 &intSelectedData)){
501         
502                 return;
503                 
504         }
505     
506         frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
507         frameCELang->SetupPointers(&ContactEditorData.GeneralLanguageList,
508                 &ContactEditorData.GeneralLanguageListAltID,
509                 &ContactEditorData.GeneralLanguageListPID,
510                 &ContactEditorData.GeneralLanguageListType,
511                 &ContactEditorData.GeneralLanguageListTokens,
512                 &ContactEditorData.GeneralLanguageListPref,
513                 lboLanguages,
514                 intSelectedData);
515         frameCELang->SetEditorMode(TRUE, CE_GENERAL);
516         frameCELang->ShowModal();
517         delete frameCELang;
518         frameCELang = NULL;
519         
522 void frmContactEditor::DeleteGeneralLanguage( wxCommandEvent& event )
525         // Bring up the window for deleting a language.
527         long longSelected = -1;
528         int intSelectedData = 0;
529     
530         if (lboLanguages->GetItemCount() == 0 || !GetSelectedItem(lboLanguages,
531                 &longSelected,
532                 &intSelectedData)){
533                 
534                 return;
535         }
536     
537         lboLanguages->DeleteItem(longSelected);
538     
539         DeleteMapData(intSelectedData, &ContactEditorData.GeneralLanguageList,
540                 &ContactEditorData.GeneralLanguageListAltID, &ContactEditorData.GeneralLanguageListPID,
541                 &ContactEditorData.GeneralLanguageListType, &ContactEditorData.GeneralLanguageListTokens,
542                 &ContactEditorData.GeneralLanguageListPref);
543     
546 void frmContactEditor::AddGeneralTimezone( wxCommandEvent& event )
549         // Bring up the window for adding a timezone.
550     
551         frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
552         frameCETZ->SetEditorMode(FALSE, CE_GENERAL);
553         frameCETZ->SetupPointers(&ContactEditorData.GeneralTZList,
554                 &ContactEditorData.GeneralTZListAltID,
555                 &ContactEditorData.GeneralTZListPID,
556                 &ContactEditorData.GeneralTZListType,
557                 &ContactEditorData.GeneralTZListTokens,
558                 &ContactEditorData.GeneralTZListMediatype,
559                 &ContactEditorData.GeneralTZListPref,
560                 lboTimezones,
561                 (intValueSeek));
562         frameCETZ->ShowModal();
563         delete frameCETZ;
564         frameCETZ = NULL;
565     intValueSeek++;
569 void frmContactEditor::ModifyGeneralTimezone( wxCommandEvent& event )
572         // Bring up a window for editing a timezone.
574         long longSelected = -1;
575         int intSelectedData = 0;
576     
577         if (lboTimezones->GetItemCount() == 0 || !GetSelectedItem(lboTimezones,
578                 &longSelected,
579                 &intSelectedData)){
580                 
581                 return;
582         }
583     
584         frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
585         frameCETZ->SetupPointers(&ContactEditorData.GeneralTZList,
586                 &ContactEditorData.GeneralTZListAltID,
587                 &ContactEditorData.GeneralTZListPID,
588                 &ContactEditorData.GeneralTZListType,
589                 &ContactEditorData.GeneralTZListTokens,
590                 &ContactEditorData.GeneralTZListMediatype,
591                 &ContactEditorData.GeneralTZListPref,
592                 lboTimezones,
593                 intSelectedData);
594         frameCETZ->SetEditorMode(TRUE, CE_GENERAL);
595         frameCETZ->ShowModal();
596         delete frameCETZ;
597         frameCETZ = NULL;
598         
601 void frmContactEditor::DeleteGeneralTimezone( wxCommandEvent& event )
604         // Bring up the window for deleting a timezone.
606         long longSelected = -1;
607         int intSelectedData = 0;
608     
609         if (lboTimezones->GetItemCount() == 0 || !GetSelectedItem(lboTimezones,
610                 &longSelected,
611                 &intSelectedData)){
612                 
613                 return;
614                 
615         }
616     
617         lboTimezones->DeleteItem(longSelected);
618     
619         DeleteMapData(intSelectedData, &ContactEditorData.GeneralTZList,
620                 &ContactEditorData.GeneralTZListAltID, &ContactEditorData.GeneralTZListPID,
621                 &ContactEditorData.GeneralTZListType, &ContactEditorData.GeneralTZListTokens,
622                 &ContactEditorData.GeneralTZListMediatype, &ContactEditorData.GeneralTZListPref);
623     
626 void frmContactEditor::AddGeneralGeoposition( wxCommandEvent& event )
629         // Bring up the window for adding a geoposition location.
630     
631         frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
632         frameCEGeo->SetEditorMode(FALSE, CE_GENERAL);
633         frameCEGeo->SetupPointers(&ContactEditorData.GeneralGeographyList,
634                 &ContactEditorData.GeneralGeographyListAltID,
635                 &ContactEditorData.GeneralGeographyListPID,
636                 &ContactEditorData.GeneralGeographyListType,
637                 &ContactEditorData.GeneralGeographyListDataType,
638                 &ContactEditorData.GeneralGeographyListTokens,
639                 &ContactEditorData.GeneralGeographyListMediatype,
640                 &ContactEditorData.GeneralGeographyListPref,
641                 lboGeoposition,
642                 (intValueSeek));
643         frameCEGeo->ShowModal();
644         delete frameCEGeo;
645         frameCEGeo = NULL;
646     intValueSeek++;
650 void frmContactEditor::ModifyGeneralGeoposition( wxCommandEvent& event )
653         // Bring up the window for editing a geoposition location.
655         long longSelected = -1;
656         int intSelectedData = 0;
657     
658         if (lboGeoposition->GetItemCount() == 0 || !GetSelectedItem(lboGeoposition,
659                 &longSelected,
660                 &intSelectedData)){
661                 
662                 return;
663                 
664         }
665     
666         frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
667         frameCEGeo->SetupPointers(&ContactEditorData.GeneralGeographyList,
668                 &ContactEditorData.GeneralGeographyListAltID,
669                 &ContactEditorData.GeneralGeographyListPID,
670                 &ContactEditorData.GeneralGeographyListType,
671                 &ContactEditorData.GeneralGeographyListDataType,
672                 &ContactEditorData.GeneralGeographyListTokens,
673                 &ContactEditorData.GeneralGeographyListMediatype,
674                 &ContactEditorData.GeneralGeographyListPref,
675                 lboGeoposition,
676                 intSelectedData);
677                 
678         frameCEGeo->SetEditorMode(TRUE, CE_GENERAL);
679         frameCEGeo->ShowModal();
680         delete frameCEGeo;
681         frameCEGeo = NULL;
682         
685 void frmContactEditor::DeleteGeneralGeoposition( wxCommandEvent& event )
688         // Bring up the window for deleting a geoposition location.
690         long longSelected = -1;
691         int intSelectedData = 0;
692     
693         if (lboGeoposition->GetItemCount() == 0 || !GetSelectedItem(lboGeoposition,
694                 &longSelected,
695                 &intSelectedData)){
696                 
697                 return;
698                 
699         }
700     
701         lboGeoposition->DeleteItem(longSelected);
702     
703         DeleteMapData(intSelectedData, &ContactEditorData.GeneralGeographyList,
704                 &ContactEditorData.GeneralGeographyListAltID, &ContactEditorData.GeneralGeographyListPID,
705                 &ContactEditorData.GeneralGeographyListType, &ContactEditorData.GeneralGeographyListDataType,
706                 &ContactEditorData.GeneralGeographyListTokens, &ContactEditorData.GeneralGeographyListMediatype, 
707                 &ContactEditorData.GeneralGeographyListPref);
708     
711 void frmContactEditor::AddGeneralRelated( wxCommandEvent& event )
714         // Bring up the window for adding a relation.
715     
716         frmContactEditorRelated *frameCERel = new frmContactEditorRelated ( this );
717         frameCERel->SetEditorMode(FALSE, CE_GENERAL);
718         frameCERel->SetupPointers(&ContactEditorData.GeneralRelatedList,
719                 &ContactEditorData.GeneralRelatedListRelType,
720                 &ContactEditorData.GeneralRelatedListAltID,
721                 &ContactEditorData.GeneralRelatedListPID,
722                 &ContactEditorData.GeneralRelatedListType,
723                 &ContactEditorData.GeneralRelatedListTokens,
724                 &ContactEditorData.GeneralRelatedListPref,
725                 lboRelated,
726                 (intValueSeek));
727         frameCERel->ShowModal();
728         delete frameCERel;
729         frameCERel = NULL;
730     intValueSeek++;
734 void frmContactEditor::ModifyGeneralRelated( wxCommandEvent& event )
737         // Bring up the window for editing a relation.
739         long longSelected = -1;
740         int intSelectedData = 0;
741     
742         if (lboRelated->GetItemCount() == 0 || !GetSelectedItem(lboRelated,
743                 &longSelected,
744                 &intSelectedData)){
745                 
746                 return;
747                 
748         }
749     
750         frmContactEditorRelated *frameCERel = new frmContactEditorRelated ( this );
751         frameCERel->SetupPointers(&ContactEditorData.GeneralRelatedList,
752                 &ContactEditorData.GeneralRelatedListRelType,
753                 &ContactEditorData.GeneralRelatedListAltID,
754                 &ContactEditorData.GeneralRelatedListPID,
755                 &ContactEditorData.GeneralRelatedListType,
756                 &ContactEditorData.GeneralRelatedListTokens,
757                 &ContactEditorData.GeneralRelatedListPref,
758                 lboRelated,
759                 intSelectedData);
760         frameCERel->SetEditorMode(TRUE, CE_GENERAL);
761         frameCERel->ShowModal();
762         delete frameCERel;
763         frameCERel = NULL;
764         
767 void frmContactEditor::DeleteGeneralRelated( wxCommandEvent& event )
770         // Bring up a window for deleting a relation.
772         long longSelected = -1;
773         int intSelectedData = 0;
774     
775         if (lboRelated->GetItemCount() == 0 || !GetSelectedItem(lboRelated,
776                 &longSelected,
777                 &intSelectedData)){
778                 
779                 return;
780                 
781         }
782     
783         lboRelated->DeleteItem(longSelected);
784     
785         DeleteMapData(intSelectedData, &ContactEditorData.GeneralRelatedList,
786                 &ContactEditorData.GeneralRelatedListRelType, &ContactEditorData.GeneralRelatedListAltID,
787                 &ContactEditorData.GeneralRelatedListPID, &ContactEditorData.GeneralRelatedListType,
788                 &ContactEditorData.GeneralRelatedListTokens, &ContactEditorData.GeneralRelatedListPref);
789     
792 void frmContactEditor::AddGeneralWebsite( wxCommandEvent& event )
795         // Bring up a window for adding a website.
796     
797         frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
798         frameCEWeb->SetEditorMode(FALSE, CE_GENERAL);
799         frameCEWeb->SetupPointers(&ContactEditorData.GeneralWebsiteList,
800                 &ContactEditorData.GeneralWebsiteListAltID,
801                 &ContactEditorData.GeneralWebsiteListPID,
802                 &ContactEditorData.GeneralWebsiteListType,
803                 &ContactEditorData.GeneralWebsiteListTokens,
804                 &ContactEditorData.GeneralWebsiteListMediatype,
805                 &ContactEditorData.GeneralWebsiteListPref,
806                 lboWebsites,
807                 (intValueSeek));
808         frameCEWeb->ShowModal();
809         delete frameCEWeb;
810         frameCEWeb = NULL;
811     intValueSeek++;
815 void frmContactEditor::ModifyGeneralWebsite( wxCommandEvent& event )
817     
818         // Bring up a window for editing a website.
819     
820         long longSelected = -1;
821         int intSelectedData = 0;
822     
823         if (lboWebsites->GetItemCount() == 0 || !GetSelectedItem(lboWebsites,
824                 &longSelected,
825                 &intSelectedData)){
826                 
827                 return;
828                 
829         }
830     
831         frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
832         frameCEWeb->SetupPointers(&ContactEditorData.GeneralWebsiteList,
833                 &ContactEditorData.GeneralWebsiteListAltID,
834                 &ContactEditorData.GeneralWebsiteListPID,
835                 &ContactEditorData.GeneralWebsiteListType,
836                 &ContactEditorData.GeneralWebsiteListTokens,
837                 &ContactEditorData.GeneralWebsiteListMediatype,
838                 &ContactEditorData.GeneralWebsiteListPref,
839                 lboWebsites,
840                 intSelectedData);
841         frameCEWeb->SetEditorMode(TRUE, CE_GENERAL);
842         frameCEWeb->ShowModal();
843         delete frameCEWeb;
844         frameCEWeb = NULL;
845         
848 void frmContactEditor::DeleteGeneralWebsite( wxCommandEvent& event )
851         // Bring up a window for deleting a website.
853         long longSelected = -1;
854         int intSelectedData = 0;
855     
856         if (lboWebsites->GetItemCount() == 0 || !GetSelectedItem(lboWebsites,
857                 &longSelected,
858                 &intSelectedData)){
859                 
860                 return;
861                 
862         }
863     
864         lboWebsites->DeleteItem(longSelected);
865     
866         DeleteMapData(intSelectedData, &ContactEditorData.GeneralWebsiteList,
867                 &ContactEditorData.GeneralWebsiteListAltID, &ContactEditorData.GeneralWebsiteListPID,
868                 &ContactEditorData.GeneralWebsiteListType, &ContactEditorData.GeneralWebsiteListTokens,
869                 &ContactEditorData.GeneralWebsiteListMediatype, &ContactEditorData.GeneralWebsiteListPref);
870     
873 void frmContactEditor::AddGeneralTitle( wxCommandEvent& event )
876         // Bring up the window for adding a title.
877     
878         frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
879         frameCETitle->SetEditorMode(FALSE, CE_GENERAL);
880         frameCETitle->SetupPointers(&ContactEditorData.GeneralTitleList,
881                 &ContactEditorData.GeneralTitleListLanguage,
882                 &ContactEditorData.GeneralTitleListAltID,
883                 &ContactEditorData.GeneralTitleListPID,
884                 &ContactEditorData.GeneralTitleListType,
885                 &ContactEditorData.GeneralTitleListTokens,
886                 &ContactEditorData.GeneralTitleListPref,
887                 lboTitles,
888                 (intValueSeek));
889         frameCETitle->ShowModal();
890         delete frameCETitle;
891         frameCETitle = NULL;
892     intValueSeek++;
896 void frmContactEditor::ModifyGeneralTitle( wxCommandEvent& event )
899         // Bring up the window for editing a title.
901         long longSelected = -1;
902         int intSelectedData = 0;
903     
904         if (lboTitles->GetItemCount() == 0 || !GetSelectedItem(lboTitles,
905                 &longSelected,
906                 &intSelectedData)){
907                 
908                 return;
909                 
910         }
911     
912         frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
913         frameCETitle->SetupPointers(&ContactEditorData.GeneralTitleList,
914                 &ContactEditorData.GeneralTitleListLanguage,
915                 &ContactEditorData.GeneralTitleListAltID,
916                 &ContactEditorData.GeneralTitleListPID,
917                 &ContactEditorData.GeneralTitleListType,
918                 &ContactEditorData.GeneralTitleListTokens,
919                 &ContactEditorData.GeneralTitleListPref,
920                 lboTitles,
921                 intSelectedData);
922         frameCETitle->SetEditorMode(TRUE, CE_GENERAL);
923         frameCETitle->ShowModal();
924         delete frameCETitle;
925         frameCETitle = NULL;
926         
929 void frmContactEditor::DeleteGeneralTitle( wxCommandEvent& event )
932         // Bring up the window for deleting a title.
934         long longSelected = -1;
935         int intSelectedData = 0;
936     
937         if (lboTitles->GetItemCount() == 0 || !GetSelectedItem(lboTitles,
938                 &longSelected,
939                 &intSelectedData)){
940                 
941                 return;
942                 
943         }
944     
945         lboTitles->DeleteItem(longSelected);
946     
947         DeleteMapData(intSelectedData, &ContactEditorData.GeneralTitleList,
948                 &ContactEditorData.GeneralTitleListLanguage, &ContactEditorData.GeneralTitleListAltID,
949                 &ContactEditorData.GeneralTitleListPID, &ContactEditorData.GeneralTitleListType,
950                 &ContactEditorData.GeneralTitleListTokens, &ContactEditorData.GeneralTitleListPref);
951     
954 void frmContactEditor::AddGeneralRole( wxCommandEvent& event )
957         // Bring up the window for adding a role.
958     
959         frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
960         frameCERole->SetEditorMode(FALSE, CE_GENERAL);
961         frameCERole->SetupPointers(&ContactEditorData.GeneralRoleList,
962                 &ContactEditorData.GeneralRoleListLanguage,
963                 &ContactEditorData.GeneralRoleListAltID,
964                 &ContactEditorData.GeneralRoleListPID,
965                 &ContactEditorData.GeneralRoleListType,
966                 &ContactEditorData.GeneralRoleListTokens,
967                 &ContactEditorData.GeneralRoleListPref,
968                 lboRoles,
969                 (intValueSeek));
970         frameCERole->ShowModal();
971         delete frameCERole;
972         frameCERole = NULL;
973     intValueSeek++;
977 void frmContactEditor::ModifyGeneralRole( wxCommandEvent& event )
980         // Bring up the window for editing a role.
982         long longSelected = -1;
983         int intSelectedData = 0;
984     
985         if (lboRoles->GetItemCount() == 0 || !GetSelectedItem(lboRoles,
986                 &longSelected,
987                 &intSelectedData)){
988                 
989                 return;
990                 
991         }
992     
993         frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
994         frameCERole->SetupPointers(&ContactEditorData.GeneralRoleList,
995                 &ContactEditorData.GeneralRoleListLanguage,
996                 &ContactEditorData.GeneralRoleListAltID,
997                 &ContactEditorData.GeneralRoleListPID,
998                 &ContactEditorData.GeneralRoleListType,
999                 &ContactEditorData.GeneralRoleListTokens,
1000                 &ContactEditorData.GeneralRoleListPref,
1001                 lboRoles,
1002                 intSelectedData);
1003         frameCERole->SetEditorMode(TRUE, CE_GENERAL);
1004         frameCERole->ShowModal();
1005         delete frameCERole;
1006         frameCERole = NULL;
1007         
1010 void frmContactEditor::DeleteGeneralRole( wxCommandEvent& event )
1013         // Bring up the window for deleting a role.
1015         long longSelected = -1;
1016         int intSelectedData = 0;
1017     
1018         if (lboRoles->GetItemCount() == 0 || !GetSelectedItem(lboRoles,
1019                 &longSelected,
1020                 &intSelectedData)){
1021                 
1022                 return;
1023                 
1024         }
1025     
1026         lboRoles->DeleteItem(longSelected);
1027     
1028         DeleteMapData(intSelectedData, &ContactEditorData.GeneralRoleList,
1029                 &ContactEditorData.GeneralRoleListLanguage, &ContactEditorData.GeneralRoleListAltID,
1030                 &ContactEditorData.GeneralRoleListPID, &ContactEditorData.GeneralRoleListType,
1031                 &ContactEditorData.GeneralRoleListTokens, &ContactEditorData.GeneralRoleListPref);
1032     
1035 void frmContactEditor::AddGeneralOrganisation( wxCommandEvent& event )
1038         // Bring up the window for adding an organisation.
1039     
1040         frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
1041         frameCEOrg->SetEditorMode(FALSE, CE_GENERAL);
1042         frameCEOrg->SetupPointers(&ContactEditorData.GeneralOrganisationsList,
1043                 &ContactEditorData.GeneralOrganisationsListLanguage,
1044                 &ContactEditorData.GeneralOrganisationsListSortAs,
1045                 &ContactEditorData.GeneralOrganisationsListAltID,
1046                 &ContactEditorData.GeneralOrganisationsListPID,
1047                 &ContactEditorData.GeneralOrganisationsListType,
1048                 &ContactEditorData.GeneralOrganisationsListTokens,
1049                 &ContactEditorData.GeneralOrganisationsListPref,
1050                 lboOrganisations,
1051                 (intValueSeek));
1052         frameCEOrg->ShowModal();
1053         delete frameCEOrg;
1054         frameCEOrg = NULL;
1055     intValueSeek++;
1059 void frmContactEditor::ModifyGeneralOrganisation( wxCommandEvent& event )
1062         // Bring up the window for editing an organisation.
1064         long longSelected = -1;
1065         int intSelectedData = 0;
1066     
1067         if (lboOrganisations->GetItemCount() == 0 || !GetSelectedItem(lboOrganisations,
1068                 &longSelected,
1069                 &intSelectedData)){
1070                 
1071                 return;
1072                 
1073         }
1074     
1075         frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
1076         frameCEOrg->SetupPointers(&ContactEditorData.GeneralOrganisationsList,
1077                 &ContactEditorData.GeneralOrganisationsListLanguage,
1078                 &ContactEditorData.GeneralOrganisationsListSortAs,
1079                 &ContactEditorData.GeneralOrganisationsListAltID,
1080                 &ContactEditorData.GeneralOrganisationsListPID,
1081                 &ContactEditorData.GeneralOrganisationsListType,
1082                 &ContactEditorData.GeneralOrganisationsListTokens,
1083                 &ContactEditorData.GeneralOrganisationsListPref,
1084                 lboOrganisations,
1085                 intSelectedData);
1086         frameCEOrg->SetEditorMode(TRUE, CE_GENERAL);
1087         frameCEOrg->ShowModal();
1088         delete frameCEOrg;
1089         frameCEOrg = NULL;
1090         
1093 void frmContactEditor::DeleteGeneralOrganisation( wxCommandEvent& event )
1096         // Bring up the window for deleting an organisation.
1098         long longSelected = -1;
1099         int intSelectedData = 0;
1100     
1101         if (lboOrganisations->GetItemCount() == 0 || !GetSelectedItem(lboOrganisations,
1102                 &longSelected,
1103                 &intSelectedData)){
1104                 
1105                 return;
1106         
1107         }
1108     
1109         lboOrganisations->DeleteItem(longSelected);
1110     
1111         DeleteMapData(intSelectedData, &ContactEditorData.GeneralOrganisationsList,
1112                 &ContactEditorData.GeneralOrganisationsListLanguage, &ContactEditorData.GeneralOrganisationsListSortAs,
1113                 &ContactEditorData.GeneralOrganisationsListAltID, &ContactEditorData.GeneralOrganisationsListPID,
1114                 &ContactEditorData.GeneralOrganisationsListType, &ContactEditorData.GeneralOrganisationsListTokens,
1115                 &ContactEditorData.GeneralOrganisationsListPref);
1116     
1119 void frmContactEditor::AddGeneralNote( wxCommandEvent& event )
1122         // Bring up the window for adding a note.
1123     
1124         frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
1125         frameCENote->SetEditorMode(FALSE, CE_GENERAL);
1126         frameCENote->SetupPointers(&ContactEditorData.GeneralNoteList,
1127                 &ContactEditorData.GeneralNoteListLanguage,
1128                 &ContactEditorData.GeneralNoteListAltID,
1129                 &ContactEditorData.GeneralNoteListPID,
1130                 &ContactEditorData.GeneralNoteListType,
1131                 &ContactEditorData.GeneralNoteListTokens,
1132                 &ContactEditorData.GeneralNoteListPref,
1133                 lboNotes,
1134                 (intValueSeek));
1135         frameCENote->ShowModal();
1136         delete frameCENote;
1137         frameCENote = NULL;
1138     intValueSeek++;
1142 void frmContactEditor::ModifyGeneralNote( wxCommandEvent& event )
1145         // Bring up the window for editing a note.
1147         long longSelected = -1;
1148         int intSelectedData = 0;
1149     
1150         if (lboNotes->GetItemCount() == 0 || !GetSelectedItem(lboNotes,
1151                 &longSelected,
1152                 &intSelectedData)){
1153                 
1154                 return;
1155         
1156         }
1157     
1158         frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
1159         frameCENote->SetupPointers(&ContactEditorData.GeneralNoteList,
1160                 &ContactEditorData.GeneralNoteListLanguage,
1161                 &ContactEditorData.GeneralNoteListAltID,
1162                 &ContactEditorData.GeneralNoteListPID,
1163                 &ContactEditorData.GeneralNoteListType,
1164                 &ContactEditorData.GeneralNoteListTokens,
1165                 &ContactEditorData.GeneralNoteListPref,
1166                 lboNotes,
1167                 intSelectedData);
1168         frameCENote->SetEditorMode(TRUE, CE_GENERAL);
1169         frameCENote->ShowModal();
1170         delete frameCENote;
1171         frameCENote = NULL;
1172         
1175 void frmContactEditor::DeleteGeneralNote( wxCommandEvent& event )
1178         // Bring up a window for deleting a note.
1180         long longSelected = -1;
1181         int intSelectedData = 0;
1182     
1183         if (lboBusinessNotes->GetItemCount() == 0 || !GetSelectedItem(lboNotes,
1184                 &longSelected,
1185                 &intSelectedData)){
1186                 
1187                 return;
1188         }
1189     
1190         lboNotes->DeleteItem(longSelected);
1191     
1192         DeleteMapData(intSelectedData, &ContactEditorData.GeneralNoteList,
1193                 &ContactEditorData.GeneralNoteListLanguage, &ContactEditorData.GeneralNoteListAltID,
1194                 &ContactEditorData.GeneralNoteListPID, &ContactEditorData.GeneralNoteListType,
1195                 &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