13
0

Remove Apply button in Import dialog/Window and change OK to "Import"

Don't close the window when clicking on Import. Changing "OK" to "Import" makes
it clear what action is being taken by the button. I quite frequently imported
several files from different directories using "Apply" and then would click on
OK to finish using the dialog only to have the last import occur again
unintentionally.

Another option would of been to change "Apply" to "Import" and "OK" to "Import
and Close" and not have a Close button.
This commit is contained in:
Tim Mayberry 2015-09-03 23:10:42 +10:00
parent 303b27a69b
commit b3b5646a30
2 changed files with 6 additions and 18 deletions

View File

@ -554,9 +554,8 @@ SoundFileBrowser::SoundFileBrowser (string title, ARDOUR::Session* s, bool persi
, matches (0)
, _status (0)
, _done (false)
, ok_button (Stock::OK)
, import_button (_("Import"))
, close_button (Stock::CLOSE)
, apply_button (Stock::APPLY)
, gm (0)
{
@ -726,16 +725,11 @@ SoundFileBrowser::SoundFileBrowser (string title, ARDOUR::Session* s, bool persi
button_box->set_layout (BUTTONBOX_END);
button_box->pack_start (close_button, false, false);
close_button.signal_clicked().connect (sigc::bind (sigc::mem_fun (*this, &SoundFileBrowser::do_something), RESPONSE_CLOSE));
if (persistent) {
button_box->pack_start (apply_button, false, false);
apply_button.signal_clicked().connect (sigc::bind (sigc::mem_fun (*this, &SoundFileBrowser::do_something), RESPONSE_APPLY));
}
button_box->pack_start (ok_button, false, false);
ok_button.signal_clicked().connect (sigc::bind (sigc::mem_fun (*this, &SoundFileBrowser::do_something), RESPONSE_OK));
button_box->pack_start (import_button, false, false);
import_button.signal_clicked().connect (sigc::bind (sigc::mem_fun (*this, &SoundFileBrowser::do_something), RESPONSE_OK));
Gtkmm2ext::UI::instance()->set_tip (ok_button, _("Press to import selected files and close this window"));
Gtkmm2ext::UI::instance()->set_tip (apply_button, _("Press to import selected files and leave this window open"));
Gtkmm2ext::UI::instance()->set_tip (import_button, _("Press to import selected files"));
Gtkmm2ext::UI::instance()->set_tip (close_button, _("Press to close this window without importing any files"));
vpacker.pack_end (*button_box, false, false);
@ -767,8 +761,7 @@ SoundFileBrowser::run ()
void
SoundFileBrowser::set_action_sensitive (bool yn)
{
ok_button.set_sensitive (yn);
apply_button.set_sensitive (yn);
import_button.set_sensitive (yn);
}
void
@ -1991,9 +1984,5 @@ SoundFileOmega::do_something (int action)
} else {
PublicEditor::instance().do_embed (paths, chns, mode, where, instrument);
}
if (action == RESPONSE_OK) {
hide ();
}
}

View File

@ -213,9 +213,8 @@ class SoundFileBrowser : public ArdourWindow
Gtk::HBox hpacker;
Gtk::VBox vpacker;
Gtk::Button ok_button;
Gtk::Button import_button;
Gtk::Button close_button;
Gtk::Button apply_button;
static std::string persistent_folder;