diff --git a/gtk2_ardour/add_video_dialog.cc b/gtk2_ardour/add_video_dialog.cc index 5c0db1ff26..6a94544422 100644 --- a/gtk2_ardour/add_video_dialog.cc +++ b/gtk2_ardour/add_video_dialog.cc @@ -114,6 +114,7 @@ AddVideoDialog::AddVideoDialog (Session* s) /* file chooser */ chooser.set_border_width (4); + Gtkmm2ext::add_volume_shortcuts (chooser); #ifdef __APPLE__ /* some broken redraw behaviour - this is a bandaid */ chooser.signal_selection_changed().connect (mem_fun (chooser, &Widget::queue_draw)); diff --git a/gtk2_ardour/export_filename_selector.cc b/gtk2_ardour/export_filename_selector.cc index 576c539631..c10f6de279 100644 --- a/gtk2_ardour/export_filename_selector.cc +++ b/gtk2_ardour/export_filename_selector.cc @@ -23,6 +23,9 @@ #include #include "pbd/openuri.h" + +#include "gtkmm2ext/utils.h" + #include "export_filename_selector.h" #include "pbd/i18n.h" @@ -413,6 +416,7 @@ void ExportFilenameSelector::open_browse_dialog () { Gtk::FileChooserDialog dialog(_("Choose export folder"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER); + Gtkmm2ext::add_volume_shortcuts (dialog); //dialog.set_transient_for(*this); dialog.set_filename (path_entry.get_text()); diff --git a/gtk2_ardour/export_video_dialog.cc b/gtk2_ardour/export_video_dialog.cc index d5182bcc5f..b97e5bc717 100644 --- a/gtk2_ardour/export_video_dialog.cc +++ b/gtk2_ardour/export_video_dialog.cc @@ -1257,6 +1257,7 @@ void ExportVideoDialog::open_outfn_dialog () { Gtk::FileChooserDialog dialog(_("Save Exported Video File"), Gtk::FILE_CHOOSER_ACTION_SAVE); + Gtkmm2ext::add_volume_shortcuts (dialog); dialog.set_filename (outfn_path_entry.get_text()); dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); @@ -1277,6 +1278,7 @@ void ExportVideoDialog::open_invid_dialog () { Gtk::FileChooserDialog dialog(_("Save Exported Video File"), Gtk::FILE_CHOOSER_ACTION_SAVE); + Gtkmm2ext::add_volume_shortcuts (dialog); dialog.set_filename (invid_path_entry.get_text()); dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); diff --git a/gtk2_ardour/generic_pluginui.cc b/gtk2_ardour/generic_pluginui.cc index 6926a29b78..34d38d3088 100644 --- a/gtk2_ardour/generic_pluginui.cc +++ b/gtk2_ardour/generic_pluginui.cc @@ -961,6 +961,7 @@ GenericPluginUI::build_control_ui (const Evoral::Parameter& param, // Create/add controller control_ui->file_button = manage(new Gtk::FileChooserButton(Gtk::FILE_CHOOSER_ACTION_OPEN)); control_ui->file_button->set_title(desc.label); + Gtkmm2ext::add_volume_shortcuts (*control_ui->file_button); if (use_knob) { control_ui->knobtable = manage (new Table()); diff --git a/gtk2_ardour/luadialog.cc b/gtk2_ardour/luadialog.cc index 5932b234df..5f49b17caf 100644 --- a/gtk2_ardour/luadialog.cc +++ b/gtk2_ardour/luadialog.cc @@ -520,6 +520,7 @@ public: : LuaDialogWidget (key, title) , _fc (a) { + Gtkmm2ext::add_volume_shortcuts (_fc); if (!path.empty ()) { switch (a) { case Gtk::FILE_CHOOSER_ACTION_OPEN: diff --git a/gtk2_ardour/midi_export_dialog.cc b/gtk2_ardour/midi_export_dialog.cc index 9fd02397d7..5804bec33b 100644 --- a/gtk2_ardour/midi_export_dialog.cc +++ b/gtk2_ardour/midi_export_dialog.cc @@ -25,6 +25,8 @@ #include "ardour/midi_region.h" #include "ardour/session.h" +#include "gtkmm2ext/utils.h" + #include "midi_export_dialog.h" #include "pbd/i18n.h" @@ -45,6 +47,7 @@ MidiExportDialog::MidiExportDialog (PublicEditor&, boost::shared_ptr set_default_response (Gtk::RESPONSE_ACCEPT); + Gtkmm2ext::add_volume_shortcuts (file_chooser); file_chooser.set_current_name (region->name() + ".mid"); file_chooser.show (); diff --git a/gtk2_ardour/missing_file_dialog.cc b/gtk2_ardour/missing_file_dialog.cc index 89ef01c372..eb08e573b1 100644 --- a/gtk2_ardour/missing_file_dialog.cc +++ b/gtk2_ardour/missing_file_dialog.cc @@ -118,6 +118,7 @@ MissingFileDialog::MissingFileDialog (Session* s, const std::string& path, DataT msg.show (); + Gtkmm2ext::add_volume_shortcuts (chooser); chooser.set_current_folder (Glib::get_home_dir()); chooser.set_create_folders (false); } diff --git a/gtk2_ardour/option_editor.cc b/gtk2_ardour/option_editor.cc index c930254cbe..a61cd46064 100644 --- a/gtk2_ardour/option_editor.cc +++ b/gtk2_ardour/option_editor.cc @@ -895,6 +895,7 @@ DirectoryOption::DirectoryOption (string const & i, string const & n, sigc::slot , _get (g) , _set (s) { + Gtkmm2ext::add_volume_shortcuts (_file_chooser); _file_chooser.set_action (Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER); _file_chooser.signal_selection_changed().connect (sigc::mem_fun (*this, &DirectoryOption::selection_changed)); } diff --git a/gtk2_ardour/pt_import_selector.cc b/gtk2_ardour/pt_import_selector.cc index 9980321a8e..3446383f2f 100644 --- a/gtk2_ardour/pt_import_selector.cc +++ b/gtk2_ardour/pt_import_selector.cc @@ -22,6 +22,7 @@ #include #include #include + #include "pbd/gstdio_compat.h" #include "pbd/i18n.h" #include "pbd/file_utils.h" @@ -29,6 +30,9 @@ #include "ptformat/ptfformat.h" #include "ardour/session_handle.h" + +#include "gtkmm2ext/utils.h" + #include "pt_import_selector.h" using namespace Gtk; @@ -66,6 +70,7 @@ PTImportSelector::PTImportSelector (PTFFormat& ptf) : match_pt_filter.add_pattern ("*.ptx"); match_pt_filter.set_name (_("All PT sessions")); + Gtkmm2ext::add_volume_shortcuts (ptimport_ptf_chooser); ptimport_ptf_chooser.add_filter (match_pt_filter); ptimport_ptf_chooser.set_select_multiple (false); //XXX ptimport_ptf_chooser.set_current_folder (dstdir); diff --git a/gtk2_ardour/save_as_dialog.cc b/gtk2_ardour/save_as_dialog.cc index eaee07764c..e0d3fca80e 100644 --- a/gtk2_ardour/save_as_dialog.cc +++ b/gtk2_ardour/save_as_dialog.cc @@ -21,6 +21,8 @@ #include "ardour/session.h" +#include "gtkmm2ext/utils.h" + #include "save_as_dialog.h" #include "pbd/i18n.h" @@ -84,8 +86,10 @@ SaveAsDialog::SaveAsDialog () no_include_media_button.signal_toggled ().connect (sigc::mem_fun (*this, &SaveAsDialog::no_include_toggled)); + Gtkmm2ext::add_volume_shortcuts (new_parent_folder_selector); new_parent_folder_selector.set_action (FILE_CHOOSER_ACTION_SELECT_FOLDER); new_parent_folder_selector.set_current_folder (Config->get_default_session_parent_dir ()); + new_name_entry.signal_changed().connect (sigc::mem_fun (*this, &SaveAsDialog::name_entry_changed)); new_parent_folder_selector.signal_current_folder_changed().connect (sigc::mem_fun (*this, &SaveAsDialog::name_entry_changed)); new_parent_folder_selector.signal_selection_changed().connect (sigc::mem_fun (*this, &SaveAsDialog::name_entry_changed)); diff --git a/gtk2_ardour/search_path_option.cc b/gtk2_ardour/search_path_option.cc index f28148ec78..4d28f01c4d 100644 --- a/gtk2_ardour/search_path_option.cc +++ b/gtk2_ardour/search_path_option.cc @@ -22,6 +22,8 @@ #include "pbd/compose.h" #include "pbd/shortpath.h" +#include "gtkmm2ext/utils.h" + #include "search_path_option.h" #include "pbd/i18n.h" @@ -36,6 +38,7 @@ SearchPathOption::SearchPathOption (const string& pathname, const string& label, , _set (set) , add_chooser (_("Select folder to search for media"), FILE_CHOOSER_ACTION_SELECT_FOLDER) { + Gtkmm2ext::add_volume_shortcuts (add_chooser); add_chooser.signal_file_set().connect (sigc::mem_fun (*this, &SearchPathOption::path_chosen)); HBox* hbox = manage (new HBox); diff --git a/gtk2_ardour/session_archive_dialog.cc b/gtk2_ardour/session_archive_dialog.cc index 5e921b7d1a..d35d0ec923 100644 --- a/gtk2_ardour/session_archive_dialog.cc +++ b/gtk2_ardour/session_archive_dialog.cc @@ -23,6 +23,8 @@ #include "ardour/filename_extensions.h" +#include "gtkmm2ext/utils.h" + #include "session_archive_dialog.h" #include "pbd/i18n.h" @@ -106,6 +108,7 @@ SessionArchiveDialog::SessionArchiveDialog () add_button (Stock::CANCEL, RESPONSE_CANCEL); add_button (Stock::OK, RESPONSE_OK); + Gtkmm2ext::add_volume_shortcuts (target_folder_selector); target_folder_selector.set_action (FILE_CHOOSER_ACTION_SELECT_FOLDER); target_folder_selector.set_current_folder (Config->get_default_session_parent_dir ()); // TODO get/set default_archive_dir name_entry.signal_changed().connect (sigc::mem_fun (*this, &SessionArchiveDialog::name_entry_changed)); diff --git a/gtk2_ardour/session_metadata_dialog.cc b/gtk2_ardour/session_metadata_dialog.cc index ce8d76c57e..77e299ba69 100644 --- a/gtk2_ardour/session_metadata_dialog.cc +++ b/gtk2_ardour/session_metadata_dialog.cc @@ -908,6 +908,7 @@ SessionMetadataImporter::run () /* Open session file selector */ Gtk::FileChooserDialog session_selector(_("Choose session to import metadata from"), Gtk::FILE_CHOOSER_ACTION_OPEN); + Gtkmm2ext::add_volume_shortcuts (session_selector); session_selector.add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); session_selector.add_button (Gtk::Stock::OPEN, Gtk::RESPONSE_ACCEPT); session_selector.set_default_response(Gtk::RESPONSE_ACCEPT); diff --git a/gtk2_ardour/startup.cc b/gtk2_ardour/startup.cc index b481e434d1..e23016f826 100644 --- a/gtk2_ardour/startup.cc +++ b/gtk2_ardour/startup.cc @@ -48,6 +48,8 @@ #include "ardour/template_utils.h" #include "ardour/profile.h" +#include "gtkmm2ext/utils.h" + #include "startup.h" #include "opts.h" #include "engine_dialog.h" @@ -202,6 +204,7 @@ Where would you like new %1 sessions to be stored by default?\n\n\ vbox->pack_start (*hbox, false, true); cerr << "set default folder to " << poor_mans_glob (Config->get_default_session_parent_dir()) << endl; + Gtkmm2ext::add_volume_shortcuts (*default_dir_chooser); default_dir_chooser->set_current_folder (poor_mans_glob (Config->get_default_session_parent_dir())); default_dir_chooser->signal_current_folder_changed().connect (sigc::mem_fun (*this, &ArdourStartup::default_dir_changed)); default_dir_chooser->show (); diff --git a/gtk2_ardour/template_dialog.cc b/gtk2_ardour/template_dialog.cc index e250791b62..82e376a5bf 100644 --- a/gtk2_ardour/template_dialog.cc +++ b/gtk2_ardour/template_dialog.cc @@ -44,6 +44,7 @@ #include "pbd/xml++.h" #include "gtkmm2ext/gui_thread.h" +#include "gtkmm2ext/utils.h" #include "ardour/filename_extensions.h" #include "ardour/filesystem_paths.h" @@ -490,6 +491,7 @@ TemplateManager::export_all_templates () g_clear_error (&err); FileChooserDialog dialog(_("Save Exported Template Archive"), FILE_CHOOSER_ACTION_SAVE); + Gtkmm2ext::add_volume_shortcuts (dialog); dialog.set_filename (X_("templates")); dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); diff --git a/gtk2_ardour/transcode_video_dialog.cc b/gtk2_ardour/transcode_video_dialog.cc index 2087b19cdd..79abef079f 100644 --- a/gtk2_ardour/transcode_video_dialog.cc +++ b/gtk2_ardour/transcode_video_dialog.cc @@ -544,6 +544,7 @@ TranscodeVideoDialog::open_browse_dialog () { Gtk::FileChooserDialog dialog(_("Save Transcoded Video File"), Gtk::FILE_CHOOSER_ACTION_SAVE); dialog.set_filename (path_entry.get_text()); + Gtkmm2ext::add_volume_shortcuts (dialog); dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); dialog.add_button(Gtk::Stock::OK, Gtk::RESPONSE_OK);