13
0

add a signal to Gtkmm2ext::Keyboard to allow (possible) handling of close-current-dialog

This commit is contained in:
Paul Davis 2019-11-06 16:25:30 -07:00
parent febaa1ff2d
commit 6f4e838a58
2 changed files with 5 additions and 0 deletions

View File

@ -188,6 +188,7 @@ class LIBGTKMM2EXT_API Keyboard : public sigc::trackable, PBD::Stateful
sigc::signal0<void> ZoomVerticalModifierReleased;
static sigc::signal0<void> RelevantModifierKeysChanged;
static sigc::signal1<void,Gtk::Window*> HideMightMeanQuit;
protected:
static Keyboard* _the_keyboard;

View File

@ -132,6 +132,7 @@ Gtk::Window* Keyboard::pre_dialog_active_window = 0;
/* set this to initially contain the modifiers we care about, then track changes in ::set_edit_modifier() etc. */
GdkModifierType Keyboard::RelevantModifierKeyMask;
sigc::signal0<void> Keyboard::RelevantModifierKeysChanged;
sigc::signal1<void,Gtk::Window*> Keyboard::HideMightMeanQuit;
void
Keyboard::magic_widget_grab_focus ()
@ -342,6 +343,9 @@ void
Keyboard::close_current_dialog ()
{
if (current_window) {
HideMightMeanQuit (current_window); /* EMIT SIGNAL */
current_window->hide ();
current_window = 0;