mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-01 21:33:09 +02:00
Add g_app_info_get_commandline. Requested by Hans Petter Jansson.
* gio.symbols: * gappinfo.[hc]: Add g_app_info_get_commandline. Requested by Hans Petter Jansson. * gdesktopappinfo.c: And implement it here. svn path=/trunk/; revision=7706
This commit is contained in:
parent
0be828b4f8
commit
a44f5f6aaa
@ -1,9 +1,13 @@
|
|||||||
@008-11-28 Matthias Clasen <mclasen@redhat.com>
|
2008-11-28 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* gio/gio-sections.txt: Add g_app_info_get_commandline
|
||||||
|
|
||||||
|
2008-11-28 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* glib/tmpl/keyfile.sgml: Explain locale identifiers in
|
* glib/tmpl/keyfile.sgml: Explain locale identifiers in
|
||||||
more detail
|
more detail
|
||||||
|
|
||||||
@008-11-28 Matthias Clasen <mclasen@redhat.com>
|
2008-11-28 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
Bug 562549 – g_byte_array_free should tell how free data
|
Bug 562549 – g_byte_array_free should tell how free data
|
||||||
|
|
||||||
|
@ -1066,6 +1066,7 @@ g_app_info_get_id
|
|||||||
g_app_info_get_name
|
g_app_info_get_name
|
||||||
g_app_info_get_description
|
g_app_info_get_description
|
||||||
g_app_info_get_executable
|
g_app_info_get_executable
|
||||||
|
g_app_info_get_commandline
|
||||||
g_app_info_get_icon
|
g_app_info_get_icon
|
||||||
g_app_info_launch
|
g_app_info_launch
|
||||||
g_app_info_supports_files
|
g_app_info_supports_files
|
||||||
|
@ -1,3 +1,13 @@
|
|||||||
|
2008-11-28 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
Bug 555486 – No way to recover command line from GAppInfo
|
||||||
|
|
||||||
|
* gio.symbols:
|
||||||
|
* gappinfo.[hc]: Add g_app_info_get_commandline. Requested
|
||||||
|
by Hans Petter Jansson.
|
||||||
|
|
||||||
|
* gdesktopappinfo.c: And implement it here.
|
||||||
|
|
||||||
2008-11-28 Christian Dywan <christian@imendio.com>
|
2008-11-28 Christian Dywan <christian@imendio.com>
|
||||||
|
|
||||||
* gappinfo.c: Fix a typo, s/detext/detect. Patch by Enrico Tröger.
|
* gappinfo.c: Fix a typo, s/detext/detect. Patch by Enrico Tröger.
|
||||||
|
@ -249,12 +249,12 @@ g_app_info_get_description (GAppInfo *appinfo)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* g_app_info_get_executable:
|
* g_app_info_get_executable:
|
||||||
* @appinfo: a #GAppInfo.
|
* @appinfo: a #GAppInfo
|
||||||
*
|
*
|
||||||
* Gets the executable's name for the installed application.
|
* Gets the executable's name for the installed application.
|
||||||
*
|
*
|
||||||
* Returns: a string containing the @appinfo's application
|
* Returns: a string containing the @appinfo's application
|
||||||
* binary's name.
|
* binary's name
|
||||||
**/
|
**/
|
||||||
const char *
|
const char *
|
||||||
g_app_info_get_executable (GAppInfo *appinfo)
|
g_app_info_get_executable (GAppInfo *appinfo)
|
||||||
@ -269,6 +269,33 @@ g_app_info_get_executable (GAppInfo *appinfo)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* g_app_info_get_commandline:
|
||||||
|
* @appinfo: a #GAppInfo
|
||||||
|
*
|
||||||
|
* Gets the commandline with which the application will be
|
||||||
|
* started.
|
||||||
|
*
|
||||||
|
* Returns: a string containing the @appinfo's commandline,
|
||||||
|
* or %NULL if this information is not available
|
||||||
|
*
|
||||||
|
* Since: 2.20
|
||||||
|
**/
|
||||||
|
const char *
|
||||||
|
g_app_info_get_commandline (GAppInfo *appinfo)
|
||||||
|
{
|
||||||
|
GAppInfoIface *iface;
|
||||||
|
|
||||||
|
g_return_val_if_fail (G_IS_APP_INFO (appinfo), NULL);
|
||||||
|
|
||||||
|
iface = G_APP_INFO_GET_IFACE (appinfo);
|
||||||
|
|
||||||
|
if (iface->get_commandline)
|
||||||
|
return (* iface->get_commandline) (appinfo);
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* g_app_info_set_as_default_for_type:
|
* g_app_info_set_as_default_for_type:
|
||||||
* @appinfo: a #GAppInfo.
|
* @appinfo: a #GAppInfo.
|
||||||
|
@ -124,6 +124,7 @@ struct _GAppInfoIface
|
|||||||
GError **error);
|
GError **error);
|
||||||
gboolean (* can_delete) (GAppInfo *appinfo);
|
gboolean (* can_delete) (GAppInfo *appinfo);
|
||||||
gboolean (* do_delete) (GAppInfo *appinfo);
|
gboolean (* do_delete) (GAppInfo *appinfo);
|
||||||
|
const char * (* get_commandline) (GAppInfo *appinfo);
|
||||||
};
|
};
|
||||||
|
|
||||||
GType g_app_info_get_type (void) G_GNUC_CONST;
|
GType g_app_info_get_type (void) G_GNUC_CONST;
|
||||||
@ -138,6 +139,7 @@ const char *g_app_info_get_id (GAppInfo *appin
|
|||||||
const char *g_app_info_get_name (GAppInfo *appinfo);
|
const char *g_app_info_get_name (GAppInfo *appinfo);
|
||||||
const char *g_app_info_get_description (GAppInfo *appinfo);
|
const char *g_app_info_get_description (GAppInfo *appinfo);
|
||||||
const char *g_app_info_get_executable (GAppInfo *appinfo);
|
const char *g_app_info_get_executable (GAppInfo *appinfo);
|
||||||
|
const char *g_app_info_get_commandline (GAppInfo *appinfo);
|
||||||
GIcon * g_app_info_get_icon (GAppInfo *appinfo);
|
GIcon * g_app_info_get_icon (GAppInfo *appinfo);
|
||||||
gboolean g_app_info_launch (GAppInfo *appinfo,
|
gboolean g_app_info_launch (GAppInfo *appinfo,
|
||||||
GList *files,
|
GList *files,
|
||||||
|
@ -479,6 +479,14 @@ g_desktop_app_info_get_executable (GAppInfo *appinfo)
|
|||||||
return info->binary;
|
return info->binary;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const char *
|
||||||
|
g_desktop_app_info_get_commandline (GAppInfo *appinfo)
|
||||||
|
{
|
||||||
|
GDesktopAppInfo *info = G_DESKTOP_APP_INFO (appinfo);
|
||||||
|
|
||||||
|
return info->exec;
|
||||||
|
}
|
||||||
|
|
||||||
static GIcon *
|
static GIcon *
|
||||||
g_desktop_app_info_get_icon (GAppInfo *appinfo)
|
g_desktop_app_info_get_icon (GAppInfo *appinfo)
|
||||||
{
|
{
|
||||||
@ -1745,6 +1753,7 @@ g_desktop_app_info_iface_init (GAppInfoIface *iface)
|
|||||||
iface->remove_supports_type = g_desktop_app_info_remove_supports_type;
|
iface->remove_supports_type = g_desktop_app_info_remove_supports_type;
|
||||||
iface->can_delete = g_desktop_app_info_can_delete;
|
iface->can_delete = g_desktop_app_info_can_delete;
|
||||||
iface->do_delete = g_desktop_app_info_delete;
|
iface->do_delete = g_desktop_app_info_delete;
|
||||||
|
iface->get_commandline = g_desktop_app_info_get_commandline;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
@ -36,6 +36,7 @@ g_app_info_get_id
|
|||||||
g_app_info_get_name
|
g_app_info_get_name
|
||||||
g_app_info_get_description
|
g_app_info_get_description
|
||||||
g_app_info_get_executable
|
g_app_info_get_executable
|
||||||
|
g_app_info_get_commandline
|
||||||
g_app_info_get_icon
|
g_app_info_get_icon
|
||||||
g_app_info_launch
|
g_app_info_launch
|
||||||
g_app_info_supports_uris
|
g_app_info_supports_uris
|
||||||
|
Loading…
x
Reference in New Issue
Block a user