[rep-gtk: 8/12] Fix gtk-canonical-name for classes containing upcase tokens



commit 040939f34fc3306b865a02154207a22ba71ff46d
Author: Juergen Hoetzel <juergen archlinux org>
Date:   Fri Aug 28 13:12:13 2009 +0200

    Fix gtk-canonical-name for classes containing upcase tokens
    
    Map GtkUIManager to gtk_ui_manager instead of gtk_uimanager.

 build-gtk.jl |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/build-gtk.jl b/build-gtk.jl
index 768ab7e..668f662 100644
--- a/build-gtk.jl
+++ b/build-gtk.jl
@@ -1212,6 +1212,12 @@
   (let
       ((out nil)
        (point 0))
+
+    ;; Some Classes (GtkUIManager) contain Upcase Tokens: UI
+    (while (string-match "[A-Z]([A-Z]+)[A-Z]" name)
+      (let ((upcase-token (substring name (match-start 1) (match-end 1))))
+	(setq name (string-replace upcase-token (string-downcase upcase-token) name))))
+
     (while (string-match "[A-Z]+" name point)
       (setq out (cons (substring name point (match-start)) out))
       (unless (zerop point)



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