Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added the DataType for Geoposition to the frmContactEditor form.
[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 {
38     int intResult = 0;
39     
40     frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
41     frameCENickname->SetEditorMode(FALSE, CE_GENERAL);
42     intResult = GetLastInt(&ContactEditorData.GeneralNicknamesList);
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 }
57 void frmContactEditor::ModifyGeneralNickname( wxCommandEvent& event )
58 {
59     
60     long longSelected = -1;
61     int intSelectedData = 0;
62     
63     if (!GetSelectedItem(lboNicknames,
64                          &longSelected,
65                          &intSelectedData)){
66         return;
67     }
68     
69     frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
70     frameCENickname->SetupPointers(&ContactEditorData.GeneralNicknamesList,
71                                    &ContactEditorData.GeneralNicknamesListAltID,
72                                    &ContactEditorData.GeneralNicknamesListPID,
73                                    &ContactEditorData.GeneralNicknamesListType,
74                                    &ContactEditorData.GeneralNicknamesListLanguage,
75                                    &ContactEditorData.GeneralNicknamesListTokens,
76                                    &ContactEditorData.GeneralNicknamesListPref,
77                                    lboNicknames,
78                                    intSelectedData);
79     frameCENickname->SetEditorMode(TRUE, CE_GENERAL);
80     frameCENickname->ShowModal();
81     delete frameCENickname;
82     frameCENickname = NULL;
83     
84 }
86 void frmContactEditor::DeleteGeneralNickname( wxCommandEvent& event )
87 {
88     
89     long longSelected = -1;
90     int intSelectedData = 0;
91     
92     if (!GetSelectedItem(lboNicknames,
93                          &longSelected,
94                          &intSelectedData)){
95         return;
96     }
97     
98     lboNicknames->DeleteItem(longSelected);
99     
100     DeleteMapData(intSelectedData,
101                   &ContactEditorData.GeneralNicknamesList,
102                   &ContactEditorData.GeneralNicknamesListLanguage,
103                   &ContactEditorData.GeneralNicknamesListAltID,
104                   &ContactEditorData.GeneralNicknamesListPID,
105                   &ContactEditorData.GeneralNicknamesListTokens,
106                   &ContactEditorData.GeneralNicknamesListType,
107                   &ContactEditorData.GeneralNicknamesListPref);
108     
111 void frmContactEditor::AddGeneralAddress( wxCommandEvent& event )
113     
114     int intResult = 0;
115     
116     frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
117     frameCEAddress->SetEditorMode(FALSE, CE_GENERAL);
118     intResult = GetLastInt(&ContactEditorData.GeneralAddressList);
119     frameCEAddress->SetupPointers(&ContactEditorData.GeneralAddressList,
120                                   &ContactEditorData.GeneralAddressListTown,
121                                   &ContactEditorData.GeneralAddressListCounty,
122                                   &ContactEditorData.GeneralAddressListPostCode,
123                                   &ContactEditorData.GeneralAddressListCountry,
124                                   &ContactEditorData.GeneralAddressListLabel,
125                                   &ContactEditorData.GeneralAddressListLang,
126                                   &ContactEditorData.GeneralAddressListAltID,
127                                   &ContactEditorData.GeneralAddressListPID,
128                                   &ContactEditorData.GeneralAddressListTokens,
129                                   &ContactEditorData.GeneralAddressListGeo,
130                                   &ContactEditorData.GeneralAddressListTimezone,
131                                   &ContactEditorData.GeneralAddressListType,
132                                   &ContactEditorData.GeneralAddressListMediatype,
133                                   &ContactEditorData.GeneralAddressListPref,
134                                   lboAddresses,
135                                   (intValueSeek));
136     frameCEAddress->ShowModal();
137     delete frameCEAddress;
138     frameCEAddress = NULL;
141 void frmContactEditor::ModifyGeneralAddress( wxCommandEvent& event )
143     
144     long longSelected = -1;
145     int intSelectedData = 0;
146     
147     if (!GetSelectedItem(lboAddresses,
148                          &longSelected,
149                          &intSelectedData)){
150         return;
151     }
152     
153     if (longSelected == -1){
154         return;
155     }
156     
157     frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
158     frameCEAddress->SetupPointers(&ContactEditorData.GeneralAddressList,
159                                   &ContactEditorData.GeneralAddressListTown,
160                                   &ContactEditorData.GeneralAddressListCounty,
161                                   &ContactEditorData.GeneralAddressListPostCode,
162                                   &ContactEditorData.GeneralAddressListCountry,
163                                   &ContactEditorData.GeneralAddressListLabel,
164                                   &ContactEditorData.GeneralAddressListLang,
165                                   &ContactEditorData.GeneralAddressListAltID,
166                                   &ContactEditorData.GeneralAddressListPID,
167                                   &ContactEditorData.GeneralAddressListTokens,
168                                   &ContactEditorData.GeneralAddressListGeo,
169                                   &ContactEditorData.GeneralAddressListTimezone,
170                                   &ContactEditorData.GeneralAddressListType,
171                                   &ContactEditorData.GeneralAddressListMediatype,
172                                   &ContactEditorData.GeneralAddressListPref,
173                                   lboAddresses,
174                                   intSelectedData);
175     frameCEAddress->SetEditorMode(TRUE, CE_GENERAL);
176     frameCEAddress->ShowModal();
177     delete frameCEAddress;
178     frameCEAddress = NULL;
179     
182 void frmContactEditor::DeleteGeneralAddress( wxCommandEvent& event )
184     
185     long longSelected = -1;
186     int intSelectedData = 0;
187     
188     if (!GetSelectedItem(lboAddresses,
189                          &longSelected,
190                          &intSelectedData)){
191         return;
192     }
193     
194     lboAddresses->DeleteItem(longSelected);
195     
196     DeleteMapData(intSelectedData, &ContactEditorData.GeneralAddressList,
197                   &ContactEditorData.GeneralAddressListTown, &ContactEditorData.GeneralAddressListCounty,
198                   &ContactEditorData.GeneralAddressListPostCode, &ContactEditorData.GeneralAddressListCountry,
199                   &ContactEditorData.GeneralAddressList, &ContactEditorData.GeneralAddressListLabel,
200                   &ContactEditorData.GeneralAddressListLang, &ContactEditorData.GeneralAddressListAltID,
201                   &ContactEditorData.GeneralAddressListPID, &ContactEditorData.GeneralAddressListTokens,
202                   &ContactEditorData.GeneralAddressListGeo, &ContactEditorData.GeneralAddressListTimezone,
203                   &ContactEditorData.GeneralAddressListType, &ContactEditorData.GeneralAddressListMediatype,
204                   &ContactEditorData.GeneralAddressListPref);
205     
208 void frmContactEditor::AddGeneralEmail( wxCommandEvent& event )
210     int intResult = 0;
211     
212     frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
213     frameCEEmail->SetEditorMode(FALSE, CE_GENERAL);
214     intResult = GetLastInt(&ContactEditorData.GeneralAddressList);
215     frameCEEmail->SetupPointers(&ContactEditorData.GeneralEmailList,
216                                 &ContactEditorData.GeneralEmailListAltID,
217                                 &ContactEditorData.GeneralEmailListPID,
218                                 &ContactEditorData.GeneralEmailListType,
219                                 &ContactEditorData.GeneralEmailListTokens,
220                                 &ContactEditorData.GeneralEmailListPref,
221                                 lboEmails,
222                                 (intValueSeek));
223     frameCEEmail->ShowModal();
224     delete frameCEEmail;
225     frameCEEmail = NULL;
228 void frmContactEditor::ModifyGeneralEmail( wxCommandEvent& event )
230     long longSelected = -1;
231     int intSelectedData = 0;
232     
233     if (!GetSelectedItem(lboEmails,
234                          &longSelected,
235                          &intSelectedData)){
236         return;
237     }
238     
239     frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
240     frameCEEmail->SetupPointers(&ContactEditorData.GeneralEmailList,
241                                 &ContactEditorData.GeneralEmailListAltID,
242                                 &ContactEditorData.GeneralEmailListPID,
243                                 &ContactEditorData.GeneralEmailListType,
244                                 &ContactEditorData.GeneralEmailListTokens,
245                                 &ContactEditorData.GeneralEmailListPref,
246                                 lboEmails,
247                                 intSelectedData);
248     frameCEEmail->SetEditorMode(TRUE, CE_GENERAL);
249     frameCEEmail->ShowModal();
250     delete frameCEEmail;
251     frameCEEmail = NULL;
254 void frmContactEditor::DeleteGeneralEmail( wxCommandEvent& event )
256     long longSelected = -1;
257     int intSelectedData = 0;
258     
259     if (!GetSelectedItem(lboEmails,
260                          &longSelected,
261                          &intSelectedData)){
262         return;
263     }
264     
265     lboEmails->DeleteItem(longSelected);
266     
267     DeleteMapData(intSelectedData, &ContactEditorData.GeneralEmailList,
268                   &ContactEditorData.GeneralEmailListAltID, &ContactEditorData.GeneralEmailListPID,
269                   &ContactEditorData.GeneralEmailListType, &ContactEditorData.GeneralEmailListTokens,
270                   &ContactEditorData.GeneralEmailListPref);
271     
274 void frmContactEditor::AddGeneralIM( wxCommandEvent& event )
276     int intResult = 0;
277     
278     frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
279     frameCEIM->SetEditorMode(FALSE, CE_GENERAL);
280     intResult = GetLastInt(&ContactEditorData.GeneralIMList);
281     frameCEIM->SetupPointers(&ContactEditorData.GeneralIMList,
282                              &ContactEditorData.GeneralIMListAltID,
283                              &ContactEditorData.GeneralIMListPID,
284                              &ContactEditorData.GeneralIMListType,
285                              &ContactEditorData.GeneralIMListTypeInfo,
286                              &ContactEditorData.GeneralIMListTokens,
287                              &ContactEditorData.GeneralIMListMediatype,
288                              &ContactEditorData.GeneralIMListPref,
289                              lboIM,
290                              (intValueSeek));
291     frameCEIM->ShowModal();
292     delete frameCEIM;
293     frameCEIM = NULL;
296 void frmContactEditor::ModifyGeneralIM( wxCommandEvent& event )
298     long longSelected = -1;
299     int intSelectedData = 0;
300     
301     if (!GetSelectedItem(lboIM,
302                          &longSelected,
303                          &intSelectedData)){
304         return;
305     }
307     frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
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                              intSelectedData);
318     frameCEIM->SetEditorMode(TRUE, CE_GENERAL);
319     frameCEIM->ShowModal();
320     delete frameCEIM;
321     frameCEIM = NULL;
324 void frmContactEditor::DeleteGeneralIM( wxCommandEvent& event )
326     long longSelected = -1;
327     int intSelectedData = 0;
328     
329     if (!GetSelectedItem(lboIM,
330                          &longSelected,
331                          &intSelectedData)){
332         return;
333     }
334     
335     lboIM->DeleteItem(longSelected);
336     
337     DeleteMapData(intSelectedData, &ContactEditorData.GeneralIMList,
338                   &ContactEditorData.GeneralIMListAltID, &ContactEditorData.GeneralIMListPID,
339                   &ContactEditorData.GeneralIMListType, &ContactEditorData.GeneralIMListTypeInfo,
340                   &ContactEditorData.GeneralIMListTokens, &ContactEditorData.GeneralIMListMediatype, 
341                   &ContactEditorData.GeneralIMListPref);
342     
345 void frmContactEditor::AddGeneralTelephone( wxCommandEvent& event )
347     int intResult = 0;
348     
349     frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
350     frameCETel->SetEditorMode(FALSE, CE_GENERAL);
351     intResult = GetLastInt(&ContactEditorData.GeneralTelephoneList);
352     frameCETel->SetupPointers(&ContactEditorData.GeneralTelephoneList,
353                               &ContactEditorData.GeneralTelephoneListAltID,
354                               &ContactEditorData.GeneralTelephoneListPID,
355                               &ContactEditorData.GeneralTelephoneListType,
356                               &ContactEditorData.GeneralTelephoneListTypeInfo,
357                               &ContactEditorData.GeneralTelephoneListTokens,
358                               &ContactEditorData.GeneralTelephoneListPref,
359                               lboTelephone,
360                               (intValueSeek));
361     frameCETel->ShowModal();
362     delete frameCETel;
363     frameCETel = NULL;
366 void frmContactEditor::ModifyGeneralTelephone( wxCommandEvent& event )
368     long longSelected = -1;
369     int intSelectedData = 0;
370     
371     if (!GetSelectedItem(lboTelephone,
372                          &longSelected,
373                          &intSelectedData)){
374         return;
375     }
376     
377     frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
378     frameCETel->SetupPointers(&ContactEditorData.GeneralTelephoneList,
379                               &ContactEditorData.GeneralTelephoneListAltID,
380                               &ContactEditorData.GeneralTelephoneListPID,
381                               &ContactEditorData.GeneralTelephoneListType,
382                               &ContactEditorData.GeneralTelephoneListTypeInfo,
383                               &ContactEditorData.GeneralTelephoneListTokens,
384                               &ContactEditorData.GeneralTelephoneListPref,
385                               lboTelephone,
386                               intSelectedData);
387     frameCETel->SetEditorMode(TRUE, CE_GENERAL);
388     frameCETel->ShowModal();
389     delete frameCETel;
390     frameCETel = NULL;
393 void frmContactEditor::DeleteGeneralTelephone( wxCommandEvent& event )
395     long longSelected = -1;
396     int intSelectedData = 0;
397     
398     if (!GetSelectedItem(lboTelephone,
399                          &longSelected,
400                          &intSelectedData)){
401         return;
402     }
403     
404     lboTelephone->DeleteItem(longSelected);
405     
406     DeleteMapData(intSelectedData, &ContactEditorData.GeneralTelephoneList,
407                   &ContactEditorData.GeneralTelephoneListAltID, &ContactEditorData.GeneralTelephoneListPID,
408                   &ContactEditorData.GeneralTelephoneListType, &ContactEditorData.GeneralTelephoneListTypeInfo,
409                   &ContactEditorData.GeneralTelephoneListTokens, &ContactEditorData.GeneralTelephoneListPref);
410     
413 void frmContactEditor::AddGeneralLanguages( wxCommandEvent& event )
415     int intResult = 0;
416     
417     frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
418     frameCELang->SetEditorMode(FALSE, CE_GENERAL);
419     intResult = GetLastInt(&ContactEditorData.GeneralLanguageList);
420     frameCELang->SetupPointers(&ContactEditorData.GeneralLanguageList,
421                                &ContactEditorData.GeneralLanguageListAltID,
422                                &ContactEditorData.GeneralLanguageListPID,
423                                &ContactEditorData.GeneralLanguageListType,
424                                &ContactEditorData.GeneralLanguageListTokens,
425                                &ContactEditorData.GeneralLanguageListPref,
426                                lboLanguages,
427                                (intValueSeek));
428     frameCELang->ShowModal();
429     delete frameCELang;
430     frameCELang = NULL;
433 void frmContactEditor::ModifyGeneralLanguages( wxCommandEvent& event )
435     long longSelected = -1;
436     int intSelectedData = 0;
437     
438     if (!GetSelectedItem(lboLanguages,
439                          &longSelected,
440                          &intSelectedData)){
441         return;
442     }
443     
444     frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
445     frameCELang->SetupPointers(&ContactEditorData.GeneralLanguageList,
446                                &ContactEditorData.GeneralLanguageListAltID,
447                                &ContactEditorData.GeneralLanguageListPID,
448                                &ContactEditorData.GeneralLanguageListType,
449                                &ContactEditorData.GeneralLanguageListTokens,
450                                &ContactEditorData.GeneralLanguageListPref,
451                                lboLanguages,
452                                intSelectedData);
453     frameCELang->SetEditorMode(TRUE, CE_GENERAL);
454     frameCELang->ShowModal();
455     delete frameCELang;
456     frameCELang = NULL;
459 void frmContactEditor::DeleteGeneralLanguage( wxCommandEvent& event )
461     long longSelected = -1;
462     int intSelectedData = 0;
463     
464     if (!GetSelectedItem(lboLanguages,
465                          &longSelected,
466                          &intSelectedData)){
467         return;
468     }
469     
470     lboLanguages->DeleteItem(longSelected);
471     
472     DeleteMapData(intSelectedData, &ContactEditorData.GeneralLanguageList,
473                   &ContactEditorData.GeneralLanguageListAltID, &ContactEditorData.GeneralLanguageListPID,
474                   &ContactEditorData.GeneralLanguageListType, &ContactEditorData.GeneralLanguageListTokens,
475                   &ContactEditorData.GeneralLanguageListPref);
476     
479 void frmContactEditor::AddGeneralTimezone( wxCommandEvent& event )
481     int intResult = 0;
482     
483     frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
484     frameCETZ->SetEditorMode(FALSE, CE_GENERAL);
485     intResult = GetLastInt(&ContactEditorData.GeneralTZList);
486     frameCETZ->SetupPointers(&ContactEditorData.GeneralTZList,
487                              &ContactEditorData.GeneralTZListAltID,
488                              &ContactEditorData.GeneralTZListPID,
489                              &ContactEditorData.GeneralTZListType,
490                              &ContactEditorData.GeneralTZListTokens,
491                              &ContactEditorData.GeneralTZListMediatype,
492                              &ContactEditorData.GeneralTZListPref,
493                              lboTimezones,
494                              (intValueSeek));
495     frameCETZ->ShowModal();
496     delete frameCETZ;
497     frameCETZ = NULL;
500 void frmContactEditor::ModifyGeneralTimezone( wxCommandEvent& event )
502     long longSelected = -1;
503     int intSelectedData = 0;
504     
505     if (!GetSelectedItem(lboTimezones,
506                          &longSelected,
507                          &intSelectedData)){
508         return;
509     }
510     
511     frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
512     frameCETZ->SetupPointers(&ContactEditorData.GeneralTZList,
513                              &ContactEditorData.GeneralTZListAltID,
514                              &ContactEditorData.GeneralTZListPID,
515                              &ContactEditorData.GeneralTZListType,
516                              &ContactEditorData.GeneralTZListTokens,
517                              &ContactEditorData.GeneralTZListMediatype,
518                              &ContactEditorData.GeneralTZListPref,
519                              lboTimezones,
520                              intSelectedData);
521     frameCETZ->SetEditorMode(TRUE, CE_GENERAL);
522     frameCETZ->ShowModal();
523     delete frameCETZ;
524     frameCETZ = NULL;
527 void frmContactEditor::DeleteGeneralTimezone( wxCommandEvent& event )
529     long longSelected = -1;
530     int intSelectedData = 0;
531     
532     if (!GetSelectedItem(lboTimezones,
533                          &longSelected,
534                          &intSelectedData)){
535         return;
536     }
537     
538     lboTimezones->DeleteItem(longSelected);
539     
540     DeleteMapData(intSelectedData, &ContactEditorData.GeneralTZList,
541                   &ContactEditorData.GeneralTZListAltID, &ContactEditorData.GeneralTZListPID,
542                   &ContactEditorData.GeneralTZListType, &ContactEditorData.GeneralTZListTokens,
543                   &ContactEditorData.GeneralTZListMediatype, &ContactEditorData.GeneralTZListPref);
544     
547 void frmContactEditor::AddGeneralGeoposition( wxCommandEvent& event )
549     int intResult = 0;
550     
551     frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
552     frameCEGeo->SetEditorMode(FALSE, CE_GENERAL);
553     intResult = GetLastInt(&ContactEditorData.GeneralGeographyList);
554     frameCEGeo->SetupPointers(&ContactEditorData.GeneralGeographyList,
555                               &ContactEditorData.GeneralGeographyListAltID,
556                               &ContactEditorData.GeneralGeographyListPID,
557                               &ContactEditorData.GeneralGeographyListType,
558                               &ContactEditorData.GeneralGeographyListDataType,
559                               &ContactEditorData.GeneralGeographyListTokens,
560                               &ContactEditorData.GeneralGeographyListMediatype,
561                               &ContactEditorData.GeneralGeographyListPref,
562                               lboGeoposition,
563                               (intValueSeek));
564     frameCEGeo->ShowModal();
565     delete frameCEGeo;
566     frameCEGeo = NULL;
569 void frmContactEditor::ModifyGeneralGeoposition( wxCommandEvent& event )
571     long longSelected = -1;
572     int intSelectedData = 0;
573     
574     if (!GetSelectedItem(lboGeoposition,
575                          &longSelected,
576                          &intSelectedData)){
577         return;
578     }
579     
580     frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
581     frameCEGeo->SetupPointers(&ContactEditorData.GeneralGeographyList,
582                               &ContactEditorData.GeneralGeographyListAltID,
583                               &ContactEditorData.GeneralGeographyListPID,
584                               &ContactEditorData.GeneralGeographyListType,
585                               &ContactEditorData.GeneralGeographyListDataType,
586                               &ContactEditorData.GeneralGeographyListTokens,
587                               &ContactEditorData.GeneralGeographyListMediatype,
588                               &ContactEditorData.GeneralGeographyListPref,
589                               lboGeoposition,
590                               intSelectedData);
591     frameCEGeo->SetEditorMode(TRUE, CE_GENERAL);
592     frameCEGeo->ShowModal();
593     delete frameCEGeo;
594     frameCEGeo = NULL;
597 void frmContactEditor::DeleteGeneralGeoposition( wxCommandEvent& event )
599     long longSelected = -1;
600     int intSelectedData = 0;
601     
602     if (!GetSelectedItem(lboGeoposition,
603                          &longSelected,
604                          &intSelectedData)){
605         return;
606     }
607     
608     lboGeoposition->DeleteItem(longSelected);
609     
610     DeleteMapData(intSelectedData, &ContactEditorData.GeneralGeographyList,
611                   &ContactEditorData.GeneralGeographyListAltID, &ContactEditorData.GeneralGeographyListPID,
612                   &ContactEditorData.GeneralGeographyListType, &ContactEditorData.GeneralGeographyListDataType,
613                   &ContactEditorData.GeneralGeographyListTokens, &ContactEditorData.GeneralGeographyListMediatype, 
614                   &ContactEditorData.GeneralGeographyListPref);
615     
618 void frmContactEditor::AddGeneralRelated( wxCommandEvent& event )
620     int intResult = 0;
621     
622     frmContactEditorRelated *frameCERel = new frmContactEditorRelated ( this );
623     frameCERel->SetEditorMode(FALSE, CE_GENERAL);
624     intResult = GetLastInt(&ContactEditorData.GeneralRelatedList);
625     frameCERel->SetupPointers(&ContactEditorData.GeneralRelatedList,
626                               &ContactEditorData.GeneralRelatedListRelType,
627                               &ContactEditorData.GeneralRelatedListAltID,
628                               &ContactEditorData.GeneralRelatedListPID,
629                               &ContactEditorData.GeneralRelatedListType,
630                               &ContactEditorData.GeneralRelatedListTokens,
631                               &ContactEditorData.GeneralRelatedListPref,
632                               lboRelated,
633                               (intValueSeek));
634     frameCERel->ShowModal();
635     delete frameCERel;
636     frameCERel = NULL;
639 void frmContactEditor::ModifyGeneralRelated( wxCommandEvent& event )
641     long longSelected = -1;
642     int intSelectedData = 0;
643     
644     if (!GetSelectedItem(lboRelated,
645                          &longSelected,
646                          &intSelectedData)){
647         return;
648     }
649     
650     frmContactEditorRelated *frameCERel = new frmContactEditorRelated ( this );
651     frameCERel->SetupPointers(&ContactEditorData.GeneralRelatedList,
652                               &ContactEditorData.GeneralRelatedListRelType,
653                               &ContactEditorData.GeneralRelatedListAltID,
654                               &ContactEditorData.GeneralRelatedListPID,
655                               &ContactEditorData.GeneralRelatedListType,
656                               &ContactEditorData.GeneralRelatedListTokens,
657                               &ContactEditorData.GeneralRelatedListPref,
658                               lboRelated,
659                               intSelectedData);
660     frameCERel->SetEditorMode(TRUE, CE_GENERAL);
661     frameCERel->ShowModal();
662     delete frameCERel;
663     frameCERel = NULL;
666 void frmContactEditor::DeleteGeneralRelated( wxCommandEvent& event )
668     long longSelected = -1;
669     int intSelectedData = 0;
670     
671     if (!GetSelectedItem(lboRelated,
672                          &longSelected,
673                          &intSelectedData)){
674         return;
675     }
676     
677     lboRelated->DeleteItem(longSelected);
678     
679     DeleteMapData(intSelectedData, &ContactEditorData.GeneralRelatedList,
680         &ContactEditorData.GeneralRelatedListRelType, &ContactEditorData.GeneralRelatedListAltID,
681         &ContactEditorData.GeneralRelatedListPID, &ContactEditorData.GeneralRelatedListType,
682         &ContactEditorData.GeneralRelatedListTokens, &ContactEditorData.GeneralRelatedListPref);
683     
686 void frmContactEditor::AddGeneralWebsite( wxCommandEvent& event )
688     int intResult = 0;
689     
690     frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
691     frameCEWeb->SetEditorMode(FALSE, CE_GENERAL);
692     intResult = GetLastInt(&ContactEditorData.GeneralWebsiteList);
693     frameCEWeb->SetupPointers(&ContactEditorData.GeneralWebsiteList,
694                               &ContactEditorData.GeneralWebsiteListAltID,
695                               &ContactEditorData.GeneralWebsiteListPID,
696                               &ContactEditorData.GeneralWebsiteListType,
697                               &ContactEditorData.GeneralWebsiteListTokens,
698                               &ContactEditorData.GeneralWebsiteListMediatype,
699                               &ContactEditorData.GeneralWebsiteListPref,
700                               lboWebsites,
701                               (intValueSeek));
702     frameCEWeb->ShowModal();
703     delete frameCEWeb;
704     frameCEWeb = NULL;
707 void frmContactEditor::ModifyGeneralWebsite( wxCommandEvent& event )
709     long longSelected = -1;
710     int intSelectedData = 0;
711     
712     if (!GetSelectedItem(lboWebsites,
713                          &longSelected,
714                          &intSelectedData)){
715         return;
716     }
717     
718     frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
719     frameCEWeb->SetupPointers(&ContactEditorData.GeneralWebsiteList,
720                               &ContactEditorData.GeneralWebsiteListAltID,
721                               &ContactEditorData.GeneralWebsiteListPID,
722                               &ContactEditorData.GeneralWebsiteListType,
723                               &ContactEditorData.GeneralWebsiteListTokens,
724                               &ContactEditorData.GeneralWebsiteListMediatype,
725                               &ContactEditorData.GeneralWebsiteListPref,
726                               lboWebsites,
727                               intSelectedData);
728     frameCEWeb->SetEditorMode(TRUE, CE_GENERAL);
729     frameCEWeb->ShowModal();
730     delete frameCEWeb;
731     frameCEWeb = NULL;
734 void frmContactEditor::DeleteGeneralWebsite( wxCommandEvent& event )
736     long longSelected = -1;
737     int intSelectedData = 0;
738     
739     if (!GetSelectedItem(lboWebsites,
740                          &longSelected,
741                          &intSelectedData)){
742         return;
743     }
744     
745     lboWebsites->DeleteItem(longSelected);
746     
747     DeleteMapData(intSelectedData, &ContactEditorData.GeneralWebsiteList,
748                   &ContactEditorData.GeneralWebsiteListAltID, &ContactEditorData.GeneralWebsiteListPID,
749                   &ContactEditorData.GeneralWebsiteListType, &ContactEditorData.GeneralWebsiteListTokens,
750                   &ContactEditorData.GeneralWebsiteListMediatype, &ContactEditorData.GeneralWebsiteListPref);
751     
754 void frmContactEditor::AddGeneralTitle( wxCommandEvent& event )
756     int intResult = 0;
757     
758     frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
759     frameCETitle->SetEditorMode(FALSE, CE_GENERAL);
760     intResult = GetLastInt(&ContactEditorData.GeneralTitleList);
761     frameCETitle->SetupPointers(&ContactEditorData.GeneralTitleList,
762                                 &ContactEditorData.GeneralTitleListLanguage,
763                                 &ContactEditorData.GeneralTitleListAltID,
764                                 &ContactEditorData.GeneralTitleListPID,
765                                 &ContactEditorData.GeneralTitleListType,
766                                 &ContactEditorData.GeneralTitleListTokens,
767                                 &ContactEditorData.GeneralTitleListPref,
768                                 lboTitles,
769                                 (intValueSeek));
770     frameCETitle->ShowModal();
771     delete frameCETitle;
772     frameCETitle = NULL;
775 void frmContactEditor::ModifyGeneralTitle( wxCommandEvent& event )
777     long longSelected = -1;
778     int intSelectedData = 0;
779     
780     if (!GetSelectedItem(lboTitles,
781                          &longSelected,
782                          &intSelectedData)){
783         return;
784     }
785     
786     frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
787     frameCETitle->SetupPointers(&ContactEditorData.GeneralTitleList,
788                                 &ContactEditorData.GeneralTitleListLanguage,
789                                 &ContactEditorData.GeneralTitleListAltID,
790                                 &ContactEditorData.GeneralTitleListPID,
791                                 &ContactEditorData.GeneralTitleListType,
792                                 &ContactEditorData.GeneralTitleListTokens,
793                                 &ContactEditorData.GeneralTitleListPref,
794                                 lboTitles,
795                                 intSelectedData);
796     frameCETitle->SetEditorMode(TRUE, CE_GENERAL);
797     frameCETitle->ShowModal();
798     delete frameCETitle;
799     frameCETitle = NULL;
802 void frmContactEditor::DeleteGeneralTitle( wxCommandEvent& event )
804     long longSelected = -1;
805     int intSelectedData = 0;
806     
807     if (!GetSelectedItem(lboTitles,
808                          &longSelected,
809                          &intSelectedData)){
810         return;
811     }
812     
813     lboTitles->DeleteItem(longSelected);
814     
815     DeleteMapData(intSelectedData, &ContactEditorData.GeneralTitleList,
816                   &ContactEditorData.GeneralTitleListLanguage, &ContactEditorData.GeneralTitleListAltID,
817                   &ContactEditorData.GeneralTitleListPID, &ContactEditorData.GeneralTitleListType,
818                   &ContactEditorData.GeneralTitleListTokens, &ContactEditorData.GeneralTitleListPref);
819     
822 void frmContactEditor::AddGeneralRole( wxCommandEvent& event )
824     int intResult = 0;
825     
826     frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
827     frameCERole->SetEditorMode(FALSE, CE_GENERAL);
828     intResult = GetLastInt(&ContactEditorData.GeneralRoleList);
829     frameCERole->SetupPointers(&ContactEditorData.GeneralRoleList,
830                                &ContactEditorData.GeneralRoleListLanguage,
831                                &ContactEditorData.GeneralRoleListAltID,
832                                &ContactEditorData.GeneralRoleListPID,
833                                &ContactEditorData.GeneralRoleListType,
834                                &ContactEditorData.GeneralRoleListTokens,
835                                &ContactEditorData.GeneralRoleListPref,
836                                lboRoles,
837                                (intValueSeek));
838     frameCERole->ShowModal();
839     delete frameCERole;
840     frameCERole = NULL;
843 void frmContactEditor::ModifyGeneralRole( wxCommandEvent& event )
845     long longSelected = -1;
846     int intSelectedData = 0;
847     
848     if (!GetSelectedItem(lboRoles,
849                          &longSelected,
850                          &intSelectedData)){
851         return;
852     }
853     
854     frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
855     frameCERole->SetupPointers(&ContactEditorData.GeneralRoleList,
856                                &ContactEditorData.GeneralRoleListLanguage,
857                                &ContactEditorData.GeneralRoleListAltID,
858                                &ContactEditorData.GeneralRoleListPID,
859                                &ContactEditorData.GeneralRoleListType,
860                                &ContactEditorData.GeneralRoleListTokens,
861                                &ContactEditorData.GeneralRoleListPref,
862                                lboRoles,
863                                intSelectedData);
864     frameCERole->SetEditorMode(TRUE, CE_GENERAL);
865     frameCERole->ShowModal();
866     delete frameCERole;
867     frameCERole = NULL;
870 void frmContactEditor::DeleteGeneralRole( wxCommandEvent& event )
872     long longSelected = -1;
873     int intSelectedData = 0;
874     
875     if (!GetSelectedItem(lboRoles,
876                          &longSelected,
877                          &intSelectedData)){
878         return;
879     }
880     
881     lboRoles->DeleteItem(longSelected);
882     
883     DeleteMapData(intSelectedData, &ContactEditorData.GeneralRoleList,
884                   &ContactEditorData.GeneralRoleListLanguage, &ContactEditorData.GeneralRoleListAltID,
885                   &ContactEditorData.GeneralRoleListPID, &ContactEditorData.GeneralRoleListType,
886                   &ContactEditorData.GeneralRoleListTokens, &ContactEditorData.GeneralRoleListPref);
887     
890 void frmContactEditor::AddGeneralOrganisation( wxCommandEvent& event )
892     int intResult = 0;
893     
894     frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
895     frameCEOrg->SetEditorMode(FALSE, CE_GENERAL);
896     intResult = GetLastInt(&ContactEditorData.GeneralOrganisationsList);
897     frameCEOrg->SetupPointers(&ContactEditorData.GeneralOrganisationsList,
898                               &ContactEditorData.GeneralOrganisationsListLanguage,
899                               &ContactEditorData.GeneralOrganisationsListSortAs,
900                               &ContactEditorData.GeneralOrganisationsListAltID,
901                               &ContactEditorData.GeneralOrganisationsListPID,
902                               &ContactEditorData.GeneralOrganisationsListType,
903                               &ContactEditorData.GeneralOrganisationsListTokens,
904                               &ContactEditorData.GeneralOrganisationsListPref,
905                               lboOrganisations,
906                               (intValueSeek));
907     frameCEOrg->ShowModal();
908     delete frameCEOrg;
909     frameCEOrg = NULL;
912 void frmContactEditor::ModifyGeneralOrganisation( wxCommandEvent& event )
914     long longSelected = -1;
915     int intSelectedData = 0;
916     
917     if (!GetSelectedItem(lboOrganisations,
918                          &longSelected,
919                          &intSelectedData)){
920         return;
921     }
922     
923     frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
924     frameCEOrg->SetupPointers(&ContactEditorData.GeneralOrganisationsList,
925                               &ContactEditorData.GeneralOrganisationsListLanguage,
926                               &ContactEditorData.GeneralOrganisationsListSortAs,
927                               &ContactEditorData.GeneralOrganisationsListAltID,
928                               &ContactEditorData.GeneralOrganisationsListPID,
929                               &ContactEditorData.GeneralOrganisationsListType,
930                               &ContactEditorData.GeneralOrganisationsListTokens,
931                               &ContactEditorData.GeneralOrganisationsListPref,
932                               lboOrganisations,
933                               intSelectedData);
934     frameCEOrg->SetEditorMode(TRUE, CE_GENERAL);
935     frameCEOrg->ShowModal();
936     delete frameCEOrg;
937     frameCEOrg = NULL;
940 void frmContactEditor::DeleteGeneralOrganisation( wxCommandEvent& event )
942     long longSelected = -1;
943     int intSelectedData = 0;
944     
945     if (!GetSelectedItem(lboOrganisations,
946                          &longSelected,
947                          &intSelectedData)){
948         return;
949     }
950     
951     lboOrganisations->DeleteItem(longSelected);
952     
953     DeleteMapData(intSelectedData, &ContactEditorData.GeneralOrganisationsList,
954                   &ContactEditorData.GeneralOrganisationsListLanguage, &ContactEditorData.GeneralOrganisationsListSortAs,
955                   &ContactEditorData.GeneralOrganisationsListAltID, &ContactEditorData.GeneralOrganisationsListPID,
956                   &ContactEditorData.GeneralOrganisationsListType, &ContactEditorData.GeneralOrganisationsListTokens,
957                   &ContactEditorData.GeneralOrganisationsListPref);
958     
961 void frmContactEditor::AddGeneralNote( wxCommandEvent& event )
963     int intResult = 0;
964     
965     frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
966     frameCENote->SetEditorMode(FALSE, CE_GENERAL);
967     intResult = GetLastInt(&ContactEditorData.GeneralNoteList);
968     frameCENote->SetupPointers(&ContactEditorData.GeneralNoteList,
969                                &ContactEditorData.GeneralNoteListLanguage,
970                                &ContactEditorData.GeneralNoteListAltID,
971                                &ContactEditorData.GeneralNoteListPID,
972                                &ContactEditorData.GeneralNoteListType,
973                                &ContactEditorData.GeneralNoteListTokens,
974                                &ContactEditorData.GeneralNoteListPref,
975                                lboNotes,
976                                (intValueSeek));
977     frameCENote->ShowModal();
978     delete frameCENote;
979     frameCENote = NULL;
982 void frmContactEditor::ModifyGeneralNote( wxCommandEvent& event )
984     long longSelected = -1;
985     int intSelectedData = 0;
986     
987     if (!GetSelectedItem(lboNotes,
988                          &longSelected,
989                          &intSelectedData)){
990         return;
991     }
992     
993     frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
994     frameCENote->SetupPointers(&ContactEditorData.GeneralNoteList,
995                                &ContactEditorData.GeneralNoteListLanguage,
996                                &ContactEditorData.GeneralNoteListAltID,
997                                &ContactEditorData.GeneralNoteListPID,
998                                &ContactEditorData.GeneralNoteListType,
999                                &ContactEditorData.GeneralNoteListTokens,
1000                                &ContactEditorData.GeneralNoteListPref,
1001                                lboNotes,
1002                                intSelectedData);
1003     frameCENote->SetEditorMode(TRUE, CE_GENERAL);
1004     frameCENote->ShowModal();
1005     delete frameCENote;
1006     frameCENote = NULL;
1009 void frmContactEditor::DeleteGeneralNote( wxCommandEvent& event )
1011     long longSelected = -1;
1012     int intSelectedData = 0;
1013     
1014     if (!GetSelectedItem(lboNotes,
1015                          &longSelected,
1016                          &intSelectedData)){
1017         return;
1018     }
1019     
1020     lboNotes->DeleteItem(longSelected);
1021     
1022     DeleteMapData(intSelectedData, &ContactEditorData.GeneralNoteList,
1023                   &ContactEditorData.GeneralNoteListLanguage, &ContactEditorData.GeneralNoteListAltID,
1024                   &ContactEditorData.GeneralNoteListPID, &ContactEditorData.GeneralNoteListType,
1025                   &ContactEditorData.GeneralNoteListTokens, &ContactEditorData.GeneralNoteListPref);
1026     
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