Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Enhanced code for IMPP in frmContactEditor and frmContactEditorIM.
[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.GeneralGeographyListTokens,
559                               &ContactEditorData.GeneralGeographyListMediatype,
560                               &ContactEditorData.GeneralGeographyListPref,
561                               lboGeoposition,
562                               (intValueSeek));
563     frameCEGeo->ShowModal();
564     delete frameCEGeo;
565     frameCEGeo = NULL;
568 void frmContactEditor::ModifyGeneralGeoposition( wxCommandEvent& event )
570     long longSelected = -1;
571     int intSelectedData = 0;
572     
573     if (!GetSelectedItem(lboGeoposition,
574                          &longSelected,
575                          &intSelectedData)){
576         return;
577     }
578     
579     frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
580     frameCEGeo->SetupPointers(&ContactEditorData.GeneralGeographyList,
581                               &ContactEditorData.GeneralGeographyListAltID,
582                               &ContactEditorData.GeneralGeographyListPID,
583                               &ContactEditorData.GeneralGeographyListType,
584                               &ContactEditorData.GeneralGeographyListTokens,
585                               &ContactEditorData.GeneralGeographyListMediatype,
586                               &ContactEditorData.GeneralGeographyListPref,
587                               lboGeoposition,
588                               intSelectedData);
589     frameCEGeo->SetEditorMode(TRUE, CE_GENERAL);
590     frameCEGeo->ShowModal();
591     delete frameCEGeo;
592     frameCEGeo = NULL;
595 void frmContactEditor::DeleteGeneralGeoposition( wxCommandEvent& event )
597     long longSelected = -1;
598     int intSelectedData = 0;
599     
600     if (!GetSelectedItem(lboGeoposition,
601                          &longSelected,
602                          &intSelectedData)){
603         return;
604     }
605     
606     lboGeoposition->DeleteItem(longSelected);
607     
608     DeleteMapData(intSelectedData, &ContactEditorData.GeneralGeographyList,
609                   &ContactEditorData.GeneralGeographyListAltID, &ContactEditorData.GeneralGeographyListPID,
610                   &ContactEditorData.GeneralGeographyListType, &ContactEditorData.GeneralGeographyListTokens,
611                   &ContactEditorData.GeneralGeographyListMediatype, &ContactEditorData.GeneralGeographyListPref);
612     
615 void frmContactEditor::AddGeneralRelated( wxCommandEvent& event )
617     int intResult = 0;
618     
619     frmContactEditorRelated *frameCERel = new frmContactEditorRelated ( this );
620     frameCERel->SetEditorMode(FALSE, CE_GENERAL);
621     intResult = GetLastInt(&ContactEditorData.GeneralRelatedList);
622     frameCERel->SetupPointers(&ContactEditorData.GeneralRelatedList,
623                               &ContactEditorData.GeneralRelatedListRelType,
624                               &ContactEditorData.GeneralRelatedListAltID,
625                               &ContactEditorData.GeneralRelatedListPID,
626                               &ContactEditorData.GeneralRelatedListType,
627                               &ContactEditorData.GeneralRelatedListTokens,
628                               &ContactEditorData.GeneralRelatedListPref,
629                               lboRelated,
630                               (intValueSeek));
631     frameCERel->ShowModal();
632     delete frameCERel;
633     frameCERel = NULL;
636 void frmContactEditor::ModifyGeneralRelated( wxCommandEvent& event )
638     long longSelected = -1;
639     int intSelectedData = 0;
640     
641     if (!GetSelectedItem(lboRelated,
642                          &longSelected,
643                          &intSelectedData)){
644         return;
645     }
646     
647     frmContactEditorRelated *frameCERel = new frmContactEditorRelated ( this );
648     frameCERel->SetupPointers(&ContactEditorData.GeneralRelatedList,
649                               &ContactEditorData.GeneralRelatedListRelType,
650                               &ContactEditorData.GeneralRelatedListAltID,
651                               &ContactEditorData.GeneralRelatedListPID,
652                               &ContactEditorData.GeneralRelatedListType,
653                               &ContactEditorData.GeneralRelatedListTokens,
654                               &ContactEditorData.GeneralRelatedListPref,
655                               lboRelated,
656                               intSelectedData);
657     frameCERel->SetEditorMode(TRUE, CE_GENERAL);
658     frameCERel->ShowModal();
659     delete frameCERel;
660     frameCERel = NULL;
663 void frmContactEditor::DeleteGeneralRelated( wxCommandEvent& event )
665     long longSelected = -1;
666     int intSelectedData = 0;
667     
668     if (!GetSelectedItem(lboRelated,
669                          &longSelected,
670                          &intSelectedData)){
671         return;
672     }
673     
674     lboRelated->DeleteItem(longSelected);
675     
676     DeleteMapData(intSelectedData, &ContactEditorData.GeneralRelatedList,
677         &ContactEditorData.GeneralRelatedListRelType, &ContactEditorData.GeneralRelatedListAltID,
678         &ContactEditorData.GeneralRelatedListPID, &ContactEditorData.GeneralRelatedListType,
679         &ContactEditorData.GeneralRelatedListTokens, &ContactEditorData.GeneralRelatedListPref);
680     
683 void frmContactEditor::AddGeneralWebsite( wxCommandEvent& event )
685     int intResult = 0;
686     
687     frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
688     frameCEWeb->SetEditorMode(FALSE, CE_GENERAL);
689     intResult = GetLastInt(&ContactEditorData.GeneralWebsiteList);
690     frameCEWeb->SetupPointers(&ContactEditorData.GeneralWebsiteList,
691                               &ContactEditorData.GeneralWebsiteListAltID,
692                               &ContactEditorData.GeneralWebsiteListPID,
693                               &ContactEditorData.GeneralWebsiteListType,
694                               &ContactEditorData.GeneralWebsiteListTokens,
695                               &ContactEditorData.GeneralWebsiteListMediatype,
696                               &ContactEditorData.GeneralWebsiteListPref,
697                               lboWebsites,
698                               (intValueSeek));
699     frameCEWeb->ShowModal();
700     delete frameCEWeb;
701     frameCEWeb = NULL;
704 void frmContactEditor::ModifyGeneralWebsite( wxCommandEvent& event )
706     long longSelected = -1;
707     int intSelectedData = 0;
708     
709     if (!GetSelectedItem(lboWebsites,
710                          &longSelected,
711                          &intSelectedData)){
712         return;
713     }
714     
715     frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
716     frameCEWeb->SetupPointers(&ContactEditorData.GeneralWebsiteList,
717                               &ContactEditorData.GeneralWebsiteListAltID,
718                               &ContactEditorData.GeneralWebsiteListPID,
719                               &ContactEditorData.GeneralWebsiteListType,
720                               &ContactEditorData.GeneralWebsiteListTokens,
721                               &ContactEditorData.GeneralWebsiteListMediatype,
722                               &ContactEditorData.GeneralWebsiteListPref,
723                               lboWebsites,
724                               intSelectedData);
725     frameCEWeb->SetEditorMode(TRUE, CE_GENERAL);
726     frameCEWeb->ShowModal();
727     delete frameCEWeb;
728     frameCEWeb = NULL;
731 void frmContactEditor::DeleteGeneralWebsite( wxCommandEvent& event )
733     long longSelected = -1;
734     int intSelectedData = 0;
735     
736     if (!GetSelectedItem(lboWebsites,
737                          &longSelected,
738                          &intSelectedData)){
739         return;
740     }
741     
742     lboWebsites->DeleteItem(longSelected);
743     
744     DeleteMapData(intSelectedData, &ContactEditorData.GeneralWebsiteList,
745                   &ContactEditorData.GeneralWebsiteListAltID, &ContactEditorData.GeneralWebsiteListPID,
746                   &ContactEditorData.GeneralWebsiteListType, &ContactEditorData.GeneralWebsiteListTokens,
747                   &ContactEditorData.GeneralWebsiteListMediatype, &ContactEditorData.GeneralWebsiteListPref);
748     
751 void frmContactEditor::AddGeneralTitle( wxCommandEvent& event )
753     int intResult = 0;
754     
755     frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
756     frameCETitle->SetEditorMode(FALSE, CE_GENERAL);
757     intResult = GetLastInt(&ContactEditorData.GeneralTitleList);
758     frameCETitle->SetupPointers(&ContactEditorData.GeneralTitleList,
759                                 &ContactEditorData.GeneralTitleListLanguage,
760                                 &ContactEditorData.GeneralTitleListAltID,
761                                 &ContactEditorData.GeneralTitleListPID,
762                                 &ContactEditorData.GeneralTitleListType,
763                                 &ContactEditorData.GeneralTitleListTokens,
764                                 &ContactEditorData.GeneralTitleListPref,
765                                 lboTitles,
766                                 (intValueSeek));
767     frameCETitle->ShowModal();
768     delete frameCETitle;
769     frameCETitle = NULL;
772 void frmContactEditor::ModifyGeneralTitle( wxCommandEvent& event )
774     long longSelected = -1;
775     int intSelectedData = 0;
776     
777     if (!GetSelectedItem(lboTitles,
778                          &longSelected,
779                          &intSelectedData)){
780         return;
781     }
782     
783     frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
784     frameCETitle->SetupPointers(&ContactEditorData.GeneralTitleList,
785                                 &ContactEditorData.GeneralTitleListLanguage,
786                                 &ContactEditorData.GeneralTitleListAltID,
787                                 &ContactEditorData.GeneralTitleListPID,
788                                 &ContactEditorData.GeneralTitleListType,
789                                 &ContactEditorData.GeneralTitleListTokens,
790                                 &ContactEditorData.GeneralTitleListPref,
791                                 lboTitles,
792                                 intSelectedData);
793     frameCETitle->SetEditorMode(TRUE, CE_GENERAL);
794     frameCETitle->ShowModal();
795     delete frameCETitle;
796     frameCETitle = NULL;
799 void frmContactEditor::DeleteGeneralTitle( wxCommandEvent& event )
801     long longSelected = -1;
802     int intSelectedData = 0;
803     
804     if (!GetSelectedItem(lboTitles,
805                          &longSelected,
806                          &intSelectedData)){
807         return;
808     }
809     
810     lboTitles->DeleteItem(longSelected);
811     
812     DeleteMapData(intSelectedData, &ContactEditorData.GeneralTitleList,
813                   &ContactEditorData.GeneralTitleListLanguage, &ContactEditorData.GeneralTitleListAltID,
814                   &ContactEditorData.GeneralTitleListPID, &ContactEditorData.GeneralTitleListType,
815                   &ContactEditorData.GeneralTitleListTokens, &ContactEditorData.GeneralTitleListPref);
816     
819 void frmContactEditor::AddGeneralRole( wxCommandEvent& event )
821     int intResult = 0;
822     
823     frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
824     frameCERole->SetEditorMode(FALSE, CE_GENERAL);
825     intResult = GetLastInt(&ContactEditorData.GeneralRoleList);
826     frameCERole->SetupPointers(&ContactEditorData.GeneralRoleList,
827                                &ContactEditorData.GeneralRoleListLanguage,
828                                &ContactEditorData.GeneralRoleListAltID,
829                                &ContactEditorData.GeneralRoleListPID,
830                                &ContactEditorData.GeneralRoleListType,
831                                &ContactEditorData.GeneralRoleListTokens,
832                                &ContactEditorData.GeneralRoleListPref,
833                                lboRoles,
834                                (intValueSeek));
835     frameCERole->ShowModal();
836     delete frameCERole;
837     frameCERole = NULL;
840 void frmContactEditor::ModifyGeneralRole( wxCommandEvent& event )
842     long longSelected = -1;
843     int intSelectedData = 0;
844     
845     if (!GetSelectedItem(lboRoles,
846                          &longSelected,
847                          &intSelectedData)){
848         return;
849     }
850     
851     frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
852     frameCERole->SetupPointers(&ContactEditorData.GeneralRoleList,
853                                &ContactEditorData.GeneralRoleListLanguage,
854                                &ContactEditorData.GeneralRoleListAltID,
855                                &ContactEditorData.GeneralRoleListPID,
856                                &ContactEditorData.GeneralRoleListType,
857                                &ContactEditorData.GeneralRoleListTokens,
858                                &ContactEditorData.GeneralRoleListPref,
859                                lboRoles,
860                                intSelectedData);
861     frameCERole->SetEditorMode(TRUE, CE_GENERAL);
862     frameCERole->ShowModal();
863     delete frameCERole;
864     frameCERole = NULL;
867 void frmContactEditor::DeleteGeneralRole( wxCommandEvent& event )
869     long longSelected = -1;
870     int intSelectedData = 0;
871     
872     if (!GetSelectedItem(lboRoles,
873                          &longSelected,
874                          &intSelectedData)){
875         return;
876     }
877     
878     lboRoles->DeleteItem(longSelected);
879     
880     DeleteMapData(intSelectedData, &ContactEditorData.GeneralRoleList,
881                   &ContactEditorData.GeneralRoleListLanguage, &ContactEditorData.GeneralRoleListAltID,
882                   &ContactEditorData.GeneralRoleListPID, &ContactEditorData.GeneralRoleListType,
883                   &ContactEditorData.GeneralRoleListTokens, &ContactEditorData.GeneralRoleListPref);
884     
887 void frmContactEditor::AddGeneralOrganisation( wxCommandEvent& event )
889     int intResult = 0;
890     
891     frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
892     frameCEOrg->SetEditorMode(FALSE, CE_GENERAL);
893     intResult = GetLastInt(&ContactEditorData.GeneralOrganisationsList);
894     frameCEOrg->SetupPointers(&ContactEditorData.GeneralOrganisationsList,
895                               &ContactEditorData.GeneralOrganisationsListLanguage,
896                               &ContactEditorData.GeneralOrganisationsListSortAs,
897                               &ContactEditorData.GeneralOrganisationsListAltID,
898                               &ContactEditorData.GeneralOrganisationsListPID,
899                               &ContactEditorData.GeneralOrganisationsListType,
900                               &ContactEditorData.GeneralOrganisationsListTokens,
901                               &ContactEditorData.GeneralOrganisationsListPref,
902                               lboOrganisations,
903                               (intValueSeek));
904     frameCEOrg->ShowModal();
905     delete frameCEOrg;
906     frameCEOrg = NULL;
909 void frmContactEditor::ModifyGeneralOrganisation( wxCommandEvent& event )
911     long longSelected = -1;
912     int intSelectedData = 0;
913     
914     if (!GetSelectedItem(lboOrganisations,
915                          &longSelected,
916                          &intSelectedData)){
917         return;
918     }
919     
920     frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
921     frameCEOrg->SetupPointers(&ContactEditorData.GeneralOrganisationsList,
922                               &ContactEditorData.GeneralOrganisationsListLanguage,
923                               &ContactEditorData.GeneralOrganisationsListSortAs,
924                               &ContactEditorData.GeneralOrganisationsListAltID,
925                               &ContactEditorData.GeneralOrganisationsListPID,
926                               &ContactEditorData.GeneralOrganisationsListType,
927                               &ContactEditorData.GeneralOrganisationsListTokens,
928                               &ContactEditorData.GeneralOrganisationsListPref,
929                               lboOrganisations,
930                               intSelectedData);
931     frameCEOrg->SetEditorMode(TRUE, CE_GENERAL);
932     frameCEOrg->ShowModal();
933     delete frameCEOrg;
934     frameCEOrg = NULL;
937 void frmContactEditor::DeleteGeneralOrganisation( wxCommandEvent& event )
939     long longSelected = -1;
940     int intSelectedData = 0;
941     
942     if (!GetSelectedItem(lboOrganisations,
943                          &longSelected,
944                          &intSelectedData)){
945         return;
946     }
947     
948     lboOrganisations->DeleteItem(longSelected);
949     
950     DeleteMapData(intSelectedData, &ContactEditorData.GeneralOrganisationsList,
951                   &ContactEditorData.GeneralOrganisationsListLanguage, &ContactEditorData.GeneralOrganisationsListSortAs,
952                   &ContactEditorData.GeneralOrganisationsListAltID, &ContactEditorData.GeneralOrganisationsListPID,
953                   &ContactEditorData.GeneralOrganisationsListType, &ContactEditorData.GeneralOrganisationsListTokens,
954                   &ContactEditorData.GeneralOrganisationsListPref);
955     
958 void frmContactEditor::AddGeneralNote( wxCommandEvent& event )
960     int intResult = 0;
961     
962     frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
963     frameCENote->SetEditorMode(FALSE, CE_GENERAL);
964     intResult = GetLastInt(&ContactEditorData.GeneralNoteList);
965     frameCENote->SetupPointers(&ContactEditorData.GeneralNoteList,
966                                &ContactEditorData.GeneralNoteListLanguage,
967                                &ContactEditorData.GeneralNoteListAltID,
968                                &ContactEditorData.GeneralNoteListPID,
969                                &ContactEditorData.GeneralNoteListType,
970                                &ContactEditorData.GeneralNoteListTokens,
971                                &ContactEditorData.GeneralNoteListPref,
972                                lboNotes,
973                                (intValueSeek));
974     frameCENote->ShowModal();
975     delete frameCENote;
976     frameCENote = NULL;
979 void frmContactEditor::ModifyGeneralNote( wxCommandEvent& event )
981     long longSelected = -1;
982     int intSelectedData = 0;
983     
984     if (!GetSelectedItem(lboNotes,
985                          &longSelected,
986                          &intSelectedData)){
987         return;
988     }
989     
990     frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
991     frameCENote->SetupPointers(&ContactEditorData.GeneralNoteList,
992                                &ContactEditorData.GeneralNoteListLanguage,
993                                &ContactEditorData.GeneralNoteListAltID,
994                                &ContactEditorData.GeneralNoteListPID,
995                                &ContactEditorData.GeneralNoteListType,
996                                &ContactEditorData.GeneralNoteListTokens,
997                                &ContactEditorData.GeneralNoteListPref,
998                                lboNotes,
999                                intSelectedData);
1000     frameCENote->SetEditorMode(TRUE, CE_GENERAL);
1001     frameCENote->ShowModal();
1002     delete frameCENote;
1003     frameCENote = NULL;
1006 void frmContactEditor::DeleteGeneralNote( wxCommandEvent& event )
1008     long longSelected = -1;
1009     int intSelectedData = 0;
1010     
1011     if (!GetSelectedItem(lboNotes,
1012                          &longSelected,
1013                          &intSelectedData)){
1014         return;
1015     }
1016     
1017     lboNotes->DeleteItem(longSelected);
1018     
1019     DeleteMapData(intSelectedData, &ContactEditorData.GeneralNoteList,
1020                   &ContactEditorData.GeneralNoteListLanguage, &ContactEditorData.GeneralNoteListAltID,
1021                   &ContactEditorData.GeneralNoteListPID, &ContactEditorData.GeneralNoteListType,
1022                   &ContactEditorData.GeneralNoteListTokens, &ContactEditorData.GeneralNoteListPref);
1023     
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