Japanese translation of message catalog for Sawfish Window-Manager
修订版 | 4dd6127a23319b8407ea2c3ee1d1f1c50e3bd70a (tree) |
---|---|
时间 | 2002-05-07 12:17:18 |
作者 | John Harper <jsh@src....> |
Commiter | John Harper |
merged more changes from HEAD
@@ -1,3 +1,14 @@ | ||
1 | +2002-05-06 John Harper <jsh@unfactored.org> | |
2 | + | |
3 | + * More merging from HEAD: | |
4 | + | |
5 | + 2002-04-22 John Harper <jsh@unfactored.org> | |
6 | + | |
7 | + * functions.c (Fset_x_text_property): added optional fourth arg | |
8 | + ENCODING-ATOM. To allow #67397 to be fixed | |
9 | + | |
10 | + * events.c: more focus change fallout | |
11 | + | |
1 | 12 | 2002-04-21 John Harper <jsh@unfactored.org> |
2 | 13 | |
3 | 14 | * Merged changes from HEAD: |
@@ -905,6 +905,19 @@ leave_notify (XEvent *ev) | ||
905 | 905 | static Lisp_Window *last_focused; |
906 | 906 | |
907 | 907 | static void |
908 | +report_focus_change (Lisp_Window *w) | |
909 | +{ | |
910 | + if (w != 0 | |
911 | + && w->focus_change != 0 | |
912 | + && !WINDOW_IS_GONE_P (w)) | |
913 | + { | |
914 | + DB ((" calling focus change %p on %s\n", | |
915 | + w->focus_change, rep_STR(w->name))); | |
916 | + w->focus_change (w); | |
917 | + } | |
918 | +} | |
919 | + | |
920 | +static void | |
908 | 921 | focus_in (XEvent *ev) |
909 | 922 | { |
910 | 923 | Lisp_Window *w = find_window_by_id (ev->xfocus.window); |
@@ -912,18 +925,16 @@ focus_in (XEvent *ev) | ||
912 | 925 | return; |
913 | 926 | if (w != 0 && w->visible) |
914 | 927 | { |
928 | + Lisp_Window *old = focus_window; | |
915 | 929 | focus_window = w; |
916 | 930 | |
917 | 931 | if (last_focused != w) |
918 | 932 | { |
919 | 933 | last_focused = w; |
934 | + if (old != 0) | |
935 | + report_focus_change (old); | |
920 | 936 | install_colormaps (w); |
921 | - if (w->focus_change != 0) | |
922 | - { | |
923 | - DB ((" calling focus change %p on %s\n", | |
924 | - w->focus_change, rep_STR(w->name))); | |
925 | - w->focus_change (w); | |
926 | - } | |
937 | + report_focus_change (w); | |
927 | 938 | if (!WINDOW_IS_GONE_P (w)) |
928 | 939 | { |
929 | 940 | Fcall_window_hook (Qfocus_in_hook, rep_VAL(w), |
@@ -945,16 +956,14 @@ focus_out (XEvent *ev) | ||
945 | 956 | if (w != 0 && ev->xfocus.detail != NotifyInferior) |
946 | 957 | { |
947 | 958 | if (focus_window == w) |
959 | + { | |
948 | 960 | focus_window = 0; |
961 | + report_focus_change (w); | |
962 | + } | |
963 | + | |
949 | 964 | if (last_focused == w) |
950 | 965 | { |
951 | 966 | last_focused = 0; |
952 | - if (w->focus_change != 0) | |
953 | - { | |
954 | - DB ((" calling focus change %p on %s\n", | |
955 | - w->focus_change, rep_STR(w->name))); | |
956 | - w->focus_change (w); | |
957 | - } | |
958 | 967 | if (!WINDOW_IS_GONE_P (w)) |
959 | 968 | { |
960 | 969 | Fcall_window_hook (Qfocus_out_hook, rep_VAL(w), |
@@ -826,13 +826,13 @@ get-x-text-property WINDOW PROPERTY | ||
826 | 826 | } |
827 | 827 | |
828 | 828 | DEFUN("set-x-text-property", Fset_x_text_property, Sset_x_text_property, |
829 | - (repv win, repv prop, repv vect), rep_Subr3) /* | |
829 | + (repv win, repv prop, repv vect, repv enc), rep_Subr4) /* | |
830 | 830 | ::doc:sawfish.wm.misc#set-x-text-prooperty:: |
831 | -set-x-text-property WINDOW PROPERTY STRING-VECTOR | |
831 | +set-x-text-property WINDOW PROPERTY STRING-VECTOR [ENCODING-ATOM] | |
832 | 832 | ::end:: */ |
833 | 833 | { |
834 | 834 | Window w; |
835 | - Atom a_prop; | |
835 | + Atom a_prop, enc_atom; | |
836 | 836 | XTextProperty t_prop; |
837 | 837 | char **strings; |
838 | 838 | int count, i; |
@@ -844,6 +844,11 @@ set-x-text-property WINDOW PROPERTY STRING-VECTOR | ||
844 | 844 | return WINDOWP(win) ? Qnil : rep_signal_arg_error (win, 1); |
845 | 845 | a_prop = XInternAtom (dpy, rep_STR(rep_SYM(prop)->name), False); |
846 | 846 | |
847 | + if (rep_SYMBOLP (enc)) | |
848 | + enc_atom = XInternAtom (dpy, rep_STR(rep_SYM(enc)->name), False); | |
849 | + else | |
850 | + enc_atom = 0; | |
851 | + | |
847 | 852 | count = rep_VECT_LEN(vect); |
848 | 853 | strings = alloca (sizeof (char *) * (count + 1)); |
849 | 854 | for (i = 0; i < count; i++) |
@@ -854,6 +859,8 @@ set-x-text-property WINDOW PROPERTY STRING-VECTOR | ||
854 | 859 | } |
855 | 860 | if (XStringListToTextProperty (strings, count, &t_prop) != 0) |
856 | 861 | { |
862 | + if (enc_atom != 0) | |
863 | + t_prop.encoding = enc_atom; | |
857 | 864 | XSetTextProperty (dpy, w, &t_prop, a_prop); |
858 | 865 | XFree (t_prop.value); |
859 | 866 | } |
@@ -176,7 +176,7 @@ extern repv Fget_x_property (repv win, repv prop); | ||
176 | 176 | extern repv Fset_x_property (repv win, repv prop, repv data, |
177 | 177 | repv type, repv format); |
178 | 178 | extern repv Fget_x_text_property (repv win, repv prop); |
179 | -extern repv Fset_x_text_property (repv win, repv prop, repv vect); | |
179 | +extern repv Fset_x_text_property (repv win, repv prop, repv vect, repv enc); | |
180 | 180 | extern repv Fsend_client_message (repv win, repv type, repv data, repv format); |
181 | 181 | extern repv Fcreate_window (repv parent, repv x, repv y, |
182 | 182 | repv width, repv height); |