Update of GtkRadioMenuItems wihtout emitting any signal



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_GLOBJECT I want to update the selected active GtkRadioMenuItem, but without emitting the "activate" signal, so the menuitems callback isn't call.

I use a function which returns me the widget I have to activate:

GtkWidget *GetMenuItemWidget(GtkWidget* widget,gint num_object)

(in my function, "widget" can be any of the GtkRadioMenuItems since they belong all to the same group)

How can I activate the widget returned by GtkMenuItemWidget() without emitting the activate signal?

may I use something like:

gtk_menu_item_activate(GTK_MENU_ITEM(act_widget));
gtk_signal_emit_stop_by_name(GTKOBJECT(act_widget), "activate");

or which is the correct way?

Thanks in advance,

Ignacio Nodal




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