summaryrefslogtreecommitdiff
path: root/gtk2_ardour/ardour_dialog.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2005-09-26 14:33:53 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2005-09-26 14:33:53 +0000
commit625df0912abe44912d842f1485d7d6c9a3321aef (patch)
tree45ad1fba0b6d40c8d441e3416f92ab2b0a4dcf7d /gtk2_ardour/ardour_dialog.cc
parent97c911262100ad866a17a0aea8f4f0d306fb6625 (diff)
got ardour_dialog compiling
git-svn-id: svn://localhost/trunk/ardour2@41 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/ardour_dialog.cc')
-rw-r--r--gtk2_ardour/ardour_dialog.cc66
1 files changed, 24 insertions, 42 deletions
diff --git a/gtk2_ardour/ardour_dialog.cc b/gtk2_ardour/ardour_dialog.cc
index 1755214bd8..a5604fbbdb 100644
--- a/gtk2_ardour/ardour_dialog.cc
+++ b/gtk2_ardour/ardour_dialog.cc
@@ -27,7 +27,7 @@
ArdourDialog::ArdourDialog (string name)
- : Gtk::Window (GTK_WINDOW_TOPLEVEL),
+ : Dialog (name),
KeyboardTarget (*this, name)
{
session = 0;
@@ -42,7 +42,7 @@ ArdourDialog::~ArdourDialog ()
{
}
-gint
+bool
ArdourDialog::on_enter_notify_event (GdkEventCrossing *ev)
{
if (ev->detail != GDK_NOTIFY_INFERIOR) {
@@ -51,7 +51,7 @@ ArdourDialog::on_enter_notify_event (GdkEventCrossing *ev)
return FALSE;
}
-gint
+bool
ArdourDialog::on_leave_notify_event (GdkEventCrossing *ev)
{
if (ev->detail != GDK_NOTIFY_INFERIOR) {
@@ -60,13 +60,13 @@ ArdourDialog::on_leave_notify_event (GdkEventCrossing *ev)
return FALSE;
}
-gint
-ArdourDialog:on_unmap (GdkEventAny *ev)
+void
+ArdourDialog::on_unmap ()
{
_within_hiding = true;
- Hiding (); /* EMIT_SIGNAL */
+ Hiding (); /* EMIT_SIGNAL */
_within_hiding = false;
- return Gtk::Window::on_unmap (ev);
+ Dialog::on_unmap ();
}
void
@@ -77,37 +77,6 @@ ArdourDialog::wm_close()
}
void
-ArdourDialog::wm_doi ()
-{
- if (!hide_on_stop) {
- Hiding (); /* EMIT_SIGNAL */
- }
- stop (-1);
- delete_when_idle (this);
-}
-
-gint
-ArdourDialog::wm_close_event (GdkEventAny* ev)
-{
- wm_close ();
- return TRUE;
-}
-
-gint
-ArdourDialog::wm_doi_event (GdkEventAny* ev)
-{
- wm_doi ();
- return TRUE;
-}
-
-gint
-ArdourDialog::wm_doi_event_stop (GdkEventAny* ev)
-{
- stop (-1);
- return TRUE;
-}
-
-void
ArdourDialog::set_hide_on_stop (bool yn)
{
hide_on_stop = yn;
@@ -126,8 +95,6 @@ ArdourDialog::close ()
void
ArdourDialog::stop (int rr)
{
- _run_status = rr;
-
if (hide_on_stop) {
Hiding (); /* EMIT_SIGNAL */
hide_all ();
@@ -138,7 +105,11 @@ ArdourDialog::stop (int rr)
}
if (running) {
- Gtk::Main::quit ();
+ if (rr == 0) {
+ response (GTK_RESPONSE_ACCEPT);
+ } else {
+ response (GTK_RESPONSE_CANCEL);
+ }
running = false;
}
}
@@ -153,7 +124,18 @@ ArdourDialog::run ()
}
running = true;
- Gtk::Main::run ();
+ switch (Dialog::run ()) {
+ case GTK_RESPONSE_ACCEPT:
+ _run_status = 0;
+ break;
+
+ case GTK_RESPONSE_DELETE_EVENT:
+ _run_status = -1;
+ break;
+
+ default:
+ _run_status = -1;
+ }
}
void