Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Updated DeleteGeneralRelated to use DeleteMapData.
[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.GeneralIMListTokens,
286                              &ContactEditorData.GeneralIMListMediatype,
287                              &ContactEditorData.GeneralIMListPref,
288                              lboIM,
289                              (intValueSeek));
290     frameCEIM->ShowModal();
291     delete frameCEIM;
292     frameCEIM = NULL;
295 void frmContactEditor::ModifyGeneralIM( wxCommandEvent& event )
297     long longSelected = -1;
298     int intSelectedData = 0;
299     
300     if (!GetSelectedItem(lboIM,
301                          &longSelected,
302                          &intSelectedData)){
303         return;
304     }
305     
306     frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
307     frameCEIM->SetupPointers(&ContactEditorData.GeneralIMList,
308                              &ContactEditorData.GeneralIMListAltID,
309                              &ContactEditorData.GeneralIMListPID,
310                              &ContactEditorData.GeneralIMListType,
311                              &ContactEditorData.GeneralIMListTokens,
312                              &ContactEditorData.GeneralIMListMediatype,
313                              &ContactEditorData.GeneralIMListPref,
314                              lboIM,
315                              intSelectedData);
316     frameCEIM->SetEditorMode(TRUE, CE_GENERAL);
317     frameCEIM->ShowModal();
318     delete frameCEIM;
319     frameCEIM = NULL;
322 void frmContactEditor::DeleteGeneralIM( wxCommandEvent& event )
324     long longSelected = -1;
325     int intSelectedData = 0;
326     
327     if (!GetSelectedItem(lboIM,
328                          &longSelected,
329                          &intSelectedData)){
330         return;
331     }
332     
333     lboIM->DeleteItem(longSelected);
334     
335     DeleteMapData(intSelectedData, &ContactEditorData.GeneralIMList,
336                   &ContactEditorData.GeneralIMListAltID, &ContactEditorData.GeneralIMListPID,
337                   &ContactEditorData.GeneralIMListType, &ContactEditorData.GeneralIMListTokens,
338                   &ContactEditorData.GeneralIMListMediatype, &ContactEditorData.GeneralIMListPref);
339     
342 void frmContactEditor::AddGeneralTelephone( wxCommandEvent& event )
344     int intResult = 0;
345     
346     frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
347     frameCETel->SetEditorMode(FALSE, CE_GENERAL);
348     intResult = GetLastInt(&ContactEditorData.GeneralTelephoneList);
349     frameCETel->SetupPointers(&ContactEditorData.GeneralTelephoneList,
350                               &ContactEditorData.GeneralTelephoneListAltID,
351                               &ContactEditorData.GeneralTelephoneListPID,
352                               &ContactEditorData.GeneralTelephoneListType,
353                               &ContactEditorData.GeneralTelephoneListTokens,
354                               &ContactEditorData.GeneralTelephoneListPref,
355                               lboTelephone,
356                               (intValueSeek));
357     frameCETel->ShowModal();
358     delete frameCETel;
359     frameCETel = NULL;
362 void frmContactEditor::ModifyGeneralTelephone( wxCommandEvent& event )
364     long longSelected = -1;
365     int intSelectedData = 0;
366     
367     if (!GetSelectedItem(lboTelephone,
368                          &longSelected,
369                          &intSelectedData)){
370         return;
371     }
372     
373     frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
374     frameCETel->SetupPointers(&ContactEditorData.GeneralTelephoneList,
375                               &ContactEditorData.GeneralTelephoneListAltID,
376                               &ContactEditorData.GeneralTelephoneListPID,
377                               &ContactEditorData.GeneralTelephoneListType,
378                               &ContactEditorData.GeneralTelephoneListTokens,
379                               &ContactEditorData.GeneralTelephoneListPref,
380                               lboTelephone,
381                               intSelectedData);
382     frameCETel->SetEditorMode(TRUE, CE_GENERAL);
383     frameCETel->ShowModal();
384     delete frameCETel;
385     frameCETel = NULL;
388 void frmContactEditor::DeleteGeneralTelephone( wxCommandEvent& event )
390     long longSelected = -1;
391     int intSelectedData = 0;
392     
393     if (!GetSelectedItem(lboTelephone,
394                          &longSelected,
395                          &intSelectedData)){
396         return;
397     }
398     
399     lboTelephone->DeleteItem(longSelected);
400     
401     DeleteMapData(intSelectedData, &ContactEditorData.GeneralTelephoneList,
402                   &ContactEditorData.GeneralTelephoneListAltID, &ContactEditorData.GeneralTelephoneListPID,
403                   &ContactEditorData.GeneralTelephoneListType, &ContactEditorData.GeneralTelephoneListTokens,
404                   &ContactEditorData.GeneralTelephoneListPref);
405     
408 void frmContactEditor::AddGeneralLanguages( wxCommandEvent& event )
410     int intResult = 0;
411     
412     frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
413     frameCELang->SetEditorMode(FALSE, CE_GENERAL);
414     intResult = GetLastInt(&ContactEditorData.GeneralLanguageList);
415     frameCELang->SetupPointers(&ContactEditorData.GeneralLanguageList,
416                                &ContactEditorData.GeneralLanguageListAltID,
417                                &ContactEditorData.GeneralLanguageListPID,
418                                &ContactEditorData.GeneralLanguageListType,
419                                &ContactEditorData.GeneralLanguageListTokens,
420                                &ContactEditorData.GeneralLanguageListPref,
421                                lboLanguages,
422                                (intValueSeek));
423     frameCELang->ShowModal();
424     delete frameCELang;
425     frameCELang = NULL;
428 void frmContactEditor::ModifyGeneralLanguages( wxCommandEvent& event )
430     long longSelected = -1;
431     int intSelectedData = 0;
432     
433     if (!GetSelectedItem(lboLanguages,
434                          &longSelected,
435                          &intSelectedData)){
436         return;
437     }
438     
439     frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
440     frameCELang->SetupPointers(&ContactEditorData.GeneralLanguageList,
441                                &ContactEditorData.GeneralLanguageListAltID,
442                                &ContactEditorData.GeneralLanguageListPID,
443                                &ContactEditorData.GeneralLanguageListType,
444                                &ContactEditorData.GeneralLanguageListTokens,
445                                &ContactEditorData.GeneralLanguageListPref,
446                                lboLanguages,
447                                intSelectedData);
448     frameCELang->SetEditorMode(TRUE, CE_GENERAL);
449     frameCELang->ShowModal();
450     delete frameCELang;
451     frameCELang = NULL;
454 void frmContactEditor::DeleteGeneralLanguage( wxCommandEvent& event )
456     long longSelected = -1;
457     int intSelectedData = 0;
458     
459     if (!GetSelectedItem(lboLanguages,
460                          &longSelected,
461                          &intSelectedData)){
462         return;
463     }
464     
465     lboLanguages->DeleteItem(longSelected);
466     
467     DeleteMapData(intSelectedData, &ContactEditorData.GeneralLanguageList,
468                   &ContactEditorData.GeneralLanguageListAltID, &ContactEditorData.GeneralLanguageListPID,
469                   &ContactEditorData.GeneralLanguageListType, &ContactEditorData.GeneralLanguageListTokens,
470                   &ContactEditorData.GeneralLanguageListPref);
471     
474 void frmContactEditor::AddGeneralTimezone( wxCommandEvent& event )
476     int intResult = 0;
477     
478     frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
479     frameCETZ->SetEditorMode(FALSE, CE_GENERAL);
480     intResult = GetLastInt(&ContactEditorData.GeneralTZList);
481     frameCETZ->SetupPointers(&ContactEditorData.GeneralTZList,
482                              &ContactEditorData.GeneralTZListAltID,
483                              &ContactEditorData.GeneralTZListPID,
484                              &ContactEditorData.GeneralTZListType,
485                              &ContactEditorData.GeneralTZListTokens,
486                              &ContactEditorData.GeneralTZListMediatype,
487                              &ContactEditorData.GeneralTZListPref,
488                              lboTimezones,
489                              (intValueSeek));
490     frameCETZ->ShowModal();
491     delete frameCETZ;
492     frameCETZ = NULL;
495 void frmContactEditor::ModifyGeneralTimezone( wxCommandEvent& event )
497     long longSelected = -1;
498     int intSelectedData = 0;
499     
500     if (!GetSelectedItem(lboTimezones,
501                          &longSelected,
502                          &intSelectedData)){
503         return;
504     }
505     
506     frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
507     frameCETZ->SetupPointers(&ContactEditorData.GeneralTZList,
508                              &ContactEditorData.GeneralTZListAltID,
509                              &ContactEditorData.GeneralTZListPID,
510                              &ContactEditorData.GeneralTZListType,
511                              &ContactEditorData.GeneralTZListTokens,
512                              &ContactEditorData.GeneralTZListMediatype,
513                              &ContactEditorData.GeneralTZListPref,
514                              lboTimezones,
515                              intSelectedData);
516     frameCETZ->SetEditorMode(TRUE, CE_GENERAL);
517     frameCETZ->ShowModal();
518     delete frameCETZ;
519     frameCETZ = NULL;
522 void frmContactEditor::DeleteGeneralTimezone( wxCommandEvent& event )
524     long longSelected = -1;
525     int intSelectedData = 0;
526     
527     if (!GetSelectedItem(lboTimezones,
528                          &longSelected,
529                          &intSelectedData)){
530         return;
531     }
532     
533     lboTimezones->DeleteItem(longSelected);
534     
535     DeleteMapData(intSelectedData, &ContactEditorData.GeneralTZList,
536                   &ContactEditorData.GeneralTZListAltID, &ContactEditorData.GeneralTZListPID,
537                   &ContactEditorData.GeneralTZListType, &ContactEditorData.GeneralTZListTokens,
538                   &ContactEditorData.GeneralTZListMediatype, &ContactEditorData.GeneralTZListPref);
539     
542 void frmContactEditor::AddGeneralGeoposition( wxCommandEvent& event )
544     int intResult = 0;
545     
546     frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
547     frameCEGeo->SetEditorMode(FALSE, CE_GENERAL);
548     intResult = GetLastInt(&ContactEditorData.GeneralGeographyList);
549     frameCEGeo->SetupPointers(&ContactEditorData.GeneralGeographyList,
550                               &ContactEditorData.GeneralGeographyListAltID,
551                               &ContactEditorData.GeneralGeographyListPID,
552                               &ContactEditorData.GeneralGeographyListType,
553                               &ContactEditorData.GeneralGeographyListTokens,
554                               &ContactEditorData.GeneralGeographyListMediatype,
555                               &ContactEditorData.GeneralGeographyListPref,
556                               lboGeoposition,
557                               (intValueSeek));
558     frameCEGeo->ShowModal();
559     delete frameCEGeo;
560     frameCEGeo = NULL;
563 void frmContactEditor::ModifyGeneralGeoposition( wxCommandEvent& event )
565     long longSelected = -1;
566     int intSelectedData = 0;
567     
568     if (!GetSelectedItem(lboGeoposition,
569                          &longSelected,
570                          &intSelectedData)){
571         return;
572     }
573     
574     frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
575     frameCEGeo->SetupPointers(&ContactEditorData.GeneralGeographyList,
576                               &ContactEditorData.GeneralGeographyListAltID,
577                               &ContactEditorData.GeneralGeographyListPID,
578                               &ContactEditorData.GeneralGeographyListType,
579                               &ContactEditorData.GeneralGeographyListTokens,
580                               &ContactEditorData.GeneralGeographyListMediatype,
581                               &ContactEditorData.GeneralGeographyListPref,
582                               lboGeoposition,
583                               intSelectedData);
584     frameCEGeo->SetEditorMode(TRUE, CE_GENERAL);
585     frameCEGeo->ShowModal();
586     delete frameCEGeo;
587     frameCEGeo = NULL;
590 void frmContactEditor::DeleteGeneralGeoposition( wxCommandEvent& event )
592     long longSelected = -1;
593     int intSelectedData = 0;
594     
595     if (!GetSelectedItem(lboGeoposition,
596                          &longSelected,
597                          &intSelectedData)){
598         return;
599     }
600     
601     lboGeoposition->DeleteItem(longSelected);
602     
603     DeleteMapData(intSelectedData, &ContactEditorData.GeneralGeographyList,
604                   &ContactEditorData.GeneralGeographyListAltID, &ContactEditorData.GeneralGeographyListPID,
605                   &ContactEditorData.GeneralGeographyListType, &ContactEditorData.GeneralGeographyListTokens,
606                   &ContactEditorData.GeneralGeographyListMediatype, &ContactEditorData.GeneralGeographyListPref);
607     
610 void frmContactEditor::AddGeneralRelated( wxCommandEvent& event )
612     int intResult = 0;
613     
614     frmContactEditorRelated *frameCERel = new frmContactEditorRelated ( this );
615     frameCERel->SetEditorMode(FALSE, CE_GENERAL);
616     intResult = GetLastInt(&ContactEditorData.GeneralRelatedList);
617     frameCERel->SetupPointers(&ContactEditorData.GeneralRelatedList,
618                               &ContactEditorData.GeneralRelatedListRelType,
619                               &ContactEditorData.GeneralRelatedListAltID,
620                               &ContactEditorData.GeneralRelatedListPID,
621                               &ContactEditorData.GeneralRelatedListType,
622                               &ContactEditorData.GeneralRelatedListTokens,
623                               &ContactEditorData.GeneralRelatedListPref,
624                               lboRelated,
625                               (intValueSeek));
626     frameCERel->ShowModal();
627     delete frameCERel;
628     frameCERel = NULL;
631 void frmContactEditor::ModifyGeneralRelated( wxCommandEvent& event )
633     long longSelected = -1;
634     int intSelectedData = 0;
635     
636     if (!GetSelectedItem(lboRelated,
637                          &longSelected,
638                          &intSelectedData)){
639         return;
640     }
641     
642     frmContactEditorRelated *frameCERel = new frmContactEditorRelated ( this );
643     frameCERel->SetupPointers(&ContactEditorData.GeneralRelatedList,
644                               &ContactEditorData.GeneralRelatedListRelType,
645                               &ContactEditorData.GeneralRelatedListAltID,
646                               &ContactEditorData.GeneralRelatedListPID,
647                               &ContactEditorData.GeneralRelatedListType,
648                               &ContactEditorData.GeneralRelatedListTokens,
649                               &ContactEditorData.GeneralRelatedListPref,
650                               lboRelated,
651                               intSelectedData);
652     frameCERel->SetEditorMode(TRUE, CE_GENERAL);
653     frameCERel->ShowModal();
654     delete frameCERel;
655     frameCERel = NULL;
658 void frmContactEditor::DeleteGeneralRelated( wxCommandEvent& event )
660     long longSelected = -1;
661     int intSelectedData = 0;
662     
663     if (!GetSelectedItem(lboRelated,
664                          &longSelected,
665                          &intSelectedData)){
666         return;
667     }
668     
669     lboRelated->DeleteItem(longSelected);
670     
671     DeleteMapData(intSelectedData, &ContactEditorData.GeneralRelatedList,
672         &ContactEditorData.GeneralRelatedListRelType, &ContactEditorData.GeneralRelatedListAltID,
673         &ContactEditorData.GeneralRelatedListPID, &ContactEditorData.GeneralRelatedListType,
674         &ContactEditorData.GeneralRelatedListTokens, &ContactEditorData.GeneralRelatedListPref);
675     
678 void frmContactEditor::AddGeneralWebsite( wxCommandEvent& event )
680     int intResult = 0;
681     
682     frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
683     frameCEWeb->SetEditorMode(FALSE, CE_GENERAL);
684     intResult = GetLastInt(&ContactEditorData.GeneralWebsiteList);
685     frameCEWeb->SetupPointers(&ContactEditorData.GeneralWebsiteList,
686                               &ContactEditorData.GeneralWebsiteListAltID,
687                               &ContactEditorData.GeneralWebsiteListPID,
688                               &ContactEditorData.GeneralWebsiteListType,
689                               &ContactEditorData.GeneralWebsiteListTokens,
690                               &ContactEditorData.GeneralWebsiteListMediatype,
691                               &ContactEditorData.GeneralWebsiteListPref,
692                               lboWebsites,
693                               (intValueSeek));
694     frameCEWeb->ShowModal();
695     delete frameCEWeb;
696     frameCEWeb = NULL;
699 void frmContactEditor::ModifyGeneralWebsite( wxCommandEvent& event )
701     long longSelected = -1;
702     int intSelectedData = 0;
703     
704     if (!GetSelectedItem(lboWebsites,
705                          &longSelected,
706                          &intSelectedData)){
707         return;
708     }
709     
710     frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
711     frameCEWeb->SetupPointers(&ContactEditorData.GeneralWebsiteList,
712                               &ContactEditorData.GeneralWebsiteListAltID,
713                               &ContactEditorData.GeneralWebsiteListPID,
714                               &ContactEditorData.GeneralWebsiteListType,
715                               &ContactEditorData.GeneralWebsiteListTokens,
716                               &ContactEditorData.GeneralWebsiteListMediatype,
717                               &ContactEditorData.GeneralWebsiteListPref,
718                               lboWebsites,
719                               intSelectedData);
720     frameCEWeb->SetEditorMode(TRUE, CE_GENERAL);
721     frameCEWeb->ShowModal();
722     delete frameCEWeb;
723     frameCEWeb = NULL;
726 void frmContactEditor::DeleteGeneralWebsite( wxCommandEvent& event )
728     long longSelected = -1;
729     int intSelectedData = 0;
730     
731     if (!GetSelectedItem(lboWebsites,
732                          &longSelected,
733                          &intSelectedData)){
734         return;
735     }
736     
737     lboWebsites->DeleteItem(longSelected);
738     
739     DeleteMapData(intSelectedData, &ContactEditorData.GeneralWebsiteList,
740                   &ContactEditorData.GeneralWebsiteListAltID, &ContactEditorData.GeneralWebsiteListPID,
741                   &ContactEditorData.GeneralWebsiteListType, &ContactEditorData.GeneralWebsiteListTokens,
742                   &ContactEditorData.GeneralWebsiteListMediatype, &ContactEditorData.GeneralWebsiteListPref);
743     
746 void frmContactEditor::AddGeneralTitle( wxCommandEvent& event )
748     int intResult = 0;
749     
750     frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
751     frameCETitle->SetEditorMode(FALSE, CE_GENERAL);
752     intResult = GetLastInt(&ContactEditorData.GeneralTitleList);
753     frameCETitle->SetupPointers(&ContactEditorData.GeneralTitleList,
754                                 &ContactEditorData.GeneralTitleListLanguage,
755                                 &ContactEditorData.GeneralTitleListAltID,
756                                 &ContactEditorData.GeneralTitleListPID,
757                                 &ContactEditorData.GeneralTitleListType,
758                                 &ContactEditorData.GeneralTitleListTokens,
759                                 &ContactEditorData.GeneralTitleListPref,
760                                 lboTitles,
761                                 (intValueSeek));
762     frameCETitle->ShowModal();
763     delete frameCETitle;
764     frameCETitle = NULL;
767 void frmContactEditor::ModifyGeneralTitle( wxCommandEvent& event )
769     long longSelected = -1;
770     int intSelectedData = 0;
771     
772     if (!GetSelectedItem(lboTitles,
773                          &longSelected,
774                          &intSelectedData)){
775         return;
776     }
777     
778     frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
779     frameCETitle->SetupPointers(&ContactEditorData.GeneralTitleList,
780                                 &ContactEditorData.GeneralTitleListLanguage,
781                                 &ContactEditorData.GeneralTitleListAltID,
782                                 &ContactEditorData.GeneralTitleListPID,
783                                 &ContactEditorData.GeneralTitleListType,
784                                 &ContactEditorData.GeneralTitleListTokens,
785                                 &ContactEditorData.GeneralTitleListPref,
786                                 lboTitles,
787                                 intSelectedData);
788     frameCETitle->SetEditorMode(TRUE, CE_GENERAL);
789     frameCETitle->ShowModal();
790     delete frameCETitle;
791     frameCETitle = NULL;
794 void frmContactEditor::DeleteGeneralTitle( wxCommandEvent& event )
796     long longSelected = -1;
797     int intSelectedData = 0;
798     
799     if (!GetSelectedItem(lboTitles,
800                          &longSelected,
801                          &intSelectedData)){
802         return;
803     }
804     
805     lboTitles->DeleteItem(longSelected);
806     
807     DeleteMapData(intSelectedData, &ContactEditorData.GeneralTitleList,
808                   &ContactEditorData.GeneralTitleListLanguage, &ContactEditorData.GeneralTitleListAltID,
809                   &ContactEditorData.GeneralTitleListPID, &ContactEditorData.GeneralTitleListType,
810                   &ContactEditorData.GeneralTitleListTokens, &ContactEditorData.GeneralTitleListPref);
811     
814 void frmContactEditor::AddGeneralRole( wxCommandEvent& event )
816     int intResult = 0;
817     
818     frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
819     frameCERole->SetEditorMode(FALSE, CE_GENERAL);
820     intResult = GetLastInt(&ContactEditorData.GeneralRoleList);
821     frameCERole->SetupPointers(&ContactEditorData.GeneralRoleList,
822                                &ContactEditorData.GeneralRoleListLanguage,
823                                &ContactEditorData.GeneralRoleListAltID,
824                                &ContactEditorData.GeneralRoleListPID,
825                                &ContactEditorData.GeneralRoleListType,
826                                &ContactEditorData.GeneralRoleListTokens,
827                                &ContactEditorData.GeneralRoleListPref,
828                                lboRoles,
829                                (intValueSeek));
830     frameCERole->ShowModal();
831     delete frameCERole;
832     frameCERole = NULL;
835 void frmContactEditor::ModifyGeneralRole( wxCommandEvent& event )
837     long longSelected = -1;
838     int intSelectedData = 0;
839     
840     if (!GetSelectedItem(lboRoles,
841                          &longSelected,
842                          &intSelectedData)){
843         return;
844     }
845     
846     frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
847     frameCERole->SetupPointers(&ContactEditorData.GeneralRoleList,
848                                &ContactEditorData.GeneralRoleListLanguage,
849                                &ContactEditorData.GeneralRoleListAltID,
850                                &ContactEditorData.GeneralRoleListPID,
851                                &ContactEditorData.GeneralRoleListType,
852                                &ContactEditorData.GeneralRoleListTokens,
853                                &ContactEditorData.GeneralRoleListPref,
854                                lboRoles,
855                                intSelectedData);
856     frameCERole->SetEditorMode(TRUE, CE_GENERAL);
857     frameCERole->ShowModal();
858     delete frameCERole;
859     frameCERole = NULL;
862 void frmContactEditor::DeleteGeneralRole( wxCommandEvent& event )
864     long longSelected = -1;
865     int intSelectedData = 0;
866     
867     if (!GetSelectedItem(lboRoles,
868                          &longSelected,
869                          &intSelectedData)){
870         return;
871     }
872     
873     lboRoles->DeleteItem(longSelected);
874     
875     DeleteMapData(intSelectedData, &ContactEditorData.GeneralRoleList,
876                   &ContactEditorData.GeneralRoleListLanguage, &ContactEditorData.GeneralRoleListAltID,
877                   &ContactEditorData.GeneralRoleListPID, &ContactEditorData.GeneralRoleListType,
878                   &ContactEditorData.GeneralRoleListTokens, &ContactEditorData.GeneralRoleListPref);
879     
882 void frmContactEditor::AddGeneralOrganisation( wxCommandEvent& event )
884     int intResult = 0;
885     
886     frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
887     frameCEOrg->SetEditorMode(FALSE, CE_GENERAL);
888     intResult = GetLastInt(&ContactEditorData.GeneralOrganisationsList);
889     frameCEOrg->SetupPointers(&ContactEditorData.GeneralOrganisationsList,
890                               &ContactEditorData.GeneralOrganisationsListLanguage,
891                               &ContactEditorData.GeneralOrganisationsListSortAs,
892                               &ContactEditorData.GeneralOrganisationsListAltID,
893                               &ContactEditorData.GeneralOrganisationsListPID,
894                               &ContactEditorData.GeneralOrganisationsListType,
895                               &ContactEditorData.GeneralOrganisationsListTokens,
896                               &ContactEditorData.GeneralOrganisationsListPref,
897                               lboOrganisations,
898                               (intValueSeek));
899     frameCEOrg->ShowModal();
900     delete frameCEOrg;
901     frameCEOrg = NULL;
904 void frmContactEditor::ModifyGeneralOrganisation( wxCommandEvent& event )
906     long longSelected = -1;
907     int intSelectedData = 0;
908     
909     if (!GetSelectedItem(lboOrganisations,
910                          &longSelected,
911                          &intSelectedData)){
912         return;
913     }
914     
915     frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
916     frameCEOrg->SetupPointers(&ContactEditorData.GeneralOrganisationsList,
917                               &ContactEditorData.GeneralOrganisationsListLanguage,
918                               &ContactEditorData.GeneralOrganisationsListSortAs,
919                               &ContactEditorData.GeneralOrganisationsListAltID,
920                               &ContactEditorData.GeneralOrganisationsListPID,
921                               &ContactEditorData.GeneralOrganisationsListType,
922                               &ContactEditorData.GeneralOrganisationsListTokens,
923                               &ContactEditorData.GeneralOrganisationsListPref,
924                               lboOrganisations,
925                               intSelectedData);
926     frameCEOrg->SetEditorMode(TRUE, CE_GENERAL);
927     frameCEOrg->ShowModal();
928     delete frameCEOrg;
929     frameCEOrg = NULL;
932 void frmContactEditor::DeleteGeneralOrganisation( wxCommandEvent& event )
934     long longSelected = -1;
935     int intSelectedData = 0;
936     
937     if (!GetSelectedItem(lboOrganisations,
938                          &longSelected,
939                          &intSelectedData)){
940         return;
941     }
942     
943     lboOrganisations->DeleteItem(longSelected);
944     
945     DeleteMapData(intSelectedData, &ContactEditorData.GeneralOrganisationsList,
946                   &ContactEditorData.GeneralOrganisationsListLanguage, &ContactEditorData.GeneralOrganisationsListSortAs,
947                   &ContactEditorData.GeneralOrganisationsListAltID, &ContactEditorData.GeneralOrganisationsListPID,
948                   &ContactEditorData.GeneralOrganisationsListType, &ContactEditorData.GeneralOrganisationsListTokens,
949                   &ContactEditorData.GeneralOrganisationsListPref);
950     
953 void frmContactEditor::AddGeneralNote( wxCommandEvent& event )
955     int intResult = 0;
956     
957     frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
958     frameCENote->SetEditorMode(FALSE, CE_GENERAL);
959     intResult = GetLastInt(&ContactEditorData.GeneralNoteList);
960     frameCENote->SetupPointers(&ContactEditorData.GeneralNoteList,
961                                &ContactEditorData.GeneralNoteListLanguage,
962                                &ContactEditorData.GeneralNoteListAltID,
963                                &ContactEditorData.GeneralNoteListPID,
964                                &ContactEditorData.GeneralNoteListType,
965                                &ContactEditorData.GeneralNoteListTokens,
966                                &ContactEditorData.GeneralNoteListPref,
967                                lboNotes,
968                                (intValueSeek));
969     frameCENote->ShowModal();
970     delete frameCENote;
971     frameCENote = NULL;
974 void frmContactEditor::ModifyGeneralNote( wxCommandEvent& event )
976     long longSelected = -1;
977     int intSelectedData = 0;
978     
979     if (!GetSelectedItem(lboNotes,
980                          &longSelected,
981                          &intSelectedData)){
982         return;
983     }
984     
985     frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
986     frameCENote->SetupPointers(&ContactEditorData.GeneralNoteList,
987                                &ContactEditorData.GeneralNoteListLanguage,
988                                &ContactEditorData.GeneralNoteListAltID,
989                                &ContactEditorData.GeneralNoteListPID,
990                                &ContactEditorData.GeneralNoteListType,
991                                &ContactEditorData.GeneralNoteListTokens,
992                                &ContactEditorData.GeneralNoteListPref,
993                                lboNotes,
994                                intSelectedData);
995     frameCENote->SetEditorMode(TRUE, CE_GENERAL);
996     frameCENote->ShowModal();
997     delete frameCENote;
998     frameCENote = NULL;
1001 void frmContactEditor::DeleteGeneralNote( wxCommandEvent& event )
1003     long longSelected = -1;
1004     int intSelectedData = 0;
1005     
1006     if (!GetSelectedItem(lboNotes,
1007                          &longSelected,
1008                          &intSelectedData)){
1009         return;
1010     }
1011     
1012     lboNotes->DeleteItem(longSelected);
1013     
1014     DeleteMapData(intSelectedData, &ContactEditorData.GeneralNoteList,
1015                   &ContactEditorData.GeneralNoteListLanguage, &ContactEditorData.GeneralNoteListAltID,
1016                   &ContactEditorData.GeneralNoteListPID, &ContactEditorData.GeneralNoteListType,
1017                   &ContactEditorData.GeneralNoteListTokens, &ContactEditorData.GeneralNoteListPref);
1018     
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