GarconMenuItem

## GarconMenuItem GarconMenuItem |

## Synopsis

                        GarconMenuItemPrivate;
                        GarconMenuItemClass;
                        GarconMenuItem;
    GarconMenuItem *    garcon_menu_item_new                (GFile *file);
    GarconMenuItem *    garcon_menu_item_new_for_path       (const gchar *filename);
    GarconMenuItem *    garcon_menu_item_new_for_uri        (const gchar *uri);
    gboolean            garcon_menu_item_reload             (GarconMenuItem *item,
                                                             gboolean *affects_the_outside,
                                                             GError **error);
    gboolean            garcon_menu_item_reload_from_file   (GarconMenuItem *item,
                                                             GFile *file,
                                                             gboolean *affects_the_outside,
                                                             GError **error);
    GFile *             garcon_menu_item_get_file           (GarconMenuItem *item);
    gchar *             garcon_menu_item_get_uri            (GarconMenuItem *item);
    const gchar *       garcon_menu_item_get_desktop_id     (GarconMenuItem *item);
    void                garcon_menu_item_set_desktop_id     (GarconMenuItem *item,
                                                             const gchar *desktop_id);
    const gchar *       garcon_menu_item_get_command        (GarconMenuItem *item);
    void                garcon_menu_item_set_command        (GarconMenuItem *item,
                                                             const gchar *command);
    const gchar *       garcon_menu_item_get_try_exec       (GarconMenuItem *item);
    void                garcon_menu_item_set_try_exec       (GarconMenuItem *item,
                                                             const gchar *try_exec);
    const gchar *       garcon_menu_item_get_name           (GarconMenuItem *item);
    void                garcon_menu_item_set_name           (GarconMenuItem *item,
                                                             const gchar *name);
    const gchar *       garcon_menu_item_get_generic_name   (GarconMenuItem *item);
    void                garcon_menu_item_set_generic_name   (GarconMenuItem *item,
                                                             const gchar *generic_name);
    const gchar *       garcon_menu_item_get_comment        (GarconMenuItem *item);
    void                garcon_menu_item_set_comment        (GarconMenuItem *item,
                                                             const gchar *comment);
    const gchar *       garcon_menu_item_get_icon_name      (GarconMenuItem *item);
    void                garcon_menu_item_set_icon_name      (GarconMenuItem *item,
                                                             const gchar *icon_name);
    const gchar *       garcon_menu_item_get_path           (GarconMenuItem *item);
    void                garcon_menu_item_set_path           (GarconMenuItem *item,
                                                             const gchar *path);
    gboolean            garcon_menu_item_get_hidden         (GarconMenuItem *item);
    void                garcon_menu_item_set_hidden         (GarconMenuItem *item,
                                                             gboolean hidden);
    gboolean            garcon_menu_item_requires_terminal  (GarconMenuItem *item);
    void                garcon_menu_item_set_requires_terminal
                                                            (GarconMenuItem *item,
                                                             gboolean requires_terminal);
    gboolean            garcon_menu_item_get_no_display     (GarconMenuItem *item);
    void                garcon_menu_item_set_no_display     (GarconMenuItem *item,
                                                             gboolean no_display);
    gboolean            garcon_menu_item_supports_startup_notification
                                                            (GarconMenuItem *item);
    void                garcon_menu_item_set_supports_startup_notification
                                                            (GarconMenuItem *item,
                                                             gboolean supports_startup_notification);
    GList *             garcon_menu_item_get_categories     (GarconMenuItem *item);
    void                garcon_menu_item_set_categories     (GarconMenuItem *item,
                                                             GList *categories);
    gboolean            garcon_menu_item_has_category       (GarconMenuItem *item,
                                                             const gchar *category);
    gboolean            garcon_menu_item_get_show_in_environment
                                                            (GarconMenuItem *item);
    gboolean            garcon_menu_item_only_show_in_environment
                                                            (GarconMenuItem *item);
    void                garcon_menu_item_ref                (GarconMenuItem *item);
    void                garcon_menu_item_unref              (GarconMenuItem *item);
    gint                garcon_menu_item_get_allocated      (GarconMenuItem *item);
    void                garcon_menu_item_increment_allocated
                                                            (GarconMenuItem *item);
    void                garcon_menu_item_decrement_allocated
                                                            (GarconMenuItem *item);

