Create  Edit  FrontPage  Index  Search  Changes  History  RSS  Back  Login

GLib::DesktopAppInfo Diff - Ruby-GNOME2 Project Website

  • Added parts are displayed like this.
  • Deleted parts are displayed like this.

= class GLib::DesktopAppInfo

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

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

== Object Hierarchy

* Object
  * GLib::Instantiatable
    * GLib::Object
      * GLib::DesktopAppInfo

== Included Modules

  * GLib::AppInfo

== Class Methods

--- GLib::DesktopAppInfo.desktop_env=(desktop_env)

     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

--- GLib::DesktopAppInfo.new_from_filename(filename)

     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

--- GLib::DesktopAppInfo.new_from_keyfile(keyfile)

     Creates a new GLib::DesktopAppInfo.

     * keyfile: an opened GLib::KeyFile
     * Returns: a new GLib::DesktopAppInfo, or nil on error

--- GLib::DesktopAppInfo.set_desktop_env(desktop_env)

     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

     * GNOME
     * 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

== Instance Methods

--- add_supports_type

    See GLib::AppInfo#add_supports_type.

--- can_delete?

    See GLib::AppInfo#can_delete?.

--- can_remove_supports_type?

    See GLib::AppInfo#can_remove_supports_type?.

--- commandline

    See GLib::AppInfo#commandline.

--- delete

    See GLib::AppInfo#delete.

--- description

    See GLib::AppInfo#description.

--- display_name

    See GLib::AppInfo#display_name.

--- dup

    See GLib::AppInfo#dup.

--- equal?

    See GLib::AppInfo#equal?.

--- executable

    See GLib::AppInfo#executable.

--- filename

     When this GLib::DesktopAppInfo was created from a known filename, return
     it. In some situations such as the GLib::DesktopAppInfo returned from
     GLib::DesktopAppInfo.new_from_keyfile, this function will return nil.

     * Returns: The full path to the file for this GLib::DesktopAppInfo, or nil
       if not known

--- hidden?

     Checks if this GLib::DesktopAppInfo is hidden.

     A desktop file is hidden if the (({Hidden})) key in it is set to

     * Returns: true if this GLib::DesktopAppInfo is hidden

--- icon

    See GLib::AppInfo#icon.

--- id

    See GLib::AppInfo#id.

--- launch

    See GLib::AppInfo#launch.

--- launch_uris

    See GLib::AppInfo#launch_uris.

--- name

    See GLib::AppInfo#name.

--- remove_supports_type

    See GLib::AppInfo#remove_supports_type.

--- set_as_default_for_extension

    See GLib::AppInfo#set_as_default_for_extension.

--- set_as_default_for_type

    See GLib::AppInfo#set_as_default_for_type.

--- should_show?

    See GLib::AppInfo#should_show?.

--- supports_files?

    See GLib::AppInfo#supports_files?.

--- supports_uris?

    See GLib::AppInfo#supports_uris?.

== See Also

== ChangeLog