Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Indented code properly 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         int intResult = 0;
40     
41         frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
42         frameCENickname->SetEditorMode(FALSE, CE_GENERAL);
43         intResult = GetLastInt(&ContactEditorData.GeneralNicknamesList);
44         frameCENickname->SetupPointers(&ContactEditorData.GeneralNicknamesList,
45                 &ContactEditorData.GeneralNicknamesListAltID,
46                 &ContactEditorData.GeneralNicknamesListPID,
47                 &ContactEditorData.GeneralNicknamesListType,
48                 &ContactEditorData.GeneralNicknamesListLanguage,
49                 &ContactEditorData.GeneralNicknamesListTokens,
50                 &ContactEditorData.GeneralNicknamesListPref,
51                 lboNicknames,
52                 (intValueSeek));
53         frameCENickname->ShowModal();
54         delete frameCENickname;
55         frameCENickname = NULL;
56         
57 }
59 void frmContactEditor::ModifyGeneralNickname( wxCommandEvent& event )
60 {
61     
62         long longSelected = -1;
63         int intSelectedData = 0;
64     
65         if (!GetSelectedItem(lboNicknames,
66                 &longSelected,
67                 &intSelectedData)){
68                 return;
69         }
70     
71         frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
72         frameCENickname->SetupPointers(&ContactEditorData.GeneralNicknamesList,
73                 &ContactEditorData.GeneralNicknamesListAltID,
74                 &ContactEditorData.GeneralNicknamesListPID,
75                 &ContactEditorData.GeneralNicknamesListType,
76                 &ContactEditorData.GeneralNicknamesListLanguage,
77                 &ContactEditorData.GeneralNicknamesListTokens,
78                 &ContactEditorData.GeneralNicknamesListPref,
79                 lboNicknames,
80                 intSelectedData);
81         frameCENickname->SetEditorMode(TRUE, CE_GENERAL);
82         frameCENickname->ShowModal();
83         delete frameCENickname;
84         frameCENickname = NULL;
85     
86 }
88 void frmContactEditor::DeleteGeneralNickname( wxCommandEvent& event )
89 {
90     
91         long longSelected = -1;
92         int intSelectedData = 0;
93     
94         if (!GetSelectedItem(lboNicknames,
95                 &longSelected,
96                 &intSelectedData)){
97                 return;
98         }
99     
100         lboNicknames->DeleteItem(longSelected);
101     
102         DeleteMapData(intSelectedData,
103                 &ContactEditorData.GeneralNicknamesList,
104                 &ContactEditorData.GeneralNicknamesListLanguage,
105                 &ContactEditorData.GeneralNicknamesListAltID,
106                 &ContactEditorData.GeneralNicknamesListPID,
107                 &ContactEditorData.GeneralNicknamesListTokens,
108                 &ContactEditorData.GeneralNicknamesListType,
109                 &ContactEditorData.GeneralNicknamesListPref);
110     
113 void frmContactEditor::AddGeneralAddress( wxCommandEvent& event )
115     
116         int intResult = 0;
117     
118         frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
119         frameCEAddress->SetEditorMode(FALSE, CE_GENERAL);
120         intResult = GetLastInt(&ContactEditorData.GeneralAddressList);
121         frameCEAddress->SetupPointers(&ContactEditorData.GeneralAddressList,
122                 &ContactEditorData.GeneralAddressListTown,
123                 &ContactEditorData.GeneralAddressListCounty,
124                 &ContactEditorData.GeneralAddressListPostCode,
125                 &ContactEditorData.GeneralAddressListCountry,
126                 &ContactEditorData.GeneralAddressListLabel,
127                 &ContactEditorData.GeneralAddressListLang,
128                 &ContactEditorData.GeneralAddressListAltID,
129                 &ContactEditorData.GeneralAddressListPID,
130                 &ContactEditorData.GeneralAddressListTokens,
131                 &ContactEditorData.GeneralAddressListGeo,
132                 &ContactEditorData.GeneralAddressListTimezone,
133                 &ContactEditorData.GeneralAddressListType,
134                 &ContactEditorData.GeneralAddressListMediatype,
135                 &ContactEditorData.GeneralAddressListPref,
136                 lboAddresses,
137                 (intValueSeek));
138         frameCEAddress->ShowModal();
139         delete frameCEAddress;
140         frameCEAddress = NULL;
141         
144 void frmContactEditor::ModifyGeneralAddress( wxCommandEvent& event )
146     
147         long longSelected = -1;
148         int intSelectedData = 0;
149     
150         if (!GetSelectedItem(lboAddresses,
151                 &longSelected,
152                 &intSelectedData)){
153         
154                 return;
155         
156         }
157     
158         if (longSelected == -1){
159         
160                 return;
161                 
162         }
163     
164         frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
165         frameCEAddress->SetupPointers(&ContactEditorData.GeneralAddressList,
166                 &ContactEditorData.GeneralAddressListTown,
167                 &ContactEditorData.GeneralAddressListCounty,
168                 &ContactEditorData.GeneralAddressListPostCode,
169                 &ContactEditorData.GeneralAddressListCountry,
170                 &ContactEditorData.GeneralAddressListLabel,
171                 &ContactEditorData.GeneralAddressListLang,
172                 &ContactEditorData.GeneralAddressListAltID,
173                 &ContactEditorData.GeneralAddressListPID,
174                 &ContactEditorData.GeneralAddressListTokens,
175                 &ContactEditorData.GeneralAddressListGeo,
176                 &ContactEditorData.GeneralAddressListTimezone,
177                 &ContactEditorData.GeneralAddressListType,
178                 &ContactEditorData.GeneralAddressListMediatype,
179                 &ContactEditorData.GeneralAddressListPref,
180                 lboAddresses,
181                 intSelectedData);
182         frameCEAddress->SetEditorMode(TRUE, CE_GENERAL);
183         frameCEAddress->ShowModal();
184         delete frameCEAddress;
185         frameCEAddress = NULL;
186     
189 void frmContactEditor::DeleteGeneralAddress( wxCommandEvent& event )
191     
192         long longSelected = -1;
193         int intSelectedData = 0;
194     
195         if (!GetSelectedItem(lboAddresses,
196                 &longSelected,
197                 &intSelectedData)){
198         
199                 return;
200                 
201         }
202     
203         lboAddresses->DeleteItem(longSelected);
204     
205         DeleteMapData(intSelectedData, &ContactEditorData.GeneralAddressList,
206                 &ContactEditorData.GeneralAddressListTown, &ContactEditorData.GeneralAddressListCounty,
207                 &ContactEditorData.GeneralAddressListPostCode, &ContactEditorData.GeneralAddressListCountry,
208                 &ContactEditorData.GeneralAddressList, &ContactEditorData.GeneralAddressListLabel,
209                 &ContactEditorData.GeneralAddressListLang, &ContactEditorData.GeneralAddressListAltID,
210                 &ContactEditorData.GeneralAddressListPID, &ContactEditorData.GeneralAddressListTokens,
211                 &ContactEditorData.GeneralAddressListGeo, &ContactEditorData.GeneralAddressListTimezone,
212                 &ContactEditorData.GeneralAddressListType, &ContactEditorData.GeneralAddressListMediatype,
213                 &ContactEditorData.GeneralAddressListPref);
214     
217 void frmContactEditor::AddGeneralEmail( wxCommandEvent& event )
220         int intResult = 0;
221     
222         frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
223         frameCEEmail->SetEditorMode(FALSE, CE_GENERAL);
224         intResult = GetLastInt(&ContactEditorData.GeneralAddressList);
225         frameCEEmail->SetupPointers(&ContactEditorData.GeneralEmailList,
226                 &ContactEditorData.GeneralEmailListAltID,
227                 &ContactEditorData.GeneralEmailListPID,
228                 &ContactEditorData.GeneralEmailListType,
229                 &ContactEditorData.GeneralEmailListTokens,
230                 &ContactEditorData.GeneralEmailListPref,
231                 lboEmails,
232                 (intValueSeek));
233         frameCEEmail->ShowModal();
234         delete frameCEEmail;
235         frameCEEmail = NULL;
236         
239 void frmContactEditor::ModifyGeneralEmail( wxCommandEvent& event )
242         long longSelected = -1;
243         int intSelectedData = 0;
244     
245         if (!GetSelectedItem(lboEmails,
246                 &longSelected,
247                 &intSelectedData)){
248         
249                 return;
250                 
251         }
252     
253         frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
254         frameCEEmail->SetupPointers(&ContactEditorData.GeneralEmailList,
255                 &ContactEditorData.GeneralEmailListAltID,
256                 &ContactEditorData.GeneralEmailListPID,
257                 &ContactEditorData.GeneralEmailListType,
258                 &ContactEditorData.GeneralEmailListTokens,
259                 &ContactEditorData.GeneralEmailListPref,
260                 lboEmails,
261                 intSelectedData);
262         frameCEEmail->SetEditorMode(TRUE, CE_GENERAL);
263         frameCEEmail->ShowModal();
264         delete frameCEEmail;
265         frameCEEmail = NULL;
266         
269 void frmContactEditor::DeleteGeneralEmail( wxCommandEvent& event )
272         long longSelected = -1;
273         int intSelectedData = 0;
274     
275         if (!GetSelectedItem(lboEmails,
276                 &longSelected,
277                 &intSelectedData)){
278         
279                 return;
280         
281         }
282     
283         lboEmails->DeleteItem(longSelected);
284     
285         DeleteMapData(intSelectedData, &ContactEditorData.GeneralEmailList,
286                 &ContactEditorData.GeneralEmailListAltID, &ContactEditorData.GeneralEmailListPID,
287                 &ContactEditorData.GeneralEmailListType, &ContactEditorData.GeneralEmailListTokens,
288                 &ContactEditorData.GeneralEmailListPref);
292 void frmContactEditor::AddGeneralIM( wxCommandEvent& event )
295         int intResult = 0;
296     
297         frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
298         frameCEIM->SetEditorMode(FALSE, CE_GENERAL);
299         intResult = GetLastInt(&ContactEditorData.GeneralIMList);
300         frameCEIM->SetupPointers(&ContactEditorData.GeneralIMList,
301                 &ContactEditorData.GeneralIMListAltID,
302                 &ContactEditorData.GeneralIMListPID,
303                 &ContactEditorData.GeneralIMListType,
304                 &ContactEditorData.GeneralIMListTypeInfo,
305                 &ContactEditorData.GeneralIMListTokens,
306                 &ContactEditorData.GeneralIMListMediatype,
307                 &ContactEditorData.GeneralIMListPref,
308                 lboIM,
309                 (intValueSeek));
310         frameCEIM->ShowModal();
311         delete frameCEIM;
312         frameCEIM = NULL;
313         
316 void frmContactEditor::ModifyGeneralIM( wxCommandEvent& event )
319         long longSelected = -1;
320         int intSelectedData = 0;
321     
322         if (!GetSelectedItem(lboIM,
323                 &longSelected,
324                 &intSelectedData)){
325                 
326                 return;
327                 
328         }
330         frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
331         frameCEIM->SetupPointers(&ContactEditorData.GeneralIMList,
332                 &ContactEditorData.GeneralIMListAltID,
333                 &ContactEditorData.GeneralIMListPID,
334                 &ContactEditorData.GeneralIMListType,
335                 &ContactEditorData.GeneralIMListTypeInfo,
336                 &ContactEditorData.GeneralIMListTokens,
337                 &ContactEditorData.GeneralIMListMediatype,
338                 &ContactEditorData.GeneralIMListPref,
339                 lboIM,
340                 intSelectedData);
341         frameCEIM->SetEditorMode(TRUE, CE_GENERAL);
342         frameCEIM->ShowModal();
343         delete frameCEIM;
344         frameCEIM = NULL;
345         
348 void frmContactEditor::DeleteGeneralIM( wxCommandEvent& event )
351         long longSelected = -1;
352         int intSelectedData = 0;
353     
354         if (!GetSelectedItem(lboIM,
355                 &longSelected,
356                 &intSelectedData)){
357                 
358                 return;
359         }
360     
361         lboIM->DeleteItem(longSelected);
362     
363         DeleteMapData(intSelectedData, &ContactEditorData.GeneralIMList,
364                 &ContactEditorData.GeneralIMListAltID, &ContactEditorData.GeneralIMListPID,
365                 &ContactEditorData.GeneralIMListType, &ContactEditorData.GeneralIMListTypeInfo,
366                 &ContactEditorData.GeneralIMListTokens, &ContactEditorData.GeneralIMListMediatype, 
367                 &ContactEditorData.GeneralIMListPref);
368     
371 void frmContactEditor::AddGeneralTelephone( wxCommandEvent& event )
374         int intResult = 0;
375     
376         frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
377         frameCETel->SetEditorMode(FALSE, CE_GENERAL);
378         intResult = GetLastInt(&ContactEditorData.GeneralTelephoneList);
379         frameCETel->SetupPointers(&ContactEditorData.GeneralTelephoneList,
380                 &ContactEditorData.GeneralTelephoneListAltID,
381                 &ContactEditorData.GeneralTelephoneListPID,
382                 &ContactEditorData.GeneralTelephoneListType,
383                 &ContactEditorData.GeneralTelephoneListTypeInfo,
384                 &ContactEditorData.GeneralTelephoneListTokens,
385                 &ContactEditorData.GeneralTelephoneListPref,
386                 lboTelephone,
387                 (intValueSeek));
388         frameCETel->ShowModal();
389         delete frameCETel;
390         frameCETel = NULL;
391         
394 void frmContactEditor::ModifyGeneralTelephone( wxCommandEvent& event )
397         long longSelected = -1;
398         int intSelectedData = 0;
399     
400         if (!GetSelectedItem(lboTelephone,
401                 &longSelected,
402                 &intSelectedData)){
403                 
404                 return;
405                 
406         }
407     
408         frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
409         frameCETel->SetupPointers(&ContactEditorData.GeneralTelephoneList,
410                 &ContactEditorData.GeneralTelephoneListAltID,
411                 &ContactEditorData.GeneralTelephoneListPID,
412                 &ContactEditorData.GeneralTelephoneListType,
413                 &ContactEditorData.GeneralTelephoneListTypeInfo,
414                 &ContactEditorData.GeneralTelephoneListTokens,
415                 &ContactEditorData.GeneralTelephoneListPref,
416                 lboTelephone,
417                 intSelectedData);
418         frameCETel->SetEditorMode(TRUE, CE_GENERAL);
419         frameCETel->ShowModal();
420         delete frameCETel;
421         frameCETel = NULL;
422         
425 void frmContactEditor::DeleteGeneralTelephone( wxCommandEvent& event )
428         long longSelected = -1;
429         int intSelectedData = 0;
430     
431         if (!GetSelectedItem(lboTelephone,
432                 &longSelected,
433                 &intSelectedData)){
434                 
435                 return;
436         
437         }
438     
439         lboTelephone->DeleteItem(longSelected);
440     
441         DeleteMapData(intSelectedData, &ContactEditorData.GeneralTelephoneList,
442                 &ContactEditorData.GeneralTelephoneListAltID, &ContactEditorData.GeneralTelephoneListPID,
443                 &ContactEditorData.GeneralTelephoneListType, &ContactEditorData.GeneralTelephoneListTypeInfo,
444                 &ContactEditorData.GeneralTelephoneListTokens, &ContactEditorData.GeneralTelephoneListPref);
445     
448 void frmContactEditor::AddGeneralLanguages( wxCommandEvent& event )
451         int intResult = 0;
452     
453         frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
454         frameCELang->SetEditorMode(FALSE, CE_GENERAL);
455         intResult = GetLastInt(&ContactEditorData.GeneralLanguageList);
456         frameCELang->SetupPointers(&ContactEditorData.GeneralLanguageList,
457                 &ContactEditorData.GeneralLanguageListAltID,
458                 &ContactEditorData.GeneralLanguageListPID,
459                 &ContactEditorData.GeneralLanguageListType,
460                 &ContactEditorData.GeneralLanguageListTokens,
461                 &ContactEditorData.GeneralLanguageListPref,
462                 lboLanguages,
463                 (intValueSeek));
464         frameCELang->ShowModal();
465         delete frameCELang;
466         frameCELang = NULL;
467         
470 void frmContactEditor::ModifyGeneralLanguages( wxCommandEvent& event )
473         long longSelected = -1;
474         int intSelectedData = 0;
475     
476         if (!GetSelectedItem(lboLanguages,
477                 &longSelected,
478                 &intSelectedData)){
479         
480                 return;
481                 
482         }
483     
484         frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
485         frameCELang->SetupPointers(&ContactEditorData.GeneralLanguageList,
486                 &ContactEditorData.GeneralLanguageListAltID,
487                 &ContactEditorData.GeneralLanguageListPID,
488                 &ContactEditorData.GeneralLanguageListType,
489                 &ContactEditorData.GeneralLanguageListTokens,
490                 &ContactEditorData.GeneralLanguageListPref,
491                 lboLanguages,
492                 intSelectedData);
493         frameCELang->SetEditorMode(TRUE, CE_GENERAL);
494         frameCELang->ShowModal();
495         delete frameCELang;
496         frameCELang = NULL;
497         
500 void frmContactEditor::DeleteGeneralLanguage( wxCommandEvent& event )
503         long longSelected = -1;
504         int intSelectedData = 0;
505     
506         if (!GetSelectedItem(lboLanguages,
507                 &longSelected,
508                 &intSelectedData)){
509                 
510                 return;
511         }
512     
513         lboLanguages->DeleteItem(longSelected);
514     
515         DeleteMapData(intSelectedData, &ContactEditorData.GeneralLanguageList,
516                 &ContactEditorData.GeneralLanguageListAltID, &ContactEditorData.GeneralLanguageListPID,
517                 &ContactEditorData.GeneralLanguageListType, &ContactEditorData.GeneralLanguageListTokens,
518                 &ContactEditorData.GeneralLanguageListPref);
519     
522 void frmContactEditor::AddGeneralTimezone( wxCommandEvent& event )
525         int intResult = 0;
526     
527         frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
528         frameCETZ->SetEditorMode(FALSE, CE_GENERAL);
529         intResult = GetLastInt(&ContactEditorData.GeneralTZList);
530         frameCETZ->SetupPointers(&ContactEditorData.GeneralTZList,
531                 &ContactEditorData.GeneralTZListAltID,
532                 &ContactEditorData.GeneralTZListPID,
533                 &ContactEditorData.GeneralTZListType,
534                 &ContactEditorData.GeneralTZListTokens,
535                 &ContactEditorData.GeneralTZListMediatype,
536                 &ContactEditorData.GeneralTZListPref,
537                 lboTimezones,
538                 (intValueSeek));
539         frameCETZ->ShowModal();
540         delete frameCETZ;
541         frameCETZ = NULL;
542         
545 void frmContactEditor::ModifyGeneralTimezone( wxCommandEvent& event )
548         long longSelected = -1;
549         int intSelectedData = 0;
550     
551         if (!GetSelectedItem(lboTimezones,
552                 &longSelected,
553                 &intSelectedData)){
554                 
555                 return;
556         }
557     
558         frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
559         frameCETZ->SetupPointers(&ContactEditorData.GeneralTZList,
560                 &ContactEditorData.GeneralTZListAltID,
561                 &ContactEditorData.GeneralTZListPID,
562                 &ContactEditorData.GeneralTZListType,
563                 &ContactEditorData.GeneralTZListTokens,
564                 &ContactEditorData.GeneralTZListMediatype,
565                 &ContactEditorData.GeneralTZListPref,
566                 lboTimezones,
567                 intSelectedData);
568         frameCETZ->SetEditorMode(TRUE, CE_GENERAL);
569         frameCETZ->ShowModal();
570         delete frameCETZ;
571         frameCETZ = NULL;
572         
575 void frmContactEditor::DeleteGeneralTimezone( wxCommandEvent& event )
578         long longSelected = -1;
579         int intSelectedData = 0;
580     
581         if (!GetSelectedItem(lboTimezones,
582                 &longSelected,
583                 &intSelectedData)){
584                 
585                 return;
586                 
587         }
588     
589         lboTimezones->DeleteItem(longSelected);
590     
591         DeleteMapData(intSelectedData, &ContactEditorData.GeneralTZList,
592                 &ContactEditorData.GeneralTZListAltID, &ContactEditorData.GeneralTZListPID,
593                 &ContactEditorData.GeneralTZListType, &ContactEditorData.GeneralTZListTokens,
594                 &ContactEditorData.GeneralTZListMediatype, &ContactEditorData.GeneralTZListPref);
595     
598 void frmContactEditor::AddGeneralGeoposition( wxCommandEvent& event )
601         int intResult = 0;
602     
603         frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
604         frameCEGeo->SetEditorMode(FALSE, CE_GENERAL);
605         intResult = GetLastInt(&ContactEditorData.GeneralGeographyList);
606         frameCEGeo->SetupPointers(&ContactEditorData.GeneralGeographyList,
607                 &ContactEditorData.GeneralGeographyListAltID,
608                 &ContactEditorData.GeneralGeographyListPID,
609                 &ContactEditorData.GeneralGeographyListType,
610                 &ContactEditorData.GeneralGeographyListDataType,
611                 &ContactEditorData.GeneralGeographyListTokens,
612                 &ContactEditorData.GeneralGeographyListMediatype,
613                 &ContactEditorData.GeneralGeographyListPref,
614                 lboGeoposition,
615                 (intValueSeek));
616         frameCEGeo->ShowModal();
617         delete frameCEGeo;
618         frameCEGeo = NULL;
619         
622 void frmContactEditor::ModifyGeneralGeoposition( wxCommandEvent& event )
625         long longSelected = -1;
626         int intSelectedData = 0;
627     
628         if (!GetSelectedItem(lboGeoposition,
629                 &longSelected,
630                 &intSelectedData)){
631                 
632                 return;
633                 
634         }
635     
636         frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
637         frameCEGeo->SetupPointers(&ContactEditorData.GeneralGeographyList,
638                 &ContactEditorData.GeneralGeographyListAltID,
639                 &ContactEditorData.GeneralGeographyListPID,
640                 &ContactEditorData.GeneralGeographyListType,
641                 &ContactEditorData.GeneralGeographyListDataType,
642                 &ContactEditorData.GeneralGeographyListTokens,
643                 &ContactEditorData.GeneralGeographyListMediatype,
644                 &ContactEditorData.GeneralGeographyListPref,
645                 lboGeoposition,
646                 intSelectedData);
647                 
648         frameCEGeo->SetEditorMode(TRUE, CE_GENERAL);
649         frameCEGeo->ShowModal();
650         delete frameCEGeo;
651         frameCEGeo = NULL;
652         
655 void frmContactEditor::DeleteGeneralGeoposition( wxCommandEvent& event )
658         long longSelected = -1;
659         int intSelectedData = 0;
660     
661         if (!GetSelectedItem(lboGeoposition,
662                 &longSelected,
663                 &intSelectedData)){
664                 
665                 return;
666                 
667         }
668     
669         lboGeoposition->DeleteItem(longSelected);
670     
671         DeleteMapData(intSelectedData, &ContactEditorData.GeneralGeographyList,
672                 &ContactEditorData.GeneralGeographyListAltID, &ContactEditorData.GeneralGeographyListPID,
673                 &ContactEditorData.GeneralGeographyListType, &ContactEditorData.GeneralGeographyListDataType,
674                 &ContactEditorData.GeneralGeographyListTokens, &ContactEditorData.GeneralGeographyListMediatype, 
675                 &ContactEditorData.GeneralGeographyListPref);
676     
679 void frmContactEditor::AddGeneralRelated( wxCommandEvent& event )
682         int intResult = 0;
683     
684         frmContactEditorRelated *frameCERel = new frmContactEditorRelated ( this );
685         frameCERel->SetEditorMode(FALSE, CE_GENERAL);
686         intResult = GetLastInt(&ContactEditorData.GeneralRelatedList);
687         frameCERel->SetupPointers(&ContactEditorData.GeneralRelatedList,
688                 &ContactEditorData.GeneralRelatedListRelType,
689                 &ContactEditorData.GeneralRelatedListAltID,
690                 &ContactEditorData.GeneralRelatedListPID,
691                 &ContactEditorData.GeneralRelatedListType,
692                 &ContactEditorData.GeneralRelatedListTokens,
693                 &ContactEditorData.GeneralRelatedListPref,
694                 lboRelated,
695                 (intValueSeek));
696         frameCERel->ShowModal();
697         delete frameCERel;
698         frameCERel = NULL;
699         
702 void frmContactEditor::ModifyGeneralRelated( wxCommandEvent& event )
705         long longSelected = -1;
706         int intSelectedData = 0;
707     
708         if (!GetSelectedItem(lboRelated,
709                 &longSelected,
710                 &intSelectedData)){
711                 
712                 return;
713                 
714         }
715     
716         frmContactEditorRelated *frameCERel = new frmContactEditorRelated ( this );
717         frameCERel->SetupPointers(&ContactEditorData.GeneralRelatedList,
718                 &ContactEditorData.GeneralRelatedListRelType,
719                 &ContactEditorData.GeneralRelatedListAltID,
720                 &ContactEditorData.GeneralRelatedListPID,
721                 &ContactEditorData.GeneralRelatedListType,
722                 &ContactEditorData.GeneralRelatedListTokens,
723                 &ContactEditorData.GeneralRelatedListPref,
724                 lboRelated,
725                 intSelectedData);
726         frameCERel->SetEditorMode(TRUE, CE_GENERAL);
727         frameCERel->ShowModal();
728         delete frameCERel;
729         frameCERel = NULL;
730         
733 void frmContactEditor::DeleteGeneralRelated( wxCommandEvent& event )
736         long longSelected = -1;
737         int intSelectedData = 0;
738     
739         if (!GetSelectedItem(lboRelated,
740                 &longSelected,
741                 &intSelectedData)){
742                 
743                 return;
744                 
745         }
746     
747         lboRelated->DeleteItem(longSelected);
748     
749         DeleteMapData(intSelectedData, &ContactEditorData.GeneralRelatedList,
750                 &ContactEditorData.GeneralRelatedListRelType, &ContactEditorData.GeneralRelatedListAltID,
751                 &ContactEditorData.GeneralRelatedListPID, &ContactEditorData.GeneralRelatedListType,
752                 &ContactEditorData.GeneralRelatedListTokens, &ContactEditorData.GeneralRelatedListPref);
753     
756 void frmContactEditor::AddGeneralWebsite( wxCommandEvent& event )
759         int intResult = 0;
760     
761         frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
762         frameCEWeb->SetEditorMode(FALSE, CE_GENERAL);
763         intResult = GetLastInt(&ContactEditorData.GeneralWebsiteList);
764         frameCEWeb->SetupPointers(&ContactEditorData.GeneralWebsiteList,
765                 &ContactEditorData.GeneralWebsiteListAltID,
766                 &ContactEditorData.GeneralWebsiteListPID,
767                 &ContactEditorData.GeneralWebsiteListType,
768                 &ContactEditorData.GeneralWebsiteListTokens,
769                 &ContactEditorData.GeneralWebsiteListMediatype,
770                 &ContactEditorData.GeneralWebsiteListPref,
771                 lboWebsites,
772                 (intValueSeek));
773         frameCEWeb->ShowModal();
774         delete frameCEWeb;
775         frameCEWeb = NULL;
776         
779 void frmContactEditor::ModifyGeneralWebsite( wxCommandEvent& event )
781     
782         long longSelected = -1;
783         int intSelectedData = 0;
784     
785         if (!GetSelectedItem(lboWebsites,
786                 &longSelected,
787                 &intSelectedData)){
788                 
789                 return;
790                 
791         }
792     
793         frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
794         frameCEWeb->SetupPointers(&ContactEditorData.GeneralWebsiteList,
795                 &ContactEditorData.GeneralWebsiteListAltID,
796                 &ContactEditorData.GeneralWebsiteListPID,
797                 &ContactEditorData.GeneralWebsiteListType,
798                 &ContactEditorData.GeneralWebsiteListTokens,
799                 &ContactEditorData.GeneralWebsiteListMediatype,
800                 &ContactEditorData.GeneralWebsiteListPref,
801                 lboWebsites,
802                 intSelectedData);
803         frameCEWeb->SetEditorMode(TRUE, CE_GENERAL);
804         frameCEWeb->ShowModal();
805         delete frameCEWeb;
806         frameCEWeb = NULL;
807         
810 void frmContactEditor::DeleteGeneralWebsite( wxCommandEvent& event )
813         long longSelected = -1;
814         int intSelectedData = 0;
815     
816         if (!GetSelectedItem(lboWebsites,
817                 &longSelected,
818                 &intSelectedData)){
819                 
820                 return;
821                 
822         }
823     
824         lboWebsites->DeleteItem(longSelected);
825     
826         DeleteMapData(intSelectedData, &ContactEditorData.GeneralWebsiteList,
827                 &ContactEditorData.GeneralWebsiteListAltID, &ContactEditorData.GeneralWebsiteListPID,
828                 &ContactEditorData.GeneralWebsiteListType, &ContactEditorData.GeneralWebsiteListTokens,
829                 &ContactEditorData.GeneralWebsiteListMediatype, &ContactEditorData.GeneralWebsiteListPref);
830     
833 void frmContactEditor::AddGeneralTitle( wxCommandEvent& event )
836         int intResult = 0;
837     
838         frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
839         frameCETitle->SetEditorMode(FALSE, CE_GENERAL);
840         intResult = GetLastInt(&ContactEditorData.GeneralTitleList);
841         frameCETitle->SetupPointers(&ContactEditorData.GeneralTitleList,
842                 &ContactEditorData.GeneralTitleListLanguage,
843                 &ContactEditorData.GeneralTitleListAltID,
844                 &ContactEditorData.GeneralTitleListPID,
845                 &ContactEditorData.GeneralTitleListType,
846                 &ContactEditorData.GeneralTitleListTokens,
847                 &ContactEditorData.GeneralTitleListPref,
848                 lboTitles,
849                 (intValueSeek));
850         frameCETitle->ShowModal();
851         delete frameCETitle;
852         frameCETitle = NULL;
853         
856 void frmContactEditor::ModifyGeneralTitle( wxCommandEvent& event )
859         long longSelected = -1;
860         int intSelectedData = 0;
861     
862         if (!GetSelectedItem(lboTitles,
863                 &longSelected,
864                 &intSelectedData)){
865                 
866                 return;
867                 
868         }
869     
870         frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
871         frameCETitle->SetupPointers(&ContactEditorData.GeneralTitleList,
872                 &ContactEditorData.GeneralTitleListLanguage,
873                 &ContactEditorData.GeneralTitleListAltID,
874                 &ContactEditorData.GeneralTitleListPID,
875                 &ContactEditorData.GeneralTitleListType,
876                 &ContactEditorData.GeneralTitleListTokens,
877                 &ContactEditorData.GeneralTitleListPref,
878                 lboTitles,
879                 intSelectedData);
880         frameCETitle->SetEditorMode(TRUE, CE_GENERAL);
881         frameCETitle->ShowModal();
882         delete frameCETitle;
883         frameCETitle = NULL;
884         
887 void frmContactEditor::DeleteGeneralTitle( wxCommandEvent& event )
890         long longSelected = -1;
891         int intSelectedData = 0;
892     
893         if (!GetSelectedItem(lboTitles,
894                 &longSelected,
895                 &intSelectedData)){
896                 
897                 return;
898                 
899         }
900     
901         lboTitles->DeleteItem(longSelected);
902     
903         DeleteMapData(intSelectedData, &ContactEditorData.GeneralTitleList,
904                 &ContactEditorData.GeneralTitleListLanguage, &ContactEditorData.GeneralTitleListAltID,
905                 &ContactEditorData.GeneralTitleListPID, &ContactEditorData.GeneralTitleListType,
906                 &ContactEditorData.GeneralTitleListTokens, &ContactEditorData.GeneralTitleListPref);
907     
910 void frmContactEditor::AddGeneralRole( wxCommandEvent& event )
913         int intResult = 0;
914     
915         frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
916         frameCERole->SetEditorMode(FALSE, CE_GENERAL);
917         intResult = GetLastInt(&ContactEditorData.GeneralRoleList);
918         frameCERole->SetupPointers(&ContactEditorData.GeneralRoleList,
919                 &ContactEditorData.GeneralRoleListLanguage,
920                 &ContactEditorData.GeneralRoleListAltID,
921                 &ContactEditorData.GeneralRoleListPID,
922                 &ContactEditorData.GeneralRoleListType,
923                 &ContactEditorData.GeneralRoleListTokens,
924                 &ContactEditorData.GeneralRoleListPref,
925                 lboRoles,
926                 (intValueSeek));
927         frameCERole->ShowModal();
928         delete frameCERole;
929         frameCERole = NULL;
930         
933 void frmContactEditor::ModifyGeneralRole( wxCommandEvent& event )
936         long longSelected = -1;
937         int intSelectedData = 0;
938     
939         if (!GetSelectedItem(lboRoles,
940                 &longSelected,
941                 &intSelectedData)){
942                 
943                 return;
944                 
945         }
946     
947         frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
948         frameCERole->SetupPointers(&ContactEditorData.GeneralRoleList,
949                 &ContactEditorData.GeneralRoleListLanguage,
950                 &ContactEditorData.GeneralRoleListAltID,
951                 &ContactEditorData.GeneralRoleListPID,
952                 &ContactEditorData.GeneralRoleListType,
953                 &ContactEditorData.GeneralRoleListTokens,
954                 &ContactEditorData.GeneralRoleListPref,
955                 lboRoles,
956                 intSelectedData);
957         frameCERole->SetEditorMode(TRUE, CE_GENERAL);
958         frameCERole->ShowModal();
959         delete frameCERole;
960         frameCERole = NULL;
961         
964 void frmContactEditor::DeleteGeneralRole( wxCommandEvent& event )
967         long longSelected = -1;
968         int intSelectedData = 0;
969     
970         if (!GetSelectedItem(lboRoles,
971                 &longSelected,
972                 &intSelectedData)){
973                 
974                 return;
975                 
976         }
977     
978         lboRoles->DeleteItem(longSelected);
979     
980         DeleteMapData(intSelectedData, &ContactEditorData.GeneralRoleList,
981                 &ContactEditorData.GeneralRoleListLanguage, &ContactEditorData.GeneralRoleListAltID,
982                 &ContactEditorData.GeneralRoleListPID, &ContactEditorData.GeneralRoleListType,
983                 &ContactEditorData.GeneralRoleListTokens, &ContactEditorData.GeneralRoleListPref);
984     
987 void frmContactEditor::AddGeneralOrganisation( wxCommandEvent& event )
990         int intResult = 0;
991     
992         frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
993         frameCEOrg->SetEditorMode(FALSE, CE_GENERAL);
994         intResult = GetLastInt(&ContactEditorData.GeneralOrganisationsList);
995         frameCEOrg->SetupPointers(&ContactEditorData.GeneralOrganisationsList,
996                 &ContactEditorData.GeneralOrganisationsListLanguage,
997                 &ContactEditorData.GeneralOrganisationsListSortAs,
998                 &ContactEditorData.GeneralOrganisationsListAltID,
999                 &ContactEditorData.GeneralOrganisationsListPID,
1000                 &ContactEditorData.GeneralOrganisationsListType,
1001                 &ContactEditorData.GeneralOrganisationsListTokens,
1002                 &ContactEditorData.GeneralOrganisationsListPref,
1003                 lboOrganisations,
1004                 (intValueSeek));
1005         frameCEOrg->ShowModal();
1006         delete frameCEOrg;
1007         frameCEOrg = NULL;
1008         
1011 void frmContactEditor::ModifyGeneralOrganisation( wxCommandEvent& event )
1014         long longSelected = -1;
1015         int intSelectedData = 0;
1016     
1017         if (!GetSelectedItem(lboOrganisations,
1018                 &longSelected,
1019                 &intSelectedData)){
1020                 
1021                 return;
1022                 
1023         }
1024     
1025         frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
1026         frameCEOrg->SetupPointers(&ContactEditorData.GeneralOrganisationsList,
1027                 &ContactEditorData.GeneralOrganisationsListLanguage,
1028                 &ContactEditorData.GeneralOrganisationsListSortAs,
1029                 &ContactEditorData.GeneralOrganisationsListAltID,
1030                 &ContactEditorData.GeneralOrganisationsListPID,
1031                 &ContactEditorData.GeneralOrganisationsListType,
1032                 &ContactEditorData.GeneralOrganisationsListTokens,
1033                 &ContactEditorData.GeneralOrganisationsListPref,
1034                 lboOrganisations,
1035                 intSelectedData);
1036         frameCEOrg->SetEditorMode(TRUE, CE_GENERAL);
1037         frameCEOrg->ShowModal();
1038         delete frameCEOrg;
1039         frameCEOrg = NULL;
1040         
1043 void frmContactEditor::DeleteGeneralOrganisation( wxCommandEvent& event )
1046         long longSelected = -1;
1047         int intSelectedData = 0;
1048     
1049         if (!GetSelectedItem(lboOrganisations,
1050                 &longSelected,
1051                 &intSelectedData)){
1052                 
1053                 return;
1054         
1055         }
1056     
1057         lboOrganisations->DeleteItem(longSelected);
1058     
1059         DeleteMapData(intSelectedData, &ContactEditorData.GeneralOrganisationsList,
1060                 &ContactEditorData.GeneralOrganisationsListLanguage, &ContactEditorData.GeneralOrganisationsListSortAs,
1061                 &ContactEditorData.GeneralOrganisationsListAltID, &ContactEditorData.GeneralOrganisationsListPID,
1062                 &ContactEditorData.GeneralOrganisationsListType, &ContactEditorData.GeneralOrganisationsListTokens,
1063                 &ContactEditorData.GeneralOrganisationsListPref);
1064     
1067 void frmContactEditor::AddGeneralNote( wxCommandEvent& event )
1070         int intResult = 0;
1071     
1072         frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
1073         frameCENote->SetEditorMode(FALSE, CE_GENERAL);
1074         intResult = GetLastInt(&ContactEditorData.GeneralNoteList);
1075         frameCENote->SetupPointers(&ContactEditorData.GeneralNoteList,
1076                 &ContactEditorData.GeneralNoteListLanguage,
1077                 &ContactEditorData.GeneralNoteListAltID,
1078                 &ContactEditorData.GeneralNoteListPID,
1079                 &ContactEditorData.GeneralNoteListType,
1080                 &ContactEditorData.GeneralNoteListTokens,
1081                 &ContactEditorData.GeneralNoteListPref,
1082                 lboNotes,
1083                 (intValueSeek));
1084         frameCENote->ShowModal();
1085         delete frameCENote;
1086         frameCENote = NULL;
1087         
1090 void frmContactEditor::ModifyGeneralNote( wxCommandEvent& event )
1093         long longSelected = -1;
1094         int intSelectedData = 0;
1095     
1096         if (!GetSelectedItem(lboNotes,
1097                 &longSelected,
1098                 &intSelectedData)){
1099                 
1100                 return;
1101         
1102         }
1103     
1104         frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
1105         frameCENote->SetupPointers(&ContactEditorData.GeneralNoteList,
1106                 &ContactEditorData.GeneralNoteListLanguage,
1107                 &ContactEditorData.GeneralNoteListAltID,
1108                 &ContactEditorData.GeneralNoteListPID,
1109                 &ContactEditorData.GeneralNoteListType,
1110                 &ContactEditorData.GeneralNoteListTokens,
1111                 &ContactEditorData.GeneralNoteListPref,
1112                 lboNotes,
1113                 intSelectedData);
1114         frameCENote->SetEditorMode(TRUE, CE_GENERAL);
1115         frameCENote->ShowModal();
1116         delete frameCENote;
1117         frameCENote = NULL;
1118         
1121 void frmContactEditor::DeleteGeneralNote( wxCommandEvent& event )
1124         long longSelected = -1;
1125         int intSelectedData = 0;
1126     
1127         if (!GetSelectedItem(lboNotes,
1128                 &longSelected,
1129                 &intSelectedData)){
1130                 
1131                 return;
1132         }
1133     
1134         lboNotes->DeleteItem(longSelected);
1135     
1136         DeleteMapData(intSelectedData, &ContactEditorData.GeneralNoteList,
1137                 &ContactEditorData.GeneralNoteListLanguage, &ContactEditorData.GeneralNoteListAltID,
1138                 &ContactEditorData.GeneralNoteListPID, &ContactEditorData.GeneralNoteListType,
1139                 &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