X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fwidgets%2FXABContactMenu.cpp;h=cfef818d0c8e35960cb733c85fd5bf8278cbcc15;hb=d4087a12e1dccd74c089f2583500578fa5e59212;hp=b4688339082ae04dabb4345caccee5c49a488b6e;hpb=781846ba3acc53f5e6f47e736c7d18544895b39c;p=xestiaab%2F.git diff --git a/source/widgets/XABContactMenu.cpp b/source/widgets/XABContactMenu.cpp index b468833..cfef818 100644 --- a/source/widgets/XABContactMenu.cpp +++ b/source/widgets/XABContactMenu.cpp @@ -31,6 +31,8 @@ enum { XABContactMenu::XABContactMenu(int MenuTypeIn){ + // Setup the XABContactMenu control. + MenuType = MenuTypeIn; // Setup the menu items. @@ -70,6 +72,8 @@ XABContactMenu::XABContactMenu(int MenuTypeIn){ XABContactMenu::~XABContactMenu(){ + // Destory the XABContactMenu object. + // Delete the menu items. for (std::map::iterator MenuItemIter = MenuItems.begin(); @@ -94,6 +98,8 @@ void XABContactMenu::AppendMenuItem(wxString ObjectName, int ItemID, wxItemKind ItemType){ + // Append a menu item to the XABContactMenu control. + wxMenuItem *menuitem = new wxMenuItem( NULL, ItemID, @@ -113,6 +119,8 @@ void XABContactMenu::SetupPointersSearch(wxWindow* WindowPtrIn, wxListCtrl* ContactListCtrlIn, bool SearchModeOnlyIn){ + // Setup the pointers when being used in the search window. + WindowPtr = WindowPtrIn; ContactListCtrl = ContactListCtrlIn; SearchModeOnly = SearchModeOnlyIn; @@ -123,6 +131,8 @@ void XABContactMenu::SetupPointers(wxWindow* WindowPtrIn, wxListCtrl* ContactListCtrlIn, bool EnableAccountSettingsIn){ + // Setup the pointers. + WindowPtr = WindowPtrIn; ContactListCtrl = ContactListCtrlIn; EnableAccountSettings = EnableAccountSettingsIn; @@ -131,6 +141,8 @@ void XABContactMenu::SetupPointers(wxWindow* WindowPtrIn, wxMenu* XABContactMenu::MenuPointer(){ + // Process the menu pointer. + // Check for the following before passing the pointer: // If an account has been selected. // - Disable Refresh Address Book if not. @@ -204,6 +216,9 @@ wxMenu* XABContactMenu::MenuPointer(){ void XABContactMenu::ProcessMenuItemClick( wxCommandEvent& event){ + // Process an action when a menu item in the XABContactMenu + // control is selected. + int ItemID = event.GetId(); if (MenuType == XABCONTACTMENU_MAIN){