Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
macOS: Added languages.cpp/.h to Xcode project.
[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         
56 }
58 void frmContactEditor::ModifyGeneralNickname( wxCommandEvent& event )
59 {
60     
61         // Bring up the window for modifying a nickname.
62     
63         long longSelected = -1;
64         int intSelectedData = 0;
65     
66         if (!GetSelectedItem(lboNicknames,
67                 &longSelected,
68                 &intSelectedData)){
69                 return;
70         }
71     
72         frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
73         frameCENickname->SetupPointers(&ContactEditorData.GeneralNicknamesList,
74                 &ContactEditorData.GeneralNicknamesListAltID,
75                 &ContactEditorData.GeneralNicknamesListPID,
76                 &ContactEditorData.GeneralNicknamesListType,
77                 &ContactEditorData.GeneralNicknamesListLanguage,
78                 &ContactEditorData.GeneralNicknamesListTokens,
79                 &ContactEditorData.GeneralNicknamesListPref,
80                 lboNicknames,
81                 intSelectedData);
82         frameCENickname->SetEditorMode(TRUE, CE_GENERAL);
83         frameCENickname->ShowModal();
84         delete frameCENickname;
85         frameCENickname = NULL;
86     
87 }
89 void frmContactEditor::DeleteGeneralNickname( wxCommandEvent& event )
90 {
91     
92         // Bring up the window for deleting a nickname.
93     
94         long longSelected = -1;
95         int intSelectedData = 0;
96     
97         if (!GetSelectedItem(lboNicknames,
98                 &longSelected,
99                 &intSelectedData)){
100                 return;
101         }
102     
103         lboNicknames->DeleteItem(longSelected);
104     
105         DeleteMapData(intSelectedData,
106                 &ContactEditorData.GeneralNicknamesList,
107                 &ContactEditorData.GeneralNicknamesListLanguage,
108                 &ContactEditorData.GeneralNicknamesListAltID,
109                 &ContactEditorData.GeneralNicknamesListPID,
110                 &ContactEditorData.GeneralNicknamesListTokens,
111                 &ContactEditorData.GeneralNicknamesListType,
112                 &ContactEditorData.GeneralNicknamesListPref);
113     
116 void frmContactEditor::AddGeneralAddress( wxCommandEvent& event )
118     
119         // Bring up the window for adding an address.
120     
121         frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
122         frameCEAddress->SetEditorMode(FALSE, CE_GENERAL);
123         frameCEAddress->SetupPointers(&ContactEditorData.GeneralAddressList,
124                 &ContactEditorData.GeneralAddressListTown,
125                 &ContactEditorData.GeneralAddressListCounty,
126                 &ContactEditorData.GeneralAddressListPostCode,
127                 &ContactEditorData.GeneralAddressListCountry,
128                 &ContactEditorData.GeneralAddressListLabel,
129                 &ContactEditorData.GeneralAddressListLang,
130                 &ContactEditorData.GeneralAddressListAltID,
131                 &ContactEditorData.GeneralAddressListPID,
132                 &ContactEditorData.GeneralAddressListTokens,
133                 &ContactEditorData.GeneralAddressListGeo,
134                 &ContactEditorData.GeneralAddressListTimezone,
135                 &ContactEditorData.GeneralAddressListType,
136                 &ContactEditorData.GeneralAddressListMediatype,
137                 &ContactEditorData.GeneralAddressListPref,
138                 lboAddresses,
139                 (intValueSeek));
140         frameCEAddress->ShowModal();
141         delete frameCEAddress;
142         frameCEAddress = NULL;
143         
146 void frmContactEditor::ModifyGeneralAddress( wxCommandEvent& event )
149         // Bring up the window for editing an address.
150     
151         long longSelected = -1;
152         int intSelectedData = 0;
153     
154         if (!GetSelectedItem(lboAddresses,
155                 &longSelected,
156                 &intSelectedData)){
157         
158                 return;
159         
160         }
161     
162         if (longSelected == -1){
163         
164                 return;
165                 
166         }
167     
168         frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
169         frameCEAddress->SetupPointers(&ContactEditorData.GeneralAddressList,
170                 &ContactEditorData.GeneralAddressListTown,
171                 &ContactEditorData.GeneralAddressListCounty,
172                 &ContactEditorData.GeneralAddressListPostCode,
173                 &ContactEditorData.GeneralAddressListCountry,
174                 &ContactEditorData.GeneralAddressListLabel,
175                 &ContactEditorData.GeneralAddressListLang,
176                 &ContactEditorData.GeneralAddressListAltID,
177                 &ContactEditorData.GeneralAddressListPID,
178                 &ContactEditorData.GeneralAddressListTokens,
179                 &ContactEditorData.GeneralAddressListGeo,
180                 &ContactEditorData.GeneralAddressListTimezone,
181                 &ContactEditorData.GeneralAddressListType,
182                 &ContactEditorData.GeneralAddressListMediatype,
183                 &ContactEditorData.GeneralAddressListPref,
184                 lboAddresses,
185                 intSelectedData);
186         frameCEAddress->SetEditorMode(TRUE, CE_GENERAL);
187         frameCEAddress->ShowModal();
188         delete frameCEAddress;
189         frameCEAddress = NULL;
190     
193 void frmContactEditor::DeleteGeneralAddress( wxCommandEvent& event )
195     
196         // Bring up the window for deleting a nickname.
197     
198         long longSelected = -1;
199         int intSelectedData = 0;
200     
201         if (!GetSelectedItem(lboAddresses,
202                 &longSelected,
203                 &intSelectedData)){
204         
205                 return;
206                 
207         }
208     
209         lboAddresses->DeleteItem(longSelected);
210     
211         DeleteMapData(intSelectedData, &ContactEditorData.GeneralAddressList,
212                 &ContactEditorData.GeneralAddressListTown, &ContactEditorData.GeneralAddressListCounty,
213                 &ContactEditorData.GeneralAddressListPostCode, &ContactEditorData.GeneralAddressListCountry,
214                 &ContactEditorData.GeneralAddressList, &ContactEditorData.GeneralAddressListLabel,
215                 &ContactEditorData.GeneralAddressListLang, &ContactEditorData.GeneralAddressListAltID,
216                 &ContactEditorData.GeneralAddressListPID, &ContactEditorData.GeneralAddressListTokens,
217                 &ContactEditorData.GeneralAddressListGeo, &ContactEditorData.GeneralAddressListTimezone,
218                 &ContactEditorData.GeneralAddressListType, &ContactEditorData.GeneralAddressListMediatype,
219                 &ContactEditorData.GeneralAddressListPref);
220     
223 void frmContactEditor::AddGeneralEmail( wxCommandEvent& event )
226         // Bring up the window for adding an email.
228         frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
229         frameCEEmail->SetEditorMode(FALSE, CE_GENERAL);
230         frameCEEmail->SetupPointers(&ContactEditorData.GeneralEmailList,
231                 &ContactEditorData.GeneralEmailListAltID,
232                 &ContactEditorData.GeneralEmailListPID,
233                 &ContactEditorData.GeneralEmailListType,
234                 &ContactEditorData.GeneralEmailListTokens,
235                 &ContactEditorData.GeneralEmailListPref,
236                 lboEmails,
237                 (intValueSeek));
238         frameCEEmail->ShowModal();
239         delete frameCEEmail;
240         frameCEEmail = NULL;
241         
244 void frmContactEditor::ModifyGeneralEmail( wxCommandEvent& event )
247         // Bring up the window for modifying an email.
249         long longSelected = -1;
250         int intSelectedData = 0;
251     
252         if (!GetSelectedItem(lboEmails,
253                 &longSelected,
254                 &intSelectedData)){
255         
256                 return;
257                 
258         }
259     
260         frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
261         frameCEEmail->SetupPointers(&ContactEditorData.GeneralEmailList,
262                 &ContactEditorData.GeneralEmailListAltID,
263                 &ContactEditorData.GeneralEmailListPID,
264                 &ContactEditorData.GeneralEmailListType,
265                 &ContactEditorData.GeneralEmailListTokens,
266                 &ContactEditorData.GeneralEmailListPref,
267                 lboEmails,
268                 intSelectedData);
269         frameCEEmail->SetEditorMode(TRUE, CE_GENERAL);
270         frameCEEmail->ShowModal();
271         delete frameCEEmail;
272         frameCEEmail = NULL;
273         
276 void frmContactEditor::DeleteGeneralEmail( wxCommandEvent& event )
279         // Bring up the window for deleting an email.
281         long longSelected = -1;
282         int intSelectedData = 0;
283     
284         if (!GetSelectedItem(lboEmails,
285                 &longSelected,
286                 &intSelectedData)){
287         
288                 return;
289         
290         }
291     
292         lboEmails->DeleteItem(longSelected);
293     
294         DeleteMapData(intSelectedData, &ContactEditorData.GeneralEmailList,
295                 &ContactEditorData.GeneralEmailListAltID, &ContactEditorData.GeneralEmailListPID,
296                 &ContactEditorData.GeneralEmailListType, &ContactEditorData.GeneralEmailListTokens,
297                 &ContactEditorData.GeneralEmailListPref);
301 void frmContactEditor::AddGeneralIM( wxCommandEvent& event )
304         // Bring up the window for adding a IM address.
305     
306         frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
307         frameCEIM->SetEditorMode(FALSE, CE_GENERAL);
308         frameCEIM->SetupPointers(&ContactEditorData.GeneralIMList,
309                 &ContactEditorData.GeneralIMListAltID,
310                 &ContactEditorData.GeneralIMListPID,
311                 &ContactEditorData.GeneralIMListType,
312                 &ContactEditorData.GeneralIMListTypeInfo,
313                 &ContactEditorData.GeneralIMListTokens,
314                 &ContactEditorData.GeneralIMListMediatype,
315                 &ContactEditorData.GeneralIMListPref,
316                 lboIM,
317                 (intValueSeek));
318         frameCEIM->ShowModal();
319         delete frameCEIM;
320         frameCEIM = NULL;
321         
324 void frmContactEditor::ModifyGeneralIM( wxCommandEvent& event )
327         // Bring up the window for editing a IM address.
329         long longSelected = -1;
330         int intSelectedData = 0;
331     
332         if (!GetSelectedItem(lboIM,
333                 &longSelected,
334                 &intSelectedData)){
335                 
336                 return;
337                 
338         }
340         frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
341         frameCEIM->SetupPointers(&ContactEditorData.GeneralIMList,
342                 &ContactEditorData.GeneralIMListAltID,
343                 &ContactEditorData.GeneralIMListPID,
344                 &ContactEditorData.GeneralIMListType,
345                 &ContactEditorData.GeneralIMListTypeInfo,
346                 &ContactEditorData.GeneralIMListTokens,
347                 &ContactEditorData.GeneralIMListMediatype,
348                 &ContactEditorData.GeneralIMListPref,
349                 lboIM,
350                 intSelectedData);
351         frameCEIM->SetEditorMode(TRUE, CE_GENERAL);
352         frameCEIM->ShowModal();
353         delete frameCEIM;
354         frameCEIM = NULL;
355         
358 void frmContactEditor::DeleteGeneralIM( wxCommandEvent& event )
361         // Bring up the window for deleting an IM address.
363         long longSelected = -1;
364         int intSelectedData = 0;
365     
366         if (!GetSelectedItem(lboIM,
367                 &longSelected,
368                 &intSelectedData)){
369                 
370                 return;
371         }
372     
373         lboIM->DeleteItem(longSelected);
374     
375         DeleteMapData(intSelectedData, &ContactEditorData.GeneralIMList,
376                 &ContactEditorData.GeneralIMListAltID, &ContactEditorData.GeneralIMListPID,
377                 &ContactEditorData.GeneralIMListType, &ContactEditorData.GeneralIMListTypeInfo,
378                 &ContactEditorData.GeneralIMListTokens, &ContactEditorData.GeneralIMListMediatype, 
379                 &ContactEditorData.GeneralIMListPref);
380     
383 void frmContactEditor::AddGeneralTelephone( wxCommandEvent& event )
386         // Bring up the window for adding a telephone.
387     
388         frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
389         frameCETel->SetEditorMode(FALSE, CE_GENERAL);
390         frameCETel->SetupPointers(&ContactEditorData.GeneralTelephoneList,
391                 &ContactEditorData.GeneralTelephoneListAltID,
392                 &ContactEditorData.GeneralTelephoneListPID,
393                 &ContactEditorData.GeneralTelephoneListType,
394                 &ContactEditorData.GeneralTelephoneListTypeInfo,
395                 &ContactEditorData.GeneralTelephoneListTokens,
396                 &ContactEditorData.GeneralTelephoneListPref,
397                 lboTelephone,
398                 (intValueSeek));
399         frameCETel->ShowModal();
400         delete frameCETel;
401         frameCETel = NULL;
402         
405 void frmContactEditor::ModifyGeneralTelephone( wxCommandEvent& event )
408         // Bring up the window for editing a telephone.
410         long longSelected = -1;
411         int intSelectedData = 0;
412     
413         if (!GetSelectedItem(lboTelephone,
414                 &longSelected,
415                 &intSelectedData)){
416                 
417                 return;
418                 
419         }
420     
421         frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
422         frameCETel->SetupPointers(&ContactEditorData.GeneralTelephoneList,
423                 &ContactEditorData.GeneralTelephoneListAltID,
424                 &ContactEditorData.GeneralTelephoneListPID,
425                 &ContactEditorData.GeneralTelephoneListType,
426                 &ContactEditorData.GeneralTelephoneListTypeInfo,
427                 &ContactEditorData.GeneralTelephoneListTokens,
428                 &ContactEditorData.GeneralTelephoneListPref,
429                 lboTelephone,
430                 intSelectedData);
431         frameCETel->SetEditorMode(TRUE, CE_GENERAL);
432         frameCETel->ShowModal();
433         delete frameCETel;
434         frameCETel = NULL;
435         
438 void frmContactEditor::DeleteGeneralTelephone( wxCommandEvent& event )
441         // Bring up the window for deleting a telephone.
443         long longSelected = -1;
444         int intSelectedData = 0;
445     
446         if (!GetSelectedItem(lboTelephone,
447                 &longSelected,
448                 &intSelectedData)){
449                 
450                 return;
451         
452         }
453     
454         lboTelephone->DeleteItem(longSelected);
455     
456         DeleteMapData(intSelectedData, &ContactEditorData.GeneralTelephoneList,
457                 &ContactEditorData.GeneralTelephoneListAltID, &ContactEditorData.GeneralTelephoneListPID,
458                 &ContactEditorData.GeneralTelephoneListType, &ContactEditorData.GeneralTelephoneListTypeInfo,
459                 &ContactEditorData.GeneralTelephoneListTokens, &ContactEditorData.GeneralTelephoneListPref);
460     
463 void frmContactEditor::AddGeneralLanguages( wxCommandEvent& event )
466         // Bring up the window for adding a language.
467     
468         frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
469         frameCELang->SetEditorMode(FALSE, CE_GENERAL);
470         frameCELang->SetupPointers(&ContactEditorData.GeneralLanguageList,
471                 &ContactEditorData.GeneralLanguageListAltID,
472                 &ContactEditorData.GeneralLanguageListPID,
473                 &ContactEditorData.GeneralLanguageListType,
474                 &ContactEditorData.GeneralLanguageListTokens,
475                 &ContactEditorData.GeneralLanguageListPref,
476                 lboLanguages,
477                 (intValueSeek));
478         frameCELang->ShowModal();
479         delete frameCELang;
480         frameCELang = NULL;
481         
484 void frmContactEditor::ModifyGeneralLanguages( wxCommandEvent& event )
487         // Bring up the window for modifying a language.
489         long longSelected = -1;
490         int intSelectedData = 0;
491     
492         if (!GetSelectedItem(lboLanguages,
493                 &longSelected,
494                 &intSelectedData)){
495         
496                 return;
497                 
498         }
499     
500         frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
501         frameCELang->SetupPointers(&ContactEditorData.GeneralLanguageList,
502                 &ContactEditorData.GeneralLanguageListAltID,
503                 &ContactEditorData.GeneralLanguageListPID,
504                 &ContactEditorData.GeneralLanguageListType,
505                 &ContactEditorData.GeneralLanguageListTokens,
506                 &ContactEditorData.GeneralLanguageListPref,
507                 lboLanguages,
508                 intSelectedData);
509         frameCELang->SetEditorMode(TRUE, CE_GENERAL);
510         frameCELang->ShowModal();
511         delete frameCELang;
512         frameCELang = NULL;
513         
516 void frmContactEditor::DeleteGeneralLanguage( wxCommandEvent& event )
519         // Bring up the window for deleting a language.
521         long longSelected = -1;
522         int intSelectedData = 0;
523     
524         if (!GetSelectedItem(lboLanguages,
525                 &longSelected,
526                 &intSelectedData)){
527                 
528                 return;
529         }
530     
531         lboLanguages->DeleteItem(longSelected);
532     
533         DeleteMapData(intSelectedData, &ContactEditorData.GeneralLanguageList,
534                 &ContactEditorData.GeneralLanguageListAltID, &ContactEditorData.GeneralLanguageListPID,
535                 &ContactEditorData.GeneralLanguageListType, &ContactEditorData.GeneralLanguageListTokens,
536                 &ContactEditorData.GeneralLanguageListPref);
537     
540 void frmContactEditor::AddGeneralTimezone( wxCommandEvent& event )
543         // Bring up the window for adding a timezone.
544     
545         frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
546         frameCETZ->SetEditorMode(FALSE, CE_GENERAL);
547         frameCETZ->SetupPointers(&ContactEditorData.GeneralTZList,
548                 &ContactEditorData.GeneralTZListAltID,
549                 &ContactEditorData.GeneralTZListPID,
550                 &ContactEditorData.GeneralTZListType,
551                 &ContactEditorData.GeneralTZListTokens,
552                 &ContactEditorData.GeneralTZListMediatype,
553                 &ContactEditorData.GeneralTZListPref,
554                 lboTimezones,
555                 (intValueSeek));
556         frameCETZ->ShowModal();
557         delete frameCETZ;
558         frameCETZ = NULL;
559         
562 void frmContactEditor::ModifyGeneralTimezone( wxCommandEvent& event )
565         // Bring up a window for editing a timezone.
567         long longSelected = -1;
568         int intSelectedData = 0;
569     
570         if (!GetSelectedItem(lboTimezones,
571                 &longSelected,
572                 &intSelectedData)){
573                 
574                 return;
575         }
576     
577         frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
578         frameCETZ->SetupPointers(&ContactEditorData.GeneralTZList,
579                 &ContactEditorData.GeneralTZListAltID,
580                 &ContactEditorData.GeneralTZListPID,
581                 &ContactEditorData.GeneralTZListType,
582                 &ContactEditorData.GeneralTZListTokens,
583                 &ContactEditorData.GeneralTZListMediatype,
584                 &ContactEditorData.GeneralTZListPref,
585                 lboTimezones,
586                 intSelectedData);
587         frameCETZ->SetEditorMode(TRUE, CE_GENERAL);
588         frameCETZ->ShowModal();
589         delete frameCETZ;
590         frameCETZ = NULL;
591         
594 void frmContactEditor::DeleteGeneralTimezone( wxCommandEvent& event )
597         // Bring up the window for deleting a timezone.
599         long longSelected = -1;
600         int intSelectedData = 0;
601     
602         if (!GetSelectedItem(lboTimezones,
603                 &longSelected,
604                 &intSelectedData)){
605                 
606                 return;
607                 
608         }
609     
610         lboTimezones->DeleteItem(longSelected);
611     
612         DeleteMapData(intSelectedData, &ContactEditorData.GeneralTZList,
613                 &ContactEditorData.GeneralTZListAltID, &ContactEditorData.GeneralTZListPID,
614                 &ContactEditorData.GeneralTZListType, &ContactEditorData.GeneralTZListTokens,
615                 &ContactEditorData.GeneralTZListMediatype, &ContactEditorData.GeneralTZListPref);
616     
619 void frmContactEditor::AddGeneralGeoposition( wxCommandEvent& event )
622         // Bring up the window for adding a geoposition location.
623     
624         frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
625         frameCEGeo->SetEditorMode(FALSE, CE_GENERAL);
626         frameCEGeo->SetupPointers(&ContactEditorData.GeneralGeographyList,
627                 &ContactEditorData.GeneralGeographyListAltID,
628                 &ContactEditorData.GeneralGeographyListPID,
629                 &ContactEditorData.GeneralGeographyListType,
630                 &ContactEditorData.GeneralGeographyListDataType,
631                 &ContactEditorData.GeneralGeographyListTokens,
632                 &ContactEditorData.GeneralGeographyListMediatype,
633                 &ContactEditorData.GeneralGeographyListPref,
634                 lboGeoposition,
635                 (intValueSeek));
636         frameCEGeo->ShowModal();
637         delete frameCEGeo;
638         frameCEGeo = NULL;
639         
642 void frmContactEditor::ModifyGeneralGeoposition( wxCommandEvent& event )
645         // Bring up the window for editing a geoposition location.
647         long longSelected = -1;
648         int intSelectedData = 0;
649     
650         if (!GetSelectedItem(lboGeoposition,
651                 &longSelected,
652                 &intSelectedData)){
653                 
654                 return;
655                 
656         }
657     
658         frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
659         frameCEGeo->SetupPointers(&ContactEditorData.GeneralGeographyList,
660                 &ContactEditorData.GeneralGeographyListAltID,
661                 &ContactEditorData.GeneralGeographyListPID,
662                 &ContactEditorData.GeneralGeographyListType,
663                 &ContactEditorData.GeneralGeographyListDataType,
664                 &ContactEditorData.GeneralGeographyListTokens,
665                 &ContactEditorData.GeneralGeographyListMediatype,
666                 &ContactEditorData.GeneralGeographyListPref,
667                 lboGeoposition,
668                 intSelectedData);
669                 
670         frameCEGeo->SetEditorMode(TRUE, CE_GENERAL);
671         frameCEGeo->ShowModal();
672         delete frameCEGeo;
673         frameCEGeo = NULL;
674         
677 void frmContactEditor::DeleteGeneralGeoposition( wxCommandEvent& event )
680         // Bring up the window for deleting a geoposition location.
682         long longSelected = -1;
683         int intSelectedData = 0;
684     
685         if (!GetSelectedItem(lboGeoposition,
686                 &longSelected,
687                 &intSelectedData)){
688                 
689                 return;
690                 
691         }
692     
693         lboGeoposition->DeleteItem(longSelected);
694     
695         DeleteMapData(intSelectedData, &ContactEditorData.GeneralGeographyList,
696                 &ContactEditorData.GeneralGeographyListAltID, &ContactEditorData.GeneralGeographyListPID,
697                 &ContactEditorData.GeneralGeographyListType, &ContactEditorData.GeneralGeographyListDataType,
698                 &ContactEditorData.GeneralGeographyListTokens, &ContactEditorData.GeneralGeographyListMediatype, 
699                 &ContactEditorData.GeneralGeographyListPref);
700     
703 void frmContactEditor::AddGeneralRelated( wxCommandEvent& event )
706         // Bring up the window for adding a relation.
707     
708         frmContactEditorRelated *frameCERel = new frmContactEditorRelated ( this );
709         frameCERel->SetEditorMode(FALSE, CE_GENERAL);
710         frameCERel->SetupPointers(&ContactEditorData.GeneralRelatedList,
711                 &ContactEditorData.GeneralRelatedListRelType,
712                 &ContactEditorData.GeneralRelatedListAltID,
713                 &ContactEditorData.GeneralRelatedListPID,
714                 &ContactEditorData.GeneralRelatedListType,
715                 &ContactEditorData.GeneralRelatedListTokens,
716                 &ContactEditorData.GeneralRelatedListPref,
717                 lboRelated,
718                 (intValueSeek));
719         frameCERel->ShowModal();
720         delete frameCERel;
721         frameCERel = NULL;
722         
725 void frmContactEditor::ModifyGeneralRelated( wxCommandEvent& event )
728         // Bring up the window for editing a relation.
730         long longSelected = -1;
731         int intSelectedData = 0;
732     
733         if (!GetSelectedItem(lboRelated,
734                 &longSelected,
735                 &intSelectedData)){
736                 
737                 return;
738                 
739         }
740     
741         frmContactEditorRelated *frameCERel = new frmContactEditorRelated ( this );
742         frameCERel->SetupPointers(&ContactEditorData.GeneralRelatedList,
743                 &ContactEditorData.GeneralRelatedListRelType,
744                 &ContactEditorData.GeneralRelatedListAltID,
745                 &ContactEditorData.GeneralRelatedListPID,
746                 &ContactEditorData.GeneralRelatedListType,
747                 &ContactEditorData.GeneralRelatedListTokens,
748                 &ContactEditorData.GeneralRelatedListPref,
749                 lboRelated,
750                 intSelectedData);
751         frameCERel->SetEditorMode(TRUE, CE_GENERAL);
752         frameCERel->ShowModal();
753         delete frameCERel;
754         frameCERel = NULL;
755         
758 void frmContactEditor::DeleteGeneralRelated( wxCommandEvent& event )
761         // Bring up a window for deleting a relation.
763         long longSelected = -1;
764         int intSelectedData = 0;
765     
766         if (!GetSelectedItem(lboRelated,
767                 &longSelected,
768                 &intSelectedData)){
769                 
770                 return;
771                 
772         }
773     
774         lboRelated->DeleteItem(longSelected);
775     
776         DeleteMapData(intSelectedData, &ContactEditorData.GeneralRelatedList,
777                 &ContactEditorData.GeneralRelatedListRelType, &ContactEditorData.GeneralRelatedListAltID,
778                 &ContactEditorData.GeneralRelatedListPID, &ContactEditorData.GeneralRelatedListType,
779                 &ContactEditorData.GeneralRelatedListTokens, &ContactEditorData.GeneralRelatedListPref);
780     
783 void frmContactEditor::AddGeneralWebsite( wxCommandEvent& event )
786         // Bring up a window for adding a website.
787     
788         frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
789         frameCEWeb->SetEditorMode(FALSE, CE_GENERAL);
790         frameCEWeb->SetupPointers(&ContactEditorData.GeneralWebsiteList,
791                 &ContactEditorData.GeneralWebsiteListAltID,
792                 &ContactEditorData.GeneralWebsiteListPID,
793                 &ContactEditorData.GeneralWebsiteListType,
794                 &ContactEditorData.GeneralWebsiteListTokens,
795                 &ContactEditorData.GeneralWebsiteListMediatype,
796                 &ContactEditorData.GeneralWebsiteListPref,
797                 lboWebsites,
798                 (intValueSeek));
799         frameCEWeb->ShowModal();
800         delete frameCEWeb;
801         frameCEWeb = NULL;
802         
805 void frmContactEditor::ModifyGeneralWebsite( wxCommandEvent& event )
807     
808         // Bring up a window for editing a website.
809     
810         long longSelected = -1;
811         int intSelectedData = 0;
812     
813         if (!GetSelectedItem(lboWebsites,
814                 &longSelected,
815                 &intSelectedData)){
816                 
817                 return;
818                 
819         }
820     
821         frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
822         frameCEWeb->SetupPointers(&ContactEditorData.GeneralWebsiteList,
823                 &ContactEditorData.GeneralWebsiteListAltID,
824                 &ContactEditorData.GeneralWebsiteListPID,
825                 &ContactEditorData.GeneralWebsiteListType,
826                 &ContactEditorData.GeneralWebsiteListTokens,
827                 &ContactEditorData.GeneralWebsiteListMediatype,
828                 &ContactEditorData.GeneralWebsiteListPref,
829                 lboWebsites,
830                 intSelectedData);
831         frameCEWeb->SetEditorMode(TRUE, CE_GENERAL);
832         frameCEWeb->ShowModal();
833         delete frameCEWeb;
834         frameCEWeb = NULL;
835         
838 void frmContactEditor::DeleteGeneralWebsite( wxCommandEvent& event )
841         // Bring up a window for deleting a website.
843         long longSelected = -1;
844         int intSelectedData = 0;
845     
846         if (!GetSelectedItem(lboWebsites,
847                 &longSelected,
848                 &intSelectedData)){
849                 
850                 return;
851                 
852         }
853     
854         lboWebsites->DeleteItem(longSelected);
855     
856         DeleteMapData(intSelectedData, &ContactEditorData.GeneralWebsiteList,
857                 &ContactEditorData.GeneralWebsiteListAltID, &ContactEditorData.GeneralWebsiteListPID,
858                 &ContactEditorData.GeneralWebsiteListType, &ContactEditorData.GeneralWebsiteListTokens,
859                 &ContactEditorData.GeneralWebsiteListMediatype, &ContactEditorData.GeneralWebsiteListPref);
860     
863 void frmContactEditor::AddGeneralTitle( wxCommandEvent& event )
866         // Bring up the window for adding a title.
867     
868         frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
869         frameCETitle->SetEditorMode(FALSE, CE_GENERAL);
870         frameCETitle->SetupPointers(&ContactEditorData.GeneralTitleList,
871                 &ContactEditorData.GeneralTitleListLanguage,
872                 &ContactEditorData.GeneralTitleListAltID,
873                 &ContactEditorData.GeneralTitleListPID,
874                 &ContactEditorData.GeneralTitleListType,
875                 &ContactEditorData.GeneralTitleListTokens,
876                 &ContactEditorData.GeneralTitleListPref,
877                 lboTitles,
878                 (intValueSeek));
879         frameCETitle->ShowModal();
880         delete frameCETitle;
881         frameCETitle = NULL;
882         
885 void frmContactEditor::ModifyGeneralTitle( wxCommandEvent& event )
888         // Bring up the window for editing a title.
890         long longSelected = -1;
891         int intSelectedData = 0;
892     
893         if (!GetSelectedItem(lboTitles,
894                 &longSelected,
895                 &intSelectedData)){
896                 
897                 return;
898                 
899         }
900     
901         frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
902         frameCETitle->SetupPointers(&ContactEditorData.GeneralTitleList,
903                 &ContactEditorData.GeneralTitleListLanguage,
904                 &ContactEditorData.GeneralTitleListAltID,
905                 &ContactEditorData.GeneralTitleListPID,
906                 &ContactEditorData.GeneralTitleListType,
907                 &ContactEditorData.GeneralTitleListTokens,
908                 &ContactEditorData.GeneralTitleListPref,
909                 lboTitles,
910                 intSelectedData);
911         frameCETitle->SetEditorMode(TRUE, CE_GENERAL);
912         frameCETitle->ShowModal();
913         delete frameCETitle;
914         frameCETitle = NULL;
915         
918 void frmContactEditor::DeleteGeneralTitle( wxCommandEvent& event )
921         // Bring up the window for deleting a title.
923         long longSelected = -1;
924         int intSelectedData = 0;
925     
926         if (!GetSelectedItem(lboTitles,
927                 &longSelected,
928                 &intSelectedData)){
929                 
930                 return;
931                 
932         }
933     
934         lboTitles->DeleteItem(longSelected);
935     
936         DeleteMapData(intSelectedData, &ContactEditorData.GeneralTitleList,
937                 &ContactEditorData.GeneralTitleListLanguage, &ContactEditorData.GeneralTitleListAltID,
938                 &ContactEditorData.GeneralTitleListPID, &ContactEditorData.GeneralTitleListType,
939                 &ContactEditorData.GeneralTitleListTokens, &ContactEditorData.GeneralTitleListPref);
940     
943 void frmContactEditor::AddGeneralRole( wxCommandEvent& event )
946         // Bring up the window for adding a role.
947     
948         frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
949         frameCERole->SetEditorMode(FALSE, CE_GENERAL);
950         frameCERole->SetupPointers(&ContactEditorData.GeneralRoleList,
951                 &ContactEditorData.GeneralRoleListLanguage,
952                 &ContactEditorData.GeneralRoleListAltID,
953                 &ContactEditorData.GeneralRoleListPID,
954                 &ContactEditorData.GeneralRoleListType,
955                 &ContactEditorData.GeneralRoleListTokens,
956                 &ContactEditorData.GeneralRoleListPref,
957                 lboRoles,
958                 (intValueSeek));
959         frameCERole->ShowModal();
960         delete frameCERole;
961         frameCERole = NULL;
962         
965 void frmContactEditor::ModifyGeneralRole( wxCommandEvent& event )
968         // Bring up the window for editing a role.
970         long longSelected = -1;
971         int intSelectedData = 0;
972     
973         if (!GetSelectedItem(lboRoles,
974                 &longSelected,
975                 &intSelectedData)){
976                 
977                 return;
978                 
979         }
980     
981         frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
982         frameCERole->SetupPointers(&ContactEditorData.GeneralRoleList,
983                 &ContactEditorData.GeneralRoleListLanguage,
984                 &ContactEditorData.GeneralRoleListAltID,
985                 &ContactEditorData.GeneralRoleListPID,
986                 &ContactEditorData.GeneralRoleListType,
987                 &ContactEditorData.GeneralRoleListTokens,
988                 &ContactEditorData.GeneralRoleListPref,
989                 lboRoles,
990                 intSelectedData);
991         frameCERole->SetEditorMode(TRUE, CE_GENERAL);
992         frameCERole->ShowModal();
993         delete frameCERole;
994         frameCERole = NULL;
995         
998 void frmContactEditor::DeleteGeneralRole( wxCommandEvent& event )
1001         // Bring up the window for deleting a role.
1003         long longSelected = -1;
1004         int intSelectedData = 0;
1005     
1006         if (!GetSelectedItem(lboRoles,
1007                 &longSelected,
1008                 &intSelectedData)){
1009                 
1010                 return;
1011                 
1012         }
1013     
1014         lboRoles->DeleteItem(longSelected);
1015     
1016         DeleteMapData(intSelectedData, &ContactEditorData.GeneralRoleList,
1017                 &ContactEditorData.GeneralRoleListLanguage, &ContactEditorData.GeneralRoleListAltID,
1018                 &ContactEditorData.GeneralRoleListPID, &ContactEditorData.GeneralRoleListType,
1019                 &ContactEditorData.GeneralRoleListTokens, &ContactEditorData.GeneralRoleListPref);
1020     
1023 void frmContactEditor::AddGeneralOrganisation( wxCommandEvent& event )
1026         // Bring up the window for adding an organisation.
1027     
1028         frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
1029         frameCEOrg->SetEditorMode(FALSE, CE_GENERAL);
1030         frameCEOrg->SetupPointers(&ContactEditorData.GeneralOrganisationsList,
1031                 &ContactEditorData.GeneralOrganisationsListLanguage,
1032                 &ContactEditorData.GeneralOrganisationsListSortAs,
1033                 &ContactEditorData.GeneralOrganisationsListAltID,
1034                 &ContactEditorData.GeneralOrganisationsListPID,
1035                 &ContactEditorData.GeneralOrganisationsListType,
1036                 &ContactEditorData.GeneralOrganisationsListTokens,
1037                 &ContactEditorData.GeneralOrganisationsListPref,
1038                 lboOrganisations,
1039                 (intValueSeek));
1040         frameCEOrg->ShowModal();
1041         delete frameCEOrg;
1042         frameCEOrg = NULL;
1043         
1046 void frmContactEditor::ModifyGeneralOrganisation( wxCommandEvent& event )
1049         // Bring up the window for editing an organisation.
1051         long longSelected = -1;
1052         int intSelectedData = 0;
1053     
1054         if (!GetSelectedItem(lboOrganisations,
1055                 &longSelected,
1056                 &intSelectedData)){
1057                 
1058                 return;
1059                 
1060         }
1061     
1062         frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
1063         frameCEOrg->SetupPointers(&ContactEditorData.GeneralOrganisationsList,
1064                 &ContactEditorData.GeneralOrganisationsListLanguage,
1065                 &ContactEditorData.GeneralOrganisationsListSortAs,
1066                 &ContactEditorData.GeneralOrganisationsListAltID,
1067                 &ContactEditorData.GeneralOrganisationsListPID,
1068                 &ContactEditorData.GeneralOrganisationsListType,
1069                 &ContactEditorData.GeneralOrganisationsListTokens,
1070                 &ContactEditorData.GeneralOrganisationsListPref,
1071                 lboOrganisations,
1072                 intSelectedData);
1073         frameCEOrg->SetEditorMode(TRUE, CE_GENERAL);
1074         frameCEOrg->ShowModal();
1075         delete frameCEOrg;
1076         frameCEOrg = NULL;
1077         
1080 void frmContactEditor::DeleteGeneralOrganisation( wxCommandEvent& event )
1083         // Bring up the window for deleting an organisation.
1085         long longSelected = -1;
1086         int intSelectedData = 0;
1087     
1088         if (!GetSelectedItem(lboOrganisations,
1089                 &longSelected,
1090                 &intSelectedData)){
1091                 
1092                 return;
1093         
1094         }
1095     
1096         lboOrganisations->DeleteItem(longSelected);
1097     
1098         DeleteMapData(intSelectedData, &ContactEditorData.GeneralOrganisationsList,
1099                 &ContactEditorData.GeneralOrganisationsListLanguage, &ContactEditorData.GeneralOrganisationsListSortAs,
1100                 &ContactEditorData.GeneralOrganisationsListAltID, &ContactEditorData.GeneralOrganisationsListPID,
1101                 &ContactEditorData.GeneralOrganisationsListType, &ContactEditorData.GeneralOrganisationsListTokens,
1102                 &ContactEditorData.GeneralOrganisationsListPref);
1103     
1106 void frmContactEditor::AddGeneralNote( wxCommandEvent& event )
1109         // Bring up the window for adding a note.
1110     
1111         frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
1112         frameCENote->SetEditorMode(FALSE, CE_GENERAL);
1113         frameCENote->SetupPointers(&ContactEditorData.GeneralNoteList,
1114                 &ContactEditorData.GeneralNoteListLanguage,
1115                 &ContactEditorData.GeneralNoteListAltID,
1116                 &ContactEditorData.GeneralNoteListPID,
1117                 &ContactEditorData.GeneralNoteListType,
1118                 &ContactEditorData.GeneralNoteListTokens,
1119                 &ContactEditorData.GeneralNoteListPref,
1120                 lboNotes,
1121                 (intValueSeek));
1122         frameCENote->ShowModal();
1123         delete frameCENote;
1124         frameCENote = NULL;
1125         
1128 void frmContactEditor::ModifyGeneralNote( wxCommandEvent& event )
1131         // Bring up the window for editing a note.
1133         long longSelected = -1;
1134         int intSelectedData = 0;
1135     
1136         if (!GetSelectedItem(lboNotes,
1137                 &longSelected,
1138                 &intSelectedData)){
1139                 
1140                 return;
1141         
1142         }
1143     
1144         frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
1145         frameCENote->SetupPointers(&ContactEditorData.GeneralNoteList,
1146                 &ContactEditorData.GeneralNoteListLanguage,
1147                 &ContactEditorData.GeneralNoteListAltID,
1148                 &ContactEditorData.GeneralNoteListPID,
1149                 &ContactEditorData.GeneralNoteListType,
1150                 &ContactEditorData.GeneralNoteListTokens,
1151                 &ContactEditorData.GeneralNoteListPref,
1152                 lboNotes,
1153                 intSelectedData);
1154         frameCENote->SetEditorMode(TRUE, CE_GENERAL);
1155         frameCENote->ShowModal();
1156         delete frameCENote;
1157         frameCENote = NULL;
1158         
1161 void frmContactEditor::DeleteGeneralNote( wxCommandEvent& event )
1164         // Bring up a window for deleting a note.
1166         long longSelected = -1;
1167         int intSelectedData = 0;
1168     
1169         if (!GetSelectedItem(lboNotes,
1170                 &longSelected,
1171                 &intSelectedData)){
1172                 
1173                 return;
1174         }
1175     
1176         lboNotes->DeleteItem(longSelected);
1177     
1178         DeleteMapData(intSelectedData, &ContactEditorData.GeneralNoteList,
1179                 &ContactEditorData.GeneralNoteListLanguage, &ContactEditorData.GeneralNoteListAltID,
1180                 &ContactEditorData.GeneralNoteListPID, &ContactEditorData.GeneralNoteListType,
1181                 &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