a #GActionMap.
a pointer to the first item in an array of #GActionEntry structs.
the user data for signal connections.
Free the resources allocated by Amtk. For example it unrefs the singleton objects.
It is not mandatory to call this function, it's just to be friendlier to memory debugging tools. This function is meant to be called at the end of main(). It can be called several times.
Initializes the Amtk library (e.g. for the internationalization).
This function can be called several times, but is meant to be called at the beginning of main(), before any other Amtk function call.
Sets an icon to a #GtkMenuItem.
If the child widget of item
is already a #GtkBox, all #GtkImage widgets
inside that box are first destroyed. A #GtkImage for icon_name
is then
inserted to the box.
If the child widget of item
is not a #GtkBox (it's usually the
#GtkAccelLabel), it is replaced by a new #GtkBox and the initial child widget
is inserted to the #GtkBox, alongside the icon.
As a consequence, if you want to call functions on the #GtkAccelLabel, it's easier to do it before calling this function.
Utility function to be able to port an application gradually to #GAction, when #GtkUIManager and #GtkAction are still used. Porting to #GAction should be the first step.
For detailed_g_action_name_without_prefix,
see the
g_action_parse_detailed_name() function. The "app."
or "win."
prefix (or
any other #GActionMap prefix) must not be included in
detailed_g_action_name_without_prefix
. For example a valid
detailed_g_action_name_without_prefix
is "open"
or
"insert-command::foobar"
.
The same #GAction can be bound to several #GtkAction's (with different parameter values for the #GAction), but the reverse is not true, one #GtkAction cannot be bound to several #GAction's.
This function:
When using this function, you should set the callback to %NULL in the corresponding #GtkActionEntry.
a #GActionMap.
a detailed #GAction name without the #GActionMap prefix; the #GAction must be present in g_action_map
.
a #GtkActionGroup.
a #GtkAction name present in gtk_action_group
.
Utility function to be able to port an application gradually to #GAction and #AmtkActionInfo, when #GtkUIManager is still used. This function goes one step further compared to amtk_utils_bind_g_action_to_gtk_action(). With amtk_utils_bind_g_action_to_gtk_action(), only the #GAction must exist. With amtk_utils_create_gtk_action(), both the #GAction and #AmtkActionInfo must exist (so typically you need to convert the #GtkActionEntry's into #AmtkActionInfoEntry's).
This function creates a #GtkAction from a #GAction plus its corresponding #AmtkActionInfo.
The #GtkAction is created with the information provided by the
#AmtkActionInfo (retrieved with amtk_action_info_central_store_lookup() with
detailed_g_action_name_with_prefix
as argument). Only the first accelerator
is taken into account.
Once the #GtkAction is created, it is added to the gtk_action_group,
and
amtk_utils_bind_g_action_to_gtk_action() is called.
a #GActionMap.
a detailed #GAction name with the #GActionMap prefix; the #GAction must be present in g_action_map
.
a #GtkActionGroup.
the name of the #GtkAction to create and add to gtk_action_group
.
Gets the URI of item
. item
must be a child of menu
. menu
must be a
#GtkRecentChooserMenu.
This function has been written because the value returned by gtk_recent_chooser_get_current_uri() is not updated when #GtkMenuItem's of a #GtkRecentChooserMenu are selected/deselected.
a #GtkRecentChooserMenu.
a #GtkMenuItem.
A wrapper function for g_action_map_add_action_entries() that checks duplicates.
This function first checks - for each entry - that the
action_map
doesn't already contain a #GAction with the same name. A warning is printed if an old action will be dropped. In any case, it then calls g_action_map_add_action_entries() with the same arguments as passed to this function.This function also checks if there are duplicates in the
entries
array itself.