Create  Edit  FrontPage  Index  Search  Changes  History  RSS  Login


class GLib::DesktopAppInfo

GLib::DesktopAppInfo is an implementation of GLib::AppInfo based on desktop files.

Note that GLib::DesktopAppInfo belongs to the Unix-specific GIO interfaces.

Class Methods

Same as GLib::DesktopAppInfo#set_desktop_env.
  • Returns: desktop_env

Creates a new GLib::DesktopAppInfo based on a desktop file ID.

A desktop file ID is the basename of the desktop file, including the .desktop extension. GIO is looking for a desktop file with this name in the applications subdirectories of the XDG data directories (that is, the directories specified in the XDG_DATA_HOME and XDG_DATA_DIRS environment variables). GIO also supports the prefix-to-subdirectory mapping that is described in the Menu Spec (that is, a desktop ID of kde-foo.desktop will match /usr/share/applications/kde/foo.desktop}.

  • desktop_id: The desktop file ID
  • Returns: A new GLib::DesktopAppInfo, or nil if no desktop file with that ID exists
Creates a new GLib::DesktopAppInfo.
  • filename: The path of a desktop file, in the GLib filename encoding
  • Returns: a new GLib::DesktopAppInfo, or nil on error
Creates a new GLib::DesktopAppInfo.

Sets the name of the desktop that the application is running in. This is used by GLib::AppInfo#should_show? to evaluate the OnlyShowIn and NotShowIn desktop entry fields.

The Desktop Menu specification recognizes the following values for desktop_env:

  • KDE
  • ROX
  • XFCE
  • Old

This method should only be called once; subsequent calls are ignored.

  • desktop_env: A String specifying what desktop this is
  • Returns: self
Last modified:2010/12/28 23:35:13
References:[Ruby/GIO] [index-ruby-gio2] [index-ruby-glib2] [GLib::DesktopAppInfo]