2 * Copyright (C) 2010-2012 Paul Davis <paul@linuxaudiosystems.com>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 #ifndef __gtk_ardour_search_path_option_h__
20 #define __gtk_ardour_search_path_option_h__
24 #include <gtkmm/filechooserbutton.h>
25 #include <gtkmm/entry.h>
26 #include <gtkmm/button.h>
27 #include <gtkmm/box.h>
29 #include "option_editor.h"
31 class SearchPathOption : public Option
34 SearchPathOption (const std::string& pathname, const std::string& label,
35 const std::string& default_path,
36 sigc::slot<std::string>, sigc::slot<bool, std::string>);
39 void set_state_from_config ();
40 void add_to_page (OptionEditorPage*);
43 Gtk::Widget& tip_widget() { return add_chooser; }
46 sigc::slot<std::string> _get; ///< slot to get the configuration variable's value
47 sigc::slot<bool, std::string> _set; ///< slot to set the configuration variable's value
51 PathEntry (const std::string& path, bool removable=true);
54 Gtk::Button remove_button;
60 std::list<PathEntry*> paths;
61 Gtk::FileChooserButton add_chooser;
64 Gtk::Label session_label;
66 void add_path (const std::string& path, bool removable=true);
67 void remove_path (PathEntry*);
72 #endif /* __gtk_ardour_search_path_option_h__ */