Re: GtkRange API is incomplete



2010/7/27 Krzysztof Kosiński <tweenk pl gmail com>:
> Hello
>
> Here is my use use case (in Inkscape). I have a set of sliders
> (GtkScale) that control some values in the document. I want to update
> the view of the document in real time, but only push the change on the
> undo stack when the drag is finished. But the only signal I can
> connect to is value-changed. When I connect to it, I have only two
> choices:
> 1. Update policy GTK_UPDATE_DISCONTINUOUS. This will give me correct
> undo behavior but won't update the display in real time.
> 2. Update policy GTK_UPDATE_CONTINUOUS. This will update the display
> correctly but will flood the undo stack with partial changes.
>
> The problem would be solved if there was some additional signal that
> would only be emitted when the user finishes the drag, or when the
> slider is moved using the keyboard. It could be called value-set.
> Essentially, it should be emitted after the value-changed signal
> whenever the value-changed signal would be emitted if the update
> policy was GTK_UPDATE_DISCONTINUOUS.
>
> Here's the relevant bug report from our tracker.
> https://bugs.launchpad.net/inkscape/+bug/579932

Can't you just connect to two different signal handlers one for the
update and one for the undo stack?

>
> Regards, Krzysztof
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list
>



-- 
Un saludo,
Alberto Ruiz


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]