X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fmissing_file_dialog.cc;h=47e694841286f66f4702691d769d38d66e8ade16;hb=b2aaffadc51ad38939e52d5f792e3e9a098ff2d7;hp=37868d55728569b4bdf159633e9fb7527f031e9f;hpb=1745340c67d66d8dd92e5b3a377e935ed5eea973;p=ardour.git diff --git a/gtk2_ardour/missing_file_dialog.cc b/gtk2_ardour/missing_file_dialog.cc index 37868d5572..47e6948412 100644 --- a/gtk2_ardour/missing_file_dialog.cc +++ b/gtk2_ardour/missing_file_dialog.cc @@ -22,9 +22,10 @@ #include "pbd/search_path.h" #include "ardour/session.h" +#include "gtkmm2ext/utils.h" #include "missing_file_dialog.h" -#include "i18n.h" +#include "pbd/i18n.h" using namespace Gtk; using namespace std; @@ -32,7 +33,7 @@ using namespace ARDOUR; using namespace PBD; MissingFileDialog::MissingFileDialog (Session* s, const std::string& path, DataType type) - : ArdourDialog (_("Missing File!"), true, false) + : ArdourDialog (_("Missing File"), true, false) , filetype (type) , chooser (_("Select a folder to search"), FILE_CHOOSER_ACTION_SELECT_FOLDER) , use_chosen (_("Add chosen folder to search path, and try again")) @@ -41,7 +42,10 @@ MissingFileDialog::MissingFileDialog (Session* s, const std::string& path, DataT , all_missing_ok (choice_group, _("Skip all missing files"), false) , this_missing_ok (choice_group, _("Skip this file"), false) { - set_session (s); + /* This dialog is always shown programatically. Center the window.*/ + set_position (Gtk::WIN_POS_CENTER); + + set_session (s); add_button (_("Done"), RESPONSE_OK); set_default_response (RESPONSE_OK); @@ -66,9 +70,9 @@ MissingFileDialog::MissingFileDialog (Session* s, const std::string& path, DataT oss << *i << endl; } - msg.set_justify (JUSTIFY_CENTER); + msg.set_justify (JUSTIFY_LEFT); msg.set_markup (string_compose (_("%1 cannot find the %2 file\n\n%3\n\nin any of these folders:\n\n\ -%4\n\n"), PROGRAM_NAME, typestr, Glib::Markup::escape_text(path), Glib::Markup::escape_text (oss.str()))); +%4\n\n"), PROGRAM_NAME, typestr, Gtkmm2ext::markup_escape_text (path), Gtkmm2ext::markup_escape_text (oss.str()))); HBox* hbox = manage (new HBox); hbox->pack_start (msg, false, true); @@ -133,7 +137,7 @@ MissingFileDialog::add_chosen () break; } - split (str, dirs, ':'); + split (str, dirs, G_SEARCHPATH_SEPARATOR); newdir = chooser.get_filename (); @@ -144,7 +148,7 @@ MissingFileDialog::add_chosen () } if (!str.empty()) { - str += ':'; + str += G_SEARCHPATH_SEPARATOR; } str += newdir;