2 * Copyright (C) 2019 Robin Gareus <robin@gareus.org>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 #include "ardour_message.h"
24 ArdourMessageDialog::ArdourMessageDialog (const Glib::ustring& message,
26 Gtk::MessageType type,
27 Gtk::ButtonsType buttons,
29 : Gtk::MessageDialog (message, use_markup, type, buttons, modal)
30 , _splash_pushed (false)
32 set_position (WIN_POS_MOUSE);
35 ArdourMessageDialog::ArdourMessageDialog (Gtk::Window& parent,
36 const Glib::ustring& message,
38 Gtk::MessageType type,
39 Gtk::ButtonsType buttons,
41 : Gtk::MessageDialog (parent, message, use_markup, type, buttons, modal)
42 , _splash_pushed (false)
44 set_transient_for (parent);
45 set_position (WIN_POS_MOUSE);
48 ArdourMessageDialog::~ArdourMessageDialog ()
54 ArdourMessageDialog::run ()
57 int rv = Gtk::MessageDialog::run ();
63 ArdourMessageDialog::show ()
66 Gtk::MessageDialog::show ();
70 ArdourMessageDialog::hide ()
72 Gtk::MessageDialog::hide ();
77 ArdourMessageDialog::pop_splash ()
80 Splash* spl = Splash::instance();
84 _splash_pushed = false;
89 ArdourMessageDialog::push_splash ()
91 if (Splash::exists()) {
92 Splash* spl = Splash::instance();
93 if (spl->is_visible()) {
94 spl->pop_back_for (*this);
95 _splash_pushed = true;