Re: [gtk-list] Re: [ repeat message] toggle button: clicked == toggled, and vice versa



Thanks to Bernhard for getting to the nub of the issue:

>So, what it boils down to is that not being able to modify the state of
>widgets without triggering the 'changed' signals that are normally
>triggered *as response to user input* makes a model/view/controller
>architecture hard to implement becasue you have to be able to update the
>view especially when there are several views/controllers for the same
>model.

>I haven't looked at that part of the code yet, but IMO a good solution
>would be to split gtk_toggle_button_set_active() into two functions,
>gtk_toggle_button_set_active_silently() that just modifies the state of
>the widget and gtk_toggle_button_set_active() that calls the *_silently
>variant and then emits the signals.

An excellent suggestion. 

--p



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