Index: glib/gkeyfile.h
===================================================================
--- glib/gkeyfile.h	(revision 5519)
+++ glib/gkeyfile.h	(working copy)
@@ -214,6 +214,33 @@
 					     const gchar          *group_name,
 					     GError              **error);
 
+/* Defines for handling freedesktop.org Desktop files */
+#define G_KEY_FILE_DESKTOP_GROUP                "Desktop Entry"
+
+#define G_KEY_FILE_DESKTOP_KEY_TYPE             "Type"
+#define G_KEY_FILE_DESKTOP_KEY_VERSION          "Version"
+#define G_KEY_FILE_DESKTOP_KEY_NAME             "Name"
+#define G_KEY_FILE_DESKTOP_KEY_GENERIC_NAME     "GenericName"
+#define G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY       "NoDisplay"
+#define G_KEY_FILE_DESKTOP_KEY_COMMENT          "Comment"
+#define G_KEY_FILE_DESKTOP_KEY_ICON             "Icon"
+#define G_KEY_FILE_DESKTOP_KEY_HIDDEN           "Hidden"
+#define G_KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN     "OnlyShowIn"
+#define G_KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN      "NotShowIn"
+#define G_KEY_FILE_DESKTOP_KEY_TRY_EXEC         "TryExec"
+#define G_KEY_FILE_DESKTOP_KEY_EXEC             "Exec"
+#define G_KEY_FILE_DESKTOP_KEY_PATH             "Path"
+#define G_KEY_FILE_DESKTOP_KEY_TERMINAL         "Terminal"
+#define G_KEY_FILE_DESKTOP_KEY_MIME_TYPE        "MimeType"
+#define G_KEY_FILE_DESKTOP_KEY_CATEGORIES       "Categories"
+#define G_KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY   "StartupNotify"
+#define G_KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS "StartupWMClass"
+#define G_KEY_FILE_DESKTOP_KEY_URL              "URL"
+
+#define G_KEY_FILE_DESKTOP_TYPE_APPLICATION     "Application"
+#define G_KEY_FILE_DESKTOP_TYPE_LINK            "Link"
+#define G_KEY_FILE_DESKTOP_TYPE_DIRECTORY       "Directory"
+
 G_END_DECLS
 
 #endif /* __G_KEY_FILE_H__ */
Index: docs/reference/glib/glib-sections.txt
===================================================================
--- docs/reference/glib/glib-sections.txt	(revision 5519)
+++ docs/reference/glib/glib-sections.txt	(working copy)
@@ -1501,6 +1501,8 @@
 G_KEY_FILE_ERROR
 GKeyFileError
 GKeyFileFlags
+
+<SUBSECTION>
 g_key_file_new
 g_key_file_free
 g_key_file_set_list_separator
@@ -1545,6 +1547,31 @@
 g_key_file_remove_key
 g_key_file_remove_comment
 
+<SUBSECTION>
+G_KEY_FILE_DESKTOP_GROUP
+G_KEY_FILE_DESKTOP_KEY_TYPE
+G_KEY_FILE_DESKTOP_KEY_VERSION
+G_KEY_FILE_DESKTOP_KEY_NAME
+G_KEY_FILE_DESKTOP_KEY_GENERIC_NAME
+G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY
+G_KEY_FILE_DESKTOP_KEY_COMMENT
+G_KEY_FILE_DESKTOP_KEY_ICON
+G_KEY_FILE_DESKTOP_KEY_HIDDEN
+G_KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN
+G_KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN
+G_KEY_FILE_DESKTOP_KEY_TRY_EXEC
+G_KEY_FILE_DESKTOP_KEY_EXEC
+G_KEY_FILE_DESKTOP_KEY_PATH
+G_KEY_FILE_DESKTOP_KEY_TERMINAL
+G_KEY_FILE_DESKTOP_KEY_MIME_TYPE
+G_KEY_FILE_DESKTOP_KEY_CATEGORIES
+G_KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY
+G_KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS
+G_KEY_FILE_DESKTOP_KEY_URL
+G_KEY_FILE_DESKTOP_TYPE_APPLICATION
+G_KEY_FILE_DESKTOP_TYPE_LINK
+G_KEY_FILE_DESKTOP_TYPE_DIRECTORY
+
 <SUBSECTION Private>
 g_key_file_error_quark
 </SECTION>
Index: docs/reference/glib/tmpl/keyfile.sgml
===================================================================
--- docs/reference/glib/tmpl/keyfile.sgml	(revision 5519)
+++ docs/reference/glib/tmpl/keyfile.sgml	(working copy)
@@ -601,3 +601,198 @@
 @error: 
 
 
