From 6f4e838a58f2dc501eb506effdf9ea4d1203f46d Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 6 Nov 2019 16:25:30 -0700 Subject: [PATCH] add a signal to Gtkmm2ext::Keyboard to allow (possible) handling of close-current-dialog --- libs/gtkmm2ext/gtkmm2ext/keyboard.h | 1 + libs/gtkmm2ext/keyboard.cc | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/libs/gtkmm2ext/gtkmm2ext/keyboard.h b/libs/gtkmm2ext/gtkmm2ext/keyboard.h index 21d6bd2ef8..89679b2c6f 100644 --- a/libs/gtkmm2ext/gtkmm2ext/keyboard.h +++ b/libs/gtkmm2ext/gtkmm2ext/keyboard.h @@ -188,6 +188,7 @@ class LIBGTKMM2EXT_API Keyboard : public sigc::trackable, PBD::Stateful sigc::signal0 ZoomVerticalModifierReleased; static sigc::signal0 RelevantModifierKeysChanged; + static sigc::signal1 HideMightMeanQuit; protected: static Keyboard* _the_keyboard; diff --git a/libs/gtkmm2ext/keyboard.cc b/libs/gtkmm2ext/keyboard.cc index 1b51b6630a..cb395f62ef 100644 --- a/libs/gtkmm2ext/keyboard.cc +++ b/libs/gtkmm2ext/keyboard.cc @@ -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 Keyboard::RelevantModifierKeysChanged; +sigc::signal1 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;