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 )
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,
36 frameCEVen->ShowModal();
42 void frmContactEditor::ModifyVendorNamespace( wxCommandEvent& event )
45 long longSelected = -1;
46 int intSelectedData = 0;
48 if (!GetSelectedItem(lboVendorNamespace,
54 frmContactEditorVendor *frameCEVen = new frmContactEditorVendor ( this );
55 frameCEVen->SetupPointers(&ContactEditorData.VendorList,
56 &ContactEditorData.VendorListPEN,
57 &ContactEditorData.VendorListElement,
60 frameCEVen->SetEditorMode(TRUE);
61 frameCEVen->ShowModal();
67 void frmContactEditor::DeleteVendorNamespace( wxCommandEvent& event )
69 long longSelected = -1;
70 int intSelectedData = 0;
72 if (!GetSelectedItem(lboVendorNamespace,
78 lboVendorNamespace->DeleteItem(longSelected);
80 DeleteMapData(intSelectedData, &ContactEditorData.VendorList, &ContactEditorData.VendorListPEN,
81 &ContactEditorData.VendorListElement);
85 void frmContactEditor::AddXToken( wxCommandEvent& event )
90 frmContactEditorXToken *frameCEXT = new frmContactEditorXToken ( this );
91 frameCEXT->SetEditorMode(FALSE);
92 intResult = GetLastInt(&ContactEditorData.XTokenList);
93 frameCEXT->SetupPointers(&ContactEditorData.XTokenList,
94 &ContactEditorData.XTokenListTokens,
97 frameCEXT->ShowModal();
103 void frmContactEditor::ModifyXToken( wxCommandEvent& event )
106 long longSelected = -1;
107 int intSelectedData = 0;
109 if (!GetSelectedItem(lboXToken,
117 frmContactEditorXToken *frameCEXT = new frmContactEditorXToken ( this );
118 frameCEXT->SetupPointers(&ContactEditorData.XTokenList,
119 &ContactEditorData.XTokenListTokens,
122 frameCEXT->SetEditorMode(TRUE);
123 frameCEXT->ShowModal();
129 void frmContactEditor::DeleteXToken( wxCommandEvent& event )
132 long longSelected = -1;
133 int intSelectedData = 0;
135 if (!GetSelectedItem(lboXToken,
141 lboXToken->DeleteItem(longSelected);
143 DeleteMapData(intSelectedData, &ContactEditorData.XTokenList, &ContactEditorData.XTokenListTokens);