glib r6418 - trunk/gio



Author: alexl
Date: Tue Jan 29 15:47:27 2008
New Revision: 6418
URL: http://svn.gnome.org/viewvc/glib?rev=6418&view=rev

Log:
2008-01-29  Alexander Larsson  <alexl redhat com>

        * gappinfo.h:
        * gdesktopappinfo.c:
	Add G_APP_INFO_CREATE_SUPPORTS_URIS flag



Modified:
   trunk/gio/ChangeLog
   trunk/gio/gappinfo.h
   trunk/gio/gdesktopappinfo.c

Modified: trunk/gio/gappinfo.h
==============================================================================
--- trunk/gio/gappinfo.h	(original)
+++ trunk/gio/gappinfo.h	Tue Jan 29 15:47:27 2008
@@ -48,12 +48,14 @@
  * 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;

Modified: trunk/gio/gdesktopappinfo.c
==============================================================================
--- trunk/gio/gdesktopappinfo.c	(original)
+++ trunk/gio/gdesktopappinfo.c	Tue Jan 29 15:47:27 2008
@@ -1508,7 +1508,10 @@
   info->terminal = flags & G_APP_INFO_CREATE_NEEDS_TERMINAL;
   info->startup_notify = FALSE;
   info->hidden = FALSE;
-  info->exec = g_strconcat (commandline, " %f", NULL);
+  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;
   info->binary = binary_from_exec (info->exec);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]