diff lisp/x-scrollbar.el @ 282:c42ec1d1cded r21-0b39

Import from CVS: tag r21-0b39
author cvs
date Mon, 13 Aug 2007 10:33:18 +0200
parents 7df0dd720c89
children 57709be46d1b
line wrap: on
line diff
--- a/lisp/x-scrollbar.el	Mon Aug 13 10:32:23 2007 +0200
+++ b/lisp/x-scrollbar.el	Mon Aug 13 10:33:18 2007 +0200
@@ -75,6 +75,30 @@
   (if (featurep 'athena-scrollbars)
       (x-init-specifier-from-resources
        (specifier-fallback scrollbar-height) 'natnum locale
-       '("scrollbar.height" . "ScrollBar.Height"))))
+       '("scrollbar.height" . "ScrollBar.Height")))
+
+  ;; Now do ScrollBarPlacement.scrollBarPlacement
+  (let ((case-fold-search t)
+	(resval (x-get-resource-and-maybe-bogosity-check
+		 "ScrollBarPlacement" "scrollBarPlacement" 'string locale)))
+    (cond
+     ((null resval))
+     ((string-match "^top_left$" resval)
+      (set-specifier scrollbar-on-top-p t locale)
+      (set-specifier scrollbar-on-left-p t locale))
+     ((string-match "^top_right$" resval)
+      (set-specifier scrollbar-on-top-p t locale)
+      (set-specifier scrollbar-on-left-p nil locale))
+     ((string-match "^bottom_left$" resval)
+      (set-specifier scrollbar-on-top-p nil locale)
+      (set-specifier scrollbar-on-left-p t locale))
+     ((string-match "^bottom_right$" resval)
+      (set-specifier scrollbar-on-top-p nil locale)
+      (set-specifier scrollbar-on-left-p nil locale))
+     (t
+      (display-warning 'resource
+	(format "Illegal value '%s' for scrollBarPlacement resource" resval)))))
+
+)
 
 ;;; x-scrollbar.el ends here