From 73430a3c76a2121f81b7124a763c85e0b6b838f3 Mon Sep 17 00:00:00 2001 From: buliabyak Date: Mon, 9 Mar 2009 00:38:46 +0000 Subject: [PATCH] switch opacity and blur sliders to delayed update, which makes them much more resposive and easier to handle; also, remove the old workaround for gtk crash which is no more, allowing interruptibility and thus also improving responsiveness --- src/ui/widget/filter-effect-chooser.cpp | 1 + src/ui/widget/object-composite-settings.cpp | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ui/widget/filter-effect-chooser.cpp b/src/ui/widget/filter-effect-chooser.cpp index 78ddbaa87..9aaa64220 100644 --- a/src/ui/widget/filter-effect-chooser.cpp +++ b/src/ui/widget/filter-effect-chooser.cpp @@ -48,6 +48,7 @@ SimpleFilterModifier::SimpleFilterModifier(int flags) _lb_blur.set_use_underline(); _lb_blur.set_mnemonic_widget(_blur.get_scale()); _blend.signal_changed().connect(signal_blend_blur_changed()); + _blur.set_update_policy(Gtk::UPDATE_DELAYED); _blur.signal_value_changed().connect(signal_blend_blur_changed()); } diff --git a/src/ui/widget/object-composite-settings.cpp b/src/ui/widget/object-composite-settings.cpp index 3e6683c64..bfc291bc0 100644 --- a/src/ui/widget/object-composite-settings.cpp +++ b/src/ui/widget/object-composite-settings.cpp @@ -83,6 +83,7 @@ ObjectCompositeSettings::ObjectCompositeSettings(unsigned int verb_code, char co _opacity_hbox.pack_start(_opacity_hscale, true, true, 4); _opacity_hbox.pack_start(_opacity_spin_button, false, false, 0); _opacity_hscale.set_draw_value(false); + _opacity_hscale.set_update_policy(Gtk::UPDATE_DELAYED); _opacity_adjustment.signal_value_changed().connect(sigc::mem_fun(*this, &ObjectCompositeSettings::_opacityValueChanged)); show_all_children(); @@ -123,7 +124,7 @@ ObjectCompositeSettings::_blendBlurValueChanged() _blocked = true; // FIXME: fix for GTK breakage, see comment in SelectedStyle::on_opacity_changed; here it results in crash 1580903 - sp_canvas_force_full_redraw_after_interruptions(sp_desktop_canvas(desktop), 0); + //sp_canvas_force_full_redraw_after_interruptions(sp_desktop_canvas(desktop), 0); Geom::OptRect bbox = _subject->getBounds(SPItem::GEOMETRIC_BBOX); double radius; @@ -171,7 +172,7 @@ ObjectCompositeSettings::_blendBlurValueChanged() _("Change blur")); // resume interruptibility - sp_canvas_end_forced_full_redraws(sp_desktop_canvas(desktop)); + //sp_canvas_end_forced_full_redraws(sp_desktop_canvas(desktop)); _blocked = false; } @@ -195,7 +196,7 @@ ObjectCompositeSettings::_opacityValueChanged() // FIXME: fix for GTK breakage, see comment in SelectedStyle::on_opacity_changed; here it results in crash 1580903 // UPDATE: crash fixed in GTK+ 2.10.7 (bug 374378), remove this as soon as it's reasonably common // (though this only fixes the crash, not the multiple change events) - sp_canvas_force_full_redraw_after_interruptions(sp_desktop_canvas(desktop), 0); + //sp_canvas_force_full_redraw_after_interruptions(sp_desktop_canvas(desktop), 0); SPCSSAttr *css = sp_repr_css_attr_new (); @@ -211,7 +212,7 @@ ObjectCompositeSettings::_opacityValueChanged() _("Change opacity")); // resume interruptibility - sp_canvas_end_forced_full_redraws(sp_desktop_canvas(desktop)); + //sp_canvas_end_forced_full_redraws(sp_desktop_canvas(desktop)); _blocked = false; } -- 2.30.2