]> git.sur5r.net Git - bacula/bacula/commitdiff
- wxbMainFrame : Corrected incorrect casting of thread event functions (reported...
authorNicolas Boichat <nicolas@boichat.ch>
Sun, 2 May 2004 11:10:30 +0000 (11:10 +0000)
committerNicolas Boichat <nicolas@boichat.ch>
Sun, 2 May 2004 11:10:30 +0000 (11:10 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1339 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/wx-console/CHANGELOG
bacula/src/wx-console/TODO
bacula/src/wx-console/wxbmainframe.cpp

index ab1c3270e86b23a8a1f3a7d257a86471e6273ce0..b646b2f1b778829fe00eeb6a6837fb5f85b5ce3b 100644 (file)
@@ -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)
 
index e71fd5101447524ebb934600e47ab8ca604dc69a..b051f5612417e6b1ed53db4bff8a87b5cbe2e8db 100644 (file)
@@ -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.)
index 3e64a2c13811e7cad26560cc6aad1f16b274ecc9..beb400f6e7edce9558a9b2117c318d35f8e5cce0 100644 (file)
@@ -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()
 
 // ----------------------------------------------------------------------------