summaryrefslogtreecommitdiff
path: root/gtk2_ardour/main.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2019-12-14 23:31:24 +0100
committerRobin Gareus <robin@gareus.org>2019-12-14 23:44:01 +0100
commit2b55d6dce3ded525731a6825bed658bca344bd28 (patch)
tree560e377bef5328f8b3e4cd73a172c5c7451913d1 /gtk2_ardour/main.cc
parent901bf1ab80d7b7a74f7e703c205a34c6528f4c28 (diff)
First batch of MessageDialog replacements
Diffstat (limited to 'gtk2_ardour/main.cc')
-rw-r--r--gtk2_ardour/main.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/gtk2_ardour/main.cc b/gtk2_ardour/main.cc
index ff45beff42..2fd21e472b 100644
--- a/gtk2_ardour/main.cc
+++ b/gtk2_ardour/main.cc
@@ -59,6 +59,7 @@
#include <gtkmm2ext/application.h>
#include <gtkmm2ext/utils.h>
+#include "ardour_message.h"
#include "ardour_ui.h"
#include "ui_config.h"
#include "opts.h"
@@ -96,10 +97,10 @@ static string localedir (LOCALEDIR);
void
gui_jack_error ()
{
- MessageDialog win (string_compose (_("%1 could not connect to the audio backend."), PROGRAM_NAME),
- false,
- Gtk::MESSAGE_INFO,
- Gtk::BUTTONS_NONE);
+ ArdourMessageDialog win (string_compose (_("%1 could not connect to the audio backend."), PROGRAM_NAME),
+ false,
+ Gtk::MESSAGE_INFO,
+ Gtk::BUTTONS_NONE);
win.add_button (Stock::QUIT, RESPONSE_CLOSE);
win.set_default_response (RESPONSE_CLOSE);
@@ -143,7 +144,7 @@ tell_about_backend_death (void* /* ignored */)
{
if (AudioEngine::instance()->processed_samples() == 0) {
/* died during startup */
- MessageDialog msg (string_compose (_("The audio backend (%1) has failed, or terminated"), AudioEngine::instance()->current_backend_name()), false);
+ ArdourMessageDialog msg (string_compose (_("The audio backend (%1) has failed, or terminated"), AudioEngine::instance()->current_backend_name()), false);
msg.set_position (Gtk::WIN_POS_CENTER);
msg.set_secondary_text (string_compose (_(
"%2 exited unexpectedly, and without notifying %1.\n\
@@ -162,7 +163,7 @@ Click OK to exit %1."), PROGRAM_NAME, AudioEngine::instance()->current_backend_n
MessageDialog msg (string_compose (_("The audio backend (%1) has failed, or terminated"), AudioEngine::instance()->current_backend_name()), false);
msg.set_secondary_text (string_compose (_("%2 exited unexpectedly, and without notifying %1."),
PROGRAM_NAME, AudioEngine::instance()->current_backend_name()));
- msg.present ();
+ msg.run ();
}
return false; /* do not call again */
}
@@ -255,7 +256,7 @@ static void command_line_parse_error (int *argc, char** argv[]) {
// an MSVC app, let the user know we encountered a parsing error.
Gtk::Main app(argc, argv); // Calls 'gtk_init()'
- Gtk::MessageDialog dlgReportParseError (string_compose (_("\n %1 could not understand your command line "), PROGRAM_NAME),
+ ArdourMessageDialog dlgReportParseError (string_compose (_("\n %1 could not understand your command line "), PROGRAM_NAME),
false, MESSAGE_ERROR, BUTTONS_CLOSE, true);
dlgReportParseError.set_title (string_compose (_("An error was encountered while launching %1"), PROGRAM_NAME));
dlgReportParseError.run ();