Menus

Menus — The menus in the player

Synopsis

#include <rc-ui-menu.h>

guint               rc_ui_menu_add_menu_action          (GtkAction *action,
                                                         const gchar *path,
                                                         const gchar *name,
                                                         const gchar *action_name,
                                                         gboolean top);
GtkUIManager *      rc_ui_menu_get_ui_manager           ();
void                rc_ui_menu_remove_menu_action       (GtkAction *action,
                                                         guint id);

Description

This module provides the menus in the player, including main window, status icon, popup menus, etc. Plug-ins can also add their own menu items into the player.

Details

rc_ui_menu_add_menu_action ()

guint               rc_ui_menu_add_menu_action          (GtkAction *action,
                                                         const gchar *path,
                                                         const gchar *name,
                                                         const gchar *action_name,
                                                         gboolean top);

Add a menu item to the main menu of the player.

action :

the GtkAction for the menu item

path :

the path to append to

name :

the name for the added UI element

action_name :

the name of the action to be proxied

top :

if TRUE, the UI element is added before its siblings, otherwise it is added after its siblings

Returns :

The merge ID of the menu item. (Should be used to remove the menu when you do not need it.)

rc_ui_menu_get_ui_manager ()

GtkUIManager *      rc_ui_menu_get_ui_manager           ();

Get the UI Manager of the menus. If it is not initialized yet, it will be initialized.

Returns :

The UI Manager object. [transfer none]

rc_ui_menu_remove_menu_action ()

void                rc_ui_menu_remove_menu_action       (GtkAction *action,
                                                         guint id);

Remove the menu item by the given GtkAction and merge ID.

action :

the GtkAction for the menu item

id :

the merge ID of the menu item