From 328fffb9854baed083286c6ff41b8a040298b340 Mon Sep 17 00:00:00 2001 From: nicholasbishop Date: Fri, 27 Jul 2007 21:49:35 +0000 Subject: [PATCH] Filter effects dialog: * For the Order attribute of feConvolveMatrix, show only the spin control, not the slider --- src/ui/dialog/filter-effects-dialog.cpp | 3 ++- src/ui/widget/spin-slider.cpp | 5 +++++ src/ui/widget/spin-slider.h | 3 +++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/ui/dialog/filter-effects-dialog.cpp b/src/ui/dialog/filter-effects-dialog.cpp index 7e460af37..3fc4e0ec6 100644 --- a/src/ui/dialog/filter-effects-dialog.cpp +++ b/src/ui/dialog/filter-effects-dialog.cpp @@ -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); diff --git a/src/ui/widget/spin-slider.cpp b/src/ui/widget/spin-slider.cpp index 311d09963..71c5921a9 100644 --- a/src/ui/widget/spin-slider.cpp +++ b/src/ui/widget/spin-slider.cpp @@ -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), diff --git a/src/ui/widget/spin-slider.h b/src/ui/widget/spin-slider.h index b0a8daba9..1abc7cf3e 100644 --- a/src/ui/widget/spin-slider.h +++ b/src/ui/widget/spin-slider.h @@ -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; -- 2.30.2