Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Indented code properly contacteditor/frmContactEditor-Key.cpp
[xestiaab/.git] / source / contacteditor / frmContactEditor-Key.cpp
1 // frmContactEditor-Key.cpp - frmContactEditor Key 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 "frmContactEditorKey.h"
22 void frmContactEditor::AddKey( wxCommandEvent& event )
23 {
24         
25         int intResult = 0;
26     
27         frmContactEditorKey *frameCEKey = new frmContactEditorKey ( this );
28         frameCEKey->SetEditorMode(FALSE);
29         intResult = GetLastInt(&ContactEditorData.KeyList);
30         frameCEKey->SetupPointers(&ContactEditorData.KeyList,
31                 &ContactEditorData.KeyListAltID,
32                 &ContactEditorData.KeyListPID,
33                 &ContactEditorData.KeyListKeyType,
34                 &ContactEditorData.KeyListDataType,
35                 &ContactEditorData.KeyListType,
36                 &ContactEditorData.KeyListTokens,
37                 &ContactEditorData.KeyListPref,
38                 lboKeys,
39                 (intValueSeek));
40         frameCEKey->ShowModal();
41         delete frameCEKey;
42         frameCEKey = NULL;
43         
44 }
46 void frmContactEditor::ModifyKey( wxCommandEvent& event )
47 {
48         
49         long longSelected = -1;
50         int intSelectedData = 0;
51     
52         if (!GetSelectedItem(lboKeys,
53                 &longSelected,
54                 &intSelectedData)){
55                 return;
56         }
57     
58         frmContactEditorKey *frameCEKey = new frmContactEditorKey ( this );
59         frameCEKey->SetupPointers(&ContactEditorData.KeyList,
60                 &ContactEditorData.KeyListAltID,
61                 &ContactEditorData.KeyListPID,
62                 &ContactEditorData.KeyListKeyType,
63                 &ContactEditorData.KeyListDataType,
64                 &ContactEditorData.KeyListType,
65                 &ContactEditorData.KeyListTokens,
66                 &ContactEditorData.KeyListPref,
67                 lboKeys,
68                 intSelectedData);
69         frameCEKey->SetEditorMode(TRUE);
70         frameCEKey->ShowModal();
71         delete frameCEKey;
72         frameCEKey = NULL;
73         
74 }
76 void frmContactEditor::DeleteKey( wxCommandEvent& event )
77 {
78         
79         long longSelected = -1;
80         int intSelectedData = 0;
81     
82         if (!GetSelectedItem(lboKeys,
83                 &longSelected,
84                 &intSelectedData)){
85                 return;
86         }
87     
88         lboKeys->DeleteItem(longSelected);
89     
90         DeleteMapData(intSelectedData, &ContactEditorData.KeyList, &ContactEditorData.KeyListAltID,
91                 &ContactEditorData.KeyListPID, &ContactEditorData.KeyListKeyType, &ContactEditorData.KeyListDataType, &ContactEditorData.KeyListType,
92                 &ContactEditorData.KeyListTokens, &ContactEditorData.KeyListPref);
93     
94 }
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