Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
frmContactEditor: Fix issue with intValueSeek not being incremented properly
[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         frmContactEditorVendor *frameCEVen = new frmContactEditorVendor ( this );
29         frameCEVen->SetEditorMode(FALSE);
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     intValueSeek++;
40 }
42 void frmContactEditor::ModifyVendorNamespace( wxCommandEvent& event )
43 {
44         
45         // Bring up the window for modifying vendor namespace data.
46         
47         long longSelected = -1;
48         int intSelectedData = 0;
49     
50         if (lboVendorNamespace->GetItemCount() == 0 || !GetSelectedItem(lboVendorNamespace,
51                 &longSelected,
52                 &intSelectedData)){
53                 return;
54         }
55     
56         frmContactEditorVendor *frameCEVen = new frmContactEditorVendor ( this );
57         frameCEVen->SetupPointers(&ContactEditorData.VendorList,
58                 &ContactEditorData.VendorListPEN,
59                 &ContactEditorData.VendorListElement,
60                 lboVendorNamespace,
61                 intSelectedData);
62         frameCEVen->SetEditorMode(TRUE);
63         frameCEVen->ShowModal();
64         delete frameCEVen;
65         frameCEVen = NULL;
66         
67 }
69 void frmContactEditor::DeleteVendorNamespace( wxCommandEvent& event )
70 {
71         
72         // Bring up the window for deleting vendor namespace data.
73         
74         long longSelected = -1;
75         int intSelectedData = 0;
76     
77         if (lboVendorNamespace->GetItemCount() == 0 || !GetSelectedItem(lboVendorNamespace,
78                 &longSelected,
79                 &intSelectedData)){
80                 return;
81         }
82     
83         lboVendorNamespace->DeleteItem(longSelected);
84     
85         DeleteMapData(intSelectedData, &ContactEditorData.VendorList, &ContactEditorData.VendorListPEN,
86                 &ContactEditorData.VendorListElement);
88 }
90 void frmContactEditor::AddXToken( wxCommandEvent& event )
91 {
92         
93         // Bring up the window for adding extended data.
94             
95         frmContactEditorXToken *frameCEXT = new frmContactEditorXToken ( this );
96         frameCEXT->SetEditorMode(FALSE);
97         frameCEXT->SetupPointers(&ContactEditorData.XTokenList,
98                 &ContactEditorData.XTokenListTokens,
99                 lboXToken,
100                 (intValueSeek));
101         frameCEXT->ShowModal();
102         delete frameCEXT;
103         frameCEXT = NULL;
104     intValueSeek++;
108 void frmContactEditor::ModifyXToken( wxCommandEvent& event )
110         
111         // Bring up the window for modifying extended data.
112         
113         long longSelected = -1;
114         int intSelectedData = 0;
115     
116         if (lboXToken->GetItemCount() == 0 || !GetSelectedItem(lboXToken,
117         
118                 &longSelected,
119                 &intSelectedData)){
120                 return;
121                 
122         }
123     
124         frmContactEditorXToken *frameCEXT = new frmContactEditorXToken ( this );
125         frameCEXT->SetupPointers(&ContactEditorData.XTokenList,
126                 &ContactEditorData.XTokenListTokens,
127                 lboXToken,
128                 intSelectedData);
129         frameCEXT->SetEditorMode(TRUE);
130         frameCEXT->ShowModal();
131         delete frameCEXT;
132         frameCEXT = NULL;
133         
136 void frmContactEditor::DeleteXToken( wxCommandEvent& event )
138         
139         // Bring up the window for deleting extended data.
140         
141         long longSelected = -1;
142         int intSelectedData = 0;
143     
144         if (lboXToken->GetItemCount() == 0 || !GetSelectedItem(lboXToken,
145                 &longSelected,
146                 &intSelectedData)){
147                 return;
148         }
149     
150         lboXToken->DeleteItem(longSelected);
151     
152         DeleteMapData(intSelectedData, &ContactEditorData.XTokenList, &ContactEditorData.XTokenListTokens);
153     
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