mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-27 07:56:14 +01:00
Doc improvements
2007-12-22 Matthias Clasen <mclasen@redhat.com> * gio/gappinfo.c: Doc improvements * gio/gdesktopappinfo.c (g_app_info_get_all): Return app infos, not ids. svn path=/trunk/; revision=6188
This commit is contained in:
parent
0a76f7d6b4
commit
1daa618e05
@ -1,3 +1,10 @@
|
|||||||
|
2007-12-22 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* gio/gappinfo.c: Doc improvements
|
||||||
|
|
||||||
|
* gio/gdesktopappinfo.c (g_app_info_get_all): Return app infos,
|
||||||
|
not ids.
|
||||||
|
|
||||||
2007-12-20 Matthias Clasen <mclasen@redhat.com>
|
2007-12-20 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* === Released 2.15.0 ===
|
* === Released 2.15.0 ===
|
||||||
|
@ -139,6 +139,9 @@ g_app_info_equal (GAppInfo *appinfo1,
|
|||||||
* platform dependent. For instance on Unix this is the
|
* platform dependent. For instance on Unix this is the
|
||||||
* desktop file id from the xdg menu specification.
|
* desktop file id from the xdg menu specification.
|
||||||
*
|
*
|
||||||
|
* Note that the returned ID may be %NULL, depending on how
|
||||||
|
* the @appinfo has been constructed.
|
||||||
|
*
|
||||||
* Returns: a string containing the application's ID.
|
* Returns: a string containing the application's ID.
|
||||||
**/
|
**/
|
||||||
const char *
|
const char *
|
||||||
@ -180,8 +183,7 @@ g_app_info_get_name (GAppInfo *appinfo)
|
|||||||
* Gets a human-readable description of an installed application.
|
* Gets a human-readable description of an installed application.
|
||||||
*
|
*
|
||||||
* Returns: a string containing a description of the
|
* Returns: a string containing a description of the
|
||||||
* application @appinfo, or %NULL if none. The returned string should be not freed
|
* application @appinfo, or %NULL if none.
|
||||||
* when no longer needed.
|
|
||||||
**/
|
**/
|
||||||
const char *
|
const char *
|
||||||
g_app_info_get_description (GAppInfo *appinfo)
|
g_app_info_get_description (GAppInfo *appinfo)
|
||||||
|
@ -921,9 +921,9 @@ g_desktop_app_info_supports_uris (GAppInfo *appinfo)
|
|||||||
{
|
{
|
||||||
GDesktopAppInfo *info = G_DESKTOP_APP_INFO (appinfo);
|
GDesktopAppInfo *info = G_DESKTOP_APP_INFO (appinfo);
|
||||||
|
|
||||||
return
|
return info->exec &&
|
||||||
(strstr (info->exec, "%u") != NULL) ||
|
((strstr (info->exec, "%u") != NULL) ||
|
||||||
(strstr (info->exec, "%U") != NULL);
|
(strstr (info->exec, "%U") != NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
@ -1581,7 +1581,8 @@ g_app_info_get_default_for_type (const char *content_type,
|
|||||||
* g_app_info_get_default_for_uri_scheme:
|
* g_app_info_get_default_for_uri_scheme:
|
||||||
* @uri_scheme: a string containing a URI scheme.
|
* @uri_scheme: a string containing a URI scheme.
|
||||||
*
|
*
|
||||||
* Gets the default application for launching applications using this URI scheme.
|
* Gets the default application for launching applications
|
||||||
|
* using this URI scheme.
|
||||||
*
|
*
|
||||||
* TODO: This is currently unimplemented.
|
* TODO: This is currently unimplemented.
|
||||||
*
|
*
|
||||||
@ -1625,11 +1626,12 @@ get_apps_from_dir (GHashTable *apps,
|
|||||||
|
|
||||||
/* Don't return apps that don't take arguments */
|
/* Don't return apps that don't take arguments */
|
||||||
if (appinfo &&
|
if (appinfo &&
|
||||||
g_desktop_app_info_get_is_hidden (appinfo) &&
|
(g_desktop_app_info_get_is_hidden (appinfo) ||
|
||||||
|
(appinfo->exec &&
|
||||||
strstr (appinfo->exec,"%U") == NULL &&
|
strstr (appinfo->exec,"%U") == NULL &&
|
||||||
strstr (appinfo->exec,"%u") == NULL &&
|
strstr (appinfo->exec,"%u") == NULL &&
|
||||||
strstr (appinfo->exec,"%f") == NULL &&
|
strstr (appinfo->exec,"%f") == NULL &&
|
||||||
strstr (appinfo->exec,"%F") == NULL)
|
strstr (appinfo->exec,"%F") == NULL)))
|
||||||
{
|
{
|
||||||
g_object_unref (appinfo);
|
g_object_unref (appinfo);
|
||||||
appinfo = NULL;
|
appinfo = NULL;
|
||||||
@ -1679,7 +1681,7 @@ g_app_info_get_all (void)
|
|||||||
const char * const *dirs;
|
const char * const *dirs;
|
||||||
GHashTable *apps;
|
GHashTable *apps;
|
||||||
GHashTableIter iter;
|
GHashTableIter iter;
|
||||||
gpointer key;
|
gpointer value;
|
||||||
int i;
|
int i;
|
||||||
GList *infos;
|
GList *infos;
|
||||||
|
|
||||||
@ -1695,8 +1697,8 @@ g_app_info_get_all (void)
|
|||||||
|
|
||||||
infos = NULL;
|
infos = NULL;
|
||||||
g_hash_table_iter_init (&iter, apps);
|
g_hash_table_iter_init (&iter, apps);
|
||||||
while (g_hash_table_iter_next (&iter, &key, NULL))
|
while (g_hash_table_iter_next (&iter, NULL, &value))
|
||||||
infos = g_list_prepend (infos, key);
|
infos = g_list_prepend (infos, value);
|
||||||
|
|
||||||
g_hash_table_destroy (apps);
|
g_hash_table_destroy (apps);
|
||||||
|
|
||||||
@ -2142,13 +2144,13 @@ append_desktop_entry (GList *list,
|
|||||||
* get_all_desktop_entries_for_mime_type:
|
* get_all_desktop_entries_for_mime_type:
|
||||||
* @mime_type: a mime type.
|
* @mime_type: a mime type.
|
||||||
*
|
*
|
||||||
* Returns all the desktop filenames for @mime_type. The desktop files
|
* Returns all the desktop ids for @mime_type. The desktop files
|
||||||
* are listed in an order so that default applications are listed before
|
* are listed in an order so that default applications are listed before
|
||||||
* non-default ones, and handlers for inherited mimetypes are listed
|
* non-default ones, and handlers for inherited mimetypes are listed
|
||||||
* after the base ones.
|
* after the base ones.
|
||||||
*
|
*
|
||||||
* Return value: a #GList containing the desktop filenames containing the
|
* Return value: a #GList containing the desktop ids which claim
|
||||||
* @mime_type.
|
* to handle @mime_type.
|
||||||
*/
|
*/
|
||||||
static GList *
|
static GList *
|
||||||
get_all_desktop_entries_for_mime_type (const char *base_mime_type)
|
get_all_desktop_entries_for_mime_type (const char *base_mime_type)
|
||||||
|
Loading…
Reference in New Issue
Block a user