Clean up ArdourDialog.
authorDavid Robillard <d@drobilla.net>
Fri, 18 Nov 2011 21:03:21 +0000 (21:03 +0000)
committerDavid Robillard <d@drobilla.net>
Fri, 18 Nov 2011 21:03:21 +0000 (21:03 +0000)
Remove undefined static ArdourDialog::close_all_current_dialogs.

Remove pointless ArdourDialog::on_key_press_event.

Defer to Gtk::Dialog::on_[enter|leave]_notify_event.  I'm not sure exactly
what these currently do, but not calling it doesn't seem like a good idea.

Trim include tree ever so slightly.

git-svn-id: svn://localhost/ardour2/branches/3.0@10690 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/ardour_dialog.cc
gtk2_ardour/ardour_dialog.h
gtk2_ardour/latency_gui.cc

index cd95666b16f120b3fd85fa2c5b12cc12b4ce68cc..278433c7efa1e586e7c09a81e25248ea3370dbeb 100644 (file)
@@ -56,14 +56,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
@@ -94,9 +94,3 @@ ArdourDialog::init ()
        set_border_width (10);
        CloseAllDialogs.connect (sigc::bind (sigc::mem_fun (*this, &ArdourDialog::response), RESPONSE_CANCEL));
 }
-
-bool
-ArdourDialog::on_key_press_event (GdkEventKey* key)
-{
-       return Gtk::Dialog::on_key_press_event (key);
-}
index bd74afc47d21a6e013834b69a0ec5e18c4a20e96..4f53662c235aebcfa4e7226661d5abf4d18aa8c9 100644 (file)
 #include <gtkmm/window.h>
 #include <gtkmm/dialog.h>
 
-#include "ardour/ardour.h"
 #include "ardour/session_handle.h"
 
-namespace ARDOUR {
-       class Session;
-}
-
 /*
  * This virtual parent class is so that each dialog box uses the
  * same mechanism to declare its closing. It shares a common
@@ -43,9 +38,6 @@ class ArdourDialog : public Gtk::Dialog, public ARDOUR::SessionHandlePtr
        ArdourDialog (Gtk::Window& parent, std::string title, bool modal = false, bool use_separator = false);
        ~ArdourDialog();
 
-       static int close_all_current_dialogs (int response);
-
-       bool on_key_press_event (GdkEventKey *);
        bool on_enter_notify_event (GdkEventCrossing*);
        bool on_leave_notify_event (GdkEventCrossing*);
        void on_unmap ();
index 7558fbeb06231f617396170dd33703c4a70db40d..180af93776476b8e482584fb0b642108cfa6d7b2 100644 (file)
@@ -22,6 +22,7 @@
 #include <iomanip>
 #include "ardour/latent.h"
 #include "pbd/convert.h"
+#include "pbd/error.h"
 #include <gtkmm2ext/utils.h>
 
 #include "latency_gui.h"