GarconGtkMenu

GarconGtkMenu — Create a GtkMenu for a GarconMenu.

Functions

Types and Values

Includes

#include <garcon-gtk/garcon-gtk.h>

Description

Create a complete GtkMenu for the given GarconMenu

Functions

garcon_gtk_menu_new ()

GtkWidget *
garcon_gtk_menu_new (GarconMenu *garcon_menu);

Creates a new GarconMenu for the .menu file referred to by file . This operation only fails file is invalid. To load the menu tree from the file, you need to call garcon_gtk_menu_load() with the returned GarconMenu.

The caller is responsible to destroy the returned GarconMenu using g_object_unref().

For more information about the usage see garcon_gtk_menu_new().

Returns

a new GarconMenu for file .


garcon_gtk_menu_set_menu ()

void
garcon_gtk_menu_set_menu (GarconGtkMenu *menu,
                          GarconMenu *garcon_menu);

Parameters

menu

A GarconGtkMenu

 

garcon_menu

The GarconMenu to use

 

garcon_gtk_menu_get_menu ()

GarconMenu *
garcon_gtk_menu_get_menu (GarconGtkMenu *menu);

The GarconMenu used to create the GtkMenu.

The caller is responsible to releasing the returned GarconMenu using g_object_unref().

Parameters

menu

A GarconGtkMenu

 

Returns

the GarconMenu for menu .

[transfer full]


garcon_gtk_menu_set_show_generic_names ()

void
garcon_gtk_menu_set_show_generic_names
                               (GarconGtkMenu *menu,
                                gboolean show_generic_names);

Parameters

menu

A GarconGtkMenu

 

show_generic_names

new value

 

garcon_gtk_menu_get_show_generic_names ()

gboolean
garcon_gtk_menu_get_show_generic_names
                               (GarconGtkMenu *menu);

Parameters

menu

A GarconGtkMenu

 

Returns

if generic names are shown


garcon_gtk_menu_set_show_menu_icons ()

void
garcon_gtk_menu_set_show_menu_icons (GarconGtkMenu *menu,
                                     gboolean show_menu_icons);

Parameters

menu

A GarconGtkMenu

 

show_menu_icons

new value

 

garcon_gtk_menu_get_show_menu_icons ()

gboolean
garcon_gtk_menu_get_show_menu_icons (GarconGtkMenu *menu);

Parameters

menu

A GarconGtkMenu

 

Returns

if menu icons are shown


garcon_gtk_menu_set_show_tooltips ()

void
garcon_gtk_menu_set_show_tooltips (GarconGtkMenu *menu,
                                   gboolean show_tooltips);

Parameters

menu

A GarconGtkMenu

 

garcon_gtk_menu_get_show_tooltips ()

gboolean
garcon_gtk_menu_get_show_tooltips (GarconGtkMenu *menu);

Parameters

menu

A GarconGtkMenu

 

Returns

Whether descriptions are shown in the tooltip.


garcon_gtk_menu_set_show_desktop_actions ()

void
garcon_gtk_menu_set_show_desktop_actions
                               (GarconGtkMenu *menu,
                                gboolean show_desktop_actions);

Parameters

menu

A GarconGtkMenu

 

show_desktop_actions

Toggle showing the desktop actions in a submenu.

 

garcon_gtk_menu_get_show_desktop_actions ()

gboolean
garcon_gtk_menu_get_show_desktop_actions
                               (GarconGtkMenu *menu);

Parameters

menu

A GarconGtkMenu

 

Returns

Whether desktop actions are shown in a submenu.


garcon_gtk_menu_get_desktop_actions_menu ()

GtkMenu *
garcon_gtk_menu_get_desktop_actions_menu
                               (GarconMenuItem *item);

Application icons are never shown on the action menu items.

Parameters

item

A GarconMenuItem

 

Returns

a GtkMenu holding all actions described in the desktop file as menu items.

[transfer full]


garcon_gtk_menu_set_right_click_edits ()

void
garcon_gtk_menu_set_right_click_edits (GarconGtkMenu *menu,
                                       gboolean enable_right_click_edits);

Parameters

menu

A GarconGtkMenu

 

enable_right_click_edits

Toggle showing whether to launch an editor when the menu is clicked with the secondary mouse button.

 

garcon_gtk_menu_get_right_click_edits ()

gboolean
garcon_gtk_menu_get_right_click_edits (GarconGtkMenu *menu);

Parameters

menu

A GarconGtkMenu

 

Returns

Whether an editor will be launched on secondary mouse clicks

Types and Values

struct GarconGtkMenuClass

struct GarconGtkMenuClass {
  GtkMenuClass __parent__;
};

struct GarconGtkMenu

struct GarconGtkMenu {
  GtkMenu              __parent__;
};

GarconGtkMenuPrivate

typedef struct _GarconGtkMenuPrivate GarconGtkMenuPrivate;