Re: Please test this apps-menu.jl fix



Can someone try this patch of apps-menu.jl? This is the same as I sent
on 6 apr, and it is against the latest git. Chris?

If it doesn't cause error, it's ok. It's a fix against that some files
are ignored, so you may not see any difference. You can see the
difference by running:
$ sawfish-client -e apps-menu

If it's ok, I'll write the ChangeLog and the news item.

Thanks in advance,
Teika (Teika kazura)
diff --git a/lisp/sawfish/wm/ext/apps-menu.jl b/lisp/sawfish/wm/ext/apps-menu.jl
index 19e1e8f..f731da9 100644
--- a/lisp/sawfish/wm/ext/apps-menu.jl
+++ b/lisp/sawfish/wm/ext/apps-menu.jl
@@ -82,17 +82,25 @@ set this to non-nil.")
 
   ;; fdo-desktop-file-parsing
 
+  (define (desktop-skip-line-p instring)
+    (or (eq (aref instring 0) ?#)
+	(eq (aref instring 0) ?\n)))
+
+  (define (check-if-desktop-stream instream)
+    (let ((line (read-line instream)))
+      (when line
+	(if (string= line "[Desktop Entry]\n")
+	    't
+	  (when (desktop-skip-line-p line)
+	    (check-if-desktop-stream instream))))))
+
   (define (desktop-file-p directory-file)
     (condition-case nil
 	(let ((this-file (open-file directory-file 'read)))
-	  (string= (read-line this-file) "[Desktop Entry]\n"))
+	  (check-if-desktop-stream this-file))
       ;; unreadable -> return nil
       (file-error)))
 
-  (define (desktop-skip-line-p instring)
-    (or (eq (aref instring 0) ?#)
-	(eq (aref instring 0) ?\n)))
-
   (define (desktop-group-p instring)
     (eq (aref instring 0) ?\[))
 


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