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

Re: activating a toggle menu item



Op di 28-09-2004, om 10:07 schreef Joop Stakenborg:
> I have created a menu using the GtkAction api and added a
> GtkToggleActionEntry like this:
> 
> static GtkToggleActionEntry toggle_entries[] = {
>   { "FullScreen", NULL, "_Full Screen", "F11", "NULL, NULL, FALSE }
> };
> 
> using the follow gtk_action call:
> 
> gtk_action_group_add_toggle_actions (action_group, toggle_entries,
> G_N_ELEMENTS (toggle_entries), window);
> 
> Now I want to check the menuitem at program start. 

I have found a very simple way, just call:

toggle_entries[0].is_active = TRUE;

before calling gtk_action_group_add_toggle_actions.

Regards,
Joop



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