fix last-minute code rearrangement in last commit that broke the intended functionality
[ardour.git] / gtk2_ardour / option_editor.h
index cb5f76f31d4d0be2850c86161ed4c86530c3e254..9ab8132d2c116ea485a5c8bc0892553c0c6ccda2 100644 (file)
@@ -46,7 +46,7 @@
  *  options dialog.
  */
 
-namespace ARDOUR {
+namespace PBD {
        class Configuration;
 }
 
@@ -506,6 +506,7 @@ public:
         *  @param page Page step for the spin button.
         *  @param unit Unit name.
         *  @param scale Scaling factor (such that for a value x in the spinbutton, x * scale is written to the config)
+        *  @param digits Number of decimal digits to show.
         */
        SpinOption (
                std::string const & i,
@@ -517,7 +518,8 @@ public:
                T step,
                T page,
                std::string const & unit = "",
-               float scale = 1
+               float scale = 1,
+               unsigned digits = 0
                )
                : Option (i, n),
                  _get (g),
@@ -530,6 +532,7 @@ public:
                _spin = Gtk::manage (new Gtk::SpinButton);
                _spin->set_range (min, max);
                _spin->set_increments (step, page);
+               _spin->set_digits(digits);
 
                _box = Gtk::manage (new Gtk::HBox);
                _box->pack_start (*_spin, true, true);
@@ -621,7 +624,7 @@ public:
         Gtk::Widget& tip_widget() { return _file_chooser; }
 
 private:
-       void file_set ();
+       void selection_changed ();
        void current_folder_set ();
        
        sigc::slot<std::string> _get; ///< slot to get the configuration variable's value
@@ -647,7 +650,7 @@ public:
 class OptionEditor : public ArdourWindow
 {
 public:
-       OptionEditor (ARDOUR::Configuration *, std::string const &);
+       OptionEditor (PBD::Configuration *, std::string const &);
        ~OptionEditor ();
 
        void add_option (std::string const &, OptionEditorComponent *);
@@ -658,8 +661,8 @@ public:
 protected:
 
        virtual void parameter_changed (std::string const &);
-
-       ARDOUR::Configuration* _config;
+       
+       PBD::Configuration* _config;
 
 private: