mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
move CloseAllDialogs signal and associated method from ArdourDialog to ARDOUR_UI, and make ArdourWindow obey it too
This commit is contained in:
parent
00f94a04cc
commit
6fd66bd467
5 changed files with 13 additions and 9 deletions
|
|
@ -23,6 +23,7 @@
|
||||||
#include <gtkmm2ext/doi.h>
|
#include <gtkmm2ext/doi.h>
|
||||||
|
|
||||||
#include "ardour_dialog.h"
|
#include "ardour_dialog.h"
|
||||||
|
#include "ardour_ui.h"
|
||||||
#include "keyboard.h"
|
#include "keyboard.h"
|
||||||
#include "splash.h"
|
#include "splash.h"
|
||||||
|
|
||||||
|
|
@ -30,8 +31,6 @@ using namespace std;
|
||||||
using namespace Gtk;
|
using namespace Gtk;
|
||||||
using namespace Gtkmm2ext;
|
using namespace Gtkmm2ext;
|
||||||
|
|
||||||
sigc::signal<void> ArdourDialog::CloseAllDialogs;
|
|
||||||
|
|
||||||
ArdourDialog::ArdourDialog (string title, bool modal, bool use_seperator)
|
ArdourDialog::ArdourDialog (string title, bool modal, bool use_seperator)
|
||||||
: Dialog (title, modal, use_seperator)
|
: Dialog (title, modal, use_seperator)
|
||||||
, _splash_pushed (false)
|
, _splash_pushed (false)
|
||||||
|
|
@ -98,9 +97,7 @@ ArdourDialog::on_show ()
|
||||||
void
|
void
|
||||||
ArdourDialog::init ()
|
ArdourDialog::init ()
|
||||||
{
|
{
|
||||||
set_type_hint(Gdk::WINDOW_TYPE_HINT_DIALOG);
|
|
||||||
set_border_width (10);
|
set_border_width (10);
|
||||||
CloseAllDialogs.connect (
|
// set_type_hint (Gdk::WINDOW_TYPE_HINT_DIALOG);
|
||||||
sigc::bind (sigc::mem_fun (*this, &ArdourDialog::response),
|
ARDOUR_UI::CloseAllDialogs.connect (sigc::bind (sigc::mem_fun (*this, &ArdourDialog::response), RESPONSE_CANCEL));
|
||||||
RESPONSE_CANCEL));
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -43,8 +43,6 @@ class ArdourDialog : public Gtk::Dialog, public ARDOUR::SessionHandlePtr
|
||||||
void on_unmap ();
|
void on_unmap ();
|
||||||
void on_show ();
|
void on_show ();
|
||||||
|
|
||||||
static void close_all_dialogs () { CloseAllDialogs(); }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool _splash_pushed;
|
bool _splash_pushed;
|
||||||
void init ();
|
void init ();
|
||||||
|
|
|
||||||
|
|
@ -136,6 +136,7 @@ sigc::signal<void,bool> ARDOUR_UI::Blink;
|
||||||
sigc::signal<void> ARDOUR_UI::RapidScreenUpdate;
|
sigc::signal<void> ARDOUR_UI::RapidScreenUpdate;
|
||||||
sigc::signal<void> ARDOUR_UI::SuperRapidScreenUpdate;
|
sigc::signal<void> ARDOUR_UI::SuperRapidScreenUpdate;
|
||||||
sigc::signal<void, framepos_t, bool, framepos_t> ARDOUR_UI::Clock;
|
sigc::signal<void, framepos_t, bool, framepos_t> ARDOUR_UI::Clock;
|
||||||
|
sigc::signal<void> ARDOUR_UI::CloseAllDialogs;
|
||||||
|
|
||||||
ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
|
ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
|
||||||
|
|
||||||
|
|
@ -886,7 +887,7 @@ If you still wish to quit, please use the\n\n\
|
||||||
_session = 0;
|
_session = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ArdourDialog::close_all_dialogs ();
|
close_all_dialogs ();
|
||||||
engine->stop (true);
|
engine->stop (true);
|
||||||
quit ();
|
quit ();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -189,6 +189,9 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
||||||
*/
|
*/
|
||||||
static sigc::signal<void, framepos_t, bool, framepos_t> Clock;
|
static sigc::signal<void, framepos_t, bool, framepos_t> Clock;
|
||||||
|
|
||||||
|
static void close_all_dialogs () { CloseAllDialogs(); }
|
||||||
|
static sigc::signal<void> CloseAllDialogs;
|
||||||
|
|
||||||
XMLNode* editor_settings() const;
|
XMLNode* editor_settings() const;
|
||||||
XMLNode* mixer_settings () const;
|
XMLNode* mixer_settings () const;
|
||||||
XMLNode* keyboard_settings () const;
|
XMLNode* keyboard_settings () const;
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@
|
||||||
#include <gtkmm2ext/doi.h>
|
#include <gtkmm2ext/doi.h>
|
||||||
|
|
||||||
#include "ardour_window.h"
|
#include "ardour_window.h"
|
||||||
|
#include "ardour_ui.h"
|
||||||
#include "keyboard.h"
|
#include "keyboard.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
@ -83,8 +84,12 @@ ArdourWindow::init ()
|
||||||
|
|
||||||
(a) utility & dialog windows are considered to be part of the same level
|
(a) utility & dialog windows are considered to be part of the same level
|
||||||
(b) they will float above normal windows without any particular effort
|
(b) they will float above normal windows without any particular effort
|
||||||
|
(c) present()-ing them will make a utility float over a dialog or
|
||||||
|
vice versa.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
set_type_hint (Gdk::WINDOW_TYPE_HINT_UTILITY);
|
set_type_hint (Gdk::WINDOW_TYPE_HINT_UTILITY);
|
||||||
|
|
||||||
|
ARDOUR_UI::CloseAllDialogs.connect (sigc::mem_fun (*this, &ArdourWindow::hide));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue