Wrestle a little more with the comedy FileChooserButton API
authorCarl Hetherington <carl@carlh.net>
Sat, 19 Nov 2011 12:01:52 +0000 (12:01 +0000)
committerCarl Hetherington <carl@carlh.net>
Sat, 19 Nov 2011 12:01:52 +0000 (12:01 +0000)
(should fix #4488).

git-svn-id: svn://localhost/ardour2/branches/3.0@10702 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/option_editor.cc
gtk2_ardour/option_editor.h

index acb8551960495c3ff995c03f8311b884ef38557b..dcae19ef77b6c1fcbfcf1693119182159908e98f 100644 (file)
@@ -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.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
 DirectoryOption::set_state_from_config ()
 {
-       _file_chooser.set_filename (_get ());
+       _file_chooser.set_current_folder (_get ());
 }
 
 void
@@ -346,3 +347,9 @@ DirectoryOption::file_set ()
 {
        _set (_file_chooser.get_filename ());
 }
+
+void
+DirectoryOption::current_folder_set ()
+{
+       _set (_file_chooser.get_current_folder ());
+}
index 6cacb3c5aa4b502b4d2c4762e6e1ccfc344fc3ab..df1f531a774b153fb3788c8d28f4ec2e91cfef41 100644 (file)
@@ -387,6 +387,7 @@ public:
 
 private:
        void file_set ();
+       void current_folder_set ();
        
        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