1 --- src/MadEditFrame.h.orig 2010-01-22 17:44:25.882267610 -0430
2 +++ src/MadEditFrame.h 2010-01-22 18:02:14.144664728 -0430
4 //void OnChar(wxKeyEvent& evt);
5 void OnActivate(wxActivateEvent &evt);
7 + void OnFileChanged(wxEvent &evt);
9 bool QueryCloseFile(int idx);
10 bool QueryCloseAllFiles();
12 --- src/MadEditFrame.cpp.orig 2010-01-22 17:41:26.481409287 -0430
13 +++ src/MadEditFrame.cpp 2010-01-22 18:35:11.374420287 -0430
18 +BEGIN_DECLARE_EVENT_TYPES()
19 + DECLARE_LOCAL_EVENT_TYPE( myEVT_FILE_CHANGED, wxNewEventType() )
20 +END_DECLARE_EVENT_TYPES()
22 +DEFINE_LOCAL_EVENT_TYPE( myEVT_FILE_CHANGED )
24 //----------------------------------------------------------------------------
26 //----------------------------------------------------------------------------
28 //EVT_CHAR(MadEditFrame::OnChar)
30 EVT_ACTIVATE(MadEditFrame::OnActivate)
31 + EVT_CUSTOM( myEVT_FILE_CHANGED, wxID_ANY, MadEditFrame::OnFileChanged)
32 EVT_UPDATE_UI(menuSave, MadEditFrame::OnUpdateUI_MenuFile_CheckCount)
33 EVT_UPDATE_UI(menuSaveAs, MadEditFrame::OnUpdateUI_MenuFile_CheckCount)
34 EVT_UPDATE_UI(menuSaveAll, MadEditFrame::OnUpdateUI_MenuFile_CheckCount)
37 if(g_CheckModTimeForReload)
39 - g_ActiveMadEdit->ReloadByModificationTime();
40 + wxCommandEvent event(myEVT_FILE_CHANGED, m_Notebook->GetId());
41 + event.SetEventObject(this);
42 + AddPendingEvent(event);
46 @@ -2387,6 +2396,14 @@
50 +void MadEditFrame::OnFileChanged(wxEvent& evt) {
51 + if(g_ActiveMadEdit) {
53 + g_ActiveMadEdit->SetFocus();
54 + g_ActiveMadEdit->ReloadByModificationTime();
58 void MadEditFrame::OnNotebookPageClosing(wxAuiNotebookEvent& event)