1 // frmContactEditor-Other.cpp - frmContactEditor Other tab subroutines.
3 // (c) 2012-2016 Xestia Software Development.
5 // This file is part of Xestia Address Book.
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.
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.
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 )
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,
35 frameCEVen->ShowModal();
40 void frmContactEditor::ModifyVendorNamespace( wxCommandEvent& event )
42 long longSelected = -1;
43 int intSelectedData = 0;
45 if (!GetSelectedItem(lboVendorNamespace,
51 frmContactEditorVendor *frameCEVen = new frmContactEditorVendor ( this );
52 frameCEVen->SetupPointers(&ContactEditorData.VendorList,
53 &ContactEditorData.VendorListPEN,
54 &ContactEditorData.VendorListElement,
57 frameCEVen->SetEditorMode(TRUE);
58 frameCEVen->ShowModal();
63 void frmContactEditor::DeleteVendorNamespace( wxCommandEvent& event )
65 long longSelected = -1;
66 int intSelectedData = 0;
68 if (!GetSelectedItem(lboVendorNamespace,
74 lboVendorNamespace->DeleteItem(longSelected);
76 DeleteMapData(intSelectedData, &ContactEditorData.VendorList, &ContactEditorData.VendorListPEN,
77 &ContactEditorData.VendorListElement);
81 void frmContactEditor::AddXToken( wxCommandEvent& event )
85 frmContactEditorXToken *frameCEXT = new frmContactEditorXToken ( this );
86 frameCEXT->SetEditorMode(FALSE);
87 intResult = GetLastInt(&ContactEditorData.XTokenList);
88 frameCEXT->SetupPointers(&ContactEditorData.XTokenList,
89 &ContactEditorData.XTokenListTokens,
92 frameCEXT->ShowModal();
97 void frmContactEditor::ModifyXToken( wxCommandEvent& event )
99 long longSelected = -1;
100 int intSelectedData = 0;
102 if (!GetSelectedItem(lboXToken,
108 frmContactEditorXToken *frameCEXT = new frmContactEditorXToken ( this );
109 frameCEXT->SetupPointers(&ContactEditorData.XTokenList,
110 &ContactEditorData.XTokenListTokens,
113 frameCEXT->SetEditorMode(TRUE);
114 frameCEXT->ShowModal();
119 void frmContactEditor::DeleteXToken( wxCommandEvent& event )
121 long longSelected = -1;
122 int intSelectedData = 0;
124 if (!GetSelectedItem(lboXToken,
130 lboXToken->DeleteItem(longSelected);
132 DeleteMapData(intSelectedData, &ContactEditorData.XTokenList, &ContactEditorData.XTokenListTokens);