#include "wx/nag_dialog.h"
#include "wx/export_dialog.h"
#include "wx/paste_dialog.h"
+#include "wx/focus_manager.h"
#include "lib/film.h"
#include "lib/config.h"
#include "lib/util.h"
overall_panel->SetSizer (main_sizer);
+ UpdateChecker::instance()->StateChanged.connect (boost::bind (&DOMFrame::update_checker_state_changed, this));
+
+ FocusManager::instance()->SetFocus.connect (boost::bind (&DOMFrame::remove_accelerators, this));
+ FocusManager::instance()->KillFocus.connect (boost::bind (&DOMFrame::add_accelerators, this));
+ add_accelerators ();
+ }
+
+ void add_accelerators ()
+ {
#ifdef __WXOSX__
int accelerators = 7;
#else
wxAcceleratorTable accel_table (accelerators, accel);
SetAcceleratorTable (accel_table);
delete[] accel;
+ }
- UpdateChecker::instance()->StateChanged.connect (boost::bind (&DOMFrame::update_checker_state_changed, this));
+ void remove_accelerators ()
+ {
+ SetAcceleratorTable (wxAcceleratorTable ());
}
void remove_clicked (wxCommandEvent& ev)