Move a few declarations to first use.
[ardour.git] / gtk2_ardour / ardour_dialog.cc
index 63c32e8c2d00610e209be78e157519b20eac4b8a..c0e17087818cf9d98498a85f4390d66792a2641c 100644 (file)
 
 #include "ardour_dialog.h"
 #include "keyboard.h"
-#include "ardour_ui.h"
 #include "splash.h"
-#include "public_editor.h"
-#include "utils.h"
 
 using namespace std;
-using namespace sigc;
 using namespace Gtk;
 using namespace Gtkmm2ext;
 
@@ -57,14 +53,14 @@ bool
 ArdourDialog::on_enter_notify_event (GdkEventCrossing *ev)
 {
        Keyboard::the_keyboard().enter_window (ev, this);
-       return false;
+       return Dialog::on_enter_notify_event (ev);
 }
 
 bool
 ArdourDialog::on_leave_notify_event (GdkEventCrossing *ev)
 {
        Keyboard::the_keyboard().leave_window (ev, this);
-       return false;
+       return Dialog::on_leave_notify_event (ev);
 }
 
 void
@@ -82,7 +78,7 @@ ArdourDialog::on_show ()
        Splash* spl = Splash::instance();
 
        if (spl) {
-               spl->pop_back ();
+               spl->pop_back_for (*this);
        }
 
        Dialog::on_show ();
@@ -91,14 +87,9 @@ ArdourDialog::on_show ()
 void
 ArdourDialog::init ()
 {
-       session = 0;
        set_type_hint(Gdk::WINDOW_TYPE_HINT_DIALOG);
        set_border_width (10);
-       CloseAllDialogs.connect (bind (mem_fun (*this, &ArdourDialog::response), RESPONSE_CANCEL));
-}
-
-bool
-ArdourDialog::on_key_press_event (GdkEventKey* key)
-{
-       return Gtk::Dialog::on_key_press_event (key);
+       CloseAllDialogs.connect (
+               sigc::bind (sigc::mem_fun (*this, &ArdourDialog::response),
+                           RESPONSE_CANCEL));
 }