X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fambiguous_file_dialog.cc;h=be4bdc2dc1a5505b53982a89d456d559cfde1c9c;hb=4aaae2eb3ba65f97e173b1751e1ee3bec8925ed5;hp=e14d33540e412582851c58251d9af387ac5ca670;hpb=eb5870781a5173b1cbfc2dd4e975be29e5d00a99;p=ardour.git diff --git a/gtk2_ardour/ambiguous_file_dialog.cc b/gtk2_ardour/ambiguous_file_dialog.cc index e14d33540e..be4bdc2dc1 100644 --- a/gtk2_ardour/ambiguous_file_dialog.cc +++ b/gtk2_ardour/ambiguous_file_dialog.cc @@ -18,7 +18,9 @@ */ #include +#include "pbd/compose.h" #include "ambiguous_file_dialog.h" +#include "i18n.h" using namespace std; using namespace ARDOUR; @@ -30,21 +32,32 @@ AmbiguousFileDialog::AmbiguousFileDialog (const string& file, const vectorset_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.")))); - + add_button (_("Done"), RESPONSE_OK); + set_default_response (RESPONSE_OK); show_all (); } +bool +AmbiguousFileDialog::rb_button_press (GdkEventButton* ev) +{ + if (ev->type == GDK_2BUTTON_PRESS) { + response (RESPONSE_OK); + } + return false; +} + int AmbiguousFileDialog::get_which () const {