Re: Update of GtkRadioMenuItems wihtout emitting any signal

2002-02-18 Thread Havoc Pennington
"Mark R. Rubin" <[EMAIL PROTECTED]> writes: > o I (possibly mis-) read Havoc's: > > > if (current_state == gtk_toggle_button_get_active (toggle)) > >return; > FWIW I think I did mean what Paul said, i.e. current_state is the state of the object the toggle button affects. Havoc

Re: Update of GtkRadioMenuItems wihtout emitting any signal

2002-02-16 Thread Mark R. Rubin
Paul Davis <[EMAIL PROTECTED]> writes: > >1) object->state() is an additional requirement on the Model > > object's public interface. Conceptually, what business does a > > View widget have knowing about the Model? It should just be > > told what to display. > > well, it

Re: Update of GtkRadioMenuItems wihtout emitting any signal

2002-02-16 Thread Paul Davis
>1) object->state() is an additional requirement on the Model > object's public interface. Conceptually, what business does a > View widget have knowing about the Model? It should just be > told what to display. well, it has to have access to whatever parts of the state ar

Re: Update of GtkRadioMenuItems wihtout emitting any signal

2002-02-16 Thread Mark R. Rubin
Paul Davis <[EMAIL PROTECTED]> writes: > try "MVC" in the body, since i usually use that acronym when > discussing this. o 84 hits. I'll read them. Thanks. > >handle_widget_state_change () { > >if (widget->representation_of_object_state() != object->state()) > >object

Re: Update of GtkRadioMenuItems wihtout emitting any signal

2002-02-16 Thread Paul Davis
> searched the archives for this, but never found the right > keywords. Could you provide some "Subject:" lines? Searching for try "MVC" in the body, since i usually use that acronym when discussing this. > a little differently. If his "current_state" is your > "object->state()" (which m

Re: Update of GtkRadioMenuItems wihtout emitting any signal

2002-02-16 Thread Paul Davis
one other comment. its worth being very careful to make sure that the Model does not emit "my state changed" signals just because "set_state()" was called upon it. i.e. actually check to make sure that the new state really is different from the old before emitting the changed signal. this may seem

Re: Update of GtkRadioMenuItems wihtout emitting any signal

2002-02-16 Thread Mark R. Rubin
Paul Davis <[EMAIL PROTECTED]> writes: > you're not the only ones; i've discussed this issue several times on > this list in the past. o Thanks for your analyses (below). As I said originally, I've searched the archives for this, but never found the right keywords. Could you provide some "

Re: Update of GtkRadioMenuItems wihtout emitting any signal

2002-02-15 Thread Paul Davis
>o I also have trouble believing that Ignacio Nodal and myself are the > only ones who've ever been bitten by this. Screen real estate is > always precious, and re-using a widget for input and output always > helps (and is easier on the user than "click this togglebutton to > change from "inp

Re: Update of GtkRadioMenuItems wihtout emitting any signal

2002-02-15 Thread Mark R. Rubin
Havoc Pennington <[EMAIL PROTECTED]> writes: > It depends on the situation. Some approaches are: > > - gtk_signal_handler_block (g_signal_handlers_block, and by_func variants) > - don't do anything in the callback if the value hasn't changed: > if (current_state == gtk_toggle_button_get_ac

Re: Update of GtkRadioMenuItems wihtout emitting any signal

2002-02-15 Thread Havoc Pennington
"Mark R. Rubin" <[EMAIL PROTECTED]> writes: > o Someone (Havoc??) must know the right solution to this problem. > It depends on the situation. Some approaches are: - gtk_signal_handler_block (g_signal_handlers_block, and by_func variants) - don't do anything in the callback if the value hasn

Re: Update of GtkRadioMenuItems wihtout emitting any signal

2002-02-15 Thread Mark R. Rubin
Ignacio Nodal <[EMAIL PROTECTED]> writes: > When I select a different CURRENT_GLOBJECT I want to update the selected > active GtkRadioMenuItem, but without emitting the "activate" signal, so > the menuitems callback isn't call. and: > How can I activate the widget returned by GtkMenuItemWidg

Update of GtkRadioMenuItems wihtout emitting any signal

2002-02-15 Thread Ignacio Nodal
Hi, I have a set of 3D Objects defined in my application, but I only show one of it. Let's call it the CURRENT_GLOBJECT. I can change the CURRENT_GLOBJECT by code or selecting it from a Menu of GtkRadioMenuItems, one GtkRadioMenuItem for each object. When I select a different CURRENT_GLOBJE