## Object Hierarchy

      GObject
       +----GarconMenuItem

## Implemented Interfaces

GarconMenuItem implements GarconMenuElement.

## Properties

      "command"                  gchar*                : Read / Write
      "comment"                  gchar*                : Read / Write
      "desktop-id"               gchar*                : Read / Write
      "file"                     GFile*                : Read / Write / Construct Only
      "generic-name"             gchar*                : Read / Write
      "hidden"                   gboolean              : Read / Write
      "icon-name"                gchar*                : Read / Write
      "name"                     gchar*                : Read / Write
      "no-display"               gboolean              : Read / Write
      "path"                     gchar*                : Read / Write
      "requires-terminal"        gboolean              : Read / Write
      "supports-startup-notification" gboolean              : Read / Write
      "try-exec"                 gchar*                : Read / Write

## Signals

      "changed"                                        : Run First

## Description

## Details

### GarconMenuItemPrivate

    typedef struct _GarconMenuItemPrivate GarconMenuItemPrivate;

### GarconMenuItemClass

    typedef struct {
      GObjectClass __parent__;

      /* signals */
      void (*changed) (GarconMenuItem *item);
    } GarconMenuItemClass;

### GarconMenuItem

    typedef struct _GarconMenuItem GarconMenuItem;

### garcon_menu_item_new ()

    GarconMenuItem *    garcon_menu_item_new                (GFile *file);

`file` : |
Returns : |

### garcon_menu_item_new_for_path ()

    GarconMenuItem *    garcon_menu_item_new_for_path       (const gchar *filename);

`filename` : |
Returns : |

### garcon_menu_item_new_for_uri ()

    GarconMenuItem *    garcon_menu_item_new_for_uri        (const gchar *uri);

`uri` : |
Returns : |

### garcon_menu_item_reload ()

    gboolean            garcon_menu_item_reload             (GarconMenuItem *item,
                                                             gboolean *affects_the_outside,
                                                             GError **error);

`item` : |
`affects_the_outside` : |
`error` : |
Returns : |

### garcon_menu_item_reload_from_file ()

    gboolean            garcon_menu_item_reload_from_file   (GarconMenuItem *item,
                                                             GFile *file,
                                                             gboolean *affects_the_outside,
                                                             GError **error);

`item` : |
`file` : |
`affects_the_outside` : |
`error` : |
Returns : |

### garcon_menu_item_get_file ()

    GFile *             garcon_menu_item_get_file           (GarconMenuItem *item);

Get the file for `item`.

`item` : |
Returns : | a GFile. The returned object should be unreffed with `g_object_unref()` when no longer needed.

### garcon_menu_item_get_uri ()

    gchar *             garcon_menu_item_get_uri            (GarconMenuItem *item);

`item` : |
Returns : |

### garcon_menu_item_get_desktop_id ()

    const gchar *       garcon_menu_item_get_desktop_id     (GarconMenuItem *item);

`item` : |
Returns : |

### garcon_menu_item_set_desktop_id ()

    void                garcon_menu_item_set_desktop_id     (GarconMenuItem *item,
                                                             const gchar *desktop_id);

`item` : |
`desktop_id` : |

### garcon_menu_item_get_command ()

    const gchar *       garcon_menu_item_get_command        (GarconMenuItem *item);

`item` : |
Returns : |

### garcon_menu_item_set_command ()

    void                garcon_menu_item_set_command        (GarconMenuItem *item,
                                                             const gchar *command);

