AmtkUtils

AmtkUtils — Utility functions

Functions

Includes

#include <amtk/amtk.h>

Description

Utility functions.

Functions

amtk_utils_recent_chooser_menu_get_item_uri ()

gchar *
amtk_utils_recent_chooser_menu_get_item_uri
                               (GtkRecentChooserMenu *menu,
                                GtkMenuItem *item);

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.

Parameters

menu

a GtkRecentChooserMenu.

 

item

a GtkMenuItem.

 

Returns

the URI of item . Free with g_free() when no longer needed.

Since: 2.0


amtk_utils_bind_g_action_to_gtk_action ()

void
amtk_utils_bind_g_action_to_gtk_action
                               (GActionMap *g_action_map,
                                const gchar *g_action_name,
                                GtkActionGroup *gtk_action_group,
                                const gchar *gtk_action_name);

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.

This function:

When using this function, you should set the callback to NULL in the corresponding GtkActionEntry.

Parameters

g_action_map

a GActionMap.

 

g_action_name

a GAction name present in g_action_map .

 

gtk_action_group

a GtkActionGroup.

 

gtk_action_name

a GtkAction name present in gtk_action_group .

 

Since: 3.0

Types and Values