summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Mayberry <mojofunk@gmail.com>2015-09-03 23:10:42 +1000
committerTim Mayberry <mojofunk@gmail.com>2015-09-04 09:45:09 +1000
commitb3b5646a30e65db98a08b4bfe821d7aae3f2eec3 (patch)
tree9da5a56276f8f893ca300734ed963b8315aa23d5
parent303b27a69b5befdbedf7fb6f3e57b9701de8664f (diff)
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.
-rw-r--r--gtk2_ardour/sfdb_ui.cc21
-rw-r--r--gtk2_ardour/sfdb_ui.h3
2 files changed, 6 insertions, 18 deletions
diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc
index 2874f93583..3f1d93fb4c 100644
--- a/gtk2_ardour/sfdb_ui.cc
+++ b/gtk2_ardour/sfdb_ui.cc
@@ -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 ();
- }
}
diff --git a/gtk2_ardour/sfdb_ui.h b/gtk2_ardour/sfdb_ui.h
index c8aaa03d0e..07de8b74d8 100644
--- a/gtk2_ardour/sfdb_ui.h
+++ b/gtk2_ardour/sfdb_ui.h
@@ -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;