`item` : |
`command` : |

### garcon_menu_item_get_try_exec ()

    const gchar *       garcon_menu_item_get_try_exec       (GarconMenuItem *item);

`item` : |
Returns : |

### garcon_menu_item_set_try_exec ()

    void                garcon_menu_item_set_try_exec       (GarconMenuItem *item,
                                                             const gchar *try_exec);

`item` : |
`try_exec` : |

### garcon_menu_item_get_name ()

    const gchar *       garcon_menu_item_get_name           (GarconMenuItem *item);

`item` : |
Returns : |

### garcon_menu_item_set_name ()

    void                garcon_menu_item_set_name           (GarconMenuItem *item,
                                                             const gchar *name);

`item` : |
`name` : |

### garcon_menu_item_get_generic_name ()

    const gchar *       garcon_menu_item_get_generic_name   (GarconMenuItem *item);

`item` : |
Returns : |

### garcon_menu_item_set_generic_name ()

    void                garcon_menu_item_set_generic_name   (GarconMenuItem *item,
                                                             const gchar *generic_name);

`item` : |
`generic_name` : |

### garcon_menu_item_get_comment ()

    const gchar *       garcon_menu_item_get_comment        (GarconMenuItem *item);

`item` : |
Returns : |

### garcon_menu_item_set_comment ()

    void                garcon_menu_item_set_comment        (GarconMenuItem *item,
                                                             const gchar *comment);

`item` : |
`comment` : |

### garcon_menu_item_get_icon_name ()

    const gchar *       garcon_menu_item_get_icon_name      (GarconMenuItem *item);

`item` : |
Returns : |

### garcon_menu_item_set_icon_name ()

    void                garcon_menu_item_set_icon_name      (GarconMenuItem *item,
                                                             const gchar *icon_name);

`item` : |
`icon_name` : |

### garcon_menu_item_get_path ()

    const gchar *       garcon_menu_item_get_path           (GarconMenuItem *item);

`item` : |
Returns : |

### garcon_menu_item_set_path ()

    void                garcon_menu_item_set_path           (GarconMenuItem *item,
                                                             const gchar *path);

`item` : |
`path` : |

### garcon_menu_item_get_hidden ()

    gboolean            garcon_menu_item_get_hidden         (GarconMenuItem *item);

`item` : |
Returns : |

### garcon_menu_item_set_hidden ()

    void                garcon_menu_item_set_hidden         (GarconMenuItem *item,
                                                             gboolean hidden);

`item` : |
`hidden` : |

### garcon_menu_item_requires_terminal ()

    gboolean            garcon_menu_item_requires_terminal  (GarconMenuItem *item);

`item` : |
Returns : |

### garcon_menu_item_set_requires_terminal ()

    void                garcon_menu_item_set_requires_terminal
                                                            (GarconMenuItem *item,
                                                             gboolean requires_terminal);

`item` : |
`requires_terminal` : |

### garcon_menu_item_get_no_display ()

    gboolean            garcon_menu_item_get_no_display     (GarconMenuItem *item);

`item` : |
Returns : |

### garcon_menu_item_set_no_display ()

    void                garcon_menu_item_set_no_display     (GarconMenuItem *item,
                                                             gboolean no_display);

`item` : |
`no_display` : |

### garcon_menu_item_supports_startup_notification ()

    gboolean            garcon_menu_item_supports_startup_notification
                                                            (GarconMenuItem *item);

`item` : |
Returns : |

### garcon_menu_item_set_supports_startup_notification ()

    void                garcon_menu_item_set_supports_startup_notification
                                                            (GarconMenuItem *item,
                                                             gboolean supports_startup_notification);

`item` : |
`supports_startup_notification` : |

### garcon_menu_item_get_categories ()

    GList *             garcon_menu_item_get_categories     (GarconMenuItem *item);

`item` : |
Returns : |

