mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 15:54:57 +01:00
Fix DirectoryOption set filename
This properly updates the display if the preference changes. Even with FILE_CHOOSER_ACTION_SELECT_FOLDER the API is is get/set_filename -- set_current_folder() sets the parent folder.
This commit is contained in:
parent
c17fbd5abc
commit
34c8307a38
2 changed files with 5 additions and 2 deletions
|
|
@ -916,13 +916,15 @@ DirectoryOption::DirectoryOption (string const & i, string const & n, sigc::slot
|
||||||
{
|
{
|
||||||
Gtkmm2ext::add_volume_shortcuts (_file_chooser);
|
Gtkmm2ext::add_volume_shortcuts (_file_chooser);
|
||||||
_file_chooser.set_action (Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER);
|
_file_chooser.set_action (Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER);
|
||||||
_file_chooser.signal_selection_changed().connect (sigc::mem_fun (*this, &DirectoryOption::selection_changed));
|
_changed_connection = _file_chooser.signal_selection_changed().connect (sigc::mem_fun (*this, &DirectoryOption::selection_changed));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
DirectoryOption::set_state_from_config ()
|
DirectoryOption::set_state_from_config ()
|
||||||
{
|
{
|
||||||
_file_chooser.set_current_folder (poor_mans_glob(_get ()));
|
_changed_connection.block ();
|
||||||
|
_file_chooser.set_filename (poor_mans_glob(_get ()));
|
||||||
|
_changed_connection.unblock ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -656,6 +656,7 @@ private:
|
||||||
sigc::slot<std::string> _get; ///< slot to get the configuration variable's value
|
sigc::slot<std::string> _get; ///< slot to get the configuration variable's value
|
||||||
sigc::slot<bool, std::string> _set; ///< slot to set the configuration variable's value
|
sigc::slot<bool, std::string> _set; ///< slot to set the configuration variable's value
|
||||||
Gtk::FileChooserButton _file_chooser;
|
Gtk::FileChooserButton _file_chooser;
|
||||||
|
sigc::connection _changed_connection;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Class to represent a single page in an OptionEditor's notebook.
|
/** Class to represent a single page in an OptionEditor's notebook.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue