mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
add "enabled" column to editor route groups list and check logic
git-svn-id: svn://localhost/ardour2/branches/3.0@10928 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
94658aa66e
commit
c2956012ff
4 changed files with 75 additions and 29 deletions
|
|
@ -18,6 +18,8 @@
|
|||
|
||||
*/
|
||||
|
||||
#include <gtkmm/messagedialog.h>
|
||||
|
||||
#include "export_filename_selector.h"
|
||||
|
||||
#include "ardour/export_handler.h"
|
||||
|
|
@ -93,6 +95,7 @@ ExportFilenameSelector::ExportFilenameSelector () :
|
|||
|
||||
label_entry.signal_changed().connect (sigc::mem_fun (*this, &ExportFilenameSelector::update_label));
|
||||
path_entry.signal_changed().connect (sigc::mem_fun (*this, &ExportFilenameSelector::update_folder));
|
||||
path_entry.signal_activate().connect (sigc::mem_fun (*this, &ExportFilenameSelector::check_folder), false);
|
||||
|
||||
session_checkbox.signal_toggled().connect (sigc::mem_fun (*this, &ExportFilenameSelector::change_session_selection));
|
||||
|
||||
|
|
@ -225,6 +228,23 @@ ExportFilenameSelector::update_folder ()
|
|||
CriticalSelectionChanged();
|
||||
}
|
||||
|
||||
void
|
||||
ExportFilenameSelector::check_folder ()
|
||||
{
|
||||
if (!filename) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Glib::file_test (path_entry.get_text(), Glib::FILE_TEST_IS_DIR|Glib::FILE_TEST_EXISTS)) {
|
||||
Gtk::MessageDialog msg (string_compose (_("%1: this is only the directory/folder name, not the filename.\n\
|
||||
The filename will be chosen from the information just above the folder selector."), path_entry.get_text()));
|
||||
msg.run ();
|
||||
path_entry.set_text (Glib::path_get_dirname (path_entry.get_text()));
|
||||
filename->set_folder (path_entry.get_text());
|
||||
CriticalSelectionChanged();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ExportFilenameSelector::change_date_format ()
|
||||
{
|
||||
|
|
@ -295,13 +315,23 @@ ExportFilenameSelector::open_browse_dialog ()
|
|||
dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
|
||||
dialog.add_button(Gtk::Stock::OK, Gtk::RESPONSE_OK);
|
||||
|
||||
int result = dialog.run();
|
||||
while (true) {
|
||||
int result = dialog.run();
|
||||
|
||||
if (result == Gtk::RESPONSE_OK) {
|
||||
std::string filename = dialog.get_filename();
|
||||
|
||||
if (!Glib::file_test (filename, Glib::FILE_TEST_IS_DIR|Glib::FILE_TEST_EXISTS)) {
|
||||
Gtk::MessageDialog msg (string_compose (_("%1: this is only the directory/folder name, not the filename.\n\
|
||||
The filename will be chosen from the information just above the folder selector."), filename));
|
||||
msg.run ();
|
||||
continue;
|
||||
}
|
||||
|
||||
if (result == Gtk::RESPONSE_OK) {
|
||||
std::string filename = dialog.get_filename();
|
||||
|
||||
if (filename.length()) {
|
||||
path_entry.set_text (filename);
|
||||
if (filename.length()) {
|
||||
path_entry.set_text (filename);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue