From: Nicolas Boichat Date: Sun, 2 May 2004 11:10:30 +0000 (+0000) Subject: - wxbMainFrame : Corrected incorrect casting of thread event functions (reported... X-Git-Tag: Release-1.34.3~61 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ae0736c87adce2f2a81598bea595db7f23df3f05;p=bacula%2Fbacula - wxbMainFrame : Corrected incorrect casting of thread event functions (reported by Aristedes Maniatis) git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1339 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/wx-console/CHANGELOG b/bacula/src/wx-console/CHANGELOG index ab1c3270e8..b646b2f1b7 100644 --- a/bacula/src/wx-console/CHANGELOG +++ b/bacula/src/wx-console/CHANGELOG @@ -1,4 +1,6 @@ 02-05-2004 : + - wxbMainFrame : Corrected incorrect casting of thread event + functions (reported by Aristedes Maniatis) - wxbRestorePanel : Corrected incorrect casting of event functions (reported by Aristedes Maniatis) diff --git a/bacula/src/wx-console/TODO b/bacula/src/wx-console/TODO index e71fd51014..b051f56124 100644 --- a/bacula/src/wx-console/TODO +++ b/bacula/src/wx-console/TODO @@ -76,6 +76,8 @@ wxbRestorePanel : Add a timeout when waiting for commands results wxbRestorePanel : Be sure of which job we just have run (not suppositions as I'm doing now) : needs director modification. +bacula-dir : Progress status when building tree. + bacula-dir : correct director to handle correctly + marked status (In fact there is a bug in the director : If you mark a directory (not a file), and then unmark it, its parents keep the "+" status.) diff --git a/bacula/src/wx-console/wxbmainframe.cpp b/bacula/src/wx-console/wxbmainframe.cpp index 3e64a2c138..beb400f6e7 100644 --- a/bacula/src/wx-console/wxbmainframe.cpp +++ b/bacula/src/wx-console/wxbmainframe.cpp @@ -67,6 +67,15 @@ END_DECLARE_EVENT_TYPES() DEFINE_EVENT_TYPE(wxbTHREAD_EVENT) +typedef void (wxEvtHandler::*wxThreadEventFunction)(wxbThreadEvent&); + +#define EVT_THREAD_EVENT(id, fn) \ + DECLARE_EVENT_TABLE_ENTRY( \ + wxbTHREAD_EVENT, id, wxID_ANY, \ + (wxObjectEventFunction)(wxEventFunction)(wxThreadEventFunction)&fn, \ + (wxObject *) NULL \ + ), + // the event tables connect the wxWindows events with the functions (event // handlers) which process them. It can be also done at run-time, but for the // simple menu events like this the static method is much simpler. @@ -74,8 +83,8 @@ BEGIN_EVENT_TABLE(wxbMainFrame, wxFrame) EVT_MENU(Minimal_Quit, wxbMainFrame::OnQuit) EVT_MENU(Minimal_About, wxbMainFrame::OnAbout) EVT_TEXT_ENTER(TypeText, wxbMainFrame::OnEnter) + EVT_THREAD_EVENT(Thread, wxbMainFrame::OnPrint) EVT_BUTTON(SendButton, wxbMainFrame::OnEnter) - EVT_CUSTOM(wxbTHREAD_EVENT, Thread, wxbMainFrame::OnPrint) END_EVENT_TABLE() // ----------------------------------------------------------------------------