+<!-- ##### MACRO G_KEY_FILE_DESKTOP_GROUP ##### -->
+<para>
+Main group of a desktop entry file, as defined in the
+<ulink url="http://freedesktop.org/Standards/desktop-entry-spec">Desktop
+Entry Specification</ulink>.
+</para>
+
+
+
+<!-- ##### MACRO G_KEY_FILE_DESKTOP_KEY_TYPE ##### -->
+<para>
+Key defining the type of a desktop entry file. The value is a string.
+The 
+<link linkend="G-KEY-FILE-DESKTOP-TYPE-APPLICATION:CAPS"><literal>G_KEY_FILE_DESKTOP_TYPE_APPLICATION</literal></link>,
+<link linkend="G-KEY-FILE-DESKTOP-TYPE-LINK:CAPS"><literal>G_KEY_FILE_DESKTOP_TYPE_LINK</literal></link>,
+<link linkend="G-KEY-FILE-DESKTOP-TYPE-DIRECTORY:CAPS"><literal>G_KEY_FILE_DESKTOP_TYPE_DIRECTORY</literal></link>,
+macros can be used as values for this key.
+</para>
+
+
+
+<!-- ##### MACRO G_KEY_FILE_DESKTOP_KEY_VERSION ##### -->
+<para>
+Key defining the version of the
+<ulink url="http://freedesktop.org/Standards/desktop-entry-spec">Desktop
+Entry Specification</ulink> used for the desktop entry file. The value is
+is a string value.
+</para>
+
+
+
+<!-- ##### MACRO G_KEY_FILE_DESKTOP_KEY_NAME ##### -->
+<para>
+Key defining the specific name of the desktop entry. The value is a localized
+string.
+</para>
+
+
+
+<!-- ##### MACRO G_KEY_FILE_DESKTOP_KEY_GENERIC_NAME ##### -->
+<para>
+Key defining the generic name of the desktop entry. The value is a localized
+string.
+</para>
+
+
+
+<!-- ##### MACRO G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY ##### -->
+<para>
+Key defining whether the desktop entry should be shown in menus. The value is a
+boolean.
+</para>
+
+
+
+<!-- ##### MACRO G_KEY_FILE_DESKTOP_KEY_COMMENT ##### -->
+<para>
+Key defining the tooltip for the desktop entry. The value is a localized
+string.
+</para>
+
+
+
+<!-- ##### MACRO G_KEY_FILE_DESKTOP_KEY_ICON ##### -->
+<para>
+Key defining the icon to be displayed for the desktop entry. The value is
+a localized string.
+</para>
+
+
+
+<!-- ##### MACRO G_KEY_FILE_DESKTOP_KEY_HIDDEN ##### -->
+<para>
+Key defining whether the desktop entry has been by the user deleted. The value
+is a boolean.
+</para>
+
+
+
+<!-- ##### MACRO G_KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN ##### -->
+<para>
+Key identifying the environments that should display the desktop entry. The
+value is a list of strings.
+</para>
+
+
+
+<!-- ##### MACRO G_KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN ##### -->
+<para>
+Key identifying the environments that should not display the desktop entry. The
+value is a list of strings.
+</para>
+
+
+
+<!-- ##### MACRO G_KEY_FILE_DESKTOP_KEY_TRY_EXEC ##### -->
+<para>
+Key defining a file name of a binary on disk used to determine if the program
+is actually installed. It is only valid for desktop entries with the
+<literal>Application</literal> type. The value is a string.
+</para>
+
+
+
+<!-- ##### MACRO G_KEY_FILE_DESKTOP_KEY_EXEC ##### -->
+<para>
+Key defining the program to execute. It is only valid for desktop entries with
+the <literal>Application</literal> type. The value is a string.
+</para>
+
+
+
+<!-- ##### MACRO G_KEY_FILE_DESKTOP_KEY_PATH ##### -->
+<para>
+Key defining the working directory to run the program in. It is only valid for
+desktop entries with the <literal>Application</literal> type. The
+value is a string.
+</para>
+
+
+
+<!-- ##### MACRO G_KEY_FILE_DESKTOP_KEY_TERMINAL ##### -->
+<para>
+Key defining whether the program should be runned in a terminal window. It is
+only valid for desktop entries with the <literal>Application</literal>
+type. The value is a boolean.
+</para>
+
+
+
+<!-- ##### MACRO G_KEY_FILE_DESKTOP_KEY_MIME_TYPE ##### -->
+<para>
+Key defining the list of MIME type(s) supported by this desktop entry. The
+value is a list of strings.
+</para>
+
+
+
+<!-- ##### MACRO G_KEY_FILE_DESKTOP_KEY_CATEGORIES ##### -->
+<para>
+Key defining the categories in which the desktop entry should be shown in a
+menu. The value is a list of strings.
+</para>
+
+
+
+<!-- ##### MACRO G_KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY ##### -->
+<para>
+Key defining whether the application supports the
+<ulink url="http://www.freedesktop.org/Standards/startup-notification-spec">Startup
+Notification Protocol Specification</ulink>. The value is a boolean.
+</para>
+
+
+
+<!-- ##### MACRO G_KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS ##### -->
+<para>
+Key defining a WM class or a WM name hint that will be mapped to at least one
+window of the application. The value is a string.
+</para>
+
+
+
+<!-- ##### MACRO G_KEY_FILE_DESKTOP_KEY_URL ##### -->
+<para>
+Key defining the URL to access. It is only valid for desktop entries with the
+<literal>Link</literal> type. The value is a string.
+</para>
+
+
+
+<!-- ##### MACRO G_KEY_FILE_DESKTOP_TYPE_APPLICATION ##### -->
+<para>
+The value of the <literal>Type</literal> key for desktop entries
+representing applications.
+</para>
+
+
+
+<!-- ##### MACRO G_KEY_FILE_DESKTOP_TYPE_LINK ##### -->
+<para>
+The value of the <literal>Type</literal> key for desktop entries
+representing links to documents.
+</para>
+
+
+
+<!-- ##### MACRO G_KEY_FILE_DESKTOP_TYPE_DIRECTORY ##### -->
+<para>
+The value of the <literal>Type</literal> key for desktop entries
+representing directories.
+</para>
+
+
+
