Code

Filter effects dialog:
authornicholasbishop <nicholasbishop@users.sourceforge.net>
Fri, 27 Jul 2007 21:49:35 +0000 (21:49 +0000)
committernicholasbishop <nicholasbishop@users.sourceforge.net>
Fri, 27 Jul 2007 21:49:35 +0000 (21:49 +0000)
* For the Order attribute of feConvolveMatrix, show only the spin control, not the slider

src/ui/dialog/filter-effects-dialog.cpp
src/ui/widget/spin-slider.cpp
src/ui/widget/spin-slider.h

index 7e460af378ddd58fa8526d284713a1db5ed3adcf..3fc4e0ec6639b9f13fd8b1c3c78af501bc87a603 100644 (file)
@@ -1153,7 +1153,8 @@ void FilterEffectsDialog::init_settings_widgets()
     ConvolveMatrix* convmat = _settings->add(SP_ATTR_KERNELMATRIX, _("Kernel"));
     order->signal_value_changed().connect(
         sigc::bind(sigc::mem_fun(*convmat, &ConvolveMatrix::update_direct), this));
-    order->set_update_policy(Gtk::UPDATE_DISCONTINUOUS);
+    order->get_spinslider1().remove_scale();
+    order->get_spinslider2().remove_scale();
     _settings->add(SP_ATTR_DIVISOR, _("Divisor"), 0.01, 10, 1, 0.01, 1);
     _settings->add(SP_ATTR_BIAS, _("Bias"), -10, 10, 1, 0.01, 1);
     
index 311d09963947f3de684ad72388cacae2b61efabd..71c5921a944338e9e72d3a70ccfc6ef147372aa8 100644 (file)
@@ -94,6 +94,11 @@ void SpinSlider::set_update_policy(const Gtk::UpdateType u)
     _scale.set_update_policy(u);
 }
 
+void SpinSlider::remove_scale()
+{
+    remove(_scale);
+}
+
 DualSpinSlider::DualSpinSlider(double value, double lower, double upper, double step_inc,
                                double climb_rate, int digits, const SPAttributeEnum a)
     : AttrWidget(a), _s1(value, lower, upper, step_inc, climb_rate, digits),
index b0a8daba981ce902f37af68d60d2f93192feb9a9..1abc7cf3e6d9cd800d4b249465e401282430cb93 100644 (file)
@@ -46,6 +46,9 @@ public:
     Gtk::SpinButton& get_spin_button();
 
     void set_update_policy(const Gtk::UpdateType);
+
+    // Change the SpinSlider into a SpinButton with AttrWidget support)
+    void remove_scale();
 private:
     Gtk::Adjustment _adjustment;
     Gtk::HScale _scale;