Japanese translation of message catalog for Sawfish Window-Manager
Revision | 0aa4332f187565501d04c1cc3b15398d3603f2f0 (tree) |
---|---|
Zeit | 2014-09-21 03:12:28 |
Autor | Christopher Roy Bratusek <nano@jpbe...> |
Commiter | Christopher Roy Bratusek |
gaol find-frame-style and provide sane approach for late StyleTab init
@@ -1065,7 +1065,8 @@ generate.") | ||
1065 | 1065 | frame-part-get frame-part-put frame-part-window frame-part-x-window |
1066 | 1066 | frame-part-position frame-part-dimensions frame-part-state |
1067 | 1067 | 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) | |
1069 | 1070 | |
1070 | 1071 | (add-hook 'add-window-hook reframe-window t) |
1071 | 1072 | (add-hook 'shape-notify-hook reframe-window t) |
@@ -788,17 +788,20 @@ | ||
788 | 788 | (define (get-recolor-bright bright color) |
789 | 789 | (brighten-color color bright)) |
790 | 790 | |
791 | +(define start-lock 't) | |
791 | 792 | (define (do-recolor img color) |
792 | 793 | (if (and (eq styletab-c:styles 'Flat) |
793 | 794 | (not flat-buttons)) |
794 | 795 | (make-sized-image 1 1 color) |
795 | 796 | (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)) | |
802 | 805 | img))) |
803 | 806 | |
804 | 807 | (define (do-make-get-image img) |
@@ -808,7 +811,7 @@ | ||
808 | 811 | (or |
809 | 812 | (table-ref styletab-c-frame-cache img) |
810 | 813 | (let ((image |
811 | - (make-image img))) | |
814 | + (make-image (concat (find-frame-style theme-name) "/" img)))) | |
812 | 815 | (table-set styletab-c-frame-cache img image) |
813 | 816 | image)))) |
814 | 817 |
@@ -2598,7 +2601,6 @@ | ||
2598 | 2601 | (define frame nil) |
2599 | 2602 | (define button-alist nil) |
2600 | 2603 | (define current-title styletab-c:titlebar-place) |
2601 | -(define recolor-lock t) | |
2602 | 2604 | (define current-type nil) |
2603 | 2605 | |
2604 | 2606 | ;; botton list table |
@@ -2877,39 +2879,33 @@ | ||
2877 | 2879 | ;; reframe-with-style, resize bottons |
2878 | 2880 | ;; reset icon cache |
2879 | 2881 | (define (clear-icon-cache-reframe) |
2880 | - (when recolor-lock | |
2881 | - (setq recolor-lock nil) | |
2882 | + (when (not start-lock) | |
2882 | 2883 | (recolor-all-buttons) |
2883 | 2884 | (setq styletab-c-icon-cache (make-weak-table eq-hash eq)) |
2884 | 2885 | (make-buttons) |
2885 | - (reframe-with-style) | |
2886 | - (setq recolor-lock t))) | |
2886 | + (reframe-with-style))) | |
2887 | 2887 | |
2888 | 2888 | (define (color-changed) |
2889 | - (when recolor-lock | |
2890 | - (setq recolor-lock nil) | |
2889 | + (when (not start-lock) | |
2891 | 2890 | (recolor-all) |
2892 | - (reframe-with-style) | |
2893 | - (setq recolor-lock t))) | |
2891 | + (reframe-with-style))) | |
2894 | 2892 | |
2895 | 2893 | (define (bright-changed) |
2896 | - (when recolor-lock | |
2897 | - (setq recolor-lock nil) | |
2894 | + (when (not start-lock) | |
2898 | 2895 | (recolor-tab) |
2899 | 2896 | (recolor-all-buttons) |
2900 | - (reframe-with-style) | |
2901 | - (setq recolor-lock t))) | |
2897 | + (reframe-with-style))) | |
2902 | 2898 | |
2903 | 2899 | (define (botton-color-changed botton) |
2904 | - (when recolor-lock | |
2905 | - (setq recolor-lock nil) | |
2900 | + (when (not start-lock) | |
2906 | 2901 | (botton) |
2907 | - (reframe-with-style) | |
2908 | - (setq recolor-lock t))) | |
2902 | + (reframe-with-style))) | |
2909 | 2903 | |
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))) | |
2913 | 2909 | |
2914 | 2910 | (define (frame-style-name w) |
2915 | 2911 | (when (eq (window-get w 'current-frame-style) theme-name) |
@@ -2942,10 +2938,6 @@ | ||
2942 | 2938 | ((shaped-transient) |
2943 | 2939 | (make-frame w 'shaped-transient-frame current-title))))) |
2944 | 2940 | |
2945 | -;; initialize theme | |
2946 | -(require 'rep.io.timers) | |
2947 | -(make-timer (lambda () t) (quotient 1000 1000) (mod 1000 1000)) | |
2948 | - | |
2949 | 2941 | (add-frame-style theme-name get-frame) |
2950 | 2942 | |
2951 | 2943 | (call-after-state-changed '(tab-theme-name) frame-style-name) |
@@ -2954,7 +2946,7 @@ | ||
2954 | 2946 | (call-after-state-changed '(maximized sticky fixed-position fixed-size stacking) reframe-one) |
2955 | 2947 | (add-hook 'remove-from-workspace-hook reframe-one) |
2956 | 2948 | |
2957 | -(custom-set-property 'styletab-c:styles ':after-set reload-frame-style-reframe) | |
2949 | +(custom-set-property 'styletab-c:styles ':after-set build-style) | |
2958 | 2950 | (custom-set-property 'styletab-c:title-dimension ':after-set clear-icon-cache-reframe) |
2959 | 2951 | (custom-set-property 'styletab-c:custom-button-width ':after-set clear-icon-cache-reframe) |
2960 | 2952 | (custom-set-property 'styletab-c:button-width ':after-set clear-icon-cache-reframe) |
@@ -2969,5 +2961,12 @@ | ||
2969 | 2961 | (custom-set-property 'styletab-c:right-top-buttons ':after-set make-buttons-reframe-with-style) |
2970 | 2962 | (custom-set-property 'styletab-c:right-bottom-buttons ':after-set make-buttons-reframe-with-style) |
2971 | 2963 | |
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) |