Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Fixed crash in frmContactEditorOrganisations in Edit mode.
[xestiaab/.git] / source / contacteditor / frmContactEditor-Other.cpp
1 // frmContactEditor-Other.cpp - frmContactEditor Other 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 "frmContactEditorVendor.h"
21 #include "frmContactEditorXToken.h"
23 void frmContactEditor::AddVendorNamespace( wxCommandEvent& event )
24 {
25     int intResult = 0;
26     
27     frmContactEditorVendor *frameCEVen = new frmContactEditorVendor ( this );
28     frameCEVen->SetEditorMode(FALSE);
29     intResult = GetLastInt(&ContactEditorData.VendorList);
30     frameCEVen->SetupPointers(&ContactEditorData.VendorList,
31                               &ContactEditorData.VendorListPEN,
32                               &ContactEditorData.VendorListElement,
33                               lboVendorNamespace,
34                               (intValueSeek));
35     frameCEVen->ShowModal();
36     delete frameCEVen;
37     frameCEVen = NULL;
38 }
40 void frmContactEditor::ModifyVendorNamespace( wxCommandEvent& event )
41 {
42     long longSelected = -1;
43     int intSelectedData = 0;
44     
45     if (!GetSelectedItem(lboVendorNamespace,
46                          &longSelected,
47                          &intSelectedData)){
48         return;
49     }
50     
51     frmContactEditorVendor *frameCEVen = new frmContactEditorVendor ( this );
52     frameCEVen->SetupPointers(&ContactEditorData.VendorList,
53                               &ContactEditorData.VendorListPEN,
54                               &ContactEditorData.VendorListElement,
55                               lboVendorNamespace,
56                               intSelectedData);
57     frameCEVen->SetEditorMode(TRUE);
58     frameCEVen->ShowModal();
59     delete frameCEVen;
60     frameCEVen = NULL;
61 }
63 void frmContactEditor::DeleteVendorNamespace( wxCommandEvent& event )
64 {
65     long longSelected = -1;
66     int intSelectedData = 0;
67     
68     if (!GetSelectedItem(lboVendorNamespace,
69                          &longSelected,
70                          &intSelectedData)){
71         return;
72     }
73     
74     lboVendorNamespace->DeleteItem(longSelected);
75     
76     DeleteMapData(intSelectedData, &ContactEditorData.VendorList, &ContactEditorData.VendorListPEN,
77                   &ContactEditorData.VendorListElement);
78     
79 }
81 void frmContactEditor::AddXToken( wxCommandEvent& event )
82 {
83     int intResult = 0;
84     
85     frmContactEditorXToken *frameCEXT = new frmContactEditorXToken ( this );
86     frameCEXT->SetEditorMode(FALSE);
87     intResult = GetLastInt(&ContactEditorData.XTokenList);
88     frameCEXT->SetupPointers(&ContactEditorData.XTokenList,
89                              &ContactEditorData.XTokenListTokens,
90                              lboXToken,
91                              (intValueSeek));
92     frameCEXT->ShowModal();
93     delete frameCEXT;
94     frameCEXT = NULL;
95 }
97 void frmContactEditor::ModifyXToken( wxCommandEvent& event )
98 {
99     long longSelected = -1;
100     int intSelectedData = 0;
101     
102     if (!GetSelectedItem(lboXToken,
103                          &longSelected,
104                          &intSelectedData)){
105         return;
106     }
107     
108     frmContactEditorXToken *frameCEXT = new frmContactEditorXToken ( this );
109     frameCEXT->SetupPointers(&ContactEditorData.XTokenList,
110                              &ContactEditorData.XTokenListTokens,
111                              lboXToken,
112                              intSelectedData);
113     frameCEXT->SetEditorMode(TRUE);
114     frameCEXT->ShowModal();
115     delete frameCEXT;
116     frameCEXT = NULL;
119 void frmContactEditor::DeleteXToken( wxCommandEvent& event )
121     long longSelected = -1;
122     int intSelectedData = 0;
123     
124     if (!GetSelectedItem(lboXToken,
125                          &longSelected,
126                          &intSelectedData)){
127         return;
128     }
129     
130     lboXToken->DeleteItem(longSelected);
131     
132     DeleteMapData(intSelectedData, &ContactEditorData.XTokenList, &ContactEditorData.XTokenListTokens);
133     
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