Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added comments to describe functions in 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         // Bring up the window for adding vendor namespace data.
27         
28         int intResult = 0;
29     
30         frmContactEditorVendor *frameCEVen = new frmContactEditorVendor ( this );
31         frameCEVen->SetEditorMode(FALSE);
32         intResult = GetLastInt(&ContactEditorData.VendorList);
33         frameCEVen->SetupPointers(&ContactEditorData.VendorList,
34                 &ContactEditorData.VendorListPEN,
35                 &ContactEditorData.VendorListElement,
36                 lboVendorNamespace,
37                 (intValueSeek));
38         frameCEVen->ShowModal();
39         delete frameCEVen;
40         frameCEVen = NULL;
41         
42 }
44 void frmContactEditor::ModifyVendorNamespace( wxCommandEvent& event )
45 {
46         
47         // Bring up the window for modifying vendor namespace data.
48         
49         long longSelected = -1;
50         int intSelectedData = 0;
51     
52         if (!GetSelectedItem(lboVendorNamespace,
53                 &longSelected,
54                 &intSelectedData)){
55                 return;
56         }
57     
58         frmContactEditorVendor *frameCEVen = new frmContactEditorVendor ( this );
59         frameCEVen->SetupPointers(&ContactEditorData.VendorList,
60                 &ContactEditorData.VendorListPEN,
61                 &ContactEditorData.VendorListElement,
62                 lboVendorNamespace,
63                 intSelectedData);
64         frameCEVen->SetEditorMode(TRUE);
65         frameCEVen->ShowModal();
66         delete frameCEVen;
67         frameCEVen = NULL;
68         
69 }
71 void frmContactEditor::DeleteVendorNamespace( wxCommandEvent& event )
72 {
73         
74         // Bring up the window for deleting vendor namespace data.
75         
76         long longSelected = -1;
77         int intSelectedData = 0;
78     
79         if (!GetSelectedItem(lboVendorNamespace,
80                 &longSelected,
81                 &intSelectedData)){
82                 return;
83         }
84     
85         lboVendorNamespace->DeleteItem(longSelected);
86     
87         DeleteMapData(intSelectedData, &ContactEditorData.VendorList, &ContactEditorData.VendorListPEN,
88                 &ContactEditorData.VendorListElement);
90 }
92 void frmContactEditor::AddXToken( wxCommandEvent& event )
93 {
94         
95         // Bring up the window for adding extended data.
96         
97         int intResult = 0;
98     
99         frmContactEditorXToken *frameCEXT = new frmContactEditorXToken ( this );
100         frameCEXT->SetEditorMode(FALSE);
101         intResult = GetLastInt(&ContactEditorData.XTokenList);
102         frameCEXT->SetupPointers(&ContactEditorData.XTokenList,
103                 &ContactEditorData.XTokenListTokens,
104                 lboXToken,
105                 (intValueSeek));
106         frameCEXT->ShowModal();
107         delete frameCEXT;
108         frameCEXT = NULL;
109         
112 void frmContactEditor::ModifyXToken( wxCommandEvent& event )
114         
115         // Bring up the window for modifying extended data.
116         
117         long longSelected = -1;
118         int intSelectedData = 0;
119     
120         if (!GetSelectedItem(lboXToken,
121         
122                 &longSelected,
123                 &intSelectedData)){
124                 return;
125                 
126         }
127     
128         frmContactEditorXToken *frameCEXT = new frmContactEditorXToken ( this );
129         frameCEXT->SetupPointers(&ContactEditorData.XTokenList,
130                 &ContactEditorData.XTokenListTokens,
131                 lboXToken,
132                 intSelectedData);
133         frameCEXT->SetEditorMode(TRUE);
134         frameCEXT->ShowModal();
135         delete frameCEXT;
136         frameCEXT = NULL;
137         
140 void frmContactEditor::DeleteXToken( wxCommandEvent& event )
142         
143         // Bring up the window for deleting extended data.
144         
145         long longSelected = -1;
146         int intSelectedData = 0;
147     
148         if (!GetSelectedItem(lboXToken,
149                 &longSelected,
150                 &intSelectedData)){
151                 return;
152         }
153     
154         lboXToken->DeleteItem(longSelected);
155     
156         DeleteMapData(intSelectedData, &ContactEditorData.XTokenList, &ContactEditorData.XTokenListTokens);
157     
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