[sawfish] fix alphabetizing menu-entries



commit 2f82edded2348eeef9a3378a139d72788635eb16
Author: Christopher Roy Bratusek <zanghar freenet de>
Date:   Thu Aug 19 17:25:30 2010 +0200

    fix alphabetizing menu-entries

 ChangeLog                        |    5 +++++
 lisp/sawfish/wm/ext/apps-menu.jl |    4 +++-
 man/news.texi                    |    9 ++++++++-
 3 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 51dde5b..c9bd3ed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-08-19  Christopher Bratusek <zanghar freenet de>
+	* lisp/sawfish/wm/ext/apps-menu.jl: correctly alphabetize menu-entries.
+	Previously they were sorted [A-Z][a-z] (first all upper- then all loser-case
+	entries), now it's done properly [aA-zZ]. [Matthew Love]
+
 2010-08-18  Christopher Bratusek <zanghar freenet de>
 	* src/x.c
 	* lisp/sawfish/wm/util/window-outline.jl: added x-draw-text function for properly
diff --git a/lisp/sawfish/wm/ext/apps-menu.jl b/lisp/sawfish/wm/ext/apps-menu.jl
index f731da9..4aeaec0 100644
--- a/lisp/sawfish/wm/ext/apps-menu.jl
+++ b/lisp/sawfish/wm/ext/apps-menu.jl
@@ -276,7 +276,9 @@ set this to non-nil.")
   (define (alphabetize-entries saw-menu)
     (if saw-menu
 	(cons (cons (car (car saw-menu))
-		    (sort (cdr (car saw-menu)) string<))
+		    (sort (cdr (car saw-menu)) 
+			  (lambda (a b) 
+			    (string< (string-downcase (car a)) (string-downcase (car b))))))
 	      (alphabetize-entries (cdr saw-menu)))))
 
   (define (fdo-exile fdo-list)
diff --git a/man/news.texi b/man/news.texi
index f848c01..51df0e3 100644
--- a/man/news.texi
+++ b/man/news.texi
@@ -18,7 +18,7 @@ they occurred between. For more detailed information see the
 
 @item librep 0.90.5 -> 0.90.7
 @end itemize
- item Notices
+ item Notes
 @itemize @minus
 
 @item Prompt API change [Jeremy Hankins]
@@ -79,12 +79,18 @@ Function @code{x-atom-name} now accepts all 32 bits. Previously only
 @item The following two variables are no longer declared obsolete:@*
 @code{workspace-boundary-mode} and @code{workspace-send-boundary-mode}.
 
+ item Apps-Menu bugfix [Matthew Love]
+
+correctly alphabetize menu-entries, previously they were sorted [A-Z][a-z]
+(first all upper- then all loser-case entries). Now it's done properly [aA-zZ].
+
 @item Edge-Flip now still works after resolution-change. [Christopher Bratusek]
 
 @item Sawfish now starts up correctly when receiving a session-id or
 session-prefix from GNOME-Session [Christopher Bratusek]
 
 @item Draft Animator bugfix. [Christopher Bratusek]
+
 The draft animator had two issues, on one hand the numbers drawn by it
 where always black (therefore possibly invisible), on the other hand those
 numbers weren't erased from the screen (unless you used a desktop-shell
@@ -104,6 +110,7 @@ A ``border'' of a window surrounds the window and all other frame
 parts. (@pxref{Frame Part Definition})
 
 @item @code{x-draw-text} function [Christopher Bratusek]
+
 This function is a replacement for @code{x-draw-string} currently
 only used in the draft-animator (to fix it's bugs). Generally, if
 you use a @code{display-message} like message, rely on @code{x-draw-string},



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