[glib] Add a GAppInfoCreate flag for startup-notification
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Add a GAppInfoCreate flag for startup-notification
- Date: Sat, 10 Jul 2010 22:00:21 +0000 (UTC)
commit f8e22856c643bfccaf03db6f84738126cff374d0
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Jul 10 17:57:45 2010 -0400
Add a GAppInfoCreate flag for startup-notification
Using this flag, it will be possible to launch apps without a
desktop file, in the same way that gdk_spawn_... lets you do.
Requested in bug 599223.
gio/gdesktopappinfo.c | 2 +-
gio/gioenums.h | 8 +++++---
2 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
index dd5fbae..8aa8738 100644
--- a/gio/gdesktopappinfo.c
+++ b/gio/gdesktopappinfo.c
@@ -1655,7 +1655,7 @@ g_app_info_create_from_commandline (const char *commandline,
info->desktop_id = NULL;
info->terminal = flags & G_APP_INFO_CREATE_NEEDS_TERMINAL;
- info->startup_notify = FALSE;
+ info->startup_notify = flags & G_APP_INFO_CREATE_SUPPORTS_STARTUP_NOTIFICATION;
info->hidden = FALSE;
if (flags & G_APP_INFO_CREATE_SUPPORTS_URIS)
info->exec = g_strconcat (commandline, " %u", NULL);
diff --git a/gio/gioenums.h b/gio/gioenums.h
index feb5d03..3c761f3 100644
--- a/gio/gioenums.h
+++ b/gio/gioenums.h
@@ -37,13 +37,15 @@ G_BEGIN_DECLS
* @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.
+ * @G_APP_INFO_CREATE_SUPPORTS_STARTUP_NOTIFICATION: Application supports startup notification. Since 2.26
*
* 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_SUPPORTS_URIS = (1 << 1) /*< nick=supports-uris >*/
+ G_APP_INFO_CREATE_NONE = 0, /*< nick=none >*/
+ G_APP_INFO_CREATE_NEEDS_TERMINAL = (1 << 0), /*< nick=needs-terminal >*/
+ G_APP_INFO_CREATE_SUPPORTS_URIS = (1 << 1), /*< nick=supports-uris >*/
+ G_APP_INFO_CREATE_SUPPORTS_STARTUP_NOTIFICATION = (1 << 2) /*< nick=supports-startup-notification >*/
} GAppInfoCreateFlags;
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]