glib r7914 - trunk/gio



Author: alexl
Date: Thu Feb 26 14:59:16 2009
New Revision: 7914
URL: http://svn.gnome.org/viewvc/glib?rev=7914&view=rev

Log:
2009-02-26  Alexander Larsson  <alexl redhat com>

	* gdesktopappinfo.c:
	Support desktop file key X-GIO-NoFuse which disables
	use of fuse pathnames for %u and %U arguments.




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

Modified: trunk/gio/gdesktopappinfo.c
==============================================================================
--- trunk/gio/gdesktopappinfo.c	(original)
+++ trunk/gio/gdesktopappinfo.c	Thu Feb 26 14:59:16 2009
@@ -98,6 +98,7 @@
   guint hidden          : 1;
   guint terminal        : 1;
   guint startup_notify  : 1;
+  guint no_fuse         : 1;
   /* FIXME: what about StartupWMClass ? */
 };
 
@@ -256,6 +257,7 @@
   info->path = g_key_file_get_string (key_file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_PATH, NULL);
   info->terminal = g_key_file_get_boolean (key_file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_TERMINAL, NULL) != FALSE;
   info->startup_notify = g_key_file_get_boolean (key_file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY, NULL) != FALSE;
+  info->no_fuse = g_key_file_get_boolean (key_file, G_KEY_FILE_DESKTOP_GROUP, "X-GIO-NoFuse", NULL) != FALSE;
   info->hidden = g_key_file_get_boolean (key_file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_HIDDEN, NULL) != FALSE;
   
   info->icon = NULL;
@@ -573,20 +575,23 @@
    * running or the URI doesn't have a POSIX file path via FUSE
    * we'll just pass the URI.
    */
-  switch (macro)
-    {
-    case 'u':
-      force_file_uri_macro = 'f';
-      force_file_uri = TRUE;
-      break;
-    case 'U':
-      force_file_uri_macro = 'F';
-      force_file_uri = TRUE;
-      break;
-    default:
-      force_file_uri_macro = macro;
-      force_file_uri = FALSE;
-      break;
+  force_file_uri_macro = macro;
+  force_file_uri = FALSE;
+  if (!info->no_fuse)
+    {
+      switch (macro)
+	{
+	case 'u':
+	  force_file_uri_macro = 'f';
+	  force_file_uri = TRUE;
+	  break;
+	case 'U':
+	  force_file_uri_macro = 'F';
+	  force_file_uri = TRUE;
+	  break;
+	default:
+	  break;
+	}
     }
 
   switch (macro)



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