Add a GAppInfoCreate flag for startup-notification
authorMatthias Clasen <mclasen@redhat.com>
Sat, 10 Jul 2010 21:57:45 +0000 (17:57 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 10 Jul 2010 21:57:45 +0000 (17:57 -0400)
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
gio/gioenums.h

index dd5fbae..8aa8738 100644 (file)
@@ -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);
index feb5d03..3c761f3 100644 (file)
@@ -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;
 
 /**