[maemo-developers] GtkRadioActionEntry
From: Aniello Del Sorbo anidel at gmail.comDate: Tue Sep 15 19:31:57 EEST 2009
- Previous message: Need information for MIME type recognisation
- Next message: GtkRadioActionEntry
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
I have an issue with my interface.
I've created my interface using GtkUIManager from an xml file.
In this file I've created a toolbar:
<toolbar action='HildonToolBar'>
<toolitem action='Pen'/>
<toolitem action='Eraser'/>
<toolitem action='Highlighter'/>
<toolitem action='Text'/>
</toolbar>
in the code I've this gtkradioaction entries:
static GtkRadioActionEntry hildon_tools_radio_entries[] = {
{ "Pen", "pen", N_("_Pen"), "<control><shift>P", NULL, 0 },
{ "Eraser", "eraser", N_("_Eraser"), "<control><shift>E", NULL, 1 },
{ "Highlighter", "highlighter", N_("_Highlighter"),
"<control><shift>H", NULL, 2 },
{ "Text", "text", N_("_Text"), "<control><shift>T", NULL, 3 }
};
that I add to an action group like this:
gtk_action_group_add_radio_actions (action_group, hildon_tools_radio_entries,
G_N_ELEMENTS(hildon_tools_radio_entries), 0, NULL,
hildon_window);
They show up fine, I can click on them and only one at a time is
selected. And that's fine.
But now, how can I set up a callback action whenever, for example, a
Pen button is toggled?
It worked for menus as the action entries for those had a callback
entry I used to specify the callback function.
But I am lost on how to connect those radio buttons to actual function
in order to perform what they need.
Also I want them to reflect the choice the user makes in the menu
(actually, I have not dug into the menu issue yet, but I've noticed
there are buttons now in Fremantle).
Anyway.. suggestions?
Thanks!
--
anidel
- Previous message: Need information for MIME type recognisation
- Next message: GtkRadioActionEntry
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
