Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Splitting frmContactEditor.cpp into 15 files to make it more manageable.
[xestiaab/.git] / source / contacteditor / frmContactEditor-Category.cpp
1 #include "frmContactEditor.h"
2 #include "frmContactEditorCategory.h"
4 void frmContactEditor::AddCategory( wxCommandEvent& event )
5 {
6     int intResult = 0;
7     
8     frmContactEditorCategory *frameCECategory = new frmContactEditorCategory ( this );
9     frameCECategory->SetEditorMode(FALSE);
10     intResult = GetLastInt(&CategoriesList);
11     frameCECategory->SetupPointers(&CategoriesList,
12                                    &CategoriesListAltID,
13                                    &CategoriesListPID,
14                                    &CategoriesListType,
15                                    &CategoriesListTokens,
16                                    &CategoriesListPref,
17                                    lboCategories,
18                                    (intValueSeek));
19     frameCECategory->ShowModal();
20     delete frameCECategory;
21     frameCECategory = NULL;
22 }
24 void frmContactEditor::ModifyCategory( wxCommandEvent& event )
25 {
26     long longSelected = -1;
27     int intSelectedData = 0;
28     
29     if (!GetSelectedItem(lboCategories,
30                          &longSelected,
31                          &intSelectedData)){
32         return;
33     }
34     
35     frmContactEditorCategory *frameCECategory = new frmContactEditorCategory ( this );
36     frameCECategory->SetupPointers(&CategoriesList,
37                                    &CategoriesListAltID,
38                                    &CategoriesListPID,
39                                    &CategoriesListType,
40                                    &CategoriesListTokens,
41                                    &CategoriesListPref,
42                                    lboCategories,
43                                    intSelectedData);
44     frameCECategory->SetEditorMode(TRUE);
45     frameCECategory->ShowModal();
46     delete frameCECategory;
47     frameCECategory = NULL;
48 }
50 void frmContactEditor::DeleteCategory( wxCommandEvent& event )
51 {
52     long longSelected = -1;
53     int intSelectedData = 0;
54     
55     if (!GetSelectedItem(lboCategories,
56                          &longSelected,
57                          &intSelectedData)){
58         return;
59     }
60     
61     lboCategories->DeleteItem(longSelected);
62     
63     DeleteMapData(intSelectedData, &CategoriesList,
64                   &CategoriesListAltID, &CategoriesListPID,
65                   &CategoriesListType, &CategoriesListTokens,
66                   &CategoriesListPref);
67     
68 }
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