mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 23:16:14 +01:00
Add G_APP_INFO_CREATE_SUPPORTS_URIS flag
2008-01-29 Alexander Larsson <alexl@redhat.com> * gappinfo.h: * gdesktopappinfo.c: Add G_APP_INFO_CREATE_SUPPORTS_URIS flag svn path=/trunk/; revision=6418
This commit is contained in:
parent
98102273d9
commit
6ff29c1dea
@ -1,3 +1,9 @@
|
||||
2008-01-29 Alexander Larsson <alexl@redhat.com>
|
||||
|
||||
* gappinfo.h:
|
||||
* gdesktopappinfo.c:
|
||||
Add G_APP_INFO_CREATE_SUPPORTS_URIS flag
|
||||
|
||||
2008-01-29 Alexander Larsson <alexl@redhat.com>
|
||||
|
||||
* gdesktopappinfo.c:
|
||||
|
@ -48,12 +48,14 @@ G_BEGIN_DECLS
|
||||
* GAppInfoCreateFlags:
|
||||
* @G_APP_INFO_CREATE_NONE: No flags.
|
||||
* @G_APP_INFO_CREATE_NEEDS_TERMINAL: Application opens in a terminal window.
|
||||
* @G_APP_INFO_CREATE_SUPPORTS_URIS: Application supports URI arguments.
|
||||
*
|
||||
* Flags used when creating a #GAppInfo.
|
||||
*/
|
||||
typedef enum {
|
||||
G_APP_INFO_CREATE_NONE = 0, /*< nick=none >*/
|
||||
G_APP_INFO_CREATE_NEEDS_TERMINAL = (1<<0) /*< nick=needs-terminal >*/
|
||||
G_APP_INFO_CREATE_NEEDS_TERMINAL = (1<<0), /*< nick=needs-terminal >*/
|
||||
G_APP_INFO_CREATE_SUPPORTS_URIS = (1<<1) /*< nick=supports-uris >*/
|
||||
} GAppInfoCreateFlags;
|
||||
|
||||
typedef struct _GAppLaunchContext GAppLaunchContext;
|
||||
|
@ -1508,6 +1508,9 @@ g_app_info_create_from_commandline (const char *commandline,
|
||||
info->terminal = flags & G_APP_INFO_CREATE_NEEDS_TERMINAL;
|
||||
info->startup_notify = FALSE;
|
||||
info->hidden = FALSE;
|
||||
if (flags & G_APP_INFO_CREATE_SUPPORTS_URIS)
|
||||
info->exec = g_strconcat (commandline, " %u", NULL);
|
||||
else
|
||||
info->exec = g_strconcat (commandline, " %f", NULL);
|
||||
info->comment = g_strdup_printf (_("Custom definition for %s"), info->name);
|
||||
info->nodisplay = TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user