X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fcontacteditor%2FfrmContactEditor-Category.cpp;h=f3e919f8c2b0cb462f0e785317886e2759d116a5;hb=f69e09d827e06435ea94bb73aa71ab5f9d5c035b;hp=ef3439c57795ce1e662dc4d81645c4ddaab7e6e5;hpb=6dcb2ed929d861d7ca12bd2f646392b2dfaa9a51;p=xestiaab%2F.git diff --git a/source/contacteditor/frmContactEditor-Category.cpp b/source/contacteditor/frmContactEditor-Category.cpp index ef3439c..f3e919f 100644 --- a/source/contacteditor/frmContactEditor-Category.cpp +++ b/source/contacteditor/frmContactEditor-Category.cpp @@ -22,11 +22,10 @@ void frmContactEditor::AddCategory( wxCommandEvent& event ) { - int intResult = 0; + // Bring up the window to add a category. frmContactEditorCategory *frameCECategory = new frmContactEditorCategory ( this ); frameCECategory->SetEditorMode(FALSE); - intResult = GetLastInt(&ContactEditorData.CategoriesList); frameCECategory->SetupPointers(&ContactEditorData.CategoriesList, &ContactEditorData.CategoriesListAltID, &ContactEditorData.CategoriesListPID, @@ -38,16 +37,19 @@ void frmContactEditor::AddCategory( wxCommandEvent& event ) frameCECategory->ShowModal(); delete frameCECategory; frameCECategory = NULL; - + intValueSeek++; + } void frmContactEditor::ModifyCategory( wxCommandEvent& event ) { + // Bring up the window to edit a category. + long longSelected = -1; int intSelectedData = 0; - if (!GetSelectedItem(lboCategories, + if (lboCategories->GetItemCount() == 0 || !GetSelectedItem(lboCategories, &longSelected, &intSelectedData)){ @@ -74,10 +76,12 @@ void frmContactEditor::ModifyCategory( wxCommandEvent& event ) void frmContactEditor::DeleteCategory( wxCommandEvent& event ) { + // Bring up the window to delete the category. + long longSelected = -1; int intSelectedData = 0; - if (!GetSelectedItem(lboCategories, + if (lboCategories->GetItemCount() == 0 || !GetSelectedItem(lboCategories, &longSelected, &intSelectedData)){