Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
frmContactEditorSound: Implemented priority control
[xestiaab/.git] / source / contacteditor / frmContactEditor-Home.cpp
1 // frmContactEditor-Home.cpp - frmContactEditor Home tab subroutines.
2 //
3 // (c) 2012-2016 Xestia Software Development.
4 //
5 // This file is part of Xestia Address Book.
6 //
7 // Xestia Address Book is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by the
9 // Free Software Foundation, version 3 of the license.
10 //
11 // Xestia Address Book is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License along
17 // with Xestia Address Book. If not, see <http://www.gnu.org/licenses/>
19 #include "frmContactEditor.h"
20 #include "frmContactEditorNickname.h"
21 #include "frmContactEditorAddress.h"
22 #include "frmContactEditorEmail.h"
23 #include "frmContactEditorIM.h"
24 #include "frmContactEditorTelephone.h"
25 #include "frmContactEditorLanguages.h"
26 #include "frmContactEditorTimezones.h"
27 #include "frmContactEditorRelated.h"
28 #include "frmContactEditorWebsites.h"
29 #include "frmContactEditorTitles.h"
30 #include "frmContactEditorRoles.h"
31 #include "frmContactEditorGeoposition.h"
32 #include "frmContactEditorGroups.h"
33 #include "frmContactEditorOrganisations.h"
34 #include "frmContactEditorNotes.h"
36 void frmContactEditor::AddHomeNickname( wxCommandEvent& event )
37 {
38         
39         // Bring up window to add nickname.
40         
41         frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
42         frameCENickname->SetEditorMode(FALSE, CE_HOME);
43         frameCENickname->SetupPointers(&ContactEditorData.HomeNicknamesList,
44                 &ContactEditorData.HomeNicknamesListAltID,
45                 &ContactEditorData.HomeNicknamesListPID,
46                 &ContactEditorData.HomeNicknamesListType,
47                 &ContactEditorData.HomeNicknamesListLanguage,
48                 &ContactEditorData.HomeNicknamesListTokens,
49                 &ContactEditorData.HomeNicknamesListPref,
50                 lboHomeNicknames,
51                 (intValueSeek));
52         frameCENickname->ShowModal();
53         delete frameCENickname;
54         frameCENickname = NULL;
55         
56 }
58 void frmContactEditor::ModifyHomeNickname( wxCommandEvent& event )
59 {
60         
61         // Bring up window to modify nickname.
62         
63         long longSelected = -1;
64         int intSelectedData = 0;
65     
66         if (lboHomeNicknames->GetItemCount() == 0 || !GetSelectedItem(lboHomeNicknames,
67                 &longSelected,
68                 &intSelectedData)){
69                 return;
70         }
71     
72         frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
73         frameCENickname->SetupPointers(&ContactEditorData.HomeNicknamesList,
74                 &ContactEditorData.HomeNicknamesListAltID,
75                 &ContactEditorData.HomeNicknamesListPID,
76                 &ContactEditorData.HomeNicknamesListType,
77                 &ContactEditorData.HomeNicknamesListLanguage,
78                 &ContactEditorData.HomeNicknamesListTokens,
79                 &ContactEditorData.HomeNicknamesListPref,
80                 lboHomeNicknames,
81                 intSelectedData);
82         frameCENickname->SetEditorMode(TRUE, CE_HOME);
83         frameCENickname->ShowModal();
84         delete frameCENickname;
85         frameCENickname = NULL;
86         
87 }
89 void frmContactEditor::DeleteHomeNickname( wxCommandEvent& event )
90 {
91     
92         // Bring up window to delete nickname.
93         
94         long longSelected = -1;
95         int intSelectedData = 0;
96     
97         if (lboHomeNicknames->GetItemCount() == 0 || !GetSelectedItem(lboHomeNicknames,
98                 &longSelected,
99                 &intSelectedData)){
100                 return;
101         }
102     
103         lboHomeNicknames->DeleteItem(longSelected);
104     
105         DeleteMapData(intSelectedData,
106                 &ContactEditorData.HomeNicknamesList,
107                 &ContactEditorData.HomeNicknamesListLanguage,
108                 &ContactEditorData.HomeNicknamesListAltID,
109                 &ContactEditorData.HomeNicknamesListPID,
110                 &ContactEditorData.HomeNicknamesListTokens,
111                 &ContactEditorData.HomeNicknamesListType,
112                 &ContactEditorData.HomeNicknamesListPref);
116 void frmContactEditor::AddHomeAddress( wxCommandEvent& event )
118         
119         // Bring up window to add address.      
120         
121         frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
122         frameCEAddress->SetEditorMode(FALSE, CE_HOME);
123         frameCEAddress->SetupPointers(&ContactEditorData.HomeAddressList,
124                 &ContactEditorData.HomeAddressListTown,
125                 &ContactEditorData.HomeAddressListCounty,
126                 &ContactEditorData.HomeAddressListPostCode,
127                 &ContactEditorData.HomeAddressListCountry,
128                 &ContactEditorData.HomeAddressListLabel,
129                 &ContactEditorData.HomeAddressListLang,
130                 &ContactEditorData.HomeAddressListAltID,
131                 &ContactEditorData.HomeAddressListPID,
132                 &ContactEditorData.HomeAddressListTokens,
133                 &ContactEditorData.HomeAddressListGeo,
134                 &ContactEditorData.HomeAddressListTimezone,
135                 &ContactEditorData.HomeAddressListType,
136                 &ContactEditorData.HomeAddressListMediatype,
137                 &ContactEditorData.HomeAddressListPref,
138                 lboHomeAddresses,
139                 (intValueSeek));
140         frameCEAddress->ShowModal();
141         delete frameCEAddress;
142         frameCEAddress = NULL;
143         
146 void frmContactEditor::ModifyHomeAddress( wxCommandEvent& event )
148         
149         // Bring up window to modify address.
150         
151         long longSelected = -1;
152         int intSelectedData = 0;
153     
154         if (lboHomeAddresses->GetItemCount() == 0 || !GetSelectedItem(lboHomeAddresses,
155                 &longSelected,
156                 &intSelectedData)){
157                 return;
158         }
159     
160         frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
161         frameCEAddress->SetupPointers(&ContactEditorData.HomeAddressList,
162                 &ContactEditorData.HomeAddressListTown,
163                 &ContactEditorData.HomeAddressListCounty,
164                 &ContactEditorData.HomeAddressListPostCode,
165                 &ContactEditorData.HomeAddressListCountry,
166                 &ContactEditorData.HomeAddressListLabel,
167                 &ContactEditorData.HomeAddressListLang,
168                 &ContactEditorData.HomeAddressListAltID,
169                 &ContactEditorData.HomeAddressListPID,
170                 &ContactEditorData.HomeAddressListTokens,
171                 &ContactEditorData.HomeAddressListGeo,
172                 &ContactEditorData.HomeAddressListTimezone,
173                 &ContactEditorData.HomeAddressListType,
174                 &ContactEditorData.HomeAddressListMediatype,
175                 &ContactEditorData.HomeAddressListPref,
176                 lboHomeAddresses,
177                 intSelectedData);
178         frameCEAddress->SetEditorMode(TRUE, CE_HOME);
179         frameCEAddress->ShowModal();
180         delete frameCEAddress;
181         frameCEAddress = NULL;
182         
185 void frmContactEditor::DeleteHomeAddress( wxCommandEvent& event )
187  
188         // Bring up window to delete address.
189         
190         long longSelected = -1;
191         int intSelectedData = 0;
192     
193         if (lboHomeAddresses->GetItemCount() == 0 || !GetSelectedItem(lboHomeAddresses,
194                 &longSelected,
195                 &intSelectedData)){
196                 return;
197         }
198     
199         lboHomeAddresses->DeleteItem(longSelected);
200     
201         DeleteMapData(intSelectedData, &ContactEditorData.HomeAddressList,
202                 &ContactEditorData.HomeAddressListTown, &ContactEditorData.HomeAddressListCounty,
203                 &ContactEditorData.HomeAddressListPostCode, &ContactEditorData.HomeAddressListCountry,
204                 &ContactEditorData.HomeAddressList, &ContactEditorData.HomeAddressListLabel,
205                 &ContactEditorData.HomeAddressListLang, &ContactEditorData.HomeAddressListAltID,
206                 &ContactEditorData.HomeAddressListPID, &ContactEditorData.HomeAddressListTokens,
207                 &ContactEditorData.HomeAddressListGeo, &ContactEditorData.HomeAddressListTimezone,
208                 &ContactEditorData.HomeAddressListType, &ContactEditorData.HomeAddressListMediatype,
209                 &ContactEditorData.HomeAddressListPref);
210     
213 void frmContactEditor::AddHomeEmail( wxCommandEvent& event )
215         
216         // Bring up window to add email.
217         
218         frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
219         frameCEEmail->SetEditorMode(FALSE, CE_HOME);
220         frameCEEmail->SetupPointers(&ContactEditorData.HomeEmailList,
221                 &ContactEditorData.HomeEmailListAltID,
222                 &ContactEditorData.HomeEmailListPID,
223                 &ContactEditorData.HomeEmailListType,
224                 &ContactEditorData.HomeEmailListTokens,
225                 &ContactEditorData.HomeEmailListPref,
226                 lboHomeEmails,
227                 (intValueSeek));
228         frameCEEmail->ShowModal();
229         delete frameCEEmail;
230         frameCEEmail = NULL;
231         
234 void frmContactEditor::ModifyHomeEmail( wxCommandEvent& event )
236         
237         // Bring up window to modify email.
238         
239         long longSelected = -1;
240         int intSelectedData = 0;
241     
242         if (lboHomeEmails->GetItemCount() == 0 || !GetSelectedItem(lboHomeEmails,
243                 &longSelected,
244                 &intSelectedData)){
245                 return;
246         }
247     
248         frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
249         frameCEEmail->SetupPointers(&ContactEditorData.HomeEmailList,
250                 &ContactEditorData.HomeEmailListAltID,
251                 &ContactEditorData.HomeEmailListPID,
252                 &ContactEditorData.HomeEmailListType,
253                 &ContactEditorData.HomeEmailListTokens,
254                 &ContactEditorData.HomeEmailListPref,
255                 lboHomeEmails,
256                 intSelectedData);
257         frameCEEmail->SetEditorMode(TRUE, CE_HOME);
258         frameCEEmail->ShowModal();
259         delete frameCEEmail;
260         frameCEEmail = NULL;
261         
265 void frmContactEditor::DeleteHomeEmail( wxCommandEvent& event )
267         
268         // Bring up window to delete email.
269         
270         long longSelected = -1;
271         int intSelectedData = 0;
272     
273         if (lboHomeEmails->GetItemCount() == 0 || !GetSelectedItem(lboHomeEmails,
274                 &longSelected,
275                 &intSelectedData)){
276                 return;
277         }
278     
279         lboHomeEmails->DeleteItem(longSelected);
280     
281         DeleteMapData(intSelectedData, &ContactEditorData.HomeEmailList,
282                 &ContactEditorData.HomeEmailListAltID, &ContactEditorData.HomeEmailListPID,
283                 &ContactEditorData.HomeEmailListType, &ContactEditorData.HomeEmailListTokens,
284                 &ContactEditorData.HomeEmailListPref);
285         
289 void frmContactEditor::AddHomeIM( wxCommandEvent& event )
291         
292         // Bring up window to add IM.
293         
294         frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
295         frameCEIM->SetEditorMode(FALSE, CE_HOME);
296         frameCEIM->SetupPointers(&ContactEditorData.HomeIMList,
297                 &ContactEditorData.HomeIMListAltID,
298                 &ContactEditorData.HomeIMListPID,
299                 &ContactEditorData.HomeIMListType,
300                 &ContactEditorData.HomeIMListTypeInfo,
301                 &ContactEditorData.HomeIMListTokens,
302                 &ContactEditorData.HomeIMListMediatype,
303                 &ContactEditorData.HomeIMListPref,
304                 lboHomeIM,
305                 (intValueSeek));
306         frameCEIM->ShowModal();
307         delete frameCEIM;
308         frameCEIM = NULL;
309         
312 void frmContactEditor::ModifyHomeIM( wxCommandEvent& event )
315         // Bring up window to modify IM.
316         
317         long longSelected = -1;
318         int intSelectedData = 0;
319     
320         if (lboHomeIM->GetItemCount() == 0 || !GetSelectedItem(lboHomeIM,
321                 &longSelected,
322                 &intSelectedData)){
323                 return;
324         }
325     
326         frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
327         frameCEIM->SetupPointers(&ContactEditorData.HomeIMList,
328                 &ContactEditorData.HomeIMListAltID,
329                 &ContactEditorData.HomeIMListPID,
330                 &ContactEditorData.HomeIMListType,
331                 &ContactEditorData.HomeIMListTypeInfo,
332                 &ContactEditorData.HomeIMListTokens,
333                 &ContactEditorData.HomeIMListMediatype,
334                 &ContactEditorData.HomeIMListPref,
335                 lboHomeIM,
336                 intSelectedData);
337         frameCEIM->SetEditorMode(TRUE, CE_HOME);
338         frameCEIM->ShowModal();
339         delete frameCEIM;
340         frameCEIM = NULL;
341     
344 void frmContactEditor::DeleteHomeIM( wxCommandEvent& event )
346         
347         // Bring up window to delete IM.
349         long longSelected = -1;
350         int intSelectedData = 0;
351     
352         if (lboHomeIM->GetItemCount() == 0 || !GetSelectedItem(lboHomeIM,
353                 &longSelected,
354                 &intSelectedData)){
355                 return;
356         }
357     
358         lboHomeIM->DeleteItem(longSelected);
359     
360         DeleteMapData(intSelectedData, &ContactEditorData.HomeIMList,
361                 &ContactEditorData.HomeIMListAltID, &ContactEditorData.HomeIMListPID,
362                 &ContactEditorData.HomeIMListType, &ContactEditorData.HomeIMListTypeInfo,
363                 &ContactEditorData.HomeIMListTokens, &ContactEditorData.HomeIMListMediatype, 
364                 &ContactEditorData.HomeIMListPref);
365     
368 void frmContactEditor::AddHomeTelephone( wxCommandEvent& event )
370         
371         // Bring up window to add telephone.
372         
373         frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
374         frameCETel->SetEditorMode(FALSE, CE_HOME);
375         frameCETel->SetupPointers(&ContactEditorData.HomeTelephoneList,
376                 &ContactEditorData.HomeTelephoneListAltID,
377                 &ContactEditorData.HomeTelephoneListPID,
378                 &ContactEditorData.HomeTelephoneListType,
379                 &ContactEditorData.HomeTelephoneListTypeInfo,
380                 &ContactEditorData.HomeTelephoneListTokens,
381                 &ContactEditorData.HomeTelephoneListPref,
382                 lboHomeTelephone,
383                 (intValueSeek));
384         frameCETel->ShowModal();
385         delete frameCETel;
386         frameCETel = NULL;
387         
390 void frmContactEditor::ModifyHomeTelephone( wxCommandEvent& event )
392         
393         // Bring up window to modify telephone.
394         
395         long longSelected = -1;
396         int intSelectedData = 0;
397     
398         if (lboHomeTelephone->GetItemCount() == 0 || !GetSelectedItem(lboHomeTelephone,
399                 &longSelected,
400                 &intSelectedData)){
401                 return;
402         }
403     
404         frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
405         frameCETel->SetupPointers(&ContactEditorData.HomeTelephoneList,
406                 &ContactEditorData.HomeTelephoneListAltID,
407                 &ContactEditorData.HomeTelephoneListPID,
408                 &ContactEditorData.HomeTelephoneListType,
409                 &ContactEditorData.HomeTelephoneListTypeInfo,
410                 &ContactEditorData.HomeTelephoneListTokens,
411                 &ContactEditorData.HomeTelephoneListPref,
412                 lboHomeTelephone,
413                 intSelectedData);
414         frameCETel->SetEditorMode(TRUE, CE_HOME);
415         frameCETel->ShowModal();
416         delete frameCETel;
417         frameCETel = NULL;
418         
419 }       
421 void frmContactEditor::DeleteHomeTelephone( wxCommandEvent& event )
423         
424         // Bring up window to delete telephone. 
425         
426         long longSelected = -1;
427         int intSelectedData = 0;
428     
429         if (lboHomeTelephone->GetItemCount() == 0 || !GetSelectedItem(lboHomeTelephone,
430                 &longSelected,
431                 &intSelectedData)){
432                 return;
433         }
434     
435         lboHomeTelephone->DeleteItem(longSelected);
436     
437         DeleteMapData(intSelectedData, &ContactEditorData.HomeTelephoneList,
438                 &ContactEditorData.HomeTelephoneListAltID, &ContactEditorData.HomeTelephoneListPID,
439                 &ContactEditorData.HomeTelephoneListType, &ContactEditorData.HomeTelephoneListTypeInfo,
440                 &ContactEditorData.HomeTelephoneListTokens, &ContactEditorData.HomeTelephoneListPref);
441     
444 void frmContactEditor::AddHomeLanguage( wxCommandEvent& event )
446         
447         // Bring up window to add language.
448         
449         frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
450         frameCELang->SetEditorMode(FALSE, CE_HOME);
451         frameCELang->SetupPointers(&ContactEditorData.HomeLanguageList,
452                 &ContactEditorData.HomeLanguageListAltID,
453                 &ContactEditorData.HomeLanguageListPID,
454                 &ContactEditorData.HomeLanguageListType,
455                 &ContactEditorData.HomeLanguageListTokens,
456                 &ContactEditorData.HomeLanguageListPref,
457                 lboHomeLanguages,
458                 (intValueSeek));
459         frameCELang->ShowModal();
460         delete frameCELang;
461         frameCELang = NULL;
462         
465 void frmContactEditor::ModifyHomeLanguage( wxCommandEvent& event )
467         
468         // Bring up window to modify language.
469         
470         long longSelected = -1;
471         int intSelectedData = 0;
472     
473         if (lboHomeLanguages->GetItemCount() == 0 || !GetSelectedItem(lboHomeLanguages,
474                 &longSelected,
475                 &intSelectedData)){
476                 return;
477         }
478     
479         frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
480         frameCELang->SetupPointers(&ContactEditorData.HomeLanguageList,
481                 &ContactEditorData.HomeLanguageListAltID,
482                 &ContactEditorData.HomeLanguageListPID,
483                 &ContactEditorData.HomeLanguageListType,
484                 &ContactEditorData.HomeLanguageListTokens,
485                 &ContactEditorData.HomeLanguageListPref,
486                 lboHomeLanguages,
487                 intSelectedData);
488         frameCELang->SetEditorMode(TRUE, CE_HOME);
489         frameCELang->ShowModal();
490         delete frameCELang;
491         frameCELang = NULL;
492         
495 void frmContactEditor::DeleteHomeLanguage( wxCommandEvent& event )
497         
498         // Bring up window to delete language.
499         
500         long longSelected = -1;
501         int intSelectedData = 0;
502     
503         if (lboHomeLanguages->GetItemCount() == 0 || !GetSelectedItem(lboHomeLanguages,
504                 &longSelected,
505                 &intSelectedData)){
506                 return;
507         }
508     
509         lboHomeLanguages->DeleteItem(longSelected);
510     
511         DeleteMapData(intSelectedData, &ContactEditorData.HomeLanguageList,
512                 &ContactEditorData.HomeLanguageListAltID, &ContactEditorData.HomeLanguageListPID,
513                 &ContactEditorData.HomeLanguageListType, &ContactEditorData.HomeLanguageListTokens,
514                 &ContactEditorData.HomeLanguageListPref);
515     
518 void frmContactEditor::AddHomeTimezone( wxCommandEvent& event )
520         
521         // Bring up window to add timezone.
522         
523         frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
524         frameCETZ->SetEditorMode(FALSE, CE_HOME);
525         frameCETZ->SetupPointers(&ContactEditorData.HomeTZList,
526                 &ContactEditorData.HomeTZListAltID,
527                 &ContactEditorData.HomeTZListPID,
528                 &ContactEditorData.HomeTZListType,
529                 &ContactEditorData.HomeTZListTokens,
530                 &ContactEditorData.HomeTZListMediatype,
531                 &ContactEditorData.HomeTZListPref,
532                 lboHomeTimezones,
533                 (intValueSeek));
534         frameCETZ->ShowModal();
535         delete frameCETZ;
536         frameCETZ = NULL;
537         
540 void frmContactEditor::ModifyHomeTimezone( wxCommandEvent& event )
542         
543         // Bring up window to modify timezone.
544         
545         long longSelected = -1;
546         int intSelectedData = 0;
547     
548         if (lboHomeTimezones->GetItemCount() == 0 || !GetSelectedItem(lboHomeTimezones,
549                 &longSelected,
550                 &intSelectedData)){
551                 return;
552         }
553     
554         frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
555         frameCETZ->SetupPointers(&ContactEditorData.HomeTZList,
556                 &ContactEditorData.HomeTZListAltID,
557                 &ContactEditorData.HomeTZListPID,
558                 &ContactEditorData.HomeTZListType,
559                 &ContactEditorData.HomeTZListTokens,
560                 &ContactEditorData.HomeTZListMediatype,
561                 &ContactEditorData.HomeTZListPref,
562                 lboHomeTimezones,
563                 intSelectedData);
564         frameCETZ->SetEditorMode(TRUE, CE_HOME);
565         frameCETZ->ShowModal();
566         delete frameCETZ;
567         frameCETZ = NULL;
568         
571 void frmContactEditor::DeleteHomeTimezone( wxCommandEvent& event )
573         
574         // Bring up window to delete timezone.
575         
576         long longSelected = -1;
577         int intSelectedData = 0;
578     
579         if (lboHomeTimezones->GetItemCount() == 0 || !GetSelectedItem(lboHomeTimezones,
580                 &longSelected,
581                 &intSelectedData)){
582                 return;
583         }
584     
585         lboHomeTimezones->DeleteItem(longSelected);
586     
587         DeleteMapData(intSelectedData, &ContactEditorData.HomeTZList,
588                 &ContactEditorData.HomeTZListAltID, &ContactEditorData.HomeTZListPID,
589                 &ContactEditorData.HomeTZListType, &ContactEditorData.HomeTZListTokens,
590                 &ContactEditorData.HomeTZListMediatype, &ContactEditorData.HomeTZListPref);
591     
594 void frmContactEditor::AddHomeGeoposition( wxCommandEvent& event )
597         // Bring up window to add geoposition.
598         
599         frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
600         frameCEGeo->SetEditorMode(FALSE, CE_HOME);
601         frameCEGeo->SetupPointers(&ContactEditorData.HomeGeographyList,
602                 &ContactEditorData.HomeGeographyListAltID,
603                 &ContactEditorData.HomeGeographyListPID,
604                 &ContactEditorData.HomeGeographyListType,
605                 &ContactEditorData.HomeGeographyListDataType,
606                 &ContactEditorData.HomeGeographyListTokens,
607                 &ContactEditorData.HomeGeographyListMediatype,
608                 &ContactEditorData.HomeGeographyListPref,
609                 lboHomeGeoposition,
610                 (intValueSeek));
611         frameCEGeo->ShowModal();
612         delete frameCEGeo;
613         frameCEGeo = NULL;
614         
617 void frmContactEditor::ModifyHomeGeoposition( wxCommandEvent& event )
619         
620         // Bring up window to modify geoposition.
621         
622         long longSelected = -1;
623         int intSelectedData = 0;
624     
625         if (lboHomeGeoposition->GetItemCount() == 0 || !GetSelectedItem(lboHomeGeoposition,
626                 &longSelected,
627                 &intSelectedData)){
628                 return;
629         }
630     
631         frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
632         frameCEGeo->SetupPointers(&ContactEditorData.HomeGeographyList,
633                 &ContactEditorData.HomeGeographyListAltID,
634                 &ContactEditorData.HomeGeographyListPID,
635                 &ContactEditorData.HomeGeographyListType,
636                 &ContactEditorData.HomeGeographyListDataType,
637                 &ContactEditorData.HomeGeographyListTokens,
638                 &ContactEditorData.HomeGeographyListMediatype,
639                 &ContactEditorData.HomeGeographyListPref,
640                 lboHomeGeoposition,
641                 intSelectedData);
642         frameCEGeo->SetEditorMode(TRUE, CE_HOME);
643         frameCEGeo->ShowModal();
644         delete frameCEGeo;
645         frameCEGeo = NULL;
646         
649 void frmContactEditor::DeleteHomeGeoposition( wxCommandEvent& event )
651         
652         // Bring up window to delete geoposition.
653         
654         long longSelected = -1;
655         int intSelectedData = 0;
656     
657         if (lboHomeGeoposition->GetItemCount() == 0 || !GetSelectedItem(lboHomeGeoposition,
658                 &longSelected,
659                 &intSelectedData)){
660                 return;
661         }
662     
663         lboHomeGeoposition->DeleteItem(longSelected);
664     
665         DeleteMapData(intSelectedData, &ContactEditorData.HomeGeographyList,
666                 &ContactEditorData.HomeGeographyListAltID, &ContactEditorData.HomeGeographyListPID,
667                 &ContactEditorData.HomeGeographyListType, &ContactEditorData.HomeGeographyListTokens,
668                 &ContactEditorData.HomeGeographyListDataType, &ContactEditorData.HomeGeographyListMediatype, 
669                 &ContactEditorData.HomeGeographyListPref);
670     
673 void frmContactEditor::AddHomeWebsite( wxCommandEvent& event )
676         // Bring up window to add website.
677         
678         frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
679         frameCEWeb->SetEditorMode(FALSE, CE_HOME);
680         frameCEWeb->SetupPointers(&ContactEditorData.HomeWebsiteList,
681                 &ContactEditorData.HomeWebsiteListAltID,
682                 &ContactEditorData.HomeWebsiteListPID,
683                 &ContactEditorData.HomeWebsiteListType,
684                 &ContactEditorData.HomeWebsiteListTokens,
685                 &ContactEditorData.HomeWebsiteListMediatype,
686                 &ContactEditorData.HomeWebsiteListPref,
687                 lboHomeWebsites,
688                 (intValueSeek));
689         frameCEWeb->ShowModal();
690         delete frameCEWeb;
691         frameCEWeb = NULL;
692         
695 void frmContactEditor::ModifyHomeWebsite( wxCommandEvent& event )
697         
698         // Bring up window to modify website.
699         
700         long longSelected = -1;
701         int intSelectedData = 0;
702     
703         if (lboHomeWebsites->GetItemCount() == 0 || !GetSelectedItem(lboHomeWebsites,
704                 &longSelected,
705                 &intSelectedData)){
706                 return;
707         }
708     
709         frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
710         frameCEWeb->SetupPointers(&ContactEditorData.HomeWebsiteList,
711                 &ContactEditorData.HomeWebsiteListAltID,
712                 &ContactEditorData.HomeWebsiteListPID,
713                 &ContactEditorData.HomeWebsiteListType,
714                 &ContactEditorData.HomeWebsiteListTokens,
715                 &ContactEditorData.HomeWebsiteListMediatype,
716                 &ContactEditorData.HomeWebsiteListPref,
717                 lboHomeWebsites,
718                 intSelectedData);
719         frameCEWeb->SetEditorMode(TRUE, CE_HOME);
720         frameCEWeb->ShowModal();
721         delete frameCEWeb;
722         frameCEWeb = NULL;
723         
726 void frmContactEditor::DeleteHomeWebsite( wxCommandEvent& event )
728         
729         // Bring up window to delete website.
730         
731         long longSelected = -1;
732         int intSelectedData = 0;
733     
734         if (lboHomeWebsites->GetItemCount() == 0 || !GetSelectedItem(lboHomeWebsites,
735                 &longSelected,
736                 &intSelectedData)){
737                 return;
738         }
739     
740         lboHomeWebsites->DeleteItem(longSelected);
741     
742         DeleteMapData(intSelectedData, &ContactEditorData.HomeWebsiteList,
743                 &ContactEditorData.HomeWebsiteListAltID, &ContactEditorData.HomeWebsiteListPID,
744                 &ContactEditorData.HomeWebsiteListType, &ContactEditorData.HomeWebsiteListTokens,
745                 &ContactEditorData.HomeWebsiteListMediatype, &ContactEditorData.HomeWebsiteListPref);
746     
749 void frmContactEditor::AddHomeTitle( wxCommandEvent& event )
751         
752         // Bring up window to add title.
753         
754         frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
755         frameCETitle->SetEditorMode(FALSE, CE_HOME);
756         frameCETitle->SetupPointers(&ContactEditorData.HomeTitleList,
757                 &ContactEditorData.HomeTitleListLanguage,
758                 &ContactEditorData.HomeTitleListAltID,
759                 &ContactEditorData.HomeTitleListPID,
760                 &ContactEditorData.HomeTitleListType,
761                 &ContactEditorData.HomeTitleListTokens,
762                 &ContactEditorData.HomeTitleListPref,
763                 lboHomeTitles,
764                 (intValueSeek));
765         frameCETitle->ShowModal();
766         delete frameCETitle;
767         frameCETitle = NULL;
768         
771 void frmContactEditor::ModifyHomeTitle( wxCommandEvent& event )
773         
774         // Bring up window to modify title.
775         
776         long longSelected = -1;
777         int intSelectedData = 0;
778     
779         if (lboHomeTitles->GetItemCount() == 0 || !GetSelectedItem(lboHomeTitles,
780                 &longSelected,
781                 &intSelectedData)){
782                 return;
783         }
784     
785         frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
786         frameCETitle->SetupPointers(&ContactEditorData.HomeTitleList,
787                 &ContactEditorData.HomeTitleListLanguage,
788                 &ContactEditorData.HomeTitleListAltID,
789                 &ContactEditorData.HomeTitleListPID,
790                 &ContactEditorData.HomeTitleListType,
791                 &ContactEditorData.HomeTitleListTokens,
792                 &ContactEditorData.HomeTitleListPref,
793                 lboHomeTitles,
794                 intSelectedData);
795         frameCETitle->SetEditorMode(TRUE, CE_HOME);
796         frameCETitle->ShowModal();
797         delete frameCETitle;
798         frameCETitle = NULL;
799         
802 void frmContactEditor::DeleteHomeTitle( wxCommandEvent& event )
804         
805         // Bring up window to delete title.
806         
807         long longSelected = -1;
808         int intSelectedData = 0;
809     
810         if (lboHomeTitles->GetItemCount() == 0 || !GetSelectedItem(lboHomeTitles,
811                 &longSelected,
812                 &intSelectedData)){
813                 return;
814         }
815     
816         lboHomeTitles->DeleteItem(longSelected);
817     
818         DeleteMapData(intSelectedData, &ContactEditorData.HomeTitleList,
819                 &ContactEditorData.HomeTitleListLanguage, &ContactEditorData.HomeTitleListAltID,
820                 &ContactEditorData.HomeTitleListPID, &ContactEditorData.HomeTitleListType,
821                 &ContactEditorData.HomeTitleListTokens, &ContactEditorData.HomeTitleListPref);
822     
825 void frmContactEditor::AddHomeRole( wxCommandEvent& event )
827         
828         // Bring up window to add role.
829         
830         frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
831         frameCERole->SetEditorMode(FALSE, CE_HOME);
832         frameCERole->SetupPointers(&ContactEditorData.HomeRoleList,
833                 &ContactEditorData.HomeRoleListLanguage,
834                 &ContactEditorData.HomeRoleListAltID,
835                 &ContactEditorData.HomeRoleListPID,
836                 &ContactEditorData.HomeRoleListType,
837                 &ContactEditorData.HomeRoleListTokens,
838                 &ContactEditorData.HomeRoleListPref,
839                 lboHomeRoles,
840                 (intValueSeek));
841         frameCERole->ShowModal();
842         delete frameCERole;
843         frameCERole = NULL;
844         
847 void frmContactEditor::ModifyHomeRole( wxCommandEvent& event )
850         // Bring up window to modify role.
851         
852         long longSelected = -1;
853         int intSelectedData = 0;
854     
855         if (lboHomeRoles->GetItemCount() == 0 || !GetSelectedItem(lboHomeRoles,
856                 &longSelected,
857                 &intSelectedData)){
858                 return;
859         }
860     
861         frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
862         frameCERole->SetupPointers(&ContactEditorData.HomeRoleList,
863                 &ContactEditorData.HomeRoleListLanguage,
864                 &ContactEditorData.HomeRoleListAltID,
865                 &ContactEditorData.HomeRoleListPID,
866                 &ContactEditorData.HomeRoleListType,
867                 &ContactEditorData.HomeRoleListTokens,
868                 &ContactEditorData.HomeRoleListPref,
869                 lboHomeRoles,
870                 intSelectedData);
871         frameCERole->SetEditorMode(TRUE, CE_HOME);
872         frameCERole->ShowModal();
873         delete frameCERole;
874         frameCERole = NULL;
875         
878 void frmContactEditor::DeleteHomeRole( wxCommandEvent& event )
880         
881         // Bring up window to delete role.
882         
883         long longSelected = -1;
884         int intSelectedData = 0;
885     
886         if (lboHomeRoles->GetItemCount() == 0 || !GetSelectedItem(lboHomeRoles,
887                 &longSelected,
888                 &intSelectedData)){
889                 return;
890         }
891     
892         lboHomeRoles->DeleteItem(longSelected);
893     
894         DeleteMapData(intSelectedData, &ContactEditorData.HomeRoleList,
895                 &ContactEditorData.HomeRoleListLanguage, &ContactEditorData.HomeRoleListAltID,
896                 &ContactEditorData.HomeRoleListPID, &ContactEditorData.HomeRoleListType,
897                 &ContactEditorData.HomeRoleListTokens, &ContactEditorData.HomeRoleListPref);
898     
901 void frmContactEditor::AddHomeOrganisation( wxCommandEvent& event )
903         
904         // Bring up window to add organisation.
905         
906         frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
907         frameCEOrg->SetEditorMode(FALSE, CE_HOME);
908         frameCEOrg->SetupPointers(&ContactEditorData.HomeOrganisationsList,
909                 &ContactEditorData.HomeOrganisationsListLanguage,
910                 &ContactEditorData.HomeOrganisationsListSortAs,
911                 &ContactEditorData.HomeOrganisationsListAltID,
912                 &ContactEditorData.HomeOrganisationsListPID,
913                 &ContactEditorData.HomeOrganisationsListType,
914                 &ContactEditorData.HomeOrganisationsListTokens,
915                 &ContactEditorData.HomeOrganisationsListPref,
916                 lboHomeOrganisations,
917                 (intValueSeek));
918         frameCEOrg->ShowModal();
919         delete frameCEOrg;
920         frameCEOrg = NULL;
921         
924 void frmContactEditor::ModifyHomeOrganisation( wxCommandEvent& event )
926         
927         // Bring up window to modify organisation.
928         
929         long longSelected = -1;
930         int intSelectedData = 0;
931     
932         if (lboHomeOrganisations->GetItemCount() == 0 || !GetSelectedItem(lboHomeOrganisations,
933                 &longSelected,
934                 &intSelectedData)){
935                 return;
936         }
937     
938         frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
939         frameCEOrg->SetupPointers(&ContactEditorData.HomeOrganisationsList,
940                 &ContactEditorData.HomeOrganisationsListLanguage,
941                 &ContactEditorData.HomeOrganisationsListSortAs,
942                 &ContactEditorData.HomeOrganisationsListAltID,
943                 &ContactEditorData.HomeOrganisationsListPID,
944                 &ContactEditorData.HomeOrganisationsListType,
945                 &ContactEditorData.HomeOrganisationsListTokens,
946                 &ContactEditorData.HomeOrganisationsListPref,
947                 lboHomeOrganisations,
948                 intSelectedData);
949         frameCEOrg->SetEditorMode(TRUE, CE_HOME);
950         frameCEOrg->ShowModal();
951         delete frameCEOrg;
952         frameCEOrg = NULL;
953         
956 void frmContactEditor::DeleteHomeOrganisation( wxCommandEvent& event )
958         
959         // Bring up window to delete organisation.
960         
961         long longSelected = -1;
962         int intSelectedData = 0;
963     
964         if (lboHomeOrganisations->GetItemCount() == 0 ||!GetSelectedItem(lboHomeOrganisations,
965                 &longSelected,
966                 &intSelectedData)){
967                 return;
968         }
969     
970         lboHomeOrganisations->DeleteItem(longSelected);
972         DeleteMapData(intSelectedData, &ContactEditorData.HomeOrganisationsList,
973                 &ContactEditorData.HomeOrganisationsListLanguage, &ContactEditorData.HomeOrganisationsListSortAs,
974                 &ContactEditorData.HomeOrganisationsListAltID, &ContactEditorData.HomeOrganisationsListPID,
975                 &ContactEditorData.HomeOrganisationsListType, &ContactEditorData.HomeOrganisationsListTokens,
976                 &ContactEditorData.HomeOrganisationsListPref);
977     
980 void frmContactEditor::AddHomeNote( wxCommandEvent& event )
982         
983         // Bring up window to add note.
984         
985         frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
986         frameCENote->SetEditorMode(FALSE, CE_HOME);
987         frameCENote->SetupPointers(&ContactEditorData.HomeNoteList,
988                 &ContactEditorData.HomeNoteListLanguage,
989                 &ContactEditorData.HomeNoteListAltID,
990                 &ContactEditorData.HomeNoteListPID,
991                 &ContactEditorData.HomeNoteListType,
992                 &ContactEditorData.HomeNoteListTokens,
993                 &ContactEditorData.HomeNoteListPref,
994                 lboHomeNotes,
995                 (intValueSeek));
996         frameCENote->ShowModal();
997         delete frameCENote;
998         frameCENote = NULL;
999         
1002 void frmContactEditor::ModifyHomeNote( wxCommandEvent& event )
1004         
1005         // Bring up window to modify note.
1006         
1007         long longSelected = -1;
1008         int intSelectedData = 0;
1009     
1010         if (lboHomeNotes->GetItemCount() == 0 || !GetSelectedItem(lboHomeNotes,
1011                 &longSelected,
1012                 &intSelectedData)){
1013                 return;
1014         }
1015     
1016         frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
1017         frameCENote->SetupPointers(&ContactEditorData.HomeNoteList,
1018                 &ContactEditorData.HomeNoteListLanguage,
1019                 &ContactEditorData.HomeNoteListAltID,
1020                 &ContactEditorData.HomeNoteListPID,
1021                 &ContactEditorData.HomeNoteListType,
1022                 &ContactEditorData.HomeNoteListTokens,
1023                 &ContactEditorData.HomeNoteListPref,
1024                 lboHomeNotes,
1025                 intSelectedData);
1026         frameCENote->SetEditorMode(TRUE, CE_HOME);
1027         frameCENote->ShowModal();
1028         delete frameCENote;
1029         frameCENote = NULL;
1030         
1033 void frmContactEditor::DeleteHomeNote( wxCommandEvent& event )
1035         
1036         // Bring up window to delete note.
1037         
1038         long longSelected = -1;
1039         int intSelectedData = 0;
1040     
1041         if (lboHomeNotes->GetItemCount() == 0 || !GetSelectedItem(lboHomeNotes,
1042                 &longSelected,
1043                 &intSelectedData)){
1044                 return;
1045         }
1046     
1047         lboHomeNotes->DeleteItem(longSelected);
1048     
1049         DeleteMapData(intSelectedData, &ContactEditorData.HomeNoteList,
1050                 &ContactEditorData.HomeNoteListLanguage, &ContactEditorData.HomeNoteListAltID,
1051                 &ContactEditorData.HomeNoteListPID, &ContactEditorData.HomeNoteListType,
1052                 &ContactEditorData.HomeNoteListTokens, &ContactEditorData.HomeNoteListPref);
1053     
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