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 )
26 // Bring up the window for adding vendor namespace data.
28 frmContactEditorVendor *frameCEVen = new frmContactEditorVendor ( this );
29 frameCEVen->SetEditorMode(FALSE);
30 frameCEVen->SetupPointers(&ContactEditorData.VendorList,
31 &ContactEditorData.VendorListPEN,
32 &ContactEditorData.VendorListElement,
35 frameCEVen->ShowModal();
41 void frmContactEditor::ModifyVendorNamespace( wxCommandEvent& event )
44 // Bring up the window for modifying vendor namespace data.
46 long longSelected = -1;
47 int intSelectedData = 0;
49 if (!GetSelectedItem(lboVendorNamespace,
55 frmContactEditorVendor *frameCEVen = new frmContactEditorVendor ( this );
56 frameCEVen->SetupPointers(&ContactEditorData.VendorList,
57 &ContactEditorData.VendorListPEN,
58 &ContactEditorData.VendorListElement,
61 frameCEVen->SetEditorMode(TRUE);
62 frameCEVen->ShowModal();
68 void frmContactEditor::DeleteVendorNamespace( wxCommandEvent& event )
71 // Bring up the window for deleting vendor namespace data.
73 long longSelected = -1;
74 int intSelectedData = 0;
76 if (!GetSelectedItem(lboVendorNamespace,
82 lboVendorNamespace->DeleteItem(longSelected);
84 DeleteMapData(intSelectedData, &ContactEditorData.VendorList, &ContactEditorData.VendorListPEN,
85 &ContactEditorData.VendorListElement);
89 void frmContactEditor::AddXToken( wxCommandEvent& event )
92 // Bring up the window for adding extended data.
94 frmContactEditorXToken *frameCEXT = new frmContactEditorXToken ( this );
95 frameCEXT->SetEditorMode(FALSE);
96 frameCEXT->SetupPointers(&ContactEditorData.XTokenList,
97 &ContactEditorData.XTokenListTokens,
100 frameCEXT->ShowModal();
106 void frmContactEditor::ModifyXToken( wxCommandEvent& event )
109 // Bring up the window for modifying extended data.
111 long longSelected = -1;
112 int intSelectedData = 0;
114 if (!GetSelectedItem(lboXToken,
122 frmContactEditorXToken *frameCEXT = new frmContactEditorXToken ( this );
123 frameCEXT->SetupPointers(&ContactEditorData.XTokenList,
124 &ContactEditorData.XTokenListTokens,
127 frameCEXT->SetEditorMode(TRUE);
128 frameCEXT->ShowModal();
134 void frmContactEditor::DeleteXToken( wxCommandEvent& event )
137 // Bring up the window for deleting extended data.
139 long longSelected = -1;
140 int intSelectedData = 0;
142 if (!GetSelectedItem(lboXToken,
148 lboXToken->DeleteItem(longSelected);
150 DeleteMapData(intSelectedData, &ContactEditorData.XTokenList, &ContactEditorData.XTokenListTokens);