mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 23:35:03 +01:00
Wrestle a little more with the comedy FileChooserButton API
(should fix #4488). git-svn-id: svn://localhost/ardour2/branches/3.0@10702 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
965f77aaeb
commit
d7b263f8c2
2 changed files with 9 additions and 1 deletions
|
|
@ -326,13 +326,14 @@ DirectoryOption::DirectoryOption (string const & i, string const & n, sigc::slot
|
||||||
{
|
{
|
||||||
_file_chooser.set_action (Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER);
|
_file_chooser.set_action (Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER);
|
||||||
_file_chooser.signal_file_set().connect (sigc::mem_fun (*this, &DirectoryOption::file_set));
|
_file_chooser.signal_file_set().connect (sigc::mem_fun (*this, &DirectoryOption::file_set));
|
||||||
|
_file_chooser.signal_current_folder_changed().connect (sigc::mem_fun (*this, &DirectoryOption::current_folder_set));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
DirectoryOption::set_state_from_config ()
|
DirectoryOption::set_state_from_config ()
|
||||||
{
|
{
|
||||||
_file_chooser.set_filename (_get ());
|
_file_chooser.set_current_folder (_get ());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -346,3 +347,9 @@ DirectoryOption::file_set ()
|
||||||
{
|
{
|
||||||
_set (_file_chooser.get_filename ());
|
_set (_file_chooser.get_filename ());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
DirectoryOption::current_folder_set ()
|
||||||
|
{
|
||||||
|
_set (_file_chooser.get_current_folder ());
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -387,6 +387,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void file_set ();
|
void file_set ();
|
||||||
|
void current_folder_set ();
|
||||||
|
|
||||||
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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue