Author: benny
Date: 2006-07-21 08:57:44 +0000 (Fri, 21 Jul 2006)
New Revision: 22503

Modified:
   thunar/trunk/ChangeLog
   thunar/trunk/thunar-vfs/thunar-vfs-mime-application.c
   thunar/trunk/thunar-vfs/thunar-vfs-mime-handler.h
Log:
2006-07-21      Benedikt Meurer <[EMAIL PROTECTED]>

        * thunar-vfs/thunar-vfs-mime-handler.h(ThunarVfsMimeHandlerFlags): Add
          THUNAR_VFS_MIME_HANDLER_SUPPORTS_URIS to indicate that the handler
          supports URIs.
        * thunar-vfs/thunar-vfs-mime-application.c
          (thunar_vfs_mime_application_new_from_file): Test whether the
          application launcher and the associated desktop actions support
          URIs.




Modified: thunar/trunk/ChangeLog
===================================================================
--- thunar/trunk/ChangeLog      2006-07-21 04:06:39 UTC (rev 22502)
+++ thunar/trunk/ChangeLog      2006-07-21 08:57:44 UTC (rev 22503)
@@ -1,3 +1,13 @@
+2006-07-21     Benedikt Meurer <[EMAIL PROTECTED]>
+
+       * thunar-vfs/thunar-vfs-mime-handler.h(ThunarVfsMimeHandlerFlags): Add
+         THUNAR_VFS_MIME_HANDLER_SUPPORTS_URIS to indicate that the handler
+         supports URIs.
+       * thunar-vfs/thunar-vfs-mime-application.c
+         (thunar_vfs_mime_application_new_from_file): Test whether the
+         application launcher and the associated desktop actions support
+         URIs.
+
 2006-07-14     Benedikt Meurer <[EMAIL PROTECTED]>
 
        * plugins/thunar-apr/thunar-apr-image-page.c: Add ISO Speed Ratings

Modified: thunar/trunk/thunar-vfs/thunar-vfs-mime-application.c
===================================================================
--- thunar/trunk/thunar-vfs/thunar-vfs-mime-application.c       2006-07-21 
04:06:39 UTC (rev 22502)
+++ thunar/trunk/thunar-vfs/thunar-vfs-mime-application.c       2006-07-21 
08:57:44 UTC (rev 22503)
@@ -266,6 +266,8 @@
         flags |= THUNAR_VFS_MIME_HANDLER_SUPPORTS_STARTUP_NOTIFY;
       if ((strstr (command, "%F") != NULL) || (strstr (command, "%U") != NULL))
         flags |= THUNAR_VFS_MIME_HANDLER_SUPPORTS_MULTI;
+      if ((strstr (command, "%u") != NULL) || (strstr (command, "%U") != NULL))
+        flags |= THUNAR_VFS_MIME_HANDLER_SUPPORTS_URIS;
 
       /* allocate a new application instance */
       application = g_object_new (THUNAR_VFS_TYPE_MIME_APPLICATION, "command", 
command, "flags", flags, "icon", icon, "name", name, NULL);
@@ -324,6 +326,12 @@
                       else
                         flags &= ~THUNAR_VFS_MIME_HANDLER_SUPPORTS_MULTI;
 
+                      /* check if the actions support URIs */
+                      if ((strstr (exec, "%u") != NULL) || (strstr (exec, 
"%U") != NULL))
+                        flags |= THUNAR_VFS_MIME_HANDLER_SUPPORTS_URIS;
+                      else
+                        flags &= ~THUNAR_VFS_MIME_HANDLER_SUPPORTS_URIS;
+
                       /* don't trust application maintainers! :-) */
                       flags &= 
~THUNAR_VFS_MIME_HANDLER_SUPPORTS_STARTUP_NOTIFY;
 

Modified: thunar/trunk/thunar-vfs/thunar-vfs-mime-handler.h
===================================================================
--- thunar/trunk/thunar-vfs/thunar-vfs-mime-handler.h   2006-07-21 04:06:39 UTC 
(rev 22502)
+++ thunar/trunk/thunar-vfs/thunar-vfs-mime-handler.h   2006-07-21 08:57:44 UTC 
(rev 22503)
@@ -45,6 +45,7 @@
  * @THUNAR_VFS_MIME_HANDLER_REQUIRES_TERMINAL       : the handler must be run 
in a terminal.
  * @THUNAR_VFS_MIME_HANDLER_SUPPORTS_STARTUP_NOTIFY : the handler supports 
startup notification.
  * @THUNAR_VFS_MIME_HANDLER_SUPPORTS_MULTI          : the handler supports 
opening multiple documents at once (%F or %U).
+ * @THUNAR_VFS_MIME_HANDLER_SUPPORTS_URIS           : the handler supports 
opening URIs (%u or %U).
  *
  * Various flags associated with a #ThunarVfsMimeHandler.
  **/
@@ -54,6 +55,7 @@
   THUNAR_VFS_MIME_HANDLER_REQUIRES_TERMINAL       = (1 << 1L),
   THUNAR_VFS_MIME_HANDLER_SUPPORTS_STARTUP_NOTIFY = (1 << 2L),
   THUNAR_VFS_MIME_HANDLER_SUPPORTS_MULTI          = (1 << 3L),
+  THUNAR_VFS_MIME_HANDLER_SUPPORTS_URIS           = (1 << 4L),
 } ThunarVfsMimeHandlerFlags;
 
 GType                     thunar_vfs_mime_handler_get_type          (void) 
G_GNUC_CONST;

_______________________________________________
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to