### garcon_menu_item_set_categories ()

    void                garcon_menu_item_set_categories     (GarconMenuItem *item,
                                                             GList *categories);

`item` : |
`categories` : |

### garcon_menu_item_has_category ()

    gboolean            garcon_menu_item_has_category       (GarconMenuItem *item,
                                                             const gchar *category);

`item` : |
`category` : |
Returns : |

### garcon_menu_item_get_show_in_environment ()

    gboolean            garcon_menu_item_get_show_in_environment
                                                            (GarconMenuItem *item);

`item` : |
Returns : |

### garcon_menu_item_only_show_in_environment ()

    gboolean            garcon_menu_item_only_show_in_environment
                                                            (GarconMenuItem *item);

`item` : |
Returns : |

### garcon_menu_item_ref ()

    void                garcon_menu_item_ref                (GarconMenuItem *item);

`item` : |

### garcon_menu_item_unref ()

    void                garcon_menu_item_unref              (GarconMenuItem *item);

`item` : |

### garcon_menu_item_get_allocated ()

    gint                garcon_menu_item_get_allocated      (GarconMenuItem *item);

`item` : |
Returns : |

### garcon_menu_item_increment_allocated ()

    void                garcon_menu_item_increment_allocated
                                                            (GarconMenuItem *item);

`item` : |

### garcon_menu_item_decrement_allocated ()

    void                garcon_menu_item_decrement_allocated
                                                            (GarconMenuItem *item);

`item` : |

## Property Details

### The `"command"` property

      "command"                  gchar*                : Read / Write

Command to be executed when the menu item is clicked.

Default value: NULL

### The `"comment"` property

      "comment"                  gchar*                : Read / Write

Comment/description for the application. To be displayed e.g. in tooltips of GtkMenuItems.

Default value: NULL

### The `"desktop-id"` property

      "desktop-id"               gchar*                : Read / Write

The desktop-file id of this application.

Default value: NULL

### The `"file"` property

      "file"                     GFile*                : Read / Write / Construct Only

file.

### The `"generic-name"` property

      "generic-name"             gchar*                : Read / Write

GenericName of the application (will be displayed in menus etc.).

Default value: NULL

### The `"hidden"` property

      "hidden"                   gboolean              : Read / Write

It means the user deleted (at his level) something that was present (at an upper level, e.g. in the system dirs). It's strictly equivalent to the .desktop file not existing at all, as far as that user is concerned.

Default value: FALSE

### The `"icon-name"` property

      "icon-name"                gchar*                : Read / Write

Name of the icon to be displayed for this menu item.

Default value: NULL

### The `"name"` property

      "name"                     gchar*                : Read / Write

Name of the application (will be displayed in menus etc.).

Default value: NULL

### The `"no-display"` property

      "no-display"               gboolean              : Read / Write

Whether this menu item is hidden in menus.

Default value: FALSE

### The `"path"` property

      "path"                     gchar*                : Read / Write

Working directory the application should be started in.

Default value: NULL

### The `"requires-terminal"` property

      "requires-terminal"        gboolean              : Read / Write

Whether this application requires a terinal to be started in.

Default value: FALSE

### The `"supports-startup-notification"` property

      "supports-startup-notification" gboolean              : Read / Write

Startup notification support.

Default value: FALSE

### The `"try-exec"` property

      "try-exec"                 gchar*                : Read / Write

Path to an executable file on disk used to determine if the program is actually installed. If the path is not an absolute path, the file is looked up in the $PATH environment variable. If the file is not present or if it is not executable, the entry may be ignored (not be used in menus, for example).

Default value: NULL

## Signal Details

### The `"changed"` signal

    void                user_function                      (GarconMenuItem *item,
                                                            gpointer        user_data)      : Run First

Emitted when GarconMenuItem has been reloaded.

`item` : | a GarconMenuItem.
`user_data` : | user data set when the signal handler was connected.