Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
More enhancements for IMPP and TEL in frmContactEditor and frmContactEditorTelephone.
[xestiaab/.git] / source / contacteditor / frmContactEditor-Home.cpp
1 // frmContactEditor-Home.cpp - frmContactEditor Home 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::AddHomeNickname( wxCommandEvent& event )
37 {
38     int intResult = 0;
39     
40     frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
41     frameCENickname->SetEditorMode(FALSE, CE_HOME);
42     intResult = GetLastInt(&ContactEditorData.HomeNicknamesList);
43     frameCENickname->SetupPointers(&ContactEditorData.HomeNicknamesList,
44                                    &ContactEditorData.HomeNicknamesListAltID,
45                                    &ContactEditorData.HomeNicknamesListPID,
46                                    &ContactEditorData.HomeNicknamesListType,
47                                    &ContactEditorData.HomeNicknamesListLanguage,
48                                    &ContactEditorData.HomeNicknamesListTokens,
49                                    &ContactEditorData.HomeNicknamesListPref,
50                                    lboHomeNicknames,
51                                    (intValueSeek));
52     frameCENickname->ShowModal();
53     delete frameCENickname;
54     frameCENickname = NULL;
55 }
57 void frmContactEditor::ModifyHomeNickname( wxCommandEvent& event )
58 {
59     long longSelected = -1;
60     int intSelectedData = 0;
61     
62     if (!GetSelectedItem(lboHomeNicknames,
63                          &longSelected,
64                          &intSelectedData)){
65         return;
66     }
67     
68     frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
69     frameCENickname->SetupPointers(&ContactEditorData.HomeNicknamesList,
70                                    &ContactEditorData.HomeNicknamesListAltID,
71                                    &ContactEditorData.HomeNicknamesListPID,
72                                    &ContactEditorData.HomeNicknamesListType,
73                                    &ContactEditorData.HomeNicknamesListLanguage,
74                                    &ContactEditorData.HomeNicknamesListTokens,
75                                    &ContactEditorData.HomeNicknamesListPref,
76                                    lboHomeNicknames,
77                                    intSelectedData);
78     frameCENickname->SetEditorMode(TRUE, CE_HOME);
79     frameCENickname->ShowModal();
80     delete frameCENickname;
81     frameCENickname = NULL;
82 }
84 void frmContactEditor::DeleteHomeNickname( wxCommandEvent& event )
85 {
86     
87     long longSelected = -1;
88     int intSelectedData = 0;
89     
90     if (!GetSelectedItem(lboHomeNicknames,
91                          &longSelected,
92                          &intSelectedData)){
93         return;
94     }
95     
96     lboHomeNicknames->DeleteItem(longSelected);
97     
98     DeleteMapData(intSelectedData,
99                   &ContactEditorData.HomeNicknamesList,
100                   &ContactEditorData.HomeNicknamesListLanguage,
101                   &ContactEditorData.HomeNicknamesListAltID,
102                   &ContactEditorData.HomeNicknamesListPID,
103                   &ContactEditorData.HomeNicknamesListTokens,
104                   &ContactEditorData.HomeNicknamesListType,
105                   &ContactEditorData.HomeNicknamesListPref);
106     
109 void frmContactEditor::AddHomeAddress( wxCommandEvent& event )
111     int intResult = 0;
112     
113     frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
114     frameCEAddress->SetEditorMode(FALSE, CE_HOME);
115     intResult = GetLastInt(&ContactEditorData.HomeAddressList);
116     frameCEAddress->SetupPointers(&ContactEditorData.HomeAddressList,
117                                   &ContactEditorData.HomeAddressListTown,
118                                   &ContactEditorData.HomeAddressListCounty,
119                                   &ContactEditorData.HomeAddressListPostCode,
120                                   &ContactEditorData.HomeAddressListCountry,
121                                   &ContactEditorData.HomeAddressListLabel,
122                                   &ContactEditorData.HomeAddressListLang,
123                                   &ContactEditorData.HomeAddressListAltID,
124                                   &ContactEditorData.HomeAddressListPID,
125                                   &ContactEditorData.HomeAddressListTokens,
126                                   &ContactEditorData.HomeAddressListGeo,
127                                   &ContactEditorData.HomeAddressListTimezone,
128                                   &ContactEditorData.HomeAddressListType,
129                                   &ContactEditorData.HomeAddressListMediatype,
130                                   &ContactEditorData.HomeAddressListPref,
131                                   lboHomeAddresses,
132                                   (intValueSeek));
133     frameCEAddress->ShowModal();
134     delete frameCEAddress;
135     frameCEAddress = NULL;
138 void frmContactEditor::ModifyHomeAddress( wxCommandEvent& event )
140     long longSelected = -1;
141     int intSelectedData = 0;
142     
143     if (!GetSelectedItem(lboHomeAddresses,
144                          &longSelected,
145                          &intSelectedData)){
146         return;
147     }
148     
149     frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
150     frameCEAddress->SetupPointers(&ContactEditorData.HomeAddressList,
151                                   &ContactEditorData.HomeAddressListTown,
152                                   &ContactEditorData.HomeAddressListCounty,
153                                   &ContactEditorData.HomeAddressListPostCode,
154                                   &ContactEditorData.HomeAddressListCountry,
155                                   &ContactEditorData.HomeAddressListLabel,
156                                   &ContactEditorData.HomeAddressListLang,
157                                   &ContactEditorData.HomeAddressListAltID,
158                                   &ContactEditorData.HomeAddressListPID,
159                                   &ContactEditorData.HomeAddressListTokens,
160                                   &ContactEditorData.HomeAddressListGeo,
161                                   &ContactEditorData.HomeAddressListTimezone,
162                                   &ContactEditorData.HomeAddressListType,
163                                   &ContactEditorData.HomeAddressListMediatype,
164                                   &ContactEditorData.HomeAddressListPref,
165                                   lboHomeAddresses,
166                                   intSelectedData);
167     frameCEAddress->SetEditorMode(TRUE, CE_HOME);
168     frameCEAddress->ShowModal();
169     delete frameCEAddress;
170     frameCEAddress = NULL;
173 void frmContactEditor::DeleteHomeAddress( wxCommandEvent& event )
175     
176     long longSelected = -1;
177     int intSelectedData = 0;
178     
179     if (!GetSelectedItem(lboHomeAddresses,
180                          &longSelected,
181                          &intSelectedData)){
182         return;
183     }
184     
185     lboHomeAddresses->DeleteItem(longSelected);
186     
187     DeleteMapData(intSelectedData, &ContactEditorData.HomeAddressList,
188                   &ContactEditorData.HomeAddressListTown, &ContactEditorData.HomeAddressListCounty,
189                   &ContactEditorData.HomeAddressListPostCode, &ContactEditorData.HomeAddressListCountry,
190                   &ContactEditorData.HomeAddressList, &ContactEditorData.HomeAddressListLabel,
191                   &ContactEditorData.HomeAddressListLang, &ContactEditorData.HomeAddressListAltID,
192                   &ContactEditorData.HomeAddressListPID, &ContactEditorData.HomeAddressListTokens,
193                   &ContactEditorData.HomeAddressListGeo, &ContactEditorData.HomeAddressListTimezone,
194                   &ContactEditorData.HomeAddressListType, &ContactEditorData.HomeAddressListMediatype,
195                   &ContactEditorData.HomeAddressListPref);
196     
199 void frmContactEditor::AddHomeEmail( wxCommandEvent& event )
201     int intResult = 0;
202     
203     frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
204     frameCEEmail->SetEditorMode(FALSE, CE_HOME);
205     intResult = GetLastInt(&ContactEditorData.HomeAddressList);
206     frameCEEmail->SetupPointers(&ContactEditorData.HomeEmailList,
207                                 &ContactEditorData.HomeEmailListAltID,
208                                 &ContactEditorData.HomeEmailListPID,
209                                 &ContactEditorData.HomeEmailListType,
210                                 &ContactEditorData.HomeEmailListTokens,
211                                 &ContactEditorData.HomeEmailListPref,
212                                 lboHomeEmails,
213                                 (intValueSeek));
214     frameCEEmail->ShowModal();
215     delete frameCEEmail;
216     frameCEEmail = NULL;
219 void frmContactEditor::ModifyHomeEmail( wxCommandEvent& event )
221     long longSelected = -1;
222     int intSelectedData = 0;
223     
224     if (!GetSelectedItem(lboHomeEmails,
225                          &longSelected,
226                          &intSelectedData)){
227         return;
228     }
229     
230     frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
231     frameCEEmail->SetupPointers(&ContactEditorData.HomeEmailList,
232                                 &ContactEditorData.HomeEmailListAltID,
233                                 &ContactEditorData.HomeEmailListPID,
234                                 &ContactEditorData.HomeEmailListType,
235                                 &ContactEditorData.HomeEmailListTokens,
236                                 &ContactEditorData.HomeEmailListPref,
237                                 lboHomeEmails,
238                                 intSelectedData);
239     frameCEEmail->SetEditorMode(TRUE, CE_HOME);
240     frameCEEmail->ShowModal();
241     delete frameCEEmail;
242     frameCEEmail = NULL;
246 void frmContactEditor::DeleteHomeEmail( wxCommandEvent& event )
248     long longSelected = -1;
249     int intSelectedData = 0;
250     
251     if (!GetSelectedItem(lboHomeEmails,
252                          &longSelected,
253                          &intSelectedData)){
254         return;
255     }
256     
257     lboHomeEmails->DeleteItem(longSelected);
258     
259     DeleteMapData(intSelectedData, &ContactEditorData.HomeEmailList,
260                   &ContactEditorData.HomeEmailListAltID, &ContactEditorData.HomeEmailListPID,
261                   &ContactEditorData.HomeEmailListType, &ContactEditorData.HomeEmailListTokens,
262                   &ContactEditorData.HomeEmailListPref);
266 void frmContactEditor::AddHomeIM( wxCommandEvent& event )
268     int intResult = 0;
269     
270     frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
271     frameCEIM->SetEditorMode(FALSE, CE_HOME);
272     intResult = GetLastInt(&ContactEditorData.HomeIMList);
273     frameCEIM->SetupPointers(&ContactEditorData.HomeIMList,
274                              &ContactEditorData.HomeIMListAltID,
275                              &ContactEditorData.HomeIMListPID,
276                              &ContactEditorData.HomeIMListType,
277                              &ContactEditorData.HomeIMListTypeInfo,
278                              &ContactEditorData.HomeIMListTokens,
279                              &ContactEditorData.HomeIMListMediatype,
280                              &ContactEditorData.HomeIMListPref,
281                              lboHomeIM,
282                              (intValueSeek));
283     frameCEIM->ShowModal();
284     delete frameCEIM;
285     frameCEIM = NULL;
288 void frmContactEditor::ModifyHomeIM( wxCommandEvent& event )
290     long longSelected = -1;
291     int intSelectedData = 0;
292     
293     if (!GetSelectedItem(lboHomeIM,
294                          &longSelected,
295                          &intSelectedData)){
296         return;
297     }
298     
299     frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
300     frameCEIM->SetupPointers(&ContactEditorData.HomeIMList,
301                              &ContactEditorData.HomeIMListAltID,
302                              &ContactEditorData.HomeIMListPID,
303                              &ContactEditorData.HomeIMListType,
304                              &ContactEditorData.HomeIMListTypeInfo,
305                              &ContactEditorData.HomeIMListTokens,
306                              &ContactEditorData.HomeIMListMediatype,
307                              &ContactEditorData.HomeIMListPref,
308                              lboHomeIM,
309                              intSelectedData);
310     frameCEIM->SetEditorMode(TRUE, CE_HOME);
311     frameCEIM->ShowModal();
312     delete frameCEIM;
313     frameCEIM = NULL;
316 void frmContactEditor::DeleteHomeIM( wxCommandEvent& event )
318     long longSelected = -1;
319     int intSelectedData = 0;
320     
321     if (!GetSelectedItem(lboHomeIM,
322                          &longSelected,
323                          &intSelectedData)){
324         return;
325     }
326     
327     lboHomeIM->DeleteItem(longSelected);
328     
329     DeleteMapData(intSelectedData, &ContactEditorData.HomeIMList,
330                   &ContactEditorData.HomeIMListAltID, &ContactEditorData.HomeIMListPID,
331                   &ContactEditorData.HomeIMListType, &ContactEditorData.HomeIMListTypeInfo,
332                   &ContactEditorData.HomeIMListTokens, &ContactEditorData.HomeIMListMediatype, 
333                   &ContactEditorData.HomeIMListPref);
334     
337 void frmContactEditor::AddHomeTelephone( wxCommandEvent& event )
339     int intResult = 0;
340     
341     frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
342     frameCETel->SetEditorMode(FALSE, CE_HOME);
343     intResult = GetLastInt(&ContactEditorData.HomeTelephoneList);
344     frameCETel->SetupPointers(&ContactEditorData.HomeTelephoneList,
345                               &ContactEditorData.HomeTelephoneListAltID,
346                               &ContactEditorData.HomeTelephoneListPID,
347                               &ContactEditorData.HomeTelephoneListType,
348                               &ContactEditorData.HomeTelephoneListTypeInfo,
349                               &ContactEditorData.HomeTelephoneListTokens,
350                               &ContactEditorData.HomeTelephoneListPref,
351                               lboHomeTelephone,
352                               (intValueSeek));
353     frameCETel->ShowModal();
354     delete frameCETel;
355     frameCETel = NULL;
358 void frmContactEditor::ModifyHomeTelephone( wxCommandEvent& event )
360     long longSelected = -1;
361     int intSelectedData = 0;
362     
363     if (!GetSelectedItem(lboHomeTelephone,
364                          &longSelected,
365                          &intSelectedData)){
366         return;
367     }
368     
369     frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
370     frameCETel->SetupPointers(&ContactEditorData.HomeTelephoneList,
371                               &ContactEditorData.HomeTelephoneListAltID,
372                               &ContactEditorData.HomeTelephoneListPID,
373                               &ContactEditorData.HomeTelephoneListType,
374                               &ContactEditorData.HomeTelephoneListTypeInfo,
375                               &ContactEditorData.HomeTelephoneListTokens,
376                               &ContactEditorData.HomeTelephoneListPref,
377                               lboHomeTelephone,
378                               intSelectedData);
379     frameCETel->SetEditorMode(TRUE, CE_HOME);
380     frameCETel->ShowModal();
381     delete frameCETel;
382     frameCETel = NULL;
385 void frmContactEditor::DeleteHomeTelephone( wxCommandEvent& event )
387     long longSelected = -1;
388     int intSelectedData = 0;
389     
390     if (!GetSelectedItem(lboHomeTelephone,
391                          &longSelected,
392                          &intSelectedData)){
393         return;
394     }
395     
396     lboHomeTelephone->DeleteItem(longSelected);
397     
398     DeleteMapData(intSelectedData, &ContactEditorData.HomeTelephoneList,
399                   &ContactEditorData.HomeTelephoneListAltID, &ContactEditorData.HomeTelephoneListPID,
400                   &ContactEditorData.HomeTelephoneListType, &ContactEditorData.HomeTelephoneListTypeInfo,
401                   &ContactEditorData.HomeTelephoneListTokens, &ContactEditorData.HomeTelephoneListPref);
402     
405 void frmContactEditor::AddHomeLanguage( wxCommandEvent& event )
407     int intResult = 0;
408     
409     frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
410     frameCELang->SetEditorMode(FALSE, CE_HOME);
411     intResult = GetLastInt(&ContactEditorData.HomeLanguageList);
412     frameCELang->SetupPointers(&ContactEditorData.HomeLanguageList,
413                                &ContactEditorData.HomeLanguageListAltID,
414                                &ContactEditorData.HomeLanguageListPID,
415                                &ContactEditorData.HomeLanguageListType,
416                                &ContactEditorData.HomeLanguageListTokens,
417                                &ContactEditorData.HomeLanguageListPref,
418                                lboHomeLanguages,
419                                (intValueSeek));
420     frameCELang->ShowModal();
421     delete frameCELang;
422     frameCELang = NULL;
425 void frmContactEditor::ModifyHomeLanguage( wxCommandEvent& event )
427     long longSelected = -1;
428     int intSelectedData = 0;
429     
430     if (!GetSelectedItem(lboHomeLanguages,
431                          &longSelected,
432                          &intSelectedData)){
433         return;
434     }
435     
436     frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
437     frameCELang->SetupPointers(&ContactEditorData.HomeLanguageList,
438                                &ContactEditorData.HomeLanguageListAltID,
439                                &ContactEditorData.HomeLanguageListPID,
440                                &ContactEditorData.HomeLanguageListType,
441                                &ContactEditorData.HomeLanguageListTokens,
442                                &ContactEditorData.HomeLanguageListPref,
443                                lboHomeLanguages,
444                                intSelectedData);
445     frameCELang->SetEditorMode(TRUE, CE_HOME);
446     frameCELang->ShowModal();
447     delete frameCELang;
448     frameCELang = NULL;
451 void frmContactEditor::DeleteHomeLanguage( wxCommandEvent& event )
453     long longSelected = -1;
454     int intSelectedData = 0;
455     
456     if (!GetSelectedItem(lboHomeLanguages,
457                          &longSelected,
458                          &intSelectedData)){
459         return;
460     }
461     
462     lboHomeLanguages->DeleteItem(longSelected);
463     
464     DeleteMapData(intSelectedData, &ContactEditorData.HomeLanguageList,
465                   &ContactEditorData.HomeLanguageListAltID, &ContactEditorData.HomeLanguageListPID,
466                   &ContactEditorData.HomeLanguageListType, &ContactEditorData.HomeLanguageListTokens,
467                   &ContactEditorData.HomeLanguageListPref);
468     
471 void frmContactEditor::AddHomeTimezone( wxCommandEvent& event )
473     int intResult = 0;
474     
475     frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
476     frameCETZ->SetEditorMode(FALSE, CE_HOME);
477     intResult = GetLastInt(&ContactEditorData.HomeTZList);
478     frameCETZ->SetupPointers(&ContactEditorData.HomeTZList,
479                              &ContactEditorData.HomeTZListAltID,
480                              &ContactEditorData.HomeTZListPID,
481                              &ContactEditorData.HomeTZListType,
482                              &ContactEditorData.HomeTZListTokens,
483                              &ContactEditorData.HomeTZListMediatype,
484                              &ContactEditorData.HomeTZListPref,
485                              lboHomeTimezones,
486                              (intValueSeek));
487     frameCETZ->ShowModal();
488     delete frameCETZ;
489     frameCETZ = NULL;
492 void frmContactEditor::ModifyHomeTimezone( wxCommandEvent& event )
494     long longSelected = -1;
495     int intSelectedData = 0;
496     
497     if (!GetSelectedItem(lboHomeTimezones,
498                          &longSelected,
499                          &intSelectedData)){
500         return;
501     }
502     
503     frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
504     frameCETZ->SetupPointers(&ContactEditorData.HomeTZList,
505                              &ContactEditorData.HomeTZListAltID,
506                              &ContactEditorData.HomeTZListPID,
507                              &ContactEditorData.HomeTZListType,
508                              &ContactEditorData.HomeTZListTokens,
509                              &ContactEditorData.HomeTZListMediatype,
510                              &ContactEditorData.HomeTZListPref,
511                              lboHomeTimezones,
512                              intSelectedData);
513     frameCETZ->SetEditorMode(TRUE, CE_HOME);
514     frameCETZ->ShowModal();
515     delete frameCETZ;
516     frameCETZ = NULL;
519 void frmContactEditor::DeleteHomeTimezone( wxCommandEvent& event )
521     long longSelected = -1;
522     int intSelectedData = 0;
523     
524     if (!GetSelectedItem(lboHomeTimezones,
525                          &longSelected,
526                          &intSelectedData)){
527         return;
528     }
529     
530     lboHomeTimezones->DeleteItem(longSelected);
531     
532     DeleteMapData(intSelectedData, &ContactEditorData.HomeTZList,
533                   &ContactEditorData.HomeTZListAltID, &ContactEditorData.HomeTZListPID,
534                   &ContactEditorData.HomeTZListType, &ContactEditorData.HomeTZListTokens,
535                   &ContactEditorData.HomeTZListMediatype, &ContactEditorData.HomeTZListPref);
536     
539 void frmContactEditor::AddHomeGeoposition( wxCommandEvent& event )
541     int intResult = 0;
542     
543     frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
544     frameCEGeo->SetEditorMode(FALSE, CE_HOME);
545     intResult = GetLastInt(&ContactEditorData.HomeGeographyList);
546     frameCEGeo->SetupPointers(&ContactEditorData.HomeGeographyList,
547                               &ContactEditorData.HomeGeographyListAltID,
548                               &ContactEditorData.HomeGeographyListPID,
549                               &ContactEditorData.HomeGeographyListType,
550                               &ContactEditorData.HomeGeographyListTokens,
551                               &ContactEditorData.HomeGeographyListMediatype,
552                               &ContactEditorData.HomeGeographyListPref,
553                               lboHomeGeoposition,
554                               (intValueSeek));
555     frameCEGeo->ShowModal();
556     delete frameCEGeo;
557     frameCEGeo = NULL;
560 void frmContactEditor::ModifyHomeGeoposition( wxCommandEvent& event )
562     long longSelected = -1;
563     int intSelectedData = 0;
564     
565     if (!GetSelectedItem(lboHomeGeoposition,
566                          &longSelected,
567                          &intSelectedData)){
568         return;
569     }
570     
571     frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
572     frameCEGeo->SetupPointers(&ContactEditorData.HomeGeographyList,
573                               &ContactEditorData.HomeGeographyListAltID,
574                               &ContactEditorData.HomeGeographyListPID,
575                               &ContactEditorData.HomeGeographyListType,
576                               &ContactEditorData.HomeGeographyListTokens,
577                               &ContactEditorData.HomeGeographyListMediatype,
578                               &ContactEditorData.HomeGeographyListPref,
579                               lboHomeGeoposition,
580                               intSelectedData);
581     frameCEGeo->SetEditorMode(TRUE, CE_HOME);
582     frameCEGeo->ShowModal();
583     delete frameCEGeo;
584     frameCEGeo = NULL;
587 void frmContactEditor::DeleteHomeGeoposition( wxCommandEvent& event )
589     long longSelected = -1;
590     int intSelectedData = 0;
591     
592     if (!GetSelectedItem(lboHomeGeoposition,
593                          &longSelected,
594                          &intSelectedData)){
595         return;
596     }
597     
598     lboHomeGeoposition->DeleteItem(longSelected);
599     
600     DeleteMapData(intSelectedData, &ContactEditorData.HomeGeographyList,
601                   &ContactEditorData.HomeGeographyListAltID, &ContactEditorData.HomeGeographyListPID,
602                   &ContactEditorData.HomeGeographyListType, &ContactEditorData.HomeGeographyListTokens,
603                   &ContactEditorData.HomeGeographyListMediatype, &ContactEditorData.HomeGeographyListPref);
604     
607 void frmContactEditor::AddHomeWebsite( wxCommandEvent& event )
609     int intResult = 0;
610     
611     frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
612     frameCEWeb->SetEditorMode(FALSE, CE_HOME);
613     intResult = GetLastInt(&ContactEditorData.HomeWebsiteList);
614     frameCEWeb->SetupPointers(&ContactEditorData.HomeWebsiteList,
615                               &ContactEditorData.HomeWebsiteListAltID,
616                               &ContactEditorData.HomeWebsiteListPID,
617                               &ContactEditorData.HomeWebsiteListType,
618                               &ContactEditorData.HomeWebsiteListTokens,
619                               &ContactEditorData.HomeWebsiteListMediatype,
620                               &ContactEditorData.HomeWebsiteListPref,
621                               lboHomeWebsites,
622                               (intValueSeek));
623     frameCEWeb->ShowModal();
624     delete frameCEWeb;
625     frameCEWeb = NULL;
628 void frmContactEditor::ModifyHomeWebsite( wxCommandEvent& event )
630     long longSelected = -1;
631     int intSelectedData = 0;
632     
633     if (!GetSelectedItem(lboHomeWebsites,
634                          &longSelected,
635                          &intSelectedData)){
636         return;
637     }
638     
639     frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
640     frameCEWeb->SetupPointers(&ContactEditorData.HomeWebsiteList,
641                               &ContactEditorData.HomeWebsiteListAltID,
642                               &ContactEditorData.HomeWebsiteListPID,
643                               &ContactEditorData.HomeWebsiteListType,
644                               &ContactEditorData.HomeWebsiteListTokens,
645                               &ContactEditorData.HomeWebsiteListMediatype,
646                               &ContactEditorData.HomeWebsiteListPref,
647                               lboHomeWebsites,
648                               intSelectedData);
649     frameCEWeb->SetEditorMode(TRUE, CE_HOME);
650     frameCEWeb->ShowModal();
651     delete frameCEWeb;
652     frameCEWeb = NULL;
655 void frmContactEditor::DeleteHomeWebsite( wxCommandEvent& event )
657     long longSelected = -1;
658     int intSelectedData = 0;
659     
660     if (!GetSelectedItem(lboHomeWebsites,
661                          &longSelected,
662                          &intSelectedData)){
663         return;
664     }
665     
666     lboHomeWebsites->DeleteItem(longSelected);
667     
668     DeleteMapData(intSelectedData, &ContactEditorData.HomeWebsiteList,
669                   &ContactEditorData.HomeWebsiteListAltID, &ContactEditorData.HomeWebsiteListPID,
670                   &ContactEditorData.HomeWebsiteListType, &ContactEditorData.HomeWebsiteListTokens,
671                   &ContactEditorData.HomeWebsiteListMediatype, &ContactEditorData.HomeWebsiteListPref);
672     
675 void frmContactEditor::AddHomeTitle( wxCommandEvent& event )
677     int intResult = 0;
678     
679     frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
680     frameCETitle->SetEditorMode(FALSE, CE_HOME);
681     intResult = GetLastInt(&ContactEditorData.HomeTitleList);
682     frameCETitle->SetupPointers(&ContactEditorData.HomeTitleList,
683                                 &ContactEditorData.HomeTitleListLanguage,
684                                 &ContactEditorData.HomeTitleListAltID,
685                                 &ContactEditorData.HomeTitleListPID,
686                                 &ContactEditorData.HomeTitleListType,
687                                 &ContactEditorData.HomeTitleListTokens,
688                                 &ContactEditorData.HomeTitleListPref,
689                                 lboHomeTitles,
690                                 (intValueSeek));
691     frameCETitle->ShowModal();
692     delete frameCETitle;
693     frameCETitle = NULL;
696 void frmContactEditor::ModifyHomeTitle( wxCommandEvent& event )
698     long longSelected = -1;
699     int intSelectedData = 0;
700     
701     if (!GetSelectedItem(lboHomeTitles,
702                          &longSelected,
703                          &intSelectedData)){
704         return;
705     }
706     
707     frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
708     frameCETitle->SetupPointers(&ContactEditorData.HomeTitleList,
709                                 &ContactEditorData.HomeTitleListLanguage,
710                                 &ContactEditorData.HomeTitleListAltID,
711                                 &ContactEditorData.HomeTitleListPID,
712                                 &ContactEditorData.HomeTitleListType,
713                                 &ContactEditorData.HomeTitleListTokens,
714                                 &ContactEditorData.HomeTitleListPref,
715                                 lboHomeTitles,
716                                 intSelectedData);
717     frameCETitle->SetEditorMode(TRUE, CE_HOME);
718     frameCETitle->ShowModal();
719     delete frameCETitle;
720     frameCETitle = NULL;
723 void frmContactEditor::DeleteHomeTitle( wxCommandEvent& event )
725     long longSelected = -1;
726     int intSelectedData = 0;
727     
728     if (!GetSelectedItem(lboHomeTitles,
729                          &longSelected,
730                          &intSelectedData)){
731         return;
732     }
733     
734     lboHomeTitles->DeleteItem(longSelected);
735     
736     DeleteMapData(intSelectedData, &ContactEditorData.HomeTitleList,
737                   &ContactEditorData.HomeTitleListLanguage, &ContactEditorData.HomeTitleListAltID,
738                   &ContactEditorData.HomeTitleListPID, &ContactEditorData.HomeTitleListType,
739                   &ContactEditorData.HomeTitleListTokens, &ContactEditorData.HomeTitleListPref);
740     
743 void frmContactEditor::AddHomeRole( wxCommandEvent& event )
745     int intResult = 0;
746     
747     frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
748     frameCERole->SetEditorMode(FALSE, CE_HOME);
749     intResult = GetLastInt(&ContactEditorData.HomeRoleList);
750     frameCERole->SetupPointers(&ContactEditorData.HomeRoleList,
751                                &ContactEditorData.HomeRoleListLanguage,
752                                &ContactEditorData.HomeRoleListAltID,
753                                &ContactEditorData.HomeRoleListPID,
754                                &ContactEditorData.HomeRoleListType,
755                                &ContactEditorData.HomeRoleListTokens,
756                                &ContactEditorData.HomeRoleListPref,
757                                lboHomeRoles,
758                                (intValueSeek));
759     frameCERole->ShowModal();
760     delete frameCERole;
761     frameCERole = NULL;
764 void frmContactEditor::ModifyHomeRole( wxCommandEvent& event )
766     long longSelected = -1;
767     int intSelectedData = 0;
768     
769     if (!GetSelectedItem(lboHomeRoles,
770                          &longSelected,
771                          &intSelectedData)){
772         return;
773     }
774     
775     frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
776     frameCERole->SetupPointers(&ContactEditorData.HomeRoleList,
777                                &ContactEditorData.HomeRoleListLanguage,
778                                &ContactEditorData.HomeRoleListAltID,
779                                &ContactEditorData.HomeRoleListPID,
780                                &ContactEditorData.HomeRoleListType,
781                                &ContactEditorData.HomeRoleListTokens,
782                                &ContactEditorData.HomeRoleListPref,
783                                lboHomeRoles,
784                                intSelectedData);
785     frameCERole->SetEditorMode(TRUE, CE_HOME);
786     frameCERole->ShowModal();
787     delete frameCERole;
788     frameCERole = NULL;
791 void frmContactEditor::DeleteHomeRole( wxCommandEvent& event )
793     long longSelected = -1;
794     int intSelectedData = 0;
795     
796     if (!GetSelectedItem(lboHomeRoles,
797                          &longSelected,
798                          &intSelectedData)){
799         return;
800     }
801     
802     lboHomeRoles->DeleteItem(longSelected);
803     
804     DeleteMapData(intSelectedData, &ContactEditorData.HomeRoleList,
805                   &ContactEditorData.HomeRoleListLanguage, &ContactEditorData.HomeRoleListAltID,
806                   &ContactEditorData.HomeRoleListPID, &ContactEditorData.HomeRoleListType,
807                   &ContactEditorData.HomeRoleListTokens, &ContactEditorData.HomeRoleListPref);
808     
811 void frmContactEditor::AddHomeOrganisation( wxCommandEvent& event )
813     int intResult = 0;
814     
815     frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
816     frameCEOrg->SetEditorMode(FALSE, CE_HOME);
817     intResult = GetLastInt(&ContactEditorData.HomeOrganisationsList);
818     frameCEOrg->SetupPointers(&ContactEditorData.HomeOrganisationsList,
819                               &ContactEditorData.HomeOrganisationsListLanguage,
820                               &ContactEditorData.HomeOrganisationsListSortAs,
821                               &ContactEditorData.HomeOrganisationsListAltID,
822                               &ContactEditorData.HomeOrganisationsListPID,
823                               &ContactEditorData.HomeOrganisationsListType,
824                               &ContactEditorData.HomeOrganisationsListTokens,
825                               &ContactEditorData.HomeOrganisationsListPref,
826                               lboHomeOrganisations,
827                               (intValueSeek));
828     frameCEOrg->ShowModal();
829     delete frameCEOrg;
830     frameCEOrg = NULL;
833 void frmContactEditor::ModifyHomeOrganisation( wxCommandEvent& event )
835     long longSelected = -1;
836     int intSelectedData = 0;
837     
838     if (!GetSelectedItem(lboHomeOrganisations,
839                          &longSelected,
840                          &intSelectedData)){
841         return;
842     }
843     
844     frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
845     frameCEOrg->SetupPointers(&ContactEditorData.HomeOrganisationsList,
846                               &ContactEditorData.HomeOrganisationsListLanguage,
847                               &ContactEditorData.HomeOrganisationsListSortAs,
848                               &ContactEditorData.HomeOrganisationsListAltID,
849                               &ContactEditorData.HomeOrganisationsListPID,
850                               &ContactEditorData.HomeOrganisationsListType,
851                               &ContactEditorData.HomeOrganisationsListTokens,
852                               &ContactEditorData.HomeOrganisationsListPref,
853                               lboHomeOrganisations,
854                               intSelectedData);
855     frameCEOrg->SetEditorMode(TRUE, CE_HOME);
856     frameCEOrg->ShowModal();
857     delete frameCEOrg;
858     frameCEOrg = NULL;
861 void frmContactEditor::DeleteHomeOrganisation( wxCommandEvent& event )
863     long longSelected = -1;
864     int intSelectedData = 0;
865     
866     if (!GetSelectedItem(lboHomeOrganisations,
867                          &longSelected,
868                          &intSelectedData)){
869         return;
870     }
871     
872     lboHomeOrganisations->DeleteItem(longSelected);
873     
874     DeleteMapData(intSelectedData, &ContactEditorData.HomeOrganisationsList,
875                   &ContactEditorData.HomeOrganisationsListLanguage, &ContactEditorData.HomeOrganisationsListSortAs,
876                   &ContactEditorData.HomeOrganisationsListAltID, &ContactEditorData.HomeOrganisationsListPID,
877                   &ContactEditorData.HomeOrganisationsListType, &ContactEditorData.HomeOrganisationsListTokens,
878                   &ContactEditorData.HomeOrganisationsListPref);
879     
882 void frmContactEditor::AddHomeNote( wxCommandEvent& event )
884     int intResult = 0;
885     
886     frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
887     frameCENote->SetEditorMode(FALSE, CE_HOME);
888     intResult = GetLastInt(&ContactEditorData.HomeNoteList);
889     frameCENote->SetupPointers(&ContactEditorData.HomeNoteList,
890                                &ContactEditorData.HomeNoteListLanguage,
891                                &ContactEditorData.HomeNoteListAltID,
892                                &ContactEditorData.HomeNoteListPID,
893                                &ContactEditorData.HomeNoteListType,
894                                &ContactEditorData.HomeNoteListTokens,
895                                &ContactEditorData.HomeNoteListPref,
896                                lboHomeNotes,
897                                (intValueSeek));
898     frameCENote->ShowModal();
899     delete frameCENote;
900     frameCENote = NULL;
903 void frmContactEditor::ModifyHomeNote( wxCommandEvent& event )
905     long longSelected = -1;
906     int intSelectedData = 0;
907     
908     if (!GetSelectedItem(lboHomeNotes,
909                          &longSelected,
910                          &intSelectedData)){
911         return;
912     }
913     
914     frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
915     frameCENote->SetupPointers(&ContactEditorData.HomeNoteList,
916                                &ContactEditorData.HomeNoteListLanguage,
917                                &ContactEditorData.HomeNoteListAltID,
918                                &ContactEditorData.HomeNoteListPID,
919                                &ContactEditorData.HomeNoteListType,
920                                &ContactEditorData.HomeNoteListTokens,
921                                &ContactEditorData.HomeNoteListPref,
922                                lboHomeNotes,
923                                intSelectedData);
924     frameCENote->SetEditorMode(TRUE, CE_HOME);
925     frameCENote->ShowModal();
926     delete frameCENote;
927     frameCENote = NULL;
930 void frmContactEditor::DeleteHomeNote( wxCommandEvent& event )
932     long longSelected = -1;
933     int intSelectedData = 0;
934     
935     if (!GetSelectedItem(lboHomeNotes,
936                          &longSelected,
937                          &intSelectedData)){
938         return;
939     }
940     
941     lboNotes->DeleteItem(longSelected);
942     
943     DeleteMapData(intSelectedData, &ContactEditorData.HomeNoteList,
944                   &ContactEditorData.HomeNoteListLanguage, &ContactEditorData.HomeNoteListAltID,
945                   &ContactEditorData.HomeNoteListPID, &ContactEditorData.HomeNoteListType,
946                   &ContactEditorData.HomeNoteListTokens, &ContactEditorData.HomeNoteListPref);
947     
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