From 54ca9b53d5c442288b8104086348e5b0035625e9 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Wed, 21 Oct 2015 07:07:34 +0100 Subject: [PATCH] mnuSleepMode in frmActivityMgr caused an assertion using wxNullBitmap which it shouldn't do. --- source/AppXestiaAddrBk.cpp | 17 ++++++----------- source/AppXestiaAddrBk.h | 4 ++-- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/source/AppXestiaAddrBk.cpp b/source/AppXestiaAddrBk.cpp index f07322d..d8faa7e 100644 --- a/source/AppXestiaAddrBk.cpp +++ b/source/AppXestiaAddrBk.cpp @@ -29,11 +29,11 @@ frmMainADT::frmMainADT( wxWindow* parent, wxWindowID id, const wxString& title, mnuManage->AppendSeparator(); wxMenuItem* mnuImport; - mnuImport = new wxMenuItem( mnuManage, ID_MANAGE_IMPORT, wxString( wxT("Import...") ) , wxEmptyString, wxITEM_NORMAL ); + mnuImport = new wxMenuItem( mnuManage, ID_IMPORT, wxString( wxT("Import...") ) , wxEmptyString, wxITEM_NORMAL ); mnuManage->Append( mnuImport ); wxMenuItem* mnuExport; - mnuExport = new wxMenuItem( mnuManage, ID_MANAGE_EXPORT, wxString( wxT("Export...") ) , wxEmptyString, wxITEM_NORMAL ); + mnuExport = new wxMenuItem( mnuManage, ID_EXPORT, wxString( wxT("Export...") ) , wxEmptyString, wxITEM_NORMAL ); mnuManage->Append( mnuExport ); mnuPrefSep = mnuManage->AppendSeparator(); @@ -261,8 +261,8 @@ frmMainADT::~frmMainADT() // Disconnect Events this->Disconnect( ID_MANAGE_NEWAB, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::OpenNewABDialog ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::RefreshAddressBook ) ); - this->Disconnect( ID_MANAGE_IMPORT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::OpenImportDialog ) ); - this->Disconnect( ID_MANAGE_EXPORT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::OpenExportDialog ) ); + this->Disconnect( ID_IMPORT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::OpenImportDialog ) ); + this->Disconnect( ID_EXPORT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::OpenExportDialog ) ); this->Disconnect( wxID_PREFERENCES, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::OpenPreferences ) ); this->Disconnect( wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::QuitApp ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::ShowContactEditorNew ) ); @@ -805,8 +805,6 @@ frmNewAccountADT::frmNewAccountADT( wxWindow* parent, wxWindowID id, const wxStr szrNewAccount = new wxBoxSizer( wxVERTICAL ); tabType = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - tabType->Hide(); - wxFlexGridSizer* fgSizer32; fgSizer32 = new wxFlexGridSizer( 0, 1, 0, 0 ); fgSizer32->AddGrowableCol( 0 ); @@ -890,6 +888,8 @@ frmNewAccountADT::frmNewAccountADT( wxWindow* parent, wxWindowID id, const wxStr szrNewAccount->Add( tabType, 1, wxEXPAND | wxALL, 5 ); tabConn = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + tabConn->Hide(); + wxBoxSizer* bSizer323; bSizer323 = new wxBoxSizer( wxVERTICAL ); @@ -4079,11 +4079,6 @@ frmActivityMgrADT::frmActivityMgrADT( wxWindow* parent, wxWindowID id, const wxS wxMenuItem* mnuSleepMode; mnuSleepMode = new wxMenuItem( mnuWindow, wxID_ANY, wxString( wxT("Sleep Mode") ) , wxEmptyString, wxITEM_CHECK ); - #ifdef __WXMSW__ - mnuSleepMode->SetBitmaps( wxNullBitmap ); - #elif (defined( __WXGTK__ ) || defined( __WXOSX__ )) - mnuSleepMode->SetBitmap( wxNullBitmap ); - #endif mnuWindow->Append( mnuSleepMode ); mnuWindow->AppendSeparator(); diff --git a/source/AppXestiaAddrBk.h b/source/AppXestiaAddrBk.h index 9290350..3126cde 100644 --- a/source/AppXestiaAddrBk.h +++ b/source/AppXestiaAddrBk.h @@ -50,8 +50,8 @@ /////////////////////////////////////////////////////////////////////////// #define ID_MANAGE_NEWAB 1000 -#define ID_MANAGE_IMPORT 1001 -#define ID_MANAGE_EXPORT 1002 +#define ID_IMPORT 1001 +#define ID_EXPORT 1002 #define ID_CONTACT_EDIT 1003 #define ID_CONTACT_DELETE 1004 #define ID_VIEW_FNLN 1005 -- 2.39.5