• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Japanese translation of message catalog for Sawfish Window-Manager


Commit MetaInfo

Revision0aa4332f187565501d04c1cc3b15398d3603f2f0 (tree)
Zeit2014-09-21 03:12:28
AutorChristopher Roy Bratusek <nano@jpbe...>
CommiterChristopher Roy Bratusek

Log Message

gaol find-frame-style and provide sane approach for late StyleTab init

Ändern Zusammenfassung

Diff

--- a/lisp/sawfish/wm/frames.jl
+++ b/lisp/sawfish/wm/frames.jl
@@ -1065,7 +1065,8 @@ generate.")
10651065 frame-part-get frame-part-put frame-part-window frame-part-x-window
10661066 frame-part-position frame-part-dimensions frame-part-state
10671067 map-frame-parts refresh-frame-part refresh-window rebuild-frame-part
1068- reload-frame-style update-title-x-offsets update-title-y-offsets)
1068+ reload-frame-style update-title-x-offsets update-title-y-offsets
1069+ find-frame-style)
10691070
10701071 (add-hook 'add-window-hook reframe-window t)
10711072 (add-hook 'shape-notify-hook reframe-window t)
--- a/themes/StyleTab/theme.jl
+++ b/themes/StyleTab/theme.jl
@@ -788,17 +788,20 @@
788788 (define (get-recolor-bright bright color)
789789 (brighten-color color bright))
790790
791+(define start-lock 't)
791792 (define (do-recolor img color)
792793 (if (and (eq styletab-c:styles 'Flat)
793794 (not flat-buttons))
794795 (make-sized-image 1 1 color)
795796 (if (not (eq styletab-c:styles 'Flat))
796- (let ((recolorer
797- (make-image-recolorer color
798- #:zero-channel blue-channel
799- #:index-channel green-channel)))
800- (recolorer img)
801- img)
797+ (if start-lock
798+ img
799+ (let ((recolorer
800+ (make-image-recolorer color
801+ #:zero-channel blue-channel
802+ #:index-channel green-channel)))
803+ (recolorer img)
804+ img))
802805 img)))
803806
804807 (define (do-make-get-image img)
@@ -808,7 +811,7 @@
808811 (or
809812 (table-ref styletab-c-frame-cache img)
810813 (let ((image
811- (make-image img)))
814+ (make-image (concat (find-frame-style theme-name) "/" img))))
812815 (table-set styletab-c-frame-cache img image)
813816 image))))
814817
@@ -2598,7 +2601,6 @@
25982601 (define frame nil)
25992602 (define button-alist nil)
26002603 (define current-title styletab-c:titlebar-place)
2601-(define recolor-lock t)
26022604 (define current-type nil)
26032605
26042606 ;; botton list table
@@ -2877,39 +2879,33 @@
28772879 ;; reframe-with-style, resize bottons
28782880 ;; reset icon cache
28792881 (define (clear-icon-cache-reframe)
2880- (when recolor-lock
2881- (setq recolor-lock nil)
2882+ (when (not start-lock)
28822883 (recolor-all-buttons)
28832884 (setq styletab-c-icon-cache (make-weak-table eq-hash eq))
28842885 (make-buttons)
2885- (reframe-with-style)
2886- (setq recolor-lock t)))
2886+ (reframe-with-style)))
28872887
28882888 (define (color-changed)
2889- (when recolor-lock
2890- (setq recolor-lock nil)
2889+ (when (not start-lock)
28912890 (recolor-all)
2892- (reframe-with-style)
2893- (setq recolor-lock t)))
2891+ (reframe-with-style)))
28942892
28952893 (define (bright-changed)
2896- (when recolor-lock
2897- (setq recolor-lock nil)
2894+ (when (not start-lock)
28982895 (recolor-tab)
28992896 (recolor-all-buttons)
2900- (reframe-with-style)
2901- (setq recolor-lock t)))
2897+ (reframe-with-style)))
29022898
29032899 (define (botton-color-changed botton)
2904- (when recolor-lock
2905- (setq recolor-lock nil)
2900+ (when (not start-lock)
29062901 (botton)
2907- (reframe-with-style)
2908- (setq recolor-lock t)))
2902+ (reframe-with-style)))
29092903
2910-(define (reload-frame-style-reframe)
2911- (reload-frame-style theme-name)
2912- (reframe-with-style))
2904+(define (build-style)
2905+ (when (not start-lock)
2906+ (recolor-all)
2907+ (make-buttons)
2908+ (reframe-with-style)))
29132909
29142910 (define (frame-style-name w)
29152911 (when (eq (window-get w 'current-frame-style) theme-name)
@@ -2942,10 +2938,6 @@
29422938 ((shaped-transient)
29432939 (make-frame w 'shaped-transient-frame current-title)))))
29442940
2945-;; initialize theme
2946-(require 'rep.io.timers)
2947-(make-timer (lambda () t) (quotient 1000 1000) (mod 1000 1000))
2948-
29492941 (add-frame-style theme-name get-frame)
29502942
29512943 (call-after-state-changed '(tab-theme-name) frame-style-name)
@@ -2954,7 +2946,7 @@
29542946 (call-after-state-changed '(maximized sticky fixed-position fixed-size stacking) reframe-one)
29552947 (add-hook 'remove-from-workspace-hook reframe-one)
29562948
2957-(custom-set-property 'styletab-c:styles ':after-set reload-frame-style-reframe)
2949+(custom-set-property 'styletab-c:styles ':after-set build-style)
29582950 (custom-set-property 'styletab-c:title-dimension ':after-set clear-icon-cache-reframe)
29592951 (custom-set-property 'styletab-c:custom-button-width ':after-set clear-icon-cache-reframe)
29602952 (custom-set-property 'styletab-c:button-width ':after-set clear-icon-cache-reframe)
@@ -2969,5 +2961,12 @@
29692961 (custom-set-property 'styletab-c:right-top-buttons ':after-set make-buttons-reframe-with-style)
29702962 (custom-set-property 'styletab-c:right-bottom-buttons ':after-set make-buttons-reframe-with-style)
29712963
2972-(color-changed)
2973-(make-buttons)
2964+(define (timer-theme-load)
2965+ (require 'rep.io.timers)
2966+ (setq start-lock
2967+ (make-timer (lambda ()
2968+ (setq start-lock nil)
2969+ (build-style))
2970+ (quotient 10 1000) (mod 10 1000))))
2971+
2972+(timer-theme-load)