From 27ddf9efbae7c7ae53d8952624f364bfe7e82397 Mon Sep 17 00:00:00 2001 From: Nikolay Date: Wed, 4 Feb 2015 18:02:56 +0200 Subject: [PATCH] [Summary] Message dialog rework [Feature Reviewed] Igor Maximenko --- gtk2_ardour/waves_export_dialog.cc | 14 +++----------- gtk2_ardour/waves_message_dialog.cc | 7 +++++++ gtk2_ardour/waves_message_dialog.h | 2 ++ 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/gtk2_ardour/waves_export_dialog.cc b/gtk2_ardour/waves_export_dialog.cc index 9ed3acd9cc..6b65658f46 100644 --- a/gtk2_ardour/waves_export_dialog.cc +++ b/gtk2_ardour/waves_export_dialog.cc @@ -309,17 +309,9 @@ WavesExportDialog::update_warnings_and_example_filename () void WavesExportDialog::show_conflicting_files (WavesButton*) { - ArdourDialog dialog (_("Files that will be overwritten"), true); - - Gtk::Label label ("", Gtk::ALIGN_LEFT); - label.set_use_markup (true); - label.set_markup (list_files_string); - - dialog.get_vbox()->pack_start (label); - dialog.add_button ("OK", 0); - dialog.show_all_children (); - - dialog.run(); + WavesMessageDialog message_dialog ("", ""); + message_dialog.set_markup ("Files that will be overwritten\n" + list_files_string); + message_dialog.run(); } void diff --git a/gtk2_ardour/waves_message_dialog.cc b/gtk2_ardour/waves_message_dialog.cc index 828a5f04db..98b96bd99c 100644 --- a/gtk2_ardour/waves_message_dialog.cc +++ b/gtk2_ardour/waves_message_dialog.cc @@ -99,3 +99,10 @@ WavesMessageDialog::_on_button_clicked (WavesButton* clicked_button) response (Gtk::RESPONSE_NO); } } + +void +WavesMessageDialog::set_markup (std::string markup) +{ + _message_label.set_use_markup (true); + _message_label.set_markup (markup); +} diff --git a/gtk2_ardour/waves_message_dialog.h b/gtk2_ardour/waves_message_dialog.h index 819f5ce52e..64aa1773f8 100644 --- a/gtk2_ardour/waves_message_dialog.h +++ b/gtk2_ardour/waves_message_dialog.h @@ -42,6 +42,8 @@ public: BUTTON_YES = 1 << 6, BUTTON_NO = 1 << 7, }; + + void set_markup (std::string markup); protected: void init (const std::string& title,