X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fambiguous_file_dialog.cc;h=900ab4e4e20808685d7c513db754b4d71f0c97bf;hb=9e543beb569f40edb3312c3c213d21b763b30d5a;hp=7d57c676603c2d6156705ced51b2b45f51331c27;hpb=ea93f413f6941aaf104b8201e7e496d63c5ae83f;p=ardour.git diff --git a/gtk2_ardour/ambiguous_file_dialog.cc b/gtk2_ardour/ambiguous_file_dialog.cc index 7d57c67660..900ab4e4e2 100644 --- a/gtk2_ardour/ambiguous_file_dialog.cc +++ b/gtk2_ardour/ambiguous_file_dialog.cc @@ -20,7 +20,7 @@ #include #include "pbd/compose.h" #include "ambiguous_file_dialog.h" -#include "i18n.h" +#include "pbd/i18n.h" using namespace std; using namespace ARDOUR; @@ -29,15 +29,18 @@ using namespace Gtk; AmbiguousFileDialog::AmbiguousFileDialog (const string& file, const vector& paths) : ArdourDialog (_("Ambiguous File"), true, false) { - get_vbox()->set_spacing (6); + /* This dialog is always shown programatically. Center the window.*/ + set_position (Gtk::WIN_POS_CENTER); + get_vbox()->set_spacing (6); Label* l = manage (new Label); - l->set_markup (string_compose (_("Ardour has found the file %1 in the following places:\n\n"), file)); + l->set_markup (string_compose (_("%1 has found the file %2 in the following places:\n\n"), PROGRAM_NAME, file)); get_vbox()->pack_start (*l); for (vector::const_iterator i = paths.begin(); i != paths.end(); ++i) { _radio_buttons.push_back (manage (new RadioButton (_group, *i))); get_vbox()->pack_start (*_radio_buttons.back ()); + _radio_buttons.back()->signal_button_press_event().connect (sigc::mem_fun (*this, &AmbiguousFileDialog::rb_button_press), false); } get_vbox()->pack_start (*manage (new Label (_("\n\nPlease select the path that you want to get the file from.")))); @@ -48,6 +51,15 @@ AmbiguousFileDialog::AmbiguousFileDialog (const string& file, const vectortype == GDK_2BUTTON_PRESS) { + response (RESPONSE_OK); + } + return false; +} + int AmbiguousFileDialog::get_which () const {