Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Indented code properly contacteditor/frmContactEditor-Other.cpp
[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         
26         int intResult = 0;
27     
28         frmContactEditorVendor *frameCEVen = new frmContactEditorVendor ( this );
29         frameCEVen->SetEditorMode(FALSE);
30         intResult = GetLastInt(&ContactEditorData.VendorList);
31         frameCEVen->SetupPointers(&ContactEditorData.VendorList,
32                 &ContactEditorData.VendorListPEN,
33                 &ContactEditorData.VendorListElement,
34                 lboVendorNamespace,
35                 (intValueSeek));
36         frameCEVen->ShowModal();
37         delete frameCEVen;
38         frameCEVen = NULL;
39         
40 }
42 void frmContactEditor::ModifyVendorNamespace( wxCommandEvent& event )
43 {
44         
45         long longSelected = -1;
46         int intSelectedData = 0;
47     
48         if (!GetSelectedItem(lboVendorNamespace,
49                 &longSelected,
50                 &intSelectedData)){
51                 return;
52         }
53     
54         frmContactEditorVendor *frameCEVen = new frmContactEditorVendor ( this );
55         frameCEVen->SetupPointers(&ContactEditorData.VendorList,
56                 &ContactEditorData.VendorListPEN,
57                 &ContactEditorData.VendorListElement,
58                 lboVendorNamespace,
59                 intSelectedData);
60         frameCEVen->SetEditorMode(TRUE);
61         frameCEVen->ShowModal();
62         delete frameCEVen;
63         frameCEVen = NULL;
64         
65 }
67 void frmContactEditor::DeleteVendorNamespace( wxCommandEvent& event )
68 {
69         long longSelected = -1;
70         int intSelectedData = 0;
71     
72         if (!GetSelectedItem(lboVendorNamespace,
73                 &longSelected,
74                 &intSelectedData)){
75                 return;
76         }
77     
78         lboVendorNamespace->DeleteItem(longSelected);
79     
80         DeleteMapData(intSelectedData, &ContactEditorData.VendorList, &ContactEditorData.VendorListPEN,
81                 &ContactEditorData.VendorListElement);
83 }
85 void frmContactEditor::AddXToken( wxCommandEvent& event )
86 {
87         
88         int intResult = 0;
89     
90         frmContactEditorXToken *frameCEXT = new frmContactEditorXToken ( this );
91         frameCEXT->SetEditorMode(FALSE);
92         intResult = GetLastInt(&ContactEditorData.XTokenList);
93         frameCEXT->SetupPointers(&ContactEditorData.XTokenList,
94                 &ContactEditorData.XTokenListTokens,
95                 lboXToken,
96                 (intValueSeek));
97         frameCEXT->ShowModal();
98         delete frameCEXT;
99         frameCEXT = NULL;
100         
103 void frmContactEditor::ModifyXToken( wxCommandEvent& event )
105         
106         long longSelected = -1;
107         int intSelectedData = 0;
108     
109         if (!GetSelectedItem(lboXToken,
110         
111                 &longSelected,
112                 &intSelectedData)){
113                 return;
114                 
115         }
116     
117         frmContactEditorXToken *frameCEXT = new frmContactEditorXToken ( this );
118         frameCEXT->SetupPointers(&ContactEditorData.XTokenList,
119                 &ContactEditorData.XTokenListTokens,
120                 lboXToken,
121                 intSelectedData);
122         frameCEXT->SetEditorMode(TRUE);
123         frameCEXT->ShowModal();
124         delete frameCEXT;
125         frameCEXT = NULL;
126         
129 void frmContactEditor::DeleteXToken( wxCommandEvent& event )
131         
132         long longSelected = -1;
133         int intSelectedData = 0;
134     
135         if (!GetSelectedItem(lboXToken,
136                 &longSelected,
137                 &intSelectedData)){
138                 return;
139         }
140     
141         lboXToken->DeleteItem(longSelected);
142     
143         DeleteMapData(intSelectedData, &ContactEditorData.XTokenList, &ContactEditorData.XTokenListTokens);
144     
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