Re: apps-menu patch [Re: New tab themes]

Christopher Roy Bratusek <nano tuxfamily org> writes:

>> >
>> Ok, got this fixed, thanks for sending the desktop files.  Attached
>> patch fixes this bug you found and adds 'ScreenLets' to the 'Desktop'
>> category, so will show up in the apps-menu now, unless otherwise
>> discarded.
>> Cheers
> Hmm.. actually screenlet's .desktop files are only meant for session-managers 
> for autostarting screenlets, those .desktop should never pop-up in a menu nor 
> should they reside in $HOME/.local/share/applications or 
> /usr/share/applications, they should be in $HOME/.config/autostart.
> ... hmm. I doubt on letting them pop-up. I would supress them.
> Dunno.
> Either way I'll commit your patch to fix the issue.
> As always: thanks for spending your freetime on improving Sawfish!
> Chris

Yes, I think you are right, attached is the same patch with the bugfix but
without adding screenlets into the menu...Thanks for the info!



diff --git a/lisp/sawfish/wm/ext/apps-menu.jl b/lisp/sawfish/wm/ext/apps-menu.jl
index 0c4b4d0..4a96a6d 100644
--- a/lisp/sawfish/wm/ext/apps-menu.jl
+++ b/lisp/sawfish/wm/ext/apps-menu.jl
@@ -507,13 +507,15 @@ If `display-test' is not defined, will return the input desktop-file-list."
     "Split a desktop entry into several entries, each containing one
 of the categories of the original."
     (when fdol
-      (let ((new-fdol fdol))
-	(let loop ((categories
-		    (delete "" (string-split ";" (cdr (assoc "Categories" fdol))))))
-	     (when categories
-	       (append (list 
-			(append new-fdol (list (cons "Category" (car categories)))))
-		       (loop (cdr categories))))))))
+      (let ((new-fdol fdol)
+	    (category-string (cdr (assoc "Categories" fdol))))
+	(when (stringp category-string)
+	  (let loop ((categories
+		      (delete "" (string-split ";" category-string))))
+	       (when categories
+		 (append (list 
+			  (append new-fdol (list (cons "Category" (car categories)))))
+			 (loop (cdr categories)))))))))
   ;; Sawfish-menu generation

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