Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Indented code properly contacteditor/frmContactEditor-Category.cpp
[xestiaab/.git] / source / contacteditor / frmContactEditor-Category.cpp
1 // frmContactEditor-Category.cpp - frmContactEditor Category 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 "frmContactEditorCategory.h"
22 void frmContactEditor::AddCategory( wxCommandEvent& event )
23 {
25         int intResult = 0;
26     
27         frmContactEditorCategory *frameCECategory = new frmContactEditorCategory ( this );
28         frameCECategory->SetEditorMode(FALSE);
29         intResult = GetLastInt(&ContactEditorData.CategoriesList);
30         frameCECategory->SetupPointers(&ContactEditorData.CategoriesList,
31                 &ContactEditorData.CategoriesListAltID,
32                 &ContactEditorData.CategoriesListPID,
33                 &ContactEditorData.CategoriesListType,
34                 &ContactEditorData.CategoriesListTokens,
35                 &ContactEditorData.CategoriesListPref,
36                 lboCategories,
37                 (intValueSeek));
38         frameCECategory->ShowModal();
39         delete frameCECategory;
40         frameCECategory = NULL;
41         
42 }
44 void frmContactEditor::ModifyCategory( wxCommandEvent& event )
45 {
47         long longSelected = -1;
48         int intSelectedData = 0;
49     
50         if (!GetSelectedItem(lboCategories,
51                 &longSelected,
52                 &intSelectedData)){
53                 
54                 return;
55                 
56         }
57     
58         frmContactEditorCategory *frameCECategory = new frmContactEditorCategory ( this );
59         frameCECategory->SetupPointers(&ContactEditorData.CategoriesList,
60                 &ContactEditorData.CategoriesListAltID,
61                 &ContactEditorData.CategoriesListPID,
62                 &ContactEditorData.CategoriesListType,
63                 &ContactEditorData.CategoriesListTokens,
64                 &ContactEditorData.CategoriesListPref,
65                 lboCategories,
66                 intSelectedData);
67         frameCECategory->SetEditorMode(TRUE);
68         frameCECategory->ShowModal();
69         delete frameCECategory;
70         frameCECategory = NULL;
71         
72 }
74 void frmContactEditor::DeleteCategory( wxCommandEvent& event )
75 {
77         long longSelected = -1;
78         int intSelectedData = 0;
79     
80         if (!GetSelectedItem(lboCategories,
81                 &longSelected,
82                 &intSelectedData)){
83                 
84                 return;
85                 
86         }
87     
88         lboCategories->DeleteItem(longSelected);
89     
90         DeleteMapData(intSelectedData, &ContactEditorData.CategoriesList,
91                 &ContactEditorData.CategoriesListAltID, &ContactEditorData.CategoriesListPID,
92                 &ContactEditorData.CategoriesListType, &ContactEditorData.CategoriesListTokens,
93                 &ContactEditorData.CategoriesListPref);
94  
95 }
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