From 91a279800120319bf14c29e4c63c9c9de1cca83e Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 30 Mar 2013 10:04:50 -0400 Subject: [PATCH] allow double click on radio buttons in ambiguous file dialog to finish dialog --- gtk2_ardour/ambiguous_file_dialog.cc | 10 ++++++++++ gtk2_ardour/ambiguous_file_dialog.h | 1 + 2 files changed, 11 insertions(+) diff --git a/gtk2_ardour/ambiguous_file_dialog.cc b/gtk2_ardour/ambiguous_file_dialog.cc index 3527ab471a..be4bdc2dc1 100644 --- a/gtk2_ardour/ambiguous_file_dialog.cc +++ b/gtk2_ardour/ambiguous_file_dialog.cc @@ -38,6 +38,7 @@ AmbiguousFileDialog::AmbiguousFileDialog (const string& file, const 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 +49,15 @@ AmbiguousFileDialog::AmbiguousFileDialog (const string& file, const vectortype == GDK_2BUTTON_PRESS) { + response (RESPONSE_OK); + } + return false; +} + int AmbiguousFileDialog::get_which () const { diff --git a/gtk2_ardour/ambiguous_file_dialog.h b/gtk2_ardour/ambiguous_file_dialog.h index 796f490e79..69c2ca6b76 100644 --- a/gtk2_ardour/ambiguous_file_dialog.h +++ b/gtk2_ardour/ambiguous_file_dialog.h @@ -30,6 +30,7 @@ public: private: Gtk::RadioButtonGroup _group; std::vector _radio_buttons; + bool rb_button_press (GdkEventButton*); };