• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No 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

修订版3d24e2a45c345dcb4c8871b7bc46a3658d915791 (tree)
时间2010-11-17 20:55:57
作者Michal Maruska <mmaruska@gmai...>
CommiterMichal Maruska

Log Message

Atoms for Selection + enum

更改概述

差异

--- a/src/display.c
+++ b/src/display.c
@@ -279,6 +279,22 @@ choose_visual (void)
279279 }
280280 }
281281
282+/* For handling selection I need these atoms: */
283+const char *const xa_names[NUM_XA] = {
284+ "COMPOUND_TEXT",
285+ "MULTIPLE",
286+ "TARGETS",
287+ "TEXT",
288+ "TIMESTAMP",
289+ "VT_SELECTION",
290+ "INCR",
291+ "WM_DELETE_WINDOW",
292+ "DndProtocol",
293+ "DndSelection",
294+ "CLIPBOARD"
295+};
296+Atom xatoms[NUM_XA];
297+
282298 /* Called from main(). */
283299 bool
284300 sys_init(char *program_name)
@@ -335,7 +351,13 @@ sys_init(char *program_name)
335351 xa_wm_net_name = XInternAtom (dpy, "_NET_WM_NAME", False);
336352 xa_wm_net_icon_name = XInternAtom (dpy, "_NET_WM_ICON_NAME", False);
337353 xa_utf8_string = XInternAtom (dpy, "UTF8_STRING", False);
338-
354+ /* Get atoms for the selection */
355+ {
356+ int i;
357+ /* fixme: COMPOUND_TEXT is repeated ^^^^ */
358+ for (i = 0; i < NUM_XA; i++)
359+ xatoms[i] = XInternAtom(dpy, xa_names[i], False);
360+ }
339361 if (!XShapeQueryExtension (dpy, &shape_event_base,
340362 &shape_error_base))
341363 {
--- a/src/sawfish.h
+++ b/src/sawfish.h
@@ -64,6 +64,23 @@ typedef int bool;
6464
6565 /* #define DEBUG 1 */
6666
67+/* mmc: indexes to an array with Atoms. Should be extended to cover all used atoms, imho.
68+ * used in selection.c */
69+enum {
70+ XA_COMPOUND_TEXT = 0,
71+ XA_MULTIPLE,
72+ XA_TARGETS,
73+ XA_TEXT,
74+ XA_TIMESTAMP,
75+ XA_VT_SELECTION,
76+ XA_INCR,
77+ XA_WMDELETEWINDOW,
78+ XA_DNDPROTOCOL,
79+ XA_DNDSELECTION,
80+ XA_CLIPBOARD,
81+ NUM_XA
82+};
83+
6784 /* Event masks */
6885
6986 /* Events selected on client windows */