mirror of
https://github.com/gryf/wmaker.git
synced 2026-03-11 20:15:54 +01:00
Compare commits
379 Commits
release-0.
...
wmaker-0.9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba027149bd | ||
|
|
f893728d2d | ||
|
|
01dddf00c8 | ||
|
|
fe736e849c | ||
|
|
874b0fadf5 | ||
|
|
31f16389f6 | ||
|
|
2706f7217c | ||
|
|
e522ca734d | ||
|
|
3a0eb643d9 | ||
|
|
f79379c090 | ||
|
|
001bc28037 | ||
|
|
203eba8937 | ||
|
|
d27e43e6b5 | ||
|
|
1db15a3543 | ||
|
|
c970c94f82 | ||
|
|
570df8316d | ||
|
|
21b5df494b | ||
|
|
e113ec10c9 | ||
|
|
95a576bd62 | ||
|
|
3f7110b120 | ||
|
|
f9bb2a428a | ||
|
|
333dbf5418 | ||
|
|
a9238c99b9 | ||
|
|
4a041b6f0a | ||
|
|
688a56e8ab | ||
|
|
59fc927dc9 | ||
|
|
066af13b5c | ||
|
|
e2d8cbe238 | ||
|
|
cb31fd374c | ||
|
|
f4fd88b8a9 | ||
|
|
f36ab39680 | ||
|
|
0a32ecf1fe | ||
|
|
9baff1363c | ||
|
|
f18567db9a | ||
|
|
be0d694dc2 | ||
|
|
6310e40d47 | ||
|
|
7a84127a27 | ||
|
|
288853e44f | ||
|
|
09a8911b6f | ||
|
|
ceeca912cd | ||
|
|
7a3b139dcb | ||
|
|
e2b6a85e80 | ||
|
|
38074e7bd5 | ||
|
|
f516213bf3 | ||
|
|
bbc52564d0 | ||
|
|
3e9aae7a91 | ||
|
|
9fa4fbef91 | ||
|
|
f21ce5768b | ||
|
|
b487d56452 | ||
|
|
d316260395 | ||
|
|
6b08fc9e78 | ||
|
|
0c469de04f | ||
|
|
d680e6e580 | ||
|
|
3c323e1e9a | ||
|
|
06f59b9928 | ||
|
|
4339e446e4 | ||
|
|
72689513a3 | ||
|
|
56d8568787 | ||
|
|
c91bb1ba13 | ||
|
|
e4800e84d0 | ||
|
|
ee28b0257a | ||
|
|
722c82c8ab | ||
|
|
2061c30758 | ||
|
|
4e8423d18a | ||
|
|
a5aa8573c9 | ||
|
|
ecd5217633 | ||
|
|
577b3ee949 | ||
|
|
bc4de88d8b | ||
|
|
4688c9839b | ||
|
|
90c0e656f1 | ||
|
|
42191340fd | ||
|
|
d873d09fa5 | ||
|
|
2e114bcc1e | ||
|
|
1a73c71d56 | ||
|
|
240586edc5 | ||
|
|
eae4c45cf5 | ||
|
|
c2c58734b8 | ||
|
|
085e9d6254 | ||
|
|
f683b99405 | ||
|
|
bacf8229b0 | ||
|
|
fa7a5db4bd | ||
|
|
e534138417 | ||
|
|
73d94f7bdc | ||
|
|
054f954390 | ||
|
|
c0317ddae5 | ||
|
|
91f5abc955 | ||
|
|
d26f18505a | ||
|
|
f3a960d9d8 | ||
|
|
5f0a357b1f | ||
|
|
20d5925d08 | ||
|
|
b655a5fa5f | ||
|
|
ad0ae4887f | ||
|
|
eca635cb5d | ||
|
|
ad641c1992 | ||
|
|
69730273b1 | ||
|
|
f8b3a774be | ||
|
|
2ea40ff2c5 | ||
|
|
33f7b63d11 | ||
|
|
880880162b | ||
|
|
2f56373cc2 | ||
|
|
24519b6292 | ||
|
|
24e349afe7 | ||
|
|
5cfc565bbd | ||
|
|
c8406b640c | ||
|
|
53db5fc4a5 | ||
|
|
9bd4abb288 | ||
|
|
25c37b7637 | ||
|
|
3301b57d4b | ||
|
|
fe381eca77 | ||
|
|
e3df52ca51 | ||
|
|
b2e87b76f9 | ||
|
|
5811c3d89c | ||
|
|
140c48f1cc | ||
|
|
b62e379299 | ||
|
|
71f1d7f101 | ||
|
|
bde572f673 | ||
|
|
684621ecd4 | ||
|
|
9f89695c48 | ||
|
|
acc868d91d | ||
|
|
d7d3003e06 | ||
|
|
d292143af1 | ||
|
|
3b46cf38cd | ||
|
|
e53ddd046f | ||
|
|
e9e1186f1d | ||
|
|
558615a853 | ||
|
|
ca61675597 | ||
|
|
79864ba94c | ||
|
|
d63a0b4859 | ||
|
|
ac87ca5596 | ||
|
|
2ea68b8d2b | ||
|
|
9234fb72b2 | ||
|
|
92a84fe050 | ||
|
|
c95b464680 | ||
|
|
59609280a2 | ||
|
|
bb0c0dafae | ||
|
|
5f3c54af13 | ||
|
|
d8862b0bdf | ||
|
|
bbd1e5dada | ||
|
|
087a16400f | ||
|
|
b89f3e6df5 | ||
|
|
4bc0bcfbc2 | ||
|
|
9ff9fcda48 | ||
|
|
ac6b5afd32 | ||
|
|
0d9b73cd74 | ||
|
|
12b8b8ba58 | ||
|
|
f274afdd1d | ||
|
|
e3c67d55de | ||
|
|
8bf6071c48 | ||
|
|
897e75d554 | ||
|
|
363b6032f5 | ||
|
|
4638216209 | ||
|
|
67a9ea74a3 | ||
|
|
f89cf06299 | ||
|
|
cb7f34e237 | ||
|
|
7401a1329f | ||
|
|
df1228f387 | ||
|
|
9ead135f51 | ||
|
|
193a63511d | ||
|
|
b00076b32a | ||
|
|
51c2edf868 | ||
|
|
11b464a002 | ||
|
|
c3cff33f99 | ||
|
|
663df7b4cb | ||
|
|
b79524ce6f | ||
|
|
65a113f9a3 | ||
|
|
45c55a3e76 | ||
|
|
e93e16de06 | ||
|
|
620a280d64 | ||
|
|
4bda625076 | ||
|
|
b034bb077f | ||
|
|
d08691d5a5 | ||
|
|
08e811aae7 | ||
|
|
6de693a24d | ||
|
|
3a7749b0fc | ||
|
|
f555ccb9b9 | ||
|
|
f6682a9ade | ||
|
|
1166a58ec7 | ||
|
|
59d2a5cbe5 | ||
|
|
85f72d6576 | ||
|
|
435aee107e | ||
|
|
6cd91272a6 | ||
|
|
7908c9a66b | ||
|
|
f6fb9fbb3e | ||
|
|
9de3560d9f | ||
|
|
88e207f9e0 | ||
|
|
66ec682107 | ||
|
|
1076645853 | ||
|
|
30247c5886 | ||
|
|
1e3a40370d | ||
|
|
27b9e27ae0 | ||
|
|
28050dab72 | ||
|
|
bc6aeab722 | ||
|
|
737328566f | ||
|
|
6cfad0b10f | ||
|
|
19c7a99197 | ||
|
|
7929d55f3f | ||
|
|
1f12617065 | ||
|
|
944737dde7 | ||
|
|
a91a34732c | ||
|
|
744c0726a1 | ||
|
|
7055530895 | ||
|
|
9402724e40 | ||
|
|
cd36d73886 | ||
|
|
0c09179f01 | ||
|
|
884a3f1647 | ||
|
|
2e572717c5 | ||
|
|
8502709884 | ||
|
|
5f4a3f6777 | ||
|
|
067fc41354 | ||
|
|
36b55dc1e6 | ||
|
|
3a97c33072 | ||
|
|
62590be0db | ||
|
|
440f2abe6f | ||
|
|
f54f0856c1 | ||
|
|
62994167c5 | ||
|
|
00e709cec4 | ||
|
|
2b51c21ee5 | ||
|
|
3ed1d3e25c | ||
|
|
3088277b1e | ||
|
|
879b00a57b | ||
|
|
6830b05716 | ||
|
|
5912898b06 | ||
|
|
f614cb8341 | ||
|
|
9ff85407b7 | ||
|
|
d211420261 | ||
|
|
1ef52e0aec | ||
|
|
9aca0d5f6e | ||
|
|
c7c68c6fe7 | ||
|
|
95897acc30 | ||
|
|
57869b667b | ||
|
|
2c8a70b743 | ||
|
|
0445dd5c18 | ||
|
|
b6e06d4beb | ||
|
|
b75b7cbc01 | ||
|
|
eb646a6682 | ||
|
|
7b88cd8afd | ||
|
|
f5a6724142 | ||
|
|
afbab71401 | ||
|
|
20fe42df2b | ||
|
|
d0c5bedab6 | ||
|
|
ef31cd1323 | ||
|
|
427a42ab58 | ||
|
|
474c4caf94 | ||
|
|
109bb540ec | ||
|
|
9b7b9f6815 | ||
|
|
32973f6e15 | ||
|
|
5b26a68910 | ||
|
|
59014546aa | ||
|
|
e4483de406 | ||
|
|
90d830837a | ||
|
|
752163dfc6 | ||
|
|
6d02fe98f2 | ||
|
|
500d569c79 | ||
|
|
f54b0de7b4 | ||
|
|
b8193865f6 | ||
|
|
e7d0c5d9e9 | ||
|
|
791bb6a444 | ||
|
|
a018eff89d | ||
|
|
1096cfa991 | ||
|
|
5d9354f362 | ||
|
|
0b42849a3e | ||
|
|
df75c86ef0 | ||
|
|
20975c4918 | ||
|
|
1dfaec332e | ||
|
|
3d6d775f08 | ||
|
|
1f393ac4f7 | ||
|
|
847479b886 | ||
|
|
6aed0cd713 | ||
|
|
39b9edfdcd | ||
|
|
090cc27f00 | ||
|
|
08225948bc | ||
|
|
18d07e04a6 | ||
|
|
74ba4f8eef | ||
|
|
0852957ea1 | ||
|
|
7efcf57c18 | ||
|
|
44f636e91e | ||
|
|
8457611316 | ||
|
|
bd7943d9a7 | ||
|
|
b0d72a3db2 | ||
|
|
396b011610 | ||
|
|
c131f14d3e | ||
|
|
a4c986fa1b | ||
|
|
64468fcf63 | ||
|
|
8904783aee | ||
|
|
40c89b3399 | ||
|
|
27a396d7ed | ||
|
|
2cf5931890 | ||
|
|
d159da8671 | ||
|
|
ed0d234d7f | ||
|
|
4d701d8306 | ||
|
|
5dbb770aa4 | ||
|
|
479ccbda82 | ||
|
|
001cb65271 | ||
|
|
bc3ab27364 | ||
|
|
669d542408 | ||
|
|
3dcab96180 | ||
|
|
7f1d621f43 | ||
|
|
b0063c83c7 | ||
|
|
f06c9a1953 | ||
|
|
e1958b22c5 | ||
|
|
528243bb98 | ||
|
|
f058fdf72c | ||
|
|
5f79f1bcde | ||
|
|
18ed046356 | ||
|
|
277d0055fd | ||
|
|
e727cbadb6 | ||
|
|
fdeb749da7 | ||
|
|
dee8c6e770 | ||
|
|
fe4cd695af | ||
|
|
1902325087 | ||
|
|
5b28616212 | ||
|
|
ad05cc3b44 | ||
|
|
56f73aa4b9 | ||
|
|
40111188ec | ||
|
|
80c09f1075 | ||
|
|
b5ef388711 | ||
|
|
7a8bde44fa | ||
|
|
b381674375 | ||
|
|
e54a0954e6 | ||
|
|
c0965cd48b | ||
|
|
4153e2fde4 | ||
|
|
f3487c1ea2 | ||
|
|
0898a3d475 | ||
|
|
064f79ebae | ||
|
|
55d37178a0 | ||
|
|
90e8cfc5b8 | ||
|
|
ab511aca5e | ||
|
|
39d250888e | ||
|
|
00638fa5d3 | ||
|
|
ca43aba088 | ||
|
|
96c64e15ef | ||
|
|
dd1ccd2fd6 | ||
|
|
c0442b1c59 | ||
|
|
bde9b8a21a | ||
|
|
83d3625e1a | ||
|
|
5ad557c6c8 | ||
|
|
1fa3937001 | ||
|
|
a10214a502 | ||
|
|
0fe70d2b4e | ||
|
|
18b3753227 | ||
|
|
0bfa12a1fc | ||
|
|
4d6cd7f326 | ||
|
|
2fe1b0e3f8 | ||
|
|
3929660f39 | ||
|
|
c2ec1cfe8a | ||
|
|
d597c61cb7 | ||
|
|
5e18eadf22 | ||
|
|
19f7fbc949 | ||
|
|
55f3cb9577 | ||
|
|
811e508c84 | ||
|
|
60ee69979f | ||
|
|
4f80ec9178 | ||
|
|
5e37991b6c | ||
|
|
a4bc7f6a07 | ||
|
|
6724ec5a6d | ||
|
|
879d13ef45 | ||
|
|
a1d78d102a | ||
|
|
3af4aa7846 | ||
|
|
0f0afc48ab | ||
|
|
55efa1f268 | ||
|
|
ffa1a610c0 | ||
|
|
0bb76c0a76 | ||
|
|
7be0a97998 | ||
|
|
5230a57599 | ||
|
|
3bed15d673 | ||
|
|
1e92274495 | ||
|
|
2b2fecac12 | ||
|
|
17f26077b0 | ||
|
|
a2b404b5b3 | ||
|
|
e98da5a628 | ||
|
|
b9e7a1d3ca | ||
|
|
1941aaf34a | ||
|
|
11c466ec26 | ||
|
|
feaa80addc | ||
|
|
92b012e800 | ||
|
|
3fc803c0d8 | ||
|
|
a07b262a87 | ||
|
|
851835c7a5 | ||
|
|
d4de3d0a45 |
@@ -2,7 +2,7 @@ Makefile Makefile.in
|
||||
aclocal.m4
|
||||
configure config.log config.cache config.guess config.status config.sub
|
||||
libtool ltconfig ltmain.sh
|
||||
.psrc .inslog2 tca.map tca.log
|
||||
*.rpt
|
||||
update update-autoconf
|
||||
autom4te.cache
|
||||
.psrc .inslog2 tca.map tca.log pchdir *.rpt
|
||||
update
|
||||
WindowMaker*.tar.gz
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
#
|
||||
# You can add here extra email addresses (one per line) where notifications
|
||||
# should be sent on cvs commit.
|
||||
# This is easier than to modify CVSROOT/loginfo to add extra addresses there.
|
||||
# Lines that start with # or empty lines are ignored.
|
||||
#
|
||||
87
.gitignore
vendored
Normal file
87
.gitignore
vendored
Normal file
@@ -0,0 +1,87 @@
|
||||
*Makefile
|
||||
*Makefile.in
|
||||
WINGs/get-wings-flags
|
||||
WINGs/get-wutil-flags
|
||||
WINGs/WINGs.pc
|
||||
aclocal.m4
|
||||
autom4te.cache*
|
||||
config.guess
|
||||
config.log
|
||||
config.status
|
||||
config.sub
|
||||
configure
|
||||
contrib/WindowMaker.spec
|
||||
libtool
|
||||
ltmain.sh
|
||||
src/config.h
|
||||
src/config.h.in
|
||||
src/stamp-h1
|
||||
src/wconfig.h
|
||||
wmlib/wmlib.pc
|
||||
wrlib/get-wraster-flags
|
||||
wrlib/wrlib.pc
|
||||
*.o
|
||||
*.lo
|
||||
WINGs/Examples/.libs/colorpick
|
||||
WINGs/Examples/.libs/fontl
|
||||
WINGs/Examples/.libs/puzzle
|
||||
WINGs/Examples/colorpick
|
||||
WINGs/Examples/connect
|
||||
WINGs/Examples/fontl
|
||||
WINGs/Examples/puzzle
|
||||
WINGs/Examples/server
|
||||
WINGs/Extras/.libs/test
|
||||
WINGs/Extras/libExtraWINGs.a
|
||||
WINGs/Extras/test
|
||||
WINGs/Tests/.libs/testmywidget
|
||||
WINGs/Tests/.libs/wmfile
|
||||
WINGs/Tests/.libs/wmquery
|
||||
WINGs/Tests/.libs/wtest
|
||||
WINGs/Tests/testmywidget
|
||||
WINGs/Tests/wmfile
|
||||
WINGs/Tests/wmquery
|
||||
WINGs/Tests/wtest
|
||||
WINGs/libWINGs.a
|
||||
WINGs/libWUtil.a
|
||||
WPrefs.app/.libs/WPrefs
|
||||
WPrefs.app/WPrefs
|
||||
WindowMaker/Defaults/WMRootMenu
|
||||
WindowMaker/Defaults/WMState
|
||||
WindowMaker/Defaults/WMWindowAttributes
|
||||
WindowMaker/Defaults/WindowMaker
|
||||
WindowMaker/IconSets/Default.iconset
|
||||
src/.libs/wmaker
|
||||
src/wmaker
|
||||
test/wtest
|
||||
util/.libs/wmagnify
|
||||
util/.libs/wmsetbg
|
||||
util/.libs/wmsetup
|
||||
util/convertfonts
|
||||
util/geticonset
|
||||
util/getstyle
|
||||
util/seticons
|
||||
util/setstyle
|
||||
util/wdread
|
||||
util/wdwrite
|
||||
util/wmagnify
|
||||
util/wmaker.inst
|
||||
util/wmsetbg
|
||||
util/wmsetup
|
||||
util/wxcopy
|
||||
util/wxpaste
|
||||
wmlib/libWMaker.a
|
||||
wrlib/.libs/libwraster.a
|
||||
wrlib/.libs/libwraster.la
|
||||
wrlib/.libs/libwraster.lai
|
||||
wrlib/.libs/libwraster.so
|
||||
wrlib/.libs/libwraster.so.3
|
||||
wrlib/.libs/libwraster.so.3.1.0
|
||||
wrlib/libwraster.la
|
||||
wrlib/tests/.libs/testdraw
|
||||
wrlib/tests/.libs/testgrad
|
||||
wrlib/tests/.libs/testrot
|
||||
wrlib/tests/.libs/view
|
||||
wrlib/tests/testdraw
|
||||
wrlib/tests/testgrad
|
||||
wrlib/tests/testrot
|
||||
wrlib/tests/view
|
||||
8
AUTHORS
8
AUTHORS
@@ -107,10 +107,10 @@ made autoarrange icons a runtime option, SHADOW_RESIZEBAR c-time option,
|
||||
no workspace switch to the same workspace, dashed icon selection,
|
||||
misclellaneous bug fixes, definable cursors, --no-polling command line option.
|
||||
|
||||
The JED Text Editor <xjed@windowmaker.org>
|
||||
The JED Text Editor <xjed@windowmaker.info>
|
||||
Project maintainer
|
||||
|
||||
Alfredo K. Kojima <kojima@windowmaker.org>
|
||||
Alfredo K. Kojima <kojima@windowmaker.info>
|
||||
The guy who types random keys to feed JED with the necessary entropy
|
||||
|
||||
Jay Kominek <jkominek@xtn.net>
|
||||
@@ -149,7 +149,7 @@ Fix for unassociated alpha tiff
|
||||
Craig Nellist <crn@ozemail.com.au>
|
||||
selection in textfield
|
||||
|
||||
Dan Pascu <dan@windowmaker.org>
|
||||
Dan Pascu <dan@windowmaker.info>
|
||||
dock ghost (superfluous mode) fix, enhancement for scrollable menus,
|
||||
clip, numerous other stuff, project maintainer
|
||||
|
||||
@@ -217,7 +217,7 @@ FRBall <frb@umr.edu>
|
||||
dgradient fix
|
||||
|
||||
|
||||
"]d" <id@windowmaker.org>
|
||||
"]d" <id@windowmaker.info>
|
||||
Window list menu miniaturized/hidden hints, XDE support, XKB lock
|
||||
language status, WINGs enhancements, bug fixes, window commands menu
|
||||
enhancement, window move/resize by keyboard. GNUstepGlow.tiff icon,
|
||||
|
||||
9
BUGFORM
9
BUGFORM
@@ -4,11 +4,11 @@
|
||||
|
||||
|
||||
If you find a bug please fill this form and send it to
|
||||
developers@windowmaker.org Please, USE THIS FORM!!!
|
||||
developers@windowmaker.info Please, USE THIS FORM!!!
|
||||
|
||||
You can also report a bug in the WWW bug tracker at
|
||||
http://windowmaker.org/cgi-bin/bugs or by sending this report
|
||||
to bugs@windowmaker.org
|
||||
http://windowmaker.info/cgi-bin/bugs or by sending this report
|
||||
to bugs@windowmaker.info
|
||||
|
||||
|
||||
0. Before reporting this bug I already:
|
||||
@@ -35,9 +35,6 @@ to bugs@windowmaker.org
|
||||
[ ] --enable-kanji
|
||||
[ ] --disable-shape
|
||||
[ ] --enable-single-icon
|
||||
[ ] --enable-kde
|
||||
[ ] --enable-gnome
|
||||
[ ] --enable-openlook
|
||||
[ ] --enable-modelock
|
||||
[ ] Others: .......................
|
||||
|
||||
|
||||
8
BUGS
8
BUGS
@@ -1,8 +1,12 @@
|
||||
Newly added
|
||||
- after a crash, wmaker will forget the hidden state of the apps and just
|
||||
show their windows minimized. normal restart is unaffected
|
||||
- after a crash, wmaker will completely mess the window's saved geometries
|
||||
and maximizing will have weird results. restart is unaffected
|
||||
|
||||
- wmaker will not stop managing a screen even if another window manager
|
||||
requests that, through the ICCCM 2.0 manager selection stuff
|
||||
- stacking code is buggy (or XFree is buggy)
|
||||
- after restart focus is losed or switched to another window. May be related
|
||||
to the one above.
|
||||
- save session doesnt work on some platforms (Alpha and Sparc)
|
||||
- texture pixmaps are being incorrectly freed somewhere. Either
|
||||
fix bug (to support broken MetroX servers) or remove all useless references
|
||||
|
||||
287
ChangeLog
287
ChangeLog
@@ -1,3 +1,280 @@
|
||||
Changes since version 0.92.0:
|
||||
.............................
|
||||
|
||||
- added check for --with-gnustepdir option to configure to verify that its
|
||||
argument is an absolute path
|
||||
- updated german translations (Torsten Marek <shlomme@gmx.net>)
|
||||
- fixed WPrefs.app to find its icons when not installed under GNUstep paths
|
||||
- fixed gcc-4 compilation issues (Vladimir Nadvornik <nadvornik@suse.cz>)
|
||||
- fixed amd64 compilation issues (Vladimir Nadvornik <nadvornik@suse.cz>)
|
||||
- eliminated gcc-4 compilation warnings
|
||||
- small fix for compilation in a different directory than the source
|
||||
(Balaton Zoltan <balaton@eik.bme.hu>)
|
||||
- fixed some warnings on 64bit platforms (Balaton Zoltan <balaton@eik.bme.hu>)
|
||||
- fixed issue with invisible modal windows from Qt and Gtk applications
|
||||
on 64bit platforms (Max Loparyev <max@city.veganet.ru>)
|
||||
- fixed issue with icon colors on big endian platforms
|
||||
(Max Loparyev <max@city.veganet.ru>)
|
||||
- release colors to avoid issues with the reference count overflowing a
|
||||
small integer and causing unexpected color releases that can crash
|
||||
Window Maker (Martin Frydl <martin.frydl@systinet.com>)
|
||||
- fixed a small memory leak in WINGs/wview.c caused by not releasing the
|
||||
background color of a view (Martin Frydl <martin.frydl@systinet.com>)
|
||||
- updated estonian translation (Ivar Smolin <okul@linux.ee>)
|
||||
- updated the XDND code in WINGs to work with GDK based applications.
|
||||
WINGs based applications should now work with both KDE and GNOME
|
||||
applications (Sylvain Reynal <sreynal@nerim.net>)
|
||||
- better check for the XDND protocol version when interoperating with other
|
||||
applications. As it seems xdnd version 3 (which WINGs supports) and newer
|
||||
are not backward compatible with xdnd version 1 and 2. This is why WINGs
|
||||
applications cannot interoperate with GNUstep applications (which uses
|
||||
xdnd version 2). Xdnd version 4 and 5 are backwards compatible with
|
||||
version 3 though. (Sylvain Reynal <sreynal@nerim.net>)
|
||||
- Improved Info panel layout and fonts.
|
||||
- Fixed missing library paths when linking some binaries on certain
|
||||
platforms with a recent pkg-config (debian unstable/sid for one)
|
||||
- Fixed buggy handling of UTF8 characters in textfields in WINGs.
|
||||
(Stanislav Maslovski <stanislav.maslovski@gmail.com>)
|
||||
- Fixed segfault in WPrefs when some font description is missing from the
|
||||
configuration file (Stanislav Maslovski <stanislav.maslovski@gmail.com>)
|
||||
- Removed WINGs' dependency on rgb.txt (from X11) and issues with locating it
|
||||
on the filesystem for different systems/distributions.
|
||||
- Fixed segfault when unhiding an application in certain conditions (seen
|
||||
with KDE applications with transient windows)
|
||||
|
||||
|
||||
Changes since version 0.91.0:
|
||||
.............................
|
||||
|
||||
- fixed crash with info panel and alt-tabbing
|
||||
- updated Japanese translations (Takeo Hashimoto <HashimotoTakeo@mac.com>)
|
||||
- allow disable of switch panel when SwitchPanelImages=None
|
||||
- added X Input Methods support in WINGs
|
||||
- fixed issues with compiling on Solaris with openwin
|
||||
- reduced minimum required version number for the Xft library to 2.1.0
|
||||
- fixed some compilation issues with gcc-2.9x
|
||||
- removed --with-appsdir option and replaced it with --with-gnustepdir. Also,
|
||||
default installation path (for non GNUstep users) is now $(prefix)/bin
|
||||
- fixed bug with infinite loop in some circumstances in fitText() in WINGs
|
||||
- fixed to allow parallel builds on SMP systems using make -j
|
||||
- updated Italian translation (Marco Colombo <m.colombo@ed.ac.uk>)
|
||||
- applied .AppInfo --> Library path rename patch (Alex Perez <aperez@student.santarosa.edu>)
|
||||
- added code to automatically update the icon paths from the old .AppInfo
|
||||
style to the new Library/WindowMaker style in WMWindowAttributes when
|
||||
Window Maker starts to make transition transparent for users.
|
||||
- fixed issue with window being moved by 1 pixel up and left when the window
|
||||
move was initiated by the client
|
||||
- improved hide/unhide animation for applications with multiple windows
|
||||
(only animate the active window hiding/unhiding, which makes Window Maker
|
||||
faster and more responsive for such applications). This also makes the
|
||||
restart operation much faster.
|
||||
- fixed bug with windows shrinking to very small sizes when Unmaximize was
|
||||
used on them, after they were closed in a maximized state.
|
||||
- fixed bug with restoring maximized state from NetWM atoms.
|
||||
- fixed issue with GNUstep applications losing focus when all their windows
|
||||
are closed and there remains only their menu (Matt Rice <ratmice@yahoo.com>)
|
||||
- try fixed font for the technical drawing font if helvetica-12 is not
|
||||
available to avoid crashing (Timo Juhani Lindfors <timo.lindfors@iki.fi>)
|
||||
- new algorithm for placing miniwindows after unhiding the application they
|
||||
belong to, that works without auto-arranging the icons, while still avoiding
|
||||
multiple icons in the same spot by moving the miniwindows to a new slot if
|
||||
their old slot was occupied in the meantime.
|
||||
- double clicking an appicon will also raise the miniwindows that belong to
|
||||
that application to the front (along with the normal windows).
|
||||
|
||||
|
||||
Changes since version 0.90.0:
|
||||
.............................
|
||||
|
||||
- added _NET_WM_NAME, _NET_WM_ICON_NAME and _NET_WM_ICON to WINGs
|
||||
- new WPrefs icon (thanks to Largo)
|
||||
- replaced VirtualEdgeThickness option, with EnableVirtualDesktop (boolean)
|
||||
- enhanced alt-tab panel, added theming ability
|
||||
- fixed issues with broken crash dialog
|
||||
- removed obsoleted options from wconfig.h
|
||||
- changed animation delay constants to fix issues with 2.6.x linux kernels
|
||||
(patch provided by Eric Piel <Eric.Piel@lifl.fr>)
|
||||
- fixed several broken po files
|
||||
- increased libwraster version number to 3.1.0 (added a RCopyArea function)
|
||||
|
||||
|
||||
Changes since version 0.80.2:
|
||||
.............................
|
||||
|
||||
- Some updates to WINGs WMConnection. See WINGs/ChangeLog for details.
|
||||
- Fixed empty window list menu, if the window list menu was launched through
|
||||
the root menu (sent by "Marc-Christian Petersen" <m.c.p@wolk-project.de>)
|
||||
- Fixed dock's menu mapping position when dock is on the right side.
|
||||
- Map clip's menu so that it never gets out of screen on the left or the right.
|
||||
- Patch to add binary mode on opening files (needed for Windows with Cygwin)
|
||||
(sent by luke <luke@posh.optushome.com.au>)
|
||||
- Updated French translations (Antoine Hulin <antoine@origan.fdn.org>)
|
||||
- Removed Hermes lib dependency in wrlib
|
||||
- Put back asm/MMX code in wrlib
|
||||
- Updated Russian locale files ("Andrew W. Nosenko" <awn@bcs.zp.ua>)
|
||||
- API change in WINGs for WMDraw*String(). Details in WINGs/Changelog
|
||||
- Removed obsoleted acconfig.h and implemented its functionality using
|
||||
AC_DEFINE and AC_DEFINE_UNQUOTED as autoconf 2.5x recommends.
|
||||
This will definitely enforce the need to use autoconf 2.5x
|
||||
- Added Xft2 support to WINGs, for rendering antialiased fonts with
|
||||
transparency. Details in WINGs/ChangeLog.
|
||||
- Fixed problem with long, preset workspace names (Wanderlei Antonio Cavassin
|
||||
<cavassin@conectiva.com.br>)
|
||||
- Added kinput2 bug workaround to stock WMWindowAttributes (Seiichi SATO
|
||||
<sato@cvs-net.co.jp>)
|
||||
- Added Belarusian translation (Ihar Viarheichyk <iverg@mail.ru>)
|
||||
- Fixed wrlib not to load braindead images with 0 sized width or height
|
||||
- Removed double no-position-display when cycling position display types
|
||||
with Shift key while moving windows.
|
||||
- Changed the default position display while moving a window to 'Center'.
|
||||
- Better outline when drawing balloons.
|
||||
- Fixed wrlib to not accept too large images (fixes buffer overflow)
|
||||
- Patched FAQ (David Coe <davidc@debian.org>)
|
||||
- Fixed bug with resizebars appearing out of nothing when reloading configs
|
||||
- Fixed sloppy focus bug (Pawel S. Veselov <Pawel.Veselov@Sun.COM>)
|
||||
- Applied Xinerama patch (after fixes) from (Peter Zijlstra
|
||||
<a.p.zijlstra@chello.nl>)
|
||||
- Added switch to enable/disable antialiased fonts in WPrefs's Expert Settings
|
||||
panel. (Temporary until the Font Settings panel in WPrefs is finished).
|
||||
- Added a check that only %d is used in a font specification in WMGLOBAL and at
|
||||
most once for each font in a fontset (eliminates a possible security exploit)
|
||||
- Added fontpanel callback
|
||||
- Fixed focus handling for windows that set WM_HINTS.take_focus = False.
|
||||
- Fixed a problem in the stacking code which could lead to segmentation faults
|
||||
(Jeff Teunissen <deek@d2dc.net>)
|
||||
- Fixed a crashing bug in the menu code with modal panels involved.
|
||||
- Fixed incorrect focusing of application's windows after an unhide (sometimes
|
||||
the incorrect window got focus instead of the apps's last focused window)
|
||||
- Unshade application's shaded windows when Dbl-MiddleClick-ing its appicon.
|
||||
(this is to be consistent with deminiaturizing application's miniwindows
|
||||
which also happens in this case, since shading is a form of miniaturization)
|
||||
- Fixed bug with tpixmap from previous xinerama patch (reported by g0sh)
|
||||
- Fixed edge resistance and move/resize frame drawing for borderless windows
|
||||
- Fixed wrong display position for the move/resize widgets after xinerama
|
||||
patch (Peter Zijlstra <a.p.zijlstra@chello.nl>)
|
||||
- Fixed bug with cursor locked in drag mode after Alt-dragging a window
|
||||
- Added Catalan translation (Ernest Adrogué <eadrogue@gmx.net>)
|
||||
- Fixed a bug with deminiaturizing windows when the application is hidden and
|
||||
the miniaturized window is selected from the window list menu
|
||||
- Fixed a bug with not showing shaded window frames when the application is
|
||||
hidden and another window belonging to the app is selected in the window
|
||||
list menu
|
||||
- Autoarrange icons after unhiding an application that has miniaturized
|
||||
windows, else they may cover other icons which are now in the positions
|
||||
they have occupied before hiding
|
||||
- Fixed Clip's workspace menu mapping to be consistent with the others
|
||||
- Fixed bug in wmsetbg that caused scale and maxscale to both do maxscale
|
||||
(Alexey Voinov <voins@voins.program.ru>)
|
||||
- Fixed bug with scrolling menus introduced by the xinerama patch.
|
||||
- Fixed bug that could cause SIGSEGV by accessing beyond the end of text in
|
||||
a WINGs textfield widget.
|
||||
- Fixed small memory leak in WINGs' font panel code.
|
||||
- Fixed memory leak in WINGs' file panel code.
|
||||
- Updated Bulgarian translations (Anton Zinoviev <zinoviev@debian.org>)
|
||||
- Fixed a bug in WINGs' hashtable which free'd the wrong memory in the
|
||||
WMResetHashTable() function (possible source of SIGSEGVs)
|
||||
- Fixed 2 syntax errors in plmenu.zh_TW.Big5 (Mike FABIAN <mfabian@suse.de>)
|
||||
- Some .po file fixes (Mike FABIAN <mfabian@suse.de>)
|
||||
- Fixed the problem with the root menu code changing the locale setting as
|
||||
a side effect of loading a localized menu
|
||||
- Fixed e memory leak in the code that reads a localized root menu
|
||||
- Added support for generating pkgconfig files for WINGS, wmlib and wrlib.
|
||||
("Marcelo E. Magallon" <mmagallo@debian.org>)
|
||||
- Support for multiline balloons (Vitaly Ovtchinnikov <ov@rbcmail.ru>)
|
||||
- Improved wsetfont (Mike FABIAN <mfabian@suse.de>)
|
||||
- Updated single-click contrib patch (steve lion <steve.lion@verizon.net>
|
||||
and vlaad)
|
||||
- Updated French translations (Antoine Hulin <antoine@origan.fdn.org>)
|
||||
- Xinerama support for Solaris
|
||||
- Added global menu support (see NEWS)
|
||||
- Fixed sloppy focus bug
|
||||
- Made maximize behave differently with keyboard/mouse for xinerama
|
||||
(Peter Zijlstra <a.p.zijlstra@chello.nl>)
|
||||
- A few leftover xinerama fixes (Peter Zijlstra <a.p.zijlstra@chello.nl>)
|
||||
- Extended the 'strut' to multiple heads
|
||||
(Peter Zijlstra <a.p.zijlstra@chello.nl>)
|
||||
- Icon placement now takes into account the new xinerama extended 'strut'
|
||||
(Peter Zijlstra <a.p.zijlstra@chello.nl>)
|
||||
- Icon arrangement that takes the new extended xinerama 'strut' into account
|
||||
(Peter Zijlstra <a.p.zijlstra@chello.nl>)
|
||||
- Fixed the 'KDE omnipresent' bug.
|
||||
- Fixed bug with focusing a deminiaturized window with sloppy focus mode
|
||||
- Fixed aspect of window list menu (window name was too close to workspace
|
||||
indicator)
|
||||
- Fixed menu panel in WPrefs.app. Explanatory text did not fit into the label
|
||||
- Implemented a better logic to preserve the window's old geometry when
|
||||
maximizing to support succesive maximizations in different directions
|
||||
without the need to do an intermediary un-maximize step (eliminates flicker)
|
||||
- Made keyboard/mouse maximization behavior consinstent relative to each other
|
||||
- Enhanced wmsetbg's man page with description for -b | --back-color
|
||||
(Marcelo E. Magallon <marcelo.magallon@bigfoot.com>)
|
||||
- Do not use the disabled clip color for the clip's workspace navigation arrows
|
||||
when the clip is collapsed (it made them look like disabled)
|
||||
- Fixed bug with incorrect un-escaping if there is a dot in wm_class.
|
||||
- Updated Catalan translations (Ernest Adrogue <eadrogue@gmx.net>)
|
||||
- Updated Spanish translation of WPrefs (Alberto Gimenez <algibe@teleline.es>)
|
||||
- Fixed synchronization problem between hair cursor and mouse cursor in
|
||||
wmagnify with mouse cursor at the screen edge (Jon Diercks <jon@diercks.net>)
|
||||
- Fixed 2 focus switching related bugs (Allan Peramaki <aperamak@cc.hut.fi>)
|
||||
- Fixed a bug that made the crash panel to be shown again and again when the
|
||||
'Restart Window Maker' option was selected, under some circumstances.
|
||||
- Added workaround in global WMWindowAttributes, to avoid creating a second
|
||||
appicon when a KDE3 application opens a config panel.
|
||||
- Updated slovak translation (Jan Tomka <judas@linux.sk>)
|
||||
- Added xdnd v3 support in WINGs (Sylvain Reynal <sreynal@nerim.net>)
|
||||
- Check whether libXft is at least version 2.1.2 else refuse to compile.
|
||||
- Fixed bug in icon chooser dialog that could cause a segmentation fault
|
||||
in some cases (Pascal Hofstee <caelian@gmail.com>)
|
||||
- Fixed crash in asm code in wrlib, with new versions of gcc.
|
||||
- Fixed bug in the x86_PseudoColor_32_to_8() function which incorrectly
|
||||
used the r, g, b fields in the conversion.
|
||||
- Fixed x86 ASM code in wrlib to work on 64 bit architectures.
|
||||
- Fixed the focus flicker seen with some apps (notably gtk2)
|
||||
(Alexey Spiridonov <snarkmaster@gmail.com>)
|
||||
- Fixed all crashing bugs that were generated by wmaker starting with the
|
||||
WMState file missing.
|
||||
- Added NetWM support (a modified version of the patch originaly written
|
||||
by Peter Zijlstra <a.p.zijlstra@chello.nl>)
|
||||
- Applied patch to enhance the Virtual Desktop behaviour, and to integrate
|
||||
it with the NetWM code (Peter Zijlstra <a.p.zijlstra@chello.nl>)
|
||||
- Applied a few xinerama and placement fixes (Peter Zijlstra
|
||||
<a.p.zijlstra@chello.nl>)
|
||||
- Fixed memory leak in dock code.
|
||||
- Fixed and enhanced the text wrapping in WINGs.
|
||||
- Fixed the layout of some elements in WPrefs.app
|
||||
- Added workaround for aplications that don't set the required hints on the
|
||||
client leader window, but they set them on normal windows (observer with
|
||||
KDE 3.3.0 mainly). This will allow these apps to get an appicon again.
|
||||
(they should be fixed still)
|
||||
- Added workaround for applications that do not set a command with
|
||||
XSetCommand(), but instead they set the _NET_WM_PID property. This works
|
||||
with operating systems that offer a /proc interface similar to what linux
|
||||
has. (This also is to fix problems with KDE 3.3.0 apps, but not only them).
|
||||
- Fixed bug with autostart and exit scripts not being executed if user
|
||||
GNUstep path was different from ~/GNUstep (when setting GNUSTEP_USER_ROOT)
|
||||
- Removed legacy OFFIX_DND support code
|
||||
- Fixed the signal handler for crashes (ie, removed it) and made wmaker
|
||||
restarting be made automatically by a monitoring process.
|
||||
- Made NetWM support be enabled by default
|
||||
- Removed old code to store/restore workspace state (now relies on netwm)
|
||||
- Added a (simple) Font Configuration for fontconfig fonts
|
||||
- MacOS X style window switching panel (navigate through windows with Alt-Tab
|
||||
or arrow keys)
|
||||
- Added support for NET_WM_NAME/NET_WM_ICON_NAME
|
||||
- Moved out font name conversion code from getstyle/setstyle/convertfonts and
|
||||
made it support fontsets
|
||||
- Converted all menu and po files to UTF-8
|
||||
- Updated de.po (Thomas Otto <3.1415926535897932384626433832@gmx.net>)
|
||||
- Fixed a crash bug when switching workspaces
|
||||
- Removed obsoleted scripts from util: wsetfont, wmchlocale, wcopy, wpaste
|
||||
|
||||
|
||||
Changes since version 0.80.1:
|
||||
.............................
|
||||
|
||||
- Fixed a buffer overflow when allocating a RImage struct.
|
||||
|
||||
|
||||
Changes since version 0.80.0:
|
||||
.............................
|
||||
|
||||
@@ -553,9 +830,9 @@ Changes since version 0.51.2:
|
||||
- fixed focus problem with unfocusable windows
|
||||
- fixed bug in WPrefs that changed EXIT to SHUTDOWN
|
||||
- fixed menu title messup bug in WPrefs
|
||||
- added a dot to mark hidden applications (compile time) (id@windowmaker.org)
|
||||
- enhancements to the modelock patch (id@windowmaker.org)
|
||||
- show kbd mode for modelock (id@windowmaker.org)
|
||||
- added a dot to mark hidden applications (compile time) (id@windowmaker.info)
|
||||
- enhancements to the modelock patch (id@windowmaker.info)
|
||||
- show kbd mode for modelock (id@windowmaker.info)
|
||||
- enhanced positioning of transient windows
|
||||
- added dynamically loadable texture renderer code
|
||||
from Tobias Gloth <gloth@online.de>
|
||||
@@ -1396,7 +1673,7 @@ Changes since version 0.14.1:
|
||||
They are icons for dock, clip, defaultAppIcon, sound server and for xterm.
|
||||
All the rest needed for apps that can be started from menu, and have entries
|
||||
in WMWindowAttributes, are in WindowMaker-data.tar.gz which can be found on
|
||||
http://windowmaker.org/ or ftp://ftp.windowmaker.org/pub/contrib/icons
|
||||
http://windowmaker.info/ or ftp://ftp.windowmaker.info/pub/contrib/icons
|
||||
- Changed the SlideWindow() function to better adapt to slow machines. Also
|
||||
the animation constants are now run time. They are IconSlideDelay = 0;
|
||||
IconSlideStep = 5; and IconSlideSlowDown = 50; See NEWS for a more in depth
|
||||
@@ -1464,7 +1741,7 @@ Changes since version 0.14.0:
|
||||
or exiting, while an Attribute Editor panel is open.
|
||||
- Put clip.tif, clip.png, clip.xpm, clip2.tif, clip2.xpm, Cone.xpm and
|
||||
Penguin.xpm in WindowMaker-data_tar.gz. These are icons intended for fiend.
|
||||
It can be found on ftp://ftp.windowmaker.org/pub/wmaker/contrib/icons
|
||||
It can be found on ftp://ftp.windowmaker.info/pub/wmaker/contrib/icons
|
||||
|
||||
|
||||
|
||||
|
||||
70
FAQ
70
FAQ
@@ -143,7 +143,7 @@ here for example screenshots.
|
||||
1.2 Where can I get Window Maker?
|
||||
----------------------------------
|
||||
The official site to get new developmental versions from is
|
||||
ftp://ftp.windowmaker.org/pub/beta/srcs/.
|
||||
ftp://ftp.windowmaker.info/pub/beta/srcs/.
|
||||
|
||||
NOTE: Also see http://wm.current.nu/downloads.html for the latest
|
||||
Stable and Development versions.
|
||||
@@ -158,10 +158,10 @@ crash.
|
||||
|
||||
1.3 Where are the mailing list archives?
|
||||
----------------------------------------
|
||||
Phillip Smith from Netplex, our wonderful provider of windowmaker.org, has set
|
||||
up some new lists from the domain. Please read the information on the web
|
||||
pages at http://www.windowmaker.org/lists.html for information on how to
|
||||
subscribe, the posting guidelines, and how to access the web archives.
|
||||
Phillip Smith from Netplex, our wonderful provider of windowmaker.info, has
|
||||
set up some new lists from the domain. Please read the information on the
|
||||
web pages at http://www.windowmaker.info/lists.html for information on how
|
||||
to subscribe, the posting guidelines, and how to access the web archives.
|
||||
|
||||
Many thanks to Ed Orcutt who hosted the original lists from his own machine
|
||||
for many years and Caldera who graciously allowed Ed to continue hosting
|
||||
@@ -172,7 +172,7 @@ valuable service for many years and we are sad to see him go.
|
||||
1.4 Where is more documentation on configuring Window Maker?
|
||||
----------------------------------
|
||||
Besides the mailing list archives, there are nice documents in
|
||||
ftp://ftp.windowmaker.org/pub/docs/, at
|
||||
ftp://ftp.windowmaker.info/pub/docs/, at
|
||||
http://wm.current.nu/downloads.html on my download page and at
|
||||
http://wm.current.nu/user-guide/index.htm in the online user-guide.
|
||||
|
||||
@@ -204,7 +204,7 @@ entries and only require a moderator approval before being posted.
|
||||
----------------------------------
|
||||
You can look at the BUGFORM file in your tarball of Window Maker.
|
||||
Alternatively, you can use the Window Maker Bugtracker at
|
||||
http://windowmaker.org/cgi-bin/bugs.
|
||||
http://windowmaker.info/cgi-bin/bugs.
|
||||
|
||||
|
||||
1.8. Is there an anomymous cvs server?
|
||||
@@ -365,8 +365,8 @@ for your convenience.
|
||||
|
||||
|
||||
2.8 Can I use WindowMaker with KDE or GNOME or CDE?
|
||||
----------------------------------
|
||||
Contrary to a lot of people thinks, KDE is NOT a window manager. KDE is
|
||||
---------------------------------------------------
|
||||
Contrary to what a lot of people think, KDE is NOT a window manager. KDE is
|
||||
a suite of various applications that includes a custom window manager (kwm).
|
||||
The same is true for CDE.
|
||||
|
||||
@@ -386,7 +386,7 @@ mouse.
|
||||
|
||||
|
||||
2.9 How do I get Window Maker working with xdm in Redhat 5.[01]?
|
||||
----------------------------------
|
||||
----------------------------------------------------------------
|
||||
After running wmaker.inst and letting it write to .xinitrc,
|
||||
cp .xinitrc .xsession
|
||||
and make sure that /usr/local/bin is in your $PATH for the Xserver. You can
|
||||
@@ -1074,27 +1074,40 @@ to force the modification time into the future.
|
||||
4.16 How can I set dock/clip to use single click to launch
|
||||
applications, instead of double click?
|
||||
----------------------------------
|
||||
You cannot do this. This is because single click is used to select app-icons,
|
||||
or to raise/lower the app-icon or the dock/clip.
|
||||
If this is impelmented then you will be unable to select or raise/lower
|
||||
dock/clip or app-icons, without also launching the application it represents.
|
||||
This question was officially answered as follows:
|
||||
|
||||
So don't ask for this to be implemented, because it will not be. Double
|
||||
click is used for a reason, is not just some weird idea we got in a morning
|
||||
when we wake up too early.
|
||||
You cannot do this. This is because single click is used to select
|
||||
app-icons, or to raise/lower the app-icon or the dock/clip. If
|
||||
this is impelmented then you will be unable to select or
|
||||
raise/lower dock/clip or app-icons, without also launching the
|
||||
application it represents.
|
||||
|
||||
So don't ask for this to be implemented, because it will not
|
||||
be. Double click is used for a reason, is not just some weird idea
|
||||
we got in a morning when we wake up too early.
|
||||
|
||||
Regardless of that, there is now an option in WPrefs, under "Expert
|
||||
User Preferences," which allows you to set "Launch applications and
|
||||
restore windows with a single click." (See the files contrib/README
|
||||
and contrib/single_click.diff in the source package for details.)
|
||||
|
||||
If you set that option, a left button single click will launch or
|
||||
restore, rather than select, the app-icon. You can use other methods
|
||||
(or temporarily turn the option off again) to select app-icons or
|
||||
raise/lower the dock/clip. You can toggle the selected state of any
|
||||
app-icon via its right button menu, and there are auto-raise and
|
||||
keep-on-top options for the dock and clip.
|
||||
|
||||
|
||||
4.18 How do I restore the configuration app to the dock?
|
||||
----------------------------------]
|
||||
You should start it from a terminal using its full path name, which is
|
||||
/usr/local/GNUstep/Apps/WPrefs.app/WPrefs
|
||||
/usr/local/GNUstep/Applications/WPrefs.app/WPrefs
|
||||
by default.
|
||||
|
||||
|
||||
4.19 How do I define my own icon for a program? I don't like the one it
|
||||
supplies.
|
||||
supplies.
|
||||
----------------------------------
|
||||
Right-click the titlebar of the running application and start the Attributes
|
||||
Editor. Check the "Ignore client supplied icon" box. "Apply" and "Save",
|
||||
@@ -1179,10 +1192,10 @@ Several Nice applications are available:
|
||||
http://www.geocities.com/SiliconValley/Vista/2471/linux.htm#xapps
|
||||
|
||||
ascd,WMRack,asmixer,asmodem, and others
|
||||
ftp://ftp.windowmaker.org/pub/wmaker/contrib/srcs/apps/
|
||||
ftp://ftp.windowmaker.info/pub/wmaker/contrib/srcs/apps/
|
||||
|
||||
wmavgload, wmmount, and wmload
|
||||
ftp://ftp.windowmaker.org/pub/wmaker/contrib/srcs/utils/
|
||||
ftp://ftp.windowmaker.info/pub/wmaker/contrib/srcs/utils/
|
||||
|
||||
wmppp-wmifs, wmtime, wmmon and other nifty apps
|
||||
http://windowmaker.mezaway.org/
|
||||
@@ -1298,14 +1311,8 @@ in routines/xsci/jpc_SGraph.c
|
||||
5.12 Netscape shows black and white icons
|
||||
----------------------------------
|
||||
|
||||
This is because Netscape uses monochrome icons when running under olwm
|
||||
and you are using the OPEN LOOK emulation option. If you do not use any XView
|
||||
apps anyway, recompile Window Maker without the --enable-openlook option.
|
||||
If you need OPEN LOOK emulation, you will have to get used to the monochrome
|
||||
icons or change then manually in the Attributes panel for each window.
|
||||
I have also seen this happen on some systems if you run Netscape in a high
|
||||
colour depth (32bpp) regardless of whether you're using openlook or not.
|
||||
That is a Netscape bug. Therefore, bug Netscape.
|
||||
I have seen this happen on some systems if you run Netscape in a high
|
||||
colour depth (32bpp). That is a Netscape bug. Therefore, bug Netscape.
|
||||
|
||||
|
||||
5.13 Snow flakes from xsnow don't acumulate on titlebars!
|
||||
@@ -1457,11 +1464,14 @@ the files manually. Or download the whole distribution.
|
||||
|
||||
|
||||
7.5 Will you add GNOME or KDE support?
|
||||
----------------------------------
|
||||
--------------------------------------
|
||||
|
||||
Support for GNOME (and KDE) hints is included since 0.50.0. You have to
|
||||
enable them at compile-time using the appropriate arguments to ./configure.
|
||||
Please read the INSTALL file for more details.
|
||||
Note: starting with version 0.90.0, support for legacy Gnome-1.x and KDE-2.x
|
||||
was dropped in favor of NETWM support (used by both Gnome-2.x and KDE-3.x)
|
||||
|
||||
|
||||
-=-=-=-=-
|
||||
Themes:
|
||||
|
||||
35
FAQ.I18N
35
FAQ.I18N
@@ -32,24 +32,35 @@ If I18N support does not work for you, check these:
|
||||
here:
|
||||
ftp://ftp.linux.or.jp/pub/RPM/glibc
|
||||
|
||||
- if you'd like to display multibyte characters, set the
|
||||
MultiByteText option to YES in ~/GNUstep/Defaults/WindowMaker
|
||||
and ~/GNUstep/Defaults/WMGLOBAL
|
||||
|
||||
- the fonts you're using support your locale. if your font
|
||||
setting on $HOME/GNUstep/Defaults/WindowMaker is like..
|
||||
|
||||
WindowTitleFont = "-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-*-*";
|
||||
MenuTitleFont = "-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-*-*";
|
||||
WindowTitleFont = "Trebuchet MS:bold:pixelsize=12";
|
||||
MenuTitleFont = "Trebuchet MS:bold:pixelsize=12";
|
||||
......................................................
|
||||
|
||||
then you can't display non iso8859-x charcters by helvetica.
|
||||
so quick way to display various languages' font is to change
|
||||
all the font settings into:
|
||||
|
||||
"-*-*-medium-r-normal-*-14-*-*-*-*-*-*-*"
|
||||
then you can't display asian language (ja,ko,ch) characters using
|
||||
Trebuchet MS. A font that is guaranteed to work for any language is
|
||||
sans (or sans-serif). sans is not a font itself, but an alias which
|
||||
points to multiple fonts and will load the first in that list that
|
||||
has the ability to show glyphs in your language. If you don't know
|
||||
a font that is suited for you language you can always set all your
|
||||
fonts to something like:
|
||||
|
||||
and also you need to change font settings in style files in
|
||||
"sans:pixelsize=12"
|
||||
|
||||
However, please note that if your font is something like:
|
||||
|
||||
"Trebuchet MS,Luxi Sans,sans:pixelsize=12"
|
||||
|
||||
this will not be able to display asian languages if any of the
|
||||
previous fonts before sans are installed. This is because unlike
|
||||
the proper font pickup that sans guarantees for your language,
|
||||
this construct only allows a font fallback mechanism, which tries
|
||||
all the fonts in the list in order, until it finds one that is
|
||||
available, even if it doesn't support your language.
|
||||
|
||||
Also you need to change font settings in style files in
|
||||
the "$HOME/Library/WindowMaker/Style" directory.
|
||||
|
||||
- the LC_CTYPE environment variable is unset or it has the correct
|
||||
|
||||
@@ -44,12 +44,6 @@ Pokud v
|
||||
|
||||
ftp://ftp.linux.or.jp/pub/RPM/glibc
|
||||
|
||||
- pokud chcete zobrazovat multibyte znaky, nastavte volbu MultiByteText
|
||||
na YES v souborech:
|
||||
|
||||
~/GNUstep/Defaults/WindowMaker
|
||||
~/GNUstep/Defaults/WMGLOBAL
|
||||
|
||||
- fonty, které používáte by měli být podporované vaším místním nastavením.
|
||||
Jestliže vaše nastavení fontů v souboru ~/GNUstep/Defaults/WindowMaker
|
||||
vypadá takto:
|
||||
|
||||
@@ -35,10 +35,6 @@ Ak v
|
||||
|
||||
ftp://ftp.linux.or.jp/pub/RPM/glibc
|
||||
|
||||
- ak chcete zobrazovať multibyte znaky, nastavte možnosť
|
||||
MultiByteText YES v ~/GNUstep/Defaults/WindowMaker a
|
||||
~/GNUstep/Defaults/WMGLOBAL
|
||||
|
||||
- fonty, ktoré používate, podporujú vaše miesne nastavenia.
|
||||
Ak vaše nastavenia fontov v ~/GNUstep/Defaults/WindowMaker
|
||||
vyzerajú takto:
|
||||
|
||||
108
INSTALL
108
INSTALL
@@ -64,23 +64,18 @@ The following software is required to use Window Maker:
|
||||
The following is required to build Window Maker:
|
||||
|
||||
- Basic obvious stuff
|
||||
If you will build Window Maker, make sure you have gcc (or some
|
||||
other ANSI C compiler) and the X header files installed. Specially
|
||||
for newbie Linux users: you must install all X development packages
|
||||
and the gcc suite. Otherwise you won't be able to build any X
|
||||
program, including Window Maker.
|
||||
gcc (or some other ANSI C compiler)
|
||||
glibc development files (usually glibc-devel in Linux distributions)
|
||||
X development files (XFree86-devel or something similar)
|
||||
|
||||
- autoconf, automake and libtool
|
||||
These tools are NOT needed, but IF you have one or
|
||||
more of them installed, make sure you have ALL of the following
|
||||
with exactly these versions:
|
||||
autoconf 2.52
|
||||
automake 1.4
|
||||
libtool 1.4.2
|
||||
If you have a different version, disable them by temporarily
|
||||
renaming them to something else or uninstalling them from your
|
||||
system. If you don't develop software you don't need them,
|
||||
so you can safely uninstall.
|
||||
autoconf 2.54
|
||||
automake 1.4
|
||||
libtool 1.4.2
|
||||
|
||||
- Xft2
|
||||
and its dependencies (such as freetype2 and fontconfig)
|
||||
You will also need the development files for it (xft2-devel)
|
||||
|
||||
|
||||
OPTIONAL:
|
||||
@@ -115,11 +110,6 @@ might work too.
|
||||
For GIF image support
|
||||
ftp://prtr-13.ucsc.edu/pub/libungif/
|
||||
|
||||
- libHermes 1.3.2 or newer
|
||||
For faster pixel conversion in the wraster library
|
||||
(its used only in some conversions - for TrueColor visuals)
|
||||
http://www.clanlib.org/hermes/
|
||||
|
||||
- GNU xgettext
|
||||
If you want to use translated messages, you will need GNU gettext.
|
||||
Other versions of gettext are not compatible and will not work.
|
||||
@@ -130,13 +120,19 @@ might work too.
|
||||
CONFIGURE OPTIONS:
|
||||
==================
|
||||
|
||||
If you downloaded the cvs or git versions, type
|
||||
|
||||
./autogen.sh
|
||||
|
||||
to generate the config files.
|
||||
|
||||
These options can be passed to the configure script to enable/disable
|
||||
some Window Maker features. Example:
|
||||
|
||||
./configure --enable-kde --enable-gnome
|
||||
|
||||
will configure Window Maker with KDE and GNOME supported compiled in.
|
||||
./configure --enable-modelock --disable-gif
|
||||
|
||||
will configure Window Maker with modelock supported and disable gif support.
|
||||
Normally, you won't need any of them.
|
||||
|
||||
To get a list of other options, run ./configure --help
|
||||
|
||||
@@ -158,15 +154,6 @@ To get a list of other options, run ./configure --help
|
||||
--disable-motif
|
||||
disable support for mwm window manager hints
|
||||
|
||||
--enable-openlook
|
||||
enable support for OPEN LOOK(tm) window manager hints
|
||||
|
||||
--enable-gnome
|
||||
enable support for GNOME window manager hints
|
||||
|
||||
--enable-kde
|
||||
enable support for kde/kwm window manager hints
|
||||
|
||||
--enable-lite
|
||||
remove things that are already supported in desktop environments,
|
||||
like KDE and GNOME. Disabled things are: window list, root
|
||||
@@ -283,27 +270,6 @@ apply.
|
||||
* make sure you have /usr/local/lib in /etc/ld.so.conf before running
|
||||
ldconfig;
|
||||
|
||||
* if you have problems that mention an error message with --no-reexec
|
||||
uninstall libtool-1.2b and install libtool-1.3 instead. libtool-1.3
|
||||
can be found in ftp.gnu.org Also read the TROUBLESHOOTING section;
|
||||
|
||||
* if you installed the Window Maker package from RedHat and are
|
||||
installing a new version of it by hand (compiling yourself), uninstall
|
||||
the package from RedHat before.
|
||||
|
||||
* make sure you have a symbolic link from /usr/include/X11 to
|
||||
/usr/X11R6/include/X11 (if not, type ln -s /usr/X11R6/include/X11
|
||||
/usr/include/X11 )
|
||||
|
||||
* make sure you have /lib/cpp pointing to the cpp program
|
||||
|
||||
If you have any doubts in doing any of the stuff above, please
|
||||
don't hesitate to contact the RedHat user support. They will
|
||||
kindly answer to all your questions regarding their system.
|
||||
They also know much more about their own system than us
|
||||
(we don't use RedHat).
|
||||
|
||||
|
||||
- PowerPC MkLinux
|
||||
You will need to have the latest version of Xpmac. Older versions
|
||||
seem to have bugs that cause the system to hang.
|
||||
@@ -357,9 +323,9 @@ following.
|
||||
to get a complete listing of other options that are available.
|
||||
|
||||
2. Run configure with the options you want. For example, if you
|
||||
want to use the --enable-kde option, type:
|
||||
want to use the --enable-modelock option, type:
|
||||
|
||||
./configure --enable-kde
|
||||
./configure --enable-modelock
|
||||
|
||||
3. (optional) Edit src/wconfig.h with your favorite text editor
|
||||
and browse through it for some options you might want to change.
|
||||
@@ -406,7 +372,7 @@ Installing the extras package
|
||||
|
||||
Unpack WindowMaker-extra-<version-number>.tar.gz in /usr/local/share
|
||||
|
||||
You can get the file at ftp://ftp.windowmaker.org. This file is optional
|
||||
You can get the file at ftp://ftp.windowmaker.info. This file is optional
|
||||
and only have a few icons, and themes. Look for the latest <version-number>
|
||||
available.
|
||||
Also there is a WindowMaker-extra.readme to instruct you where that package
|
||||
@@ -423,7 +389,7 @@ when running configure in step 2 of building Window Maker. You will
|
||||
also need to supply the --with-appspath option, to specify the path for
|
||||
WPrefs.app Example:
|
||||
|
||||
./configure --prefix=/home/jshmoe --with-appspath=/home/jshmoe/GNUstep/Apps
|
||||
./configure --prefix=/home/jshmoe --with-appspath=/home/jshmoe/GNUstep/Applications
|
||||
|
||||
|
||||
Then make /home/jshmoe/bin be included in your search PATH, add
|
||||
@@ -572,31 +538,3 @@ menu.pt
|
||||
menu
|
||||
|
||||
|
||||
5 - If you chose a language that uses multi-byte characters, you must
|
||||
configure the fonts appropriately. Read the manual page for XCreateFontSet
|
||||
to have more details about it. You must change the ~/G/D/WindowMaker file
|
||||
for fonts used in titlebars, menus and other things. For fonts used in
|
||||
dialog windows, change ~/G/D/WMGLOBAL. The %d in the font names must not be
|
||||
removed. You can also use the supplied wsetfont script for the task.
|
||||
Read the script itself for instructions.
|
||||
|
||||
For example, you can specify the following in ~/G/D/WindowMaker:
|
||||
|
||||
WindowTitleFont = "-*-helvetica-bold-r-normal-*-12-*,-*-*-medium-r-normal-*-14-*";
|
||||
MenuTitleFont = "-*-helvetica-bold-r-normal-*-12-*,-*-*-medium-r-normal-*-14-*";
|
||||
MenuTextFont = "-*-helvetica-medium-r-normal-*-12-*,-*-*-medium-r-normal-*-14-*";
|
||||
IconTitleFont = "-*-helvetica-medium-r-normal-*-8-*,-*-*-medium-r-normal-*-12-*";
|
||||
ClipTitleFont = "-*-helvetica-bold-r-normal-*-10-*,-*-*-medium-r-normal-*-12-*";
|
||||
DisplayFont = "-*-helvetica-medium-r-normal-*-12-*,-*-*-medium-r-normal-*-12-*";
|
||||
|
||||
and in ~/G/D/WMGLOBAL:
|
||||
|
||||
SystemFont = "-*-*-medium-r-normal-*-%d-*-*-*-*-*-*-*";
|
||||
BoldSystemFont = "-*-*-medium-r-normal-*-%d-*-*-*-*-*-*-*";
|
||||
|
||||
The above 2 fonts are only used by applications that use WINGs (WindowMaker
|
||||
and WPrefs.app)
|
||||
|
||||
The wsetfont script that's supplied will allow you to change the font
|
||||
settings in a easier way. Take a look in the script for details on usage.
|
||||
|
||||
|
||||
22
INSTALL.cs
22
INSTALL.cs
@@ -64,9 +64,9 @@ N
|
||||
Tyto nástroje NEJSOU POTŘEBA, ale když máte jeden nebo dva nebo
|
||||
všechny tři nainstalované, tak se UJISTĚTE, že máte přesně
|
||||
následující VERZE:
|
||||
autoconf 2.13
|
||||
autoconf 2.54
|
||||
automake 1.4
|
||||
libtool 1.3
|
||||
libtool 1.4.2
|
||||
Máte-li odlišnou verzi, tak ji dočasně přejmenujte, nebo ji rovnou
|
||||
odinstalujte z vašeho systému. Pokud nebudete programovat, tak ji
|
||||
stejně nebudete potřebovat, takže ji můžete bezpečně odinstalovat.
|
||||
@@ -106,11 +106,6 @@ garantuje,
|
||||
Pro podporu GIF obrázků
|
||||
Dostupné na ftp://prtr-13.ucsc.edu/pub/libungif/
|
||||
|
||||
- libHermes 1.3.2 nebo novější
|
||||
Pro rychlejší konverzi obrázků (používá knihovna wraster)
|
||||
Používá se pouze v některých konverzích - pro TrueColor zobrazení
|
||||
http://www.clanlib.org/hermes/
|
||||
|
||||
-GNU xgettxt
|
||||
Když chcete používat češtinu nebo jiné jazyky kromě angličtiny,
|
||||
tak potřebujete GNU xgettext.
|
||||
@@ -158,15 +153,6 @@ Seznam ostatn
|
||||
--disable-motif
|
||||
zakáže podporu pokynů pro okenní manažer mwm.
|
||||
|
||||
--enable-openlook
|
||||
povolí podporu pokynů pro okenní manažer OPEN LOOK(tm).
|
||||
|
||||
--enable-gnome
|
||||
povolí podporu pokynů pro GNOME.
|
||||
|
||||
--enable-kde
|
||||
povolí podporu pokynů pro KDE.
|
||||
|
||||
--enable-lite
|
||||
odstraní nástroje a funkce, které jsou už dostupné v desktopových
|
||||
prosředích KDE a GNOME. Odstraní se: seznam oken, menu aplikací,
|
||||
@@ -425,7 +411,7 @@ Instalov
|
||||
|
||||
Rozbalte WindowMaker-extra-<číslo_verze>.tar.gz v adresáři /usr/local/share
|
||||
|
||||
Tento soubor si můžete sehnat na adrese: ftp://ftp.windowmaker.org. Instalace
|
||||
Tento soubor si můžete sehnat na adrese: ftp://ftp.windowmaker.info. Instalace
|
||||
tohoto souboru vůbec není nutná. tento balíček obsahuje několik ikon a témat.
|
||||
Hledejte poslední dostupnou verzi. V balíčku také naleznete soubor
|
||||
WindowMaker-extra.readme, který vám poradí, co máte udělat.
|
||||
@@ -440,7 +426,7 @@ domovsk
|
||||
cestu pro WPrefs.app.
|
||||
Příklad:
|
||||
|
||||
./configure --prefix=/home/karel --with-appspath=/home/karel/GNUstep/Apps
|
||||
./configure --prefix=/home/karel --with-appspath=/home/karel/GNUstep/Applications
|
||||
|
||||
Potom přidejte adresář /home/karel/bin do systémové proměnné PATH a adresář
|
||||
/home/karel/lib do sytémové proměnné LD_LIBRARY_PATH a nakonec spusťte
|
||||
|
||||
22
INSTALL.es
22
INSTALL.es
@@ -69,7 +69,7 @@ Lo siguiente se necesita para compilar Window Maker:
|
||||
compilar ningún programa X, incluyendo Window Maker.
|
||||
|
||||
- libPropList
|
||||
Esta biblioteca se puede encontrar en ftp://ftp.windowmaker.org/pub/libs
|
||||
Esta biblioteca se puede encontrar en ftp://ftp.windowmaker.info/pub/libs
|
||||
o en ftp://ftp.gnome.org/pub/libPropList
|
||||
Instálela antes de compilar Window Maker.
|
||||
|
||||
@@ -78,9 +78,9 @@ Lo siguiente se necesita para compilar Window Maker:
|
||||
instaladas, asegúrese de tener TODO lo siguiente con estas versiones
|
||||
exactas:
|
||||
|
||||
autoconf 2.13
|
||||
autoconf 2.54
|
||||
automake 1.4
|
||||
libtool 1.3
|
||||
libtool 1.4.2
|
||||
|
||||
Si tiene una versión distinta, desactívelas temporalemte renombrándolas
|
||||
a otras cosa o desinstalándolas desde su sistema. Si no desarrolla
|
||||
@@ -122,11 +122,6 @@ Estas bibliotecas no son necesarias para hacer que Window Maker funcione,
|
||||
Para soporte de imagen GIF.
|
||||
ftp://prtr-13.ucsc.edu/pub/libungif/
|
||||
|
||||
- libHermes 1.3.2 o más actual
|
||||
Para conversión a pixel más rápida en la biblioteca wraster.
|
||||
(se usa solo en algunas conversiones - para visuales Color Verdadero)
|
||||
http://www.clanlib.org/hermes/
|
||||
|
||||
- GNU xgettext
|
||||
Si quiere usar mensajes traducidos, necesitará GNU gettext.
|
||||
Otras versiones de gettext no son compatibles y no funcionarán.
|
||||
@@ -170,15 +165,6 @@ Para obtener una lista de otras opciones, ejecute ./configure --help
|
||||
--disable-motif
|
||||
desactiva el soporte para el gestor de ventanas mwm.
|
||||
|
||||
--enable-openlook
|
||||
activa el soporte para el gestor de ventanas OPEN LOOK(tm)
|
||||
|
||||
--enable-gnome
|
||||
activa el soporte para el gestor de ventanas GNOME.
|
||||
|
||||
--enable-kde
|
||||
activa el soporte para el gestor de ventanas kde/kwm.
|
||||
|
||||
--enable-lite
|
||||
quita cosas que ya están soportadas en los entornos de escritorio,
|
||||
tal como KDE y Gnome. Desactiva cosas como: lista de ventanas,
|
||||
@@ -427,7 +413,7 @@ opci
|
||||
También necesitará proporcionar la opción --with-appspath, para especificar la ruta
|
||||
para WPrefs.app. Ejemplo:
|
||||
|
||||
./configure --prefix=/home/jshmoe --with-appspath=/home/jshmoe/GNUstep/Apps
|
||||
./configure --prefix=/home/jshmoe --with-appspath=/home/jshmoe/GNUstep/Applications
|
||||
|
||||
Luego haga /home/jshmoe/bin para que se lo incluya en su ruta de búsqueda, agregue
|
||||
/home/jshmoe/lib a su variable de entorno LD_LIBRARY_PATH y ejecute bin/wmaker.inst
|
||||
|
||||
56
INSTALL.fr
56
INSTALL.fr
@@ -3,9 +3,9 @@
|
||||
|
||||
|
||||
|
||||
PLATEFORMES SUPPORTEES
|
||||
PLATEFORMES SUPPORTÉES
|
||||
======================
|
||||
(c.a.d : j'ai entendu dire que la compilation a été réalisée avec succès sur..)
|
||||
(c.à.d. : j'ai entendu dire que la compilation a été réalisée avec succès sur..)
|
||||
|
||||
- Intel GNU/Linux Conectiva 5.9 (beta)
|
||||
- Intel GNU/Linux Slackware
|
||||
@@ -49,7 +49,7 @@ Tout patch qui pourrait faciliter l'adaptation
|
||||
est le bienvenu.
|
||||
|
||||
|
||||
PRE-REQUIS
|
||||
PRÉ-REQUIS
|
||||
==========
|
||||
|
||||
Les logiciels suivants sont nécessaires à l'utilisation de Window Maker :
|
||||
@@ -77,9 +77,9 @@ Les
|
||||
Ces outils ne sont pas indispensables, mais si au moins l'un d'eux
|
||||
est installé sur votre système, assurez-vous que TOUS le sont, et
|
||||
que les versions de ces outils sont exactement :
|
||||
autoconf 2.13
|
||||
autoconf 2.54
|
||||
automake 1.4
|
||||
libtool 1.3
|
||||
libtool 1.4.2
|
||||
Si les versions installées sur votre système différent, désactivez-les
|
||||
provisoirement, par exemple en les renommant, ou en les désinstallant
|
||||
de votre système. Si vous ne développez ni de compilez de logiciels,
|
||||
@@ -120,18 +120,10 @@ fonctionner aussi bien.
|
||||
Pour pouvoir utiliser les images au format GIF.
|
||||
ftp://prtr-13.ucsc.edu/pub/libungif/
|
||||
|
||||
- libHermes 1.3.2 ou plus récent
|
||||
Pour une conversion de pixels plus rapide dans la librairie wraster.
|
||||
(utilisé uniquement pour des conversions spécifiques dont les modes
|
||||
vidéo TrueColor)
|
||||
http://www.clanlib.org/hermes/
|
||||
|
||||
- GNU xgettext
|
||||
Si vous voulez disposer des traductions en d'autres langues, GNU gettext
|
||||
est nécessaire. Les autres versions de gettext sont incompatibles et ne
|
||||
fonctionneront pas.
|
||||
If you want to use translated messages, you will need GNU gettext.
|
||||
Other versions of gettext are not compatible and will not work.
|
||||
Vous trouverez la version GNU sur ftp://ftp.gnu.org
|
||||
|
||||
|
||||
@@ -149,12 +141,12 @@ configurera Window Maker avec le support int
|
||||
Afin d'obtenir la liste des autres options, exécutez ./configure --help
|
||||
|
||||
--with-libs-from
|
||||
ajoute des chemins d"accès pour la recherche des librairies.
|
||||
ajoute des chemins d'accès pour la recherche des librairies.
|
||||
L'option -L doit précéder chaque chemin d'accès, comme suit :
|
||||
--with-libs-from="-L/opt/libs -L/usr/local/lib"
|
||||
|
||||
--with-incs-from
|
||||
ajoute des chemins d"accès pour la recherche des fichiers d'en-tête.
|
||||
ajoute des chemins d'accès pour la recherche des fichiers d'en-tête.
|
||||
L'option -I doit précéder chaque chemin d'accès, comme suit :
|
||||
--with-incs-from="-I/opt/headers -I/usr/local/include"
|
||||
|
||||
@@ -175,18 +167,6 @@ Afin d'obtenir la liste des autres options, ex
|
||||
désactive le support pour les fonctionnalités en rapport avec le gestionnaire
|
||||
de fenêtres mwm.
|
||||
|
||||
--enable-openlook
|
||||
désactive le support pour les fonctionnalités en rapport avec le gestionnaire
|
||||
de fenêtres OPEN LOOK(tm).
|
||||
|
||||
--enable-gnome
|
||||
désactive le support pour les fonctionnalités en rapport avec le gestionnaire
|
||||
de fenêtres GNOME.
|
||||
|
||||
--enable-kde
|
||||
désactive le support pour les fonctionnalités en rapport avec le gestionnaire
|
||||
de fenêtres kde/kwm.
|
||||
|
||||
--enable-lite
|
||||
désactive des fonctionnalités déjà prises en compte par les gestionnaires de
|
||||
bureau tels que KDE et GNOME. Celà concerne : la liste de fenêtres, le menu
|
||||
@@ -223,7 +203,7 @@ Afin d'obtenir la liste des autres options, ex
|
||||
désactive l'utilisation de "shaped windows" (pour oclock, xeyes, etc.).
|
||||
|
||||
|
||||
NOTES SPECIFIQUES AUX PLATEFORMES
|
||||
NOTES SPÉCIFIQUES AUX PLATEFORMES
|
||||
=================================
|
||||
|
||||
- machines DEC/Alpha
|
||||
@@ -248,7 +228,7 @@ Sujet : Re : Est-ce que le paquetage WindowMaker fonctionne correctement sur Alp
|
||||
> pour compiler sur Alpha?
|
||||
|
||||
Notez bien : les Alphas dont je me sers ne sont jamais sous X et ne sont pas près
|
||||
de le faire.
|
||||
de l'être.
|
||||
|
||||
Bien souvent, la configuration des Alphas n'inclut qu'un volume ridiculement
|
||||
petit de mémoire partagée. Aussi il n'est pas étonnant qu'un grand nombre
|
||||
@@ -319,7 +299,7 @@ est soumis
|
||||
* si vous rencontrez des messages d'erreur en rapport avec "--no-reexec",
|
||||
désinstallez libtool-1.2b et installez libtool-1.3.
|
||||
libtool-1.3 peut être trouvé sur ftp.gnu.org.
|
||||
Consultez aussi la section PROBLEMES;
|
||||
Consultez aussi la section PROBLÈMES;
|
||||
|
||||
* si vous aviez auparavant installé le paquetage de Window Maker livré
|
||||
avec RedHat et que vous voulez installer maintenant manuellement une nouvelle
|
||||
@@ -365,7 +345,7 @@ INSTALLATION
|
||||
|
||||
Compiler Window Maker
|
||||
---------------------
|
||||
Pour aller vite, tapez ce qui suit sous un prompt shell :
|
||||
Pour aller vite, tapez ce qui suit dans un prompt shell :
|
||||
|
||||
./configure
|
||||
make
|
||||
@@ -375,7 +355,7 @@ puis, loguez-vous en tant que root and tapez :
|
||||
make install
|
||||
ldconfig
|
||||
|
||||
ou, si vous voulez ôter les infos de débogage des exécutables et les
|
||||
ou, si vous voulez ôter les infos de débogage des exécutables et ainsi les
|
||||
rendre plus petits, tapez plutôt :
|
||||
|
||||
make install-strip
|
||||
@@ -398,7 +378,7 @@ pouvez faire :
|
||||
|
||||
./configure --enable-kde
|
||||
|
||||
3. (optionnel) Editez src/wconfig.h avec votre editeur de texte favori et
|
||||
3. (optionnel) Éditez src/wconfig.h avec votre éditeur de texte favori et
|
||||
et modifiez sont contenu à votre guise.
|
||||
|
||||
4. Compilez. Il faut juste taper :
|
||||
@@ -449,7 +429,7 @@ Installation du paquetage additionnel
|
||||
|
||||
Décompressez WindowMaker-extra-<version-number>.tar.gz dans /usr/local/share
|
||||
|
||||
Vous trouverez le fichier sur ftp://ftp.windowmaker.org. Ce paquetage est optionnel,
|
||||
Vous trouverez le fichier sur ftp://ftp.windowmaker.info. Ce paquetage est optionnel,
|
||||
il contient des icônes et des thèmes supplémentaires. Vérifiez que vous avez
|
||||
bien la derniere version de ce paquetage.
|
||||
Il y a aussi un fichier WindowMaker-extra.readme qui indique comment procéder à
|
||||
@@ -467,7 +447,7 @@ l'option --prefix correctement renseign
|
||||
Il est aussi nécessaire d'utiliser l'option --with-appspath, afin de préciser
|
||||
le chemin d'accès à WPrefs.app. Par exemple :
|
||||
|
||||
./configure --prefix=/home/jshmoe --with-appspath=/home/jshmoe/GNUstep/Apps
|
||||
./configure --prefix=/home/jshmoe --with-appspath=/home/jshmoe/GNUstep/Applications
|
||||
|
||||
|
||||
Puis, faites en sorte que /home/jshmoe/bin soit inclus dans votre PATH, ajoutez
|
||||
@@ -477,7 +457,7 @@ bin/wmaker.inst
|
||||
Bien sûr, /home/jshmoe est supposé être remplacé par votre répertoire personnel.
|
||||
|
||||
|
||||
MISE A JOUR
|
||||
MISE À JOUR
|
||||
===========
|
||||
|
||||
Si vous mettez à jour une version plus ancienne de Window Maker :
|
||||
@@ -488,7 +468,7 @@ Si vous mettez
|
||||
si nécessaire.
|
||||
|
||||
|
||||
PROBLEMES
|
||||
PROBLÈMES
|
||||
=========
|
||||
|
||||
Si vous rencontrez des problèmes pendant la phase de configuration, comme par
|
||||
@@ -498,7 +478,7 @@ du fichier config.log, vous y trouverez peut-
|
||||
ce problème.
|
||||
|
||||
|
||||
== erreur de chargement de polices, même si elles existent
|
||||
== erreur de chargement de polices, alors qu'elles existent
|
||||
|
||||
Essayez de recompiler sans le support pour le NLS.
|
||||
|
||||
|
||||
19
INSTALL.pt
19
INSTALL.pt
@@ -61,16 +61,16 @@ Para compilar o Window Maker voc
|
||||
programa X, incluindo o Window Maker.
|
||||
|
||||
- libPropList
|
||||
Você pode achar esta biblioteca em ftp://ftp.windowmaker.org/pub/libs ou
|
||||
Você pode achar esta biblioteca em ftp://ftp.windowmaker.info/pub/libs ou
|
||||
ftp://ftp.gnome.org/pub/libPropList. Você deve instalar corretamente
|
||||
esta biblioteca antes de instalar o Window Maker.
|
||||
|
||||
- autoconf, automake and libtool
|
||||
Estes pacotes não são necessários, mas se você tiver um ou mais deles instalados,
|
||||
verifique se todos eles são das seguintes versões:
|
||||
autoconf 2.13
|
||||
autoconf 2.54
|
||||
automake 1.4
|
||||
libtool 1.3
|
||||
libtool 1.4.2
|
||||
Se você possui uma versão diferente, desative-os mudando os nomes dos arquivos
|
||||
para outra coisa ou removendo-os do seu sistema. Se você não desenvolve
|
||||
software você não precisa deles, logo, você pode desinstalá-los com segurança.
|
||||
@@ -155,15 +155,6 @@ Para obter uma lista com outras opcoes, execute ./configure --help:
|
||||
--disable-motif
|
||||
Desativa compatibilidade com gerenciador de janelas mwm.
|
||||
|
||||
--enable-openlook
|
||||
Ativa compatibilidade com gerenciador de janelas OPEN LOOK(tm).
|
||||
|
||||
--enable-gnome
|
||||
Ativa compatibilidade com gerenciador de janelas GNOME.
|
||||
|
||||
--enable-kde
|
||||
Ativa compatibilidade com gerenciador de janelas kde/kwm.
|
||||
|
||||
--enable-lite
|
||||
Remove coisas que já são suportadas em ambientes desktops como o KDE
|
||||
e o GNOME. As opções desativadas são: lista de janelas (window list), menu de
|
||||
@@ -291,7 +282,7 @@ INSTALA
|
||||
|
||||
Desempacote o WindowMaker-extra-<numero-da-versao>.tar.gz no /usr/local/share.
|
||||
|
||||
Você pode pegar o arquivo no site ftp://ftp.windowmaker.org. Este arquivo
|
||||
Você pode pegar o arquivo no site ftp://ftp.windowmaker.info. Este arquivo
|
||||
é opcional e possui alguns ícones e temas. Procure pelo último <número-da-versão>
|
||||
disponível.
|
||||
Ainda há o WindowMaker-extra.readme para instruí-lo sobre onde o pacote deve ir.
|
||||
@@ -382,7 +373,7 @@ Compilando o Window Maker.
|
||||
Você ainda precisará fornecer a opção --with-appspath, para especificar o
|
||||
caminho do WPrefs.app. Exemplo:
|
||||
|
||||
./configure --prefix=/home/jshmoe --with-appspath=/home/jshmoe/GNUstep/Apps
|
||||
./configure --prefix=/home/jshmoe --with-appspath=/home/jshmoe/GNUstep/Applications
|
||||
|
||||
Depois faça com que /home/jshome/bin seja incluído na variável PATH, adicione
|
||||
/home/jshome/lib na variável de ambiente LD_LIBRARY_PATH e rode bin/wmaker.inst
|
||||
|
||||
19
INSTALL.sk
19
INSTALL.sk
@@ -64,16 +64,16 @@ Nasledovn
|
||||
Window Maker.
|
||||
|
||||
- libPropList
|
||||
Túto kni¾nicu mo¾no nájs» na ftp://ftp.windowmaker.org/pub/libs alebo
|
||||
Túto kni¾nicu mo¾no nájs» na ftp://ftp.windowmaker.info/pub/libs alebo
|
||||
ftp://ftp.gnome.org/pub/libPropList. Nain¹talujte ju pred kompiláciou
|
||||
Window Makera.
|
||||
|
||||
- autoconf, automake a libtool
|
||||
Tieto nástroje NIE sú potrebné, ale ak máte niektoré z nich nain¹talo-
|
||||
vané, uistite sa, ¾e V©ETKY sú presne nasledovné verzie:
|
||||
autoconf 2.13
|
||||
autoconf 2.54
|
||||
automake 1.4
|
||||
libtool 1.3
|
||||
libtool 1.4.2
|
||||
Ak máte odli¹né verzie, odin¹talujte ich alebo ich doèasne premenujte.
|
||||
Ak neprogramujete, nebudete ich potrebova» a teda ich mô¾ete
|
||||
odin¹talova».
|
||||
@@ -161,15 +161,6 @@ Zoznam v
|
||||
--disable-motif
|
||||
zaká¾e podporu pre pokyny mana¾éra okien wmw
|
||||
|
||||
--enable-openlook
|
||||
povolí podporu pre pokyny mana¾éra okien OPEN LOOK(tm)
|
||||
|
||||
--enable-gnome
|
||||
povolí podporu pre pokyny mana¾éra okien GNOME
|
||||
|
||||
--enable-kde
|
||||
povolí podporu pre pokyny mana¾éra okien kde/kwm
|
||||
|
||||
--enable-lite
|
||||
odstráni veci, ktoré sa u¾ nachádzajú v desktopových prostrediach
|
||||
ako KDE a GNOME. Odstránené veci sú: zoznam okien, menu aplikácií,
|
||||
@@ -409,7 +400,7 @@ Installing the extras package
|
||||
|
||||
Unpack WindowMaker-extra-<version-number>.tar.gz in /usr/local/share
|
||||
|
||||
You can get the file at ftp://ftp.windowmaker.org. This file is optional
|
||||
You can get the file at ftp://ftp.windowmaker.info. This file is optional
|
||||
and only have a few icons, and themes. Look for the latest <version-number>
|
||||
available.
|
||||
Also there is a WindowMaker-extra.readme to instruct you where that package
|
||||
@@ -426,7 +417,7 @@ v druhom kroku kompil
|
||||
--with-appspath, pomocou ktorej ¹pecifikujete cestu pre WPrefs.app.
|
||||
Príklad:
|
||||
|
||||
./configure --prefix=/home/jshome --with-appspath=/home/jshome/GNUstep/Apps
|
||||
./configure --prefix=/home/jshome --with-appspath=/home/jshome/GNUstep/Applications
|
||||
|
||||
Poto pridajte adresár /home/jshome/bin do premennej PATH, /home/jshome/lib
|
||||
do premennej LD_LIBRARY_PATH a spustite bin/wmaker.inst
|
||||
|
||||
304
Install
304
Install
@@ -1,304 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# WindowMaker configuration and compilation script.
|
||||
#
|
||||
# Copyright (c) 1997, 1998, 1999 Alfredo K. Kojima
|
||||
#
|
||||
|
||||
export LINGUAS;LINGUAS=""
|
||||
if test "$NLSDIR" = ""; then
|
||||
export NLSDIR;NLSDIR="/usr/lib/locale"
|
||||
fi
|
||||
|
||||
|
||||
OPTIONS=""
|
||||
PREFIX="/usr/local"
|
||||
|
||||
perai() {
|
||||
echo "Type <Return> to continue"
|
||||
read nada
|
||||
}
|
||||
|
||||
|
||||
perform() {
|
||||
if ! $* ; then
|
||||
echo
|
||||
echo "Window Maker installation failed or aborted by user."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
help() {
|
||||
echo "Usage: $(basename $0) <switch>"
|
||||
echo "Where switches are:"
|
||||
echo " -s --quiet make silent build"
|
||||
echo " -h --help show this message"
|
||||
echo ""
|
||||
exit $1
|
||||
}
|
||||
|
||||
|
||||
OPTIONS=""
|
||||
MAKE_OPTIONS=""
|
||||
while [ -n "$1" ]
|
||||
do
|
||||
case "$1" in
|
||||
"-s"|"--quiet") OPTIONS="--quiet"
|
||||
MAKE_OPTIONS="-s";;
|
||||
"-h"|"--help") help 0;;
|
||||
*) echo "bad command-line parameter $1"
|
||||
help 1;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
trap "echo Window Maker installation aborted. ; exit 1" 2 3
|
||||
|
||||
echo
|
||||
echo "========================="
|
||||
echo "Window Maker Installation"
|
||||
echo "========================="
|
||||
echo
|
||||
echo "NOTE: If this script fails, read the INSTALL file and"
|
||||
echo "install by hand."
|
||||
echo
|
||||
echo "Please read the README, INSTALL and FAQ files before e-mailing "
|
||||
echo "questions. We will IGNORE any questions that are already"
|
||||
echo "answered in the documentation."
|
||||
echo
|
||||
perai
|
||||
echo
|
||||
echo "Did you install libPropList? If not, please install it now."
|
||||
echo
|
||||
perai
|
||||
echo "Did you read the INSTALL file?"
|
||||
echo -n "<y/n> "
|
||||
read rtfm
|
||||
if [ "$rtfm" != y ]; then
|
||||
echo "Please read the INSTALL file before installing"
|
||||
exit
|
||||
fi
|
||||
echo "Are you sure?"
|
||||
echo -n "<y/n> "
|
||||
read rtfm
|
||||
if [ "$rtfm" != y ]; then
|
||||
echo "Please read the INSTALL file before installing"
|
||||
exit
|
||||
fi
|
||||
echo "Are you lying?"
|
||||
echo -n "<y/n> "
|
||||
read rtfm
|
||||
if [ "$rtfm" != n ]; then
|
||||
echo "What a shame!"
|
||||
echo "Please read the INSTALL file before installing"
|
||||
exit
|
||||
fi
|
||||
echo "Do you *swear* that you really read the INSTALL file?"
|
||||
echo -n "<y/n> "
|
||||
read rtfm
|
||||
if [ "$rtfm" != y ]; then
|
||||
echo "Please read the INSTALL file before installing"
|
||||
exit
|
||||
fi
|
||||
echo "Last chance. You will not get help if you have some problem"
|
||||
echo "because you didn't read that file. Even if your computer explodes."
|
||||
echo "Do you *really* read it?"
|
||||
echo -n "<y/n> "
|
||||
read rtfm
|
||||
if [ "$rtfm" != y ]; then
|
||||
echo "Please read the INSTALL file before installing"
|
||||
exit
|
||||
fi
|
||||
echo
|
||||
echo "Ok, you have been warned."
|
||||
echo
|
||||
perai
|
||||
|
||||
|
||||
if test "$USER" != "root"; then
|
||||
echo
|
||||
echo "Warning: you must run this script as root to install"
|
||||
echo "Window Maker. Hit <Control>-<C> to quit this script."
|
||||
perai
|
||||
echo
|
||||
fi
|
||||
|
||||
|
||||
echo
|
||||
echo "Option Selection"
|
||||
echo "================"
|
||||
|
||||
######################## KDE
|
||||
echo
|
||||
echo "Do you want KDE support?"
|
||||
echo -n "<y/n> [n] "
|
||||
read kde
|
||||
if [ "$kde" = y -o "$kde" = Y ]; then
|
||||
OPTIONS="$OPTIONS --enable-kde"
|
||||
fi
|
||||
|
||||
######################## GNOME
|
||||
echo
|
||||
echo "Do you want GNOME support?"
|
||||
echo -n "<y/n> [n] "
|
||||
read gnome
|
||||
if [ "$gnome" = y -o "$gnome" = Y ]; then
|
||||
OPTIONS="$OPTIONS --enable-gnome"
|
||||
fi
|
||||
|
||||
######################## OLWM
|
||||
echo
|
||||
echo "Do you want OPEN LOOK(tm)/olwm support?"
|
||||
echo -n "<y/n> [n] "
|
||||
read olwm
|
||||
if [ "$olwm" = y -o "$olwm" = Y ]; then
|
||||
OPTIONS="$OPTIONS --enable-openlook"
|
||||
fi
|
||||
|
||||
######################## NLS
|
||||
echo
|
||||
echo "Do you want National Language Support?"
|
||||
echo -n "<y/n> [n] "
|
||||
read NLS
|
||||
|
||||
if [ "$NLS" = "y" -o "$NLS" = "Y" ]; then
|
||||
NLS="Y"
|
||||
echo "The supported locales are:"
|
||||
ling=` (cd po; /bin/ls *.po) `
|
||||
ALL_LINGUAS=""
|
||||
for l in $ling; do
|
||||
lname=`(cd po; grep Language-Team $l|cut -f2- -d:|cut -f1 -d\\\\|cut -f1 -d\<)`
|
||||
lname=`echo $lname`
|
||||
lcode=`basename $l .po`
|
||||
ALL_LINGUAS="$ALL_LINGUAS $lcode"
|
||||
echo "$lcode $lname"
|
||||
done
|
||||
echo "Type in the locales you want (all will install everything) [none]"
|
||||
read foo
|
||||
if test "$foo" = "all"; then
|
||||
LINGUAS="$ALL_LINGUAS"
|
||||
else
|
||||
LINGUAS="$foo"
|
||||
fi
|
||||
echo "Selected locales are: $LINGUAS"
|
||||
|
||||
MB=""
|
||||
for i in $LINGUAS; do
|
||||
ok=0
|
||||
for b in $ALL_LINGUAS; do
|
||||
if test "$b" = "$i"; then
|
||||
ok=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test "$ok" = "0"; then
|
||||
echo
|
||||
echo "$i is not a supported locale"
|
||||
perai
|
||||
continue
|
||||
fi
|
||||
|
||||
done
|
||||
echo
|
||||
echo "Where do you want to put the message files? [$NLSDIR]"
|
||||
echo -n "? "
|
||||
read foo
|
||||
if test "x$foo" != "x"; then
|
||||
NLSDIR=$foo
|
||||
fi
|
||||
fi
|
||||
##################### Installation path
|
||||
|
||||
done=0
|
||||
while [ $done = 0 ]; do
|
||||
echo
|
||||
echo "Where do you want to install Window Maker? [$PREFIX]"
|
||||
echo "Don't change it if you don't know what you're doing."
|
||||
if test "$USER" != "root"; then
|
||||
echo "Make sure to specify a path where you have write permission."
|
||||
fi
|
||||
echo "(The default will put Window Maker in $PREFIX/bin, $PREFIX/lib etc.)"
|
||||
echo -n "? "
|
||||
read foo
|
||||
if test "x$foo" != "x"; then
|
||||
if [ "$foo" = "y" -o "$foo" = "n" ]; then
|
||||
echo
|
||||
echo "Hmm... I don't think you really want to install Window Maker into \"$foo\""
|
||||
echo
|
||||
else
|
||||
done=1
|
||||
PREFIX=$foo
|
||||
fi
|
||||
else
|
||||
done=1
|
||||
fi
|
||||
echo
|
||||
echo " $PREFIX/bin must be in the PATH environment variable"
|
||||
echo "of all users who will use Window Maker"
|
||||
perai
|
||||
done
|
||||
|
||||
OPTIONS="$OPTIONS --prefix=$PREFIX"
|
||||
|
||||
|
||||
##################### Install stripped binaries?
|
||||
|
||||
INSTALL="install"
|
||||
echo "Do you want stripped binaries to be installed?"
|
||||
echo "Installed binaries will be smaller (with debug info removed)."
|
||||
echo -n "<y/n> [n] "
|
||||
read foo
|
||||
if [ "$foo" = y -o "$foo" = Y ]; then
|
||||
INSTALL="install-strip"
|
||||
fi
|
||||
|
||||
|
||||
##################### Configure
|
||||
echo "--------------------------"
|
||||
echo "Configuring Window Maker..."
|
||||
echo "--------------------------"
|
||||
if [ `uname -s` = "SCO_SV" ]; then
|
||||
echo "CFLAGS=\"$CFLAGS -belf -DANSICPP\" ./configure $OPTIONS"
|
||||
|
||||
CFLAGS="$CFLAGS -belf -DANSICPP"
|
||||
|
||||
perform ./configure $OPTIONS
|
||||
else
|
||||
echo "CFLAGS=\"$CFLAGS $GCCFLAGS\" ./configure $OPTIONS"
|
||||
|
||||
CFLAGS="$CFLAGS $GCCFLAGS"
|
||||
|
||||
perform ./configure $OPTIONS
|
||||
fi
|
||||
|
||||
|
||||
#################### Compile
|
||||
echo "-------------------------"
|
||||
echo "Compiling Window Maker..."
|
||||
echo "-------------------------"
|
||||
(cd src; perform make $MAKE_OPTIONS clean)
|
||||
perform make $MAKE_OPTIONS
|
||||
|
||||
echo "--------------------------"
|
||||
echo "Installing Window Maker..."
|
||||
echo "--------------------------"
|
||||
|
||||
perform make $MAKE_OPTIONS $INSTALL
|
||||
|
||||
if [ `uname -s` = "Linux" ]; then
|
||||
echo
|
||||
echo " Make sure $PREFIX/lib is in the /etc/ld.so.conf file"
|
||||
/sbin/ldconfig
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "Installation Finished!"
|
||||
echo
|
||||
echo "Now, each user that wishes to use WindowMaker must run the wmaker.inst"
|
||||
echo "script that was just installed."
|
||||
|
||||
|
||||
if test "$NLS" = "Y"; then
|
||||
echo "Don't forget to set the LANG environment variable to your locale"
|
||||
fi
|
||||
|
||||
4
MIRRORS
4
MIRRORS
@@ -4,7 +4,7 @@ Window Maker FTP Mirror Sites
|
||||
|
||||
Official Site (USA):
|
||||
--------------------
|
||||
ftp://ftp.windowmaker.org/
|
||||
ftp://ftp.windowmaker.info/
|
||||
|
||||
|
||||
Australia:
|
||||
@@ -61,7 +61,7 @@ For Intel:
|
||||
|
||||
Contact: Jim Knoble <jmknoble@pobox.com>
|
||||
Sites:
|
||||
ftp://ftp.windowmaker.org/pub/beta/compiled/linux/rpms/
|
||||
ftp://ftp.windowmaker.info/pub/beta/compiled/linux/rpms/
|
||||
ftp://ftp.redhat.com/pub/contrib/SRPMS/
|
||||
ftp://ftp.redhat.com/pub/contrib/i386/
|
||||
|
||||
|
||||
17
Makefile.am
17
Makefile.am
@@ -3,19 +3,8 @@
|
||||
SUBDIRS = wrlib WINGs src util po WindowMaker wmlib test WPrefs.app doc\
|
||||
contrib
|
||||
|
||||
EXTRA_DIST = TODO BUGS BUGFORM FAQ FAQ.I18N MIRRORS COPYING.WTFPL \
|
||||
Install acconfig.h INSTALL.pt README.pt\
|
||||
FAQ.I18N.cs INSTALL.cs\
|
||||
mkpatch README.KDE README.GNOME WindowMaker.lsm.in\
|
||||
README.definable-cursor \
|
||||
FAQ.I18N.sk INSTALL.sk INSTALL.es INSTALL.fr
|
||||
EXTRA_DIST = TODO BUGS BUGFORM FAQ FAQ.I18N FAQ.I18N.cs FAQ.I18N.sk \
|
||||
INSTALL.cs INSTALL.fr INSTALL.es INSTALL.pt INSTALL.sk \
|
||||
README.definable-cursor README.pt MIRRORS COPYING.WTFPL mkpatch
|
||||
# libwmfun-0.0.3.tar.gz
|
||||
|
||||
WindowMaker.lsm: WindowMaker.lsm.in
|
||||
size=`wc -c $(distdir).tar.gz|cut -d\ -f1`;\
|
||||
size=`echo scale=2\;$$size/1048576|bc`;\
|
||||
sed -e "s/VERSION/"$(VERSION)"/" \
|
||||
-e "s/DATE/`date +%d%b%Y|tr a-z A-Z`/"\
|
||||
-e "s/SIZE/$$size M/"\
|
||||
WindowMaker.lsm.in > WindowMaker-$(VERSION).lsm
|
||||
|
||||
|
||||
179
NEWS
179
NEWS
@@ -2,6 +2,164 @@
|
||||
NEWS for veteran Window Maker users
|
||||
-----------------------------------
|
||||
|
||||
--- 0.92.0
|
||||
|
||||
GNUstep Installation Directory
|
||||
------------------------------
|
||||
|
||||
WPrefs is now installed in /usr/local/bin and /usr/local/share by default.
|
||||
If you use GNUstep and want it to install in /usr/GNUstep/Applications,
|
||||
you may specify --with-gnustepdir=/usr/GNUstep
|
||||
If the GNUSTEP_LOCAL_ROOT environment variable is defined when configure is
|
||||
executed, it will be used (and you don't need to use --with-gnustepdir)
|
||||
|
||||
Cached Pixmaps Directory
|
||||
------------------------
|
||||
|
||||
The directory where Window Maker stores the cached application pixmaps for
|
||||
its later use has changed from ~/GNUstep/.AppInfo/WindowMaker to
|
||||
~/GNUstep/Library/WindowMaker/CachedPixmaps for better compatibility with
|
||||
the GNUstep path structure.
|
||||
Also WPrefs now stores internal data in ~/GNUstep/Library/WindowMaker/WPrefs
|
||||
(it was ~/GNUstep/.AppInfo/WPrefs before)
|
||||
|
||||
X Input Methods support in WINGs
|
||||
--------------------------------
|
||||
|
||||
Preliminary support for X Input Methods was added to textfield and text
|
||||
widgets in WINGs. Input for text in other languages than English should
|
||||
work now (except for kanji which will most likely not work, even though
|
||||
it wasn't tested).
|
||||
|
||||
|
||||
Disabling the switch panel
|
||||
--------------------------
|
||||
|
||||
To disable the panel shown during Alt-tabbing, you may put the following in
|
||||
~/GNUstep/Defaults/WindowMaker
|
||||
|
||||
SwitchPanelImages= None;
|
||||
|
||||
|
||||
|
||||
--- 0.91.0
|
||||
|
||||
Alt-Tab Window Switching
|
||||
------------------------
|
||||
|
||||
You can change the appearance of the panel shown during Alt-Tab window switching
|
||||
with the SwitchPanelImages option:
|
||||
|
||||
(selected_icon_tile_image, background_image, width, height)
|
||||
|
||||
selected_icon_tile_image is the image used to highlight the currently selected
|
||||
window icon. It must be 64x64 pixels.
|
||||
|
||||
background_image is the image used in the background of the panel. It must
|
||||
be at least 64x80.
|
||||
|
||||
width and height are the width and size of the central part of the image.
|
||||
When drawing the panel, the image will be split as:
|
||||
|W |
|
||||
+--+--+--+
|
||||
| | | |
|
||||
+--+--+--+ -
|
||||
| | | | H
|
||||
+--+--+--+ -
|
||||
| | | |
|
||||
+--+--+--+
|
||||
|
||||
The 4 corner images will be copied in their original sizes and the rest will
|
||||
be scaled to the final panel size.
|
||||
|
||||
background_image, width and height are optional. If you leave them out,
|
||||
a gray panel will be used. If your machine is not very fast, you may want
|
||||
to use it.
|
||||
|
||||
|
||||
--- 0.90.0
|
||||
|
||||
|
||||
NetWM / EWMH Support
|
||||
--------------------
|
||||
|
||||
Support for the EWMH standard has been added. Applications from GNOME 2.x and
|
||||
KDE 3.x should now interoperate better with Window Maker.
|
||||
|
||||
Support for the obsolete/legacy GNOME 1.x, KDE 1.x and OpenLook(!) hints was
|
||||
wiped out for the sake of sanity.
|
||||
|
||||
|
||||
Antialiased font support
|
||||
------------------------
|
||||
|
||||
With the addition of Xft2 support in the WINGs library, now
|
||||
Window Maker can display antialiased text with TrueType or any scalable fonts.
|
||||
|
||||
You can pick fonts for Window Maker in the Font configuration section of
|
||||
WPrefs.
|
||||
|
||||
Antialiased text is enabled by default, but can be disabled by adding
|
||||
|
||||
AntialiasedText = NO; in ~/GNUstep/Defaults/WMGLOBAL
|
||||
|
||||
This will disable antialiased text for any WINGs based application. If you
|
||||
only want to disable them for a specific application only, like WindowMaker
|
||||
for example, then add the same option in the applications configuration file,
|
||||
in this case ~/GNUstep/Defaults/WindowMaker
|
||||
For WindowMaker, this can also be achieved from the Expert panel in WPrefs.
|
||||
|
||||
Note that bitmapped fonts look much better than TrueType when antialiasing is
|
||||
disabled.
|
||||
|
||||
Global Submenus
|
||||
---------------
|
||||
|
||||
Global menus allow for system wide menus that are added to every users
|
||||
application menus. They are located in /usr/etc/WindowMaker/,
|
||||
/usr/local/etc/WindowMaker or whatever is your sysconf directory
|
||||
for WindowMaker. There are 2 files:
|
||||
|
||||
GlobalMenu.pre, which is added to the beginning of the menu and
|
||||
GlobalMenu.post, which is added to the end of the menu.
|
||||
|
||||
These are to be proplist format menus, for example:
|
||||
|
||||
(("Foobar", EXEC, foobar),
|
||||
("Blabla", EXEC, blabla))
|
||||
|
||||
or, in case you want a submenu:
|
||||
|
||||
(("Submenu",
|
||||
("Foobar", EXEC, foobar),
|
||||
("Blabla", EXEC, blabla)))
|
||||
|
||||
|
||||
UTF-8 Support
|
||||
-------------
|
||||
|
||||
Window Maker now uses UTF-8 internally (and thus can display UTF-8 text
|
||||
in window titles and other places). Menus and po files must now be
|
||||
encoded in UTF-8. If your menus contain non ASCII characters, you can convert
|
||||
them to UTF-8 with the following command:
|
||||
|
||||
iconv -f <current-file-encoding> -t utf-8 <filename> > <filename>.utf8
|
||||
|
||||
For example:
|
||||
|
||||
iconv -f iso-8859-1 -t utf-8 menu > menu.utf
|
||||
mv menu.utf menu
|
||||
|
||||
|
||||
Icon Panel for Alt-Tabbing
|
||||
--------------------------
|
||||
|
||||
A panel with icons for the windows that you can switch to will appear
|
||||
when you press Alt-Tab. You can navigate through the windows with Alt-Tab
|
||||
(Alt-Shift-Tab) or with the left/right keys once the panel is shown.
|
||||
|
||||
|
||||
|
||||
--- 0.80.0
|
||||
|
||||
Shading/Unshading windows using mouse wheel on their titlebar
|
||||
@@ -193,9 +351,10 @@ behavior regarding workspaces you can now (use WPrefs.app to do this).
|
||||
Client supplied icons
|
||||
---------------------
|
||||
|
||||
Window Maker saves the client supplied icons in ~/GNUstep/.AppInfo/WindowMaker
|
||||
in XPM format for later use when the app is no longer running (to have the
|
||||
image to display for docked icons for example).
|
||||
Window Maker saves the client supplied icons in
|
||||
~/GNUstep/Library/WindowMaker/CachedPixmaps in XPM format for later use
|
||||
when the app is no longer running (to have the image to display for docked
|
||||
icons for example).
|
||||
|
||||
Until recently the XPM images saved by Window Maker were incorrect, but a
|
||||
recent fix in the code to save XPM's fixed them. But with this fix, all
|
||||
@@ -203,12 +362,12 @@ previously saved XPM's in that directory are no longer readable (they give
|
||||
wrong images on screen or fail to load).
|
||||
|
||||
To avoid the need for the user to fix this by hand editing WMWindowAttributes
|
||||
and removing all references to icons in ~/GNUstep/.AppInfo/WindowMaker which
|
||||
can be annoying, new code was added to Window Maker to permit the regeneration
|
||||
of images in ~/GNUstep/.AppInfo/WindowMaker if they are missing.
|
||||
and removing all references to icons in ~/GNUstep/Library/WindowMaker/CachedPixmaps
|
||||
which can be annoying, new code was added to Window Maker to permit the
|
||||
regeneration of images in ~/GNUstep/Library/WindowMaker/CachedPixmaps if they are missing.
|
||||
|
||||
With this addition, all you need to do to fix your old broken images, is to
|
||||
delete all *.xpm files from ~/GNUstep/.AppInfo/WindowMaker. Next time the
|
||||
delete all *.xpm files from ~/GNUstep/Library/WindowMaker/CachedPixmaps. Next time the
|
||||
application that is supplying an icon image will start the icon will be
|
||||
recreated if missing, but this time it will be saved with the new XPM save
|
||||
code which produces good XPM images.
|
||||
@@ -618,7 +777,7 @@ Themes
|
||||
|
||||
Removed all themes from the source tree, and moved them in a separate package.
|
||||
You can download the new package from the same place as this package:
|
||||
ftp://ftp.windowmaker.org/pub/beta/srcs/
|
||||
ftp://ftp.windowmaker.info/pub/beta/srcs/
|
||||
Look after WindowMaker-extra-<version-number>.tar.gz
|
||||
Also WindowMaker-extra pack include the old WindowMaker-data.tar.gz which only
|
||||
contained icons.
|
||||
@@ -713,7 +872,7 @@ libPropList
|
||||
|
||||
WARNING!!! libPropList was removed from the Window Maker distribution
|
||||
and is being distributed separately. If you dont have it installed yet,
|
||||
get it from ftp.windowmaker.org/pub/libs and install before building
|
||||
get it from ftp.windowmaker.info/pub/libs and install before building
|
||||
Window Maker.
|
||||
|
||||
|
||||
@@ -1074,7 +1233,7 @@ Persistent Program Suplied Icons
|
||||
|
||||
Application supplied icons are now stored, so that the dock will keep
|
||||
showing them after the app is exited. The icons are stored at
|
||||
~/GNUstep/.AppInfo/WindowMaker/
|
||||
~/GNUstep/Library/WindowMaker/CachedPixmaps
|
||||
|
||||
|
||||
Sound support
|
||||
|
||||
46
README
46
README
@@ -4,8 +4,8 @@
|
||||
GNU Window Maker
|
||||
X11 Window Manager
|
||||
|
||||
<http://windowmaker.org>
|
||||
<ftp://ftp.windowmaker.org>
|
||||
<http://windowmaker.info>
|
||||
<ftp://ftp.windowmaker.info>
|
||||
|
||||
by
|
||||
|
||||
@@ -51,7 +51,8 @@ Window Maker was designed keeping integration with GNUstep in mind and is the
|
||||
(www.gnu.org) Read more about GNUstep further on this file.
|
||||
|
||||
Hints (information given by applications to integrate well with the window
|
||||
manager) for Motif(tm), OPEN LOOK(tm), KDE and GNOME are also supported.
|
||||
manager) for Motif(tm) and NETWM are also supported (NETWM is used by KDE
|
||||
and GNOME, so they are automatically supported as a result).
|
||||
So you can replace any of the window managers for these environments
|
||||
with Window Maker while keeping most, if not all, of the native window manager
|
||||
functionality.
|
||||
@@ -149,9 +150,9 @@ HELP ME!!!
|
||||
==========
|
||||
|
||||
There is a mailing list for discussing Window Maker at
|
||||
wm-user@windowmaker.org To subscribe to it, send a message containing:
|
||||
wm-user@windowmaker.info To subscribe to it, send a message containing:
|
||||
subscribe
|
||||
in the subject of the message to wm-user-request@windowmaker.org
|
||||
in the subject of the message to wm-user-request@windowmaker.info
|
||||
|
||||
If you got a problem, ask there (after reading the docs, of course). The
|
||||
people there is more likely to be able to answer your questions than we are.
|
||||
@@ -220,31 +221,6 @@ Note that you must compile Window Maker with the --enable-sound configure
|
||||
flag and set the DisableSound option to NO.
|
||||
|
||||
|
||||
OpenL**k support
|
||||
================
|
||||
|
||||
I guess many users, mainly from the academic world, have to use
|
||||
applications written using the OpenL**k toolkits, so having support
|
||||
for these apps must be of some use.
|
||||
|
||||
To enable, use --enable-openlook when doing the configure. Note that
|
||||
not everything is implemented.
|
||||
|
||||
Implemented stuff include decoration hints and the push-pin. Not implemented
|
||||
stuff include _SUN_WINDOW_STATE (the compose led state stuff), drag and drop
|
||||
interest stuff, header (not sure what's it) and footer strings.
|
||||
|
||||
Please give me feedback if something doesn't work. If the feature is
|
||||
already implemented, but is not working because of a bug, I'll try to
|
||||
have that fixed. If it's a non-implemented feature and you mention that
|
||||
it's important (ie: not just cosmetical), I'll consider implementing it.
|
||||
|
||||
The "out" state of the pushpin is emulated as a pushed-in close button.
|
||||
Just click on the button to make it pushed-out, which corresponds
|
||||
to the pinned-in state of the pushpin. If you push again in the pushed-out
|
||||
close button, it will act as a normal close button: it will close the window.
|
||||
|
||||
|
||||
Performance Tuning
|
||||
==================
|
||||
|
||||
@@ -270,7 +246,7 @@ bellow:
|
||||
- to reduce memory usage, disable the icon cache, by setting the RIMAGE_CACHE
|
||||
environment variable to 0. If you want to increase performance at the cost
|
||||
of memory usage, set it's value to a value like the number of different
|
||||
icons you use.
|
||||
icons you use. Also, disable anti-aliased text support in ~/GNUstep/Defaults/WMGLOBAL.
|
||||
|
||||
|
||||
Keyboard Mouse Control
|
||||
@@ -359,9 +335,9 @@ notice.
|
||||
Authors
|
||||
=======
|
||||
|
||||
Alfredo K. Kojima <kojima@windowmaker.org>
|
||||
Dan Pascu <dan@windowmaker.org>
|
||||
]d <id@windowmaker.org>
|
||||
Alfredo K. Kojima <kojima@windowmaker.info>
|
||||
Dan Pascu <dan@windowmaker.info>
|
||||
]d <id@windowmaker.info>
|
||||
|
||||
Please don't ask us questions before reading the documentation (esp. the
|
||||
FAQ, this file and INSTALL files) and about "cool" things you see in
|
||||
@@ -373,5 +349,5 @@ project. The name of people who have helped with localization (translation)
|
||||
can be found in po/README and Window Maker/README
|
||||
|
||||
If you have any comments, fixes and bug reports (filled BUGFORMs) send them
|
||||
to developers@windowmaker.org
|
||||
to developers@windowmaker.info
|
||||
|
||||
|
||||
53
README.GNOME
53
README.GNOME
@@ -1,53 +0,0 @@
|
||||
|
||||
Information on Using Window Maker with GNOME
|
||||
--------------------------------------------
|
||||
|
||||
|
||||
Status of GNOME support
|
||||
-----------------------
|
||||
|
||||
|
||||
GNOME window manager protocols seem to be a work in progress.
|
||||
Things still change fairly frequently, so, the stuff implemented
|
||||
may not reflect the latest protocol. If something doesn't work,
|
||||
that's probably because the protocols have changed again and I still
|
||||
didn't have time to reimplement everything or noticed that it
|
||||
changed. If that happens, please tell me exactly what doesn't work.
|
||||
|
||||
Other than that, the so called "GNOME Window Manager Compliance - How to
|
||||
write a GNOME compliant Window Manager" document, says this:
|
||||
|
||||
"There are currently a set of other hints available that are, at the
|
||||
current time, not essential and therefore not documented here. It is,
|
||||
however envisaged that they will be finalized and added to this
|
||||
document, but for now are not needed."
|
||||
|
||||
Since they are non-essential and undocumented they are not yet implemented.
|
||||
|
||||
|
||||
Implemented stuff:
|
||||
|
||||
- GNOME window manager hints
|
||||
- Motif window manager hints
|
||||
|
||||
On the works:
|
||||
|
||||
- R6 style session management
|
||||
|
||||
|
||||
Compilation/Installation
|
||||
------------------------
|
||||
|
||||
To compile Window Maker with GNOME support, just configure it as:
|
||||
./configure --enable-gnome
|
||||
|
||||
before compiling.
|
||||
|
||||
Also, do not disable mwm hints support (they are enabled by default).
|
||||
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
|
||||
In WPrefs, go to the last section and toggle the "Disable miniwindows" option.
|
||||
|
||||
125
README.KDE
125
README.KDE
@@ -1,125 +0,0 @@
|
||||
|
||||
|
||||
Information on Using Window Maker with KDE
|
||||
------------------------------------------
|
||||
|
||||
|
||||
Window Maker supports almost all KDE/KWM specific client
|
||||
communication protocols, so you can simply replace kwm with
|
||||
Window Maker, if you think these advantages are worthy:
|
||||
|
||||
Window Maker KWM
|
||||
=============================================================================
|
||||
Looks NEXTSTEP(tm)/NEXTSTEP(tm) Original, but reminds
|
||||
enhanced Windows(tm)
|
||||
|
||||
Decoration solid, gradient, multi-color solid, vertical and
|
||||
Textures gradient, pixmaps, textured horizontal gradient,
|
||||
gradient - all gradients are pixmap
|
||||
supported in horizontal,
|
||||
vertical and diagonal
|
||||
directions
|
||||
|
||||
Configurable No Yes, but not totally
|
||||
Titlebar Buttons
|
||||
|
||||
Mini CLI Yes, but limited Yes
|
||||
|
||||
Window Specific Yes In KDE 1.1, yes.
|
||||
Configuration In KDE 1.0, no.
|
||||
|
||||
Quick Keyboard Yes In KDE 1.1, yes
|
||||
Navigation In KDE 1.0, no.
|
||||
|
||||
Pager KDE pagers will work as Yes
|
||||
well as GNOME pagers
|
||||
|
||||
Session Not yet supported, but Yes, old (pre-X11R6) style
|
||||
Management X11R6 style SM is being worked.
|
||||
|
||||
Dock kpanel, GNOME panel and Dock kpanel
|
||||
|
||||
Built-in Yes No
|
||||
krootbgwm
|
||||
|
||||
GNOME support Yes No
|
||||
|
||||
Memory Usage(1) 1.85Mb In KDE 1.0, 3.13Mb
|
||||
In KDE 1.1, probably more
|
||||
|
||||
|
||||
(1) Memory usage was tested by running wmaker and kwm at the same machine
|
||||
with the same windows, on the same screen and similar window texture
|
||||
configurations (at different times, of course). I looked in the output of
|
||||
ps -m, in the SIZE field, right after starting the window managers.
|
||||
|
||||
|
||||
|
||||
Enabling KDE Support
|
||||
--------------------
|
||||
|
||||
To enable KDE support in Window Maker, you must compile it after
|
||||
configuring it as follows:
|
||||
./configure --enable-kde
|
||||
|
||||
Then, just replace kwm with wmaker in your startkde script.
|
||||
If you are going to use Window Makers sound server, comment out
|
||||
kwmsound in startkde. Also if wmaker sets your root window
|
||||
background, comment out kbgndwm, kde's wallpaper setter.
|
||||
|
||||
Make sure to disable workspace background setting in KDE. If you
|
||||
wont be using Window Maker themes anyway, you can set
|
||||
WorkspaceBack = (none);
|
||||
|
||||
in ~/GNUstep/Defaults/WindowMaker
|
||||
|
||||
|
||||
Enhancing Integration
|
||||
---------------------
|
||||
|
||||
Window Maker adds some extensions to KDE's messaging stuff, so you can run
|
||||
Window Maker specific commands from places like kpanel, krootwm or even
|
||||
kwmcom. Recently KDE developers have kindly added support for these extensions
|
||||
in the more recent KDE versions from CVS. The added stuff are the following
|
||||
kwm like commands:
|
||||
|
||||
wm:wmaker - select Window Maker support mode
|
||||
wmaker:info - show info panel
|
||||
wmaker:legal - show legal panel
|
||||
wmaker:arrangeIcons - arrange icons
|
||||
wmaker:showAll - show all windows
|
||||
wmaker:hideOthers - hide others
|
||||
wmaker:restart - restart wmaker
|
||||
wmaker:exit - exit wmaker
|
||||
|
||||
You can test them with kwmcom, like:
|
||||
kwmcom wmaker:info
|
||||
|
||||
|
||||
Problems
|
||||
--------
|
||||
|
||||
* kpanel will not be kept always on top. That's because kpanel is an
|
||||
OverrideRedirect window, so Window Maker can't do anything about that.
|
||||
|
||||
Before requesting for a hack to work around that in Window Maker, please
|
||||
request the kpanel author to fix it.
|
||||
|
||||
* because the KDE protocol for letting the window manager know the usable
|
||||
window region is broken, you might find some problems with the window
|
||||
positioning/maximization code and kpanel's position.
|
||||
|
||||
* It seems kpanel (and maybe KDE in general) doesn't like dynamically
|
||||
changing the number of workspaces. So, don't create or destroy workspaces
|
||||
while running on KDE, unless you really need.
|
||||
|
||||
* If kpanel, kwmpager or kpager becomes confused about the number of
|
||||
windows present, restart them.
|
||||
|
||||
* Wmaker opens windows by default under/over the panel, when the panel is
|
||||
at top or left of screen. Use the GUI configuration tool WPrefs to change
|
||||
this.
|
||||
|
||||
* Some commands, such as cascade windows and rearrange windows are not
|
||||
yet implemented.
|
||||
|
||||
71
README.es
71
README.es
@@ -4,8 +4,8 @@
|
||||
GNU Window Maker
|
||||
X11 Window Manager
|
||||
|
||||
<http://windowmaker.org>
|
||||
<ftp://ftp.windowmaker.org>
|
||||
<http://windowmaker.info>
|
||||
<ftp://ftp.windowmaker.info>
|
||||
|
||||
por
|
||||
|
||||
@@ -22,21 +22,21 @@
|
||||
|
||||
|
||||
|
||||
Felicitaciones! A adquirido un dispositivo excelentísimo
|
||||
que le proporcionará miles de años de uso sin problemas
|
||||
,si no fuera porque indudablemente lo destruirá a través de alguna
|
||||
maniobra estúpida típica de consumidor. Por eso le pedimos
|
||||
por EL AMOR DE DIOS LEA ESTE MANUAL DEL PROPIETARIO CUIDADOSAMENTE
|
||||
ANTES DE DESEMPAQUETAR EL DISPOSITIVO. ¿YA LO DESEMPAQUETÓ, NO?
|
||||
DESEMPAQUETELO Y ENCHÚFELO Y ENCIÉNDALO Y DEJE DE TOQUETEAR LAS PERILLAS,
|
||||
Y AHORA SUS CHICOS, EL MISMO CHICO QUE UNA VEZ METIÓ UNA SALCHICHA EN SU
|
||||
VIDEOCASETERA Y DEFINIÓ UN "AVANCE RÁPIDO", ¿ESTE CHICO TAMBIÉN ESTÁ
|
||||
TOQUETEANDO LAS PERILLAS, CIERTO? ¿Y RECIEN AHORA ESTÁ COMENZANDO A LEER
|
||||
LAS INSTRUCCIONES, CIERTO? PODEMOS TAMBIÉN ROMPER ESTOS DISPOSITIVOS
|
||||
EN LA FÁBRICA ANTES DE DESPACHÁRLOS, SABIA ESO?
|
||||
|
||||
|
||||
-- Dave Barry, "Lea Esto Primero!"
|
||||
¡Felicitaciones! Ha adquirido un dispositivo
|
||||
excelentísimo que le proporcionará miles de años de uso sin
|
||||
problemas, si no fuera porque indudablemente lo destruirá a
|
||||
través de alguna maniobra estúpida típica de consumidor. Por
|
||||
eso le pedimos por EL AMOR DE DIOS LEA ESTE MANUAL DEL
|
||||
PROPIETARIO CUIDADOSAMENTE ANTES DE DESEMPAQUETAR EL
|
||||
DISPOSITIVO. ¿YA LO DESEMPAQUETÓ, NO? LO DESEMPAQUETÓ Y LO
|
||||
ENCHUFÓ Y LO ENCENDIÓ Y TOQUETEÓ LAS PERILLAS, Y AHORA SU
|
||||
CHICO, EL MISMO CHICO QUE UNA VEZ METIÓ UNA SALCHICHA EN SU
|
||||
VIDEOCASETERA Y ACCIONÓ "AVANCE RÁPIDO", ESTE CHICO
|
||||
TAMBIÉN ESTÁ TUOQUETEANDO LAS PERILLAS, ¿CIERTO? Y RECIÉN
|
||||
AHORA ESTÁ COMENZANDO A LEER LAS INSTRUCCIONES, ¿¿¿CIERTO???
|
||||
NOSOTROS PODRÍAMOS SIMPLEMENTE ROMPER ESTOS DISPOSITIVOS EN LA
|
||||
FÁBRICA ANTES DE DESPACHARLOS, ¿SABE?
|
||||
-- Dave Barry, "¡Lea Esto Primero!"
|
||||
|
||||
|
||||
Descripción
|
||||
@@ -147,10 +147,10 @@ SOCORRO!!!
|
||||
==========
|
||||
|
||||
Hay una lista de correo para discutir sobre Window Maker en
|
||||
wm-user@windowmaker.org. Para suscribirse, envie un mensaje que contenga:
|
||||
wm-user@windowmaker.info. Para suscribirse, envie un mensaje que contenga:
|
||||
|
||||
subscribe
|
||||
en el tema del mensaje a wm-user-request@windowmaker.org
|
||||
en el tema del mensaje a wm-user-request@windowmaker.info
|
||||
|
||||
Si tiene algun problema, pregunte aquí (después de leer los docs, por supuesto). Es
|
||||
más probable que las personas de la lista sepan contestar sus preguntas
|
||||
@@ -217,31 +217,6 @@ http://shadowmere.student.utwente.nl/
|
||||
Note que debe compilar Window Maker con el parámetro --enable-sound
|
||||
y definir la opción DisableSound a NO.
|
||||
|
||||
Soporte para OpenL**k
|
||||
=====================
|
||||
|
||||
Calculo que muchos usuarios, principalmente del mundo académico,
|
||||
tienen que usar aplicaciones escritas usando los toolkits OpenL**k,
|
||||
así que tener soporte para estas aplicaciones debe ser de algún uso.
|
||||
|
||||
Para activarlo, use --enable-openlook al hacer el configure. Note que
|
||||
no todo está implementado.
|
||||
|
||||
Las cosas implementadas incluyen consejos de adorno y el push-pin. Las cosas
|
||||
no implementadas incluyen _SUN_WINDOW_STATE (la cosa compuesta que lleva el estado),
|
||||
cosas que interesan sobre arrastrar y soltar, cabecera (no estoy seguro de que sea así)
|
||||
y cadenas footer.
|
||||
|
||||
Por favor hágame saber si algo no funciona. Si la característica ya está implimentada,
|
||||
pero no funciona por un error, intentaré arreglarlo. Si esta es una característica no
|
||||
implementada y menciona que es importante (obs: no solo superficial), consideraré
|
||||
implementarlo.
|
||||
|
||||
El estado "out" del pushpin es emular un botón presionado. Solo cliquee
|
||||
en el botón para hacer que se libere, lo cuál corresponde al estado
|
||||
pinned-in del pushpin. Si pulsa otra vez en el boton liberado, servirá de
|
||||
botón normal de cerrado: cerrará la ventana.
|
||||
|
||||
|
||||
Ajuste de Rendimiento.
|
||||
=====================
|
||||
@@ -350,9 +325,9 @@ aviso.
|
||||
Autores
|
||||
=======
|
||||
|
||||
Alfredo K. Kojima <kojima@windowmaker.org>
|
||||
Dan Pascu <dan@windowmaker.org>
|
||||
]d <id@windowmaker.org>
|
||||
Alfredo K. Kojima <kojima@windowmaker.info>
|
||||
Dan Pascu <dan@windowmaker.info>
|
||||
]d <id@windowmaker.info>
|
||||
|
||||
Por favor no nos haga preguntas antes de leer la documentación (especialmente
|
||||
la FAQ, este archivo y los archivos INSTALL) y sobre cosas "cool" que ve en
|
||||
@@ -363,7 +338,7 @@ con el proyecto. El nombre de las personas que han ayudado con localization
|
||||
(traducción) se puede encontrar en po/README y Window Maker/README
|
||||
|
||||
Si tiene algún comentario, arreglos y reportes de errores (complete BUGFORMs)
|
||||
y enviémelos a developers@windowmaker.org
|
||||
y enviémelos a developers@windowmaker.info
|
||||
|
||||
|
||||
|
||||
|
||||
44
README.pt
44
README.pt
@@ -3,8 +3,8 @@
|
||||
GNU Window Maker
|
||||
Gerenciador de Janelas X11
|
||||
|
||||
<http://windowmaker.org>
|
||||
<ftp://ftp.windowmaker.org>
|
||||
<http://windowmaker.info>
|
||||
<ftp://ftp.windowmaker.info>
|
||||
|
||||
por
|
||||
|
||||
@@ -143,10 +143,10 @@ SOCORRO!!!
|
||||
==========
|
||||
|
||||
Há uma lista de discussão para debate de questões sobre o Window Maker
|
||||
no wm-user@windowmaker.org. Para inscrever-se, mande uma mensagem
|
||||
no wm-user@windowmaker.info. Para inscrever-se, mande uma mensagem
|
||||
contendo:
|
||||
subscribe
|
||||
no campo de assunto da mensagem para wm-user-request@windowmaker.org
|
||||
no campo de assunto da mensagem para wm-user-request@windowmaker.info
|
||||
|
||||
Se você tiver algum problema, pergunte lá (somente depois de ter lido os
|
||||
documentos, é claro). As pessoas da lista estão mais preparadas para
|
||||
@@ -210,34 +210,6 @@ Observe que voc
|
||||
flag --enable-sound e definindo a opção DisableSound para NO.
|
||||
|
||||
|
||||
Suporte ao OpenL**k
|
||||
===================
|
||||
|
||||
Acredito que muitos usuários, principalmente os do mundo acadêmico,
|
||||
tenham que usar aplicações escritas em toolkits OpenL**k, então o suporte
|
||||
para estes aplicativos deve ser de algum uso.
|
||||
|
||||
Para ativar, use o --enable-openlook quando rodar o configure. Note
|
||||
que nem tudo está implementado.
|
||||
|
||||
As opções implementadas incluem hints de decoração e o push-pin.
|
||||
Coisas não implementadas incluem _SUN_WINDOW_STATE (the compose led
|
||||
state stuff), coisas relacionadas ao "drag and drop", cabeçalho (não
|
||||
tenho certeza do que é) e o string footer.
|
||||
|
||||
Por favor me dêem retorno se algo não funcionar. Se a opção já está
|
||||
implementada, mas não está funcionando por causa de um bug, eu tentarei
|
||||
corrigí-la. Se é uma característica ainda não implementada e você mencionar
|
||||
que é importante (ie: não somente cosmética), eu considerarei a sua
|
||||
implementação.
|
||||
|
||||
O estado "out" do pushpin é emulado como um botão de fechar pressionado.
|
||||
Clique no botão para fazer com que ele fique despressionado, o que
|
||||
corresponde ao estado "pinned-in" do pushpin. Se você pressionar de novo
|
||||
o botão de fechar despressionado, ele vai agir como um botão de fechar
|
||||
normal: vai fechar a janela.
|
||||
|
||||
|
||||
Ajuste da Performance
|
||||
====================
|
||||
|
||||
@@ -360,9 +332,9 @@ qualquer aviso pr
|
||||
Autores
|
||||
=======
|
||||
|
||||
Alfredo K. Kojima <kojima@windowmaker.org>
|
||||
Dan Pascu <dan@windowmaker.org>
|
||||
]d <id@windowmaker.org>
|
||||
Alfredo K. Kojima <kojima@windowmaker.info>
|
||||
Dan Pascu <dan@windowmaker.info>
|
||||
]d <id@windowmaker.info>
|
||||
|
||||
Por favor não nos perguntem coisas antes de ler a documentação (o FAQ,
|
||||
este arquivo e os arquivos INSTALL), ou sobre coisas "legais" que você
|
||||
@@ -373,7 +345,7 @@ O nome das pessoas que ajudaram com a tradu
|
||||
Window Maker/README
|
||||
|
||||
Se você tem algum comentário, correção ou deseja relatar bugs (junto com
|
||||
o BUGFORM) mande-os para developers@windowmaker.org
|
||||
o BUGFORM) mande-os para developers@windowmaker.info
|
||||
|
||||
|
||||
Traduzido por: Ricardo Sartori <sartori@inf.ufsc.br>
|
||||
|
||||
14
TODO
14
TODO
@@ -7,13 +7,16 @@ Do ASAP:
|
||||
- fix RemakeStackList() to account for transient windows
|
||||
- blink border of clients with UrgencyHint set between red and black
|
||||
- finish session stuff
|
||||
- add multiline support for balloons
|
||||
- remove colors_per_channel stuff from wmaker after?
|
||||
+ finish the ability to browse for files/dirs in the WPrefs menu editor
|
||||
+ finish selections and DND stuff in WINGs
|
||||
- check whether window states are being saved/restored properly via netwm
|
||||
on restart/crash-restart (grep for XXX/TODO)
|
||||
|
||||
Need to do:
|
||||
===========
|
||||
- figure out a better gnustep path for wprefs.app installation
|
||||
- impelment a generic pixmap type, which receives attributes
|
||||
(scaled/maxscaled/centered/tiled, smoothed, size/position, ...)
|
||||
- allow user to select/restore default root menu from wprefs
|
||||
- support for X11R6.4 extension for getting extra visual info in wrlib's
|
||||
automatic best context guessing
|
||||
@@ -59,3 +62,10 @@ sample implementation (twm?) it might be supported. Maybe dtwm supports
|
||||
it? I dont know...
|
||||
|
||||
|
||||
After 1.0.0 is released
|
||||
=======================
|
||||
- rework/redesign the appicon/dock/clip concept
|
||||
- maybe rewrite the main code in obj-c or c++
|
||||
- major clean up in theming/texturing stuff
|
||||
- dynamically loadable everything
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
Makefile Makefile.in
|
||||
get-wings-flags get-wutil-flags
|
||||
.libs
|
||||
.psrc .inslog2 tca.map tca.log
|
||||
*.rpt
|
||||
.libs *.pc
|
||||
.psrc .inslog2 tca.map tca.log pchdir *.rpt
|
||||
|
||||
@@ -1,3 +1,79 @@
|
||||
Changes since wmaker 0.92.0:
|
||||
............................
|
||||
|
||||
- updated the XDND code in to work with GDK based applications.
|
||||
WINGs based applications should now work with both KDE and GNOME
|
||||
applications (Sylvain Reynal <sreynal@nerim.net>)
|
||||
- better check for the XDND protocol version when interoperating with other
|
||||
applications. As it seems xdnd version 3 (which WINGs supports) and newer
|
||||
are not backward compatible with xdnd version 1 and 2. This is why WINGs
|
||||
applications cannot interoperate with GNUstep applications (which uses
|
||||
xdnd version 2). Xdnd version 4 and 5 are backwards compatible with
|
||||
version 3 though. (Sylvain Reynal <sreynal@nerim.net>)
|
||||
- removed dependency on rgb.txt from X11 and issues with locating it on the
|
||||
filesystem for different systems/distributions.
|
||||
- Removed dependency on rgb.txt (from X11) and issues with locating it on the
|
||||
filesystem for different systems/distributions.
|
||||
|
||||
|
||||
Changes since wmaker 0.80.1:
|
||||
............................
|
||||
|
||||
- Added WMSetConnectionShutdownOnClose()
|
||||
- Added an extra member to the ConnectionDelegate: canResumeSending
|
||||
see NEWS for details.
|
||||
- WMDrawString() and WMDrawImageString() now take WMColor instead of GC as
|
||||
arguments. WMDrawImageString() receives 2 colors (text & background).
|
||||
This is to allow easy extension for Xft/Xrender and hide X low level details
|
||||
Read NEWS for details since this will break backward compatibility.
|
||||
- Added alpha channel to WMColor. 2 new functions also:
|
||||
WMCreateRGBAColor() and WMSetColorAlpha()
|
||||
- Miscelaneous code cleanups in wtext.c
|
||||
- Added Xft2 support in WINGs (for drawing antialiased fonts with transparency).
|
||||
- New options in WMGLOBAL: AntialiasedText. Check NEWS for details.
|
||||
- Fixed some improper calls to snprintf in wfont.c
|
||||
- Added double buffering when drawing a WMFrame title with an antialiased font
|
||||
to avoid flickering.
|
||||
- Added double buffering when drawing WMList items to avoid flickering.
|
||||
Double buffering for list also works for user drawn lists. Read NEWS for
|
||||
details and incompatibilities introduced by this change.
|
||||
- Added WMGetColorAlpha(WMColor *color)
|
||||
- Better outline when drawing balloons.
|
||||
- Added WMCreateFontWithAttributes()
|
||||
- You can now pass "SystemFont", "BoldSystemFont", "SystemFont-##" or
|
||||
"BoldSystemFont-##", with ## being the font size to any font creating
|
||||
function to create a font with the (bold) system font font specification.
|
||||
- Added WMCopyFontWithChanges(). This is a more generic and powerful function
|
||||
meant to replaces the obsoleted WMEmphasizeFont(), WMNormalizeFont(),
|
||||
WMStrenghtenFont() and the other similar functions. To get the same effect
|
||||
you pass some predefined structs to it: WFANormal, WFABold, WFAEmphasized,
|
||||
etc which are declared in WINGs.h).
|
||||
- Fixed a bug with empty frame titles (Alexey Voinov <voins@voins.program.ru>)
|
||||
- Added WMGetWidgetBackgroundColor()
|
||||
- Code cleanup in wtext.c
|
||||
- Fixed a memory leak in wfontpanel.c
|
||||
- Fixed WMGetTextDefaultColor() not to retain the returned color. It returns
|
||||
only a reference to the internal color, which you shouldn't release
|
||||
- Added wstrndup()
|
||||
- Added WMGetFontName()
|
||||
- Added fontpanel callback
|
||||
- Added WMSetTableViewHasHorizontalScroller()
|
||||
- Fixed bug that could cause SIGSEGV by accessing beyond the end of text in
|
||||
a WINGs textfield widget.
|
||||
- Fixed small memory leak in the font panel code.
|
||||
- Fixed call to qsort in WMSortArray.
|
||||
- Fixed a memleak in the file panel.
|
||||
- Double/triple-click selection in text widgets
|
||||
(Vitaly Ovtchinnikov <ov@rbcmail.ru>)
|
||||
- Fixed bug in tableview (clicked row callback got incorrect row)
|
||||
(Carlos Torres <vlaadbrain@operamail.com>)
|
||||
- Fixed bug in resizing a scrollview
|
||||
- Fixed bug with wrong text wrapping (Alexey Voinov <voins@voins.program.ru>)
|
||||
- Added wmkrect()
|
||||
- Added xdnd v3 support (Sylvain Reynal <sreynal@nerim.net>)
|
||||
- Fixed and enhanced text wrapping.
|
||||
|
||||
|
||||
Changes since wmaker 0.80.0:
|
||||
............................
|
||||
|
||||
@@ -204,7 +280,8 @@ changes since wmaker 0.62.1:
|
||||
as a result the shaded windows didn't go away when closed. The non-shaded
|
||||
windows were unmapped on close but not destroyed either so they only
|
||||
apparently went away, but continued to use memory).
|
||||
|
||||
- Fixed a bug in the hashtable code which free'd the whole item instead of
|
||||
just the item key in WMResetHashTable() (possible source of SIGSEGVs)
|
||||
|
||||
|
||||
changes since wmaker 0.62.0:
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
Makefile Makefile.in
|
||||
.psrc .inslog2 tca.map tca.log
|
||||
*.rpt
|
||||
.psrc .inslog2 tca.map tca.log pchdir *.rpt
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Makefile Makefile.in
|
||||
connect server fontl puzzle UserTime.plist
|
||||
colorpick
|
||||
.libs
|
||||
.psrc .inslog2 tca.map tca.log
|
||||
*.rpt
|
||||
.psrc .inslog2 tca.map tca.log pchdir *.rpt
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
AUTOMAKE_OPTIONS = no-dependencies
|
||||
|
||||
|
||||
noinst_PROGRAMS = connect server fontl puzzle
|
||||
noinst_PROGRAMS = connect server fontl puzzle colorpick
|
||||
|
||||
|
||||
LDADD= $(top_builddir)/WINGs/libWINGs.a $(top_builddir)/wrlib/libwraster.la \
|
||||
@INTLIBS@
|
||||
@XFTLIBS@ @INTLIBS@
|
||||
|
||||
colorpick_DEPENDENCIES = $(top_builddir)/WINGs/libWINGs.a
|
||||
|
||||
fontl_DEPENDENCIES = $(top_builddir)/WINGs/libWINGs.a
|
||||
|
||||
@@ -28,4 +29,13 @@ server_LDADD = $(top_builddir)/WINGs/libWUtil.a @LIBRARY_SEARCH_PATH@ \
|
||||
INCLUDES = -I$(top_srcdir)/WINGs -I$(top_srcdir)/wrlib -I$(top_srcdir)/src \
|
||||
-DRESOURCE_PATH=\"$(datadir)/WINGs\" @HEADER_SEARCH_PATH@ -DDEBUG
|
||||
|
||||
LIBTOOL = $(QUIET) $(SHELL) $(top_srcdir)/libtool $(LIBTOOL_ARG)
|
||||
|
||||
.c.o:
|
||||
$(QUIET)$(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
$(QUIET)$(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
$(QUIET)$(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
39
WINGs/Examples/colorpick.c
Normal file
39
WINGs/Examples/colorpick.c
Normal file
@@ -0,0 +1,39 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <WINGs/WINGs.h>
|
||||
|
||||
void showSelectedColor(void *self, void *cdata)
|
||||
{
|
||||
WMColorPanel *panel = (WMColorPanel *) self;
|
||||
|
||||
printf("Selected Color: %s\n", WMGetColorRGBDescription(WMGetColorPanelColor(panel)));
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
Display *dpy;
|
||||
WMScreen *scr;
|
||||
|
||||
WMInitializeApplication("wmcolorpick", &argc, argv);
|
||||
|
||||
dpy = XOpenDisplay("");
|
||||
if (!dpy) {
|
||||
printf("could not open display\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
scr = WMCreateScreen(dpy, DefaultScreen(dpy));
|
||||
|
||||
{
|
||||
WMColorPanel *panel = WMGetColorPanel(scr);
|
||||
|
||||
WMSetColorPanelAction(panel, showSelectedColor, NULL);
|
||||
|
||||
WMShowColorPanel(panel);
|
||||
}
|
||||
|
||||
WMScreenMainLoop(scr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1,196 +1,172 @@
|
||||
/*
|
||||
* WINGs connect.c: example how to create a network client using WMConnection
|
||||
*
|
||||
* Copyright (c) 1999-2002 Dan Pascu
|
||||
*
|
||||
*
|
||||
* Copyright (c) 1999-2003 Dan Pascu
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <WINGs/WINGs.h>
|
||||
|
||||
|
||||
|
||||
static int initialized = 0;
|
||||
|
||||
static void didReceiveInput(ConnectionDelegate * self, WMConnection * cPtr);
|
||||
|
||||
static void connectionDidDie(ConnectionDelegate * self, WMConnection * cPtr);
|
||||
|
||||
static void didReceiveInput(ConnectionDelegate *self, WMConnection *cPtr);
|
||||
|
||||
static void connectionDidDie(ConnectionDelegate *self, WMConnection *cPtr);
|
||||
|
||||
static void didInitialize(ConnectionDelegate *self, WMConnection *cPtr);
|
||||
|
||||
|
||||
static void didInitialize(ConnectionDelegate * self, WMConnection * cPtr);
|
||||
|
||||
static ConnectionDelegate socketDelegate = {
|
||||
NULL, /* data */
|
||||
NULL, /* didCatchException */
|
||||
connectionDidDie, /* didDie */
|
||||
didInitialize, /* didInitialize */
|
||||
didReceiveInput, /* didReceiveInput */
|
||||
NULL /* didTimeout */
|
||||
NULL, /* data */
|
||||
NULL, /* canResumeSending */
|
||||
NULL, /* didCatchException */
|
||||
connectionDidDie, /* didDie */
|
||||
didInitialize, /* didInitialize */
|
||||
didReceiveInput, /* didReceiveInput */
|
||||
NULL /* didTimeout */
|
||||
};
|
||||
|
||||
|
||||
|
||||
void
|
||||
wAbort(Bool foo)
|
||||
void wAbort(Bool foo)
|
||||
{
|
||||
exit(1);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
static char*
|
||||
getMessage(WMConnection *cPtr)
|
||||
static char *getMessage(WMConnection * cPtr)
|
||||
{
|
||||
char *buffer;
|
||||
WMData *aData;
|
||||
int length;
|
||||
char *buffer;
|
||||
WMData *aData;
|
||||
int length;
|
||||
|
||||
aData = WMGetConnectionAvailableData(cPtr);
|
||||
if (!aData)
|
||||
return NULL;
|
||||
if ((length=WMGetDataLength(aData))==0) {
|
||||
WMReleaseData(aData);
|
||||
return NULL;
|
||||
}
|
||||
aData = WMGetConnectionAvailableData(cPtr);
|
||||
if (!aData)
|
||||
return NULL;
|
||||
if ((length = WMGetDataLength(aData)) == 0) {
|
||||
WMReleaseData(aData);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
buffer = (char*)wmalloc(length+1);
|
||||
WMGetDataBytes(aData, buffer);
|
||||
buffer[length]= '\0';
|
||||
WMReleaseData(aData);
|
||||
buffer = (char *)wmalloc(length + 1);
|
||||
WMGetDataBytes(aData, buffer);
|
||||
buffer[length] = '\0';
|
||||
WMReleaseData(aData);
|
||||
|
||||
return buffer;
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
inputHandler(int fd, int mask, void *clientData)
|
||||
static void inputHandler(int fd, int mask, void *clientData)
|
||||
{
|
||||
WMConnection *cPtr = (WMConnection*)clientData;
|
||||
WMData *aData;
|
||||
char buf[4096];
|
||||
int n;
|
||||
WMConnection *cPtr = (WMConnection *) clientData;
|
||||
WMData *aData;
|
||||
char buf[4096];
|
||||
int n;
|
||||
|
||||
if (!initialized)
|
||||
return;
|
||||
if (!initialized)
|
||||
return;
|
||||
|
||||
n = read(fd, buf, 4096);
|
||||
if (n>0) {
|
||||
aData = WMCreateDataWithBytes(buf, n);
|
||||
WMSendConnectionData(cPtr, aData);
|
||||
WMReleaseData(aData);
|
||||
}
|
||||
n = read(fd, buf, 4096);
|
||||
if (n > 0) {
|
||||
aData = WMCreateDataWithBytes(buf, n);
|
||||
WMSendConnectionData(cPtr, aData);
|
||||
WMReleaseData(aData);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
didReceiveInput(ConnectionDelegate *self, WMConnection *cPtr)
|
||||
static void didReceiveInput(ConnectionDelegate * self, WMConnection * cPtr)
|
||||
{
|
||||
char *buffer;
|
||||
char *buffer;
|
||||
|
||||
buffer = getMessage(cPtr);
|
||||
if (!buffer) {
|
||||
fprintf(stderr, "Connection closed by peer.\n");
|
||||
exit(0);
|
||||
}
|
||||
buffer = getMessage(cPtr);
|
||||
if (!buffer) {
|
||||
fprintf(stderr, "Connection closed by peer.\n");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
printf("%s", buffer);
|
||||
printf("%s", buffer);
|
||||
|
||||
wfree(buffer);
|
||||
wfree(buffer);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
connectionDidDie(ConnectionDelegate *self, WMConnection *cPtr)
|
||||
static void connectionDidDie(ConnectionDelegate * self, WMConnection * cPtr)
|
||||
{
|
||||
WMCloseConnection(cPtr);
|
||||
WMCloseConnection(cPtr);
|
||||
|
||||
fprintf(stderr, "Connection closed by peer.\n");
|
||||
exit(0);
|
||||
fprintf(stderr, "Connection closed by peer.\n");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
didInitialize(ConnectionDelegate *self, WMConnection *cPtr)
|
||||
static void didInitialize(ConnectionDelegate * self, WMConnection * cPtr)
|
||||
{
|
||||
int state = WMGetConnectionState(cPtr);
|
||||
WMHost *host;
|
||||
int state = WMGetConnectionState(cPtr);
|
||||
WMHost *host;
|
||||
|
||||
if (state == WCConnected) {
|
||||
host = WMGetHostWithAddress(WMGetConnectionAddress(cPtr));
|
||||
fprintf(stderr, "connected to '%s:%s'\n",
|
||||
host?WMGetHostName(host):WMGetConnectionAddress(cPtr),
|
||||
WMGetConnectionService(cPtr));
|
||||
initialized = 1;
|
||||
if (host)
|
||||
WMReleaseHost(host);
|
||||
return;
|
||||
} else {
|
||||
wsyserrorwithcode(WCErrorCode, "Unable to connect");
|
||||
exit(1);
|
||||
}
|
||||
if (state == WCConnected) {
|
||||
host = WMGetHostWithAddress(WMGetConnectionAddress(cPtr));
|
||||
fprintf(stderr, "connected to '%s:%s'\n",
|
||||
host ? WMGetHostName(host) : WMGetConnectionAddress(cPtr), WMGetConnectionService(cPtr));
|
||||
initialized = 1;
|
||||
if (host)
|
||||
WMReleaseHost(host);
|
||||
return;
|
||||
} else {
|
||||
wsyserrorwithcode(WCErrorCode, "Unable to connect");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
char *ProgName, *host, *port;
|
||||
int i;
|
||||
WMConnection *sPtr;
|
||||
char *ProgName, *host, *port;
|
||||
int i;
|
||||
WMConnection *sPtr;
|
||||
|
||||
wsetabort(wAbort);
|
||||
wsetabort(wAbort);
|
||||
|
||||
WMInitializeApplication("connect", &argc, argv);
|
||||
WMInitializeApplication("connect", &argc, argv);
|
||||
|
||||
ProgName = strrchr(argv[0],'/');
|
||||
if (!ProgName)
|
||||
ProgName = argv[0];
|
||||
else
|
||||
ProgName++;
|
||||
ProgName = strrchr(argv[0], '/');
|
||||
if (!ProgName)
|
||||
ProgName = argv[0];
|
||||
else
|
||||
ProgName++;
|
||||
|
||||
host = NULL;
|
||||
port = "34567";
|
||||
host = NULL;
|
||||
port = "34567";
|
||||
|
||||
if (argc>1) {
|
||||
for (i=1; i<argc; i++) {
|
||||
if (strcmp(argv[i], "--help")==0 || strcmp(argv[i], "-h")==0) {
|
||||
printf("usage: %s [host [port]]\n\n", ProgName);
|
||||
exit(0);
|
||||
} else {
|
||||
if (!host)
|
||||
host = argv[i];
|
||||
else
|
||||
port = argv[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
if (argc > 1) {
|
||||
for (i = 1; i < argc; i++) {
|
||||
if (strcmp(argv[i], "--help") == 0 || strcmp(argv[i], "-h") == 0) {
|
||||
printf("usage: %s [host [port]]\n\n", ProgName);
|
||||
exit(0);
|
||||
} else {
|
||||
if (!host)
|
||||
host = argv[i];
|
||||
else
|
||||
port = argv[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
printf("Trying to make connection to '%s:%s'\n",
|
||||
host?host:"localhost", port);
|
||||
printf("Trying to make connection to '%s:%s'\n", host ? host : "localhost", port);
|
||||
|
||||
sPtr = WMCreateConnectionToAddressAndNotify(host, port, NULL);
|
||||
if (!sPtr) {
|
||||
wfatal("could not create connection. exiting");
|
||||
exit(1);
|
||||
}
|
||||
sPtr = WMCreateConnectionToAddressAndNotify(host, port, NULL);
|
||||
if (!sPtr) {
|
||||
wfatal("could not create connection. exiting");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
WMSetConnectionDelegate(sPtr, &socketDelegate);
|
||||
WMSetConnectionDelegate(sPtr, &socketDelegate);
|
||||
|
||||
/* watch what user types and send it over the connection */
|
||||
WMAddInputHandler(0, WIReadMask, inputHandler, sPtr);
|
||||
/* watch what user types and send it over the connection */
|
||||
WMAddInputHandler(0, WIReadMask, inputHandler, sPtr);
|
||||
|
||||
while (1) {
|
||||
WHandleEvents();
|
||||
}
|
||||
while (1) {
|
||||
WHandleEvents();
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* WINGs demo: font lister
|
||||
*
|
||||
* Copyright (c) 1998-2002 Alfredo K. Kojima
|
||||
*
|
||||
*
|
||||
* Copyright (c) 1998-2003 Alfredo K. Kojima
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
@@ -15,90 +15,84 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <WINGs/WINGs.h>
|
||||
#include <WINGs/WUtil.h>
|
||||
|
||||
void
|
||||
wAbort()
|
||||
void wAbort()
|
||||
{
|
||||
exit(0);
|
||||
}
|
||||
|
||||
void show(WMWidget *self, void *data)
|
||||
{
|
||||
char buf[60];
|
||||
void *d;
|
||||
WMLabel *l = (WMLabel*)data;
|
||||
d = WMGetHangedData(self);
|
||||
sprintf(buf, "%i - 0x%x - 0%o", (int)d, (int)d, (int)d);
|
||||
WMSetLabelText(l, buf);
|
||||
}
|
||||
|
||||
void quit(WMWidget *self, void *data)
|
||||
{
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
Display *dpy;
|
||||
WMWindow *win;
|
||||
WMScreen *scr;
|
||||
WMButton *lab, *l0=NULL;
|
||||
WMLabel *pos;
|
||||
int x, y, c;
|
||||
char buf[20];
|
||||
|
||||
WMInitializeApplication("FontView", &argc, argv);
|
||||
|
||||
dpy = XOpenDisplay("");
|
||||
if (!dpy) {
|
||||
wfatal("cant open display");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
scr = WMCreateSimpleApplicationScreen(dpy);
|
||||
|
||||
win = WMCreateWindow(scr, "main");
|
||||
WMResizeWidget(win, 20*33, 20+20*9);
|
||||
WMSetWindowTitle(win, "Font Chars");
|
||||
WMSetWindowCloseAction(win, quit, NULL);
|
||||
pos = WMCreateLabel(win);
|
||||
WMResizeWidget(pos, 20*33, 20);
|
||||
WMMoveWidget(pos, 10, 5);
|
||||
|
||||
c = 0;
|
||||
for (y=0; y<8; y++) {
|
||||
for (x=0; x<32; x++, c++) {
|
||||
lab = WMCreateCustomButton(win, WBBStateLightMask);
|
||||
WMResizeWidget(lab, 20, 20);
|
||||
WMMoveWidget(lab, 10+x*20, 30+y*20);
|
||||
sprintf(buf, "%c", c);
|
||||
WMSetButtonText(lab, buf);
|
||||
WMSetButtonAction(lab, show, pos);
|
||||
WMHangData(lab, (void*)c);
|
||||
if (c>0) {
|
||||
WMGroupButtons(l0, lab);
|
||||
} else {
|
||||
l0 = lab;
|
||||
}
|
||||
}
|
||||
}
|
||||
WMRealizeWidget(win);
|
||||
WMMapSubwidgets(win);
|
||||
WMMapWidget(win);
|
||||
WMScreenMainLoop(scr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void show(WMWidget * self, void *data)
|
||||
{
|
||||
char buf[60];
|
||||
void *d;
|
||||
WMLabel *l = (WMLabel *) data;
|
||||
d = WMGetHangedData(self);
|
||||
sprintf(buf, "%i - 0x%x - 0%o", (int)(uintptr_t) d, (int)(uintptr_t) d, (int)(uintptr_t) d);
|
||||
WMSetLabelText(l, buf);
|
||||
}
|
||||
|
||||
void quit(WMWidget * self, void *data)
|
||||
{
|
||||
exit(0);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
Display *dpy;
|
||||
WMWindow *win;
|
||||
WMScreen *scr;
|
||||
WMButton *lab, *l0 = NULL;
|
||||
WMLabel *pos;
|
||||
int x, y, c;
|
||||
char buf[20];
|
||||
|
||||
WMInitializeApplication("FontView", &argc, argv);
|
||||
|
||||
dpy = XOpenDisplay("");
|
||||
if (!dpy) {
|
||||
wfatal("cant open display");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
scr = WMCreateSimpleApplicationScreen(dpy);
|
||||
|
||||
win = WMCreateWindow(scr, "main");
|
||||
WMResizeWidget(win, 20 * 33, 20 + 20 * 9);
|
||||
WMSetWindowTitle(win, "Font Chars");
|
||||
WMSetWindowCloseAction(win, quit, NULL);
|
||||
pos = WMCreateLabel(win);
|
||||
WMResizeWidget(pos, 20 * 33, 20);
|
||||
WMMoveWidget(pos, 10, 5);
|
||||
|
||||
c = 0;
|
||||
for (y = 0; y < 8; y++) {
|
||||
for (x = 0; x < 32; x++, c++) {
|
||||
lab = WMCreateCustomButton(win, WBBStateLightMask);
|
||||
WMResizeWidget(lab, 20, 20);
|
||||
WMMoveWidget(lab, 10 + x * 20, 30 + y * 20);
|
||||
sprintf(buf, "%c", c);
|
||||
WMSetButtonText(lab, buf);
|
||||
WMSetButtonAction(lab, show, pos);
|
||||
WMHangData(lab, (void *)(uintptr_t) c);
|
||||
if (c > 0) {
|
||||
WMGroupButtons(l0, lab);
|
||||
} else {
|
||||
l0 = lab;
|
||||
}
|
||||
}
|
||||
}
|
||||
WMRealizeWidget(win);
|
||||
WMMapSubwidgets(win);
|
||||
WMMapWidget(win);
|
||||
WMScreenMainLoop(scr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <WINGs/WINGs.h>
|
||||
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define MAX_SIZE 10*10
|
||||
|
||||
|
||||
WMWindow *win;
|
||||
WMButton *Button[MAX_SIZE];
|
||||
char Map[MAX_SIZE];
|
||||
@@ -20,222 +16,218 @@ int MoveCount;
|
||||
|
||||
int WinSize = 120;
|
||||
|
||||
|
||||
Bool CheckWin(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < Size*Size-1; i++) {
|
||||
if (Map[i] != i)
|
||||
return False;
|
||||
}
|
||||
|
||||
return True;
|
||||
}
|
||||
int i;
|
||||
|
||||
for (i = 0; i < Size * Size - 1; i++) {
|
||||
if (Map[i] != i)
|
||||
return False;
|
||||
}
|
||||
|
||||
return True;
|
||||
}
|
||||
|
||||
void MoveButton(int button, int x, int y)
|
||||
{
|
||||
WMMoveWidget(Button[button], x*(WinSize/Size), y*(WinSize/Size));
|
||||
WMMoveWidget(Button[button], x * (WinSize / Size), y * (WinSize / Size));
|
||||
}
|
||||
|
||||
|
||||
Bool SlideButton(int button)
|
||||
{
|
||||
int x, y, done = 0;
|
||||
|
||||
/* locate the button */
|
||||
for (y = 0; y < Size; y++) {
|
||||
for (x = 0; x < Size; x++) {
|
||||
if (MAP(x,y) == button) {
|
||||
done = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (done)
|
||||
break;
|
||||
}
|
||||
|
||||
if (x > 0 && MAP(x-1, y) < 0) {
|
||||
MAP(x,y) = -1;
|
||||
MoveButton(button, x-1, y);
|
||||
MAP(x-1,y) = button;
|
||||
} else if (x < Size-1 && MAP(x+1, y) < 0) {
|
||||
MAP(x,y) = -1;
|
||||
MoveButton(button, x+1, y);
|
||||
MAP(x+1,y) = button;
|
||||
} else if (y > 0 && MAP(x, y-1) < 0) {
|
||||
MAP(x,y) = -1;
|
||||
MoveButton(button, x, y-1);
|
||||
MAP(x,y-1) = button;
|
||||
} else if (y < Size-1 && MAP(x, y+1) < 0) {
|
||||
MAP(x,y) = -1;
|
||||
MoveButton(button, x, y+1);
|
||||
MAP(x,y+1) = button;
|
||||
} else {
|
||||
return False;
|
||||
}
|
||||
return True;
|
||||
}
|
||||
int x = 0, y = 0, done = 0;
|
||||
|
||||
/* locate the button */
|
||||
for (y = 0; y < Size; y++) {
|
||||
for (x = 0; x < Size; x++) {
|
||||
if (MAP(x, y) == button) {
|
||||
done = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (done)
|
||||
break;
|
||||
}
|
||||
|
||||
if (x > 0 && MAP(x - 1, y) < 0) {
|
||||
MAP(x, y) = -1;
|
||||
MoveButton(button, x - 1, y);
|
||||
MAP(x - 1, y) = button;
|
||||
} else if (x < Size - 1 && MAP(x + 1, y) < 0) {
|
||||
MAP(x, y) = -1;
|
||||
MoveButton(button, x + 1, y);
|
||||
MAP(x + 1, y) = button;
|
||||
} else if (y > 0 && MAP(x, y - 1) < 0) {
|
||||
MAP(x, y) = -1;
|
||||
MoveButton(button, x, y - 1);
|
||||
MAP(x, y - 1) = button;
|
||||
} else if (y < Size - 1 && MAP(x, y + 1) < 0) {
|
||||
MAP(x, y) = -1;
|
||||
MoveButton(button, x, y + 1);
|
||||
MAP(x, y + 1) = button;
|
||||
} else {
|
||||
return False;
|
||||
}
|
||||
return True;
|
||||
}
|
||||
|
||||
#define SWAP(a,b) {int tmp; tmp=a; a=b; b=tmp;}
|
||||
|
||||
void ResetGame(void)
|
||||
{
|
||||
int i, x, y, ox, oy;
|
||||
|
||||
|
||||
MoveCount = 0;
|
||||
|
||||
for (i = 0; i < Size*Size-1; i++) {
|
||||
Map[i] = i;
|
||||
}
|
||||
Map[i] = -1;
|
||||
ox = x = Size-1;
|
||||
oy = y = Size-1;
|
||||
for (i = 0; i < 1000; i++) {
|
||||
int ok;
|
||||
ok = 1;
|
||||
switch (rand()%4) {
|
||||
case 0:
|
||||
if (x > 0) x--; else ok = 0;
|
||||
break;
|
||||
case 2:
|
||||
if (x < Size-1) x++; else ok = 0;
|
||||
break;
|
||||
case 1:
|
||||
if (y > 0) y--; else ok = 0;
|
||||
break;
|
||||
case 3:
|
||||
if (y < Size-1) y++; else ok = 0;
|
||||
break;
|
||||
}
|
||||
if (ok) {
|
||||
MoveButton(MAP(x,y), ox, oy);
|
||||
int i, x, y, ox, oy;
|
||||
|
||||
SWAP(MAP(ox, oy), MAP(x, y));
|
||||
|
||||
while (XPending(WMScreenDisplay(WMWidgetScreen(win)))) {
|
||||
XEvent ev;
|
||||
WMNextEvent(WMScreenDisplay(WMWidgetScreen(win)), &ev);
|
||||
WMHandleEvent(&ev);
|
||||
}
|
||||
ox = x;
|
||||
oy = y;
|
||||
MoveCount = 0;
|
||||
|
||||
for (i = 0; i < Size * Size - 1; i++) {
|
||||
Map[i] = i;
|
||||
}
|
||||
Map[i] = -1;
|
||||
ox = x = Size - 1;
|
||||
oy = y = Size - 1;
|
||||
for (i = 0; i < 1000; i++) {
|
||||
int ok;
|
||||
ok = 1;
|
||||
switch (rand() % 4) {
|
||||
case 0:
|
||||
if (x > 0)
|
||||
x--;
|
||||
else
|
||||
ok = 0;
|
||||
break;
|
||||
case 2:
|
||||
if (x < Size - 1)
|
||||
x++;
|
||||
else
|
||||
ok = 0;
|
||||
break;
|
||||
case 1:
|
||||
if (y > 0)
|
||||
y--;
|
||||
else
|
||||
ok = 0;
|
||||
break;
|
||||
case 3:
|
||||
if (y < Size - 1)
|
||||
y++;
|
||||
else
|
||||
ok = 0;
|
||||
break;
|
||||
}
|
||||
if (ok) {
|
||||
MoveButton(MAP(x, y), ox, oy);
|
||||
|
||||
SWAP(MAP(ox, oy), MAP(x, y));
|
||||
|
||||
while (XPending(WMScreenDisplay(WMWidgetScreen(win)))) {
|
||||
XEvent ev;
|
||||
WMNextEvent(WMScreenDisplay(WMWidgetScreen(win)), &ev);
|
||||
WMHandleEvent(&ev);
|
||||
}
|
||||
ox = x;
|
||||
oy = y;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void buttonClick(WMWidget *w, void *ptr)
|
||||
void buttonClick(WMWidget * w, void *ptr)
|
||||
{
|
||||
char buffer[300];
|
||||
char buffer[300];
|
||||
|
||||
if (SlideButton((int)ptr)) {
|
||||
MoveCount++;
|
||||
if (SlideButton((int)(uintptr_t) ptr)) {
|
||||
MoveCount++;
|
||||
|
||||
if (CheckWin()) {
|
||||
sprintf(buffer, "You finished the game in %i moves.", MoveCount);
|
||||
if (CheckWin()) {
|
||||
sprintf(buffer, "You finished the game in %i moves.", MoveCount);
|
||||
|
||||
if (WMRunAlertPanel(WMWidgetScreen(w), win, "You Won!", buffer,
|
||||
"Wee!", "Gah! Lemme retry!", NULL) == WAPRDefault) {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
ResetGame();
|
||||
if (WMRunAlertPanel(WMWidgetScreen(w), win, "You Won!", buffer,
|
||||
"Wee!", "Gah! Lemme retry!", NULL) == WAPRDefault) {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
ResetGame();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void resizeObserver(void *self, WMNotification *notif)
|
||||
static void resizeObserver(void *self, WMNotification * notif)
|
||||
{
|
||||
WMSize size = WMGetViewSize(WMWidgetView(win));
|
||||
int x, y;
|
||||
|
||||
WinSize = size.width;
|
||||
for (y = 0; y < Size; y++) {
|
||||
for (x = 0; x < Size; x++) {
|
||||
if (MAP(x,y) >= 0) {
|
||||
WMResizeWidget(Button[(int)MAP(x,y)],
|
||||
WinSize/Size, WinSize/Size);
|
||||
WMMoveWidget(Button[(int)MAP(x,y)],
|
||||
x*(WinSize/Size), y*(WinSize/Size));
|
||||
}
|
||||
WMSize size = WMGetViewSize(WMWidgetView(win));
|
||||
int x, y;
|
||||
|
||||
WinSize = size.width;
|
||||
for (y = 0; y < Size; y++) {
|
||||
for (x = 0; x < Size; x++) {
|
||||
if (MAP(x, y) >= 0) {
|
||||
WMResizeWidget(Button[(int)MAP(x, y)], WinSize / Size, WinSize / Size);
|
||||
WMMoveWidget(Button[(int)MAP(x, y)], x * (WinSize / Size), y * (WinSize / Size));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
Display *dpy;
|
||||
WMScreen *scr;
|
||||
int x, y, i;
|
||||
|
||||
WMInitializeApplication("Puzzle", &argc, argv);
|
||||
Display *dpy;
|
||||
WMScreen *scr;
|
||||
int x, y, i;
|
||||
|
||||
|
||||
dpy = XOpenDisplay("");
|
||||
if (!dpy) {
|
||||
printf("could not open display\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
scr = WMCreateScreen(dpy, DefaultScreen(dpy));
|
||||
|
||||
win = WMCreateWindow(scr, "puzzle");
|
||||
WMResizeWidget(win, WinSize, WinSize);
|
||||
WMSetWindowTitle(win, "zuPzel");
|
||||
WMSetWindowMinSize(win, 80, 80);
|
||||
WMSetWindowAspectRatio(win, 2, 2, 2, 2);
|
||||
WMSetWindowResizeIncrements(win, Size, Size);
|
||||
WMSetViewNotifySizeChanges(WMWidgetView(win), True);
|
||||
WMAddNotificationObserver(resizeObserver, NULL,
|
||||
WMViewSizeDidChangeNotification,
|
||||
WMWidgetView(win));
|
||||
|
||||
|
||||
|
||||
for (i = y = 0; y < Size && i < Size*Size-1; y++) {
|
||||
for (x = 0; x < Size && i < Size*Size-1; x++) {
|
||||
char buf[32];
|
||||
WMColor *color;
|
||||
RColor col;
|
||||
RHSVColor hsv;
|
||||
|
||||
hsv.hue = i*360/(Size*Size-1);
|
||||
hsv.saturation = 120;
|
||||
hsv.value = 200;
|
||||
|
||||
RHSVtoRGB(&hsv, &col);
|
||||
WMInitializeApplication("Puzzle", &argc, argv);
|
||||
|
||||
color = WMCreateRGBColor(scr, col.red<<8, col.green<<8,
|
||||
col.blue<<8, False);
|
||||
|
||||
MAP(x,y) = i;
|
||||
Button[i] = WMCreateButton(win, WBTMomentaryLight);
|
||||
WMSetWidgetBackgroundColor(Button[i], color);
|
||||
WMReleaseColor(color);
|
||||
WMSetButtonAction(Button[i], buttonClick, (void*)i);
|
||||
WMResizeWidget(Button[i], WinSize/Size, WinSize/Size);
|
||||
WMMoveWidget(Button[i], x*(WinSize/Size), y*(WinSize/Size));
|
||||
sprintf(buf, "%i", i+1);
|
||||
WMSetButtonText(Button[i], buf);
|
||||
WMSetButtonTextAlignment(Button[i], WACenter);
|
||||
i++;
|
||||
dpy = XOpenDisplay("");
|
||||
if (!dpy) {
|
||||
printf("could not open display\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
WMMapSubwidgets(win);
|
||||
WMMapWidget(win);
|
||||
WMRealizeWidget(win);
|
||||
|
||||
ResetGame();
|
||||
|
||||
WMScreenMainLoop(scr);
|
||||
|
||||
return 0;
|
||||
scr = WMCreateScreen(dpy, DefaultScreen(dpy));
|
||||
|
||||
win = WMCreateWindow(scr, "puzzle");
|
||||
WMResizeWidget(win, WinSize, WinSize);
|
||||
WMSetWindowTitle(win, "zuPzel");
|
||||
WMSetWindowMinSize(win, 80, 80);
|
||||
WMSetWindowAspectRatio(win, 2, 2, 2, 2);
|
||||
WMSetWindowResizeIncrements(win, Size, Size);
|
||||
WMSetViewNotifySizeChanges(WMWidgetView(win), True);
|
||||
WMAddNotificationObserver(resizeObserver, NULL, WMViewSizeDidChangeNotification, WMWidgetView(win));
|
||||
|
||||
for (i = y = 0; y < Size && i < Size * Size - 1; y++) {
|
||||
for (x = 0; x < Size && i < Size * Size - 1; x++) {
|
||||
char buf[32];
|
||||
WMColor *color;
|
||||
RColor col;
|
||||
RHSVColor hsv;
|
||||
|
||||
hsv.hue = i * 360 / (Size * Size - 1);
|
||||
hsv.saturation = 120;
|
||||
hsv.value = 200;
|
||||
|
||||
RHSVtoRGB(&hsv, &col);
|
||||
|
||||
color = WMCreateRGBColor(scr, col.red << 8, col.green << 8, col.blue << 8, False);
|
||||
|
||||
MAP(x, y) = i;
|
||||
Button[i] = WMCreateButton(win, WBTMomentaryLight);
|
||||
WMSetWidgetBackgroundColor(Button[i], color);
|
||||
WMReleaseColor(color);
|
||||
WMSetButtonAction(Button[i], buttonClick, (void *)(uintptr_t) i);
|
||||
WMResizeWidget(Button[i], WinSize / Size, WinSize / Size);
|
||||
WMMoveWidget(Button[i], x * (WinSize / Size), y * (WinSize / Size));
|
||||
sprintf(buf, "%i", i + 1);
|
||||
WMSetButtonText(Button[i], buf);
|
||||
WMSetButtonTextAlignment(Button[i], WACenter);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
WMMapSubwidgets(win);
|
||||
WMMapWidget(win);
|
||||
WMRealizeWidget(win);
|
||||
|
||||
ResetGame();
|
||||
|
||||
WMScreenMainLoop(scr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,4 @@
|
||||
Makefile Makefile.in
|
||||
.libs
|
||||
test
|
||||
.psrc .inslog2 tca.map tca.log
|
||||
*.rpt
|
||||
.psrc .inslog2 tca.map tca.log pchdir *.rpt
|
||||
|
||||
@@ -16,18 +16,31 @@ noinst_PROGRAMS = test
|
||||
|
||||
EXTRA_DIST =
|
||||
|
||||
libExtraWINGs_a_AR = $(QUIET_AR) $(AR) $(ARFLAGS)
|
||||
|
||||
libExtraWINGs_a_SOURCES = \
|
||||
wtableview.c \
|
||||
wtabledelegates.c \
|
||||
wtableview.h \
|
||||
wtabledelegates.h
|
||||
|
||||
AM_CFLAGS = @NOSTRICTALIASING@
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/wrlib -I$(top_srcdir)/WINGs \
|
||||
-DRESOURCE_PATH=\"$(datadir)/WINGs\" @HEADER_SEARCH_PATH@ -DDEBUG
|
||||
|
||||
LDADD= $(top_builddir)/WINGs/libWINGs.a $(top_builddir)/wrlib/libwraster.la \
|
||||
@INTLIBS@
|
||||
@XFTLIBS@ @INTLIBS@
|
||||
|
||||
test_LDADD = wtableview.o wtabledelegates.o $(LDADD)
|
||||
|
||||
LIBTOOL = $(QUIET) $(SHELL) $(top_srcdir)/libtool $(LIBTOOL_ARG)
|
||||
|
||||
.c.o:
|
||||
$(QUIET)$(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
$(QUIET)$(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
$(QUIET)$(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
@@ -1,134 +1,124 @@
|
||||
|
||||
|
||||
#include <WINGs/WINGs.h>
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include "wtableview.h"
|
||||
#include "wtabledelegates.h"
|
||||
|
||||
static char *col1[20] = { 0 };
|
||||
|
||||
static char *col1[20] = {0};
|
||||
static int col2[20];
|
||||
|
||||
|
||||
static char *options[] = {
|
||||
"Option1",
|
||||
"Option1",
|
||||
"Option2",
|
||||
"Option3",
|
||||
"Option4",
|
||||
"Option5"
|
||||
};
|
||||
|
||||
|
||||
int numberOfRows(WMTableViewDelegate *self, WMTableView *table)
|
||||
int numberOfRows(WMTableViewDelegate * self, WMTableView * table)
|
||||
{
|
||||
return 20;
|
||||
return 20;
|
||||
}
|
||||
|
||||
|
||||
void *valueForCell(WMTableViewDelegate *self, WMTableColumn *column, int row)
|
||||
void *valueForCell(WMTableViewDelegate * self, WMTableColumn * column, int row)
|
||||
{
|
||||
/*WMTableView *table = (WMTableView*)WMGetTableColumnTableView(column);*/
|
||||
int i;
|
||||
if (col1[0] == 0) {
|
||||
for (i = 0; i < 20; i++) {
|
||||
char buf[128];
|
||||
/*WMTableView *table = (WMTableView*)WMGetTableColumnTableView(column); */
|
||||
int i;
|
||||
if (col1[0] == 0) {
|
||||
for (i = 0; i < 20; i++) {
|
||||
char buf[128];
|
||||
|
||||
sprintf(buf, "Test row %i", i);
|
||||
sprintf(buf, "Test row %i", i);
|
||||
|
||||
col1[i] = wstrdup(buf);
|
||||
col2[i] = 0;
|
||||
col1[i] = wstrdup(buf);
|
||||
col2[i] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((int)WMGetTableColumnId(column) == 1)
|
||||
return col1[row];
|
||||
else
|
||||
return (void*)col2[row];
|
||||
if ((int)(uintptr_t) WMGetTableColumnId(column) == 1)
|
||||
return col1[row];
|
||||
else
|
||||
return (void *)(uintptr_t) col2[row];
|
||||
}
|
||||
|
||||
|
||||
void setValueForCell(WMTableViewDelegate *self, WMTableColumn *column, int row,
|
||||
void *data)
|
||||
void setValueForCell(WMTableViewDelegate * self, WMTableColumn * column, int row, void *data)
|
||||
{
|
||||
if ((int)WMGetTableColumnId(column) == 1)
|
||||
col1[row] = data;
|
||||
else
|
||||
col2[row] = (int)data;
|
||||
if ((int)(uintptr_t) WMGetTableColumnId(column) == 1)
|
||||
col1[row] = data;
|
||||
else
|
||||
col2[row] = (int)(uintptr_t) data;
|
||||
}
|
||||
|
||||
|
||||
static WMTableViewDelegate delegate = {
|
||||
NULL,
|
||||
NULL,
|
||||
numberOfRows,
|
||||
valueForCell,
|
||||
setValueForCell
|
||||
};
|
||||
|
||||
|
||||
|
||||
void clickedTable(WMWidget *w, void *self)
|
||||
{
|
||||
int row = WMGetTableViewClickedRow((WMTableView*)self);
|
||||
|
||||
WMEditTableViewRow(self, row);
|
||||
}
|
||||
|
||||
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
void clickedTable(WMWidget * w, void *self)
|
||||
{
|
||||
WMScreen *scr;
|
||||
WMWindow *win;
|
||||
WMTableView *table;
|
||||
WMTableColumn *col;
|
||||
WMTableColumnDelegate *colDeleg;
|
||||
|
||||
WMInitializeApplication("test", &argc, argv);
|
||||
|
||||
scr = WMOpenScreen(NULL);
|
||||
int row = WMGetTableViewClickedRow((WMTableView *) self);
|
||||
|
||||
XSynchronize(WMScreenDisplay(scr), 1);
|
||||
|
||||
win = WMCreateWindow(scr, "eweq");
|
||||
WMResizeWidget(win, 400, 200);
|
||||
WMMapWidget(win);
|
||||
|
||||
table = WMCreateTableView(win);
|
||||
WMSetViewExpandsToParent(WMWidgetView(table), 10, 10, 10, 10);
|
||||
WMSetTableViewBackgroundColor(table, WMWhiteColor(scr));
|
||||
/*WMSetTableViewGridColor(table, WMGrayColor(scr));*/
|
||||
WMSetTableViewHeaderHeight(table, 20);
|
||||
WMSetTableViewDelegate(table, &delegate);
|
||||
WMSetTableViewAction(table, clickedTable, table);
|
||||
|
||||
colDeleg = WTCreateStringEditorDelegate(table);
|
||||
|
||||
col = WMCreateTableColumn("Group");
|
||||
WMSetTableColumnWidth(col, 180);
|
||||
WMAddTableViewColumn(table, col);
|
||||
WMSetTableColumnDelegate(col, colDeleg);
|
||||
WMSetTableColumnId(col, (void*)1);
|
||||
|
||||
colDeleg = WTCreateEnumSelectorDelegate(table);
|
||||
WTSetEnumSelectorOptions(colDeleg, options, 5);
|
||||
|
||||
col = WMCreateTableColumn("Package");
|
||||
WMSetTableColumnWidth(col, 140);
|
||||
WMAddTableViewColumn(table, col);
|
||||
WMSetTableColumnDelegate(col, colDeleg);
|
||||
WMSetTableColumnId(col, (void*)2);
|
||||
|
||||
colDeleg = WTCreateBooleanSwitchDelegate(table);
|
||||
|
||||
col = WMCreateTableColumn("Bool");
|
||||
WMSetTableColumnWidth(col, 50);
|
||||
WMAddTableViewColumn(table, col);
|
||||
WMSetTableColumnDelegate(col, colDeleg);
|
||||
WMSetTableColumnId(col, (void*)2);
|
||||
|
||||
WMMapWidget(table);
|
||||
WMRealizeWidget(win);
|
||||
WMScreenMainLoop(scr);
|
||||
|
||||
return 0;
|
||||
WMEditTableViewRow(self, row);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
WMScreen *scr;
|
||||
WMWindow *win;
|
||||
WMTableView *table;
|
||||
WMTableColumn *col;
|
||||
WMTableColumnDelegate *colDeleg;
|
||||
|
||||
WMInitializeApplication("test", &argc, argv);
|
||||
|
||||
scr = WMOpenScreen(NULL);
|
||||
|
||||
XSynchronize(WMScreenDisplay(scr), 1);
|
||||
|
||||
win = WMCreateWindow(scr, "eweq");
|
||||
WMResizeWidget(win, 400, 200);
|
||||
WMMapWidget(win);
|
||||
|
||||
table = WMCreateTableView(win);
|
||||
WMSetTableViewHasHorizontalScroller(table, 0);
|
||||
WMSetViewExpandsToParent(WMWidgetView(table), 10, 10, 10, 10);
|
||||
WMSetTableViewBackgroundColor(table, WMWhiteColor(scr));
|
||||
/*WMSetTableViewGridColor(table, WMGrayColor(scr)); */
|
||||
WMSetTableViewHeaderHeight(table, 20);
|
||||
WMSetTableViewDelegate(table, &delegate);
|
||||
WMSetTableViewAction(table, clickedTable, table);
|
||||
|
||||
colDeleg = WTCreateStringEditorDelegate(table);
|
||||
|
||||
col = WMCreateTableColumn("Group");
|
||||
WMSetTableColumnWidth(col, 180);
|
||||
WMAddTableViewColumn(table, col);
|
||||
WMSetTableColumnDelegate(col, colDeleg);
|
||||
WMSetTableColumnId(col, (void *)1);
|
||||
|
||||
colDeleg = WTCreateEnumSelectorDelegate(table);
|
||||
WTSetEnumSelectorOptions(colDeleg, options, 5);
|
||||
|
||||
col = WMCreateTableColumn("Package");
|
||||
WMSetTableColumnWidth(col, 140);
|
||||
WMAddTableViewColumn(table, col);
|
||||
WMSetTableColumnDelegate(col, colDeleg);
|
||||
WMSetTableColumnId(col, (void *)2);
|
||||
|
||||
colDeleg = WTCreateBooleanSwitchDelegate(table);
|
||||
|
||||
col = WMCreateTableColumn("Bool");
|
||||
WMSetTableColumnWidth(col, 50);
|
||||
WMAddTableViewColumn(table, col);
|
||||
WMSetTableColumnDelegate(col, colDeleg);
|
||||
WMSetTableColumnId(col, (void *)2);
|
||||
|
||||
WMMapWidget(table);
|
||||
WMRealizeWidget(win);
|
||||
WMScreenMainLoop(scr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,7 @@ WMTableColumnDelegate *WTCreateStringEditorDelegate(WMTableView *table);
|
||||
|
||||
WMTableColumnDelegate *WTCreateEnumSelectorDelegate(WMTableView *table);
|
||||
void WTSetEnumSelectorOptions(WMTableColumnDelegate *delegate,
|
||||
char **options, int count);
|
||||
char **options, int count);
|
||||
|
||||
WMTableColumnDelegate *WTCreateBooleanSwitchDelegate(WMTableView *parent);
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -18,97 +18,101 @@ extern const char *WMTableViewSelectionDidChangeNotification;
|
||||
typedef struct WMTableColumnDelegate {
|
||||
void *data;
|
||||
void (*drawCell)(struct WMTableColumnDelegate *self,
|
||||
WMTableColumn *column, int row, Drawable d);
|
||||
WMTableColumn *column, int row, Drawable d);
|
||||
void (*drawSelectedCell)(struct WMTableColumnDelegate *self,
|
||||
WMTableColumn *column, int row, Drawable d);
|
||||
WMTableColumn *column, int row, Drawable d);
|
||||
|
||||
void (*beginCellEdit)(struct WMTableColumnDelegate *self, WMTableColumn *column,
|
||||
int row);
|
||||
int row);
|
||||
void (*endCellEdit)(struct WMTableColumnDelegate *self, WMTableColumn *column,
|
||||
int row);
|
||||
int row);
|
||||
} WMTableColumnDelegate;
|
||||
|
||||
|
||||
typedef struct W_TableViewDelegate {
|
||||
void *data;
|
||||
int (*numberOfRows)(struct W_TableViewDelegate *self,
|
||||
WMTableView *table);
|
||||
void *(*valueForCell)(struct W_TableViewDelegate *self,
|
||||
WMTableColumn *column, int row);
|
||||
void (*setValueForCell)(struct W_TableViewDelegate *self,
|
||||
WMTableColumn *column, int row, void *value);
|
||||
int (*numberOfRows)(struct W_TableViewDelegate *self,
|
||||
WMTableView *table);
|
||||
void *(*valueForCell)(struct W_TableViewDelegate *self,
|
||||
WMTableColumn *column, int row);
|
||||
void (*setValueForCell)(struct W_TableViewDelegate *self,
|
||||
WMTableColumn *column, int row, void *value);
|
||||
} WMTableViewDelegate;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
WMTableColumn *WMCreateTableColumn(char *title);
|
||||
|
||||
void WMSetTableColumnWidth(WMTableColumn *column, unsigned width);
|
||||
|
||||
void WMSetTableColumnConstraints(WMTableColumn *column,
|
||||
unsigned minWidth, unsigned maxWidth);
|
||||
|
||||
void WMSetTableColumnDelegate(WMTableColumn *column,
|
||||
WMTableColumnDelegate *delegate);
|
||||
void WMSetTableColumnConstraints(WMTableColumn *column,
|
||||
unsigned minWidth, unsigned maxWidth);
|
||||
|
||||
void WMSetTableColumnDelegate(WMTableColumn *column,
|
||||
WMTableColumnDelegate *delegate);
|
||||
|
||||
|
||||
WMTableView *WMGetTableColumnTableView(WMTableColumn *column);
|
||||
|
||||
|
||||
void WMSetTableColumnId(WMTableColumn *column, void *id);
|
||||
|
||||
void *WMGetTableColumnId(WMTableColumn *column);
|
||||
|
||||
|
||||
|
||||
WMTableView *WMCreateTableView(WMWidget *parent);
|
||||
|
||||
|
||||
|
||||
void WMSetTableViewDataSource(WMTableView *table, void *source);
|
||||
|
||||
void *WMGetTableViewDataSource(WMTableView *table);
|
||||
|
||||
void WMSetTableViewHeaderHeight(WMTableView *table, unsigned height);
|
||||
|
||||
|
||||
void WMAddTableViewColumn(WMTableView *table, WMTableColumn *column);
|
||||
|
||||
void WMSetTableViewDelegate(WMTableView *table, WMTableViewDelegate *delegate);
|
||||
|
||||
void WMSetTableViewAction(WMTableView *table, WMAction *action,
|
||||
void *clientData);
|
||||
void WMSetTableViewAction(WMTableView *table, WMAction *action,
|
||||
void *clientData);
|
||||
|
||||
void *WMGetTableViewClickedColumn(WMTableView *table);
|
||||
|
||||
int WMGetTableViewClickedRow(WMTableView *table);
|
||||
|
||||
WMArray *WMGetTableViewSelectedRows(WMTableView *table);
|
||||
|
||||
|
||||
WMView *WMGetTableViewDocumentView(WMTableView *table);
|
||||
|
||||
void WMEditTableViewRow(WMTableView *table, int row);
|
||||
|
||||
void WMSelectTableViewRow(WMTableView *table, int row);
|
||||
|
||||
void *WMTableViewDataForCell(WMTableView *table, WMTableColumn *column,
|
||||
int row);
|
||||
void *WMTableViewDataForCell(WMTableView *table, WMTableColumn *column,
|
||||
int row);
|
||||
|
||||
void WMSetTableViewDataForCell(WMTableView *table, WMTableColumn *column,
|
||||
int row, void *data);
|
||||
|
||||
WMRect WMTableViewRectForCell(WMTableView *table, WMTableColumn *column,
|
||||
int row);
|
||||
void WMSetTableViewDataForCell(WMTableView *table, WMTableColumn *column,
|
||||
int row, void *data);
|
||||
|
||||
WMRect WMTableViewRectForCell(WMTableView *table, WMTableColumn *column,
|
||||
int row);
|
||||
|
||||
void WMSetTableViewBackgroundColor(WMTableView *table, WMColor *color);
|
||||
|
||||
void WMSetTableViewGridColor(WMTableView *table, WMColor *color);
|
||||
|
||||
void WMSetTableViewRowHeight(WMTableView *table, int height);
|
||||
|
||||
void WMReloadTableView(WMTableView *table);
|
||||
|
||||
void WMSetTableViewRowHeight(WMTableView *table, int height);
|
||||
|
||||
void WMReloadTableView(WMTableView *table);
|
||||
|
||||
void WMNoteTableViewNumberOfRowsChanged(WMTableView *table);
|
||||
|
||||
void WMScrollTableViewRowToVisible(WMTableView *table, int row);
|
||||
|
||||
void WMScrollTableViewRowToVisible(WMTableView *table, int row);
|
||||
|
||||
void WMSetTableViewHasHorizontalScroller(WMTableView *tPtr, Bool flag);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -4,7 +4,11 @@ AUTOMAKE_OPTIONS = no-dependencies
|
||||
|
||||
SUBDIRS = WINGs . po Documentation Resources Examples Extras Tests
|
||||
|
||||
LIBTOOL = $(QUIET) $(SHELL) $(top_srcdir)/libtool $(LIBTOOL_ARG)
|
||||
|
||||
libWINGs_a_AR = $(QUIET_AR) $(AR) $(ARFLAGS)
|
||||
|
||||
libWUtil_a_AR = $(QUIET_AR) $(AR) $(ARFLAGS)
|
||||
|
||||
#libWINGs_la_LDFLAGS = -version-info 1:1:0
|
||||
|
||||
@@ -16,7 +20,9 @@ lib_LIBRARIES = libWINGs.a libWUtil.a
|
||||
LDADD= libWINGs.a $(top_builddir)/wrlib/libwraster.la @INTLIBS@
|
||||
|
||||
|
||||
EXTRA_DIST = BUGS
|
||||
EXTRA_DIST = BUGS make-rgb python/Makefile python/README python/WINGs.i \
|
||||
python/WINGs.py python/setup.py python/test.py
|
||||
|
||||
|
||||
# wbutton.c
|
||||
libWINGs_a_SOURCES = \
|
||||
@@ -25,6 +31,7 @@ libWINGs_a_SOURCES = \
|
||||
configuration.c \
|
||||
connection.c \
|
||||
data.c \
|
||||
dragcommon.c \
|
||||
dragdestination.c \
|
||||
dragsource.c \
|
||||
error.c \
|
||||
@@ -37,6 +44,7 @@ libWINGs_a_SOURCES = \
|
||||
misc.c \
|
||||
notification.c \
|
||||
proplist.c \
|
||||
rgb.h \
|
||||
selection.c \
|
||||
snprintf.c \
|
||||
string.c \
|
||||
@@ -105,11 +113,30 @@ libWUtil_a_SOURCES = \
|
||||
wutil.c
|
||||
|
||||
|
||||
CPPFLAGS = @CPPFLAGS@ -DLOCALEDIR=\"$(NLSDIR)\"
|
||||
AM_CPPFLAGS = -DLOCALEDIR=\"$(NLSDIR)\" -DRESOURCE_PATH=\"$(datadir)/WINGs\" -DDEBUG
|
||||
|
||||
AM_CFLAGS = @NOSTRICTALIASING@
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/WINGs/WINGs -I$(top_srcdir)/wrlib -I$(top_srcdir)/src \
|
||||
-DRESOURCE_PATH=\"$(datadir)/WINGs\" @HEADER_SEARCH_PATH@ -DDEBUG
|
||||
@XFTFLAGS@ @HEADER_SEARCH_PATH@
|
||||
|
||||
DISTCLEANFILES = WINGs.pc
|
||||
|
||||
wcolorpanel.o: wcolorpanel.c
|
||||
$(COMPILE) -c -DRGBTXT="\"@X_LIBRARY_PATH@/X11/rgb.txt\"" $<
|
||||
install-exec-local:
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir)/pkgconfig
|
||||
@list='WINGs.pc'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
echo "$(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/pkgconfig/"; \
|
||||
$(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/pkgconfig/; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
.c.o:
|
||||
$(QUIET)$(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
$(QUIET)$(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
$(QUIET)$(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
164
WINGs/NEWS
164
WINGs/NEWS
@@ -1,3 +1,167 @@
|
||||
*** Mon Oct 14 19:42:42 EEST 2002 - Dan
|
||||
|
||||
Double buffering
|
||||
----------------
|
||||
|
||||
To avoid flickering caused by redrawing the widgets on Expose events, a
|
||||
double buffering tehnique was implemented for most of the widgets.
|
||||
This flickering effect has gotten more vizible with the introduction
|
||||
of antialiased fonts. If with normal text one can redraw the text over the
|
||||
old one over and over again without any degradation of the text (new pixels
|
||||
simply overwrite old pixels), with antialiased text the situation is
|
||||
different and text gets quickly corrupted. To avoid this corruption, one
|
||||
needs to first erase the area where the text will go, which can cause the
|
||||
before mentioned flickering.
|
||||
The double buffer is implemented to solve this issue.
|
||||
|
||||
This is a change that that will be automatically available for any WINGs
|
||||
applications and will require no change in the existing code.
|
||||
However there is an exception from this in case of WMList if you delegate
|
||||
the drawing of items to userspace (read below for the compelte details).
|
||||
|
||||
|
||||
*** Mon Oct 14 22:07:42 EEST 2002 - Dan
|
||||
|
||||
WMList change
|
||||
-------------
|
||||
|
||||
In case of WMList there is the posibility to delegate the drawing of the
|
||||
list items to the application that is linked with WINGs, and this code will
|
||||
not be inside the WINGs library, but in userland. Since we use the double
|
||||
buffering tehnique in this case too (to allow all widgets based on WMList
|
||||
and the ones that draw their list items by themselves to benefit from the
|
||||
double buffering advantage automatically), we no longer pass the window to
|
||||
the user code doing item drawing, but instead pass this pixmap in which we
|
||||
draw before copying to the real window.
|
||||
|
||||
Since one cannot use XClearWindow() or XClearArea() on pixmaps, but only on
|
||||
windows, if the code drawing list items used to call these functions to clear
|
||||
the item area before drawing it needs to change to using XFillRectangle()
|
||||
instead.
|
||||
|
||||
With this change it also means that there is no longer any need to do any
|
||||
double buffering in the user code, since it's already done by WINGs.
|
||||
|
||||
|
||||
*** Mon Oct 14 19:28:35 EEST 2002 - Dan
|
||||
|
||||
API change
|
||||
----------
|
||||
|
||||
WMDrawString() and WMDrawImageString() no longer take a GC as argument.
|
||||
Instead WMDrawString() takes a WMColor* as the color for the string to be
|
||||
drawn, while WMDrawImageString() takes 2 WMColor* arguments in place of the
|
||||
old GC: first for text color and second for background color.
|
||||
|
||||
This change is required to support extending WMFont to allow it to handle
|
||||
antialiased fonts through the XFree86 Xft2 extension.
|
||||
|
||||
This also has the advantage of hiding low level X11 details and use WINGs
|
||||
internat objects instead.
|
||||
|
||||
To fix your old code to work with the new WINGs API you need to replace the
|
||||
GC passed to WMDraw***String() in your code with a WMColor*.
|
||||
Most of the old code used to be like this:
|
||||
|
||||
WMDrawString(screen, window, WMColorGC(color), font, x, y, txt, len);
|
||||
|
||||
for the new API it should be replaced by:
|
||||
|
||||
WMDrawString(screen, window, color, font, x, y, txt, len);
|
||||
|
||||
However if you used a particular GC created by yourself to suit your special
|
||||
needs, you need to pass a color which is the same as the foreground color of
|
||||
that gc.
|
||||
|
||||
For WMDrawImageString(), from:
|
||||
|
||||
WMDrawImageString(screen, window, gc, font, x, y, txt, len);
|
||||
|
||||
becomes
|
||||
|
||||
WMDrawImageString(screen, window, textColor, backColor, font, x, y, txt, len);
|
||||
|
||||
where textColor and backColor are declared like:
|
||||
|
||||
WMColor *textColor, *backColor;
|
||||
|
||||
and have the color of the foreground respective the background of the old gc.
|
||||
|
||||
|
||||
|
||||
*** Wed Oct 9 07:10:04 EEST 2002 - Dan
|
||||
|
||||
Antialiased font support
|
||||
------------------------
|
||||
|
||||
With the addition of Xft2 support in the WINGs library, now WINGs can display
|
||||
antialiased text with TrueType or any scalable fonts.
|
||||
|
||||
Antialiased text is enabled by default, but can be disabled by adding
|
||||
|
||||
AntialiasedText = NO; in ~/GNUstep/Defaults/WMGLOBAL
|
||||
|
||||
This will disable antialiased text for any WINGs based application. If you
|
||||
only want to disable them for a specific application only, like WindowMaker
|
||||
for example, then add the same option in the applications configuration file,
|
||||
in this case ~/GNUstep/Defaults/WindowMaker
|
||||
|
||||
Note that bitmapped fonts look much better than TrueType when antialiasing is
|
||||
disabled.
|
||||
|
||||
|
||||
*** Mon Sep 09 06:58:30 EEST 2002 - Dan
|
||||
|
||||
New delegate for the WMConnection class
|
||||
---------------------------------------
|
||||
|
||||
ConnectionDelegate structure has a new member: canResumeSending.
|
||||
The purpose of this callback is to notify you that you can resume sending
|
||||
data over a WMConnection.
|
||||
It works in the following manner:
|
||||
|
||||
WMSendConnectionData() can return 3 values: -1, 0, 1
|
||||
|
||||
-1 - means that the connection has died. you should stop sending data and
|
||||
close the connection ASAP.
|
||||
1 - means that the data was succesfully sent
|
||||
0 - means that the data (or part of it) was not sent. however, it was saved
|
||||
in a queue and the library will try to send it later when possible.
|
||||
|
||||
if the return value is 1, you can continue to send the next message, and so
|
||||
on, until the return value of such a send call will be 0.
|
||||
After it returns 0 you can continue sending, however, the data will not be
|
||||
sent over the connection because the operating system cannot accept any more
|
||||
data for the moment. Instead it will be queued inside the library, making your
|
||||
program's memory footprint increase. If the ammount of data you need to
|
||||
send is limited and not too big, this shouldn't be a problem, because your
|
||||
data will be queued and sent when the operating system will notify the
|
||||
library that sending is possible again.
|
||||
If this is the case you can just ignore the output of WMSendConnectionData()
|
||||
and not set a callback for canResumeSending.
|
||||
|
||||
However, if the ammount of data you have to send is undetermined and you
|
||||
also want to keep a small memory footprint for your program (so that it
|
||||
won't grow until it uses all your available memory ;) ), you will have to
|
||||
stop sending data over the connection as soon as WMSendConnectionData()
|
||||
returns with 0. Then you should somehow mark this situation in your program
|
||||
to avoid it trying to send anymore data until notified that it can resume.
|
||||
(You should have also set a canResumeSending callback when you initialized
|
||||
your WMConnection object because else you cannot be notified when to resume.)
|
||||
|
||||
Now, when you receive such a 0 from the send operation, your last sent data
|
||||
is put in a queue inside the library. At a later time when the operating
|
||||
system notifies the library that sending is possible again, the library will
|
||||
resume to send the data that is saved in the queue. After it will be able to
|
||||
send all the data in the queue, the canResumeSending callback will be
|
||||
called, letting you know that not only you can resume sending because the
|
||||
operating system is again able to send data, but also that the queue was
|
||||
completely flushed.
|
||||
|
||||
From the canResumeSending callback, you should again update the status of
|
||||
your program marking that it can send again, and then resume sending the
|
||||
data from where you were left.
|
||||
|
||||
|
||||
*** Thu Oct 04 06:00:09 EEST 2001 -Dan
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
Alfredo Kengi Kojima
|
||||
|
||||
kojima@windowmaker.org
|
||||
kojima@windowmaker.info
|
||||
|
||||
|
||||
WINGs is a small widget set with the N*XTSTEP look and feel. It's API
|
||||
@@ -13,7 +13,7 @@ is inspired in OpenStep and it's implementation borrows some ideas
|
||||
from Tk. It has a reasonable set of widgets, sufficient for building
|
||||
small applications (like a CDPlayer or hacking something like rxvt). It
|
||||
also has other functions that are usefull for applications, like a
|
||||
User Defaults like configuration manager and a notification system.
|
||||
User Defaults alike configuration manager and a notification system.
|
||||
|
||||
The library is limited and it's design is a little sloppy,
|
||||
so it's not intended to build large or complex applications, like
|
||||
@@ -26,7 +26,7 @@ workaround some of it's limitations, although you'll probably be able to
|
||||
write something like a trivial tic-tac-toe game without knowing much Xlib.
|
||||
|
||||
Some of it's functions are designed to support the Window Maker window
|
||||
manager (see http://windowmaker.org) In fact, it's primary role is to
|
||||
manager (see http://windowmaker.info) In fact, it's primary role is to
|
||||
support Window Maker. All other uses of it are just an added bonus.
|
||||
|
||||
It will help you to understand the API if you read the ApplicationKit
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
Makefile Makefile.in
|
||||
.psrc .inslog2 tca.map tca.log
|
||||
*.rpt
|
||||
.psrc .inslog2 tca.map tca.log pchdir *.rpt
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
Makefile Makefile.in
|
||||
testtext testcolorpanel testmywidget wmfile wmquery wtest
|
||||
.libs
|
||||
.psrc .inslog2 tca.map tca.log
|
||||
*.rpt
|
||||
.psrc .inslog2 tca.map tca.log pchdir *.rpt
|
||||
|
||||
@@ -5,7 +5,7 @@ AUTOMAKE_OPTIONS = no-dependencies
|
||||
noinst_PROGRAMS = wtest wmquery wmfile testmywidget
|
||||
|
||||
LDADD= $(top_builddir)/WINGs/libWINGs.a $(top_builddir)/wrlib/libwraster.la \
|
||||
@INTLIBS@
|
||||
@XFTLIBS@ @INTLIBS@
|
||||
|
||||
|
||||
testmywidget_SOURCES = testmywidget.c mywidget.c mywidget.h
|
||||
@@ -16,6 +16,16 @@ wtest_DEPENDENCIES = $(top_builddir)/WINGs/libWINGs.a
|
||||
EXTRA_DIST = logo.xpm upbtn.xpm wm.html wm.png
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/WINGs -I$(top_srcdir)/wrlib -I$(top_srcdir)/src \
|
||||
-DRESOURCE_PATH=\"$(datadir)/WINGs\" @HEADER_SEARCH_PATH@ -DDEBUG
|
||||
-DRESOURCE_PATH=\"$(datadir)/WINGs\" @XFTFLAGS@ @HEADER_SEARCH_PATH@ \
|
||||
-DDEBUG
|
||||
|
||||
LIBTOOL = $(QUIET) $(SHELL) $(top_srcdir)/libtool $(LIBTOOL_ARG)
|
||||
|
||||
.c.o:
|
||||
$(QUIET)$(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
$(QUIET)$(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
$(QUIET)$(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
@@ -2,17 +2,16 @@
|
||||
* Demo user widget for WINGs
|
||||
*
|
||||
* Author: Alfredo K. Kojima
|
||||
*
|
||||
*
|
||||
* This file is in the public domain.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* Include the WINGs private data header.
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
#include <WINGs/WINGsP.h>
|
||||
|
||||
@@ -25,32 +24,26 @@
|
||||
* Define the widget "class"
|
||||
*/
|
||||
typedef struct W_MyWidget {
|
||||
/* these two fields must be present in all your widgets in this
|
||||
* exact position */
|
||||
W_Class widgetClass;
|
||||
WMView *view;
|
||||
|
||||
/* put your stuff here */
|
||||
char *text;
|
||||
|
||||
/* these two fields must be present in all your widgets in this
|
||||
* exact position */
|
||||
W_Class widgetClass;
|
||||
WMView *view;
|
||||
|
||||
/* put your stuff here */
|
||||
char *text;
|
||||
|
||||
} _MyWidget;
|
||||
|
||||
|
||||
|
||||
|
||||
/* some forward declarations */
|
||||
|
||||
static void destroyMyWidget(_MyWidget *mPtr);
|
||||
static void paintMyWidget(_MyWidget *mPtr);
|
||||
|
||||
|
||||
static void handleEvents(XEvent *event, void *data);
|
||||
static void handleActionEvents(XEvent *event, void *data);
|
||||
|
||||
static void destroyMyWidget(_MyWidget * mPtr);
|
||||
static void paintMyWidget(_MyWidget * mPtr);
|
||||
|
||||
static void handleEvents(XEvent * event, void *data);
|
||||
static void handleActionEvents(XEvent * event, void *data);
|
||||
|
||||
/*
|
||||
* Delegates
|
||||
* Delegates
|
||||
* See the source for the other widgets to see how to use.
|
||||
* You won't need to use this most of the time.
|
||||
*/
|
||||
@@ -62,166 +55,143 @@ static W_ViewDelegate _MyWidgetDelegate = {
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
/* our widget class ID */
|
||||
static W_Class myWidgetClass = 0;
|
||||
|
||||
|
||||
/*
|
||||
* Initializer for our widget. Must be called before creating any
|
||||
* instances of the widget.
|
||||
*/
|
||||
W_Class
|
||||
InitMyWidget(WMScreen *scr)
|
||||
W_Class InitMyWidget(WMScreen * scr)
|
||||
{
|
||||
/* register our widget with WINGs and get our widget class ID */
|
||||
if (!myWidgetClass) {
|
||||
myWidgetClass = W_RegisterUserWidget();
|
||||
}
|
||||
|
||||
return myWidgetClass;
|
||||
}
|
||||
/* register our widget with WINGs and get our widget class ID */
|
||||
if (!myWidgetClass) {
|
||||
myWidgetClass = W_RegisterUserWidget();
|
||||
}
|
||||
|
||||
return myWidgetClass;
|
||||
}
|
||||
|
||||
/*
|
||||
* Our widget fabrication plant.
|
||||
*/
|
||||
MyWidget*
|
||||
CreateMyWidget(WMWidget *parent)
|
||||
MyWidget *CreateMyWidget(WMWidget * parent)
|
||||
{
|
||||
MyWidget *mPtr;
|
||||
|
||||
/* allocate some storage for our new widget instance */
|
||||
mPtr = wmalloc(sizeof(MyWidget));
|
||||
/* initialize it */
|
||||
memset(mPtr, 0, sizeof(MyWidget));
|
||||
MyWidget *mPtr;
|
||||
|
||||
/* set the class ID */
|
||||
mPtr->widgetClass = myWidgetClass;
|
||||
/* allocate some storage for our new widget instance */
|
||||
mPtr = wmalloc(sizeof(MyWidget));
|
||||
/* initialize it */
|
||||
memset(mPtr, 0, sizeof(MyWidget));
|
||||
|
||||
/*
|
||||
* Create the view for our widget.
|
||||
* Note: the Window for the view is only created after the view is
|
||||
* realized with W_RealizeView()
|
||||
*
|
||||
* Consider the returned view as read-only.
|
||||
*/
|
||||
mPtr->view = W_CreateView(W_VIEW(parent));
|
||||
if (!mPtr->view) {
|
||||
wfree(mPtr);
|
||||
return NULL;
|
||||
}
|
||||
/* always do this */
|
||||
mPtr->view->self = mPtr;
|
||||
/* set the class ID */
|
||||
mPtr->widgetClass = myWidgetClass;
|
||||
|
||||
/* setup the delegates for the view */
|
||||
mPtr->view->delegate = &_MyWidgetDelegate;
|
||||
/*
|
||||
* Create the view for our widget.
|
||||
* Note: the Window for the view is only created after the view is
|
||||
* realized with W_RealizeView()
|
||||
*
|
||||
* Consider the returned view as read-only.
|
||||
*/
|
||||
mPtr->view = W_CreateView(W_VIEW(parent));
|
||||
if (!mPtr->view) {
|
||||
wfree(mPtr);
|
||||
return NULL;
|
||||
}
|
||||
/* always do this */
|
||||
mPtr->view->self = mPtr;
|
||||
|
||||
/*
|
||||
* Intercept some events for our widget, so that we can handle them.
|
||||
*/
|
||||
WMCreateEventHandler(mPtr->view, ExposureMask /* this allows us to know when we should paint */
|
||||
|StructureNotifyMask, /* this allows us to know things like when we are destroyed */
|
||||
handleEvents, mPtr);
|
||||
/* setup the delegates for the view */
|
||||
mPtr->view->delegate = &_MyWidgetDelegate;
|
||||
|
||||
/*
|
||||
* Intercept some other events. This could be merged with the above
|
||||
* call, but we separate for more organization.
|
||||
*/
|
||||
WMCreateEventHandler(mPtr->view, ButtonPressMask,handleActionEvents, mPtr);
|
||||
/*
|
||||
* Intercept some events for our widget, so that we can handle them.
|
||||
*/
|
||||
WMCreateEventHandler(mPtr->view, ExposureMask /* this allows us to know when we should paint */
|
||||
| StructureNotifyMask, /* this allows us to know things like when we are destroyed */
|
||||
handleEvents, mPtr);
|
||||
|
||||
return mPtr;
|
||||
/*
|
||||
* Intercept some other events. This could be merged with the above
|
||||
* call, but we separate for more organization.
|
||||
*/
|
||||
WMCreateEventHandler(mPtr->view, ButtonPressMask, handleActionEvents, mPtr);
|
||||
|
||||
return mPtr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Paint our widget contents.
|
||||
*/
|
||||
static void
|
||||
paintMyWidget(_MyWidget *mPtr)
|
||||
static void paintMyWidget(_MyWidget * mPtr)
|
||||
{
|
||||
W_Screen *scr = mPtr->view->screen;
|
||||
WMColor *color;
|
||||
W_Screen *scr = mPtr->view->screen;
|
||||
WMColor *color;
|
||||
|
||||
if (mPtr->text) {
|
||||
|
||||
if (mPtr->text) {
|
||||
|
||||
color = WMWhiteColor(scr);
|
||||
|
||||
W_PaintText(mPtr->view, mPtr->view->window, scr->normalFont, 0, 0,
|
||||
mPtr->view->size.width, WACenter, WMColorGC(color),
|
||||
False, mPtr->text, strlen(mPtr->text));
|
||||
|
||||
WMReleaseColor(color);
|
||||
}
|
||||
color = WMWhiteColor(scr);
|
||||
|
||||
W_PaintText(mPtr->view, mPtr->view->window, scr->normalFont, 0, 0,
|
||||
mPtr->view->size.width, WACenter, color, False, mPtr->text, strlen(mPtr->text));
|
||||
|
||||
WMReleaseColor(color);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
handleEvents(XEvent *event, void *data)
|
||||
static void handleEvents(XEvent * event, void *data)
|
||||
{
|
||||
_MyWidget *mPtr = (_MyWidget*)data;
|
||||
_MyWidget *mPtr = (_MyWidget *) data;
|
||||
|
||||
switch (event->type) {
|
||||
case Expose:
|
||||
if (event->xexpose.count != 0)
|
||||
break;
|
||||
paintMyWidget(mPtr);
|
||||
break;
|
||||
|
||||
switch (event->type) {
|
||||
case Expose:
|
||||
if (event->xexpose.count!=0)
|
||||
break;
|
||||
paintMyWidget(mPtr);
|
||||
break;
|
||||
|
||||
case DestroyNotify:
|
||||
destroyMyWidget(mPtr);
|
||||
break;
|
||||
|
||||
}
|
||||
case DestroyNotify:
|
||||
destroyMyWidget(mPtr);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
handleActionEvents(XEvent *event, void *data)
|
||||
static void handleActionEvents(XEvent * event, void *data)
|
||||
{
|
||||
_MyWidget *mPtr = (_MyWidget*)data;
|
||||
_MyWidget *mPtr = (_MyWidget *) data;
|
||||
|
||||
switch (event->type) {
|
||||
case ButtonPress:
|
||||
XBell(mPtr->view->screen->display, 100);
|
||||
XBell(mPtr->view->screen->display, 100);
|
||||
break;
|
||||
}
|
||||
switch (event->type) {
|
||||
case ButtonPress:
|
||||
XBell(mPtr->view->screen->display, 100);
|
||||
XBell(mPtr->view->screen->display, 100);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SetMyWidgetText(MyWidget *mPtr, char *text)
|
||||
void SetMyWidgetText(MyWidget * mPtr, char *text)
|
||||
{
|
||||
CHECK_CLASS(mPtr, myWidgetClass);
|
||||
CHECK_CLASS(mPtr, myWidgetClass);
|
||||
|
||||
if (mPtr->text)
|
||||
wfree(mPtr->text);
|
||||
|
||||
mPtr->text = wstrdup(text);
|
||||
|
||||
if (W_VIEW_MAPPED(mPtr->view)) {
|
||||
paintMyWidget(mPtr);
|
||||
}
|
||||
if (mPtr->text)
|
||||
wfree(mPtr->text);
|
||||
|
||||
mPtr->text = wstrdup(text);
|
||||
|
||||
if (W_VIEW_MAPPED(mPtr->view)) {
|
||||
paintMyWidget(mPtr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
destroyMyWidget(_MyWidget *mPtr)
|
||||
static void destroyMyWidget(_MyWidget * mPtr)
|
||||
{
|
||||
/*
|
||||
* Free all data we allocated for our widget.
|
||||
*/
|
||||
|
||||
if (mPtr->text)
|
||||
wfree(mPtr->text);
|
||||
|
||||
wfree(mPtr);
|
||||
/*
|
||||
* Free all data we allocated for our widget.
|
||||
*/
|
||||
|
||||
if (mPtr->text)
|
||||
wfree(mPtr->text);
|
||||
|
||||
wfree(mPtr);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
/*
|
||||
* Header for demo widget.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
typedef struct W_MyWidget MyWidget;
|
||||
|
||||
@@ -1,50 +1,46 @@
|
||||
|
||||
|
||||
#include <WINGs/WINGs.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "mywidget.h"
|
||||
|
||||
|
||||
void
|
||||
wAbort()
|
||||
void wAbort()
|
||||
{
|
||||
exit(1);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
Display *dpy = XOpenDisplay("");
|
||||
WMScreen *scr;
|
||||
WMWindow *win;
|
||||
MyWidget *thing;
|
||||
Display *dpy = XOpenDisplay("");
|
||||
WMScreen *scr;
|
||||
WMWindow *win;
|
||||
MyWidget *thing;
|
||||
|
||||
WMInitializeApplication("Test", &argc, argv);
|
||||
|
||||
WMInitializeApplication("Test", &argc, argv);
|
||||
|
||||
if (!dpy) {
|
||||
wfatal("could not open display");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
scr = WMCreateSimpleApplicationScreen(dpy);
|
||||
if (!dpy) {
|
||||
wfatal("could not open display");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* init our widget */
|
||||
InitMyWidget(scr);
|
||||
|
||||
win = WMCreateWindow(scr, "test");
|
||||
WMResizeWidget(win, 150, 50);
|
||||
|
||||
thing = CreateMyWidget(win);
|
||||
SetMyWidgetText(thing, "The Test");
|
||||
WMResizeWidget(thing, 100, 20);
|
||||
WMMoveWidget(thing, 10, 10);
|
||||
|
||||
WMRealizeWidget(win);
|
||||
WMMapSubwidgets(win);
|
||||
WMMapWidget(win);
|
||||
|
||||
WMScreenMainLoop(scr);
|
||||
|
||||
return 0;
|
||||
scr = WMCreateSimpleApplicationScreen(dpy);
|
||||
|
||||
/* init our widget */
|
||||
InitMyWidget(scr);
|
||||
|
||||
win = WMCreateWindow(scr, "test");
|
||||
WMResizeWidget(win, 150, 50);
|
||||
|
||||
thing = CreateMyWidget(win);
|
||||
SetMyWidgetText(thing, "The Test");
|
||||
WMResizeWidget(thing, 100, 20);
|
||||
WMMoveWidget(thing, 10, 10);
|
||||
|
||||
WMRealizeWidget(win);
|
||||
WMMapSubwidgets(win);
|
||||
WMMapWidget(win);
|
||||
|
||||
WMScreenMainLoop(scr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<Img src=wm.png></b><p>
|
||||
<b>GNU Window Maker</B><br>
|
||||
<i>X11 Window Manager</i><p>
|
||||
<u>http://windowmaker.org<br>
|
||||
ftp.windowmaker.org</u></font><Br>
|
||||
<u>http://windowmaker.info<br>
|
||||
ftp.windowmaker.info</u></font><Br>
|
||||
</center>
|
||||
|
||||
<b><i>Window Maker</b>
|
||||
|
||||
@@ -1,55 +1,46 @@
|
||||
/*
|
||||
* Author: Len Trigg <trigg@cs.waikato.ac.nz>
|
||||
* Author: Len Trigg <trigg@cs.waikato.ac.nz>
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
Update: Franck Wolff <frawolff@club-internet.fr>
|
||||
-----------------------------------------------------------------------
|
||||
List of updated functions :
|
||||
- main :
|
||||
add -s option for a save panel...
|
||||
-----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
Update: Franck Wolff <frawolff@club-internet.fr>
|
||||
-----------------------------------------------------------------------
|
||||
List of updated functions :
|
||||
- main :
|
||||
add -s option for a save panel...
|
||||
-----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include <WINGs/WINGs.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "logo.xpm"
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
wAbort()
|
||||
void wAbort()
|
||||
{
|
||||
exit(1);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
char *ProgName;
|
||||
|
||||
void usage(void)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"usage:\n"
|
||||
"\t%s [-options]\n"
|
||||
"\n"
|
||||
"options:\n"
|
||||
" -s\t\tSave panel (default open panel)\n"
|
||||
" -i <str>\tInitial directory (default /)\n"
|
||||
" -t <str>\tQuery window title (default none)\n"
|
||||
"\n"
|
||||
"information:\n"
|
||||
"\t%s pops up a WindowMaker style file selection panel.\n"
|
||||
"\n"
|
||||
"version:\n"
|
||||
"\t%s\n"
|
||||
,ProgName,ProgName,__DATE__
|
||||
);
|
||||
exit(0);
|
||||
fprintf(stderr,
|
||||
"usage:\n"
|
||||
"\t%s [-options]\n"
|
||||
"\n"
|
||||
"options:\n"
|
||||
" -s\t\tSave panel (default open panel)\n"
|
||||
" -i <str>\tInitial directory (default /)\n"
|
||||
" -t <str>\tQuery window title (default none)\n"
|
||||
"\n"
|
||||
"information:\n"
|
||||
"\t%s pops up a WindowMaker style file selection panel.\n"
|
||||
"\n" "version:\n" "\t%s\n", ProgName, ProgName, __DATE__);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
#define OPEN_PANEL_TYPE 0
|
||||
@@ -57,67 +48,65 @@ void usage(void)
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
Display *dpy = XOpenDisplay("");
|
||||
WMScreen *scr;
|
||||
WMPixmap *pixmap;
|
||||
WMOpenPanel *oPanel;
|
||||
WMSavePanel *sPanel;
|
||||
/* RImage *image;*/
|
||||
char *title = NULL;
|
||||
char *initial = "/";
|
||||
int ch;
|
||||
int panelType = OPEN_PANEL_TYPE;
|
||||
extern char *optarg;
|
||||
extern int optind;
|
||||
Display *dpy = XOpenDisplay("");
|
||||
WMScreen *scr;
|
||||
WMPixmap *pixmap;
|
||||
WMOpenPanel *oPanel;
|
||||
WMSavePanel *sPanel;
|
||||
/* RImage *image; */
|
||||
char *title = NULL;
|
||||
char *initial = "/";
|
||||
int ch;
|
||||
int panelType = OPEN_PANEL_TYPE;
|
||||
extern char *optarg;
|
||||
extern int optind;
|
||||
|
||||
WMInitializeApplication("WMFile", &argc, argv);
|
||||
|
||||
ProgName = argv[0];
|
||||
if (!dpy) {
|
||||
puts("could not open display");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (!dpy) {
|
||||
puts("could not open display");
|
||||
exit(1);
|
||||
}
|
||||
while((ch = getopt(argc, argv, "si:ht:")) != -1)
|
||||
switch(ch)
|
||||
{
|
||||
case 's':
|
||||
panelType = SAVE_PANEL_TYPE;
|
||||
break;
|
||||
case 'i':
|
||||
initial = optarg;
|
||||
break;
|
||||
case 't':
|
||||
title = optarg;
|
||||
break;
|
||||
default:
|
||||
usage();
|
||||
}
|
||||
WMInitializeApplication("WMFile", &argc, argv);
|
||||
|
||||
for(; optind <argc; optind++)
|
||||
usage();
|
||||
ProgName = argv[0];
|
||||
|
||||
scr = WMCreateSimpleApplicationScreen(dpy);
|
||||
while ((ch = getopt(argc, argv, "si:ht:")) != -1)
|
||||
switch (ch) {
|
||||
case 's':
|
||||
panelType = SAVE_PANEL_TYPE;
|
||||
break;
|
||||
case 'i':
|
||||
initial = optarg;
|
||||
break;
|
||||
case 't':
|
||||
title = optarg;
|
||||
break;
|
||||
default:
|
||||
usage();
|
||||
}
|
||||
|
||||
for (; optind < argc; optind++)
|
||||
usage();
|
||||
|
||||
|
||||
pixmap = WMCreatePixmapFromXPMData(scr, GNUSTEP_XPM);
|
||||
WMSetApplicationIconPixmap(scr, pixmap);
|
||||
WMReleasePixmap(pixmap);
|
||||
if (panelType == SAVE_PANEL_TYPE) {
|
||||
sPanel = WMGetSavePanel(scr);
|
||||
if (WMRunModalFilePanelForDirectory(sPanel, NULL, initial,
|
||||
/*title*/ NULL, NULL) == True)
|
||||
printf("%s\n", WMGetFilePanelFileName(sPanel));
|
||||
else
|
||||
printf("\n");
|
||||
} else {
|
||||
oPanel = WMGetOpenPanel(scr);
|
||||
if (WMRunModalFilePanelForDirectory(oPanel, NULL, initial,
|
||||
/*title*/ NULL, NULL) == True)
|
||||
printf("%s\n", WMGetFilePanelFileName(oPanel));
|
||||
else
|
||||
printf("\n");
|
||||
}
|
||||
return 0;
|
||||
scr = WMCreateSimpleApplicationScreen(dpy);
|
||||
|
||||
pixmap = WMCreatePixmapFromXPMData(scr, GNUSTEP_XPM);
|
||||
WMSetApplicationIconPixmap(scr, pixmap);
|
||||
WMReleasePixmap(pixmap);
|
||||
if (panelType == SAVE_PANEL_TYPE) {
|
||||
sPanel = WMGetSavePanel(scr);
|
||||
if (WMRunModalFilePanelForDirectory(sPanel, NULL, initial,
|
||||
/*title */ NULL, NULL) == True)
|
||||
printf("%s\n", WMGetFilePanelFileName(sPanel));
|
||||
else
|
||||
printf("\n");
|
||||
} else {
|
||||
oPanel = WMGetOpenPanel(scr);
|
||||
if (WMRunModalFilePanelForDirectory(oPanel, NULL, initial,
|
||||
/*title */ NULL, NULL) == True)
|
||||
printf("%s\n", WMGetFilePanelFileName(oPanel));
|
||||
else
|
||||
printf("\n");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,99 +1,90 @@
|
||||
|
||||
/*
|
||||
* Author: Len Trigg <trigg@cs.waikato.ac.nz>
|
||||
* Author: Len Trigg <trigg@cs.waikato.ac.nz>
|
||||
*/
|
||||
|
||||
|
||||
#include <WINGs/WINGs.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "logo.xpm"
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
wAbort()
|
||||
void wAbort()
|
||||
{
|
||||
exit(1);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
char *ProgName;
|
||||
|
||||
void usage(void)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"usage:\n"
|
||||
"\t%s [-options]\n"
|
||||
"\n"
|
||||
"options:\n"
|
||||
" -i <str>\tInitial entry contents (default none)\n"
|
||||
" -p <str>\tPrompt message (default none)\n"
|
||||
" -t <str>\tQuery window title (default none)\n"
|
||||
"\n"
|
||||
"information:\n"
|
||||
"\t%s pops up a WindowMaker style input panel.\n"
|
||||
"\n"
|
||||
"version:\n"
|
||||
"\t%s\n"
|
||||
,ProgName,ProgName,__DATE__
|
||||
);
|
||||
exit(0);
|
||||
fprintf(stderr,
|
||||
"usage:\n"
|
||||
"\t%s [-options]\n"
|
||||
"\n"
|
||||
"options:\n"
|
||||
" -i <str>\tInitial entry contents (default none)\n"
|
||||
" -p <str>\tPrompt message (default none)\n"
|
||||
" -t <str>\tQuery window title (default none)\n"
|
||||
"\n"
|
||||
"information:\n"
|
||||
"\t%s pops up a WindowMaker style input panel.\n"
|
||||
"\n" "version:\n" "\t%s\n", ProgName, ProgName, __DATE__);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
Display *dpy = XOpenDisplay("");
|
||||
WMScreen *scr;
|
||||
WMPixmap *pixmap;
|
||||
char *title = NULL;
|
||||
char *prompt = NULL;
|
||||
char *initial = NULL;
|
||||
char *result = NULL;
|
||||
int ch;
|
||||
extern char *optarg;
|
||||
extern int optind;
|
||||
Display *dpy = XOpenDisplay("");
|
||||
WMScreen *scr;
|
||||
WMPixmap *pixmap;
|
||||
char *title = NULL;
|
||||
char *prompt = NULL;
|
||||
char *initial = NULL;
|
||||
char *result = NULL;
|
||||
int ch;
|
||||
extern char *optarg;
|
||||
extern int optind;
|
||||
|
||||
WMInitializeApplication("WMQuery", &argc, argv);
|
||||
|
||||
ProgName = argv[0];
|
||||
WMInitializeApplication("WMQuery", &argc, argv);
|
||||
|
||||
if (!dpy) {
|
||||
puts("could not open display");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
while((ch = getopt(argc, argv, "i:hp:t:")) != -1)
|
||||
switch(ch)
|
||||
{
|
||||
case 'i':
|
||||
initial = optarg;
|
||||
break;
|
||||
case 'p':
|
||||
prompt = optarg;
|
||||
break;
|
||||
case 't':
|
||||
title = optarg;
|
||||
break;
|
||||
default:
|
||||
usage();
|
||||
}
|
||||
ProgName = argv[0];
|
||||
|
||||
for(; optind <argc; optind++)
|
||||
usage();
|
||||
if (!dpy) {
|
||||
puts("could not open display");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
while ((ch = getopt(argc, argv, "i:hp:t:")) != -1)
|
||||
switch (ch) {
|
||||
case 'i':
|
||||
initial = optarg;
|
||||
break;
|
||||
case 'p':
|
||||
prompt = optarg;
|
||||
break;
|
||||
case 't':
|
||||
title = optarg;
|
||||
break;
|
||||
default:
|
||||
usage();
|
||||
}
|
||||
|
||||
scr = WMCreateSimpleApplicationScreen(dpy);
|
||||
for (; optind < argc; optind++)
|
||||
usage();
|
||||
|
||||
pixmap = WMCreatePixmapFromXPMData(scr, GNUSTEP_XPM);
|
||||
scr = WMCreateSimpleApplicationScreen(dpy);
|
||||
|
||||
WMSetApplicationIconPixmap(scr, pixmap); WMReleasePixmap(pixmap);
|
||||
pixmap = WMCreatePixmapFromXPMData(scr, GNUSTEP_XPM);
|
||||
|
||||
if ((result = WMRunInputPanel(scr, NULL, title, prompt, initial, "OK", "Cancel")) != NULL)
|
||||
printf("%s\n", result);
|
||||
else
|
||||
printf("\n");
|
||||
return 0;
|
||||
WMSetApplicationIconPixmap(scr, pixmap);
|
||||
WMReleasePixmap(pixmap);
|
||||
|
||||
if ((result = WMRunInputPanel(scr, NULL, title, prompt, initial, "OK", "Cancel")) != NULL)
|
||||
printf("%s\n", result);
|
||||
else
|
||||
printf("\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
2161
WINGs/Tests/wtest.c
2161
WINGs/Tests/wtest.c
File diff suppressed because it is too large
Load Diff
@@ -7,3 +7,11 @@ includedir = @includedir@/WINGs
|
||||
|
||||
include_HEADERS = WINGs.h WUtil.h WINGsP.h proplist-compat.h
|
||||
|
||||
.c.o:
|
||||
$(QUIET)$(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
$(QUIET)$(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
$(QUIET)$(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <WINGs/WUtil.h>
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
#define WINGS_H_VERSION 20020104
|
||||
#define WINGS_H_VERSION 20041030
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -55,29 +55,29 @@ typedef struct {
|
||||
* range INT_MIN+1 to INT_MAX
|
||||
*/
|
||||
enum {
|
||||
WMDesktopWindowLevel = -1000, /* GNUstep addition */
|
||||
WMNormalWindowLevel = 0,
|
||||
WMFloatingWindowLevel = 3,
|
||||
WMSubmenuWindowLevel = 3,
|
||||
WMTornOffMenuWindowLevel = 3,
|
||||
WMMainMenuWindowLevel = 20,
|
||||
WMDockWindowLevel = 21, /* Deprecated - use NSStatusWindowLevel */
|
||||
WMStatusWindowLevel = 21,
|
||||
WMModalPanelWindowLevel = 100,
|
||||
WMPopUpMenuWindowLevel = 101,
|
||||
WMScreenSaverWindowLevel = 1000
|
||||
WMDesktopWindowLevel = -1000, /* GNUstep addition */
|
||||
WMNormalWindowLevel = 0,
|
||||
WMFloatingWindowLevel = 3,
|
||||
WMSubmenuWindowLevel = 3,
|
||||
WMTornOffMenuWindowLevel = 3,
|
||||
WMMainMenuWindowLevel = 20,
|
||||
WMDockWindowLevel = 21, /* Deprecated - use NSStatusWindowLevel */
|
||||
WMStatusWindowLevel = 21,
|
||||
WMModalPanelWindowLevel = 100,
|
||||
WMPopUpMenuWindowLevel = 101,
|
||||
WMScreenSaverWindowLevel = 1000
|
||||
};
|
||||
|
||||
|
||||
/* window attributes */
|
||||
enum {
|
||||
WMBorderlessWindowMask = 0,
|
||||
WMTitledWindowMask = 1,
|
||||
WMClosableWindowMask = 2,
|
||||
WMMiniaturizableWindowMask = 4,
|
||||
WMResizableWindowMask = 8,
|
||||
WMIconWindowMask = 64,
|
||||
WMMiniWindowMask = 128
|
||||
WMBorderlessWindowMask = 0,
|
||||
WMTitledWindowMask = 1,
|
||||
WMClosableWindowMask = 2,
|
||||
WMMiniaturizableWindowMask = 4,
|
||||
WMResizableWindowMask = 8,
|
||||
WMIconWindowMask = 64,
|
||||
WMMiniWindowMask = 128
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -85,58 +85,58 @@ enum {
|
||||
/* button types */
|
||||
typedef enum {
|
||||
/* 0 is reserved for internal use */
|
||||
WBTMomentaryPush = 1,
|
||||
WBTPushOnPushOff = 2,
|
||||
WBTToggle = 3,
|
||||
WBTSwitch = 4,
|
||||
WBTRadio = 5,
|
||||
WBTMomentaryChange = 6,
|
||||
WBTOnOff = 7,
|
||||
WBTMomentaryLight = 8
|
||||
WBTMomentaryPush = 1,
|
||||
WBTPushOnPushOff = 2,
|
||||
WBTToggle = 3,
|
||||
WBTSwitch = 4,
|
||||
WBTRadio = 5,
|
||||
WBTMomentaryChange = 6,
|
||||
WBTOnOff = 7,
|
||||
WBTMomentaryLight = 8
|
||||
} WMButtonType;
|
||||
|
||||
/* button behaviour masks */
|
||||
enum {
|
||||
WBBSpringLoadedMask = (1 << 0),
|
||||
WBBPushInMask = (1 << 1),
|
||||
WBBPushChangeMask = (1 << 2),
|
||||
WBBPushLightMask = (1 << 3),
|
||||
WBBStateLightMask = (1 << 5),
|
||||
WBBStateChangeMask = (1 << 6),
|
||||
WBBStatePushMask = (1 << 7)
|
||||
WBBSpringLoadedMask = (1 << 0),
|
||||
WBBPushInMask = (1 << 1),
|
||||
WBBPushChangeMask = (1 << 2),
|
||||
WBBPushLightMask = (1 << 3),
|
||||
WBBStateLightMask = (1 << 5),
|
||||
WBBStateChangeMask = (1 << 6),
|
||||
WBBStatePushMask = (1 << 7)
|
||||
};
|
||||
|
||||
|
||||
/* frame title positions */
|
||||
typedef enum {
|
||||
WTPNoTitle,
|
||||
WTPAboveTop,
|
||||
WTPAtTop,
|
||||
WTPBelowTop,
|
||||
WTPAboveBottom,
|
||||
WTPAtBottom,
|
||||
WTPBelowBottom
|
||||
WTPAboveTop,
|
||||
WTPAtTop,
|
||||
WTPBelowTop,
|
||||
WTPAboveBottom,
|
||||
WTPAtBottom,
|
||||
WTPBelowBottom
|
||||
} WMTitlePosition;
|
||||
|
||||
|
||||
/* relief types */
|
||||
typedef enum {
|
||||
WRFlat,
|
||||
WRSimple,
|
||||
WRRaised,
|
||||
WRSunken,
|
||||
WRGroove,
|
||||
WRRidge,
|
||||
WRPushed
|
||||
WRSimple,
|
||||
WRRaised,
|
||||
WRSunken,
|
||||
WRGroove,
|
||||
WRRidge,
|
||||
WRPushed
|
||||
} WMReliefType;
|
||||
|
||||
|
||||
/* alignment types */
|
||||
typedef enum {
|
||||
WALeft,
|
||||
WACenter,
|
||||
WARight,
|
||||
WAJustified /* not valid for textfields */
|
||||
WACenter,
|
||||
WARight,
|
||||
WAJustified /* not valid for textfields */
|
||||
} WMAlignment;
|
||||
|
||||
|
||||
@@ -155,58 +155,58 @@ typedef enum {
|
||||
/* scroller arrow position */
|
||||
typedef enum {
|
||||
WSAMaxEnd,
|
||||
WSAMinEnd,
|
||||
WSANone
|
||||
WSAMinEnd,
|
||||
WSANone
|
||||
} WMScrollArrowPosition;
|
||||
|
||||
/* scroller parts */
|
||||
typedef enum {
|
||||
WSNoPart,
|
||||
WSDecrementPage,
|
||||
WSIncrementPage,
|
||||
WSDecrementLine,
|
||||
WSIncrementLine,
|
||||
WSDecrementWheel,
|
||||
WSIncrementWheel,
|
||||
WSKnob,
|
||||
WSKnobSlot
|
||||
WSDecrementPage,
|
||||
WSIncrementPage,
|
||||
WSDecrementLine,
|
||||
WSIncrementLine,
|
||||
WSDecrementWheel,
|
||||
WSIncrementWheel,
|
||||
WSKnob,
|
||||
WSKnobSlot
|
||||
} WMScrollerPart;
|
||||
|
||||
/* usable scroller parts */
|
||||
typedef enum {
|
||||
WSUNoParts,
|
||||
WSUOnlyArrows,
|
||||
WSUAllParts
|
||||
WSUOnlyArrows,
|
||||
WSUAllParts
|
||||
} WMUsableScrollerParts;
|
||||
|
||||
/* matrix types */
|
||||
typedef enum {
|
||||
WMRadioMode,
|
||||
WMHighlightMode,
|
||||
WMListMode,
|
||||
WMTrackMode
|
||||
WMHighlightMode,
|
||||
WMListMode,
|
||||
WMTrackMode
|
||||
} WMMatrixTypes;
|
||||
|
||||
|
||||
typedef enum {
|
||||
WTTopTabsBevelBorder,
|
||||
WTNoTabsBevelBorder,
|
||||
WTNoTabsLineBorder,
|
||||
WTNoTabsNoBorder
|
||||
WTNoTabsBevelBorder,
|
||||
WTNoTabsLineBorder,
|
||||
WTNoTabsNoBorder
|
||||
} WMTabViewType;
|
||||
|
||||
|
||||
/* text movement types */
|
||||
enum {
|
||||
WMIllegalTextMovement,
|
||||
WMReturnTextMovement,
|
||||
WMEscapeTextMovement,
|
||||
WMTabTextMovement,
|
||||
WMBacktabTextMovement,
|
||||
WMLeftTextMovement,
|
||||
WMRightTextMovement,
|
||||
WMUpTextMovement,
|
||||
WMDownTextMovement
|
||||
WMReturnTextMovement,
|
||||
WMEscapeTextMovement,
|
||||
WMTabTextMovement,
|
||||
WMBacktabTextMovement,
|
||||
WMLeftTextMovement,
|
||||
WMRightTextMovement,
|
||||
WMUpTextMovement,
|
||||
WMDownTextMovement
|
||||
};
|
||||
|
||||
/* text field special events */
|
||||
@@ -223,7 +223,7 @@ enum {
|
||||
|
||||
/* drag operations */
|
||||
typedef enum {
|
||||
WDOperationNone,
|
||||
WDOperationNone = 0,
|
||||
WDOperationCopy,
|
||||
WDOperationMove,
|
||||
WDOperationLink,
|
||||
@@ -233,13 +233,13 @@ typedef enum {
|
||||
|
||||
|
||||
typedef enum {
|
||||
WMGrayModeColorPanel = 1,
|
||||
WMRGBModeColorPanel = 2,
|
||||
WMCMYKModeColorPanel = 3,
|
||||
WMHSBModeColorPanel = 4,
|
||||
WMCustomPaletteModeColorPanel = 5,
|
||||
WMColorListModeColorPanel = 6,
|
||||
WMWheelModeColorPanel = 7
|
||||
WMGrayModeColorPanel = 1,
|
||||
WMRGBModeColorPanel = 2,
|
||||
WMCMYKModeColorPanel = 3,
|
||||
WMHSBModeColorPanel = 4,
|
||||
WMCustomPaletteModeColorPanel = 5,
|
||||
WMColorListModeColorPanel = 6,
|
||||
WMWheelModeColorPanel = 7
|
||||
} WMColorPanelMode;
|
||||
|
||||
|
||||
@@ -260,17 +260,17 @@ typedef enum {
|
||||
|
||||
enum {
|
||||
WLDSSelected = (1 << 16),
|
||||
WLDSDisabled = (1 << 17),
|
||||
WLDSFocused = (1 << 18),
|
||||
WLDSIsBranch = (1 << 19)
|
||||
WLDSDisabled = (1 << 17),
|
||||
WLDSFocused = (1 << 18),
|
||||
WLDSIsBranch = (1 << 19)
|
||||
};
|
||||
|
||||
/* alert panel return values */
|
||||
enum {
|
||||
WAPRDefault = 0,
|
||||
WAPRAlternate = 1,
|
||||
WAPROther = -1,
|
||||
WAPRError = -2
|
||||
WAPRAlternate = 1,
|
||||
WAPROther = -1,
|
||||
WAPRError = -2
|
||||
};
|
||||
|
||||
|
||||
@@ -278,8 +278,8 @@ enum {
|
||||
/* types of input observers */
|
||||
enum {
|
||||
WIReadMask = (1 << 0),
|
||||
WIWriteMask = (1 << 1),
|
||||
WIExceptMask = (1 << 2)
|
||||
WIWriteMask = (1 << 1),
|
||||
WIExceptMask = (1 << 2)
|
||||
};
|
||||
|
||||
|
||||
@@ -314,7 +314,7 @@ enum {
|
||||
typedef struct W_WidgetType {
|
||||
W_Class widgetClass;
|
||||
struct W_View *view;
|
||||
|
||||
|
||||
} W_WidgetType;
|
||||
|
||||
|
||||
@@ -400,24 +400,22 @@ typedef struct WMAlertPanel {
|
||||
typedef struct WMGenericPanel {
|
||||
WMWindow *win;
|
||||
WMBox *vbox;
|
||||
|
||||
|
||||
WMLabel *iLbl;
|
||||
WMLabel *tLbl;
|
||||
|
||||
|
||||
WMFrame *line;
|
||||
|
||||
|
||||
WMFrame *content;
|
||||
|
||||
|
||||
WMBox *buttonBox;
|
||||
WMButton *defBtn;
|
||||
WMButton *altBtn;
|
||||
|
||||
|
||||
short result;
|
||||
} WMGenericPanel;
|
||||
|
||||
|
||||
|
||||
|
||||
typedef struct WMInputPanel {
|
||||
WMWindow *win; /* window */
|
||||
WMButton *defBtn; /* default button */
|
||||
@@ -429,6 +427,15 @@ typedef struct WMInputPanel {
|
||||
} WMInputPanel;
|
||||
|
||||
|
||||
/* Basic font styles. Used to easily get one style from another */
|
||||
typedef enum WMFontStyle {
|
||||
WFSNormal = 0,
|
||||
WFSBold = 1,
|
||||
WFSItalic = 2,
|
||||
WFSBoldItalic = 3
|
||||
} WMFontStyle;
|
||||
|
||||
|
||||
/* WMRuler: */
|
||||
typedef struct {
|
||||
WMArray *tabs; /* a growable array of tabstops */
|
||||
@@ -436,7 +443,7 @@ typedef struct {
|
||||
unsigned short right; /* right margin marker */
|
||||
unsigned short first; /* indentation marker for first line only */
|
||||
unsigned short body; /* body indentation marker */
|
||||
unsigned short retainCount;
|
||||
unsigned short retainCount;
|
||||
} WMRulerMargins;
|
||||
/* All indentation and tab markers are _relative_ to the left margin marker */
|
||||
|
||||
@@ -453,20 +460,19 @@ typedef void WMAction(WMWidget *self, void *clientData);
|
||||
typedef void WMAction2(void *self, void *clientData);
|
||||
|
||||
|
||||
typedef void WMDropDataCallback(WMView *view, WMData *data);
|
||||
|
||||
/* delegate method like stuff */
|
||||
typedef void WMListDrawProc(WMList *lPtr, int index, Drawable d, char *text,
|
||||
int state, WMRect *rect);
|
||||
int state, WMRect *rect);
|
||||
|
||||
|
||||
/*
|
||||
typedef void WMSplitViewResizeSubviewsProc(WMSplitView *sPtr,
|
||||
unsigned int oldWidth,
|
||||
unsigned int oldHeight);
|
||||
unsigned int oldWidth,
|
||||
unsigned int oldHeight);
|
||||
*/
|
||||
|
||||
typedef void WMSplitViewConstrainProc(WMSplitView *sPtr, int dividerIndex,
|
||||
int *minSize, int *maxSize);
|
||||
int *minSize, int *maxSize);
|
||||
|
||||
typedef WMWidget* WMMatrixCreateCellProc(WMMatrix *mPtr);
|
||||
|
||||
@@ -477,10 +483,10 @@ typedef struct WMBrowserDelegate {
|
||||
void *data;
|
||||
|
||||
void (*createRowsForColumn)(struct WMBrowserDelegate *self,
|
||||
WMBrowser *sender, int column, WMList *list);
|
||||
WMBrowser *sender, int column, WMList *list);
|
||||
|
||||
char* (*titleOfColumn)(struct WMBrowserDelegate *self, WMBrowser *sender,
|
||||
int column);
|
||||
int column);
|
||||
|
||||
void (*didScroll)(struct WMBrowserDelegate *self, WMBrowser *sender);
|
||||
|
||||
@@ -494,7 +500,7 @@ typedef struct WMTextFieldDelegate {
|
||||
void (*didBeginEditing)(struct WMTextFieldDelegate *self,
|
||||
WMNotification *notif);
|
||||
|
||||
void (*didChange)(struct WMTextFieldDelegate *self,
|
||||
void (*didChange)(struct WMTextFieldDelegate *self,
|
||||
WMNotification *notif);
|
||||
|
||||
void (*didEndEditing)(struct WMTextFieldDelegate *self,
|
||||
@@ -512,7 +518,7 @@ typedef struct WMTextDelegate {
|
||||
void *data;
|
||||
|
||||
Bool (*didDoubleClickOnPicture)(struct WMTextDelegate *self,
|
||||
void *description);
|
||||
void *description);
|
||||
|
||||
} WMTextDelegate;
|
||||
|
||||
@@ -522,12 +528,12 @@ typedef struct WMTabViewDelegate {
|
||||
void *data;
|
||||
|
||||
void (*didChangeNumberOfItems)(struct WMTabViewDelegate *self,
|
||||
WMTabView *tabView);
|
||||
WMTabView *tabView);
|
||||
|
||||
void (*didSelectItem)(struct WMTabViewDelegate *self, WMTabView *tabView,
|
||||
WMTabViewItem *item);
|
||||
|
||||
Bool (*shouldSelectItem)(struct WMTabViewDelegate *self, WMTabView *tabView,
|
||||
Bool (*shouldSelectItem)(struct WMTabViewDelegate *self, WMTabView *tabView,
|
||||
WMTabViewItem *item);
|
||||
|
||||
void (*willSelectItem)(struct WMTabViewDelegate *self, WMTabView *tabView,
|
||||
@@ -538,43 +544,52 @@ typedef struct WMTabViewDelegate {
|
||||
|
||||
|
||||
typedef void WMSelectionCallback(WMView *view, Atom selection, Atom target,
|
||||
Time timestamp, void *cdata, WMData *data);
|
||||
Time timestamp, void *cdata, WMData *data);
|
||||
|
||||
|
||||
typedef struct WMSelectionProcs {
|
||||
WMData* (*convertSelection)(WMView *view, Atom selection, Atom target,
|
||||
void *cdata, Atom *type);
|
||||
void *cdata, Atom *type);
|
||||
void (*selectionLost)(WMView *view, Atom selection, void *cdata);
|
||||
void (*selectionDone)(WMView *view, Atom selection, Atom target,
|
||||
void *cdata);
|
||||
void *cdata);
|
||||
} WMSelectionProcs;
|
||||
|
||||
|
||||
typedef struct W_DraggingInfo WMDraggingInfo;
|
||||
|
||||
|
||||
/* links a label to a dnd operation. */
|
||||
typedef struct W_DragOperationtItem WMDragOperationItem;
|
||||
|
||||
|
||||
typedef struct W_DragSourceProcs {
|
||||
unsigned (*draggingSourceOperation)(WMView *self, Bool local);
|
||||
void (*beganDragImage)(WMView *self, WMPixmap *image, WMPoint point);
|
||||
void (*endedDragImage)(WMView *self, WMPixmap *image, WMPoint point,
|
||||
Bool deposited);
|
||||
WMArray* (*dropDataTypes)(WMView *self);
|
||||
WMDragOperationType (*wantedDropOperation)(WMView *self);
|
||||
WMArray* (*askedOperations)(WMView *self);
|
||||
Bool (*acceptDropOperation)(WMView *self, WMDragOperationType operation);
|
||||
void (*beganDrag)(WMView *self, WMPoint *point);
|
||||
void (*endedDrag)(WMView *self, WMPoint *point, Bool deposited);
|
||||
WMData* (*fetchDragData)(WMView *self, char *type);
|
||||
/* Bool (*ignoreModifierKeysWhileDragging)(WMView *view);*/
|
||||
/*Bool (*ignoreModifierKeysWhileDragging)(WMView *view);*/
|
||||
} WMDragSourceProcs;
|
||||
|
||||
|
||||
|
||||
typedef struct W_DragDestinationProcs {
|
||||
unsigned (*draggingEntered)(WMView *self, WMDraggingInfo *info);
|
||||
unsigned (*draggingUpdated)(WMView *self, WMDraggingInfo *info);
|
||||
void (*draggingExited)(WMView *self, WMDraggingInfo *info);
|
||||
Bool (*prepareForDragOperation)(WMView *self, WMDraggingInfo *info);
|
||||
Bool (*performDragOperation)(WMView *self, WMDraggingInfo *info);
|
||||
void (*concludeDragOperation)(WMView *self, WMDraggingInfo *info);
|
||||
void (*prepareForDragOperation)(WMView *self);
|
||||
WMArray* (*requiredDataTypes)(WMView *self, WMDragOperationType request,
|
||||
WMArray *sourceDataTypes);
|
||||
WMDragOperationType (*allowedOperation)(WMView *self,
|
||||
WMDragOperationType request,
|
||||
WMArray *sourceDataTypes);
|
||||
Bool (*inspectDropData)(WMView *self, WMArray *dropData);
|
||||
void (*performDragOperation)(WMView *self, WMArray *dropData,
|
||||
WMArray *operations, WMPoint *dropLocation);
|
||||
void (*concludeDragOperation)(WMView *self);
|
||||
} WMDragDestinationProcs;
|
||||
|
||||
|
||||
|
||||
/* ...................................................................... */
|
||||
|
||||
|
||||
@@ -582,6 +597,8 @@ WMPoint wmkpoint(int x, int y);
|
||||
|
||||
WMSize wmksize(unsigned int width, unsigned int height);
|
||||
|
||||
WMRect wmkrect(int x, int y, unsigned int width, unsigned int height);
|
||||
|
||||
#ifdef ANSI_C_DOESNT_LIKE_IT_THIS_WAY
|
||||
#define wmksize(width, height) (WMSize){(width), (height)}
|
||||
#define wmkpoint(x, y) (WMPoint){(x), (y)}
|
||||
@@ -605,7 +622,7 @@ char* WMPathForResourceOfType(char *resource, char *ext);
|
||||
WMScreen* WMOpenScreen(const char *display);
|
||||
|
||||
WMScreen* WMCreateScreenWithRContext(Display *display, int screen,
|
||||
RContext *context);
|
||||
RContext *context);
|
||||
|
||||
WMScreen* WMCreateScreen(Display *display, int screen);
|
||||
|
||||
@@ -647,10 +664,10 @@ int WMHandleEvent(XEvent *event);
|
||||
Bool WMScreenPending(WMScreen *scr);
|
||||
|
||||
void WMCreateEventHandler(WMView *view, unsigned long mask,
|
||||
WMEventProc *eventProc, void *clientData);
|
||||
WMEventProc *eventProc, void *clientData);
|
||||
|
||||
void WMDeleteEventHandler(WMView *view, unsigned long mask,
|
||||
WMEventProc *eventProc, void *clientData);
|
||||
WMEventProc *eventProc, void *clientData);
|
||||
|
||||
int WMIsDoubleClick(XEvent *event);
|
||||
|
||||
@@ -665,55 +682,72 @@ void WMMaskEvent(Display *dpy, long mask, XEvent *event);
|
||||
|
||||
|
||||
Bool WMCreateSelectionHandler(WMView *view, Atom selection, Time timestamp,
|
||||
WMSelectionProcs *procs, void *cdata);
|
||||
WMSelectionProcs *procs, void *cdata);
|
||||
|
||||
void WMDeleteSelectionHandler(WMView *view, Atom selection, Time timestamp);
|
||||
|
||||
Bool WMRequestSelection(WMView *view, Atom selection, Atom target,
|
||||
Time timestamp, WMSelectionCallback *callback,
|
||||
void *cdata);
|
||||
Bool WMRequestSelection(WMView *view, Atom selection, Atom target,
|
||||
Time timestamp, WMSelectionCallback *callback,
|
||||
void *cdata);
|
||||
|
||||
|
||||
extern char *WMSelectionOwnerDidChangeNotification;
|
||||
|
||||
/* ....................................................................... */
|
||||
|
||||
WMArray* WMCreateDragOperationArray(int initialSize);
|
||||
|
||||
WMDragOperationItem* WMCreateDragOperationItem(WMDragOperationType type,
|
||||
char* text);
|
||||
|
||||
WMDragOperationType WMGetDragOperationItemType(WMDragOperationItem* item);
|
||||
|
||||
char* WMGetDragOperationItemText(WMDragOperationItem* item);
|
||||
|
||||
void WMSetViewDragImage(WMView* view, WMPixmap *dragImage);
|
||||
|
||||
void WMReleaseViewDragImage(WMView* view);
|
||||
|
||||
void WMSetViewDragSourceProcs(WMView *view, WMDragSourceProcs *procs);
|
||||
|
||||
void WMDragImageFromView(WMView *view, WMPixmap *image, char *dataTypes[],
|
||||
WMPoint atLocation, WMSize mouseOffset, XEvent *event,
|
||||
Bool slideBack);
|
||||
Bool WMIsDraggingFromView(WMView *view);
|
||||
|
||||
void WMRegisterViewForDraggedTypes(WMView *view, char *acceptedTypes[]);
|
||||
void WMDragImageFromView(WMView *view, XEvent *event);
|
||||
|
||||
/* Create a drag handler, associating drag event masks with dragEventProc */
|
||||
void WMCreateDragHandler(WMView *view, WMEventProc *dragEventProc, void *clientData);
|
||||
|
||||
void WMDeleteDragHandler(WMView *view, WMEventProc *dragEventProc, void *clientData);
|
||||
|
||||
/* set default drag handler for view */
|
||||
void WMSetViewDraggable(WMView *view, WMDragSourceProcs *procs, WMPixmap *dragImage);
|
||||
|
||||
void WMUnsetViewDraggable(WMView *view);
|
||||
|
||||
void WMRegisterViewForDraggedTypes(WMView *view, WMArray *acceptedTypes);
|
||||
|
||||
void WMUnregisterViewDraggedTypes(WMView *view);
|
||||
|
||||
void WMSetViewDragDestinationProcs(WMView *view, WMDragDestinationProcs *procs);
|
||||
|
||||
/* ....................................................................... */
|
||||
|
||||
WMPoint WMGetDraggingInfoImageLocation(WMDraggingInfo *info);
|
||||
Bool WMIsAntialiasingEnabled(WMScreen *scrPtr);
|
||||
|
||||
/* ....................................................................... */
|
||||
|
||||
WMFont* WMCreateFontSet(WMScreen *scrPtr, char *fontName);
|
||||
|
||||
WMFont* WMCreateNormalFont(WMScreen *scrPtr, char *fontName);
|
||||
|
||||
WMFont* WMCreateFont(WMScreen *scrPtr, char *fontName);
|
||||
|
||||
WMFont* WMCopyFontWithStyle(WMScreen *scrPtr, WMFont *font, WMFontStyle style);
|
||||
|
||||
WMFont* WMRetainFont(WMFont *font);
|
||||
|
||||
void WMReleaseFont(WMFont *font);
|
||||
|
||||
char* WMGetFontName(WMFont *font);
|
||||
|
||||
unsigned int WMFontHeight(WMFont *font);
|
||||
|
||||
/*
|
||||
WMFont* WMUserFontOfSize(WMScreen *scrPtr, int size);
|
||||
|
||||
WMFont* WMUserFixedPitchFontOfSize(WMScreen *scrPtr, int size);
|
||||
*/
|
||||
|
||||
|
||||
void WMSetWidgetDefaultFont(WMScreen *scr, WMFont *font);
|
||||
|
||||
void WMSetWidgetDefaultBoldFont(WMScreen *scr, WMFont *font);
|
||||
@@ -726,20 +760,6 @@ WMFont* WMSystemFontOfSize(WMScreen *scrPtr, int size);
|
||||
|
||||
WMFont* WMBoldSystemFontOfSize(WMScreen *scrPtr, int size);
|
||||
|
||||
XFontSet WMGetFontFontSet(WMFont *font);
|
||||
|
||||
WMFont* WMNormalizeFont(WMScreen *scr, WMFont *font);
|
||||
|
||||
WMFont* WMStrengthenFont(WMScreen *scr, WMFont *font);
|
||||
|
||||
WMFont* WMUnstrengthenFont(WMScreen *scr, WMFont *font);
|
||||
|
||||
WMFont* WMEmphasizeFont(WMScreen *scr, WMFont *font);
|
||||
|
||||
WMFont* WMUnemphasizeFont(WMScreen *scr, WMFont *font);
|
||||
|
||||
WMFont* WMGetFontOfSize(WMScreen *scr, WMFont *font, int size);
|
||||
|
||||
/* ....................................................................... */
|
||||
|
||||
WMPixmap* WMRetainPixmap(WMPixmap *pixmap);
|
||||
@@ -747,14 +767,14 @@ WMPixmap* WMRetainPixmap(WMPixmap *pixmap);
|
||||
void WMReleasePixmap(WMPixmap *pixmap);
|
||||
|
||||
WMPixmap* WMCreatePixmap(WMScreen *scrPtr, int width, int height, int depth,
|
||||
Bool masked);
|
||||
Bool masked);
|
||||
|
||||
WMPixmap* WMCreatePixmapFromXPixmaps(WMScreen *scrPtr, Pixmap pixmap,
|
||||
Pixmap mask, int width, int height,
|
||||
int depth);
|
||||
Pixmap mask, int width, int height,
|
||||
int depth);
|
||||
|
||||
WMPixmap* WMCreatePixmapFromRImage(WMScreen *scrPtr, RImage *image,
|
||||
int threshold);
|
||||
int threshold);
|
||||
|
||||
WMPixmap* WMCreatePixmapFromXPMData(WMScreen *scrPtr, char **data);
|
||||
|
||||
@@ -766,7 +786,7 @@ WMPixmap* WMCreateBlendedPixmapFromRImage(WMScreen *scrPtr, RImage *image,
|
||||
RColor *color);
|
||||
|
||||
WMPixmap* WMCreateBlendedPixmapFromFile(WMScreen *scrPtr, char *fileName,
|
||||
RColor *color);
|
||||
RColor *color);
|
||||
|
||||
void WMDrawPixmap(WMPixmap *pixmap, Drawable d, int x, int y);
|
||||
|
||||
@@ -793,35 +813,46 @@ GC WMColorGC(WMColor *color);
|
||||
|
||||
WMPixel WMColorPixel(WMColor *color);
|
||||
|
||||
void WMPaintColorSwatch(WMColor *color, Drawable d, int x, int y,
|
||||
unsigned int width, unsigned int height);
|
||||
void WMPaintColorSwatch(WMColor *color, Drawable d, int x, int y,
|
||||
unsigned int width, unsigned int height);
|
||||
|
||||
void WMReleaseColor(WMColor *color);
|
||||
|
||||
WMColor* WMRetainColor(WMColor *color);
|
||||
|
||||
WMColor* WMCreateRGBColor(WMScreen *scr, unsigned short red,
|
||||
unsigned short green, unsigned short blue,
|
||||
Bool exact);
|
||||
unsigned short green, unsigned short blue,
|
||||
Bool exact);
|
||||
|
||||
WMColor* WMCreateRGBAColor(WMScreen *scr, unsigned short red,
|
||||
unsigned short green, unsigned short blue,
|
||||
unsigned short alpha, Bool exact);
|
||||
|
||||
WMColor* WMCreateNamedColor(WMScreen *scr, char *name, Bool exact);
|
||||
|
||||
RColor WMGetRColorFromColor(WMColor *color);
|
||||
|
||||
void WMSetColorAlpha(WMColor *color, unsigned short alpha);
|
||||
|
||||
unsigned short WMRedComponentOfColor(WMColor *color);
|
||||
|
||||
unsigned short WMGreenComponentOfColor(WMColor *color);
|
||||
|
||||
unsigned short WMBlueComponentOfColor(WMColor *color);
|
||||
|
||||
unsigned short WMGetColorAlpha(WMColor *color);
|
||||
|
||||
char* WMGetColorRGBDescription(WMColor *color);
|
||||
|
||||
/* ....................................................................... */
|
||||
|
||||
|
||||
void WMDrawString(WMScreen *scr, Drawable d, GC gc, WMFont *font, int x,
|
||||
int y, char *text, int length);
|
||||
void WMDrawString(WMScreen *scr, Drawable d, WMColor *color, WMFont *font,
|
||||
int x, int y, char *text, int length);
|
||||
|
||||
void WMDrawImageString(WMScreen *scr, Drawable d, GC gc, WMFont *font, int x,
|
||||
int y, char *text, int length);
|
||||
void WMDrawImageString(WMScreen *scr, Drawable d, WMColor *color,
|
||||
WMColor *background, WMFont *font, int x, int y,
|
||||
char *text, int length);
|
||||
|
||||
int WMWidthOfString(WMFont *font, char *text, int length);
|
||||
|
||||
@@ -851,6 +882,8 @@ void WMResizeWidget(WMWidget *w, unsigned int width, unsigned int height);
|
||||
|
||||
void WMSetWidgetBackgroundColor(WMWidget *w, WMColor *color);
|
||||
|
||||
WMColor* WMGetWidgetBackgroundColor(WMWidget *w);
|
||||
|
||||
void WMMapSubwidgets(WMWidget *w);
|
||||
|
||||
void WMUnmapSubwidgets(WMWidget *w);
|
||||
@@ -877,8 +910,8 @@ void WMRedisplayWidget(WMWidget *w);
|
||||
|
||||
void WMSetViewNotifySizeChanges(WMView *view, Bool flag);
|
||||
|
||||
void WMSetViewExpandsToParent(WMView *view, int topOffs, int leftOffs,
|
||||
int rightOffs, int bottomOffs);
|
||||
void WMSetViewExpandsToParent(WMView *view, int topOffs, int leftOffs,
|
||||
int rightOffs, int bottomOffs);
|
||||
|
||||
WMSize WMGetViewSize(WMView *view);
|
||||
|
||||
@@ -922,7 +955,7 @@ WMWindow* WMCreateWindow(WMScreen *screen, char *name);
|
||||
WMWindow* WMCreateWindowWithStyle(WMScreen *screen, char *name, int style);
|
||||
|
||||
WMWindow* WMCreatePanelWithStyleForWindow(WMWindow *owner, char *name,
|
||||
int style);
|
||||
int style);
|
||||
|
||||
WMWindow* WMCreatePanelForWindow(WMWindow *owner, char *name);
|
||||
|
||||
@@ -932,6 +965,8 @@ void WMSetWindowTitle(WMWindow *wPtr, char *title);
|
||||
|
||||
void WMSetWindowMiniwindowTitle(WMWindow *win, char *title);
|
||||
|
||||
void WMSetWindowMiniwindowImage(WMWindow *win, RImage *image);
|
||||
|
||||
void WMSetWindowMiniwindowPixmap(WMWindow *win, WMPixmap *pixmap);
|
||||
|
||||
void WMSetWindowCloseAction(WMWindow *win, WMAction *action, void *clientData);
|
||||
@@ -941,7 +976,7 @@ void WMSetWindowInitialPosition(WMWindow *win, int x, int y);
|
||||
void WMSetWindowUserPosition(WMWindow *win, int x, int y);
|
||||
|
||||
void WMSetWindowAspectRatio(WMWindow *win, int minX, int minY,
|
||||
int maxX, int maxY);
|
||||
int maxX, int maxY);
|
||||
|
||||
void WMSetWindowMaxSize(WMWindow *win, unsigned width, unsigned height);
|
||||
|
||||
@@ -962,16 +997,16 @@ void WMCloseWindow(WMWindow *win);
|
||||
void WMSetButtonAction(WMButton *bPtr, WMAction *action, void *clientData);
|
||||
|
||||
#define WMCreateCommandButton(parent) \
|
||||
WMCreateCustomButton((parent), WBBSpringLoadedMask\
|
||||
|WBBPushInMask\
|
||||
|WBBPushLightMask\
|
||||
|WBBPushChangeMask)
|
||||
WMCreateCustomButton((parent), WBBSpringLoadedMask\
|
||||
|WBBPushInMask\
|
||||
|WBBPushLightMask\
|
||||
|WBBPushChangeMask)
|
||||
|
||||
#define WMCreateRadioButton(parent) \
|
||||
WMCreateButton((parent), WBTRadio)
|
||||
WMCreateButton((parent), WBTRadio)
|
||||
|
||||
#define WMCreateSwitchButton(parent) \
|
||||
WMCreateButton((parent), WBTSwitch)
|
||||
WMCreateButton((parent), WBTSwitch)
|
||||
|
||||
WMButton* WMCreateButton(WMWidget *parent, WMButtonType type);
|
||||
|
||||
@@ -1106,8 +1141,8 @@ extern char *WMTextDidEndEditingNotification;
|
||||
|
||||
WMScroller* WMCreateScroller(WMWidget *parent);
|
||||
|
||||
void WMSetScrollerParameters(WMScroller *sPtr, float floatValue,
|
||||
float knobProportion);
|
||||
void WMSetScrollerParameters(WMScroller *sPtr, float floatValue,
|
||||
float knobProportion);
|
||||
|
||||
float WMGetScrollerKnobProportion(WMScroller *sPtr);
|
||||
|
||||
@@ -1117,8 +1152,8 @@ WMScrollerPart WMGetScrollerHitPart(WMScroller *sPtr);
|
||||
|
||||
void WMSetScrollerAction(WMScroller *sPtr, WMAction *action, void *clientData);
|
||||
|
||||
void WMSetScrollerArrowsPosition(WMScroller *sPtr,
|
||||
WMScrollArrowPosition position);
|
||||
void WMSetScrollerArrowsPosition(WMScroller *sPtr,
|
||||
WMScrollArrowPosition position);
|
||||
|
||||
extern char *WMScrollerDidScrollNotification;
|
||||
|
||||
@@ -1245,8 +1280,8 @@ WMArray* WMGetBrowserPaths(WMBrowser *bPtr);
|
||||
|
||||
void WMSetBrowserAction(WMBrowser *bPtr, WMAction *action, void *clientData);
|
||||
|
||||
void WMSetBrowserDoubleAction(WMBrowser *bPtr, WMAction *action,
|
||||
void *clientData);
|
||||
void WMSetBrowserDoubleAction(WMBrowser *bPtr, WMAction *action,
|
||||
void *clientData);
|
||||
|
||||
WMListItem* WMGetBrowserSelectedItemInColumn(WMBrowser *bPtr, int column);
|
||||
|
||||
@@ -1326,26 +1361,26 @@ void WMSetMenuItemMixedStatePixmap(WMMenuItem *item, WMPixmap *pixmap);
|
||||
WMPixmap* WMGetMenuItemMixedStatePixmap(WMMenuItem *item);
|
||||
|
||||
/*void WMSetMenuItemSubmenu(WMMenuItem *item, WMMenu *submenu);
|
||||
|
||||
|
||||
|
||||
WMMenu* WMGetMenuItemSubmenu(WMMenuItem *item);
|
||||
|
||||
Bool WMGetMenuItemHasSubmenu(WMMenuItem *item);
|
||||
*/
|
||||
*/
|
||||
|
||||
/* ....................................................................... */
|
||||
|
||||
WMPopUpButton* WMCreatePopUpButton(WMWidget *parent);
|
||||
|
||||
void WMSetPopUpButtonAction(WMPopUpButton *sPtr, WMAction *action,
|
||||
void *clientData);
|
||||
void WMSetPopUpButtonAction(WMPopUpButton *sPtr, WMAction *action,
|
||||
void *clientData);
|
||||
|
||||
void WMSetPopUpButtonPullsDown(WMPopUpButton *bPtr, Bool flag);
|
||||
|
||||
WMMenuItem* WMAddPopUpButtonItem(WMPopUpButton *bPtr, char *title);
|
||||
|
||||
WMMenuItem* WMInsertPopUpButtonItem(WMPopUpButton *bPtr, int index,
|
||||
char *title);
|
||||
char *title);
|
||||
|
||||
void WMRemovePopUpButtonItem(WMPopUpButton *bPtr, int index);
|
||||
|
||||
@@ -1364,7 +1399,6 @@ char* WMGetPopUpButtonItem(WMPopUpButton *bPtr, int index);
|
||||
|
||||
WMMenuItem* WMGetPopUpButtonMenuItem(WMPopUpButton *bPtr, int index);
|
||||
|
||||
|
||||
int WMGetPopUpButtonNumberOfItems(WMPopUpButton *bPtr);
|
||||
|
||||
void WMSetPopUpButtonEnabled(WMPopUpButton *bPtr, Bool flag);
|
||||
@@ -1427,7 +1461,7 @@ extern char *WMColorWellDidChangeNotification;
|
||||
WMScrollView* WMCreateScrollView(WMWidget *parent);
|
||||
|
||||
void WMResizeScrollViewContent(WMScrollView *sPtr, unsigned int width,
|
||||
unsigned int height);
|
||||
unsigned int height);
|
||||
|
||||
void WMSetScrollViewHasHorizontalScroller(WMScrollView *sPtr, Bool flag);
|
||||
|
||||
@@ -1494,12 +1528,12 @@ void WMAddSplitViewSubview(WMSplitView *sPtr, WMView *subview);
|
||||
|
||||
void WMAdjustSplitViewSubviews(WMSplitView *sPtr);
|
||||
|
||||
void WMSetSplitViewConstrainProc(WMSplitView *sPtr,
|
||||
WMSplitViewConstrainProc *proc);
|
||||
void WMSetSplitViewConstrainProc(WMSplitView *sPtr,
|
||||
WMSplitViewConstrainProc *proc);
|
||||
|
||||
/*
|
||||
void WMSetSplitViewResizeSubviewsProc(WMSplitView *sPtr,
|
||||
WMSplitViewResizeSubviewsProc *proc);
|
||||
void WMSetSplitViewResizeSubviewsProc(WMSplitView *sPtr,
|
||||
WMSplitViewResizeSubviewsProc *proc);
|
||||
*/
|
||||
|
||||
int WMGetSplitViewDividerThickness(WMSplitView *sPtr);
|
||||
@@ -1537,9 +1571,9 @@ WMText* WMCreateTextForDocumentType(WMWidget *parent, WMAction *parser,
|
||||
|
||||
void WMSetTextDelegate(WMText *tPtr, WMTextDelegate *delegate);
|
||||
|
||||
void WMFreezeText(WMText *tPtr);
|
||||
void WMFreezeText(WMText *tPtr);
|
||||
|
||||
#define WMRefreshText(tPtr) WMThawText((tPtr))
|
||||
#define WMRefreshText(tPtr) WMThawText((tPtr))
|
||||
|
||||
void WMThawText(WMText *tPtr);
|
||||
|
||||
@@ -1683,7 +1717,7 @@ void WMInsertItemInTabView(WMTabView *tPtr, int index, WMTabViewItem *item);
|
||||
void WMRemoveTabViewItem(WMTabView *tPtr, WMTabViewItem *item);
|
||||
|
||||
WMTabViewItem* WMAddTabViewItemWithView(WMTabView *tPtr, WMView *view,
|
||||
int identifier, char *label);
|
||||
int identifier, char *label);
|
||||
|
||||
WMTabViewItem* WMTabViewItemAtPoint(WMTabView *tPtr, int x, int y);
|
||||
|
||||
@@ -1728,10 +1762,10 @@ WMBox* WMCreateBox(WMWidget *parent);
|
||||
void WMSetBoxBorderWidth(WMBox *box, unsigned width);
|
||||
|
||||
void WMAddBoxSubview(WMBox *bPtr, WMView *view, Bool expand, Bool fill,
|
||||
int minSize, int maxSize, int space);
|
||||
int minSize, int maxSize, int space);
|
||||
|
||||
void WMAddBoxSubviewAtEnd(WMBox *bPtr, WMView *view, Bool expand, Bool fill,
|
||||
int minSize, int maxSize, int space);
|
||||
int minSize, int maxSize, int space);
|
||||
|
||||
void WMRemoveBoxSubview(WMBox *bPtr, WMView *view);
|
||||
|
||||
@@ -1739,26 +1773,26 @@ void WMSetBoxHorizontal(WMBox *box, Bool flag);
|
||||
|
||||
/* ....................................................................... */
|
||||
|
||||
int WMRunAlertPanel(WMScreen *app, WMWindow *owner, char *title, char *msg,
|
||||
char *defaultButton, char *alternateButton,
|
||||
char *otherButton);
|
||||
int WMRunAlertPanel(WMScreen *app, WMWindow *owner, char *title, char *msg,
|
||||
char *defaultButton, char *alternateButton,
|
||||
char *otherButton);
|
||||
|
||||
/* you can free the returned string */
|
||||
char* WMRunInputPanel(WMScreen *app, WMWindow *owner, char *title, char *msg,
|
||||
char *defaultText, char *okButton, char *cancelButton);
|
||||
char *defaultText, char *okButton, char *cancelButton);
|
||||
|
||||
WMAlertPanel* WMCreateAlertPanel(WMScreen *app, WMWindow *owner, char *title,
|
||||
char *msg, char *defaultButton,
|
||||
char *alternateButton, char *otherButton);
|
||||
char *msg, char *defaultButton,
|
||||
char *alternateButton, char *otherButton);
|
||||
|
||||
WMInputPanel* WMCreateInputPanel(WMScreen *app, WMWindow *owner, char *title,
|
||||
char *msg, char *defaultText, char *okButton,
|
||||
char *cancelButton);
|
||||
char *msg, char *defaultText, char *okButton,
|
||||
char *cancelButton);
|
||||
|
||||
|
||||
WMGenericPanel* WMCreateGenericPanel(WMScreen *scrPtr, WMWindow *owner,
|
||||
char *title, char *defaultButton,
|
||||
char *alternateButton);
|
||||
char *title, char *defaultButton,
|
||||
char *alternateButton);
|
||||
|
||||
void WMDestroyAlertPanel(WMAlertPanel *panel);
|
||||
|
||||
@@ -1803,10 +1837,11 @@ void WMShowFontPanel(WMFontPanel *panel);
|
||||
|
||||
void WMHideFontPanel(WMFontPanel *panel);
|
||||
|
||||
void WMSetFontPanelFont(WMFontPanel *panel, WMFont *font);
|
||||
void WMFreeFontPanel(WMFontPanel *panel);
|
||||
|
||||
/* you can free the returned string */
|
||||
char* WMGetFontPanelFontName(WMFontPanel *panel);
|
||||
void WMSetFontPanelAction(WMFontPanel *panel, WMAction2 *action, void *data);
|
||||
|
||||
void WMSetFontPanelFont(WMFontPanel *panel, char *fontName);
|
||||
|
||||
WMFont* WMGetFontPanelFont(WMFontPanel *panel);
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#include <WINGs/WINGs.h>
|
||||
|
||||
#if WINGS_H_VERSION < 20020104
|
||||
#if WINGS_H_VERSION < 20041030
|
||||
#error There_is_an_old_WINGs.h_file_somewhere_in_your_system._Please_remove_it.
|
||||
#endif
|
||||
|
||||
@@ -22,21 +22,16 @@
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#define DOUBLE_BUFFER
|
||||
|
||||
|
||||
#define DOUBLE_BUFFER 1
|
||||
|
||||
#define WC_UserWidget 128
|
||||
|
||||
#define SCROLLER_WIDTH 20
|
||||
|
||||
#define XDND_VERSION 3
|
||||
|
||||
|
||||
#define SCROLLER_WIDTH 20
|
||||
|
||||
|
||||
|
||||
#define XDND_VERSION 4
|
||||
|
||||
|
||||
typedef struct W_Application {
|
||||
char *applicationName;
|
||||
int argc;
|
||||
@@ -48,15 +43,12 @@ typedef struct W_Application {
|
||||
typedef struct W_Font {
|
||||
struct W_Screen *screen;
|
||||
|
||||
union {
|
||||
XFontSet set;
|
||||
XFontStruct *normal;
|
||||
} font;
|
||||
struct _XftFont *font;
|
||||
|
||||
short height;
|
||||
short y;
|
||||
short refCount;
|
||||
char *name;
|
||||
unsigned int notFontSet:1;
|
||||
} W_Font;
|
||||
|
||||
|
||||
@@ -75,45 +67,71 @@ typedef struct W_Color {
|
||||
struct W_Screen *screen;
|
||||
|
||||
XColor color;
|
||||
unsigned short alpha;
|
||||
short refCount;
|
||||
GC gc;
|
||||
struct {
|
||||
unsigned int exact:1;
|
||||
unsigned int exact:1;
|
||||
} flags;
|
||||
} W_Color;
|
||||
|
||||
|
||||
typedef struct W_FocusInfo {
|
||||
struct W_View *toplevel;
|
||||
struct W_View *focused; /* view that has the focus in this toplevel */
|
||||
struct W_View *focused; /* view that has the focus in this toplevel */
|
||||
struct W_FocusInfo *next;
|
||||
} W_FocusInfo;
|
||||
|
||||
|
||||
|
||||
struct W_DraggingInfo {
|
||||
typedef void* W_DndState(WMView *destView, XClientMessageEvent *event,
|
||||
WMDraggingInfo *info);
|
||||
|
||||
|
||||
typedef struct W_DragOperationItem {
|
||||
WMDragOperationType type;
|
||||
char* text;
|
||||
} W_DragOperationItem;
|
||||
|
||||
|
||||
typedef struct W_DragSourceInfo {
|
||||
WMView *sourceView;
|
||||
Window destinationWindow;
|
||||
Window sourceWindow;
|
||||
|
||||
WMPoint location;
|
||||
|
||||
unsigned sourceOperation;
|
||||
WMPixmap *image;
|
||||
W_DndState *state;
|
||||
WMSelectionProcs *selectionProcs;
|
||||
Window icon;
|
||||
WMPoint imageLocation;
|
||||
WMPoint mouseOffset; /* mouse pos in icon */
|
||||
Cursor dragCursor;
|
||||
WMRect noPositionMessageZone;
|
||||
Atom firstThreeTypes[3];
|
||||
} W_DragSourceInfo;
|
||||
|
||||
char **types;
|
||||
|
||||
typedef struct W_DragDestinationInfo {
|
||||
WMView *destView;
|
||||
WMView *xdndAwareView;
|
||||
Window sourceWindow;
|
||||
W_DndState *state;
|
||||
Bool sourceActionChanged;
|
||||
WMArray *sourceTypes;
|
||||
WMArray *requiredTypes;
|
||||
Bool typeListAvailable;
|
||||
WMArray *dropDatas;
|
||||
} W_DragDestinationInfo;
|
||||
|
||||
|
||||
struct W_DraggingInfo {
|
||||
unsigned char protocolVersion; /* version supported on the other side */
|
||||
Time timestamp;
|
||||
|
||||
int protocolVersion;
|
||||
Atom sourceAction;
|
||||
Atom destinationAction;
|
||||
|
||||
W_DragSourceInfo* sourceInfo; /* infos needed by source */
|
||||
W_DragDestinationInfo* destInfo; /* infos needed by destination */
|
||||
} W_DraggingInfo;
|
||||
|
||||
/* should be treated as internal data */
|
||||
WMView *sourceView;
|
||||
WMView *destView;
|
||||
WMSize mouseOffset;
|
||||
unsigned finished:1;
|
||||
};
|
||||
|
||||
|
||||
typedef struct W_Screen {
|
||||
Display *display;
|
||||
@@ -121,19 +139,21 @@ typedef struct W_Screen {
|
||||
int depth;
|
||||
|
||||
Colormap colormap;
|
||||
|
||||
|
||||
Visual *visual;
|
||||
|
||||
|
||||
Time lastEventTime;
|
||||
|
||||
|
||||
Window rootWin;
|
||||
|
||||
struct W_View *rootView;
|
||||
|
||||
|
||||
RContext *rcontext;
|
||||
|
||||
struct W_IMContext *imctx;
|
||||
|
||||
|
||||
struct _XftDraw *xftdraw; /* shared XftDraw */
|
||||
|
||||
/* application related */
|
||||
|
||||
W_FocusInfo *focusInfo;
|
||||
@@ -144,14 +164,14 @@ typedef struct W_Screen {
|
||||
|
||||
struct W_Window *windowList; /* list of windows in the app */
|
||||
|
||||
Window groupLeader; /* the leader of the application */
|
||||
/* also used for other things */
|
||||
Window groupLeader; /* the leader of the application */
|
||||
/* also used for other things */
|
||||
|
||||
struct W_SelectionHandlers *selectionHandlerList;
|
||||
|
||||
struct {
|
||||
unsigned int hasAppIcon:1;
|
||||
unsigned int simpleApplication:1;
|
||||
unsigned int hasAppIcon:1;
|
||||
unsigned int simpleApplication:1;
|
||||
} aflags;
|
||||
|
||||
WMOpenPanel *sharedOpenPanel;
|
||||
@@ -165,7 +185,7 @@ typedef struct W_Screen {
|
||||
|
||||
struct W_View *dragSourceView;
|
||||
struct W_DraggingInfo dragInfo;
|
||||
|
||||
|
||||
/* colors */
|
||||
W_Color *white;
|
||||
W_Color *black;
|
||||
@@ -173,17 +193,19 @@ typedef struct W_Screen {
|
||||
W_Color *darkGray;
|
||||
|
||||
GC stippleGC;
|
||||
|
||||
|
||||
GC copyGC;
|
||||
GC clipGC;
|
||||
|
||||
GC monoGC; /* GC for 1bpp visuals */
|
||||
|
||||
|
||||
GC monoGC; /* GC for 1bpp visuals */
|
||||
|
||||
GC xorGC;
|
||||
|
||||
GC ixorGC; /* IncludeInferiors XOR */
|
||||
GC ixorGC; /* IncludeInferiors XOR */
|
||||
|
||||
GC textFieldGC;
|
||||
GC drawStringGC; /* for WMDrawString() */
|
||||
|
||||
GC drawImStringGC; /* for WMDrawImageString() */
|
||||
|
||||
W_Font *normalFont;
|
||||
|
||||
@@ -191,18 +213,16 @@ typedef struct W_Screen {
|
||||
|
||||
WMHashTable *fontCache;
|
||||
|
||||
WMHashTable *fontSetCache;
|
||||
Bool antialiasedText;
|
||||
|
||||
Bool useMultiByte;
|
||||
|
||||
unsigned int ignoredModifierMask; /* modifiers to ignore when typing txt */
|
||||
|
||||
struct W_Balloon *balloon;
|
||||
|
||||
|
||||
|
||||
struct W_Pixmap *checkButtonImageOn;
|
||||
struct W_Pixmap *checkButtonImageOff;
|
||||
|
||||
|
||||
struct W_Pixmap *radioButtonImageOn;
|
||||
struct W_Pixmap *radioButtonImageOff;
|
||||
|
||||
@@ -210,12 +230,12 @@ typedef struct W_Screen {
|
||||
struct W_Pixmap *pushedButtonArrow;
|
||||
|
||||
struct W_Pixmap *scrollerDimple;
|
||||
|
||||
|
||||
struct W_Pixmap *upArrow;
|
||||
struct W_Pixmap *downArrow;
|
||||
struct W_Pixmap *leftArrow;
|
||||
struct W_Pixmap *rightArrow;
|
||||
|
||||
|
||||
struct W_Pixmap *hiUpArrow;
|
||||
struct W_Pixmap *hiDownArrow;
|
||||
struct W_Pixmap *hiLeftArrow;
|
||||
@@ -241,7 +261,7 @@ typedef struct W_Screen {
|
||||
struct W_Pixmap *altUnmountIcon;
|
||||
|
||||
struct W_Pixmap *magnifyIcon;
|
||||
/* struct W_Pixmap *altMagnifyIcon;*/
|
||||
/*struct W_Pixmap *altMagnifyIcon;*/
|
||||
struct W_Pixmap *wheelIcon;
|
||||
struct W_Pixmap *grayIcon;
|
||||
struct W_Pixmap *rgbIcon;
|
||||
@@ -249,24 +269,24 @@ typedef struct W_Screen {
|
||||
struct W_Pixmap *hsbIcon;
|
||||
struct W_Pixmap *customPaletteIcon;
|
||||
struct W_Pixmap *colorListIcon;
|
||||
|
||||
|
||||
struct W_Pixmap *defaultObjectIcon;
|
||||
|
||||
Cursor defaultCursor;
|
||||
|
||||
|
||||
Cursor textCursor;
|
||||
|
||||
Cursor invisibleCursor;
|
||||
|
||||
Atom attribsAtom; /* GNUstepWindowAttributes */
|
||||
|
||||
Atom deleteWindowAtom; /* WM_DELETE_WINDOW */
|
||||
|
||||
Atom protocolsAtom; /* _XA_WM_PROTOCOLS */
|
||||
|
||||
Atom clipboardAtom; /* CLIPBOARD */
|
||||
Atom attribsAtom; /* GNUstepWindowAttributes */
|
||||
|
||||
Atom xdndAwareAtom; /* XdndAware */
|
||||
Atom deleteWindowAtom; /* WM_DELETE_WINDOW */
|
||||
|
||||
Atom protocolsAtom; /* _XA_WM_PROTOCOLS */
|
||||
|
||||
Atom clipboardAtom; /* CLIPBOARD */
|
||||
|
||||
Atom xdndAwareAtom; /* XdndAware */
|
||||
Atom xdndSelectionAtom;
|
||||
Atom xdndEnterAtom;
|
||||
Atom xdndLeaveAtom;
|
||||
@@ -274,6 +294,8 @@ typedef struct W_Screen {
|
||||
Atom xdndDropAtom;
|
||||
Atom xdndFinishedAtom;
|
||||
Atom xdndTypeListAtom;
|
||||
Atom xdndActionListAtom;
|
||||
Atom xdndActionDescriptionAtom;
|
||||
Atom xdndStatusAtom;
|
||||
|
||||
Atom xdndActionCopy;
|
||||
@@ -281,14 +303,20 @@ typedef struct W_Screen {
|
||||
Atom xdndActionLink;
|
||||
Atom xdndActionAsk;
|
||||
Atom xdndActionPrivate;
|
||||
|
||||
|
||||
Atom wmIconDragOffsetAtom;
|
||||
|
||||
Atom wmStateAtom; /* WM_STATE */
|
||||
Atom wmStateAtom; /* WM_STATE */
|
||||
|
||||
Atom utf8String;
|
||||
|
||||
Atom netwmName;
|
||||
Atom netwmIconName;
|
||||
Atom netwmIcon;
|
||||
|
||||
/* stuff for detecting double-clicks */
|
||||
Time lastClickTime; /* time of last mousedown event */
|
||||
Window lastClickWindow; /* window of the last mousedown */
|
||||
Time lastClickTime; /* time of last mousedown event */
|
||||
Window lastClickWindow; /* window of the last mousedown */
|
||||
|
||||
struct W_View *modalView;
|
||||
unsigned modalLoop:1;
|
||||
@@ -307,7 +335,7 @@ typedef struct W_ViewDelegate {
|
||||
void (*willMove)(struct W_ViewDelegate*, WMView*, int*, int*);
|
||||
|
||||
void (*willResize)(struct W_ViewDelegate*, WMView*,
|
||||
unsigned int*, unsigned int*);
|
||||
unsigned int*, unsigned int*);
|
||||
} W_ViewDelegate;
|
||||
|
||||
|
||||
@@ -315,74 +343,75 @@ typedef struct W_ViewDelegate {
|
||||
typedef struct W_View {
|
||||
struct W_Screen *screen;
|
||||
|
||||
WMWidget *self; /* must point to the widget the
|
||||
* view belongs to */
|
||||
WMWidget *self; /* must point to the widget the view belongs to */
|
||||
|
||||
W_ViewDelegate *delegate;
|
||||
|
||||
Window window;
|
||||
|
||||
WMSize size;
|
||||
|
||||
|
||||
short topOffs;
|
||||
short leftOffs;
|
||||
short bottomOffs;
|
||||
short rightOffs;
|
||||
|
||||
WMPoint pos;
|
||||
|
||||
|
||||
struct W_View *nextFocusChain; /* next/prev in focus chain */
|
||||
struct W_View *prevFocusChain;
|
||||
|
||||
|
||||
struct W_View *nextResponder; /* next to receive keyboard events */
|
||||
|
||||
struct W_View *parent; /* parent WMView */
|
||||
|
||||
|
||||
struct W_View *parent; /* parent WMView */
|
||||
|
||||
struct W_View *childrenList; /* first in list of child windows */
|
||||
|
||||
struct W_View *nextSister; /* next on parent's children list */
|
||||
|
||||
WMArray *eventHandlers; /* event handlers for this window */
|
||||
|
||||
struct W_View *nextSister; /* next on parent's children list */
|
||||
|
||||
WMArray *eventHandlers; /* event handlers for this window */
|
||||
|
||||
unsigned long attribFlags;
|
||||
XSetWindowAttributes attribs;
|
||||
|
||||
void *hangedData; /* data holder for user program */
|
||||
|
||||
void *hangedData; /* data holder for user program */
|
||||
|
||||
WMColor *backColor;
|
||||
|
||||
Cursor cursor;
|
||||
|
||||
Atom *droppableTypes;
|
||||
struct W_DragSourceProcs *dragSourceProcs;
|
||||
struct W_DragSourceProcs *dragSourceProcs;
|
||||
struct W_DragDestinationProcs *dragDestinationProcs;
|
||||
WMPixmap *dragImage;
|
||||
int helpContext;
|
||||
|
||||
XIC xic;
|
||||
|
||||
struct {
|
||||
unsigned int realized:1;
|
||||
unsigned int mapped:1;
|
||||
unsigned int parentDying:1;
|
||||
unsigned int dying:1; /* the view is being destroyed */
|
||||
unsigned int topLevel:1; /* is a top level window */
|
||||
unsigned int root:1; /* is the root window */
|
||||
unsigned int mapWhenRealized:1;/* map the view when it's realized */
|
||||
unsigned int alreadyDead:1; /* view was freed */
|
||||
unsigned int realized:1;
|
||||
unsigned int mapped:1;
|
||||
unsigned int parentDying:1;
|
||||
unsigned int dying:1; /* the view is being destroyed */
|
||||
unsigned int topLevel:1; /* is a top level window */
|
||||
unsigned int root:1; /* is the root window */
|
||||
unsigned int mapWhenRealized:1; /* map the view when it's realized */
|
||||
unsigned int alreadyDead:1; /* view was freed */
|
||||
|
||||
unsigned int dontCompressMotion:1; /* motion notify event compress */
|
||||
unsigned int notifySizeChanged:1;
|
||||
unsigned int dontCompressExpose:1; /* will compress all expose
|
||||
events into one */
|
||||
/* toplevel only */
|
||||
unsigned int worksWhenModal:1;
|
||||
unsigned int pendingRelease1:1;
|
||||
unsigned int pendingRelease2:1;
|
||||
unsigned int pendingRelease3:1;
|
||||
unsigned int pendingRelease4:1;
|
||||
unsigned int pendingRelease5:1;
|
||||
unsigned int xdndHintSet:1;
|
||||
unsigned int dontCompressMotion:1; /* motion notify event compress */
|
||||
unsigned int notifySizeChanged:1;
|
||||
unsigned int dontCompressExpose:1; /* expose event compress */
|
||||
|
||||
/* toplevel only */
|
||||
unsigned int worksWhenModal:1;
|
||||
unsigned int pendingRelease1:1;
|
||||
unsigned int pendingRelease2:1;
|
||||
unsigned int pendingRelease3:1;
|
||||
unsigned int pendingRelease4:1;
|
||||
unsigned int pendingRelease5:1;
|
||||
unsigned int xdndHintSet:1;
|
||||
} flags;
|
||||
|
||||
|
||||
int refCount;
|
||||
} W_View;
|
||||
|
||||
@@ -402,7 +431,7 @@ typedef struct _WINGsConfiguration {
|
||||
char *systemFont;
|
||||
char *boldSystemFont;
|
||||
int defaultFontSize;
|
||||
Bool useMultiByte;
|
||||
Bool antialiasedText;
|
||||
char *floppyPath;
|
||||
unsigned doubleClickDelay;
|
||||
unsigned mouseWheelUp;
|
||||
@@ -421,14 +450,14 @@ extern _WINGsConfiguration WINGsConfiguration;
|
||||
|
||||
#define W_VIEW_REALIZED(view) (view)->flags.realized
|
||||
#define W_VIEW_MAPPED(view) (view)->flags.mapped
|
||||
|
||||
|
||||
#define W_VIEW_DISPLAY(view) (view)->screen->display
|
||||
#define W_VIEW_SCREEN(view) (view)->screen
|
||||
#define W_VIEW_DRAWABLE(view) (view)->window
|
||||
|
||||
|
||||
#define W_VIEW_WIDTH(view) (view)->size.width
|
||||
#define W_VIEW_HEIGHT(view) (view)->size.height
|
||||
|
||||
|
||||
|
||||
#define W_PIXEL(c) (c)->color.pixel
|
||||
|
||||
@@ -477,25 +506,25 @@ void W_ResizeView(W_View *view, unsigned int width, unsigned int height);
|
||||
void W_SetViewBackgroundColor(W_View *view, WMColor *color);
|
||||
|
||||
void W_SetViewCursor(W_View *view, Cursor cursor);
|
||||
|
||||
|
||||
void W_DrawRelief(W_Screen *scr, Drawable d, int x, int y, unsigned int width,
|
||||
unsigned int height, WMReliefType relief);
|
||||
unsigned int height, WMReliefType relief);
|
||||
|
||||
void W_DrawReliefWithGC(W_Screen *scr, Drawable d, int x, int y,
|
||||
unsigned int width, unsigned int height,
|
||||
WMReliefType relief,
|
||||
GC black, GC dark, GC light, GC white);
|
||||
unsigned int width, unsigned int height,
|
||||
WMReliefType relief,
|
||||
GC black, GC dark, GC light, GC white);
|
||||
|
||||
void W_CallDestroyHandlers(W_View *view);
|
||||
|
||||
void W_PaintTextAndImage(W_View *view, int wrap, GC textGC, W_Font *font,
|
||||
WMReliefType relief, char *text,
|
||||
WMAlignment alignment, W_Pixmap *image,
|
||||
WMImagePosition position, GC backGC, int ofs);
|
||||
void W_PaintTextAndImage(W_View *view, int wrap, WMColor *textColor,
|
||||
W_Font *font, WMReliefType relief, char *text,
|
||||
WMAlignment alignment, W_Pixmap *image,
|
||||
WMImagePosition position, WMColor *backColor, int ofs);
|
||||
|
||||
void W_PaintText(W_View *view, Drawable d, WMFont *font, int x, int y,
|
||||
int width, WMAlignment alignment, GC gc,
|
||||
int wrap, char *text, int length);
|
||||
int width, WMAlignment alignment, WMColor *color,
|
||||
int wrap, char *text, int length);
|
||||
|
||||
int W_GetTextHeight(WMFont *font, char *text, int width, int wrap);
|
||||
|
||||
@@ -512,7 +541,7 @@ void W_SetFocusOfToplevel(W_View *toplevel, W_View *view);
|
||||
W_View *W_FocusedViewOfToplevel(W_View *view);
|
||||
|
||||
void W_SetFocusOfTopLevel(W_View *toplevel, W_View *view);
|
||||
|
||||
|
||||
void W_ReleaseView(WMView *view);
|
||||
|
||||
WMView *W_RetainView(WMView *view);
|
||||
@@ -547,8 +576,63 @@ void W_CheckTimerHandlers(void);
|
||||
|
||||
Bool W_HandleInputEvents(Bool waitForInput, int inputfd);
|
||||
|
||||
/* XDnD */
|
||||
Atom W_OperationToAction(WMScreen *scr, WMDragOperationType operation);
|
||||
|
||||
WMDragOperationType W_ActionToOperation(WMScreen *scr, Atom action);
|
||||
|
||||
void W_FreeDragOperationItem(void* item);
|
||||
|
||||
Bool W_SendDnDClientMessage(Display *dpy, Window win, Atom message,
|
||||
unsigned long data1, unsigned long data2,
|
||||
unsigned long data3, unsigned long data4,
|
||||
unsigned long data5);
|
||||
|
||||
void W_DragSourceStartTimer(WMDraggingInfo *info);
|
||||
|
||||
void W_DragSourceStopTimer();
|
||||
|
||||
void W_DragSourceStateHandler(WMDraggingInfo *info, XClientMessageEvent *event);
|
||||
|
||||
void W_DragDestinationStartTimer(WMDraggingInfo *info);
|
||||
|
||||
void W_DragDestinationStopTimer();
|
||||
|
||||
void W_DragDestinationStoreEnterMsgInfo(WMDraggingInfo *info, WMView *toplevel,
|
||||
XClientMessageEvent *event);
|
||||
|
||||
void W_DragDestinationStorePositionMsgInfo(WMDraggingInfo *info,
|
||||
WMView *toplevel,
|
||||
XClientMessageEvent *event);
|
||||
|
||||
void W_DragDestinationCancelDropOnEnter(WMView *toplevel, WMDraggingInfo *info);
|
||||
|
||||
void W_DragDestinationStateHandler(WMDraggingInfo *info,
|
||||
XClientMessageEvent *event);
|
||||
|
||||
void W_DragDestinationInfoClear(WMDraggingInfo *info);
|
||||
|
||||
void W_FreeViewXdndPart(WMView *view);
|
||||
|
||||
/* XIM */
|
||||
void W_InitIM(WMScreen *scr);
|
||||
|
||||
void W_CreateIC(WMView *view);
|
||||
|
||||
void W_DestroyIC(WMView *view);
|
||||
|
||||
void W_FocusIC(WMView *view);
|
||||
|
||||
void W_UnFocusIC(WMView *view);
|
||||
|
||||
void W_SetPreeditPositon(W_View *view, int x, int y);
|
||||
|
||||
int W_LookupString(W_View *view, XKeyPressedEvent *event, char *buffer,
|
||||
int buflen, KeySym *keysym, Status *status);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _WINGSP_H_ */
|
||||
|
||||
|
||||
@@ -19,11 +19,13 @@
|
||||
#endif
|
||||
|
||||
|
||||
#if (!defined (__GNUC__) || __GNUC__ < 2 || \
|
||||
__GNUC_MINOR__ < (defined (__cplusplus) ? 6 : 4))
|
||||
#define __ASSERT_FUNCTION ((char *) 0)
|
||||
#else
|
||||
#define __ASSERT_FUNCTION __PRETTY_FUNCTION__
|
||||
#ifndef __ASSERT_FUNCTION
|
||||
# if (!defined (__GNUC__) || (__GNUC__ < 2 && \
|
||||
__GNUC_MINOR__ < (defined (__cplusplus) ? 6 : 4)))
|
||||
# define __ASSERT_FUNCTION ((char *) 0)
|
||||
# else
|
||||
# define __ASSERT_FUNCTION __PRETTY_FUNCTION__
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -45,18 +47,18 @@
|
||||
#else /* !DEBUG */
|
||||
|
||||
#define wassertr(expr) \
|
||||
if (!(expr)) { \
|
||||
wwarning("%s line %i (%s): assertion %s failed",\
|
||||
__FILE__, __LINE__, __ASSERT_FUNCTION, #expr);\
|
||||
return;\
|
||||
}
|
||||
if (!(expr)) { \
|
||||
wwarning("%s line %i (%s): assertion %s failed",\
|
||||
__FILE__, __LINE__, __ASSERT_FUNCTION, #expr);\
|
||||
return;\
|
||||
}
|
||||
|
||||
#define wassertrv(expr, val) \
|
||||
if (!(expr)) { \
|
||||
wwarning("%s line %i (%s): assertion %s failed",\
|
||||
__FILE__, __LINE__, __ASSERT_FUNCTION, #expr);\
|
||||
return (val);\
|
||||
}
|
||||
if (!(expr)) { \
|
||||
wwarning("%s line %i (%s): assertion %s failed",\
|
||||
__FILE__, __LINE__, __ASSERT_FUNCTION, #expr);\
|
||||
return (val);\
|
||||
}
|
||||
#endif /* !DEBUG */
|
||||
|
||||
#endif /* !NDEBUG */
|
||||
@@ -69,15 +71,15 @@ extern "C" {
|
||||
|
||||
typedef enum {
|
||||
WMPostWhenIdle = 1,
|
||||
WMPostASAP = 2,
|
||||
WMPostNow = 3
|
||||
WMPostASAP = 2,
|
||||
WMPostNow = 3
|
||||
} WMPostingStyle;
|
||||
|
||||
|
||||
typedef enum {
|
||||
WNCNone = 0,
|
||||
WNCOnName = 1,
|
||||
WNCOnSender = 2
|
||||
WNCOnName = 1,
|
||||
WNCOnSender = 2
|
||||
} WMNotificationCoalescing;
|
||||
|
||||
|
||||
@@ -164,7 +166,7 @@ typedef struct {
|
||||
/* NULL does nothing */
|
||||
void* (*retainKey)(const void *);
|
||||
/* NULL does nothing */
|
||||
void (*releaseKey)(const void *);
|
||||
void (*releaseKey)(const void *);
|
||||
} WMHashTableCallbacks;
|
||||
|
||||
|
||||
@@ -184,8 +186,9 @@ typedef struct {
|
||||
typedef struct ConnectionDelegate {
|
||||
void *data;
|
||||
|
||||
void (*didCatchException)(struct ConnectionDelegate *self,
|
||||
WMConnection *cPtr);
|
||||
void (*canResumeSending)(struct ConnectionDelegate *self, WMConnection *cPtr);
|
||||
|
||||
void (*didCatchException)(struct ConnectionDelegate *self, WMConnection *cPtr);
|
||||
|
||||
void (*didDie)(struct ConnectionDelegate *self, WMConnection *cPtr);
|
||||
|
||||
@@ -198,8 +201,8 @@ typedef struct ConnectionDelegate {
|
||||
} ConnectionDelegate;
|
||||
|
||||
|
||||
typedef void WMNotificationObserverAction(void *observerData,
|
||||
WMNotification *notification);
|
||||
typedef void WMNotificationObserverAction(void *observerData,
|
||||
WMNotification *notification);
|
||||
|
||||
|
||||
|
||||
@@ -231,14 +234,18 @@ char* wexpandpath(char *path);
|
||||
char* wgethomedir();
|
||||
|
||||
void* wmalloc(size_t size);
|
||||
void* wmalloc0(size_t size);
|
||||
void* wrealloc(void *ptr, size_t newsize);
|
||||
void wfree(void *ptr);
|
||||
|
||||
#define wnew(type, count) wmalloc(sizeof(type)*count)
|
||||
#define wnew0(type, count) wmalloc0(sizeof(type)*count)
|
||||
|
||||
void wrelease(void *ptr);
|
||||
void* wretain(void *ptr);
|
||||
|
||||
char* wstrdup(char *str);
|
||||
char* wstrndup(char *str, size_t len);
|
||||
|
||||
/* Concatenate str1 with str2 and return that in a newly malloc'ed string.
|
||||
* str1 and str2 can be any strings including static and constant strings.
|
||||
@@ -281,7 +288,7 @@ void wusleep(unsigned int microsec);
|
||||
|
||||
#if 0
|
||||
int wsprintesc(char *buffer, int length, char *format, WMSEscapes **escapes,
|
||||
int count);
|
||||
int count);
|
||||
#endif
|
||||
|
||||
/*......................................................................*/
|
||||
@@ -289,7 +296,7 @@ int wsprintesc(char *buffer, int length, char *format, WMSEscapes **escapes,
|
||||
/* Event handlers: timer, idle, input */
|
||||
|
||||
WMHandlerID WMAddTimerHandler(int milliseconds, WMCallback *callback,
|
||||
void *cdata);
|
||||
void *cdata);
|
||||
|
||||
WMHandlerID WMAddPersistentTimerHandler(int milliseconds, WMCallback *callback,
|
||||
void *cdata);
|
||||
@@ -302,8 +309,8 @@ WMHandlerID WMAddIdleHandler(WMCallback *callback, void *cdata);
|
||||
|
||||
void WMDeleteIdleHandler(WMHandlerID handlerID);
|
||||
|
||||
WMHandlerID WMAddInputHandler(int fd, int condition, WMInputProc *proc,
|
||||
void *clientData);
|
||||
WMHandlerID WMAddInputHandler(int fd, int condition, WMInputProc *proc,
|
||||
void *clientData);
|
||||
|
||||
void WMDeleteInputHandler(WMHandlerID handlerID);
|
||||
|
||||
@@ -369,7 +376,7 @@ extern const WMHashTableCallbacks WMIntHashCallbacks;
|
||||
/* sizeof(keys) are <= sizeof(void*) */
|
||||
|
||||
extern const WMHashTableCallbacks WMStringHashCallbacks;
|
||||
/* keys are strings. Strings will be copied with wstrdup()
|
||||
/* keys are strings. Strings will be copied with wstrdup()
|
||||
* and freed with wfree() */
|
||||
|
||||
extern const WMHashTableCallbacks WMStringPointerHashCallbacks;
|
||||
@@ -388,7 +395,7 @@ extern const WMHashTableCallbacks WMStringPointerHashCallbacks;
|
||||
* Fast [O(1)] push/pop
|
||||
*
|
||||
* Cons:
|
||||
* A little slower [O(n)] for insertion/deletion of elements that
|
||||
* A little slower [O(n)] for insertion/deletion of elements that
|
||||
* aren't in the end
|
||||
*/
|
||||
|
||||
@@ -471,23 +478,23 @@ void* WMArrayPrevious(WMArray *array, WMArrayIterator *iter);
|
||||
|
||||
/* The following 2 macros assume that the array doesn't change in the for loop */
|
||||
#define WM_ITERATE_ARRAY(array, var, i) \
|
||||
for (var = WMArrayFirst(array, &(i)); (i) != WANotFound; \
|
||||
var = WMArrayNext(array, &(i)))
|
||||
for (var = WMArrayFirst(array, &(i)); (i) != WANotFound; \
|
||||
var = WMArrayNext(array, &(i)))
|
||||
|
||||
#define WM_ETARETI_ARRAY(array, var, i) \
|
||||
for (var = WMArrayLast(array, &(i)); (i) != WANotFound; \
|
||||
var = WMArrayPrevious(array, &(i)))
|
||||
for (var = WMArrayLast(array, &(i)); (i) != WANotFound; \
|
||||
var = WMArrayPrevious(array, &(i)))
|
||||
|
||||
/*..........................................................................*/
|
||||
|
||||
/*
|
||||
* Tree bags use a red-black tree for storage.
|
||||
* Item indexes may be any integer number.
|
||||
*
|
||||
*
|
||||
* Pros:
|
||||
* O(lg n) insertion/deletion/search
|
||||
* Good for large numbers of elements with sparse indexes
|
||||
*
|
||||
*
|
||||
* Cons:
|
||||
* O(lg n) insertion/deletion/search
|
||||
* Slow for storing small numbers of elements
|
||||
@@ -561,12 +568,12 @@ int WMBagIndexForIterator(WMBag *bag, WMBagIterator ptr);
|
||||
|
||||
/* The following 2 macros assume that the bag doesn't change in the for loop */
|
||||
#define WM_ITERATE_BAG(bag, var, i) \
|
||||
for (var = WMBagFirst(bag, &(i)); (i) != NULL; \
|
||||
var = WMBagNext(bag, &(i)))
|
||||
for (var = WMBagFirst(bag, &(i)); (i) != NULL; \
|
||||
var = WMBagNext(bag, &(i)))
|
||||
|
||||
#define WM_ETARETI_BAG(bag, var, i) \
|
||||
for (var = WMBagLast(bag, &(i)); (i) != NULL; \
|
||||
var = WMBagPrevious(bag, &(i)))
|
||||
for (var = WMBagLast(bag, &(i)); (i) != NULL; \
|
||||
var = WMBagPrevious(bag, &(i)))
|
||||
|
||||
|
||||
|
||||
@@ -699,15 +706,15 @@ void* WMGetNotificationObject(WMNotification *notification);
|
||||
const char* WMGetNotificationName(WMNotification *notification);
|
||||
|
||||
|
||||
void WMAddNotificationObserver(WMNotificationObserverAction *observerAction,
|
||||
void *observer, const char *name, void *object);
|
||||
void WMAddNotificationObserver(WMNotificationObserverAction *observerAction,
|
||||
void *observer, const char *name, void *object);
|
||||
|
||||
void WMPostNotification(WMNotification *notification);
|
||||
|
||||
void WMRemoveNotificationObserver(void *observer);
|
||||
|
||||
void WMRemoveNotificationObserverWithName(void *observer, const char *name,
|
||||
void *object);
|
||||
void WMRemoveNotificationObserverWithName(void *observer, const char *name,
|
||||
void *object);
|
||||
|
||||
void WMPostNotificationName(const char *name, void *object, void *clientData);
|
||||
|
||||
@@ -715,18 +722,18 @@ WMNotificationQueue* WMGetDefaultNotificationQueue(void);
|
||||
|
||||
WMNotificationQueue* WMCreateNotificationQueue(void);
|
||||
|
||||
void WMDequeueNotificationMatching(WMNotificationQueue *queue,
|
||||
WMNotification *notification,
|
||||
unsigned mask);
|
||||
void WMDequeueNotificationMatching(WMNotificationQueue *queue,
|
||||
WMNotification *notification,
|
||||
unsigned mask);
|
||||
|
||||
void WMEnqueueNotification(WMNotificationQueue *queue,
|
||||
WMNotification *notification,
|
||||
WMPostingStyle postingStyle);
|
||||
WMNotification *notification,
|
||||
WMPostingStyle postingStyle);
|
||||
|
||||
void WMEnqueueCoalesceNotification(WMNotificationQueue *queue,
|
||||
WMNotification *notification,
|
||||
WMPostingStyle postingStyle,
|
||||
unsigned coalesceMask);
|
||||
void WMEnqueueCoalesceNotification(WMNotificationQueue *queue,
|
||||
WMNotification *notification,
|
||||
WMPostingStyle postingStyle,
|
||||
unsigned coalesceMask);
|
||||
|
||||
|
||||
/*......................................................................*/
|
||||
@@ -851,7 +858,7 @@ WMPropList* WMGetUDKeys(WMUserDefaults *database);
|
||||
WMPropList* WMGetUDObjectForKey(WMUserDefaults *database, char *defaultName);
|
||||
|
||||
void WMSetUDObjectForKey(WMUserDefaults *database, WMPropList *object,
|
||||
char *defaultName);
|
||||
char *defaultName);
|
||||
|
||||
void WMRemoveUDObjectForKey(WMUserDefaults *database, char *defaultName);
|
||||
|
||||
@@ -863,17 +870,17 @@ float WMGetUDFloatForKey(WMUserDefaults *database, char *defaultName);
|
||||
|
||||
Bool WMGetUDBoolForKey(WMUserDefaults *database, char *defaultName);
|
||||
|
||||
void WMSetUDStringForKey(WMUserDefaults *database, char *value,
|
||||
char *defaultName);
|
||||
void WMSetUDStringForKey(WMUserDefaults *database, char *value,
|
||||
char *defaultName);
|
||||
|
||||
void WMSetUDIntegerForKey(WMUserDefaults *database, int value,
|
||||
char *defaultName);
|
||||
void WMSetUDIntegerForKey(WMUserDefaults *database, int value,
|
||||
char *defaultName);
|
||||
|
||||
void WMSetUDFloatForKey(WMUserDefaults *database, float value,
|
||||
char *defaultName);
|
||||
void WMSetUDFloatForKey(WMUserDefaults *database, float value,
|
||||
char *defaultName);
|
||||
|
||||
void WMSetUDBoolForKey(WMUserDefaults *database, Bool value,
|
||||
char *defaultName);
|
||||
char *defaultName);
|
||||
|
||||
WMPropList* WMGetUDSearchList(WMUserDefaults *database);
|
||||
|
||||
@@ -977,6 +984,8 @@ Bool WMSetConnectionNonBlocking(WMConnection *cPtr, Bool flag);
|
||||
|
||||
Bool WMSetConnectionCloseOnExec(WMConnection *cPtr, Bool flag);
|
||||
|
||||
void WMSetConnectionShutdownOnClose(WMConnection *cPtr, Bool flag);
|
||||
|
||||
void* WMGetConnectionClientData(WMConnection *cPtr);
|
||||
|
||||
void WMSetConnectionClientData(WMConnection *cPtr, void *data);
|
||||
|
||||
436
WINGs/array.c
436
WINGs/array.c
@@ -1,366 +1,314 @@
|
||||
/*
|
||||
* Dynamically Resized Array
|
||||
*
|
||||
* Authors: Alfredo K. Kojima <kojima@windowmaker.org>
|
||||
* Dan Pascu <dan@windowmaker.org>
|
||||
* Authors: Alfredo K. Kojima <kojima@windowmaker.info>
|
||||
* Dan Pascu <dan@windowmaker.info>
|
||||
*
|
||||
* This code is released to the Public Domain, but
|
||||
* proper credit is always appreciated :)
|
||||
*/
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "WUtil.h"
|
||||
|
||||
|
||||
#define INITIAL_SIZE 8
|
||||
#define RESIZE_INCREMENT 8
|
||||
|
||||
|
||||
typedef struct W_Array {
|
||||
void **items; /* the array data */
|
||||
int itemCount; /* # of items in array */
|
||||
int allocSize; /* allocated size of array */
|
||||
WMFreeDataProc *destructor; /* the destructor to free elements */
|
||||
void **items; /* the array data */
|
||||
int itemCount; /* # of items in array */
|
||||
int allocSize; /* allocated size of array */
|
||||
WMFreeDataProc *destructor; /* the destructor to free elements */
|
||||
} W_Array;
|
||||
|
||||
|
||||
WMArray*
|
||||
WMCreateArray(int initialSize)
|
||||
WMArray *WMCreateArray(int initialSize)
|
||||
{
|
||||
return WMCreateArrayWithDestructor(initialSize, NULL);
|
||||
return WMCreateArrayWithDestructor(initialSize, NULL);
|
||||
}
|
||||
|
||||
|
||||
WMArray*
|
||||
WMCreateArrayWithDestructor(int initialSize, WMFreeDataProc *destructor)
|
||||
WMArray *WMCreateArrayWithDestructor(int initialSize, WMFreeDataProc * destructor)
|
||||
{
|
||||
WMArray *array;
|
||||
WMArray *array;
|
||||
|
||||
array = wmalloc(sizeof(WMArray));
|
||||
array = wmalloc(sizeof(WMArray));
|
||||
|
||||
if (initialSize <= 0) {
|
||||
initialSize = INITIAL_SIZE;
|
||||
}
|
||||
if (initialSize <= 0) {
|
||||
initialSize = INITIAL_SIZE;
|
||||
}
|
||||
|
||||
array->items = wmalloc(sizeof(void*) * initialSize);
|
||||
array->items = wmalloc(sizeof(void *) * initialSize);
|
||||
|
||||
array->itemCount = 0;
|
||||
array->allocSize = initialSize;
|
||||
array->destructor = destructor;
|
||||
array->itemCount = 0;
|
||||
array->allocSize = initialSize;
|
||||
array->destructor = destructor;
|
||||
|
||||
return array;
|
||||
return array;
|
||||
}
|
||||
|
||||
|
||||
WMArray*
|
||||
WMCreateArrayWithArray(WMArray *array)
|
||||
WMArray *WMCreateArrayWithArray(WMArray * array)
|
||||
{
|
||||
WMArray *newArray;
|
||||
WMArray *newArray;
|
||||
|
||||
newArray = wmalloc(sizeof(WMArray));
|
||||
newArray = wmalloc(sizeof(WMArray));
|
||||
|
||||
newArray->items = wmalloc(sizeof(void*) * array->allocSize);
|
||||
memcpy(newArray->items, array->items, sizeof(void*)*array->itemCount);
|
||||
newArray->items = wmalloc(sizeof(void *) * array->allocSize);
|
||||
memcpy(newArray->items, array->items, sizeof(void *) * array->itemCount);
|
||||
|
||||
newArray->itemCount = array->itemCount;
|
||||
newArray->allocSize = array->allocSize;
|
||||
newArray->destructor = NULL;
|
||||
newArray->itemCount = array->itemCount;
|
||||
newArray->allocSize = array->allocSize;
|
||||
newArray->destructor = NULL;
|
||||
|
||||
return newArray;
|
||||
return newArray;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WMEmptyArray(WMArray *array)
|
||||
void WMEmptyArray(WMArray * array)
|
||||
{
|
||||
if (array->destructor) {
|
||||
while (array->itemCount > 0) {
|
||||
array->itemCount--;
|
||||
array->destructor(array->items[array->itemCount]);
|
||||
}
|
||||
}
|
||||
/*memset(array->items, 0, array->itemCount * sizeof(void*));*/
|
||||
array->itemCount = 0;
|
||||
if (array->destructor) {
|
||||
while (array->itemCount > 0) {
|
||||
array->itemCount--;
|
||||
array->destructor(array->items[array->itemCount]);
|
||||
}
|
||||
}
|
||||
/*memset(array->items, 0, array->itemCount * sizeof(void*)); */
|
||||
array->itemCount = 0;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WMFreeArray(WMArray *array)
|
||||
void WMFreeArray(WMArray * array)
|
||||
{
|
||||
WMEmptyArray(array);
|
||||
wfree(array->items);
|
||||
wfree(array);
|
||||
WMEmptyArray(array);
|
||||
wfree(array->items);
|
||||
wfree(array);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
WMGetArrayItemCount(WMArray *array)
|
||||
int WMGetArrayItemCount(WMArray * array)
|
||||
{
|
||||
return array->itemCount;
|
||||
return array->itemCount;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WMAppendArray(WMArray *array, WMArray *other)
|
||||
void WMAppendArray(WMArray * array, WMArray * other)
|
||||
{
|
||||
if (other->itemCount == 0)
|
||||
return;
|
||||
if (other->itemCount == 0)
|
||||
return;
|
||||
|
||||
if (array->itemCount + other->itemCount > array->allocSize) {
|
||||
array->allocSize += other->allocSize;
|
||||
array->items = wrealloc(array->items, sizeof(void*)*array->allocSize);
|
||||
}
|
||||
if (array->itemCount + other->itemCount > array->allocSize) {
|
||||
array->allocSize += other->allocSize;
|
||||
array->items = wrealloc(array->items, sizeof(void *) * array->allocSize);
|
||||
}
|
||||
|
||||
memcpy(array->items+array->itemCount, other->items,
|
||||
sizeof(void*)*other->itemCount);
|
||||
array->itemCount += other->itemCount;
|
||||
memcpy(array->items + array->itemCount, other->items, sizeof(void *) * other->itemCount);
|
||||
array->itemCount += other->itemCount;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WMAddToArray(WMArray *array, void *item)
|
||||
void WMAddToArray(WMArray * array, void *item)
|
||||
{
|
||||
if (array->itemCount >= array->allocSize) {
|
||||
array->allocSize += RESIZE_INCREMENT;
|
||||
array->items = wrealloc(array->items, sizeof(void*)*array->allocSize);
|
||||
}
|
||||
array->items[array->itemCount] = item;
|
||||
if (array->itemCount >= array->allocSize) {
|
||||
array->allocSize += RESIZE_INCREMENT;
|
||||
array->items = wrealloc(array->items, sizeof(void *) * array->allocSize);
|
||||
}
|
||||
array->items[array->itemCount] = item;
|
||||
|
||||
array->itemCount++;
|
||||
array->itemCount++;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WMInsertInArray(WMArray *array, int index, void *item)
|
||||
void WMInsertInArray(WMArray * array, int index, void *item)
|
||||
{
|
||||
wassertr(index >= 0 && index <= array->itemCount);
|
||||
wassertr(index >= 0 && index <= array->itemCount);
|
||||
|
||||
if (array->itemCount >= array->allocSize) {
|
||||
array->allocSize += RESIZE_INCREMENT;
|
||||
array->items = wrealloc(array->items, sizeof(void*)*array->allocSize);
|
||||
}
|
||||
if (index < array->itemCount) {
|
||||
memmove(array->items+index+1, array->items+index,
|
||||
sizeof(void*)*(array->itemCount-index));
|
||||
}
|
||||
array->items[index] = item;
|
||||
if (array->itemCount >= array->allocSize) {
|
||||
array->allocSize += RESIZE_INCREMENT;
|
||||
array->items = wrealloc(array->items, sizeof(void *) * array->allocSize);
|
||||
}
|
||||
if (index < array->itemCount) {
|
||||
memmove(array->items + index + 1, array->items + index,
|
||||
sizeof(void *) * (array->itemCount - index));
|
||||
}
|
||||
array->items[index] = item;
|
||||
|
||||
array->itemCount++;
|
||||
array->itemCount++;
|
||||
}
|
||||
|
||||
|
||||
void*
|
||||
WMReplaceInArray(WMArray *array, int index, void *item)
|
||||
void *WMReplaceInArray(WMArray * array, int index, void *item)
|
||||
{
|
||||
void *old;
|
||||
void *old;
|
||||
|
||||
wassertrv(index >= 0 && index <= array->itemCount, NULL);
|
||||
wassertrv(index >= 0 && index <= array->itemCount, NULL);
|
||||
|
||||
/* is it really useful to perform append if index == array->itemCount ? -Dan */
|
||||
if (index == array->itemCount) {
|
||||
WMAddToArray(array, item);
|
||||
return NULL;
|
||||
}
|
||||
/* is it really useful to perform append if index == array->itemCount ? -Dan */
|
||||
if (index == array->itemCount) {
|
||||
WMAddToArray(array, item);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
old = array->items[index];
|
||||
array->items[index] = item;
|
||||
old = array->items[index];
|
||||
array->items[index] = item;
|
||||
|
||||
return old;
|
||||
return old;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
WMDeleteFromArray(WMArray *array, int index)
|
||||
int WMDeleteFromArray(WMArray * array, int index)
|
||||
{
|
||||
wassertrv(index >= 0 && index < array->itemCount, 0);
|
||||
wassertrv(index >= 0 && index < array->itemCount, 0);
|
||||
|
||||
if (array->destructor) {
|
||||
array->destructor(array->items[index]);
|
||||
}
|
||||
if (array->destructor) {
|
||||
array->destructor(array->items[index]);
|
||||
}
|
||||
|
||||
if (index < array->itemCount-1) {
|
||||
memmove(array->items+index, array->items+index+1,
|
||||
sizeof(void*)*(array->itemCount-index-1));
|
||||
}
|
||||
if (index < array->itemCount - 1) {
|
||||
memmove(array->items + index, array->items + index + 1,
|
||||
sizeof(void *) * (array->itemCount - index - 1));
|
||||
}
|
||||
|
||||
array->itemCount--;
|
||||
array->itemCount--;
|
||||
|
||||
return 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
WMRemoveFromArrayMatching(WMArray *array, WMMatchDataProc *match, void *cdata)
|
||||
int WMRemoveFromArrayMatching(WMArray * array, WMMatchDataProc * match, void *cdata)
|
||||
{
|
||||
int i;
|
||||
int i;
|
||||
|
||||
if (match != NULL) {
|
||||
for (i = 0; i < array->itemCount; i++) {
|
||||
if ((*match)(array->items[i], cdata)) {
|
||||
WMDeleteFromArray(array, i);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < array->itemCount; i++) {
|
||||
if (array->items[i] == cdata) {
|
||||
WMDeleteFromArray(array, i);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (match != NULL) {
|
||||
for (i = 0; i < array->itemCount; i++) {
|
||||
if ((*match) (array->items[i], cdata)) {
|
||||
WMDeleteFromArray(array, i);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < array->itemCount; i++) {
|
||||
if (array->items[i] == cdata) {
|
||||
WMDeleteFromArray(array, i);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void*
|
||||
WMGetFromArray(WMArray *array, int index)
|
||||
void *WMGetFromArray(WMArray * array, int index)
|
||||
{
|
||||
if (index < 0 || index >= array->itemCount)
|
||||
return NULL;
|
||||
if (index < 0 || index >= array->itemCount)
|
||||
return NULL;
|
||||
|
||||
return array->items[index];
|
||||
return array->items[index];
|
||||
}
|
||||
|
||||
|
||||
void*
|
||||
WMPopFromArray(WMArray *array)
|
||||
void *WMPopFromArray(WMArray * array)
|
||||
{
|
||||
array->itemCount--;
|
||||
array->itemCount--;
|
||||
|
||||
return array->items[array->itemCount];
|
||||
return array->items[array->itemCount];
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
WMFindInArray(WMArray *array, WMMatchDataProc *match, void *cdata)
|
||||
int WMFindInArray(WMArray * array, WMMatchDataProc * match, void *cdata)
|
||||
{
|
||||
int i;
|
||||
int i;
|
||||
|
||||
if (match!=NULL) {
|
||||
for (i = 0; i < array->itemCount; i++) {
|
||||
if ((*match)(array->items[i], cdata))
|
||||
return i;
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < array->itemCount; i++) {
|
||||
if (array->items[i] == cdata)
|
||||
return i;
|
||||
}
|
||||
}
|
||||
if (match != NULL) {
|
||||
for (i = 0; i < array->itemCount; i++) {
|
||||
if ((*match) (array->items[i], cdata))
|
||||
return i;
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < array->itemCount; i++) {
|
||||
if (array->items[i] == cdata)
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
return WANotFound;
|
||||
return WANotFound;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
WMCountInArray(WMArray *array, void *item)
|
||||
int WMCountInArray(WMArray * array, void *item)
|
||||
{
|
||||
int i, count;
|
||||
int i, count;
|
||||
|
||||
for (i=0, count=0; i<array->itemCount; i++) {
|
||||
if (array->items[i] == item)
|
||||
count++;
|
||||
}
|
||||
for (i = 0, count = 0; i < array->itemCount; i++) {
|
||||
if (array->items[i] == item)
|
||||
count++;
|
||||
}
|
||||
|
||||
return count;
|
||||
return count;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WMSortArray(WMArray *array, WMCompareDataProc *comparer)
|
||||
void WMSortArray(WMArray * array, WMCompareDataProc * comparer)
|
||||
{
|
||||
qsort(array->items, array->itemCount, sizeof(void*), comparer);
|
||||
if (array->itemCount > 1) { /* Don't sort empty or single element arrays */
|
||||
qsort(array->items, array->itemCount, sizeof(void *), comparer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WMMapArray(WMArray *array, void (*function)(void*, void*), void *data)
|
||||
void WMMapArray(WMArray * array, void (*function) (void *, void *), void *data)
|
||||
{
|
||||
int i;
|
||||
int i;
|
||||
|
||||
for (i=0; i<array->itemCount; i++) {
|
||||
(*function)(array->items[i], data);
|
||||
}
|
||||
for (i = 0; i < array->itemCount; i++) {
|
||||
(*function) (array->items[i], data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
WMArray*
|
||||
WMGetSubarrayWithRange(WMArray* array, WMRange aRange)
|
||||
WMArray *WMGetSubarrayWithRange(WMArray * array, WMRange aRange)
|
||||
{
|
||||
WMArray *newArray;
|
||||
WMArray *newArray;
|
||||
|
||||
if (aRange.count <= 0)
|
||||
return WMCreateArray(0);
|
||||
if (aRange.count <= 0)
|
||||
return WMCreateArray(0);
|
||||
|
||||
if (aRange.position < 0)
|
||||
aRange.position = 0;
|
||||
if (aRange.position >= array->itemCount)
|
||||
aRange.position = array->itemCount - 1;
|
||||
if (aRange.position + aRange.count > array->itemCount)
|
||||
aRange.count = array->itemCount - aRange.position;
|
||||
if (aRange.position < 0)
|
||||
aRange.position = 0;
|
||||
if (aRange.position >= array->itemCount)
|
||||
aRange.position = array->itemCount - 1;
|
||||
if (aRange.position + aRange.count > array->itemCount)
|
||||
aRange.count = array->itemCount - aRange.position;
|
||||
|
||||
newArray = WMCreateArray(aRange.count);
|
||||
memcpy(newArray->items, array->items+aRange.position,
|
||||
sizeof(void*)*aRange.count);
|
||||
newArray->itemCount = aRange.count;
|
||||
newArray = WMCreateArray(aRange.count);
|
||||
memcpy(newArray->items, array->items + aRange.position, sizeof(void *) * aRange.count);
|
||||
newArray->itemCount = aRange.count;
|
||||
|
||||
return newArray;
|
||||
return newArray;
|
||||
}
|
||||
|
||||
|
||||
void*
|
||||
WMArrayFirst(WMArray *array, WMArrayIterator *iter)
|
||||
void *WMArrayFirst(WMArray * array, WMArrayIterator * iter)
|
||||
{
|
||||
if (array->itemCount == 0) {
|
||||
*iter = WANotFound;
|
||||
return NULL;
|
||||
} else {
|
||||
*iter = 0;
|
||||
return array->items[0];
|
||||
}
|
||||
if (array->itemCount == 0) {
|
||||
*iter = WANotFound;
|
||||
return NULL;
|
||||
} else {
|
||||
*iter = 0;
|
||||
return array->items[0];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void*
|
||||
WMArrayLast(WMArray *array, WMArrayIterator *iter)
|
||||
void *WMArrayLast(WMArray * array, WMArrayIterator * iter)
|
||||
{
|
||||
if (array->itemCount == 0) {
|
||||
*iter = WANotFound;
|
||||
return NULL;
|
||||
} else {
|
||||
*iter = array->itemCount-1;
|
||||
return array->items[*iter];
|
||||
}
|
||||
if (array->itemCount == 0) {
|
||||
*iter = WANotFound;
|
||||
return NULL;
|
||||
} else {
|
||||
*iter = array->itemCount - 1;
|
||||
return array->items[*iter];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void*
|
||||
WMArrayNext(WMArray *array, WMArrayIterator *iter)
|
||||
void *WMArrayNext(WMArray * array, WMArrayIterator * iter)
|
||||
{
|
||||
if (*iter >= 0 && *iter < array->itemCount-1) {
|
||||
return array->items[++(*iter)];
|
||||
} else {
|
||||
*iter = WANotFound;
|
||||
return NULL;
|
||||
}
|
||||
if (*iter >= 0 && *iter < array->itemCount - 1) {
|
||||
return array->items[++(*iter)];
|
||||
} else {
|
||||
*iter = WANotFound;
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void*
|
||||
WMArrayPrevious(WMArray *array, WMArrayIterator *iter)
|
||||
void *WMArrayPrevious(WMArray * array, WMArrayIterator * iter)
|
||||
{
|
||||
if (*iter > 0 && *iter < array->itemCount) {
|
||||
return array->items[--(*iter)];
|
||||
} else {
|
||||
*iter = WANotFound;
|
||||
return NULL;
|
||||
}
|
||||
if (*iter > 0 && *iter < array->itemCount) {
|
||||
return array->items[--(*iter)];
|
||||
} else {
|
||||
*iter = WANotFound;
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
1118
WINGs/bagtree.c
1118
WINGs/bagtree.c
File diff suppressed because it is too large
Load Diff
@@ -1,141 +1,107 @@
|
||||
|
||||
|
||||
#include "WINGsP.h"
|
||||
#include "wconfig.h"
|
||||
|
||||
#include <X11/Xlocale.h>
|
||||
|
||||
|
||||
_WINGsConfiguration WINGsConfiguration;
|
||||
|
||||
|
||||
|
||||
#define SYSTEM_FONT "-*-helvetica-medium-r-normal-*-%d-*-*-*-*-*-*-*,-*-*-medium-r-*-*-%d-*-*-*-*-*-*-*"
|
||||
|
||||
#define BOLD_SYSTEM_FONT "-*-helvetica-bold-r-normal-*-%d-*-*-*-*-*-*-*,-*-*-bold-r-*-*-%d-*-*-*-*-*-*-*"
|
||||
#define SYSTEM_FONT "Trebuchet MS,Luxi Sans"
|
||||
#define BOLD_SYSTEM_FONT "Trebuchet MS,Luxi Sans:bold"
|
||||
#define DEFAULT_FONT_SIZE 12
|
||||
|
||||
#define FLOPPY_PATH "/floppy"
|
||||
|
||||
|
||||
static unsigned
|
||||
getButtonWithName(const char *name, unsigned defaultButton)
|
||||
static unsigned getButtonWithName(const char *name, unsigned defaultButton)
|
||||
{
|
||||
if (strncmp(name, "Button", 6)==0 && strlen(name)==7) {
|
||||
switch (name[6]) {
|
||||
case '1':
|
||||
return Button1;
|
||||
case '2':
|
||||
return Button2;
|
||||
case '3':
|
||||
return Button3;
|
||||
case '4':
|
||||
return Button4;
|
||||
case '5':
|
||||
return Button5;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return defaultButton;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
W_ReadConfigurations(void)
|
||||
{
|
||||
WMUserDefaults *defaults;
|
||||
|
||||
memset(&WINGsConfiguration, 0, sizeof(_WINGsConfiguration));
|
||||
|
||||
defaults = WMGetStandardUserDefaults();
|
||||
|
||||
if (defaults) {
|
||||
char *buttonName;
|
||||
unsigned button;
|
||||
char *str;
|
||||
|
||||
WINGsConfiguration.systemFont =
|
||||
WMGetUDStringForKey(defaults, "SystemFont");
|
||||
|
||||
WINGsConfiguration.boldSystemFont =
|
||||
WMGetUDStringForKey(defaults, "BoldSystemFont");
|
||||
|
||||
WINGsConfiguration.useMultiByte = False;
|
||||
str = WMGetUDStringForKey(defaults, "MultiByteText");
|
||||
if (str) {
|
||||
if (strcasecmp(str, "YES") == 0) {
|
||||
WINGsConfiguration.useMultiByte = True;
|
||||
} else if (strcasecmp(str, "AUTO") == 0) {
|
||||
char *locale;
|
||||
|
||||
/* if it's a multibyte language (japanese, chinese or korean)
|
||||
* then set it to True */
|
||||
locale = setlocale(LC_CTYPE, NULL);
|
||||
if (locale != NULL
|
||||
&& (strncmp(locale, "ja", 2) == 0
|
||||
|| strncmp(locale, "zh", 2) == 0
|
||||
|| strncmp(locale, "ko", 2) == 0)) {
|
||||
|
||||
WINGsConfiguration.useMultiByte = True;
|
||||
if (strncmp(name, "Button", 6) == 0 && strlen(name) == 7) {
|
||||
switch (name[6]) {
|
||||
case '1':
|
||||
return Button1;
|
||||
case '2':
|
||||
return Button2;
|
||||
case '3':
|
||||
return Button3;
|
||||
case '4':
|
||||
return Button4;
|
||||
case '5':
|
||||
return Button5;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
WINGsConfiguration.doubleClickDelay =
|
||||
WMGetUDIntegerForKey(defaults, "DoubleClickTime");
|
||||
|
||||
WINGsConfiguration.floppyPath =
|
||||
WMGetUDStringForKey(defaults, "FloppyPath");
|
||||
|
||||
buttonName = WMGetUDStringForKey(defaults, "MouseWheelUp");
|
||||
if (buttonName) {
|
||||
button = getButtonWithName(buttonName, Button4);
|
||||
wfree(buttonName);
|
||||
} else {
|
||||
button = Button4;
|
||||
}
|
||||
WINGsConfiguration.mouseWheelUp = button;
|
||||
|
||||
buttonName = WMGetUDStringForKey(defaults, "MouseWheelDown");
|
||||
if (buttonName) {
|
||||
button = getButtonWithName(buttonName, Button5);
|
||||
wfree(buttonName);
|
||||
} else {
|
||||
button = Button5;
|
||||
}
|
||||
WINGsConfiguration.mouseWheelDown = button;
|
||||
|
||||
if (WINGsConfiguration.mouseWheelDown==WINGsConfiguration.mouseWheelUp) {
|
||||
WINGsConfiguration.mouseWheelUp = Button4;
|
||||
WINGsConfiguration.mouseWheelDown = Button5;
|
||||
}
|
||||
|
||||
WINGsConfiguration.defaultFontSize =
|
||||
WMGetUDIntegerForKey(defaults, "DefaultFontSize");
|
||||
}
|
||||
|
||||
|
||||
if (!WINGsConfiguration.systemFont) {
|
||||
WINGsConfiguration.systemFont = SYSTEM_FONT;
|
||||
}
|
||||
if (!WINGsConfiguration.boldSystemFont) {
|
||||
WINGsConfiguration.boldSystemFont = BOLD_SYSTEM_FONT;
|
||||
}
|
||||
if (!WINGsConfiguration.floppyPath) {
|
||||
WINGsConfiguration.floppyPath = FLOPPY_PATH;
|
||||
}
|
||||
if (WINGsConfiguration.doubleClickDelay == 0) {
|
||||
WINGsConfiguration.doubleClickDelay = 250;
|
||||
}
|
||||
if (WINGsConfiguration.mouseWheelUp == 0) {
|
||||
WINGsConfiguration.mouseWheelUp = Button4;
|
||||
}
|
||||
if (WINGsConfiguration.mouseWheelDown == 0) {
|
||||
WINGsConfiguration.mouseWheelDown = Button5;
|
||||
}
|
||||
if (WINGsConfiguration.defaultFontSize == 0) {
|
||||
WINGsConfiguration.defaultFontSize = 12;
|
||||
}
|
||||
|
||||
return defaultButton;
|
||||
}
|
||||
|
||||
void W_ReadConfigurations(void)
|
||||
{
|
||||
WMUserDefaults *defaults;
|
||||
|
||||
memset(&WINGsConfiguration, 0, sizeof(_WINGsConfiguration));
|
||||
|
||||
defaults = WMGetStandardUserDefaults();
|
||||
|
||||
if (defaults) {
|
||||
char *buttonName;
|
||||
unsigned button;
|
||||
|
||||
WINGsConfiguration.systemFont = WMGetUDStringForKey(defaults, "SystemFont");
|
||||
|
||||
WINGsConfiguration.boldSystemFont = WMGetUDStringForKey(defaults, "BoldSystemFont");
|
||||
|
||||
WINGsConfiguration.antialiasedText = WMGetUDBoolForKey(defaults, "AntialiasedText");
|
||||
|
||||
WINGsConfiguration.doubleClickDelay = WMGetUDIntegerForKey(defaults, "DoubleClickTime");
|
||||
|
||||
WINGsConfiguration.floppyPath = WMGetUDStringForKey(defaults, "FloppyPath");
|
||||
|
||||
buttonName = WMGetUDStringForKey(defaults, "MouseWheelUp");
|
||||
if (buttonName) {
|
||||
button = getButtonWithName(buttonName, Button4);
|
||||
wfree(buttonName);
|
||||
} else {
|
||||
button = Button4;
|
||||
}
|
||||
WINGsConfiguration.mouseWheelUp = button;
|
||||
|
||||
buttonName = WMGetUDStringForKey(defaults, "MouseWheelDown");
|
||||
if (buttonName) {
|
||||
button = getButtonWithName(buttonName, Button5);
|
||||
wfree(buttonName);
|
||||
} else {
|
||||
button = Button5;
|
||||
}
|
||||
WINGsConfiguration.mouseWheelDown = button;
|
||||
|
||||
if (WINGsConfiguration.mouseWheelDown == WINGsConfiguration.mouseWheelUp) {
|
||||
WINGsConfiguration.mouseWheelUp = Button4;
|
||||
WINGsConfiguration.mouseWheelDown = Button5;
|
||||
}
|
||||
|
||||
WINGsConfiguration.defaultFontSize = WMGetUDIntegerForKey(defaults, "DefaultFontSize");
|
||||
}
|
||||
|
||||
if (!WINGsConfiguration.systemFont) {
|
||||
WINGsConfiguration.systemFont = SYSTEM_FONT;
|
||||
}
|
||||
if (!WINGsConfiguration.boldSystemFont) {
|
||||
WINGsConfiguration.boldSystemFont = BOLD_SYSTEM_FONT;
|
||||
}
|
||||
if (WINGsConfiguration.defaultFontSize == 0) {
|
||||
WINGsConfiguration.defaultFontSize = DEFAULT_FONT_SIZE;
|
||||
}
|
||||
if (!WINGsConfiguration.floppyPath) {
|
||||
WINGsConfiguration.floppyPath = FLOPPY_PATH;
|
||||
}
|
||||
if (WINGsConfiguration.doubleClickDelay == 0) {
|
||||
WINGsConfiguration.doubleClickDelay = 250;
|
||||
}
|
||||
if (WINGsConfiguration.mouseWheelUp == 0) {
|
||||
WINGsConfiguration.mouseWheelUp = Button4;
|
||||
}
|
||||
if (WINGsConfiguration.mouseWheelDown == 0) {
|
||||
WINGsConfiguration.mouseWheelDown = Button5;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
1308
WINGs/connection.c
1308
WINGs/connection.c
File diff suppressed because it is too large
Load Diff
377
WINGs/data.c
377
WINGs/data.c
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* WINGs WMData function library
|
||||
*
|
||||
* Copyright (c) 1999-2002 Dan Pascu
|
||||
*
|
||||
*
|
||||
* Copyright (c) 1999-2003 Dan Pascu
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
@@ -18,333 +18,272 @@
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include <string.h>
|
||||
#include "WUtil.h"
|
||||
|
||||
|
||||
typedef struct W_Data {
|
||||
unsigned length; /* How many bytes we have */
|
||||
unsigned capacity; /* How many bytes it can hold */
|
||||
unsigned growth; /* How much to grow */
|
||||
void *bytes; /* Actual data */
|
||||
unsigned retainCount;
|
||||
WMFreeDataProc *destructor;
|
||||
int format; /* 0, 8, 16 or 32 */
|
||||
unsigned length; /* How many bytes we have */
|
||||
unsigned capacity; /* How many bytes it can hold */
|
||||
unsigned growth; /* How much to grow */
|
||||
void *bytes; /* Actual data */
|
||||
unsigned retainCount;
|
||||
WMFreeDataProc *destructor;
|
||||
int format; /* 0, 8, 16 or 32 */
|
||||
} W_Data;
|
||||
|
||||
|
||||
|
||||
|
||||
/* Creating and destroying data objects */
|
||||
|
||||
WMData*
|
||||
WMCreateDataWithCapacity(unsigned capacity)
|
||||
WMData *WMCreateDataWithCapacity(unsigned capacity)
|
||||
{
|
||||
WMData *aData;
|
||||
WMData *aData;
|
||||
|
||||
aData = (WMData*)wmalloc(sizeof(WMData));
|
||||
aData = (WMData *) wmalloc(sizeof(WMData));
|
||||
|
||||
if (capacity>0)
|
||||
aData->bytes = wmalloc(capacity);
|
||||
else
|
||||
aData->bytes = NULL;
|
||||
if (capacity > 0)
|
||||
aData->bytes = wmalloc(capacity);
|
||||
else
|
||||
aData->bytes = NULL;
|
||||
|
||||
aData->capacity = capacity;
|
||||
aData->growth = capacity/2 > 0 ? capacity/2 : 1;
|
||||
aData->length = 0;
|
||||
aData->retainCount = 1;
|
||||
aData->format = 0;
|
||||
aData->destructor = wfree;
|
||||
aData->capacity = capacity;
|
||||
aData->growth = capacity / 2 > 0 ? capacity / 2 : 1;
|
||||
aData->length = 0;
|
||||
aData->retainCount = 1;
|
||||
aData->format = 0;
|
||||
aData->destructor = wfree;
|
||||
|
||||
return aData;
|
||||
return aData;
|
||||
}
|
||||
|
||||
|
||||
WMData*
|
||||
WMCreateDataWithLength(unsigned length)
|
||||
WMData *WMCreateDataWithLength(unsigned length)
|
||||
{
|
||||
WMData *aData;
|
||||
WMData *aData;
|
||||
|
||||
aData = WMCreateDataWithCapacity(length);
|
||||
if (length>0) {
|
||||
memset(aData->bytes, 0, length);
|
||||
aData->length = length;
|
||||
}
|
||||
aData = WMCreateDataWithCapacity(length);
|
||||
if (length > 0) {
|
||||
memset(aData->bytes, 0, length);
|
||||
aData->length = length;
|
||||
}
|
||||
|
||||
return aData;
|
||||
return aData;
|
||||
}
|
||||
|
||||
|
||||
WMData*
|
||||
WMCreateDataWithBytes(void *bytes, unsigned length)
|
||||
WMData *WMCreateDataWithBytes(void *bytes, unsigned length)
|
||||
{
|
||||
WMData *aData;
|
||||
WMData *aData;
|
||||
|
||||
aData = WMCreateDataWithCapacity(length);
|
||||
aData->length = length;
|
||||
memcpy(aData->bytes, bytes, length);
|
||||
aData = WMCreateDataWithCapacity(length);
|
||||
aData->length = length;
|
||||
memcpy(aData->bytes, bytes, length);
|
||||
|
||||
return aData;
|
||||
return aData;
|
||||
}
|
||||
|
||||
|
||||
WMData*
|
||||
WMCreateDataWithBytesNoCopy(void *bytes, unsigned length,
|
||||
WMFreeDataProc *destructor)
|
||||
WMData *WMCreateDataWithBytesNoCopy(void *bytes, unsigned length, WMFreeDataProc * destructor)
|
||||
{
|
||||
WMData *aData;
|
||||
WMData *aData;
|
||||
|
||||
aData = (WMData*)wmalloc(sizeof(WMData));
|
||||
aData->length = length;
|
||||
aData->capacity = length;
|
||||
aData->growth = length/2 > 0 ? length/2 : 1;
|
||||
aData->bytes = bytes;
|
||||
aData->retainCount = 1;
|
||||
aData->format = 0;
|
||||
aData->destructor = destructor;
|
||||
aData = (WMData *) wmalloc(sizeof(WMData));
|
||||
aData->length = length;
|
||||
aData->capacity = length;
|
||||
aData->growth = length / 2 > 0 ? length / 2 : 1;
|
||||
aData->bytes = bytes;
|
||||
aData->retainCount = 1;
|
||||
aData->format = 0;
|
||||
aData->destructor = destructor;
|
||||
|
||||
return aData;
|
||||
return aData;
|
||||
}
|
||||
|
||||
|
||||
WMData*
|
||||
WMCreateDataWithData(WMData *aData)
|
||||
WMData *WMCreateDataWithData(WMData * aData)
|
||||
{
|
||||
WMData *newData;
|
||||
WMData *newData;
|
||||
|
||||
if (aData->length > 0) {
|
||||
newData = WMCreateDataWithBytes(aData->bytes, aData->length);
|
||||
} else {
|
||||
newData = WMCreateDataWithCapacity(0);
|
||||
}
|
||||
newData->format = aData->format;
|
||||
if (aData->length > 0) {
|
||||
newData = WMCreateDataWithBytes(aData->bytes, aData->length);
|
||||
} else {
|
||||
newData = WMCreateDataWithCapacity(0);
|
||||
}
|
||||
newData->format = aData->format;
|
||||
|
||||
return newData;
|
||||
return newData;
|
||||
}
|
||||
|
||||
|
||||
WMData*
|
||||
WMRetainData(WMData *aData)
|
||||
WMData *WMRetainData(WMData * aData)
|
||||
{
|
||||
aData->retainCount++;
|
||||
return aData;
|
||||
aData->retainCount++;
|
||||
return aData;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WMReleaseData(WMData *aData)
|
||||
void WMReleaseData(WMData * aData)
|
||||
{
|
||||
aData->retainCount--;
|
||||
if (aData->retainCount > 0)
|
||||
return;
|
||||
if (aData->bytes!=NULL && aData->destructor!=NULL) {
|
||||
aData->destructor(aData->bytes);
|
||||
}
|
||||
wfree(aData);
|
||||
aData->retainCount--;
|
||||
if (aData->retainCount > 0)
|
||||
return;
|
||||
if (aData->bytes != NULL && aData->destructor != NULL) {
|
||||
aData->destructor(aData->bytes);
|
||||
}
|
||||
wfree(aData);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Adjusting capacity */
|
||||
|
||||
void
|
||||
WMSetDataCapacity(WMData *aData, unsigned capacity)
|
||||
void WMSetDataCapacity(WMData * aData, unsigned capacity)
|
||||
{
|
||||
if (aData->capacity != capacity) {
|
||||
aData->bytes = wrealloc(aData->bytes, capacity);
|
||||
aData->capacity = capacity;
|
||||
aData->growth = capacity/2 > 0 ? capacity/2 : 1;
|
||||
}
|
||||
if (aData->length > capacity) {
|
||||
aData->length = capacity;
|
||||
}
|
||||
if (aData->capacity != capacity) {
|
||||
aData->bytes = wrealloc(aData->bytes, capacity);
|
||||
aData->capacity = capacity;
|
||||
aData->growth = capacity / 2 > 0 ? capacity / 2 : 1;
|
||||
}
|
||||
if (aData->length > capacity) {
|
||||
aData->length = capacity;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WMSetDataLength(WMData *aData, unsigned length)
|
||||
void WMSetDataLength(WMData * aData, unsigned length)
|
||||
{
|
||||
if (length > aData->capacity) {
|
||||
WMSetDataCapacity(aData, length);
|
||||
}
|
||||
if (length > aData->length) {
|
||||
memset((unsigned char*)aData->bytes + aData->length, 0,
|
||||
length - aData->length);
|
||||
}
|
||||
aData->length = length;
|
||||
if (length > aData->capacity) {
|
||||
WMSetDataCapacity(aData, length);
|
||||
}
|
||||
if (length > aData->length) {
|
||||
memset((unsigned char *)aData->bytes + aData->length, 0, length - aData->length);
|
||||
}
|
||||
aData->length = length;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WMSetDataFormat(WMData *aData, unsigned format)
|
||||
void WMSetDataFormat(WMData * aData, unsigned format)
|
||||
{
|
||||
aData->format = format;
|
||||
aData->format = format;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WMIncreaseDataLengthBy(WMData *aData, unsigned extraLength)
|
||||
void WMIncreaseDataLengthBy(WMData * aData, unsigned extraLength)
|
||||
{
|
||||
WMSetDataLength(aData, aData->length + extraLength);
|
||||
WMSetDataLength(aData, aData->length + extraLength);
|
||||
}
|
||||
|
||||
|
||||
/* Accessing data */
|
||||
|
||||
const void*
|
||||
WMDataBytes(WMData *aData)
|
||||
const void *WMDataBytes(WMData * aData)
|
||||
{
|
||||
return aData->bytes;
|
||||
return aData->bytes;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WMGetDataBytes(WMData *aData, void *buffer)
|
||||
void WMGetDataBytes(WMData * aData, void *buffer)
|
||||
{
|
||||
wassertr(aData->length > 0);
|
||||
wassertr(aData->length > 0);
|
||||
|
||||
memcpy(buffer, aData->bytes, aData->length);
|
||||
memcpy(buffer, aData->bytes, aData->length);
|
||||
}
|
||||
|
||||
|
||||
unsigned
|
||||
WMGetDataFormat(WMData *aData)
|
||||
unsigned WMGetDataFormat(WMData * aData)
|
||||
{
|
||||
return aData->format;
|
||||
return aData->format;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WMGetDataBytesWithLength(WMData *aData, void *buffer, unsigned length)
|
||||
void WMGetDataBytesWithLength(WMData * aData, void *buffer, unsigned length)
|
||||
{
|
||||
wassertr(aData->length > 0);
|
||||
wassertr(length <= aData->length);
|
||||
wassertr(aData->length > 0);
|
||||
wassertr(length <= aData->length);
|
||||
|
||||
memcpy(buffer, aData->bytes, length);
|
||||
memcpy(buffer, aData->bytes, length);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WMGetDataBytesWithRange(WMData *aData, void *buffer, WMRange aRange)
|
||||
void WMGetDataBytesWithRange(WMData * aData, void *buffer, WMRange aRange)
|
||||
{
|
||||
wassertr(aRange.position < aData->length);
|
||||
wassertr(aRange.count <= aData->length-aRange.position);
|
||||
wassertr(aRange.position < aData->length);
|
||||
wassertr(aRange.count <= aData->length - aRange.position);
|
||||
|
||||
memcpy(buffer, (unsigned char*)aData->bytes + aRange.position,
|
||||
aRange.count);
|
||||
memcpy(buffer, (unsigned char *)aData->bytes + aRange.position, aRange.count);
|
||||
}
|
||||
|
||||
|
||||
WMData*
|
||||
WMGetSubdataWithRange(WMData *aData, WMRange aRange)
|
||||
WMData *WMGetSubdataWithRange(WMData * aData, WMRange aRange)
|
||||
{
|
||||
void *buffer;
|
||||
WMData *newData;
|
||||
void *buffer;
|
||||
WMData *newData;
|
||||
|
||||
if (aRange.count <= 0)
|
||||
return WMCreateDataWithCapacity(0);
|
||||
if (aRange.count <= 0)
|
||||
return WMCreateDataWithCapacity(0);
|
||||
|
||||
buffer = wmalloc(aRange.count);
|
||||
WMGetDataBytesWithRange(aData, buffer, aRange);
|
||||
newData = WMCreateDataWithBytesNoCopy(buffer, aRange.count, wfree);
|
||||
newData->format = aData->format;
|
||||
buffer = wmalloc(aRange.count);
|
||||
WMGetDataBytesWithRange(aData, buffer, aRange);
|
||||
newData = WMCreateDataWithBytesNoCopy(buffer, aRange.count, wfree);
|
||||
newData->format = aData->format;
|
||||
|
||||
return newData;
|
||||
return newData;
|
||||
}
|
||||
|
||||
|
||||
/* Testing data */
|
||||
|
||||
Bool
|
||||
WMIsDataEqualToData(WMData *aData, WMData *anotherData)
|
||||
Bool WMIsDataEqualToData(WMData * aData, WMData * anotherData)
|
||||
{
|
||||
if (aData->length != anotherData->length)
|
||||
return False;
|
||||
else if (!aData->bytes && !anotherData->bytes) /* both are empty */
|
||||
return True;
|
||||
else if (!aData->bytes || !anotherData->bytes) /* one of them is empty */
|
||||
return False;
|
||||
return (memcmp(aData->bytes, anotherData->bytes, aData->length)==0);
|
||||
if (aData->length != anotherData->length)
|
||||
return False;
|
||||
else if (!aData->bytes && !anotherData->bytes) /* both are empty */
|
||||
return True;
|
||||
else if (!aData->bytes || !anotherData->bytes) /* one of them is empty */
|
||||
return False;
|
||||
return (memcmp(aData->bytes, anotherData->bytes, aData->length) == 0);
|
||||
}
|
||||
|
||||
|
||||
unsigned
|
||||
WMGetDataLength(WMData *aData)
|
||||
unsigned WMGetDataLength(WMData * aData)
|
||||
{
|
||||
return aData->length;
|
||||
return aData->length;
|
||||
}
|
||||
|
||||
|
||||
/* Adding data */
|
||||
void
|
||||
WMAppendDataBytes(WMData *aData, void *bytes, unsigned length)
|
||||
void WMAppendDataBytes(WMData * aData, void *bytes, unsigned length)
|
||||
{
|
||||
unsigned oldLength = aData->length;
|
||||
unsigned newLength = oldLength + length;
|
||||
unsigned oldLength = aData->length;
|
||||
unsigned newLength = oldLength + length;
|
||||
|
||||
if (newLength > aData->capacity) {
|
||||
unsigned nextCapacity = aData->capacity + aData->growth;
|
||||
unsigned nextGrowth = aData->capacity ? aData->capacity : 1;
|
||||
if (newLength > aData->capacity) {
|
||||
unsigned nextCapacity = aData->capacity + aData->growth;
|
||||
unsigned nextGrowth = aData->capacity ? aData->capacity : 1;
|
||||
|
||||
while (nextCapacity < newLength) {
|
||||
unsigned tmp = nextCapacity + nextGrowth;
|
||||
while (nextCapacity < newLength) {
|
||||
unsigned tmp = nextCapacity + nextGrowth;
|
||||
|
||||
nextGrowth = nextCapacity;
|
||||
nextCapacity = tmp;
|
||||
}
|
||||
WMSetDataCapacity(aData, nextCapacity);
|
||||
aData->growth = nextGrowth;
|
||||
}
|
||||
memcpy((unsigned char*)aData->bytes + oldLength, bytes, length);
|
||||
aData->length = newLength;
|
||||
nextGrowth = nextCapacity;
|
||||
nextCapacity = tmp;
|
||||
}
|
||||
WMSetDataCapacity(aData, nextCapacity);
|
||||
aData->growth = nextGrowth;
|
||||
}
|
||||
memcpy((unsigned char *)aData->bytes + oldLength, bytes, length);
|
||||
aData->length = newLength;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WMAppendData(WMData *aData, WMData *anotherData)
|
||||
void WMAppendData(WMData * aData, WMData * anotherData)
|
||||
{
|
||||
if (anotherData->length > 0)
|
||||
WMAppendDataBytes(aData, anotherData->bytes, anotherData->length);
|
||||
if (anotherData->length > 0)
|
||||
WMAppendDataBytes(aData, anotherData->bytes, anotherData->length);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Modifying data */
|
||||
|
||||
void
|
||||
WMReplaceDataBytesInRange(WMData *aData, WMRange aRange, void *bytes)
|
||||
void WMReplaceDataBytesInRange(WMData * aData, WMRange aRange, void *bytes)
|
||||
{
|
||||
wassertr(aRange.position < aData->length);
|
||||
wassertr(aRange.count <= aData->length-aRange.position);
|
||||
wassertr(aRange.position < aData->length);
|
||||
wassertr(aRange.count <= aData->length - aRange.position);
|
||||
|
||||
memcpy((unsigned char*)aData->bytes + aRange.position, bytes, aRange.count);
|
||||
memcpy((unsigned char *)aData->bytes + aRange.position, bytes, aRange.count);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WMResetDataBytesInRange(WMData *aData, WMRange aRange)
|
||||
void WMResetDataBytesInRange(WMData * aData, WMRange aRange)
|
||||
{
|
||||
wassertr(aRange.position < aData->length);
|
||||
wassertr(aRange.count <= aData->length-aRange.position);
|
||||
wassertr(aRange.position < aData->length);
|
||||
wassertr(aRange.count <= aData->length - aRange.position);
|
||||
|
||||
memset((unsigned char*)aData->bytes + aRange.position, 0, aRange.count);
|
||||
memset((unsigned char *)aData->bytes + aRange.position, 0, aRange.count);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WMSetData(WMData *aData, WMData *anotherData)
|
||||
void WMSetData(WMData * aData, WMData * anotherData)
|
||||
{
|
||||
unsigned length = anotherData->length;
|
||||
unsigned length = anotherData->length;
|
||||
|
||||
WMSetDataCapacity(aData, length);
|
||||
if (length > 0)
|
||||
memcpy(aData->bytes, anotherData->bytes, length);
|
||||
aData->length = length;
|
||||
WMSetDataCapacity(aData, length);
|
||||
if (length > 0)
|
||||
memcpy(aData->bytes, anotherData->bytes, length);
|
||||
aData->length = length;
|
||||
}
|
||||
|
||||
|
||||
/* Storing data */
|
||||
|
||||
|
||||
|
||||
255
WINGs/dragcommon.c
Normal file
255
WINGs/dragcommon.c
Normal file
@@ -0,0 +1,255 @@
|
||||
|
||||
#include "WINGsP.h"
|
||||
|
||||
#define XDND_SOURCE_VERSION(dragInfo) dragInfo->protocolVersion
|
||||
#define XDND_DEST_INFO(dragInfo) dragInfo->destInfo
|
||||
#define XDND_DEST_VIEW(dragInfo) dragInfo->destInfo->destView
|
||||
|
||||
static Bool _WindowExists;
|
||||
|
||||
Atom W_OperationToAction(WMScreen * scr, WMDragOperationType operation)
|
||||
{
|
||||
switch (operation) {
|
||||
case WDOperationNone:
|
||||
return None;
|
||||
|
||||
case WDOperationCopy:
|
||||
return scr->xdndActionCopy;
|
||||
|
||||
case WDOperationMove:
|
||||
return scr->xdndActionMove;
|
||||
|
||||
case WDOperationLink:
|
||||
return scr->xdndActionLink;
|
||||
|
||||
case WDOperationAsk:
|
||||
return scr->xdndActionAsk;
|
||||
|
||||
case WDOperationPrivate:
|
||||
return scr->xdndActionPrivate;
|
||||
|
||||
default:
|
||||
return None;
|
||||
}
|
||||
}
|
||||
|
||||
WMDragOperationType W_ActionToOperation(WMScreen * scr, Atom action)
|
||||
{
|
||||
if (action == scr->xdndActionCopy) {
|
||||
return WDOperationCopy;
|
||||
|
||||
} else if (action == scr->xdndActionMove) {
|
||||
return WDOperationMove;
|
||||
|
||||
} else if (action == scr->xdndActionLink) {
|
||||
return WDOperationLink;
|
||||
|
||||
} else if (action == scr->xdndActionAsk) {
|
||||
return WDOperationAsk;
|
||||
|
||||
} else if (action == scr->xdndActionPrivate) {
|
||||
return WDOperationPrivate;
|
||||
|
||||
} else if (action == None) {
|
||||
|
||||
return WDOperationNone;
|
||||
} else {
|
||||
char *tmp = XGetAtomName(scr->display, action);
|
||||
|
||||
wwarning("unknown XDND action %s ", tmp);
|
||||
XFree(tmp);
|
||||
|
||||
return WDOperationCopy;
|
||||
}
|
||||
}
|
||||
|
||||
static void freeDragOperationItem(void *item)
|
||||
{
|
||||
wfree(item);
|
||||
}
|
||||
|
||||
WMArray *WMCreateDragOperationArray(int initialSize)
|
||||
{
|
||||
return WMCreateArrayWithDestructor(initialSize, freeDragOperationItem);
|
||||
}
|
||||
|
||||
WMDragOperationItem *WMCreateDragOperationItem(WMDragOperationType type, char *text)
|
||||
{
|
||||
W_DragOperationItem *result = wmalloc(sizeof(W_DragOperationItem));
|
||||
|
||||
result->type = type;
|
||||
result->text = text;
|
||||
|
||||
return (WMDragOperationItem *) result;
|
||||
}
|
||||
|
||||
WMDragOperationType WMGetDragOperationItemType(WMDragOperationItem * item)
|
||||
{
|
||||
return ((W_DragOperationItem *) item)->type;
|
||||
}
|
||||
|
||||
char *WMGetDragOperationItemText(WMDragOperationItem * item)
|
||||
{
|
||||
return ((W_DragOperationItem *) item)->text;
|
||||
}
|
||||
|
||||
static int handleNoWindowXError(Display * dpy, XErrorEvent * errEvt)
|
||||
{
|
||||
if (errEvt->error_code == BadWindow || errEvt->error_code == BadDrawable) {
|
||||
_WindowExists = False;
|
||||
return Success;
|
||||
}
|
||||
|
||||
return errEvt->error_code;
|
||||
}
|
||||
|
||||
static Bool windowExists(Display * dpy, Window win)
|
||||
{
|
||||
void *previousErrorHandler;
|
||||
XWindowAttributes attr;
|
||||
|
||||
XSynchronize(dpy, True);
|
||||
previousErrorHandler = XSetErrorHandler(handleNoWindowXError);
|
||||
_WindowExists = True;
|
||||
|
||||
/* can generate BadDrawable or BadWindow */
|
||||
XGetWindowAttributes(dpy, win, &attr);
|
||||
|
||||
XSetErrorHandler(previousErrorHandler);
|
||||
XSynchronize(dpy, False);
|
||||
return _WindowExists;
|
||||
}
|
||||
|
||||
Bool
|
||||
W_SendDnDClientMessage(Display * dpy, Window win, Atom message,
|
||||
unsigned long data0,
|
||||
unsigned long data1, unsigned long data2, unsigned long data3, unsigned long data4)
|
||||
{
|
||||
XEvent ev;
|
||||
|
||||
#ifdef XDND_DEBUG
|
||||
char *msgName = XGetAtomName(dpy, message);
|
||||
|
||||
printf("sending message %s ... ", msgName);
|
||||
XFree(msgName);
|
||||
#endif
|
||||
|
||||
if (!windowExists(dpy, win)) {
|
||||
wwarning("xdnd message target %d does no longer exist.", win);
|
||||
return False; /* message not sent */
|
||||
}
|
||||
|
||||
ev.type = ClientMessage;
|
||||
ev.xclient.message_type = message;
|
||||
ev.xclient.format = 32;
|
||||
ev.xclient.window = win;
|
||||
ev.xclient.data.l[0] = data0;
|
||||
ev.xclient.data.l[1] = data1;
|
||||
ev.xclient.data.l[2] = data2;
|
||||
ev.xclient.data.l[3] = data3;
|
||||
ev.xclient.data.l[4] = data4;
|
||||
|
||||
XSendEvent(dpy, win, False, 0, &ev);
|
||||
XFlush(dpy);
|
||||
|
||||
#ifdef XDND_DEBUG
|
||||
printf("sent\n");
|
||||
#endif
|
||||
return True; /* message sent */
|
||||
}
|
||||
|
||||
static void handleLeaveMessage(WMDraggingInfo * info)
|
||||
{
|
||||
if (XDND_DEST_INFO(info) != NULL) {
|
||||
/* XDND_DEST_VIEW is never NULL (it's the xdnd aware view) */
|
||||
wassertr(XDND_DEST_VIEW(info) != NULL);
|
||||
if (XDND_DEST_VIEW(info)->dragDestinationProcs != NULL) {
|
||||
XDND_DEST_VIEW(info)->dragDestinationProcs->concludeDragOperation(XDND_DEST_VIEW(info));
|
||||
}
|
||||
W_DragDestinationInfoClear(info);
|
||||
}
|
||||
}
|
||||
|
||||
void W_HandleDNDClientMessage(WMView * toplevel, XClientMessageEvent * event)
|
||||
{
|
||||
WMScreen *scr = W_VIEW_SCREEN(toplevel);
|
||||
WMDraggingInfo *info = &scr->dragInfo;
|
||||
Atom messageType = event->message_type;
|
||||
|
||||
#ifdef XDND_DEBUG
|
||||
{
|
||||
char *msgTypeName = XGetAtomName(scr->display, messageType);
|
||||
|
||||
if (msgTypeName != NULL)
|
||||
printf("event type = %s\n", msgTypeName);
|
||||
else
|
||||
printf("pb with event type !\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Messages from destination to source */
|
||||
if (messageType == scr->xdndStatusAtom || messageType == scr->xdndFinishedAtom) {
|
||||
W_DragSourceStopTimer();
|
||||
W_DragSourceStateHandler(info, event);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Messages from source to destination */
|
||||
if (messageType == scr->xdndEnterAtom) {
|
||||
Bool positionSent = (XDND_DEST_INFO(info) != NULL);
|
||||
|
||||
W_DragDestinationStopTimer();
|
||||
W_DragDestinationStoreEnterMsgInfo(info, toplevel, event);
|
||||
|
||||
/* Xdnd version 3 and up are not compatible with version 1 or 2 */
|
||||
if (XDND_SOURCE_VERSION(info) > 2) {
|
||||
|
||||
if (positionSent) {
|
||||
/* xdndPosition previously received on xdnd aware view */
|
||||
W_DragDestinationStateHandler(info, event);
|
||||
return;
|
||||
} else {
|
||||
W_DragDestinationStartTimer(info);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
wwarning("received dnd enter msg with unsupported version %i", XDND_SOURCE_VERSION(info));
|
||||
W_DragDestinationCancelDropOnEnter(toplevel, info);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (messageType == scr->xdndPositionAtom) {
|
||||
W_DragDestinationStopTimer();
|
||||
W_DragDestinationStorePositionMsgInfo(info, toplevel, event);
|
||||
W_DragDestinationStateHandler(info, event);
|
||||
return;
|
||||
}
|
||||
|
||||
if (messageType == scr->xdndSelectionAtom || messageType == scr->xdndDropAtom) {
|
||||
W_DragDestinationStopTimer();
|
||||
W_DragDestinationStateHandler(info, event);
|
||||
return;
|
||||
}
|
||||
|
||||
if (messageType == scr->xdndLeaveAtom) {
|
||||
/* conclude drop operation, and clear dragging info */
|
||||
W_DragDestinationStopTimer();
|
||||
handleLeaveMessage(info);
|
||||
}
|
||||
}
|
||||
|
||||
/* called in destroyView (wview.c) */
|
||||
void W_FreeViewXdndPart(WMView * view)
|
||||
{
|
||||
WMUnregisterViewDraggedTypes(view);
|
||||
|
||||
if (view->dragSourceProcs)
|
||||
wfree(view->dragSourceProcs);
|
||||
|
||||
if (view->dragDestinationProcs)
|
||||
wfree(view->dragDestinationProcs);
|
||||
|
||||
if (view->dragImage)
|
||||
WMReleasePixmap(view->dragImage);
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
2300
WINGs/dragsource.c
2300
WINGs/dragsource.c
File diff suppressed because it is too large
Load Diff
210
WINGs/error.c
210
WINGs/error.c
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* Window Maker miscelaneous function library
|
||||
*
|
||||
* Copyright (c) 1997-2002 Alfredo K. Kojima
|
||||
*
|
||||
*
|
||||
* Copyright (c) 1997-2003 Alfredo K. Kojima
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
@@ -18,7 +18,6 @@
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
|
||||
#include "wconfig.h"
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -29,174 +28,159 @@
|
||||
|
||||
extern char *_WINGS_progname;
|
||||
|
||||
|
||||
#define MAXLINE 1024
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
* Returns the system error message associated with error code 'errnum'
|
||||
*********************************************************************/
|
||||
char*
|
||||
wstrerror(int errnum)
|
||||
char *wstrerror(int errnum)
|
||||
{
|
||||
#if defined(HAVE_STRERROR)
|
||||
return strerror(errnum);
|
||||
return strerror(errnum);
|
||||
#elif !defined(HAVE_STRERROR) && defined(BSD)
|
||||
extern int errno, sys_nerr;
|
||||
extern int errno, sys_nerr;
|
||||
# ifndef __DECC
|
||||
extern char *sys_errlist[];
|
||||
extern char *sys_errlist[];
|
||||
# endif
|
||||
static char buf[] = "Unknown error 12345678901234567890";
|
||||
static char buf[] = "Unknown error 12345678901234567890";
|
||||
|
||||
if (errno < sys_nerr)
|
||||
return sys_errlist[errnum];
|
||||
if (errno < sys_nerr)
|
||||
return sys_errlist[errnum];
|
||||
|
||||
sprintf (buf, _("Unknown error %d"), errnum);
|
||||
return buf;
|
||||
#else /* no strerror() and no sys_errlist[] */
|
||||
static char buf[] = "Error 12345678901234567890";
|
||||
snprintf(buf, sizeof(buf), _("Unknown error %d"), errnum);
|
||||
return buf;
|
||||
#else /* no strerror() and no sys_errlist[] */
|
||||
static char buf[] = "Error 12345678901234567890";
|
||||
|
||||
sprintf(buf, _("Error %d"), errnum);
|
||||
return buf;
|
||||
snprintf(buf, sizeof(buf), _("Error %d"), errnum);
|
||||
return buf;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
* Prints a message with variable arguments
|
||||
*
|
||||
*
|
||||
* msg - message to print with optional formatting
|
||||
* ... - arguments to use on formatting
|
||||
*********************************************************************/
|
||||
void
|
||||
wmessage(const char *msg, ...)
|
||||
void wmessage(const char *msg, ...)
|
||||
{
|
||||
va_list args;
|
||||
char buf[MAXLINE];
|
||||
va_list args;
|
||||
char buf[MAXLINE];
|
||||
|
||||
va_start(args, msg);
|
||||
va_start(args, msg);
|
||||
|
||||
vsnprintf(buf, MAXLINE-3, msg, args);
|
||||
strcat(buf,"\n");
|
||||
fflush(stdout);
|
||||
fputs(_WINGS_progname ? _WINGS_progname : "WINGs", stderr);
|
||||
fputs(": ",stderr);
|
||||
fputs(buf, stderr);
|
||||
fflush(stdout);
|
||||
fflush(stderr);
|
||||
vsnprintf(buf, MAXLINE - 3, msg, args);
|
||||
strcat(buf, "\n");
|
||||
fflush(stdout);
|
||||
fputs(_WINGS_progname ? _WINGS_progname : "WINGs", stderr);
|
||||
fputs(": ", stderr);
|
||||
fputs(buf, stderr);
|
||||
fflush(stdout);
|
||||
fflush(stderr);
|
||||
|
||||
va_end(args);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
* Prints a warning message with variable arguments
|
||||
*
|
||||
* Prints a warning message with variable arguments
|
||||
*
|
||||
* msg - message to print with optional formatting
|
||||
* ... - arguments to use on formatting
|
||||
*********************************************************************/
|
||||
void
|
||||
wwarning(const char *msg, ...)
|
||||
void wwarning(const char *msg, ...)
|
||||
{
|
||||
va_list args;
|
||||
char buf[MAXLINE];
|
||||
|
||||
va_start(args, msg);
|
||||
|
||||
vsnprintf(buf, MAXLINE-3, msg, args);
|
||||
strcat(buf,"\n");
|
||||
fflush(stdout);
|
||||
fputs(_WINGS_progname ? _WINGS_progname : "WINGs", stderr);
|
||||
fputs(_(" warning: "),stderr);
|
||||
fputs(buf, stderr);
|
||||
fflush(stdout);
|
||||
fflush(stderr);
|
||||
|
||||
va_end(args);
|
||||
}
|
||||
va_list args;
|
||||
char buf[MAXLINE];
|
||||
|
||||
va_start(args, msg);
|
||||
|
||||
vsnprintf(buf, MAXLINE - 3, msg, args);
|
||||
strcat(buf, "\n");
|
||||
fflush(stdout);
|
||||
fputs(_WINGS_progname ? _WINGS_progname : "WINGs", stderr);
|
||||
fputs(_(" warning: "), stderr);
|
||||
fputs(buf, stderr);
|
||||
fflush(stdout);
|
||||
fflush(stderr);
|
||||
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* Prints a fatal error message with variable arguments and terminates
|
||||
*
|
||||
*
|
||||
* msg - message to print with optional formatting
|
||||
* ... - arguments to use on formatting
|
||||
* ... - arguments to use on formatting
|
||||
**************************************************************************/
|
||||
void
|
||||
wfatal(const char *msg, ...)
|
||||
void wfatal(const char *msg, ...)
|
||||
{
|
||||
va_list args;
|
||||
char buf[MAXLINE];
|
||||
va_list args;
|
||||
char buf[MAXLINE];
|
||||
|
||||
va_start(args, msg);
|
||||
va_start(args, msg);
|
||||
|
||||
vsnprintf(buf, MAXLINE-3, msg, args);
|
||||
strcat(buf,"\n");
|
||||
fflush(stdout);
|
||||
fputs(_WINGS_progname ? _WINGS_progname : "WINGs", stderr);
|
||||
fputs(_(" fatal error: "),stderr);
|
||||
fputs(buf, stderr);
|
||||
fflush(stdout);
|
||||
fflush(stderr);
|
||||
vsnprintf(buf, MAXLINE - 3, msg, args);
|
||||
strcat(buf, "\n");
|
||||
fflush(stdout);
|
||||
fputs(_WINGS_progname ? _WINGS_progname : "WINGs", stderr);
|
||||
fputs(_(" fatal error: "), stderr);
|
||||
fputs(buf, stderr);
|
||||
fflush(stdout);
|
||||
fflush(stderr);
|
||||
|
||||
va_end(args);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
* Prints a system error message with variable arguments
|
||||
*
|
||||
* Prints a system error message with variable arguments
|
||||
*
|
||||
* msg - message to print with optional formatting
|
||||
* ... - arguments to use on formatting
|
||||
*********************************************************************/
|
||||
void
|
||||
wsyserror(const char *msg, ...)
|
||||
void wsyserror(const char *msg, ...)
|
||||
{
|
||||
va_list args;
|
||||
char buf[MAXLINE];
|
||||
int error=errno;
|
||||
va_list args;
|
||||
char buf[MAXLINE];
|
||||
int error = errno;
|
||||
|
||||
va_start(args, msg);
|
||||
vsnprintf(buf, MAXLINE-3, msg, args);
|
||||
fflush(stdout);
|
||||
fputs(_WINGS_progname ? _WINGS_progname : "WINGs", stderr);
|
||||
fputs(_(" error: "), stderr);
|
||||
fputs(buf, stderr);
|
||||
fputs(": ", stderr);
|
||||
fputs(wstrerror(error), stderr);
|
||||
fputs("\n", stderr);
|
||||
fflush(stderr);
|
||||
fflush(stdout);
|
||||
va_end(args);
|
||||
va_start(args, msg);
|
||||
vsnprintf(buf, MAXLINE - 3, msg, args);
|
||||
fflush(stdout);
|
||||
fputs(_WINGS_progname ? _WINGS_progname : "WINGs", stderr);
|
||||
fputs(_(" error: "), stderr);
|
||||
fputs(buf, stderr);
|
||||
fputs(": ", stderr);
|
||||
fputs(wstrerror(error), stderr);
|
||||
fputs("\n", stderr);
|
||||
fflush(stderr);
|
||||
fflush(stdout);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
* Prints a system error message with variable arguments, being given
|
||||
* the error code.
|
||||
*
|
||||
*
|
||||
* error - the error code foe which to print the message
|
||||
* msg - message to print with optional formatting
|
||||
* ... - arguments to use on formatting
|
||||
*********************************************************************/
|
||||
void
|
||||
wsyserrorwithcode(int error, const char *msg, ...)
|
||||
void wsyserrorwithcode(int error, const char *msg, ...)
|
||||
{
|
||||
va_list args;
|
||||
char buf[MAXLINE];
|
||||
va_list args;
|
||||
char buf[MAXLINE];
|
||||
|
||||
va_start(args, msg);
|
||||
vsnprintf(buf, MAXLINE-3, msg, args);
|
||||
fflush(stdout);
|
||||
fputs(_WINGS_progname ? _WINGS_progname : "WINGs", stderr);
|
||||
fputs(_(" error: "), stderr);
|
||||
fputs(buf, stderr);
|
||||
fputs(": ", stderr);
|
||||
fputs(wstrerror(error), stderr);
|
||||
fputs("\n", stderr);
|
||||
fflush(stderr);
|
||||
fflush(stdout);
|
||||
va_end(args);
|
||||
va_start(args, msg);
|
||||
vsnprintf(buf, MAXLINE - 3, msg, args);
|
||||
fflush(stdout);
|
||||
fputs(_WINGS_progname ? _WINGS_progname : "WINGs", stderr);
|
||||
fputs(_(" error: "), stderr);
|
||||
fputs(buf, stderr);
|
||||
fputs(": ", stderr);
|
||||
fputs(wstrerror(error), stderr);
|
||||
fputs("\n", stderr);
|
||||
fflush(stderr);
|
||||
fflush(stdout);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
|
||||
|
||||
586
WINGs/findfile.c
586
WINGs/findfile.c
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* Window Maker miscelaneous function library
|
||||
*
|
||||
* Copyright (c) 1997-2002 Alfredo K. Kojima
|
||||
*
|
||||
*
|
||||
* Copyright (c) 1997-2003 Alfredo K. Kojima
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
@@ -18,11 +18,11 @@
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
|
||||
#include "wconfig.h"
|
||||
|
||||
#include "WUtil.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
@@ -33,337 +33,343 @@
|
||||
#define PATH_MAX 1024
|
||||
#endif
|
||||
|
||||
|
||||
char*
|
||||
wgethomedir()
|
||||
char *wgethomedir()
|
||||
{
|
||||
char *home = getenv("HOME");
|
||||
struct passwd *user;
|
||||
char *home = getenv("HOME");
|
||||
struct passwd *user;
|
||||
|
||||
if (home)
|
||||
return home;
|
||||
|
||||
user = getpwuid(getuid());
|
||||
if (!user) {
|
||||
wsyserror(_("could not get password entry for UID %i"), getuid());
|
||||
return "/";
|
||||
}
|
||||
if (!user->pw_dir) {
|
||||
return "/";
|
||||
} else {
|
||||
return user->pw_dir;
|
||||
}
|
||||
}
|
||||
if (home)
|
||||
return home;
|
||||
|
||||
|
||||
static char*
|
||||
getuserhomedir(char *username)
|
||||
{
|
||||
struct passwd *user;
|
||||
|
||||
user = getpwnam(username);
|
||||
if (!user) {
|
||||
wsyserror(_("could not get password entry for user %s"), username);
|
||||
return NULL;
|
||||
}
|
||||
if (!user->pw_dir) {
|
||||
return "/";
|
||||
} else {
|
||||
return user->pw_dir;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
char*
|
||||
wexpandpath(char *path)
|
||||
{
|
||||
char buffer2[PATH_MAX+2];
|
||||
char buffer[PATH_MAX+2];
|
||||
int i;
|
||||
|
||||
memset(buffer, 0, PATH_MAX+2);
|
||||
|
||||
if (*path=='~') {
|
||||
char *home;
|
||||
|
||||
path++;
|
||||
if (*path=='/' || *path==0) {
|
||||
home = wgethomedir();
|
||||
strcat(buffer, home);
|
||||
user = getpwuid(getuid());
|
||||
if (!user) {
|
||||
wsyserror(_("could not get password entry for UID %i"), getuid());
|
||||
return "/";
|
||||
}
|
||||
if (!user->pw_dir) {
|
||||
return "/";
|
||||
} else {
|
||||
int j;
|
||||
j = 0;
|
||||
while (*path!=0 && *path!='/') {
|
||||
buffer2[j++] = *path;
|
||||
buffer2[j] = 0;
|
||||
path++;
|
||||
}
|
||||
home = getuserhomedir(buffer2);
|
||||
if (!home)
|
||||
return user->pw_dir;
|
||||
}
|
||||
}
|
||||
|
||||
static char *getuserhomedir(char *username)
|
||||
{
|
||||
struct passwd *user;
|
||||
|
||||
user = getpwnam(username);
|
||||
if (!user) {
|
||||
wsyserror(_("could not get password entry for user %s"), username);
|
||||
return NULL;
|
||||
strcat(buffer, home);
|
||||
}
|
||||
}
|
||||
|
||||
i = strlen(buffer);
|
||||
|
||||
while (*path!=0) {
|
||||
char *tmp;
|
||||
|
||||
if (*path=='$') {
|
||||
int j = 0;
|
||||
path++;
|
||||
/* expand $(HOME) or $HOME style environment variables */
|
||||
if (*path=='(') {
|
||||
path++;
|
||||
while (*path!=0 && *path!=')') {
|
||||
buffer2[j++] = *(path++);
|
||||
buffer2[j] = 0;
|
||||
}
|
||||
if (*path==')')
|
||||
path++;
|
||||
tmp = getenv(buffer2);
|
||||
if (!tmp) {
|
||||
buffer[i] = 0;
|
||||
strcat(buffer, "$(");
|
||||
strcat(buffer, buffer2);
|
||||
strcat(buffer, ")");
|
||||
i += strlen(buffer2)+3;
|
||||
} else {
|
||||
strcat(buffer, tmp);
|
||||
i += strlen(tmp);
|
||||
}
|
||||
} else {
|
||||
while (*path!=0 && *path!='/') {
|
||||
buffer2[j++] = *(path++);
|
||||
buffer2[j] = 0;
|
||||
}
|
||||
tmp = getenv(buffer2);
|
||||
if (!tmp) {
|
||||
strcat(buffer, "$");
|
||||
strcat(buffer, buffer2);
|
||||
i += strlen(buffer2)+1;
|
||||
} else {
|
||||
strcat(buffer, tmp);
|
||||
i += strlen(tmp);
|
||||
}
|
||||
}
|
||||
if (!user->pw_dir) {
|
||||
return "/";
|
||||
} else {
|
||||
buffer[i++] = *path;
|
||||
path++;
|
||||
return user->pw_dir;
|
||||
}
|
||||
}
|
||||
|
||||
return wstrdup(buffer);
|
||||
}
|
||||
|
||||
char *wexpandpath(char *path)
|
||||
{
|
||||
char *origpath = path;
|
||||
char buffer2[PATH_MAX + 2];
|
||||
char buffer[PATH_MAX + 2];
|
||||
int i;
|
||||
|
||||
memset(buffer, 0, PATH_MAX + 2);
|
||||
|
||||
if (*path == '~') {
|
||||
char *home;
|
||||
|
||||
path++;
|
||||
if (*path == '/' || *path == 0) {
|
||||
home = wgethomedir();
|
||||
if (strlen(home) > PATH_MAX)
|
||||
goto error;
|
||||
strcat(buffer, home);
|
||||
} else {
|
||||
int j;
|
||||
j = 0;
|
||||
while (*path != 0 && *path != '/') {
|
||||
if (j > PATH_MAX)
|
||||
goto error;
|
||||
buffer2[j++] = *path;
|
||||
buffer2[j] = 0;
|
||||
path++;
|
||||
}
|
||||
home = getuserhomedir(buffer2);
|
||||
if (!home || strlen(home) > PATH_MAX)
|
||||
goto error;
|
||||
strcat(buffer, home);
|
||||
}
|
||||
}
|
||||
|
||||
i = strlen(buffer);
|
||||
|
||||
while (*path != 0 && i <= PATH_MAX) {
|
||||
char *tmp;
|
||||
|
||||
if (*path == '$') {
|
||||
int j = 0;
|
||||
path++;
|
||||
/* expand $(HOME) or $HOME style environment variables */
|
||||
if (*path == '(') {
|
||||
path++;
|
||||
while (*path != 0 && *path != ')') {
|
||||
if (j > PATH_MAX)
|
||||
goto error;
|
||||
buffer2[j++] = *(path++);
|
||||
buffer2[j] = 0;
|
||||
}
|
||||
if (*path == ')') {
|
||||
path++;
|
||||
tmp = getenv(buffer2);
|
||||
} else {
|
||||
tmp = NULL;
|
||||
}
|
||||
if (!tmp) {
|
||||
if ((i += strlen(buffer2) + 2) > PATH_MAX)
|
||||
goto error;
|
||||
buffer[i] = 0;
|
||||
strcat(buffer, "$(");
|
||||
strcat(buffer, buffer2);
|
||||
if (*(path-1)==')') {
|
||||
if (++i > PATH_MAX)
|
||||
goto error;
|
||||
strcat(buffer, ")");
|
||||
}
|
||||
} else {
|
||||
if ((i += strlen(tmp)) > PATH_MAX)
|
||||
goto error;
|
||||
strcat(buffer, tmp);
|
||||
}
|
||||
} else {
|
||||
while (*path != 0 && *path != '/') {
|
||||
if (j > PATH_MAX)
|
||||
goto error;
|
||||
buffer2[j++] = *(path++);
|
||||
buffer2[j] = 0;
|
||||
}
|
||||
tmp = getenv(buffer2);
|
||||
if (!tmp) {
|
||||
if ((i += strlen(buffer2) + 1) > PATH_MAX)
|
||||
goto error;
|
||||
strcat(buffer, "$");
|
||||
strcat(buffer, buffer2);
|
||||
} else {
|
||||
if ((i += strlen(tmp)) > PATH_MAX)
|
||||
goto error;
|
||||
strcat(buffer, tmp);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
buffer[i++] = *path;
|
||||
path++;
|
||||
}
|
||||
}
|
||||
|
||||
if (*path!=0)
|
||||
goto error;
|
||||
|
||||
return wstrdup(buffer);
|
||||
|
||||
error:
|
||||
errno = ENAMETOOLONG;
|
||||
wsyserror(_("could not expand %s"), origpath);
|
||||
/* FIXME: too many functions handle a return value of NULL incorrectly */
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* return address of next char != tok or end of string whichever comes first */
|
||||
static char*
|
||||
skipchar(char *string, char tok)
|
||||
static char *skipchar(char *string, char tok)
|
||||
{
|
||||
while(*string!=0 && *string==tok)
|
||||
string++;
|
||||
while (*string != 0 && *string == tok)
|
||||
string++;
|
||||
|
||||
return string;
|
||||
return string;
|
||||
}
|
||||
|
||||
|
||||
/* return address of next char == tok or end of string whichever comes first */
|
||||
static char*
|
||||
nextchar(char *string, char tok)
|
||||
static char *nextchar(char *string, char tok)
|
||||
{
|
||||
while(*string!=0 && *string!=tok)
|
||||
string++;
|
||||
while (*string != 0 && *string != tok)
|
||||
string++;
|
||||
|
||||
return string;
|
||||
return string;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
* findfile--
|
||||
* Finds a file in a : separated list of paths. ~ expansion is also
|
||||
* Finds a file in a : separated list of paths. ~ expansion is also
|
||||
* done.
|
||||
*
|
||||
*
|
||||
* Returns:
|
||||
* The complete path for the file (in a newly allocated string) or
|
||||
* NULL if the file was not found.
|
||||
*
|
||||
*
|
||||
* Side effects:
|
||||
* A new string is allocated. It must be freed later.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
char*
|
||||
wfindfile(char *paths, char *file)
|
||||
char *wfindfile(char *paths, char *file)
|
||||
{
|
||||
char *path;
|
||||
char *tmp, *tmp2;
|
||||
int len, flen;
|
||||
char *fullpath;
|
||||
char *path;
|
||||
char *tmp, *tmp2;
|
||||
int len, flen;
|
||||
char *fullpath;
|
||||
|
||||
if (!file)
|
||||
return NULL;
|
||||
|
||||
if (*file=='/' || *file=='~' || *file=='$' || !paths || *paths==0) {
|
||||
if (access(file, F_OK)<0) {
|
||||
fullpath = wexpandpath(file);
|
||||
if (!fullpath)
|
||||
if (!file)
|
||||
return NULL;
|
||||
|
||||
if (access(fullpath, F_OK)<0) {
|
||||
wfree(fullpath);
|
||||
return NULL;
|
||||
} else {
|
||||
return fullpath;
|
||||
}
|
||||
} else {
|
||||
return wstrdup(file);
|
||||
|
||||
if (*file == '/' || *file == '~' || *file == '$' || !paths || *paths == 0) {
|
||||
if (access(file, F_OK) < 0) {
|
||||
fullpath = wexpandpath(file);
|
||||
if (!fullpath)
|
||||
return NULL;
|
||||
|
||||
if (access(fullpath, F_OK) < 0) {
|
||||
wfree(fullpath);
|
||||
return NULL;
|
||||
} else {
|
||||
return fullpath;
|
||||
}
|
||||
} else {
|
||||
return wstrdup(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
flen = strlen(file);
|
||||
tmp = paths;
|
||||
while (*tmp) {
|
||||
tmp = skipchar(tmp, ':');
|
||||
if (*tmp==0)
|
||||
break;
|
||||
tmp2 = nextchar(tmp, ':');
|
||||
len = tmp2 - tmp;
|
||||
path = wmalloc(len+flen+2);
|
||||
path = memcpy(path, tmp, len);
|
||||
path[len]=0;
|
||||
if (path[len-1] != '/')
|
||||
strcat(path, "/");
|
||||
strcat(path, file);
|
||||
fullpath = wexpandpath(path);
|
||||
wfree(path);
|
||||
if (fullpath) {
|
||||
if (access(fullpath, F_OK)==0) {
|
||||
return fullpath;
|
||||
}
|
||||
wfree(fullpath);
|
||||
}
|
||||
tmp = tmp2;
|
||||
}
|
||||
flen = strlen(file);
|
||||
tmp = paths;
|
||||
while (*tmp) {
|
||||
tmp = skipchar(tmp, ':');
|
||||
if (*tmp == 0)
|
||||
break;
|
||||
tmp2 = nextchar(tmp, ':');
|
||||
len = tmp2 - tmp;
|
||||
path = wmalloc(len + flen + 2);
|
||||
path = memcpy(path, tmp, len);
|
||||
path[len] = 0;
|
||||
if (path[len - 1] != '/')
|
||||
strcat(path, "/");
|
||||
strcat(path, file);
|
||||
fullpath = wexpandpath(path);
|
||||
wfree(path);
|
||||
if (fullpath) {
|
||||
if (access(fullpath, F_OK) == 0) {
|
||||
return fullpath;
|
||||
}
|
||||
wfree(fullpath);
|
||||
}
|
||||
tmp = tmp2;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
char*
|
||||
wfindfileinlist(char **path_list, char *file)
|
||||
char *wfindfileinlist(char **path_list, char *file)
|
||||
{
|
||||
int i;
|
||||
char *path;
|
||||
int len, flen;
|
||||
char *fullpath;
|
||||
int i;
|
||||
char *path;
|
||||
int len, flen;
|
||||
char *fullpath;
|
||||
|
||||
if (!file)
|
||||
if (!file)
|
||||
return NULL;
|
||||
|
||||
if (*file == '/' || *file == '~' || !path_list) {
|
||||
if (access(file, F_OK) < 0) {
|
||||
fullpath = wexpandpath(file);
|
||||
if (!fullpath)
|
||||
return NULL;
|
||||
|
||||
if (access(fullpath, F_OK) < 0) {
|
||||
wfree(fullpath);
|
||||
return NULL;
|
||||
} else {
|
||||
return fullpath;
|
||||
}
|
||||
} else {
|
||||
return wstrdup(file);
|
||||
}
|
||||
}
|
||||
|
||||
flen = strlen(file);
|
||||
for (i = 0; path_list[i] != NULL; i++) {
|
||||
len = strlen(path_list[i]);
|
||||
path = wmalloc(len + flen + 2);
|
||||
path = memcpy(path, path_list[i], len);
|
||||
path[len] = 0;
|
||||
strcat(path, "/");
|
||||
strcat(path, file);
|
||||
/* expand tilde */
|
||||
fullpath = wexpandpath(path);
|
||||
wfree(path);
|
||||
if (fullpath) {
|
||||
/* check if file exists */
|
||||
if (access(fullpath, F_OK) == 0) {
|
||||
return fullpath;
|
||||
}
|
||||
wfree(fullpath);
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
|
||||
if (*file=='/' || *file=='~' || !path_list) {
|
||||
if (access(file, F_OK)<0) {
|
||||
fullpath = wexpandpath(file);
|
||||
if (!fullpath)
|
||||
return NULL;
|
||||
|
||||
if (access(fullpath, F_OK)<0) {
|
||||
wfree(fullpath);
|
||||
return NULL;
|
||||
} else {
|
||||
return fullpath;
|
||||
}
|
||||
} else {
|
||||
return wstrdup(file);
|
||||
}
|
||||
}
|
||||
|
||||
flen = strlen(file);
|
||||
for (i=0; path_list[i]!=NULL; i++) {
|
||||
len = strlen(path_list[i]);
|
||||
path = wmalloc(len+flen+2);
|
||||
path = memcpy(path, path_list[i], len);
|
||||
path[len]=0;
|
||||
strcat(path, "/");
|
||||
strcat(path, file);
|
||||
/* expand tilde */
|
||||
fullpath = wexpandpath(path);
|
||||
wfree(path);
|
||||
if (fullpath) {
|
||||
/* check if file exists */
|
||||
if (access(fullpath, F_OK)==0) {
|
||||
return fullpath;
|
||||
}
|
||||
wfree(fullpath);
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
char*
|
||||
wfindfileinarray(WMPropList *array, char *file)
|
||||
char *wfindfileinarray(WMPropList * array, char *file)
|
||||
{
|
||||
int i;
|
||||
char *path;
|
||||
int len, flen;
|
||||
char *fullpath;
|
||||
int i;
|
||||
char *path;
|
||||
int len, flen;
|
||||
char *fullpath;
|
||||
|
||||
if (!file)
|
||||
if (!file)
|
||||
return NULL;
|
||||
|
||||
if (*file == '/' || *file == '~' || !array) {
|
||||
if (access(file, F_OK) < 0) {
|
||||
fullpath = wexpandpath(file);
|
||||
if (!fullpath)
|
||||
return NULL;
|
||||
|
||||
if (access(fullpath, F_OK) < 0) {
|
||||
wfree(fullpath);
|
||||
return NULL;
|
||||
} else {
|
||||
return fullpath;
|
||||
}
|
||||
} else {
|
||||
return wstrdup(file);
|
||||
}
|
||||
}
|
||||
|
||||
flen = strlen(file);
|
||||
for (i = 0; i < WMGetPropListItemCount(array); i++) {
|
||||
WMPropList *prop;
|
||||
char *p;
|
||||
|
||||
prop = WMGetFromPLArray(array, i);
|
||||
if (!prop)
|
||||
continue;
|
||||
p = WMGetFromPLString(prop);
|
||||
|
||||
len = strlen(p);
|
||||
path = wmalloc(len + flen + 2);
|
||||
path = memcpy(path, p, len);
|
||||
path[len] = 0;
|
||||
strcat(path, "/");
|
||||
strcat(path, file);
|
||||
/* expand tilde */
|
||||
fullpath = wexpandpath(path);
|
||||
wfree(path);
|
||||
if (fullpath) {
|
||||
/* check if file exists */
|
||||
if (access(fullpath, F_OK) == 0) {
|
||||
return fullpath;
|
||||
}
|
||||
wfree(fullpath);
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
|
||||
if (*file=='/' || *file=='~' || !array) {
|
||||
if (access(file, F_OK)<0) {
|
||||
fullpath = wexpandpath(file);
|
||||
if (!fullpath)
|
||||
return NULL;
|
||||
|
||||
if (access(fullpath, F_OK)<0) {
|
||||
wfree(fullpath);
|
||||
return NULL;
|
||||
} else {
|
||||
return fullpath;
|
||||
}
|
||||
} else {
|
||||
return wstrdup(file);
|
||||
}
|
||||
}
|
||||
|
||||
flen = strlen(file);
|
||||
for (i=0; i<WMGetPropListItemCount(array); i++) {
|
||||
WMPropList *prop;
|
||||
char *p;
|
||||
|
||||
prop = WMGetFromPLArray(array, i);
|
||||
if (!prop)
|
||||
continue;
|
||||
p = WMGetFromPLString(prop);
|
||||
|
||||
len = strlen(p);
|
||||
path = wmalloc(len+flen+2);
|
||||
path = memcpy(path, p, len);
|
||||
path[len]=0;
|
||||
strcat(path, "/");
|
||||
strcat(path, file);
|
||||
/* expand tilde */
|
||||
fullpath = wexpandpath(path);
|
||||
wfree(path);
|
||||
if (fullpath) {
|
||||
/* check if file exists */
|
||||
if (access(fullpath, F_OK)==0) {
|
||||
return fullpath;
|
||||
}
|
||||
wfree(fullpath);
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
906
WINGs/handlers.c
906
WINGs/handlers.c
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,4 @@
|
||||
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
@@ -7,494 +6,433 @@
|
||||
|
||||
#include "WUtil.h"
|
||||
|
||||
|
||||
|
||||
|
||||
#define INITIAL_CAPACITY 23
|
||||
|
||||
|
||||
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
|
||||
# define INLINE inline
|
||||
#else
|
||||
# define INLINE
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct HashItem {
|
||||
const void *key;
|
||||
const void *data;
|
||||
|
||||
struct HashItem *next; /* collided item list */
|
||||
const void *key;
|
||||
const void *data;
|
||||
|
||||
struct HashItem *next; /* collided item list */
|
||||
} HashItem;
|
||||
|
||||
|
||||
typedef struct W_HashTable {
|
||||
WMHashTableCallbacks callbacks;
|
||||
WMHashTableCallbacks callbacks;
|
||||
|
||||
unsigned itemCount;
|
||||
unsigned size; /* table size */
|
||||
unsigned itemCount;
|
||||
unsigned size; /* table size */
|
||||
|
||||
HashItem **table;
|
||||
HashItem **table;
|
||||
} HashTable;
|
||||
|
||||
|
||||
|
||||
|
||||
#define HASH(table, key) (((table)->callbacks.hash ? \
|
||||
(*(table)->callbacks.hash)(key) : hashPtr(key)) % (table)->size)
|
||||
(*(table)->callbacks.hash)(key) : hashPtr(key)) % (table)->size)
|
||||
|
||||
#define DUPKEY(table, key) ((table)->callbacks.retainKey ? \
|
||||
(*(table)->callbacks.retainKey)(key) : (key))
|
||||
(*(table)->callbacks.retainKey)(key) : (key))
|
||||
|
||||
#define RELKEY(table, key) if ((table)->callbacks.releaseKey) \
|
||||
(*(table)->callbacks.releaseKey)(key)
|
||||
(*(table)->callbacks.releaseKey)(key)
|
||||
|
||||
|
||||
|
||||
|
||||
static INLINE unsigned
|
||||
hashString(const char *key)
|
||||
static INLINE unsigned hashString(const char *key)
|
||||
{
|
||||
unsigned ret = 0;
|
||||
unsigned ctr = 0;
|
||||
unsigned ret = 0;
|
||||
unsigned ctr = 0;
|
||||
|
||||
while (*key) {
|
||||
ret ^= *(char*)key++ << ctr;
|
||||
ctr = (ctr + 1) % sizeof (char *);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static INLINE unsigned
|
||||
hashPtr(const void *key)
|
||||
{
|
||||
return ((size_t)key / sizeof(char*));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static void
|
||||
rellocateItem(WMHashTable *table, HashItem *item)
|
||||
{
|
||||
unsigned h;
|
||||
|
||||
h = HASH(table, item->key);
|
||||
|
||||
item->next = table->table[h];
|
||||
table->table[h] = item;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
rebuildTable(WMHashTable *table)
|
||||
{
|
||||
HashItem *next;
|
||||
HashItem **oldArray;
|
||||
int i;
|
||||
int oldSize;
|
||||
int newSize;
|
||||
|
||||
oldArray = table->table;
|
||||
oldSize = table->size;
|
||||
|
||||
newSize = table->size*2;
|
||||
|
||||
table->table = wmalloc(sizeof(char*)*newSize);
|
||||
memset(table->table, 0, sizeof(char*)*newSize);
|
||||
table->size = newSize;
|
||||
|
||||
for (i = 0; i < oldSize; i++) {
|
||||
while (oldArray[i]!=NULL) {
|
||||
next = oldArray[i]->next;
|
||||
rellocateItem(table, oldArray[i]);
|
||||
oldArray[i] = next;
|
||||
while (*key) {
|
||||
ret ^= *(char *)key++ << ctr;
|
||||
ctr = (ctr + 1) % sizeof(char *);
|
||||
}
|
||||
}
|
||||
wfree(oldArray);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
WMHashTable*
|
||||
WMCreateHashTable(WMHashTableCallbacks callbacks)
|
||||
static INLINE unsigned hashPtr(const void *key)
|
||||
{
|
||||
HashTable *table;
|
||||
|
||||
table = wmalloc(sizeof(HashTable));
|
||||
memset(table, 0, sizeof(HashTable));
|
||||
|
||||
table->callbacks = callbacks;
|
||||
|
||||
table->size = INITIAL_CAPACITY;
|
||||
|
||||
table->table = wmalloc(sizeof(HashItem*)*table->size);
|
||||
memset(table->table, 0, sizeof(HashItem*)*table->size);
|
||||
|
||||
return table;
|
||||
return ((size_t) key / sizeof(char *));
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WMResetHashTable(WMHashTable *table)
|
||||
static void rellocateItem(WMHashTable * table, HashItem * item)
|
||||
{
|
||||
HashItem *item, *tmp;
|
||||
int i;
|
||||
unsigned h;
|
||||
|
||||
for (i = 0; i < table->size; i++) {
|
||||
item = table->table[i];
|
||||
while (item) {
|
||||
tmp = item->next;
|
||||
RELKEY(table, item);
|
||||
wfree(item);
|
||||
item = tmp;
|
||||
h = HASH(table, item->key);
|
||||
|
||||
item->next = table->table[h];
|
||||
table->table[h] = item;
|
||||
}
|
||||
|
||||
static void rebuildTable(WMHashTable * table)
|
||||
{
|
||||
HashItem *next;
|
||||
HashItem **oldArray;
|
||||
int i;
|
||||
int oldSize;
|
||||
int newSize;
|
||||
|
||||
oldArray = table->table;
|
||||
oldSize = table->size;
|
||||
|
||||
newSize = table->size * 2;
|
||||
|
||||
table->table = wmalloc(sizeof(char *) * newSize);
|
||||
memset(table->table, 0, sizeof(char *) * newSize);
|
||||
table->size = newSize;
|
||||
|
||||
for (i = 0; i < oldSize; i++) {
|
||||
while (oldArray[i] != NULL) {
|
||||
next = oldArray[i]->next;
|
||||
rellocateItem(table, oldArray[i]);
|
||||
oldArray[i] = next;
|
||||
}
|
||||
}
|
||||
}
|
||||
wfree(oldArray);
|
||||
}
|
||||
|
||||
WMHashTable *WMCreateHashTable(WMHashTableCallbacks callbacks)
|
||||
{
|
||||
HashTable *table;
|
||||
|
||||
table = wmalloc(sizeof(HashTable));
|
||||
memset(table, 0, sizeof(HashTable));
|
||||
|
||||
table->callbacks = callbacks;
|
||||
|
||||
table->itemCount = 0;
|
||||
|
||||
if (table->size > INITIAL_CAPACITY) {
|
||||
wfree(table->table);
|
||||
table->size = INITIAL_CAPACITY;
|
||||
table->table = wmalloc(sizeof(HashItem*)*table->size);
|
||||
}
|
||||
memset(table->table, 0, sizeof(HashItem*)*table->size);
|
||||
|
||||
table->table = wmalloc(sizeof(HashItem *) * table->size);
|
||||
memset(table->table, 0, sizeof(HashItem *) * table->size);
|
||||
|
||||
return table;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WMFreeHashTable(WMHashTable *table)
|
||||
void WMResetHashTable(WMHashTable * table)
|
||||
{
|
||||
HashItem *item, *tmp;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < table->size; i++) {
|
||||
item = table->table[i];
|
||||
while (item) {
|
||||
tmp = item->next;
|
||||
RELKEY(table, item->key);
|
||||
wfree(item);
|
||||
item = tmp;
|
||||
HashItem *item, *tmp;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < table->size; i++) {
|
||||
item = table->table[i];
|
||||
while (item) {
|
||||
tmp = item->next;
|
||||
RELKEY(table, item->key);
|
||||
wfree(item);
|
||||
item = tmp;
|
||||
}
|
||||
}
|
||||
}
|
||||
wfree(table->table);
|
||||
wfree(table);
|
||||
|
||||
table->itemCount = 0;
|
||||
|
||||
if (table->size > INITIAL_CAPACITY) {
|
||||
wfree(table->table);
|
||||
table->size = INITIAL_CAPACITY;
|
||||
table->table = wmalloc(sizeof(HashItem *) * table->size);
|
||||
}
|
||||
memset(table->table, 0, sizeof(HashItem *) * table->size);
|
||||
}
|
||||
|
||||
|
||||
unsigned
|
||||
WMCountHashTable(WMHashTable *table)
|
||||
void WMFreeHashTable(WMHashTable * table)
|
||||
{
|
||||
return table->itemCount;
|
||||
HashItem *item, *tmp;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < table->size; i++) {
|
||||
item = table->table[i];
|
||||
while (item) {
|
||||
tmp = item->next;
|
||||
RELKEY(table, item->key);
|
||||
wfree(item);
|
||||
item = tmp;
|
||||
}
|
||||
}
|
||||
wfree(table->table);
|
||||
wfree(table);
|
||||
}
|
||||
|
||||
|
||||
void*
|
||||
WMHashGet(WMHashTable *table, const void *key)
|
||||
unsigned WMCountHashTable(WMHashTable * table)
|
||||
{
|
||||
unsigned h;
|
||||
HashItem *item;
|
||||
|
||||
h = HASH(table, key);
|
||||
item = table->table[h];
|
||||
|
||||
if (table->callbacks.keyIsEqual) {
|
||||
while (item) {
|
||||
if ((*table->callbacks.keyIsEqual)(key, item->key)) {
|
||||
break;
|
||||
}
|
||||
item = item->next;
|
||||
return table->itemCount;
|
||||
}
|
||||
|
||||
void *WMHashGet(WMHashTable * table, const void *key)
|
||||
{
|
||||
unsigned h;
|
||||
HashItem *item;
|
||||
|
||||
h = HASH(table, key);
|
||||
item = table->table[h];
|
||||
|
||||
if (table->callbacks.keyIsEqual) {
|
||||
while (item) {
|
||||
if ((*table->callbacks.keyIsEqual) (key, item->key)) {
|
||||
break;
|
||||
}
|
||||
item = item->next;
|
||||
}
|
||||
} else {
|
||||
while (item) {
|
||||
if (key == item->key) {
|
||||
break;
|
||||
}
|
||||
item = item->next;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
while (item) {
|
||||
if (key == item->key) {
|
||||
break;
|
||||
}
|
||||
item = item->next;
|
||||
if (item)
|
||||
return (void *)item->data;
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Bool WMHashGetItemAndKey(WMHashTable * table, const void *key, void **retItem, void **retKey)
|
||||
{
|
||||
unsigned h;
|
||||
HashItem *item;
|
||||
|
||||
h = HASH(table, key);
|
||||
item = table->table[h];
|
||||
|
||||
if (table->callbacks.keyIsEqual) {
|
||||
while (item) {
|
||||
if ((*table->callbacks.keyIsEqual) (key, item->key)) {
|
||||
break;
|
||||
}
|
||||
item = item->next;
|
||||
}
|
||||
} else {
|
||||
while (item) {
|
||||
if (key == item->key) {
|
||||
break;
|
||||
}
|
||||
item = item->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (item)
|
||||
return (void*)item->data;
|
||||
else
|
||||
if (item) {
|
||||
if (retKey)
|
||||
*retKey = (void *)item->key;
|
||||
if (retItem)
|
||||
*retItem = (void *)item->data;
|
||||
return True;
|
||||
} else {
|
||||
return False;
|
||||
}
|
||||
}
|
||||
|
||||
void *WMHashInsert(WMHashTable * table, const void *key, const void *data)
|
||||
{
|
||||
unsigned h;
|
||||
HashItem *item;
|
||||
int replacing = 0;
|
||||
|
||||
h = HASH(table, key);
|
||||
/* look for the entry */
|
||||
item = table->table[h];
|
||||
if (table->callbacks.keyIsEqual) {
|
||||
while (item) {
|
||||
if ((*table->callbacks.keyIsEqual) (key, item->key)) {
|
||||
replacing = 1;
|
||||
break;
|
||||
}
|
||||
item = item->next;
|
||||
}
|
||||
} else {
|
||||
while (item) {
|
||||
if (key == item->key) {
|
||||
replacing = 1;
|
||||
break;
|
||||
}
|
||||
item = item->next;
|
||||
}
|
||||
}
|
||||
|
||||
if (replacing) {
|
||||
const void *old;
|
||||
|
||||
old = item->data;
|
||||
item->data = data;
|
||||
RELKEY(table, item->key);
|
||||
item->key = DUPKEY(table, key);
|
||||
|
||||
return (void *)old;
|
||||
} else {
|
||||
HashItem *nitem;
|
||||
|
||||
nitem = wmalloc(sizeof(HashItem));
|
||||
nitem->key = DUPKEY(table, key);
|
||||
nitem->data = data;
|
||||
nitem->next = table->table[h];
|
||||
table->table[h] = nitem;
|
||||
|
||||
table->itemCount++;
|
||||
}
|
||||
|
||||
/* OPTIMIZE: put this in an idle handler. */
|
||||
if (table->itemCount > table->size) {
|
||||
#ifdef DEBUG0
|
||||
printf("rebuilding hash table...\n");
|
||||
#endif
|
||||
rebuildTable(table);
|
||||
#ifdef DEBUG0
|
||||
printf("finished rebuild.\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Bool
|
||||
WMHashGetItemAndKey(WMHashTable *table, const void *key,
|
||||
void **retItem, void **retKey)
|
||||
static HashItem *deleteFromList(HashTable * table, HashItem * item, const void *key)
|
||||
{
|
||||
unsigned h;
|
||||
HashItem *item;
|
||||
|
||||
h = HASH(table, key);
|
||||
item = table->table[h];
|
||||
|
||||
if (table->callbacks.keyIsEqual) {
|
||||
while (item) {
|
||||
if ((*table->callbacks.keyIsEqual)(key, item->key)) {
|
||||
break;
|
||||
}
|
||||
item = item->next;
|
||||
HashItem *next;
|
||||
|
||||
if (item == NULL)
|
||||
return NULL;
|
||||
|
||||
if ((table->callbacks.keyIsEqual && (*table->callbacks.keyIsEqual) (key, item->key))
|
||||
|| (!table->callbacks.keyIsEqual && key == item->key)) {
|
||||
|
||||
next = item->next;
|
||||
RELKEY(table, item->key);
|
||||
wfree(item);
|
||||
|
||||
table->itemCount--;
|
||||
|
||||
return next;
|
||||
}
|
||||
} else {
|
||||
while (item) {
|
||||
if (key == item->key) {
|
||||
break;
|
||||
}
|
||||
item = item->next;
|
||||
|
||||
item->next = deleteFromList(table, item->next, key);
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
void WMHashRemove(WMHashTable * table, const void *key)
|
||||
{
|
||||
unsigned h;
|
||||
|
||||
h = HASH(table, key);
|
||||
|
||||
table->table[h] = deleteFromList(table, table->table[h], key);
|
||||
}
|
||||
|
||||
WMHashEnumerator WMEnumerateHashTable(WMHashTable * table)
|
||||
{
|
||||
WMHashEnumerator enumerator;
|
||||
|
||||
enumerator.table = table;
|
||||
enumerator.index = 0;
|
||||
enumerator.nextItem = table->table[0];
|
||||
|
||||
return enumerator;
|
||||
}
|
||||
|
||||
void *WMNextHashEnumeratorItem(WMHashEnumerator * enumerator)
|
||||
{
|
||||
const void *data = NULL;
|
||||
|
||||
/* this assumes the table doesn't change between
|
||||
* WMEnumerateHashTable() and WMNextHashEnumeratorItem() calls */
|
||||
|
||||
if (enumerator->nextItem == NULL) {
|
||||
HashTable *table = enumerator->table;
|
||||
while (++enumerator->index < table->size) {
|
||||
if (table->table[enumerator->index] != NULL) {
|
||||
enumerator->nextItem = table->table[enumerator->index];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (item) {
|
||||
if (retKey)
|
||||
*retKey = (void*)item->key;
|
||||
if (retItem)
|
||||
*retItem = (void*)item->data;
|
||||
return True;
|
||||
} else {
|
||||
return False;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void*
|
||||
WMHashInsert(WMHashTable *table, const void *key, const void *data)
|
||||
{
|
||||
unsigned h;
|
||||
HashItem *item;
|
||||
int replacing = 0;
|
||||
|
||||
h = HASH(table, key);
|
||||
/* look for the entry */
|
||||
item = table->table[h];
|
||||
if (table->callbacks.keyIsEqual) {
|
||||
while (item) {
|
||||
if ((*table->callbacks.keyIsEqual)(key, item->key)) {
|
||||
replacing = 1;
|
||||
break;
|
||||
}
|
||||
item = item->next;
|
||||
if (enumerator->nextItem) {
|
||||
data = ((HashItem *) enumerator->nextItem)->data;
|
||||
enumerator->nextItem = ((HashItem *) enumerator->nextItem)->next;
|
||||
}
|
||||
} else {
|
||||
while (item) {
|
||||
if (key == item->key) {
|
||||
replacing = 1;
|
||||
break;
|
||||
}
|
||||
item = item->next;
|
||||
|
||||
return (void *)data;
|
||||
}
|
||||
|
||||
void *WMNextHashEnumeratorKey(WMHashEnumerator * enumerator)
|
||||
{
|
||||
const void *key = NULL;
|
||||
|
||||
/* this assumes the table doesn't change between
|
||||
* WMEnumerateHashTable() and WMNextHashEnumeratorKey() calls */
|
||||
|
||||
if (enumerator->nextItem == NULL) {
|
||||
HashTable *table = enumerator->table;
|
||||
while (++enumerator->index < table->size) {
|
||||
if (table->table[enumerator->index] != NULL) {
|
||||
enumerator->nextItem = table->table[enumerator->index];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (replacing) {
|
||||
const void *old;
|
||||
|
||||
old = item->data;
|
||||
item->data = data;
|
||||
RELKEY(table, item->key);
|
||||
item->key = DUPKEY(table, key);
|
||||
|
||||
return (void*)old;
|
||||
} else {
|
||||
HashItem *nitem;
|
||||
|
||||
nitem = wmalloc(sizeof(HashItem));
|
||||
nitem->key = DUPKEY(table, key);
|
||||
nitem->data = data;
|
||||
nitem->next = table->table[h];
|
||||
table->table[h] = nitem;
|
||||
|
||||
table->itemCount++;
|
||||
}
|
||||
|
||||
/* OPTIMIZE: put this in an idle handler.*/
|
||||
if (table->itemCount > table->size) {
|
||||
#ifdef DEBUG0
|
||||
printf("rebuilding hash table...\n");
|
||||
#endif
|
||||
rebuildTable(table);
|
||||
#ifdef DEBUG0
|
||||
printf("finished rebuild.\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static HashItem*
|
||||
deleteFromList(HashTable *table, HashItem *item, const void *key)
|
||||
{
|
||||
HashItem *next;
|
||||
|
||||
if (item==NULL)
|
||||
return NULL;
|
||||
|
||||
if ((table->callbacks.keyIsEqual
|
||||
&& (*table->callbacks.keyIsEqual)(key, item->key))
|
||||
|| (!table->callbacks.keyIsEqual && key==item->key)) {
|
||||
|
||||
next = item->next;
|
||||
RELKEY(table, item->key);
|
||||
wfree(item);
|
||||
|
||||
table->itemCount--;
|
||||
|
||||
return next;
|
||||
}
|
||||
|
||||
item->next = deleteFromList(table, item->next, key);
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WMHashRemove(WMHashTable *table, const void *key)
|
||||
{
|
||||
unsigned h;
|
||||
|
||||
h = HASH(table, key);
|
||||
|
||||
table->table[h] = deleteFromList(table, table->table[h], key);
|
||||
}
|
||||
|
||||
|
||||
WMHashEnumerator
|
||||
WMEnumerateHashTable(WMHashTable *table)
|
||||
{
|
||||
WMHashEnumerator enumerator;
|
||||
|
||||
enumerator.table = table;
|
||||
enumerator.index = 0;
|
||||
enumerator.nextItem = table->table[0];
|
||||
|
||||
return enumerator;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void*
|
||||
WMNextHashEnumeratorItem(WMHashEnumerator *enumerator)
|
||||
{
|
||||
const void *data = NULL;
|
||||
|
||||
/* this assumes the table doesn't change between
|
||||
* WMEnumerateHashTable() and WMNextHashEnumeratorItem() calls */
|
||||
|
||||
if (enumerator->nextItem==NULL) {
|
||||
HashTable *table = enumerator->table;
|
||||
while (++enumerator->index < table->size) {
|
||||
if (table->table[enumerator->index]!=NULL) {
|
||||
enumerator->nextItem = table->table[enumerator->index];
|
||||
break;
|
||||
}
|
||||
if (enumerator->nextItem) {
|
||||
key = ((HashItem *) enumerator->nextItem)->key;
|
||||
enumerator->nextItem = ((HashItem *) enumerator->nextItem)->next;
|
||||
}
|
||||
}
|
||||
|
||||
if (enumerator->nextItem) {
|
||||
data = ((HashItem*)enumerator->nextItem)->data;
|
||||
enumerator->nextItem = ((HashItem*)enumerator->nextItem)->next;
|
||||
}
|
||||
|
||||
return (void*)data;
|
||||
|
||||
return (void *)key;
|
||||
}
|
||||
|
||||
|
||||
void*
|
||||
WMNextHashEnumeratorKey(WMHashEnumerator *enumerator)
|
||||
Bool WMNextHashEnumeratorItemAndKey(WMHashEnumerator * enumerator, void **item, void **key)
|
||||
{
|
||||
const void *key = NULL;
|
||||
/* this assumes the table doesn't change between
|
||||
* WMEnumerateHashTable() and WMNextHashEnumeratorItemAndKey() calls */
|
||||
|
||||
/* this assumes the table doesn't change between
|
||||
* WMEnumerateHashTable() and WMNextHashEnumeratorKey() calls */
|
||||
|
||||
if (enumerator->nextItem==NULL) {
|
||||
HashTable *table = enumerator->table;
|
||||
while (++enumerator->index < table->size) {
|
||||
if (table->table[enumerator->index]!=NULL) {
|
||||
enumerator->nextItem = table->table[enumerator->index];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (enumerator->nextItem) {
|
||||
key = ((HashItem*)enumerator->nextItem)->key;
|
||||
enumerator->nextItem = ((HashItem*)enumerator->nextItem)->next;
|
||||
}
|
||||
|
||||
return (void*)key;
|
||||
}
|
||||
|
||||
|
||||
Bool
|
||||
WMNextHashEnumeratorItemAndKey(WMHashEnumerator *enumerator,
|
||||
void **item, void **key)
|
||||
{
|
||||
/* this assumes the table doesn't change between
|
||||
* WMEnumerateHashTable() and WMNextHashEnumeratorItemAndKey() calls */
|
||||
|
||||
if (enumerator->nextItem==NULL) {
|
||||
HashTable *table = enumerator->table;
|
||||
while (++enumerator->index < table->size) {
|
||||
if (table->table[enumerator->index]!=NULL) {
|
||||
enumerator->nextItem = table->table[enumerator->index];
|
||||
break;
|
||||
}
|
||||
if (enumerator->nextItem == NULL) {
|
||||
HashTable *table = enumerator->table;
|
||||
while (++enumerator->index < table->size) {
|
||||
if (table->table[enumerator->index] != NULL) {
|
||||
enumerator->nextItem = table->table[enumerator->index];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (enumerator->nextItem) {
|
||||
if (item)
|
||||
*item = (void*)((HashItem*)enumerator->nextItem)->data;
|
||||
if (key)
|
||||
*key = (void*)((HashItem*)enumerator->nextItem)->key;
|
||||
enumerator->nextItem = ((HashItem*)enumerator->nextItem)->next;
|
||||
if (enumerator->nextItem) {
|
||||
if (item)
|
||||
*item = (void *)((HashItem *) enumerator->nextItem)->data;
|
||||
if (key)
|
||||
*key = (void *)((HashItem *) enumerator->nextItem)->key;
|
||||
enumerator->nextItem = ((HashItem *) enumerator->nextItem)->next;
|
||||
|
||||
return True;
|
||||
}
|
||||
return True;
|
||||
}
|
||||
|
||||
return False;
|
||||
return False;
|
||||
}
|
||||
|
||||
|
||||
static Bool
|
||||
compareStrings(const char *key1, const char *key2)
|
||||
static Bool compareStrings(const char *key1, const char *key2)
|
||||
{
|
||||
return strcmp(key1, key2)==0;
|
||||
return strcmp(key1, key2) == 0;
|
||||
}
|
||||
|
||||
|
||||
typedef unsigned (*hashFunc)(const void*);
|
||||
typedef Bool (*isEqualFunc)(const void*, const void*);
|
||||
typedef void* (*retainFunc)(const void*);
|
||||
typedef void (*releaseFunc)(const void*);
|
||||
|
||||
typedef unsigned (*hashFunc) (const void *);
|
||||
typedef Bool(*isEqualFunc) (const void *, const void *);
|
||||
typedef void *(*retainFunc) (const void *);
|
||||
typedef void (*releaseFunc) (const void *);
|
||||
|
||||
const WMHashTableCallbacks WMIntHashCallbacks = {
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
const WMHashTableCallbacks WMStringHashCallbacks = {
|
||||
(hashFunc)hashString,
|
||||
(isEqualFunc)compareStrings,
|
||||
(retainFunc)wstrdup,
|
||||
(releaseFunc)wfree
|
||||
(hashFunc) hashString,
|
||||
(isEqualFunc) compareStrings,
|
||||
(retainFunc) wstrdup,
|
||||
(releaseFunc) wfree
|
||||
};
|
||||
|
||||
|
||||
|
||||
const WMHashTableCallbacks WMStringPointerHashCallbacks = {
|
||||
(hashFunc)hashString,
|
||||
(isEqualFunc)compareStrings,
|
||||
(hashFunc) hashString,
|
||||
(isEqualFunc) compareStrings,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
319
WINGs/host.c
319
WINGs/host.c
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* WINGs WMHost function library
|
||||
*
|
||||
* Copyright (c) 1999-2002 Dan Pascu
|
||||
* Copyright (c) 1999-2003 Dan Pascu
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -18,7 +18,6 @@
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
|
||||
#include "wconfig.h"
|
||||
|
||||
#include <unistd.h>
|
||||
@@ -30,7 +29,6 @@
|
||||
|
||||
#include "WUtil.h"
|
||||
|
||||
|
||||
/* For Solaris */
|
||||
#ifndef INADDR_NONE
|
||||
# define INADDR_NONE (-1)
|
||||
@@ -39,272 +37,229 @@
|
||||
/* Max hostname length (RFC 1123) */
|
||||
#define W_MAXHOSTNAMELEN 255
|
||||
|
||||
|
||||
typedef struct W_Host {
|
||||
char *name;
|
||||
char *name;
|
||||
|
||||
WMArray *names;
|
||||
WMArray *addresses;
|
||||
WMArray *names;
|
||||
WMArray *addresses;
|
||||
|
||||
int refCount;
|
||||
int refCount;
|
||||
} W_Host;
|
||||
|
||||
|
||||
static WMHashTable *hostCache = NULL;
|
||||
|
||||
static Bool hostCacheEnabled = True;
|
||||
|
||||
|
||||
|
||||
static WMHost*
|
||||
getHostFromCache(char *name)
|
||||
static WMHost *getHostFromCache(char *name)
|
||||
{
|
||||
if (!hostCache)
|
||||
return NULL;
|
||||
if (!hostCache)
|
||||
return NULL;
|
||||
|
||||
return WMHashGet(hostCache, name);
|
||||
return WMHashGet(hostCache, name);
|
||||
}
|
||||
|
||||
|
||||
static WMHost*
|
||||
getHostWithHostEntry(struct hostent *host, char *name)
|
||||
static WMHost *getHostWithHostEntry(struct hostent *host, char *name)
|
||||
{
|
||||
WMHost *hPtr;
|
||||
struct in_addr in;
|
||||
int i;
|
||||
WMHost *hPtr;
|
||||
struct in_addr in;
|
||||
int i;
|
||||
|
||||
hPtr = (WMHost*)wmalloc(sizeof(WMHost));
|
||||
memset(hPtr, 0, sizeof(WMHost));
|
||||
hPtr = (WMHost *) wmalloc(sizeof(WMHost));
|
||||
memset(hPtr, 0, sizeof(WMHost));
|
||||
|
||||
hPtr->names = WMCreateArrayWithDestructor(1, wfree);
|
||||
hPtr->addresses = WMCreateArrayWithDestructor(1, wfree);
|
||||
hPtr->names = WMCreateArrayWithDestructor(1, wfree);
|
||||
hPtr->addresses = WMCreateArrayWithDestructor(1, wfree);
|
||||
|
||||
WMAddToArray(hPtr->names, wstrdup(host->h_name));
|
||||
WMAddToArray(hPtr->names, wstrdup(host->h_name));
|
||||
|
||||
for (i=0; host->h_aliases[i]!=NULL; i++) {
|
||||
WMAddToArray(hPtr->names, wstrdup(host->h_aliases[i]));
|
||||
}
|
||||
for (i = 0; host->h_aliases[i] != NULL; i++) {
|
||||
WMAddToArray(hPtr->names, wstrdup(host->h_aliases[i]));
|
||||
}
|
||||
|
||||
for (i=0; host->h_addr_list[i]!=NULL; i++) {
|
||||
memcpy((void*)&in.s_addr, (const void*)host->h_addr_list[i],
|
||||
host->h_length);
|
||||
WMAddToArray(hPtr->addresses, wstrdup(inet_ntoa(in)));
|
||||
}
|
||||
for (i = 0; host->h_addr_list[i] != NULL; i++) {
|
||||
memcpy((void *)&in.s_addr, (const void *)host->h_addr_list[i], host->h_length);
|
||||
WMAddToArray(hPtr->addresses, wstrdup(inet_ntoa(in)));
|
||||
}
|
||||
|
||||
hPtr->refCount = 1;
|
||||
hPtr->refCount = 1;
|
||||
|
||||
if (hostCacheEnabled) {
|
||||
if (!hostCache)
|
||||
hostCache = WMCreateHashTable(WMStringPointerHashCallbacks);
|
||||
hPtr->name = wstrdup(name);
|
||||
wassertr(WMHashInsert(hostCache, hPtr->name, hPtr)==NULL);
|
||||
hPtr->refCount++;
|
||||
}
|
||||
if (hostCacheEnabled) {
|
||||
if (!hostCache)
|
||||
hostCache = WMCreateHashTable(WMStringPointerHashCallbacks);
|
||||
hPtr->name = wstrdup(name);
|
||||
wassertr(WMHashInsert(hostCache, hPtr->name, hPtr) == NULL);
|
||||
hPtr->refCount++;
|
||||
}
|
||||
|
||||
return hPtr;
|
||||
return hPtr;
|
||||
}
|
||||
|
||||
|
||||
WMHost*
|
||||
WMGetCurrentHost()
|
||||
WMHost *WMGetCurrentHost()
|
||||
{
|
||||
char name[W_MAXHOSTNAMELEN+1];
|
||||
char name[W_MAXHOSTNAMELEN + 1];
|
||||
|
||||
if (gethostname(name, W_MAXHOSTNAMELEN) < 0) {
|
||||
wsyserror(_("Cannot get current host name"));
|
||||
return NULL;
|
||||
}
|
||||
if (gethostname(name, W_MAXHOSTNAMELEN) < 0) {
|
||||
wsyserror(_("Cannot get current host name"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
name[W_MAXHOSTNAMELEN] = 0;
|
||||
name[W_MAXHOSTNAMELEN] = 0;
|
||||
|
||||
return WMGetHostWithName(name);
|
||||
return WMGetHostWithName(name);
|
||||
}
|
||||
|
||||
|
||||
WMHost*
|
||||
WMGetHostWithName(char *name)
|
||||
WMHost *WMGetHostWithName(char *name)
|
||||
{
|
||||
struct hostent *host;
|
||||
WMHost *hPtr;
|
||||
struct hostent *host;
|
||||
WMHost *hPtr;
|
||||
|
||||
wassertrv(name!=NULL, NULL);
|
||||
wassertrv(name != NULL, NULL);
|
||||
|
||||
if (hostCacheEnabled) {
|
||||
if ((hPtr = getHostFromCache(name)) != NULL) {
|
||||
WMRetainHost(hPtr);
|
||||
return hPtr;
|
||||
}
|
||||
}
|
||||
if (hostCacheEnabled) {
|
||||
if ((hPtr = getHostFromCache(name)) != NULL) {
|
||||
WMRetainHost(hPtr);
|
||||
return hPtr;
|
||||
}
|
||||
}
|
||||
|
||||
host = gethostbyname(name);
|
||||
if (host == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
host = gethostbyname(name);
|
||||
if (host == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
hPtr = getHostWithHostEntry(host, name);
|
||||
hPtr = getHostWithHostEntry(host, name);
|
||||
|
||||
return hPtr;
|
||||
return hPtr;
|
||||
}
|
||||
|
||||
|
||||
WMHost*
|
||||
WMGetHostWithAddress(char *address)
|
||||
WMHost *WMGetHostWithAddress(char *address)
|
||||
{
|
||||
struct hostent *host;
|
||||
struct in_addr in;
|
||||
WMHost *hPtr;
|
||||
struct hostent *host;
|
||||
struct in_addr in;
|
||||
WMHost *hPtr;
|
||||
|
||||
wassertrv(address!=NULL, NULL);
|
||||
|
||||
if (hostCacheEnabled) {
|
||||
if ((hPtr = getHostFromCache(address)) != NULL) {
|
||||
WMRetainHost(hPtr);
|
||||
return hPtr;
|
||||
}
|
||||
}
|
||||
wassertrv(address != NULL, NULL);
|
||||
|
||||
if (hostCacheEnabled) {
|
||||
if ((hPtr = getHostFromCache(address)) != NULL) {
|
||||
WMRetainHost(hPtr);
|
||||
return hPtr;
|
||||
}
|
||||
}
|
||||
#ifndef HAVE_INET_ATON
|
||||
if ((in.s_addr = inet_addr(address)) == INADDR_NONE)
|
||||
return NULL;
|
||||
if ((in.s_addr = inet_addr(address)) == INADDR_NONE)
|
||||
return NULL;
|
||||
#else
|
||||
if (inet_aton(address, &in) == 0)
|
||||
return NULL;
|
||||
if (inet_aton(address, &in) == 0)
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
host = gethostbyaddr((char*)&in, sizeof(in), AF_INET);
|
||||
if (host == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
host = gethostbyaddr((char *)&in, sizeof(in), AF_INET);
|
||||
if (host == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
hPtr = getHostWithHostEntry(host, address);
|
||||
hPtr = getHostWithHostEntry(host, address);
|
||||
|
||||
return hPtr;
|
||||
return hPtr;
|
||||
}
|
||||
|
||||
|
||||
WMHost*
|
||||
WMRetainHost(WMHost *hPtr)
|
||||
WMHost *WMRetainHost(WMHost * hPtr)
|
||||
{
|
||||
hPtr->refCount++;
|
||||
return hPtr;
|
||||
hPtr->refCount++;
|
||||
return hPtr;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WMReleaseHost(WMHost *hPtr)
|
||||
void WMReleaseHost(WMHost * hPtr)
|
||||
{
|
||||
hPtr->refCount--;
|
||||
hPtr->refCount--;
|
||||
|
||||
if (hPtr->refCount > 0)
|
||||
return;
|
||||
if (hPtr->refCount > 0)
|
||||
return;
|
||||
|
||||
WMFreeArray(hPtr->names);
|
||||
WMFreeArray(hPtr->addresses);
|
||||
WMFreeArray(hPtr->names);
|
||||
WMFreeArray(hPtr->addresses);
|
||||
|
||||
if (hPtr->name) {
|
||||
WMHashRemove(hostCache, hPtr->name);
|
||||
wfree(hPtr->name);
|
||||
}
|
||||
if (hPtr->name) {
|
||||
WMHashRemove(hostCache, hPtr->name);
|
||||
wfree(hPtr->name);
|
||||
}
|
||||
|
||||
wfree(hPtr);
|
||||
wfree(hPtr);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WMSetHostCacheEnabled(Bool flag)
|
||||
void WMSetHostCacheEnabled(Bool flag)
|
||||
{
|
||||
hostCacheEnabled = ((flag==0) ? 0 : 1);
|
||||
hostCacheEnabled = ((flag == 0) ? 0 : 1);
|
||||
}
|
||||
|
||||
|
||||
Bool
|
||||
WMIsHostCacheEnabled()
|
||||
Bool WMIsHostCacheEnabled()
|
||||
{
|
||||
return hostCacheEnabled;
|
||||
return hostCacheEnabled;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WMFlushHostCache()
|
||||
void WMFlushHostCache()
|
||||
{
|
||||
if (hostCache && WMCountHashTable(hostCache)>0) {
|
||||
WMArray *hostArray = WMCreateArray(WMCountHashTable(hostCache));
|
||||
WMHashEnumerator enumer = WMEnumerateHashTable(hostCache);
|
||||
WMHost *hPtr;
|
||||
int i;
|
||||
if (hostCache && WMCountHashTable(hostCache) > 0) {
|
||||
WMArray *hostArray = WMCreateArray(WMCountHashTable(hostCache));
|
||||
WMHashEnumerator enumer = WMEnumerateHashTable(hostCache);
|
||||
WMHost *hPtr;
|
||||
int i;
|
||||
|
||||
while ((hPtr = WMNextHashEnumeratorItem(&enumer))) {
|
||||
/* we can't release the host here, because we can't change the
|
||||
* hash while using the enumerator functions. */
|
||||
WMAddToArray(hostArray, hPtr);
|
||||
}
|
||||
for (i=0; i<WMGetArrayItemCount(hostArray); i++)
|
||||
WMReleaseHost(WMGetFromArray(hostArray, i));
|
||||
WMFreeArray(hostArray);
|
||||
WMResetHashTable(hostCache);
|
||||
}
|
||||
while ((hPtr = WMNextHashEnumeratorItem(&enumer))) {
|
||||
/* we can't release the host here, because we can't change the
|
||||
* hash while using the enumerator functions. */
|
||||
WMAddToArray(hostArray, hPtr);
|
||||
}
|
||||
for (i = 0; i < WMGetArrayItemCount(hostArray); i++)
|
||||
WMReleaseHost(WMGetFromArray(hostArray, i));
|
||||
WMFreeArray(hostArray);
|
||||
WMResetHashTable(hostCache);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
matchAddress(void *item, void *cdata)
|
||||
static int matchAddress(void *item, void *cdata)
|
||||
{
|
||||
return (strcmp((char*) item, (char*) cdata)==0);
|
||||
return (strcmp((char *)item, (char *)cdata) == 0);
|
||||
}
|
||||
|
||||
|
||||
Bool
|
||||
WMIsHostEqualToHost(WMHost* hPtr, WMHost* aPtr)
|
||||
Bool WMIsHostEqualToHost(WMHost * hPtr, WMHost * aPtr)
|
||||
{
|
||||
char *adr;
|
||||
int i;
|
||||
char *adr;
|
||||
int i;
|
||||
|
||||
wassertrv(hPtr!=NULL && aPtr!=NULL, False);
|
||||
wassertrv(hPtr != NULL && aPtr != NULL, False);
|
||||
|
||||
if (hPtr == aPtr)
|
||||
return True;
|
||||
if (hPtr == aPtr)
|
||||
return True;
|
||||
|
||||
for (i=0; i<WMGetArrayItemCount(aPtr->addresses); i++) {
|
||||
adr = WMGetFromArray(aPtr->addresses, i);
|
||||
if (WMFindInArray(hPtr->addresses, matchAddress, adr) != WANotFound) {
|
||||
return True;
|
||||
}
|
||||
}
|
||||
for (i = 0; i < WMGetArrayItemCount(aPtr->addresses); i++) {
|
||||
adr = WMGetFromArray(aPtr->addresses, i);
|
||||
if (WMFindInArray(hPtr->addresses, matchAddress, adr) != WANotFound) {
|
||||
return True;
|
||||
}
|
||||
}
|
||||
|
||||
return False;
|
||||
return False;
|
||||
}
|
||||
|
||||
|
||||
char*
|
||||
WMGetHostName(WMHost *hPtr)
|
||||
char *WMGetHostName(WMHost * hPtr)
|
||||
{
|
||||
return (WMGetArrayItemCount(hPtr->names) > 0 ?
|
||||
WMGetFromArray(hPtr->names, 0) : NULL);
|
||||
/*return WMGetFromArray(hPtr->names, 0);*/
|
||||
return (WMGetArrayItemCount(hPtr->names) > 0 ? WMGetFromArray(hPtr->names, 0) : NULL);
|
||||
/*return WMGetFromArray(hPtr->names, 0); */
|
||||
}
|
||||
|
||||
|
||||
WMArray*
|
||||
WMGetHostNames(WMHost *hPtr)
|
||||
WMArray *WMGetHostNames(WMHost * hPtr)
|
||||
{
|
||||
return hPtr->names;
|
||||
return hPtr->names;
|
||||
}
|
||||
|
||||
|
||||
char*
|
||||
WMGetHostAddress(WMHost *hPtr)
|
||||
char *WMGetHostAddress(WMHost * hPtr)
|
||||
{
|
||||
return (WMGetArrayItemCount(hPtr->addresses) > 0 ?
|
||||
WMGetFromArray(hPtr->addresses, 0) : NULL);
|
||||
return (WMGetArrayItemCount(hPtr->addresses) > 0 ? WMGetFromArray(hPtr->addresses, 0) : NULL);
|
||||
}
|
||||
|
||||
|
||||
WMArray*
|
||||
WMGetHostAddresses(WMHost *hPtr)
|
||||
WMArray *WMGetHostAddresses(WMHost * hPtr)
|
||||
{
|
||||
return hPtr->addresses;
|
||||
return hPtr->addresses;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
#include "WINGsP.h"
|
||||
|
||||
|
||||
void
|
||||
InitI18n(Display *dpy)
|
||||
void InitI18n(Display * dpy)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
53
WINGs/make-rgb
Executable file
53
WINGs/make-rgb
Executable file
@@ -0,0 +1,53 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import sys
|
||||
import re
|
||||
from optparse import OptionParser
|
||||
|
||||
parser = OptionParser(version="%prog 1.0")
|
||||
parser.add_option("-f", "--file", dest="rgbtxtFile", default='/etc/X11/rgb.txt',
|
||||
help="rgb.txt file containing X11 colors (/etc/X11/rgb.txt)",
|
||||
metavar="File")
|
||||
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
f = open(options.rgbtxtFile)
|
||||
lines = f.readlines()
|
||||
f.close()
|
||||
|
||||
colorLine = re.compile(r'''\s*
|
||||
(?P<red>\d+) # red
|
||||
\s+
|
||||
(?P<green>\d+) # green
|
||||
\s+
|
||||
(?P<blue>\d+) # blue
|
||||
\s+
|
||||
(?P<name>[^\s]+) # name
|
||||
''', re.VERBOSE)
|
||||
|
||||
print '''
|
||||
/* Automatically generated file. Do NOT edit. Regenerate it using make-rgb */
|
||||
|
||||
#ifndef RGB_H_
|
||||
#define RGB_H_
|
||||
|
||||
#include <wraster.h>
|
||||
|
||||
typedef struct RGBColor {
|
||||
RColor color;
|
||||
char *name;
|
||||
} RGBColor;
|
||||
|
||||
RGBColor rgbColors[] = {'''
|
||||
|
||||
for line in lines:
|
||||
m = colorLine.match(line)
|
||||
if m:
|
||||
print ''' {{%(red)3s, %(green)3s, %(blue)3s, 0}, "%(name)s"},''' % m.groupdict()
|
||||
|
||||
print ''' {{ 0, 0, 0, 0}, NULL}
|
||||
};
|
||||
|
||||
#endif
|
||||
'''
|
||||
|
||||
260
WINGs/memory.c
260
WINGs/memory.c
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* Window Maker miscelaneous function library
|
||||
*
|
||||
* Copyright (c) 1997-2002 Alfredo K. Kojima
|
||||
*
|
||||
*
|
||||
* Copyright (c) 1997-2003 Alfredo K. Kojima
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
@@ -18,9 +18,7 @@
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
|
||||
#include "../src/config.h"
|
||||
|
||||
#include "wconfig.h"
|
||||
#include "WUtil.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
@@ -42,181 +40,169 @@
|
||||
# define True 1
|
||||
#endif
|
||||
|
||||
|
||||
static void
|
||||
defaultHandler(int bla)
|
||||
static void defaultHandler(int bla)
|
||||
{
|
||||
if (bla)
|
||||
kill(getpid(), SIGABRT);
|
||||
else
|
||||
exit(1);
|
||||
if (bla)
|
||||
kill(getpid(), SIGABRT);
|
||||
else
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
static waborthandler *aborthandler = (waborthandler*)defaultHandler;
|
||||
static waborthandler *aborthandler = (waborthandler *) defaultHandler;
|
||||
|
||||
#define wAbort(a) (*aborthandler)(a)
|
||||
|
||||
|
||||
waborthandler*
|
||||
wsetabort(waborthandler *handler)
|
||||
waborthandler *wsetabort(waborthandler * handler)
|
||||
{
|
||||
waborthandler *old = aborthandler;
|
||||
waborthandler *old = aborthandler;
|
||||
|
||||
aborthandler = handler;
|
||||
aborthandler = handler;
|
||||
|
||||
return old;
|
||||
return old;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static int Aborting=0; /* if we're in the middle of an emergency exit */
|
||||
|
||||
static int Aborting = 0; /* if we're in the middle of an emergency exit */
|
||||
|
||||
static WMHashTable *table = NULL;
|
||||
|
||||
|
||||
void*
|
||||
wmalloc(size_t size)
|
||||
void *wmalloc(size_t size)
|
||||
{
|
||||
void *tmp;
|
||||
void *tmp;
|
||||
|
||||
assert(size > 0);
|
||||
assert(size > 0);
|
||||
|
||||
#ifdef TEST_WITH_GC
|
||||
tmp = GC_malloc(size);
|
||||
tmp = GC_malloc(size);
|
||||
#else
|
||||
tmp = malloc(size);
|
||||
#endif
|
||||
if (tmp == NULL) {
|
||||
wwarning("malloc() failed. Retrying after 2s.");
|
||||
sleep(2);
|
||||
#ifdef TEST_WITH_GC
|
||||
tmp = GC_malloc(size);
|
||||
#else
|
||||
tmp = malloc(size);
|
||||
tmp = malloc(size);
|
||||
#endif
|
||||
if (tmp == NULL) {
|
||||
if (Aborting) {
|
||||
fputs("Really Bad Error: recursive malloc() failure.", stderr);
|
||||
exit(-1);
|
||||
} else {
|
||||
wfatal("virtual memory exhausted");
|
||||
Aborting=1;
|
||||
wAbort(False);
|
||||
}
|
||||
wwarning("malloc() failed. Retrying after 2s.");
|
||||
sleep(2);
|
||||
#ifdef TEST_WITH_GC
|
||||
tmp = GC_malloc(size);
|
||||
#else
|
||||
tmp = malloc(size);
|
||||
#endif
|
||||
if (tmp == NULL) {
|
||||
if (Aborting) {
|
||||
fputs("Really Bad Error: recursive malloc() failure.", stderr);
|
||||
exit(-1);
|
||||
} else {
|
||||
wfatal("virtual memory exhausted");
|
||||
Aborting = 1;
|
||||
wAbort(False);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return tmp;
|
||||
return tmp;
|
||||
}
|
||||
|
||||
|
||||
void*
|
||||
wrealloc(void *ptr, size_t newsize)
|
||||
void *wmalloc0(size_t size)
|
||||
{
|
||||
void *nptr;
|
||||
void *ptr = wmalloc(size);
|
||||
if (!ptr)
|
||||
return NULL;
|
||||
|
||||
if (!ptr) {
|
||||
nptr = wmalloc(newsize);
|
||||
} else if (newsize==0) {
|
||||
wfree(ptr);
|
||||
nptr = NULL;
|
||||
} else {
|
||||
#ifdef TEST_WITH_GC
|
||||
nptr = GC_realloc(ptr, newsize);
|
||||
#else
|
||||
nptr = realloc(ptr, newsize);
|
||||
#endif
|
||||
if (nptr==NULL) {
|
||||
wwarning("realloc() failed. Retrying after 2s.");
|
||||
sleep(2);
|
||||
#ifdef TEST_WITH_GC
|
||||
nptr = GC_realloc(ptr, newsize);
|
||||
#else
|
||||
nptr = realloc(ptr, newsize);
|
||||
#endif
|
||||
if (nptr == NULL) {
|
||||
if (Aborting) {
|
||||
fputs("Really Bad Error: recursive realloc() failure.",
|
||||
stderr);
|
||||
exit(-1);
|
||||
} else {
|
||||
wfatal("virtual memory exhausted");
|
||||
Aborting=1;
|
||||
wAbort(False);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return nptr;
|
||||
memset(ptr, 0, size);
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
||||
void*
|
||||
wretain(void *ptr)
|
||||
void *wrealloc(void *ptr, size_t newsize)
|
||||
{
|
||||
int *refcount;
|
||||
|
||||
if (!table) {
|
||||
table = WMCreateHashTable(WMIntHashCallbacks);
|
||||
}
|
||||
|
||||
refcount = WMHashGet(table, ptr);
|
||||
if (!refcount) {
|
||||
refcount = wmalloc(sizeof(int));
|
||||
*refcount = 1;
|
||||
WMHashInsert(table, ptr, refcount);
|
||||
#ifdef VERBOSE
|
||||
printf("== %i (%p)\n", *refcount, ptr);
|
||||
void *nptr;
|
||||
|
||||
if (!ptr) {
|
||||
nptr = wmalloc(newsize);
|
||||
} else if (newsize == 0) {
|
||||
wfree(ptr);
|
||||
nptr = NULL;
|
||||
} else {
|
||||
#ifdef TEST_WITH_GC
|
||||
nptr = GC_realloc(ptr, newsize);
|
||||
#else
|
||||
nptr = realloc(ptr, newsize);
|
||||
#endif
|
||||
} else {
|
||||
(*refcount)++;
|
||||
#ifdef VERBOSE
|
||||
printf("+ %i (%p)\n", *refcount, ptr);
|
||||
if (nptr == NULL) {
|
||||
wwarning("realloc() failed. Retrying after 2s.");
|
||||
sleep(2);
|
||||
#ifdef TEST_WITH_GC
|
||||
nptr = GC_realloc(ptr, newsize);
|
||||
#else
|
||||
nptr = realloc(ptr, newsize);
|
||||
#endif
|
||||
}
|
||||
|
||||
return ptr;
|
||||
if (nptr == NULL) {
|
||||
if (Aborting) {
|
||||
fputs("Really Bad Error: recursive realloc() failure.", stderr);
|
||||
exit(-1);
|
||||
} else {
|
||||
wfatal("virtual memory exhausted");
|
||||
Aborting = 1;
|
||||
wAbort(False);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return nptr;
|
||||
}
|
||||
|
||||
void *wretain(void *ptr)
|
||||
{
|
||||
int *refcount;
|
||||
|
||||
if (!table) {
|
||||
table = WMCreateHashTable(WMIntHashCallbacks);
|
||||
}
|
||||
|
||||
void
|
||||
wfree(void *ptr)
|
||||
refcount = WMHashGet(table, ptr);
|
||||
if (!refcount) {
|
||||
refcount = wmalloc(sizeof(int));
|
||||
*refcount = 1;
|
||||
WMHashInsert(table, ptr, refcount);
|
||||
#ifdef VERBOSE
|
||||
printf("== %i (%p)\n", *refcount, ptr);
|
||||
#endif
|
||||
} else {
|
||||
(*refcount)++;
|
||||
#ifdef VERBOSE
|
||||
printf("+ %i (%p)\n", *refcount, ptr);
|
||||
#endif
|
||||
}
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
void wfree(void *ptr)
|
||||
{
|
||||
#ifdef TEST_WITH_GC
|
||||
GC_free(ptr);
|
||||
GC_free(ptr);
|
||||
#else
|
||||
free(ptr);
|
||||
free(ptr);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
wrelease(void *ptr)
|
||||
void wrelease(void *ptr)
|
||||
{
|
||||
int *refcount;
|
||||
|
||||
refcount = WMHashGet(table, ptr);
|
||||
if (!refcount) {
|
||||
wwarning("trying to release unexisting data %p", ptr);
|
||||
} else {
|
||||
(*refcount)--;
|
||||
if (*refcount < 1) {
|
||||
int *refcount;
|
||||
|
||||
refcount = WMHashGet(table, ptr);
|
||||
if (!refcount) {
|
||||
wwarning("trying to release unexisting data %p", ptr);
|
||||
} else {
|
||||
(*refcount)--;
|
||||
if (*refcount < 1) {
|
||||
#ifdef VERBOSE
|
||||
printf("RELEASING %p\n", ptr);
|
||||
printf("RELEASING %p\n", ptr);
|
||||
#endif
|
||||
WMHashRemove(table, ptr);
|
||||
wfree(refcount);
|
||||
wfree(ptr);
|
||||
}
|
||||
WMHashRemove(table, ptr);
|
||||
wfree(refcount);
|
||||
wfree(ptr);
|
||||
}
|
||||
#ifdef VERBOSE
|
||||
else {
|
||||
printf("- %i (%p)\n", *refcount, ptr);
|
||||
}
|
||||
else {
|
||||
printf("- %i (%p)\n", *refcount, ptr);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
14
WINGs/misc.c
14
WINGs/misc.c
@@ -3,16 +3,12 @@
|
||||
|
||||
#include "WINGsP.h"
|
||||
|
||||
|
||||
WMRange
|
||||
wmkrange(int start, int count)
|
||||
WMRange wmkrange(int start, int count)
|
||||
{
|
||||
WMRange range;
|
||||
WMRange range;
|
||||
|
||||
range.position = start;
|
||||
range.count = count;
|
||||
range.position = start;
|
||||
range.count = count;
|
||||
|
||||
return range;
|
||||
return range;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -6,538 +6,466 @@
|
||||
|
||||
#include "WUtil.h"
|
||||
|
||||
|
||||
typedef struct W_Notification {
|
||||
const char *name;
|
||||
void *object;
|
||||
void *clientData;
|
||||
int refCount;
|
||||
const char *name;
|
||||
void *object;
|
||||
void *clientData;
|
||||
int refCount;
|
||||
} Notification;
|
||||
|
||||
|
||||
extern void W_FlushASAPNotificationQueue();
|
||||
|
||||
|
||||
const char*
|
||||
WMGetNotificationName(WMNotification *notification)
|
||||
const char *WMGetNotificationName(WMNotification * notification)
|
||||
{
|
||||
return notification->name;
|
||||
return notification->name;
|
||||
}
|
||||
|
||||
|
||||
void*
|
||||
WMGetNotificationObject(WMNotification *notification)
|
||||
void *WMGetNotificationObject(WMNotification * notification)
|
||||
{
|
||||
return notification->object;
|
||||
return notification->object;
|
||||
}
|
||||
|
||||
|
||||
void*
|
||||
WMGetNotificationClientData(WMNotification *notification)
|
||||
void *WMGetNotificationClientData(WMNotification * notification)
|
||||
{
|
||||
return notification->clientData;
|
||||
return notification->clientData;
|
||||
}
|
||||
|
||||
|
||||
WMNotification*
|
||||
WMCreateNotification(const char *name, void *object, void *clientData)
|
||||
WMNotification *WMCreateNotification(const char *name, void *object, void *clientData)
|
||||
{
|
||||
Notification *nPtr;
|
||||
|
||||
nPtr = wmalloc(sizeof(Notification));
|
||||
|
||||
nPtr->name = name;
|
||||
nPtr->object = object;
|
||||
nPtr->clientData = clientData;
|
||||
|
||||
nPtr->refCount = 1;
|
||||
|
||||
return nPtr;
|
||||
Notification *nPtr;
|
||||
|
||||
nPtr = wmalloc(sizeof(Notification));
|
||||
|
||||
nPtr->name = name;
|
||||
nPtr->object = object;
|
||||
nPtr->clientData = clientData;
|
||||
|
||||
nPtr->refCount = 1;
|
||||
|
||||
return nPtr;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WMReleaseNotification(WMNotification *notification)
|
||||
void WMReleaseNotification(WMNotification * notification)
|
||||
{
|
||||
notification->refCount--;
|
||||
|
||||
if (notification->refCount < 1) {
|
||||
wfree(notification);
|
||||
}
|
||||
notification->refCount--;
|
||||
|
||||
if (notification->refCount < 1) {
|
||||
wfree(notification);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
WMNotification*
|
||||
WMRetainNotification(WMNotification *notification)
|
||||
WMNotification *WMRetainNotification(WMNotification * notification)
|
||||
{
|
||||
notification->refCount++;
|
||||
|
||||
return notification;
|
||||
}
|
||||
notification->refCount++;
|
||||
|
||||
return notification;
|
||||
}
|
||||
|
||||
/***************** Notification Center *****************/
|
||||
|
||||
typedef struct NotificationObserver {
|
||||
WMNotificationObserverAction *observerAction;
|
||||
void *observer;
|
||||
WMNotificationObserverAction *observerAction;
|
||||
void *observer;
|
||||
|
||||
const char *name;
|
||||
void *object;
|
||||
const char *name;
|
||||
void *object;
|
||||
|
||||
struct NotificationObserver *prev; /* for tables */
|
||||
struct NotificationObserver *next;
|
||||
struct NotificationObserver *nextAction; /* for observerTable */
|
||||
struct NotificationObserver *prev; /* for tables */
|
||||
struct NotificationObserver *next;
|
||||
struct NotificationObserver *nextAction; /* for observerTable */
|
||||
} NotificationObserver;
|
||||
|
||||
|
||||
typedef struct W_NotificationCenter {
|
||||
WMHashTable *nameTable; /* names -> observer lists */
|
||||
WMHashTable *objectTable; /* object -> observer lists */
|
||||
NotificationObserver *nilList; /* obervers that catch everything */
|
||||
|
||||
WMHashTable *observerTable; /* observer -> NotificationObserver */
|
||||
} NotificationCenter;
|
||||
WMHashTable *nameTable; /* names -> observer lists */
|
||||
WMHashTable *objectTable; /* object -> observer lists */
|
||||
NotificationObserver *nilList; /* obervers that catch everything */
|
||||
|
||||
WMHashTable *observerTable; /* observer -> NotificationObserver */
|
||||
} NotificationCenter;
|
||||
|
||||
/* default (and only) center */
|
||||
static NotificationCenter *notificationCenter = NULL;
|
||||
|
||||
|
||||
void
|
||||
W_InitNotificationCenter(void)
|
||||
void W_InitNotificationCenter(void)
|
||||
{
|
||||
notificationCenter = wmalloc(sizeof(NotificationCenter));
|
||||
|
||||
notificationCenter->nameTable = WMCreateHashTable(WMStringPointerHashCallbacks);
|
||||
notificationCenter->objectTable = WMCreateHashTable(WMIntHashCallbacks);
|
||||
notificationCenter->nilList = NULL;
|
||||
|
||||
notificationCenter->observerTable = WMCreateHashTable(WMIntHashCallbacks);
|
||||
notificationCenter = wmalloc(sizeof(NotificationCenter));
|
||||
|
||||
notificationCenter->nameTable = WMCreateHashTable(WMStringPointerHashCallbacks);
|
||||
notificationCenter->objectTable = WMCreateHashTable(WMIntHashCallbacks);
|
||||
notificationCenter->nilList = NULL;
|
||||
|
||||
notificationCenter->observerTable = WMCreateHashTable(WMIntHashCallbacks);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WMAddNotificationObserver(WMNotificationObserverAction *observerAction,
|
||||
WMAddNotificationObserver(WMNotificationObserverAction * observerAction,
|
||||
void *observer, const char *name, void *object)
|
||||
{
|
||||
NotificationObserver *oRec, *rec;
|
||||
|
||||
oRec = wmalloc(sizeof(NotificationObserver));
|
||||
oRec->observerAction = observerAction;
|
||||
oRec->observer = observer;
|
||||
oRec->name = name;
|
||||
oRec->object = object;
|
||||
oRec->next = NULL;
|
||||
oRec->prev = NULL;
|
||||
|
||||
|
||||
/* put this action in the list of actions for this observer */
|
||||
rec = (NotificationObserver*)WMHashInsert(notificationCenter->observerTable,
|
||||
observer, oRec);
|
||||
|
||||
if (rec) {
|
||||
/* if this is not the first action for the observer */
|
||||
oRec->nextAction = rec;
|
||||
} else {
|
||||
oRec->nextAction = NULL;
|
||||
}
|
||||
NotificationObserver *oRec, *rec;
|
||||
|
||||
oRec = wmalloc(sizeof(NotificationObserver));
|
||||
oRec->observerAction = observerAction;
|
||||
oRec->observer = observer;
|
||||
oRec->name = name;
|
||||
oRec->object = object;
|
||||
oRec->next = NULL;
|
||||
oRec->prev = NULL;
|
||||
|
||||
/* put this action in the list of actions for this observer */
|
||||
rec = (NotificationObserver *) WMHashInsert(notificationCenter->observerTable, observer, oRec);
|
||||
|
||||
if (!name && !object) {
|
||||
/* catch-all */
|
||||
oRec->next = notificationCenter->nilList;
|
||||
if (notificationCenter->nilList) {
|
||||
notificationCenter->nilList->prev = oRec;
|
||||
}
|
||||
notificationCenter->nilList = oRec;
|
||||
} else if (!name) {
|
||||
/* any message coming from object */
|
||||
rec = (NotificationObserver*)WMHashInsert(notificationCenter->objectTable,
|
||||
object, oRec);
|
||||
oRec->next = rec;
|
||||
if (rec) {
|
||||
rec->prev = oRec;
|
||||
}
|
||||
} else {
|
||||
/* name && (object || !object) */
|
||||
rec = (NotificationObserver*)WMHashInsert(notificationCenter->nameTable,
|
||||
name, oRec);
|
||||
oRec->next = rec;
|
||||
if (rec) {
|
||||
rec->prev = oRec;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WMPostNotification(WMNotification *notification)
|
||||
{
|
||||
NotificationObserver *orec, *tmp;
|
||||
|
||||
WMRetainNotification(notification);
|
||||
|
||||
/* tell the observers that want to know about a particular message */
|
||||
orec = (NotificationObserver*)WMHashGet(notificationCenter->nameTable,
|
||||
notification->name);
|
||||
|
||||
while (orec) {
|
||||
tmp = orec->next;
|
||||
|
||||
if (!orec->object || !notification->object
|
||||
|| orec->object == notification->object) {
|
||||
/* tell the observer */
|
||||
if (orec->observerAction) {
|
||||
(*orec->observerAction)(orec->observer, notification);
|
||||
}
|
||||
}
|
||||
|
||||
orec = tmp;
|
||||
}
|
||||
|
||||
/* tell the observers that want to know about an object */
|
||||
orec = (NotificationObserver*)WMHashGet(notificationCenter->objectTable,
|
||||
notification->object);
|
||||
|
||||
while (orec) {
|
||||
tmp = orec->next;
|
||||
|
||||
/* tell the observer */
|
||||
if (orec->observerAction) {
|
||||
(*orec->observerAction)(orec->observer, notification);
|
||||
}
|
||||
orec = tmp;
|
||||
}
|
||||
|
||||
/* tell the catch all observers */
|
||||
orec = notificationCenter->nilList;
|
||||
while (orec) {
|
||||
tmp = orec->next;
|
||||
|
||||
/* tell the observer */
|
||||
if (orec->observerAction) {
|
||||
(*orec->observerAction)(orec->observer, notification);
|
||||
}
|
||||
orec = tmp;
|
||||
}
|
||||
|
||||
WMReleaseNotification(notification);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WMRemoveNotificationObserver(void *observer)
|
||||
{
|
||||
NotificationObserver *orec, *tmp, *rec;
|
||||
|
||||
/* get the list of actions the observer is doing */
|
||||
orec = (NotificationObserver*)WMHashGet(notificationCenter->observerTable,
|
||||
observer);
|
||||
|
||||
/*
|
||||
* FOREACH orec IN actionlist for observer
|
||||
* DO
|
||||
* remove from respective lists/tables
|
||||
* free
|
||||
* END
|
||||
*/
|
||||
while (orec) {
|
||||
tmp = orec->nextAction;
|
||||
|
||||
if (!orec->name && !orec->object) {
|
||||
/* catch-all */
|
||||
if (notificationCenter->nilList==orec)
|
||||
notificationCenter->nilList = orec->next;
|
||||
} else if (!orec->name) {
|
||||
/* any message coming from object */
|
||||
rec = (NotificationObserver*)WMHashGet(notificationCenter->objectTable,
|
||||
orec->object);
|
||||
if (rec==orec) {
|
||||
/* replace table entry */
|
||||
if (orec->next) {
|
||||
WMHashInsert(notificationCenter->objectTable, orec->object,
|
||||
orec->next);
|
||||
} else {
|
||||
WMHashRemove(notificationCenter->objectTable, orec->object);
|
||||
}
|
||||
}
|
||||
/* if this is not the first action for the observer */
|
||||
oRec->nextAction = rec;
|
||||
} else {
|
||||
/* name && (object || !object) */
|
||||
rec = (NotificationObserver*)WMHashGet(notificationCenter->nameTable,
|
||||
orec->name);
|
||||
if (rec==orec) {
|
||||
/* replace table entry */
|
||||
if (orec->next) {
|
||||
WMHashInsert(notificationCenter->nameTable, orec->name,
|
||||
orec->next);
|
||||
oRec->nextAction = NULL;
|
||||
}
|
||||
|
||||
if (!name && !object) {
|
||||
/* catch-all */
|
||||
oRec->next = notificationCenter->nilList;
|
||||
if (notificationCenter->nilList) {
|
||||
notificationCenter->nilList->prev = oRec;
|
||||
}
|
||||
notificationCenter->nilList = oRec;
|
||||
} else if (!name) {
|
||||
/* any message coming from object */
|
||||
rec = (NotificationObserver *) WMHashInsert(notificationCenter->objectTable, object, oRec);
|
||||
oRec->next = rec;
|
||||
if (rec) {
|
||||
rec->prev = oRec;
|
||||
}
|
||||
} else {
|
||||
/* name && (object || !object) */
|
||||
rec = (NotificationObserver *) WMHashInsert(notificationCenter->nameTable, name, oRec);
|
||||
oRec->next = rec;
|
||||
if (rec) {
|
||||
rec->prev = oRec;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void WMPostNotification(WMNotification * notification)
|
||||
{
|
||||
NotificationObserver *orec, *tmp;
|
||||
|
||||
WMRetainNotification(notification);
|
||||
|
||||
/* tell the observers that want to know about a particular message */
|
||||
orec = (NotificationObserver *) WMHashGet(notificationCenter->nameTable, notification->name);
|
||||
|
||||
while (orec) {
|
||||
tmp = orec->next;
|
||||
|
||||
if (!orec->object || !notification->object || orec->object == notification->object) {
|
||||
/* tell the observer */
|
||||
if (orec->observerAction) {
|
||||
(*orec->observerAction) (orec->observer, notification);
|
||||
}
|
||||
}
|
||||
|
||||
orec = tmp;
|
||||
}
|
||||
|
||||
/* tell the observers that want to know about an object */
|
||||
orec = (NotificationObserver *) WMHashGet(notificationCenter->objectTable, notification->object);
|
||||
|
||||
while (orec) {
|
||||
tmp = orec->next;
|
||||
|
||||
/* tell the observer */
|
||||
if (orec->observerAction) {
|
||||
(*orec->observerAction) (orec->observer, notification);
|
||||
}
|
||||
orec = tmp;
|
||||
}
|
||||
|
||||
/* tell the catch all observers */
|
||||
orec = notificationCenter->nilList;
|
||||
while (orec) {
|
||||
tmp = orec->next;
|
||||
|
||||
/* tell the observer */
|
||||
if (orec->observerAction) {
|
||||
(*orec->observerAction) (orec->observer, notification);
|
||||
}
|
||||
orec = tmp;
|
||||
}
|
||||
|
||||
WMReleaseNotification(notification);
|
||||
}
|
||||
|
||||
void WMRemoveNotificationObserver(void *observer)
|
||||
{
|
||||
NotificationObserver *orec, *tmp, *rec;
|
||||
|
||||
/* get the list of actions the observer is doing */
|
||||
orec = (NotificationObserver *) WMHashGet(notificationCenter->observerTable, observer);
|
||||
|
||||
/*
|
||||
* FOREACH orec IN actionlist for observer
|
||||
* DO
|
||||
* remove from respective lists/tables
|
||||
* free
|
||||
* END
|
||||
*/
|
||||
while (orec) {
|
||||
tmp = orec->nextAction;
|
||||
|
||||
if (!orec->name && !orec->object) {
|
||||
/* catch-all */
|
||||
if (notificationCenter->nilList == orec)
|
||||
notificationCenter->nilList = orec->next;
|
||||
} else if (!orec->name) {
|
||||
/* any message coming from object */
|
||||
rec = (NotificationObserver *) WMHashGet(notificationCenter->objectTable, orec->object);
|
||||
if (rec == orec) {
|
||||
/* replace table entry */
|
||||
if (orec->next) {
|
||||
WMHashInsert(notificationCenter->objectTable, orec->object, orec->next);
|
||||
} else {
|
||||
WMHashRemove(notificationCenter->objectTable, orec->object);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
WMHashRemove(notificationCenter->nameTable, orec->name);
|
||||
/* name && (object || !object) */
|
||||
rec = (NotificationObserver *) WMHashGet(notificationCenter->nameTable, orec->name);
|
||||
if (rec == orec) {
|
||||
/* replace table entry */
|
||||
if (orec->next) {
|
||||
WMHashInsert(notificationCenter->nameTable, orec->name, orec->next);
|
||||
} else {
|
||||
WMHashRemove(notificationCenter->nameTable, orec->name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (orec->prev)
|
||||
orec->prev->next = orec->next;
|
||||
if (orec->next)
|
||||
orec->next->prev = orec->prev;
|
||||
|
||||
wfree(orec);
|
||||
|
||||
orec = tmp;
|
||||
}
|
||||
if (orec->prev)
|
||||
orec->prev->next = orec->next;
|
||||
if (orec->next)
|
||||
orec->next->prev = orec->prev;
|
||||
|
||||
wfree(orec);
|
||||
|
||||
orec = tmp;
|
||||
}
|
||||
|
||||
WMHashRemove(notificationCenter->observerTable, observer);
|
||||
WMHashRemove(notificationCenter->observerTable, observer);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WMRemoveNotificationObserverWithName(void *observer, const char *name, void *object)
|
||||
void WMRemoveNotificationObserverWithName(void *observer, const char *name, void *object)
|
||||
{
|
||||
NotificationObserver *orec, *tmp, *rec;
|
||||
NotificationObserver *newList = NULL;
|
||||
NotificationObserver *orec, *tmp, *rec;
|
||||
NotificationObserver *newList = NULL;
|
||||
|
||||
/* get the list of actions the observer is doing */
|
||||
orec = (NotificationObserver*)WMHashGet(notificationCenter->observerTable, observer);
|
||||
/* get the list of actions the observer is doing */
|
||||
orec = (NotificationObserver *) WMHashGet(notificationCenter->observerTable, observer);
|
||||
|
||||
WMHashRemove(notificationCenter->observerTable, observer);
|
||||
WMHashRemove(notificationCenter->observerTable, observer);
|
||||
|
||||
/* rebuild the list of actions for the observer */
|
||||
/* rebuild the list of actions for the observer */
|
||||
|
||||
while (orec) {
|
||||
tmp = orec->nextAction;
|
||||
if (orec->name == name && orec->object == object) {
|
||||
if (!name && !object) {
|
||||
if (notificationCenter->nilList == orec)
|
||||
notificationCenter->nilList = orec->next;
|
||||
} else if (!name) {
|
||||
rec = (NotificationObserver*)WMHashGet(notificationCenter->objectTable, orec->object);
|
||||
if (rec==orec) {
|
||||
assert(rec->prev==NULL);
|
||||
/* replace table entry */
|
||||
if (orec->next) {
|
||||
WMHashInsert(notificationCenter->objectTable,
|
||||
orec->object, orec->next);
|
||||
} else {
|
||||
WMHashRemove(notificationCenter->objectTable,
|
||||
orec->object);
|
||||
}
|
||||
while (orec) {
|
||||
tmp = orec->nextAction;
|
||||
if (orec->name == name && orec->object == object) {
|
||||
if (!name && !object) {
|
||||
if (notificationCenter->nilList == orec)
|
||||
notificationCenter->nilList = orec->next;
|
||||
} else if (!name) {
|
||||
rec =
|
||||
(NotificationObserver *) WMHashGet(notificationCenter->objectTable,
|
||||
orec->object);
|
||||
if (rec == orec) {
|
||||
assert(rec->prev == NULL);
|
||||
/* replace table entry */
|
||||
if (orec->next) {
|
||||
WMHashInsert(notificationCenter->objectTable,
|
||||
orec->object, orec->next);
|
||||
} else {
|
||||
WMHashRemove(notificationCenter->objectTable, orec->object);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
rec = (NotificationObserver *) WMHashGet(notificationCenter->nameTable,
|
||||
orec->name);
|
||||
if (rec == orec) {
|
||||
assert(rec->prev == NULL);
|
||||
/* replace table entry */
|
||||
if (orec->next) {
|
||||
WMHashInsert(notificationCenter->nameTable,
|
||||
orec->name, orec->next);
|
||||
} else {
|
||||
WMHashRemove(notificationCenter->nameTable, orec->name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (orec->prev)
|
||||
orec->prev->next = orec->next;
|
||||
if (orec->next)
|
||||
orec->next->prev = orec->prev;
|
||||
wfree(orec);
|
||||
} else {
|
||||
/* append this action in the new action list */
|
||||
orec->nextAction = NULL;
|
||||
if (!newList) {
|
||||
newList = orec;
|
||||
} else {
|
||||
NotificationObserver *p;
|
||||
|
||||
p = newList;
|
||||
while (p->nextAction) {
|
||||
p = p->nextAction;
|
||||
}
|
||||
p->nextAction = orec;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
rec = (NotificationObserver*)WMHashGet(notificationCenter->nameTable,
|
||||
orec->name);
|
||||
if (rec==orec) {
|
||||
assert(rec->prev==NULL);
|
||||
/* replace table entry */
|
||||
if (orec->next) {
|
||||
WMHashInsert(notificationCenter->nameTable,
|
||||
orec->name, orec->next);
|
||||
} else {
|
||||
WMHashRemove(notificationCenter->nameTable,
|
||||
orec->name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (orec->prev)
|
||||
orec->prev->next = orec->next;
|
||||
if (orec->next)
|
||||
orec->next->prev = orec->prev;
|
||||
wfree(orec);
|
||||
} else {
|
||||
/* append this action in the new action list */
|
||||
orec->nextAction = NULL;
|
||||
if (!newList) {
|
||||
newList = orec;
|
||||
} else {
|
||||
NotificationObserver *p;
|
||||
|
||||
p = newList;
|
||||
while (p->nextAction) {
|
||||
p = p->nextAction;
|
||||
}
|
||||
p->nextAction = orec;
|
||||
}
|
||||
orec = tmp;
|
||||
}
|
||||
orec = tmp;
|
||||
}
|
||||
|
||||
/* reinsert the list to the table */
|
||||
if (newList) {
|
||||
WMHashInsert(notificationCenter->observerTable, observer, newList);
|
||||
}
|
||||
/* reinsert the list to the table */
|
||||
if (newList) {
|
||||
WMHashInsert(notificationCenter->observerTable, observer, newList);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WMPostNotificationName(const char *name, void *object, void *clientData)
|
||||
void WMPostNotificationName(const char *name, void *object, void *clientData)
|
||||
{
|
||||
WMNotification *notification;
|
||||
WMNotification *notification;
|
||||
|
||||
notification = WMCreateNotification(name, object, clientData);
|
||||
|
||||
WMPostNotification(notification);
|
||||
notification = WMCreateNotification(name, object, clientData);
|
||||
|
||||
WMReleaseNotification(notification);
|
||||
WMPostNotification(notification);
|
||||
|
||||
WMReleaseNotification(notification);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**************** Notification Queues ****************/
|
||||
|
||||
|
||||
typedef struct W_NotificationQueue {
|
||||
WMArray *asapQueue;
|
||||
WMArray *idleQueue;
|
||||
WMArray *asapQueue;
|
||||
WMArray *idleQueue;
|
||||
|
||||
struct W_NotificationQueue *next;
|
||||
struct W_NotificationQueue *next;
|
||||
} NotificationQueue;
|
||||
|
||||
|
||||
static WMNotificationQueue *notificationQueueList = NULL;
|
||||
|
||||
/* default queue */
|
||||
static WMNotificationQueue *notificationQueue = NULL;
|
||||
|
||||
|
||||
WMNotificationQueue*
|
||||
WMGetDefaultNotificationQueue(void)
|
||||
WMNotificationQueue *WMGetDefaultNotificationQueue(void)
|
||||
{
|
||||
if (!notificationQueue)
|
||||
notificationQueue = WMCreateNotificationQueue();
|
||||
if (!notificationQueue)
|
||||
notificationQueue = WMCreateNotificationQueue();
|
||||
|
||||
return notificationQueue;
|
||||
return notificationQueue;
|
||||
}
|
||||
|
||||
|
||||
WMNotificationQueue*
|
||||
WMCreateNotificationQueue(void)
|
||||
WMNotificationQueue *WMCreateNotificationQueue(void)
|
||||
{
|
||||
NotificationQueue *queue;
|
||||
NotificationQueue *queue;
|
||||
|
||||
queue = wmalloc(sizeof(NotificationQueue));
|
||||
queue = wmalloc(sizeof(NotificationQueue));
|
||||
|
||||
queue->asapQueue =
|
||||
WMCreateArrayWithDestructor(8, (WMFreeDataProc*)WMReleaseNotification);
|
||||
queue->idleQueue =
|
||||
WMCreateArrayWithDestructor(8, (WMFreeDataProc*)WMReleaseNotification);
|
||||
queue->next = notificationQueueList;
|
||||
queue->asapQueue = WMCreateArrayWithDestructor(8, (WMFreeDataProc *) WMReleaseNotification);
|
||||
queue->idleQueue = WMCreateArrayWithDestructor(8, (WMFreeDataProc *) WMReleaseNotification);
|
||||
queue->next = notificationQueueList;
|
||||
|
||||
notificationQueueList = queue;
|
||||
notificationQueueList = queue;
|
||||
|
||||
return queue;
|
||||
return queue;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
WMEnqueueNotification(WMNotificationQueue *queue, WMNotification *notification,
|
||||
WMPostingStyle postingStyle)
|
||||
void WMEnqueueNotification(WMNotificationQueue * queue, WMNotification * notification, WMPostingStyle postingStyle)
|
||||
{
|
||||
WMEnqueueCoalesceNotification(queue, notification, postingStyle,
|
||||
WNCOnName|WNCOnSender);
|
||||
WMEnqueueCoalesceNotification(queue, notification, postingStyle, WNCOnName | WNCOnSender);
|
||||
}
|
||||
|
||||
|
||||
#define NOTIF ((WMNotification*)cdata)
|
||||
#define ITEM ((WMNotification*)item)
|
||||
|
||||
static int
|
||||
matchSenderAndName(void *item, void *cdata)
|
||||
static int matchSenderAndName(void *item, void *cdata)
|
||||
{
|
||||
return (NOTIF->object==ITEM->object && strcmp(NOTIF->name, ITEM->name)==0);
|
||||
return (NOTIF->object == ITEM->object && strcmp(NOTIF->name, ITEM->name) == 0);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
matchSender(void *item, void *cdata)
|
||||
static int matchSender(void *item, void *cdata)
|
||||
{
|
||||
return (NOTIF->object == ITEM->object);
|
||||
return (NOTIF->object == ITEM->object);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
matchName(void *item, void *cdata)
|
||||
static int matchName(void *item, void *cdata)
|
||||
{
|
||||
return (strcmp(NOTIF->name, ITEM->name)==0);
|
||||
return (strcmp(NOTIF->name, ITEM->name) == 0);
|
||||
}
|
||||
|
||||
#undef NOTIF
|
||||
#undef ITEM
|
||||
|
||||
|
||||
void
|
||||
WMDequeueNotificationMatching(WMNotificationQueue *queue,
|
||||
WMNotification *notification, unsigned mask)
|
||||
void WMDequeueNotificationMatching(WMNotificationQueue * queue, WMNotification * notification, unsigned mask)
|
||||
{
|
||||
WMMatchDataProc *matchFunc;
|
||||
WMMatchDataProc *matchFunc;
|
||||
|
||||
if ((mask & WNCOnName) && (mask & WNCOnSender))
|
||||
matchFunc = matchSenderAndName;
|
||||
else if (mask & WNCOnName)
|
||||
matchFunc = matchName;
|
||||
else if (mask & WNCOnSender)
|
||||
matchFunc = matchSender;
|
||||
else
|
||||
return;
|
||||
if ((mask & WNCOnName) && (mask & WNCOnSender))
|
||||
matchFunc = matchSenderAndName;
|
||||
else if (mask & WNCOnName)
|
||||
matchFunc = matchName;
|
||||
else if (mask & WNCOnSender)
|
||||
matchFunc = matchSender;
|
||||
else
|
||||
return;
|
||||
|
||||
WMRemoveFromArrayMatching(queue->asapQueue, matchFunc, notification);
|
||||
WMRemoveFromArrayMatching(queue->idleQueue, matchFunc, notification);
|
||||
WMRemoveFromArrayMatching(queue->asapQueue, matchFunc, notification);
|
||||
WMRemoveFromArrayMatching(queue->idleQueue, matchFunc, notification);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WMEnqueueCoalesceNotification(WMNotificationQueue *queue,
|
||||
WMNotification *notification,
|
||||
WMPostingStyle postingStyle,
|
||||
unsigned coalesceMask)
|
||||
WMEnqueueCoalesceNotification(WMNotificationQueue * queue,
|
||||
WMNotification * notification, WMPostingStyle postingStyle, unsigned coalesceMask)
|
||||
{
|
||||
if (coalesceMask != WNCNone)
|
||||
WMDequeueNotificationMatching(queue, notification, coalesceMask);
|
||||
if (coalesceMask != WNCNone)
|
||||
WMDequeueNotificationMatching(queue, notification, coalesceMask);
|
||||
|
||||
switch (postingStyle) {
|
||||
case WMPostNow:
|
||||
WMPostNotification(notification);
|
||||
WMReleaseNotification(notification);
|
||||
break;
|
||||
switch (postingStyle) {
|
||||
case WMPostNow:
|
||||
WMPostNotification(notification);
|
||||
WMReleaseNotification(notification);
|
||||
break;
|
||||
|
||||
case WMPostASAP:
|
||||
WMAddToArray(queue->asapQueue, notification);
|
||||
break;
|
||||
case WMPostASAP:
|
||||
WMAddToArray(queue->asapQueue, notification);
|
||||
break;
|
||||
|
||||
case WMPostWhenIdle:
|
||||
WMAddToArray(queue->idleQueue, notification);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
W_FlushASAPNotificationQueue()
|
||||
{
|
||||
WMNotificationQueue *queue = notificationQueueList;
|
||||
|
||||
while (queue) {
|
||||
while (WMGetArrayItemCount(queue->asapQueue)) {
|
||||
WMPostNotification(WMGetFromArray(queue->asapQueue, 0));
|
||||
WMDeleteFromArray(queue->asapQueue, 0);
|
||||
case WMPostWhenIdle:
|
||||
WMAddToArray(queue->idleQueue, notification);
|
||||
break;
|
||||
}
|
||||
|
||||
queue = queue->next;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
W_FlushIdleNotificationQueue()
|
||||
void W_FlushASAPNotificationQueue()
|
||||
{
|
||||
WMNotificationQueue *queue = notificationQueueList;
|
||||
WMNotificationQueue *queue = notificationQueueList;
|
||||
|
||||
while (queue) {
|
||||
while (WMGetArrayItemCount(queue->idleQueue)) {
|
||||
WMPostNotification(WMGetFromArray(queue->idleQueue, 0));
|
||||
WMDeleteFromArray(queue->idleQueue, 0);
|
||||
while (queue) {
|
||||
while (WMGetArrayItemCount(queue->asapQueue)) {
|
||||
WMPostNotification(WMGetFromArray(queue->asapQueue, 0));
|
||||
WMDeleteFromArray(queue->asapQueue, 0);
|
||||
}
|
||||
|
||||
queue = queue->next;
|
||||
}
|
||||
|
||||
queue = queue->next;
|
||||
}
|
||||
}
|
||||
|
||||
void W_FlushIdleNotificationQueue()
|
||||
{
|
||||
WMNotificationQueue *queue = notificationQueueList;
|
||||
|
||||
while (queue) {
|
||||
while (WMGetArrayItemCount(queue->idleQueue)) {
|
||||
WMPostNotification(WMGetFromArray(queue->idleQueue, 0));
|
||||
WMDeleteFromArray(queue->idleQueue, 0);
|
||||
}
|
||||
|
||||
queue = queue->next;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Makefile Makefile.in
|
||||
.psrc .inslog2 tca.map tca.log
|
||||
*.rpt
|
||||
.psrc .inslog2 tca.map tca.log pchdir *.rpt
|
||||
*.pot
|
||||
*.mo
|
||||
|
||||
@@ -4,7 +4,7 @@ CATALOGS = @WINGSMOFILES@
|
||||
|
||||
CLEANFILES = $(CATALOGS) WINGs.pot
|
||||
|
||||
EXTRA_DIST = cs.po de.po sk.po fr.po
|
||||
EXTRA_DIST = bg.po ca.po cs.po de.po fr.po sk.po
|
||||
|
||||
POTFILES = \
|
||||
$(top_builddir)/WINGs/connection.c \
|
||||
@@ -24,12 +24,14 @@ POTFILES = \
|
||||
SUFFIXES = .po .mo
|
||||
|
||||
.po.mo:
|
||||
msgfmt -o $@ $<
|
||||
msgfmt -c -o $@ $<
|
||||
|
||||
|
||||
all-local: $(CATALOGS)
|
||||
|
||||
WINGs.pot: $(POTFILES)
|
||||
xgettext --default-domain=WINGs \
|
||||
--add-comments --keyword=_ $(POTFILES)
|
||||
--add-comments --keyword=_ --keyword=N_ $(POTFILES)
|
||||
if cmp -s WINGs.po WINGs.pot; then \
|
||||
rm -f WINGs.po; \
|
||||
else \
|
||||
|
||||
@@ -2,14 +2,18 @@
|
||||
Instructions for translating po files can be found in the po/README directory
|
||||
in the top of the WindowMaker source tree.
|
||||
|
||||
All files are in UTF-8
|
||||
|
||||
File Language Note Current Maintainer
|
||||
------------------------------------------------------------------------------
|
||||
cs.po Czech 1 Jiri Hnidek <Jiri.Hnidek@vslib.cz
|
||||
de.po German 1 Guido Scholz <guido.scholz@bayernline.de>
|
||||
sk.po Slovak 1 Jan 'judas' Tomka <judas@linux.sk>
|
||||
ca.po Catalan Ernest Adrogué <eadrogue@gmx.net>
|
||||
cs.po Czech Jiri Hnidek <Jiri.Hnidek@vslib.cz
|
||||
de.po German Guido Scholz <guido.scholz@bayernline.de>
|
||||
fr.po French Emmanuel Benoit <tseeker@neptune.fr>
|
||||
Antoine Hulin <antoine@origan.fdn.org>
|
||||
sk.po Slovak Jan 'judas' Tomka <judas@linux.sk>
|
||||
bg.po Bulgarian Anton Zinoviev <zinoviev@debian.org>
|
||||
|
||||
Notes
|
||||
-----
|
||||
1. Uses iso8859-2 character set.
|
||||
|
||||
|
||||
660
WINGs/po/bg.po
Normal file
660
WINGs/po/bg.po
Normal file
@@ -0,0 +1,660 @@
|
||||
# Message catalog for WINGs
|
||||
# Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
# Anton Zinoviev <zinoviev@debian.org>, 2003
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WINGs 0.80.0\n"
|
||||
"POT-Creation-Date: 2003-02-08 21:42+0200\n"
|
||||
"PO-Revision-Date: 2003-02-09 12:10+0200\n"
|
||||
"Last-Translator: Anton Zinoviev <zinoviev@debian.org>\n"
|
||||
"Language-Team: Bulgarian <dict@linux.zonebg.com>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../../WINGs/connection.c:461 ../../WINGs/connection.c:526
|
||||
#: ../../WINGs/connection.c:569
|
||||
msgid "Bad address-service-protocol combination"
|
||||
msgstr "Неправилна комбинация адрес-услуга-протокол"
|
||||
|
||||
#: ../../WINGs/error.c:54
|
||||
#, c-format
|
||||
msgid "Unknown error %d"
|
||||
msgstr "Непозната грешка %d"
|
||||
|
||||
#: ../../WINGs/error.c:59
|
||||
#, c-format
|
||||
msgid "Error %d"
|
||||
msgstr "Грешка %d"
|
||||
|
||||
#: ../../WINGs/error.c:110
|
||||
msgid " warning: "
|
||||
msgstr "внимание: "
|
||||
|
||||
#: ../../WINGs/error.c:137
|
||||
msgid " fatal error: "
|
||||
msgstr " критична грешка: "
|
||||
|
||||
#: ../../WINGs/error.c:163 ../../WINGs/error.c:192
|
||||
msgid " error: "
|
||||
msgstr " грешка: "
|
||||
|
||||
#: ../../WINGs/findfile.c:48
|
||||
#, c-format
|
||||
msgid "could not get password entry for UID %i"
|
||||
msgstr "не може да се получи записът за парола на потребител с номер %i"
|
||||
|
||||
#: ../../WINGs/findfile.c:66
|
||||
#, c-format
|
||||
msgid "could not get password entry for user %s"
|
||||
msgstr "не може да се получи записът за парола на потребител %s<"
|
||||
|
||||
#: ../../WINGs/host.c:114
|
||||
msgid "Cannot get current host name"
|
||||
msgstr "Не може да се получи името на хоста"
|
||||
|
||||
#: ../../WINGs/proplist.c:91
|
||||
#, c-format
|
||||
msgid "syntax error in %s %s, line %i: %s"
|
||||
msgstr "синтактична грешка в %s %s, ред %i: %s"
|
||||
|
||||
#: ../../WINGs/proplist.c:150
|
||||
msgid "Only string or data is supported for a proplist dictionary key"
|
||||
msgstr "Като ключ за достъп до proplist се поддържат само низове или данни"
|
||||
|
||||
#: ../../WINGs/proplist.c:184 ../../WINGs/proplist.c:236
|
||||
#: ../../WINGs/proplist.c:394 ../../WINGs/proplist.c:474
|
||||
#: ../../WINGs/proplist.c:1075 ../../WINGs/proplist.c:1127
|
||||
#: ../../WINGs/proplist.c:1293 ../../WINGs/proplist.c:1372
|
||||
#: ../../WINGs/proplist.c:1493 ../../WINGs/proplist.c:1540
|
||||
msgid "Used proplist functions on non-WMPropLists objects"
|
||||
msgstr "Ползват се proplist-функции за обекти, които не са от тип WMPropLists"
|
||||
|
||||
#: ../../WINGs/proplist.c:630
|
||||
msgid "unterminated PropList string"
|
||||
msgstr "незавършен низ PropList"
|
||||
|
||||
#: ../../WINGs/proplist.c:670
|
||||
msgid "unterminated PropList data"
|
||||
msgstr "незавършени данни PropList"
|
||||
|
||||
#: ../../WINGs/proplist.c:678
|
||||
msgid "unterminated PropList data (missing hexdigit)"
|
||||
msgstr "незавършени данни PropList (липсва шестнадесетично число)"
|
||||
|
||||
#: ../../WINGs/proplist.c:690 ../../WINGs/proplist.c:695
|
||||
msgid "non hexdigit character in PropList data"
|
||||
msgstr "знак, който не е шестнадесетично число, в данни PropList"
|
||||
|
||||
#: ../../WINGs/proplist.c:729
|
||||
msgid "unterminated PropList array"
|
||||
msgstr "незавършен масив PropList"
|
||||
|
||||
#: ../../WINGs/proplist.c:737
|
||||
msgid "missing or unterminated PropList array"
|
||||
msgstr "липсващ или незавършен масив Proplist"
|
||||
|
||||
#: ../../WINGs/proplist.c:747
|
||||
msgid "could not get PropList array element"
|
||||
msgstr "не може да се получи елемент от масив PropList"
|
||||
|
||||
#: ../../WINGs/proplist.c:776
|
||||
msgid "unterminated PropList dictionary"
|
||||
msgstr "незавършен речник PropList"
|
||||
|
||||
#: ../../WINGs/proplist.c:793
|
||||
msgid "missing PropList dictionary key"
|
||||
msgstr "липсващ ключ за достъп до PropList"
|
||||
|
||||
#: ../../WINGs/proplist.c:795
|
||||
msgid "missing PropList dictionary entry key or unterminated dictionary"
|
||||
msgstr "липсващ ключ за достъп до PropList или незавършен речник"
|
||||
|
||||
#: ../../WINGs/proplist.c:803
|
||||
msgid "error parsing PropList dictionary key"
|
||||
msgstr "грешка при разбор на ключ в PropList"
|
||||
|
||||
#: ../../WINGs/proplist.c:811
|
||||
msgid "missing = in PropList dictionary entry"
|
||||
msgstr "липсва знак за равенство в елемент на PropList"
|
||||
|
||||
#: ../../WINGs/proplist.c:819
|
||||
msgid "error parsing PropList dictionary entry value"
|
||||
msgstr "грешка при разбор на стойност на елемент в PropList"
|
||||
|
||||
#: ../../WINGs/proplist.c:827
|
||||
msgid "missing ; in PropList dictionary entry"
|
||||
msgstr "липсва знак точка и запетая в елемент на PropList"
|
||||
|
||||
#: ../../WINGs/proplist.c:888
|
||||
msgid ""
|
||||
"was expecting a string, data, array or dictionary. If it's a string, try "
|
||||
"enclosing it with \"."
|
||||
msgstr "очакваха се низ, данни, масив или речник. Ако е речник, пробвайте да го оградите с \"."
|
||||
|
||||
#: ../../WINGs/proplist.c:892
|
||||
msgid "Comments are not allowed inside WindowMaker owned domain files."
|
||||
msgstr "Не се позволяват коментари във файлове с области, собственост на Уиндоу Мейкър"
|
||||
|
||||
#: ../../WINGs/proplist.c:1563 ../../WINGs/proplist.c:1628
|
||||
msgid "extra data after end of property list"
|
||||
msgstr "данни в повече след края на списък свойства"
|
||||
|
||||
#: ../../WINGs/proplist.c:1606
|
||||
#, c-format
|
||||
msgid "could not get size for file '%s'"
|
||||
msgstr "не може да се получи размерът за файл \"%s\""
|
||||
|
||||
#: ../../WINGs/proplist.c:1618
|
||||
#, c-format
|
||||
msgid "error reading from file '%s'"
|
||||
msgstr "грешка при четене от файл \"%s\""
|
||||
|
||||
#: ../../WINGs/proplist.c:1669
|
||||
#, c-format
|
||||
msgid "mkstemp (%s) failed"
|
||||
msgstr "mkstemp (%s) не успя"
|
||||
|
||||
#: ../../WINGs/proplist.c:1680
|
||||
#, c-format
|
||||
msgid "mktemp (%s) failed"
|
||||
msgstr "mktemp (%s) не успя"
|
||||
|
||||
#: ../../WINGs/proplist.c:1691
|
||||
#, c-format
|
||||
msgid "open (%s) failed"
|
||||
msgstr "open (%s) не успя"
|
||||
|
||||
#: ../../WINGs/proplist.c:1698
|
||||
#, c-format
|
||||
msgid "writing to file: %s failed"
|
||||
msgstr "записът във файл %s не успя"
|
||||
|
||||
#: ../../WINGs/proplist.c:1706
|
||||
#, c-format
|
||||
msgid "fclose (%s) failed"
|
||||
msgstr "fclose (%s) не успя"
|
||||
|
||||
#: ../../WINGs/proplist.c:1715
|
||||
#, c-format
|
||||
msgid "rename ('%s' to '%s') failed"
|
||||
msgstr "преименуването (от \"%s\" на \"%s\") не успя"
|
||||
|
||||
#. something happened with the file. just overwrite it
|
||||
#: ../../WINGs/userdefaults.c:192 ../../WINGs/userdefaults.c:208
|
||||
#, c-format
|
||||
msgid "cannot read domain from file '%s' when syncing"
|
||||
msgstr "не може да се прочете областта от файл \"%s\" при синхронизиране"
|
||||
|
||||
#: ../../WINGs/wcolor.c:198 ../../WINGs/wcolor.c:211 ../../WINGs/wcolor.c:250
|
||||
#: ../../WINGs/wcolor.c:291
|
||||
#, c-format
|
||||
msgid "could not allocate %s color"
|
||||
msgstr "не може да се задели цвят %s"
|
||||
|
||||
#: ../../WINGs/wcolor.c:198
|
||||
msgid "white"
|
||||
msgstr "бял"
|
||||
|
||||
#: ../../WINGs/wcolor.c:211
|
||||
msgid "black"
|
||||
msgstr "черен"
|
||||
|
||||
#: ../../WINGs/wcolor.c:250
|
||||
msgid "gray"
|
||||
msgstr "сив"
|
||||
|
||||
#: ../../WINGs/wcolor.c:291
|
||||
msgid "dark gray"
|
||||
msgstr "тъмносив"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:415
|
||||
msgid "Colors"
|
||||
msgstr "Цветове"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:605 ../../WINGs/wcolorpanel.c:2824
|
||||
msgid "Brightness"
|
||||
msgstr "Яркост"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:607 ../../WINGs/wcolorpanel.c:683
|
||||
#: ../../WINGs/wcolorpanel.c:716 ../../WINGs/wcolorpanel.c:750
|
||||
#: ../../WINGs/wcolorpanel.c:810 ../../WINGs/wcolorpanel.c:844
|
||||
#: ../../WINGs/wcolorpanel.c:878 ../../WINGs/wcolorpanel.c:913
|
||||
#: ../../WINGs/wcolorpanel.c:2164 ../../WINGs/wcolorpanel.c:2826
|
||||
#: ../../WINGs/wcolorpanel.c:2862 ../../WINGs/wcolorpanel.c:2898
|
||||
#: ../../WINGs/wcolorpanel.c:3746
|
||||
msgid "Color Panel: Could not allocate memory"
|
||||
msgstr "Color Panel: не може да се задели памет"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:680 ../../WINGs/wcolorpanel.c:681
|
||||
msgid "Red"
|
||||
msgstr "Червен"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:713 ../../WINGs/wcolorpanel.c:714
|
||||
msgid "Green"
|
||||
msgstr "Зелен"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:747 ../../WINGs/wcolorpanel.c:748
|
||||
msgid "Blue"
|
||||
msgstr "Син"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:807 ../../WINGs/wcolorpanel.c:808
|
||||
msgid "Cyan"
|
||||
msgstr "Синьозелен"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:841 ../../WINGs/wcolorpanel.c:842
|
||||
msgid "Magenta"
|
||||
msgstr "Пурпурен"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:875 ../../WINGs/wcolorpanel.c:876
|
||||
msgid "Yellow"
|
||||
msgstr "Жълт"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:910 ../../WINGs/wcolorpanel.c:911
|
||||
msgid "Black"
|
||||
msgstr "Черен"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:991
|
||||
msgid "Spectrum"
|
||||
msgstr "Спектър"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1021
|
||||
msgid "Palette"
|
||||
msgstr "Палитра"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1027
|
||||
msgid "New from File..."
|
||||
msgstr "Нова от файл..."
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1028 ../../WINGs/wcolorpanel.c:1076
|
||||
#: ../../WINGs/wcolorpanel.c:1093
|
||||
msgid "Rename..."
|
||||
msgstr "Преименувай..."
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1029 ../../WINGs/wcolorpanel.c:1077
|
||||
#: ../../WINGs/wcolorpanel.c:1094 ../../WINGs/wcolorpanel.c:3321
|
||||
msgid "Remove"
|
||||
msgstr "Премахни"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1030
|
||||
msgid "Copy"
|
||||
msgstr "Копирай"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1031
|
||||
#, fuzzy
|
||||
msgid "New from Clipboard"
|
||||
msgstr "Нова от Clipboard"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1052
|
||||
msgid "X11-Colors"
|
||||
msgstr "Цветове от X11"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1069
|
||||
msgid "Color"
|
||||
msgstr "Цвят"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1075
|
||||
msgid "Add..."
|
||||
msgstr "Добави..."
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1085
|
||||
msgid "List"
|
||||
msgstr "Списък"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1092
|
||||
msgid "New..."
|
||||
msgstr "Нов..."
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1231
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Color Panel: Could not create directory %s needed to store configurations"
|
||||
msgstr "Color Panel: Не може да се създаде директория %s, необходима за да се запазят настройките"
|
||||
|
||||
#. Delete the file, it doesn't belong here
|
||||
#: ../../WINGs/wcolorpanel.c:1237 ../../WINGs/wcolorpanel.c:3207
|
||||
#: ../../WINGs/wcolorpanel.c:3211
|
||||
msgid "File Error"
|
||||
msgstr "Файлова грешка"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1238
|
||||
msgid "Could not create ColorPanel configuration directory"
|
||||
msgstr "Не може да се създаде конфигурационна директория за ColorPanel"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1239 ../../WINGs/wcolorpanel.c:3208
|
||||
#: ../../WINGs/wcolorpanel.c:3213 ../../WINGs/wcolorpanel.c:3240
|
||||
#: ../../WINGs/wfilepanel.c:250 ../../WINGs/wfilepanel.c:647
|
||||
#: ../../WINGs/wfilepanel.c:659 ../../WINGs/wfilepanel.c:760
|
||||
#: ../../WINGs/wfilepanel.c:971 ../../WINGs/wfontpanel.c:709
|
||||
msgid "OK"
|
||||
msgstr "Приемам"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1245 ../../WINGs/wcolorpanel.c:1281
|
||||
#: ../../WINGs/wcolorpanel.c:1299
|
||||
msgid "Color Panel: Could not find file"
|
||||
msgstr "Color Panel: Не може да се открие файла"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1486 ../../WINGs/wcolorpanel.c:1551
|
||||
#: ../../WINGs/wcolorpanel.c:1615
|
||||
msgid "Color Panel: X failed request"
|
||||
msgstr "Color Panel: не успя заявка към X"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:2860
|
||||
msgid "Saturation"
|
||||
msgstr "Наситеност"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:2896
|
||||
msgid "Hue"
|
||||
msgstr "Нюанс"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3146
|
||||
msgid "Open Palette"
|
||||
msgstr "Отваряне на палитра"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3208
|
||||
msgid "Invalid file format !"
|
||||
msgstr "Неправилен файлов формат!"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3210
|
||||
#, c-format
|
||||
msgid "can't remove file %s"
|
||||
msgstr "не може да се изтрие файлът %s"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3212
|
||||
msgid "Couldn't remove file from Configuration Directory !"
|
||||
msgstr "Не може да се изтрие файл от директорията за настройки!"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3239
|
||||
msgid "Rename"
|
||||
msgstr "Преименуване"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3239
|
||||
msgid "Rename palette to:"
|
||||
msgstr "Преименувай палитрата на "
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3240 ../../WINGs/wfilepanel.c:259
|
||||
#: ../../WINGs/wfilepanel.c:659 ../../WINGs/wfilepanel.c:760
|
||||
msgid "Cancel"
|
||||
msgstr "Отменям"
|
||||
|
||||
#. Careful, this palette exists already
|
||||
#: ../../WINGs/wcolorpanel.c:3256 ../../WINGs/wfilepanel.c:760
|
||||
msgid "Warning"
|
||||
msgstr "Внимание"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3257
|
||||
msgid ""
|
||||
"Palette already exists !\n"
|
||||
"\n"
|
||||
"Overwrite ?"
|
||||
msgstr ""
|
||||
"Такава палитра вече съществува!\n"
|
||||
"\n"
|
||||
"Да бъде ли заменена с новата?"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3257 ../../WINGs/wcolorpanel.c:3321
|
||||
msgid "No"
|
||||
msgstr "Не"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3257 ../../WINGs/wcolorpanel.c:3321
|
||||
msgid "Yes"
|
||||
msgstr "Да"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3289
|
||||
#, c-format
|
||||
msgid "Couldn't rename palette %s to %s\n"
|
||||
msgstr "Палитрата %s не може да се преименува на %s\n"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3315
|
||||
msgid "This will permanently remove the palette "
|
||||
msgstr "Това ще отстрани палитрата необратимо "
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3318
|
||||
msgid ""
|
||||
".\n"
|
||||
"\n"
|
||||
"Are you sure you want to remove this palette ?"
|
||||
msgstr ""
|
||||
".\n"
|
||||
"\n"
|
||||
"Убедени ли сте, че искате да отстраните тази палитра?"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3343
|
||||
#, c-format
|
||||
msgid "Couldn't remove palette %s\n"
|
||||
msgstr "Палитрата %s не може да бъде отстранена\n"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3648
|
||||
#, c-format
|
||||
msgid "Could not open %s"
|
||||
msgstr "Не може да бъде отворен %s"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3655
|
||||
#, c-format
|
||||
msgid "Could not create %s"
|
||||
msgstr "Не може да бъде създаден %s"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3666
|
||||
#, c-format
|
||||
msgid "Write error on file %s"
|
||||
msgstr "Грешка при запис във файл %s"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3711
|
||||
msgid "Color Panel: Color unspecified"
|
||||
msgstr "Color Panel: Не е посочен цвят"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:235
|
||||
msgid "Name:"
|
||||
msgstr "Име:"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:332 ../../WINGs/wfilepanel.c:396
|
||||
msgid "Open"
|
||||
msgstr "Отвори"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:350 ../../WINGs/wfilepanel.c:402
|
||||
msgid "Save"
|
||||
msgstr "Запази"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:562
|
||||
#, c-format
|
||||
msgid "WINGs: could not open directory %s\n"
|
||||
msgstr "WINGs: директорията %s не може да се отвори\n"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:580
|
||||
#, c-format
|
||||
msgid "WINGs: could not stat %s\n"
|
||||
msgstr "WINGs: не могат да се получат атрибутите (stat) за %s\n"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:647 ../../WINGs/wfilepanel.c:970
|
||||
#: ../../WINGs/wfontpanel.c:708
|
||||
msgid "Error"
|
||||
msgstr "Грешка"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:658
|
||||
msgid "Create Directory"
|
||||
msgstr "Създаване на директория"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:659
|
||||
msgid "Enter directory name"
|
||||
msgstr "Въведете името на директорията"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:695 ../../WINGs/wfilepanel.c:734
|
||||
#: ../../WINGs/wfilepanel.c:765 ../../WINGs/wfilepanel.c:793
|
||||
msgid "Permission denied."
|
||||
msgstr "Отказан достъп"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:698
|
||||
#, c-format
|
||||
msgid "'%s' already exists."
|
||||
msgstr "вече съществува \"%s\"."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:701
|
||||
msgid "Path does not exist."
|
||||
msgstr "Пътят не съществува."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:731 ../../WINGs/wfilepanel.c:790
|
||||
#, c-format
|
||||
msgid "'%s' does not exist."
|
||||
msgstr "Не съществува \"%s\"."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:738 ../../WINGs/wfilepanel.c:797
|
||||
msgid "Insufficient memory available."
|
||||
msgstr "Не е достъпна достатъчно памет."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:742 ../../WINGs/wfilepanel.c:801
|
||||
#, c-format
|
||||
msgid "'%s' is on a read-only filesystem."
|
||||
msgstr "\"%s\" се намира във файлова система с достъп само за четене."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:745 ../../WINGs/wfilepanel.c:777
|
||||
#: ../../WINGs/wfilepanel.c:804
|
||||
#, c-format
|
||||
msgid "Can not delete '%s'."
|
||||
msgstr "\"%s\" не може да бъде изтрит."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:752
|
||||
#, c-format
|
||||
msgid "Delete directory %s ?"
|
||||
msgstr "Да се изтрие ли директорията %s?"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:756
|
||||
#, c-format
|
||||
msgid "Delete file %s ?"
|
||||
msgstr "Да се изтрие ли файлът %s?"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:768
|
||||
#, c-format
|
||||
msgid "Directory '%s' does not exist."
|
||||
msgstr "Директорията \"%s\" не съществува."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:771
|
||||
#, c-format
|
||||
msgid "Directory '%s' is not empty."
|
||||
msgstr "Директорията \"%s\" не е празна."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:774
|
||||
#, c-format
|
||||
msgid "Directory '%s' is busy."
|
||||
msgstr "Директорията \"%s е заета."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:787
|
||||
#, c-format
|
||||
msgid "'%s' is a directory."
|
||||
msgstr "\"%s\" е директория."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:829
|
||||
#, c-format
|
||||
msgid "An error occured browsing '%s'."
|
||||
msgstr "Настъпи грешка при показване на \"%s\"."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:833
|
||||
#, c-format
|
||||
msgid "'%s' is not a directory."
|
||||
msgstr "\"%s\" не е директория."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:970
|
||||
msgid "File does not exist."
|
||||
msgstr "Файлът не съществува."
|
||||
|
||||
#: ../../WINGs/wfont.c:129
|
||||
#, c-format
|
||||
msgid "the following character sets are missing in %s:"
|
||||
msgstr "в %s липсват следните кодирания:"
|
||||
|
||||
#: ../../WINGs/wfont.c:136
|
||||
#, c-format
|
||||
msgid ""
|
||||
"the string \"%s\" will be used in place of any characters from those sets."
|
||||
msgstr "Вместо кой да е символ от тези кодирания ще се използва низът \"%s\"."
|
||||
|
||||
#: ../../WINGs/wfont.c:300 ../../WINGs/wfont.c:336
|
||||
#, c-format
|
||||
msgid "could not load font set %s. Trying fixed."
|
||||
msgstr "не може да се зареди шрифтова комбинация %s. Опит за шрифт fixed."
|
||||
|
||||
#: ../../WINGs/wfont.c:306 ../../WINGs/wfont.c:342
|
||||
#, c-format
|
||||
msgid "could not load font %s. Trying fixed."
|
||||
msgstr "не може да се зареди шрифт %s. Опит за шрифт fixed."
|
||||
|
||||
#: ../../WINGs/wfont.c:310 ../../WINGs/wfont.c:346
|
||||
msgid "could not load fixed font!"
|
||||
msgstr "не може да се зареди шрифтът fixed!"
|
||||
|
||||
#: ../../WINGs/wfont.c:441
|
||||
#, c-format
|
||||
msgid "font description %s is too large."
|
||||
msgstr "шрифтовото описание %s е твърде дълго."
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:205
|
||||
msgid "Test!!!"
|
||||
msgstr "Проба!!! Test!!!"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:211
|
||||
msgid "Family"
|
||||
msgstr "Гарнитура"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:222
|
||||
msgid "Typeface"
|
||||
msgstr "Стил"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:233
|
||||
msgid "Size"
|
||||
msgstr "Размер"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:252
|
||||
msgid "Set"
|
||||
msgstr "Установи"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:257
|
||||
msgid "Revert"
|
||||
msgstr "Предишното"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:709
|
||||
msgid "Could not retrieve font list"
|
||||
msgstr "Не може да се получи списъка от шрифтове"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:721
|
||||
#, c-format
|
||||
msgid "font name %s is longer than 256, which is invalid."
|
||||
msgstr "името на шрифта %s е по-дълго от 256 символа, което е недопустимо."
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:868
|
||||
msgid "Roman"
|
||||
msgstr "Изправен"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:871
|
||||
msgid "Italic"
|
||||
msgstr "Курсив"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:873
|
||||
msgid "Oblique"
|
||||
msgstr "Наклонен"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:875
|
||||
msgid "Rev Italic"
|
||||
msgstr "Обратен курсив"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:877
|
||||
msgid "Rev Oblique"
|
||||
msgstr "Обратно наклонен"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:883
|
||||
msgid "Normal"
|
||||
msgstr "Нормален"
|
||||
|
||||
#: ../../WINGs/widgets.c:415
|
||||
#, c-format
|
||||
msgid "WINGs: could not load widget images file: %s"
|
||||
msgstr "WINGs: не може да се зареди изображението %s на библиотеката."
|
||||
|
||||
#: ../../WINGs/widgets.c:763
|
||||
msgid ""
|
||||
"could not load any fonts. Make sure your font installation and locale "
|
||||
"settings are correct."
|
||||
msgstr "не може да се зареди никакъв шрифт. Убедете се, че имате правилно инсталирани шрифтове и посочен езиков локал."
|
||||
|
||||
#: ../../WINGs/wruler.c:189
|
||||
msgid "0 inches"
|
||||
msgstr "0 цола"
|
||||
736
WINGs/po/ca.po
Normal file
736
WINGs/po/ca.po
Normal file
@@ -0,0 +1,736 @@
|
||||
# Catalan messages for WINGs.
|
||||
# Copyright (C) 2003 Ernest Adrogué <eadrogue@gmx.net>.
|
||||
# This file is distributed under the terms of the GNU General Public License.
|
||||
#
|
||||
# Version history:
|
||||
# WM-ver author email date
|
||||
# 0.80.2 Ernest Adrogué eadrogue@gmx.net 23 Feb 2003
|
||||
# CVS-20030914 Ernest Adrogué eadrogue@gmx.net 15 Set 2003
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WINGs 0.80.2\n"
|
||||
"POT-Creation-Date: 2003-09-16 22:59+0200\n"
|
||||
"PO-Revision-Date: 2003-09-16 23:16+0200\n"
|
||||
"Last-Translator: Ernest Adrogué <eadrogue@gmx.net>\n"
|
||||
"Language-Team: Catalan <ca@dodds.net>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../../WINGs/connection.c:467 ../../WINGs/connection.c:532
|
||||
#: ../../WINGs/connection.c:575
|
||||
msgid "Bad address-service-protocol combination"
|
||||
msgstr "Combinació adreça-servei-protocol incorrecta"
|
||||
|
||||
#: ../../WINGs/error.c:54
|
||||
#, c-format
|
||||
msgid "Unknown error %d"
|
||||
msgstr "Error no identificat %d"
|
||||
|
||||
#: ../../WINGs/error.c:59
|
||||
#, c-format
|
||||
msgid "Error %d"
|
||||
msgstr "Error %d"
|
||||
|
||||
#: ../../WINGs/error.c:110
|
||||
msgid " warning: "
|
||||
msgstr ": atenció: "
|
||||
|
||||
#: ../../WINGs/error.c:137
|
||||
msgid " fatal error: "
|
||||
msgstr ": error fatal: "
|
||||
|
||||
#: ../../WINGs/error.c:163 ../../WINGs/error.c:192
|
||||
msgid " error: "
|
||||
msgstr ": error: "
|
||||
|
||||
#: ../../WINGs/findfile.c:48
|
||||
#, c-format
|
||||
msgid "could not get password entry for UID %i"
|
||||
msgstr "no s'ha pogut obtenir l'informació de compte de l'UID %i"
|
||||
|
||||
#: ../../WINGs/findfile.c:66
|
||||
#, c-format
|
||||
msgid "could not get password entry for user %s"
|
||||
msgstr "no s'ha pogut obtenir l'informació de compte de l'usuari %s"
|
||||
|
||||
#: ../../WINGs/host.c:114
|
||||
msgid "Cannot get current host name"
|
||||
msgstr "No s'ha pogut obtenir el nom de host actual"
|
||||
|
||||
# falten coses per traduïr en el codi font. eac
|
||||
#: ../../WINGs/proplist.c:91
|
||||
#, c-format
|
||||
msgid "syntax error in %s %s, line %i: %s"
|
||||
msgstr "error de sintaxi a %s %s, línia %i: %s"
|
||||
|
||||
#: ../../WINGs/proplist.c:150
|
||||
msgid "Only string or data is supported for a proplist dictionary key"
|
||||
msgstr ""
|
||||
"Una entrada PropList de diccionari només pot contenir dades o una cadena"
|
||||
|
||||
#: ../../WINGs/proplist.c:184 ../../WINGs/proplist.c:236
|
||||
#: ../../WINGs/proplist.c:394 ../../WINGs/proplist.c:474
|
||||
#: ../../WINGs/proplist.c:1075 ../../WINGs/proplist.c:1127
|
||||
#: ../../WINGs/proplist.c:1293 ../../WINGs/proplist.c:1372
|
||||
#: ../../WINGs/proplist.c:1493 ../../WINGs/proplist.c:1540
|
||||
msgid "Used proplist functions on non-WMPropLists objects"
|
||||
msgstr "S'han usat funcions PropList en objectes no-WMPropLists"
|
||||
|
||||
#: ../../WINGs/proplist.c:630
|
||||
msgid "unterminated PropList string"
|
||||
msgstr "cadena PropList incompleta"
|
||||
|
||||
#: ../../WINGs/proplist.c:670
|
||||
msgid "unterminated PropList data"
|
||||
msgstr "dades PropList incompletes"
|
||||
|
||||
#: ../../WINGs/proplist.c:678
|
||||
msgid "unterminated PropList data (missing hexdigit)"
|
||||
msgstr "Dades PropList incompletes (falta un digit hexadecimal)"
|
||||
|
||||
#: ../../WINGs/proplist.c:690 ../../WINGs/proplist.c:695
|
||||
msgid "non hexdigit character in PropList data"
|
||||
msgstr "cap digit hexadecimal a les dades PropList"
|
||||
|
||||
#: ../../WINGs/proplist.c:729
|
||||
msgid "unterminated PropList array"
|
||||
msgstr "matriu PropList incompleta"
|
||||
|
||||
#: ../../WINGs/proplist.c:737
|
||||
msgid "missing or unterminated PropList array"
|
||||
msgstr "matriu PropList incompleta o inexistent"
|
||||
|
||||
#: ../../WINGs/proplist.c:747
|
||||
msgid "could not get PropList array element"
|
||||
msgstr "no s'ha pogut obtenir un element de la matriu PropList"
|
||||
|
||||
#: ../../WINGs/proplist.c:776
|
||||
msgid "unterminated PropList dictionary"
|
||||
msgstr "diccionari PropList incomplet"
|
||||
|
||||
#: ../../WINGs/proplist.c:793
|
||||
msgid "missing PropList dictionary key"
|
||||
msgstr "falta una entrada PropList de diccionari"
|
||||
|
||||
#: ../../WINGs/proplist.c:795
|
||||
msgid "missing PropList dictionary entry key or unterminated dictionary"
|
||||
msgstr "falta una entrada PropList de diccionari o bé està incompleta"
|
||||
|
||||
#: ../../WINGs/proplist.c:803
|
||||
msgid "error parsing PropList dictionary key"
|
||||
msgstr "error mentre s'analitzava l'entrada PropList de diccionari"
|
||||
|
||||
#: ../../WINGs/proplist.c:811
|
||||
msgid "missing = in PropList dictionary entry"
|
||||
msgstr "falta un \"=\" a l'entrada PropList de diccionari"
|
||||
|
||||
#: ../../WINGs/proplist.c:819
|
||||
msgid "error parsing PropList dictionary entry value"
|
||||
msgstr "error mentre s'analitzava el valor de l'entrada PropList de diccionari"
|
||||
|
||||
#: ../../WINGs/proplist.c:827
|
||||
msgid "missing ; in PropList dictionary entry"
|
||||
msgstr "falta un \";\" a l'entrada PropList de diccionari"
|
||||
|
||||
#: ../../WINGs/proplist.c:888
|
||||
msgid ""
|
||||
"was expecting a string, data, array or dictionary. If it's a string, try "
|
||||
"enclosing it with \"."
|
||||
msgstr ""
|
||||
"s'esperava una cadena, dada, matriu o diccionari. Si es tractava d'una\n"
|
||||
"cadena proveu d'escriure-la \"entre cometes\"."
|
||||
|
||||
#: ../../WINGs/proplist.c:892
|
||||
msgid "Comments are not allowed inside WindowMaker owned domain files."
|
||||
msgstr "No es permeten comentaris en els fitxers de domini de WindowMaker."
|
||||
|
||||
#: ../../WINGs/proplist.c:1563 ../../WINGs/proplist.c:1630
|
||||
msgid "extra data after end of property list"
|
||||
msgstr "sobren dades després de la llista de propietats"
|
||||
|
||||
#: ../../WINGs/proplist.c:1606
|
||||
#, c-format
|
||||
msgid "could not get size for file '%s'"
|
||||
msgstr "no s'ha pogut obtenir la mida de \"%s\""
|
||||
|
||||
#: ../../WINGs/proplist.c:1619
|
||||
#, c-format
|
||||
msgid "error reading from file '%s'"
|
||||
msgstr "error mentre es llegia el fitxer \"%s\""
|
||||
|
||||
#: ../../WINGs/proplist.c:1671
|
||||
#, c-format
|
||||
msgid "mkstemp (%s) failed"
|
||||
msgstr "la rutina mkstemp (%s) ha fallat"
|
||||
|
||||
#: ../../WINGs/proplist.c:1682
|
||||
#, c-format
|
||||
msgid "mktemp (%s) failed"
|
||||
msgstr "la rutina mktemp (%s) ha fallat"
|
||||
|
||||
#: ../../WINGs/proplist.c:1693
|
||||
#, c-format
|
||||
msgid "open (%s) failed"
|
||||
msgstr "la rutina open (%s) ha fallat"
|
||||
|
||||
#: ../../WINGs/proplist.c:1700
|
||||
#, c-format
|
||||
msgid "writing to file: %s failed"
|
||||
msgstr "l'escriptura del fitxer \"%s\" ha fallat"
|
||||
|
||||
#: ../../WINGs/proplist.c:1708
|
||||
#, c-format
|
||||
msgid "fclose (%s) failed"
|
||||
msgstr "la rutina fclose (%s) ha fallat"
|
||||
|
||||
#: ../../WINGs/proplist.c:1717
|
||||
#, c-format
|
||||
msgid "rename ('%s' to '%s') failed"
|
||||
msgstr "el canvi de nom (\"%s\" a \"%s\") ha fallat"
|
||||
|
||||
#. something happened with the file. just overwrite it
|
||||
#: ../../WINGs/userdefaults.c:188 ../../WINGs/userdefaults.c:204
|
||||
#, c-format
|
||||
msgid "cannot read domain from file '%s' when syncing"
|
||||
msgstr "no s'ha pogut llegir un domini del fitxer \"%s\" quan es sincronitzava"
|
||||
|
||||
#: ../../WINGs/wcolor.c:224 ../../WINGs/wcolor.c:236 ../../WINGs/wcolor.c:275
|
||||
#: ../../WINGs/wcolor.c:316
|
||||
#, c-format
|
||||
msgid "could not allocate %s color"
|
||||
msgstr "no s'ha pogut assignar espai pel color \"%s\""
|
||||
|
||||
#: ../../WINGs/wcolor.c:224
|
||||
msgid "white"
|
||||
msgstr "blanc"
|
||||
|
||||
#: ../../WINGs/wcolor.c:236
|
||||
msgid "black"
|
||||
msgstr "negre"
|
||||
|
||||
#: ../../WINGs/wcolor.c:275
|
||||
msgid "gray"
|
||||
msgstr "gris"
|
||||
|
||||
#: ../../WINGs/wcolor.c:316
|
||||
msgid "dark gray"
|
||||
msgstr "gris fosc"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:420
|
||||
msgid "Colors"
|
||||
msgstr "Colors"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:610 ../../WINGs/wcolorpanel.c:2829
|
||||
msgid "Brightness"
|
||||
msgstr "Claror"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:612 ../../WINGs/wcolorpanel.c:688
|
||||
#: ../../WINGs/wcolorpanel.c:721 ../../WINGs/wcolorpanel.c:755
|
||||
#: ../../WINGs/wcolorpanel.c:815 ../../WINGs/wcolorpanel.c:849
|
||||
#: ../../WINGs/wcolorpanel.c:883 ../../WINGs/wcolorpanel.c:918
|
||||
#: ../../WINGs/wcolorpanel.c:2169 ../../WINGs/wcolorpanel.c:2831
|
||||
#: ../../WINGs/wcolorpanel.c:2867 ../../WINGs/wcolorpanel.c:2903
|
||||
#: ../../WINGs/wcolorpanel.c:3745
|
||||
msgid "Color Panel: Could not allocate memory"
|
||||
msgstr "Panell de color: No s'ha pogut assignar memòria"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:685 ../../WINGs/wcolorpanel.c:686
|
||||
msgid "Red"
|
||||
msgstr "Roig"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:718 ../../WINGs/wcolorpanel.c:719
|
||||
msgid "Green"
|
||||
msgstr "Verd"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:752 ../../WINGs/wcolorpanel.c:753
|
||||
msgid "Blue"
|
||||
msgstr "Blau"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:812 ../../WINGs/wcolorpanel.c:813
|
||||
msgid "Cyan"
|
||||
msgstr "Cian"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:846 ../../WINGs/wcolorpanel.c:847
|
||||
msgid "Magenta"
|
||||
msgstr "Magenta"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:880 ../../WINGs/wcolorpanel.c:881
|
||||
msgid "Yellow"
|
||||
msgstr "Groc"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:915 ../../WINGs/wcolorpanel.c:916
|
||||
msgid "Black"
|
||||
msgstr "Negre"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:996
|
||||
msgid "Spectrum"
|
||||
msgstr "Espectre"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1026
|
||||
msgid "Palette"
|
||||
msgstr "Paleta"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1032
|
||||
msgid "New from File..."
|
||||
msgstr "Obtenir d'un fitxer..."
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1033 ../../WINGs/wcolorpanel.c:1081
|
||||
#: ../../WINGs/wcolorpanel.c:1098
|
||||
msgid "Rename..."
|
||||
msgstr "Reanomenar..."
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1034 ../../WINGs/wcolorpanel.c:1082
|
||||
#: ../../WINGs/wcolorpanel.c:1099 ../../WINGs/wcolorpanel.c:3326
|
||||
msgid "Remove"
|
||||
msgstr "Eliminar"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1035
|
||||
msgid "Copy"
|
||||
msgstr "Copiar"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1036
|
||||
msgid "New from Clipboard"
|
||||
msgstr "Obtenir del porta-retalls..."
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1057
|
||||
msgid "X11-Colors"
|
||||
msgstr "Colors-X11"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1074
|
||||
msgid "Color"
|
||||
msgstr "Color"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1080
|
||||
msgid "Add..."
|
||||
msgstr "Afegeix..."
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1090
|
||||
msgid "List"
|
||||
msgstr "Llista"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1097
|
||||
msgid "New..."
|
||||
msgstr "Nou..."
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1236
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Color Panel: Could not create directory %s needed to store configurations"
|
||||
msgstr ""
|
||||
"Panell de color: No s'ha pogut crear el directori \"%s\" necessari per desar "
|
||||
"la configuració"
|
||||
|
||||
#. Delete the file, it doesn't belong here
|
||||
#: ../../WINGs/wcolorpanel.c:1242 ../../WINGs/wcolorpanel.c:3212
|
||||
#: ../../WINGs/wcolorpanel.c:3216
|
||||
msgid "File Error"
|
||||
msgstr "Error de fitxer"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1243
|
||||
msgid "Could not create ColorPanel configuration directory"
|
||||
msgstr "No s'ha pogut crear el directori de configuració del Panell de color"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1244 ../../WINGs/wcolorpanel.c:3213
|
||||
#: ../../WINGs/wcolorpanel.c:3218 ../../WINGs/wcolorpanel.c:3245
|
||||
#: ../../WINGs/wfilepanel.c:250 ../../WINGs/wfilepanel.c:650
|
||||
#: ../../WINGs/wfilepanel.c:662 ../../WINGs/wfilepanel.c:763
|
||||
#: ../../WINGs/wfilepanel.c:974 ../../WINGs/wfontpanel.c:751
|
||||
msgid "OK"
|
||||
msgstr "D'acord"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1250 ../../WINGs/wcolorpanel.c:1286
|
||||
#: ../../WINGs/wcolorpanel.c:1304
|
||||
msgid "Color Panel: Could not find file"
|
||||
msgstr "Panell de color: No s'ha trobat el fitxer"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1491 ../../WINGs/wcolorpanel.c:1556
|
||||
#: ../../WINGs/wcolorpanel.c:1620
|
||||
msgid "Color Panel: X failed request"
|
||||
msgstr "Panell de color: petició X fallida"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:2865
|
||||
msgid "Saturation"
|
||||
msgstr "Saturació"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:2901
|
||||
msgid "Hue"
|
||||
msgstr "Matís"
|
||||
|
||||
# és el títol d'un quadre de diàleg. eac
|
||||
#: ../../WINGs/wcolorpanel.c:3151
|
||||
msgid "Open Palette"
|
||||
msgstr "Obrir paleta"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3213
|
||||
msgid "Invalid file format !"
|
||||
msgstr "El format del fitxer no és vàlid !"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3215
|
||||
#, c-format
|
||||
msgid "can't remove file %s"
|
||||
msgstr "no s'ha pogut eliminar el fitxer \"%s\""
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3217
|
||||
msgid "Couldn't remove file from Configuration Directory !"
|
||||
msgstr "No s'ha pogut eliminar el fitxer del directori de configuració !"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3244
|
||||
msgid "Rename"
|
||||
msgstr "Reanomena"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3244
|
||||
msgid "Rename palette to:"
|
||||
msgstr "Reanomena la paleta com a:"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3245 ../../WINGs/wfilepanel.c:259
|
||||
#: ../../WINGs/wfilepanel.c:662 ../../WINGs/wfilepanel.c:763
|
||||
msgid "Cancel"
|
||||
msgstr "Cancel·la"
|
||||
|
||||
#. Careful, this palette exists already
|
||||
#: ../../WINGs/wcolorpanel.c:3261 ../../WINGs/wfilepanel.c:763
|
||||
msgid "Warning"
|
||||
msgstr "Atenció"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3262
|
||||
msgid ""
|
||||
"Palette already exists !\n"
|
||||
"\n"
|
||||
"Overwrite ?"
|
||||
msgstr ""
|
||||
"Ja existia una paleta amb aquest nom!\n"
|
||||
"\n"
|
||||
"La voleu sobreescriure?"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3262 ../../WINGs/wcolorpanel.c:3326
|
||||
msgid "No"
|
||||
msgstr "No"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3262 ../../WINGs/wcolorpanel.c:3326
|
||||
msgid "Yes"
|
||||
msgstr "Sí"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3294
|
||||
#, c-format
|
||||
msgid "Couldn't rename palette %s to %s\n"
|
||||
msgstr "No s'ha pogut reanomenar la paleta %s com a %s\n"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3320
|
||||
msgid "This will permanently remove the palette "
|
||||
msgstr "Això eliminarà la paleta per sempre "
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3323
|
||||
msgid ""
|
||||
".\n"
|
||||
"\n"
|
||||
"Are you sure you want to remove this palette ?"
|
||||
msgstr ""
|
||||
".\n"
|
||||
"\n"
|
||||
"Esteu segurs que voleu eliminar aquesta paleta?"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3348
|
||||
#, c-format
|
||||
msgid "Couldn't remove palette %s\n"
|
||||
msgstr "No s'ha pogut eliminar la paleta %s\n"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3647
|
||||
#, c-format
|
||||
msgid "Could not open %s"
|
||||
msgstr "No s'ha pogut obrir %s"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3654
|
||||
#, c-format
|
||||
msgid "Could not create %s"
|
||||
msgstr "No s'ha pogut crear %s"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3665
|
||||
#, c-format
|
||||
msgid "Write error on file %s"
|
||||
msgstr "Error d'escriptura en el fitxer %s"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3710
|
||||
msgid "Color Panel: Color unspecified"
|
||||
msgstr "Panell de color: Color no especificat"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:235
|
||||
msgid "Name:"
|
||||
msgstr "Nom:"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:332 ../../WINGs/wfilepanel.c:396
|
||||
msgid "Open"
|
||||
msgstr "Obre"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:350 ../../WINGs/wfilepanel.c:402
|
||||
msgid "Save"
|
||||
msgstr "Desa"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:565
|
||||
#, c-format
|
||||
msgid "WINGs: could not open directory %s\n"
|
||||
msgstr "WINGs: no s'ha pogut obrir el directori %s\n"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:583
|
||||
#, c-format
|
||||
msgid "WINGs: could not stat %s\n"
|
||||
msgstr "WINGs: no s'ha pogut determinar l'estat de %s\n"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:650 ../../WINGs/wfilepanel.c:973
|
||||
#: ../../WINGs/wfontpanel.c:750
|
||||
msgid "Error"
|
||||
msgstr "Error"
|
||||
|
||||
# és el nom d'un quadre de diàleg. eac
|
||||
#: ../../WINGs/wfilepanel.c:661
|
||||
msgid "Create Directory"
|
||||
msgstr "Crear directori"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:662
|
||||
msgid "Enter directory name"
|
||||
msgstr "Entreu el nom del directori"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:698 ../../WINGs/wfilepanel.c:737
|
||||
#: ../../WINGs/wfilepanel.c:768 ../../WINGs/wfilepanel.c:796
|
||||
msgid "Permission denied."
|
||||
msgstr "Permís denegat."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:701
|
||||
#, c-format
|
||||
msgid "'%s' already exists."
|
||||
msgstr "\"%s\" existia prèviament."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:704
|
||||
msgid "Path does not exist."
|
||||
msgstr "L'ubicació no existeix."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:734 ../../WINGs/wfilepanel.c:793
|
||||
#, c-format
|
||||
msgid "'%s' does not exist."
|
||||
msgstr "\"%s\" no existeix."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:741 ../../WINGs/wfilepanel.c:800
|
||||
msgid "Insufficient memory available."
|
||||
msgstr "No hi ha prou memòria disponible."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:745 ../../WINGs/wfilepanel.c:804
|
||||
#, c-format
|
||||
msgid "'%s' is on a read-only filesystem."
|
||||
msgstr "\"%s\" es troba en un sistema de fitxers de només lectura."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:748 ../../WINGs/wfilepanel.c:780
|
||||
#: ../../WINGs/wfilepanel.c:807
|
||||
#, c-format
|
||||
msgid "Can not delete '%s'."
|
||||
msgstr "No s'ha pogut eliminar \"%s\"."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:755
|
||||
#, c-format
|
||||
msgid "Delete directory %s ?"
|
||||
msgstr "Voleu eliminar el directori %s ?"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:759
|
||||
#, c-format
|
||||
msgid "Delete file %s ?"
|
||||
msgstr "Voleu eliminar el fitxer %s ?"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:771
|
||||
#, c-format
|
||||
msgid "Directory '%s' does not exist."
|
||||
msgstr "El directori \"%s\" no existeix."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:774
|
||||
#, c-format
|
||||
msgid "Directory '%s' is not empty."
|
||||
msgstr "El directori \"%s\" no està buit."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:777
|
||||
#, c-format
|
||||
msgid "Directory '%s' is busy."
|
||||
msgstr "El directori \"%s\" es troba ocupat."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:790
|
||||
#, c-format
|
||||
msgid "'%s' is a directory."
|
||||
msgstr "\"%s\" és un directori."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:832
|
||||
#, c-format
|
||||
msgid "An error occured browsing '%s'."
|
||||
msgstr "S'ha produït un error mentre s'explorava \"%s\"."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:836
|
||||
#, c-format
|
||||
msgid "'%s' is not a directory."
|
||||
msgstr "\"%s\" no és un directori."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:973
|
||||
msgid "File does not exist."
|
||||
msgstr "El fitxer no existeix."
|
||||
|
||||
#: ../../WINGs/wfont.c:324 ../../WINGs/wfont.c:344
|
||||
#, c-format
|
||||
msgid "could not load font %s."
|
||||
msgstr "no s'ha pogut carregar el tipus de lletra %s."
|
||||
|
||||
#: ../../WINGs/wfont.c:375 ../../WINGs/wfont.c:420 ../../WINGs/wfont.c:475
|
||||
#: ../../WINGs/wfont.c:1337 ../../WINGs/wfont.c:1398 ../../WINGs/wfont.c:1469
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Conversion to widechar failed (possible invalid multibyte sequence): '%s':"
|
||||
"(pos %d)\n"
|
||||
msgstr ""
|
||||
"Ha fallat la conversió a caràcter estès (possible seqüència no vàlida): '%"
|
||||
"s': (pos %d)\n"
|
||||
|
||||
#. // remove warning later. or maybe not
|
||||
#: ../../WINGs/wfont.c:591 ../../WINGs/wfont.c:1568
|
||||
#, c-format
|
||||
msgid "Invalid font specification: '%s'\n"
|
||||
msgstr "Especificació de font no vàlida: \"%s\"\n"
|
||||
|
||||
#: ../../WINGs/wfont.c:770 ../../WINGs/wfont.c:780
|
||||
#, c-format
|
||||
msgid "Invalid size specification '%s' in %s. Using default %d\n"
|
||||
msgstr ""
|
||||
"La mida \"%s\" especificada a %s no és vàlida. S'usa el valor per omissió %"
|
||||
"d\n"
|
||||
|
||||
#: ../../WINGs/wfont.c:824
|
||||
#, c-format
|
||||
msgid "the following character sets are missing in %s:"
|
||||
msgstr "els següents conjunts de caràcters falten a %s:"
|
||||
|
||||
#: ../../WINGs/wfont.c:830
|
||||
#, c-format
|
||||
msgid ""
|
||||
"the string \"%s\" will be used in place of any characters from those sets."
|
||||
msgstr ""
|
||||
"la cadena \"%s\" s'usarà en lloc dels caràcters d'aquests conjunts de "
|
||||
"caràcters."
|
||||
|
||||
#. is arial a good fallback for multibyte?
|
||||
#: ../../WINGs/wfont.c:1232 ../../WINGs/wfont.c:1247
|
||||
#, c-format
|
||||
msgid "could not load font %s. Trying arial."
|
||||
msgstr "no s'ha pogut carregar el tipus de lletra %s. Provant amb \"arial\"."
|
||||
|
||||
#: ../../WINGs/wfont.c:1239
|
||||
msgid "could not load antialiased font set. Reverting to standard font sets."
|
||||
msgstr ""
|
||||
"no s'ha pogut carregar el conjunt de fonts amb allisat. S'usarà l'estàndard."
|
||||
|
||||
#: ../../WINGs/wfont.c:1242
|
||||
#, c-format
|
||||
msgid "could not load FontSet %s. Trying fixed."
|
||||
msgstr "no s'ha pogut carregar el tipus de lletra %s. Provant amb \"fixed\"."
|
||||
|
||||
#: ../../WINGs/wfont.c:1254
|
||||
msgid "could not load antialiased fonts. Reverting to normal fonts."
|
||||
msgstr "no s'han pogut carregar fonts allisades. S'usaran fonts normals."
|
||||
|
||||
#: ../../WINGs/wfont.c:1257 ../../WINGs/wfont.c:1268
|
||||
#, c-format
|
||||
msgid "could not load font %s. Trying fixed."
|
||||
msgstr "no s'ha pogut carregar la font %s. Provant amb \"fixed\"."
|
||||
|
||||
#: ../../WINGs/wfont.c:1262
|
||||
#, c-format
|
||||
msgid "could not load font set %s. Trying fixed."
|
||||
msgstr "no s'ha pogut carregar el conjunt de fonts %s. Provant amb \"fixed\"."
|
||||
|
||||
#: ../../WINGs/wfont.c:1272
|
||||
msgid "could not load fixed font!"
|
||||
msgstr "no s'ha pogut carregar el tipus de lletra \"fixed\" !"
|
||||
|
||||
#: ../../WINGs/wfont.c:1520
|
||||
#, c-format
|
||||
msgid "font description %s is too large."
|
||||
msgstr "la descripció de tipus de lletra %s és massa gran."
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:235
|
||||
msgid "Test!!!"
|
||||
msgstr "Prova!!!"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:241
|
||||
msgid "Family"
|
||||
msgstr "Familia"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:252
|
||||
msgid "Typeface"
|
||||
msgstr "Fosa"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:263
|
||||
msgid "Size"
|
||||
msgstr "Mida"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:282
|
||||
msgid "Set"
|
||||
msgstr "Conjunt"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:288
|
||||
msgid "Revert"
|
||||
msgstr "Torna"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:751
|
||||
msgid "Could not retrieve font list"
|
||||
msgstr "No s'ha pogut obtenir la llista de tipus de lletra"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:765
|
||||
#, c-format
|
||||
msgid "font name %s is longer than 256, which is invalid."
|
||||
msgstr ""
|
||||
"el nom de tipus de lletra %s ocupa més de 256 caràcters, per tant no és "
|
||||
"vàlid."
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:913
|
||||
msgid "Roman"
|
||||
msgstr "Romana"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:916
|
||||
msgid "Italic"
|
||||
msgstr "Itàlica"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:918
|
||||
msgid "Oblique"
|
||||
msgstr "Obliqua"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:920
|
||||
msgid "Rev Italic"
|
||||
msgstr "Itàlica inv"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:922
|
||||
msgid "Rev Oblique"
|
||||
msgstr "Obliqua inv"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:928
|
||||
msgid "Normal"
|
||||
msgstr "Normal"
|
||||
|
||||
#: ../../WINGs/widgets.c:419
|
||||
#, c-format
|
||||
msgid "WINGs: could not load widget images file: %s"
|
||||
msgstr "WINGs: no s'ha pogut carregar el fitxer d'imatges: %s"
|
||||
|
||||
#: ../../WINGs/widgets.c:772
|
||||
msgid ""
|
||||
"could not load any fonts. Make sure your font installation and locale "
|
||||
"settings are correct."
|
||||
msgstr ""
|
||||
"no s'ha pogut carregar cap font. Assegureu-vos que heu instal·lat i "
|
||||
"configurat correctament les fonts i el local."
|
||||
|
||||
#: ../../WINGs/wruler.c:192
|
||||
msgid "0 inches"
|
||||
msgstr "0 polzades"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Text antialiasing is enabled in the configuration but the X server "
|
||||
#~ "doesn't have the required capabilities (missing RENDER extension). "
|
||||
#~ "Disabling text antialiasing."
|
||||
#~ msgstr ""
|
||||
#~ "L'allisat de text està habilitat a la configuració però el servidor X no\n"
|
||||
#~ "té la capacitat necessària (falta l'extensió RENDER) de manera que "
|
||||
#~ "l'allisat\n"
|
||||
#~ "de text es deshabilitarà."
|
||||
230
WINGs/po/cs.po
230
WINGs/po/cs.po
@@ -1,66 +1,66 @@
|
||||
# Czech messages for WINGs
|
||||
# (C) 2001 Jiøí Hnídek
|
||||
# (C) 2001 Jiří Hnídek
|
||||
# Special thanks to Jan "judas" Tomka
|
||||
#
|
||||
# Original translation by Jiøí Hnídek on Oct 11 2001
|
||||
# Currently maintained by Jiøí Hnídek <jiri.hnidek@vslib.cz>
|
||||
# Original translation by Jiří Hnídek on Oct 11 2001
|
||||
# Currently maintained by Jiří Hnídek <jiri.hnidek@vslib.cz>
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WINGs 0.70.0\n"
|
||||
"POT-Creation-Date: 2001-10-11 19:10+0100\n"
|
||||
"PO-Revision-Date: 2001-10-11 22:00+0100\n"
|
||||
"Last-Translator: Jiøí Hnídek <jiri.hnidek@vslib.cz>\n"
|
||||
"Last-Translator: Jiří Hnídek <jiri.hnidek@vslib.cz>\n"
|
||||
"Language-Team: Czech <cz@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=ISO-8859-2\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: unknown\n"
|
||||
|
||||
#: ../../WINGs/connection.c:451 ../../WINGs/connection.c:516
|
||||
#: ../../WINGs/connection.c:559
|
||||
msgid "Bad address-service-protocol combination"
|
||||
msgstr "Nesprávná kombinace adresa-slu¾ba-protokol"
|
||||
msgstr "Nesprávná kombinace adresa-služba-protokol"
|
||||
|
||||
#: ../../WINGs/dragsource.c:541
|
||||
msgid "DND selection lost during drag operation..."
|
||||
msgstr "DND výbìr se ztratil bìhem opere táhnutí..."
|
||||
msgstr "DND výběr se ztratil během opere táhnutí..."
|
||||
|
||||
#: ../../WINGs/dragsource.c:610
|
||||
#, c-format
|
||||
msgid "drag & drop timed out while waiting for response from 0x%x\n"
|
||||
msgstr "èas pro drag & drop vypr¹el bìhem èekání na odpoveï z 0x%x\n"
|
||||
msgstr "čas pro drag & drop vypršel během čekání na odpoveď z 0x%x\n"
|
||||
|
||||
#: ../../WINGs/dragsource.c:728
|
||||
msgid "could not get ownership or DND selection"
|
||||
msgstr "nemo¾né získat vlastnictví nebo DND výbìr"
|
||||
msgstr "nemožné získat vlastnictví nebo DND výběr"
|
||||
|
||||
#: ../../WINGs/dragsource.c:898
|
||||
#, c-format
|
||||
msgid "drag source received unexpected XdndFinished message from %x"
|
||||
msgstr "zdroj tahání pøijal neoèekávanou zprávu XdndFinished z %x"
|
||||
msgstr "zdroj tahání přijal neočekávanou zprávu XdndFinished z %x"
|
||||
|
||||
#: ../../WINGs/dragsource.c:1040
|
||||
#, c-format
|
||||
msgid "unknown XDND action %s from 0x%x"
|
||||
msgstr "neznámá XDND akce %s z 0x%x"
|
||||
msgstr "neznámá XDND akce %s z 0x%x"
|
||||
|
||||
#: ../../WINGs/dragsource.c:1073
|
||||
msgid "received invalid drag & drop type list"
|
||||
msgstr "pøijatý nesprávný seznam typù drag & drop"
|
||||
msgstr "přijatý nesprávný seznam typů drag & drop"
|
||||
|
||||
#: ../../WINGs/dragsource.c:1161
|
||||
msgid "received Enter event in bad order"
|
||||
msgstr "pøijatá událost Enter v nesprávném poøadí"
|
||||
msgstr "přijatá událost Enter v nesprávném pořadí"
|
||||
|
||||
#: ../../WINGs/dragsource.c:1168
|
||||
#, c-format
|
||||
msgid "received drag & drop request with unsupported version %i"
|
||||
msgstr "pøijatý po¾adavek drag & drop s nepodporovanou verzí %i"
|
||||
msgstr "přijatý požadavek drag & drop s nepodporovanou verzí %i"
|
||||
|
||||
#: ../../WINGs/error.c:56
|
||||
#, c-format
|
||||
msgid "Unknown error %d"
|
||||
msgstr "Neznámá chyba %d"
|
||||
msgstr "Neznámá chyba %d"
|
||||
|
||||
#: ../../WINGs/error.c:61
|
||||
#, c-format
|
||||
@@ -69,11 +69,11 @@ msgstr "Chyba %d"
|
||||
|
||||
#: ../../WINGs/error.c:112
|
||||
msgid " warning: "
|
||||
msgstr " varovíní: "
|
||||
msgstr " varovíní: "
|
||||
|
||||
#: ../../WINGs/error.c:139
|
||||
msgid " fatal error: "
|
||||
msgstr " fatální chyba: "
|
||||
msgstr " fatální chyba: "
|
||||
|
||||
#: ../../WINGs/error.c:165 ../../WINGs/error.c:194
|
||||
msgid " error: "
|
||||
@@ -82,76 +82,76 @@ msgstr " chyba: "
|
||||
#: ../../WINGs/findfile.c:50
|
||||
#, c-format
|
||||
msgid "could not get password entry for UID %i"
|
||||
msgstr "nemo¾né zjistit informaci o UID %i"
|
||||
msgstr "nemožné zjistit informaci o UID %i"
|
||||
|
||||
#: ../../WINGs/findfile.c:68
|
||||
#, c-format
|
||||
msgid "could not get password entry for user %s"
|
||||
msgstr "nemo¾né zjistit informaci o u¾ivatelovi %s"
|
||||
msgstr "nemožné zjistit informaci o uživatelovi %s"
|
||||
|
||||
#: ../../WINGs/hashtable.c:275
|
||||
msgid "rebuilding hash table...\n"
|
||||
msgstr "pøepis tabulky hashovských funkcí...\n"
|
||||
msgstr "přepis tabulky hashovských funkcí...\n"
|
||||
|
||||
#: ../../WINGs/hashtable.c:279
|
||||
msgid "finished rebuild.\n"
|
||||
msgstr "konec pøepisu.\n"
|
||||
msgstr "konec přepisu.\n"
|
||||
|
||||
#: ../../WINGs/host.c:116
|
||||
msgid "Cannot get current host name"
|
||||
msgstr "Nemo¾né zjistit aktuální jméno poèítaèe"
|
||||
msgstr "Nemožné zjistit aktuální jméno počítače"
|
||||
|
||||
#: ../../WINGs/memory.c:94
|
||||
msgid "malloc() failed. Retrying after 2s."
|
||||
msgstr "chyba malloc(). Nový pokus o 2s."
|
||||
msgstr "chyba malloc(). Nový pokus o 2s."
|
||||
|
||||
#: ../../WINGs/memory.c:103
|
||||
msgid "Really Bad Error: recursive malloc() failure."
|
||||
msgstr "Skuteènì o¹klivá chyba: rekurzivní chyba malloc()."
|
||||
msgstr "Skutečně ošklivá chyba: rekurzivní chyba malloc()."
|
||||
|
||||
#: ../../WINGs/memory.c:106 ../../WINGs/memory.c:146
|
||||
msgid "virtual memory exhausted"
|
||||
msgstr "virtuální pamì» vyèerpaná"
|
||||
msgstr "virtuální paměť vyčerpaná"
|
||||
|
||||
#: ../../WINGs/memory.c:133
|
||||
msgid "realloc() failed. Retrying after 2s."
|
||||
msgstr "chyba realloc(). Nový pokus o 2s."
|
||||
msgstr "chyba realloc(). Nový pokus o 2s."
|
||||
|
||||
#: ../../WINGs/memory.c:142
|
||||
msgid "Really Bad Error: recursive realloc() failure."
|
||||
msgstr "Skuteènì o¹klivá chyba: rekurzivní chyba realloc()."
|
||||
msgstr "Skutečně ošklivá chyba: rekurzivní chyba realloc()."
|
||||
|
||||
#: ../../WINGs/memory.c:205
|
||||
#, c-format
|
||||
msgid "trying to release unexisting data %p"
|
||||
msgstr "pokus uvolnit neexistujícá data %p"
|
||||
msgstr "pokus uvolnit neexistujícá data %p"
|
||||
|
||||
#: ../../WINGs/memory.c:210
|
||||
#, c-format
|
||||
msgid "RELEASING %p\n"
|
||||
msgstr "UVOLNÌNÍ %p\n"
|
||||
msgstr "UVOLNĚNÍ %p\n"
|
||||
|
||||
#: ../../WINGs/wcolor.c:198 ../../WINGs/wcolor.c:211 ../../WINGs/wcolor.c:250
|
||||
#: ../../WINGs/wcolor.c:291
|
||||
#, c-format
|
||||
msgid "could not allocate %s color"
|
||||
msgstr "nemo¾né alokovat %s barvu"
|
||||
msgstr "nemožné alokovat %s barvu"
|
||||
|
||||
#: ../../WINGs/wcolor.c:198
|
||||
msgid "white"
|
||||
msgstr "bílou"
|
||||
msgstr "bílou"
|
||||
|
||||
#: ../../WINGs/wcolor.c:211
|
||||
msgid "black"
|
||||
msgstr "èernou"
|
||||
msgstr "černou"
|
||||
|
||||
#: ../../WINGs/wcolor.c:250
|
||||
msgid "gray"
|
||||
msgstr "¹edou"
|
||||
msgstr "šedou"
|
||||
|
||||
#: ../../WINGs/wcolor.c:291
|
||||
msgid "dark gray"
|
||||
msgstr "tmavì ¹edou"
|
||||
msgstr "tmavě šedou"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:410
|
||||
msgid "Colors"
|
||||
@@ -159,7 +159,7 @@ msgstr "Barvy"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:600 ../../WINGs/wcolorpanel.c:2819
|
||||
msgid "Brightness"
|
||||
msgstr "Svìtlost"
|
||||
msgstr "Světlost"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:602 ../../WINGs/wcolorpanel.c:678
|
||||
#: ../../WINGs/wcolorpanel.c:711 ../../WINGs/wcolorpanel.c:745
|
||||
@@ -169,19 +169,19 @@ msgstr "Sv
|
||||
#: ../../WINGs/wcolorpanel.c:2857 ../../WINGs/wcolorpanel.c:2893
|
||||
#: ../../WINGs/wcolorpanel.c:3741
|
||||
msgid "Color Panel: Could not allocate memory"
|
||||
msgstr "Panel barev: Nemo¾né alokovat pamì»"
|
||||
msgstr "Panel barev: Nemožné alokovat paměť"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:675 ../../WINGs/wcolorpanel.c:676
|
||||
msgid "Red"
|
||||
msgstr "Èervená"
|
||||
msgstr "Červená"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:708 ../../WINGs/wcolorpanel.c:709
|
||||
msgid "Green"
|
||||
msgstr "Zelená"
|
||||
msgstr "Zelená"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:742 ../../WINGs/wcolorpanel.c:743
|
||||
msgid "Blue"
|
||||
msgstr "Modrá"
|
||||
msgstr "Modrá"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:802 ../../WINGs/wcolorpanel.c:803
|
||||
msgid "Cyan"
|
||||
@@ -193,11 +193,11 @@ msgstr ""
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:870 ../../WINGs/wcolorpanel.c:871
|
||||
msgid "Yellow"
|
||||
msgstr "®lutá"
|
||||
msgstr "Žlutá"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:905 ../../WINGs/wcolorpanel.c:906
|
||||
msgid "Black"
|
||||
msgstr "Èerná"
|
||||
msgstr "Černá"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:986
|
||||
msgid "Spectrum"
|
||||
@@ -209,12 +209,12 @@ msgstr "Paleta"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1022
|
||||
msgid "New from File..."
|
||||
msgstr "Nová ze souboru..."
|
||||
msgstr "Nová ze souboru..."
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1023 ../../WINGs/wcolorpanel.c:1071
|
||||
#: ../../WINGs/wcolorpanel.c:1088
|
||||
msgid "Rename..."
|
||||
msgstr "Pøejmenovat..."
|
||||
msgstr "Přejmenovat..."
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1024 ../../WINGs/wcolorpanel.c:1072
|
||||
#: ../../WINGs/wcolorpanel.c:1089 ../../WINGs/wcolorpanel.c:3316
|
||||
@@ -223,11 +223,11 @@ msgstr "Odstranit"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1025
|
||||
msgid "Copy"
|
||||
msgstr "Kopírovat"
|
||||
msgstr "Kopírovat"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1026
|
||||
msgid "New from Clipboard"
|
||||
msgstr "Nová ze schránky"
|
||||
msgstr "Nová ze schránky"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1047
|
||||
msgid "X11-Colors"
|
||||
@@ -239,7 +239,7 @@ msgstr "Barva"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1070
|
||||
msgid "Add..."
|
||||
msgstr "Pøidat..."
|
||||
msgstr "Přidat..."
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1080
|
||||
msgid "List"
|
||||
@@ -247,14 +247,14 @@ msgstr "Seznam"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1087
|
||||
msgid "New..."
|
||||
msgstr "Nový..."
|
||||
msgstr "Nový..."
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1226
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Color Panel: Could not create directory %s needed to store configurations"
|
||||
msgstr ""
|
||||
"Panel barev: Nemo¾né vytvoøit adresáø %s potøebný k ulo¾ení nastavení"
|
||||
"Panel barev: Nemožné vytvořit adresář %s potřebný k uložení nastavení"
|
||||
|
||||
#. Delete the file, it doesn't belong here
|
||||
#: ../../WINGs/wcolorpanel.c:1232 ../../WINGs/wcolorpanel.c:3202
|
||||
@@ -264,7 +264,7 @@ msgstr "Chyba souboru"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1233
|
||||
msgid "Could not create ColorPanel configuration directory"
|
||||
msgstr "Nemo¾né vytvoøit konfiguraèní adresáø panelu barev"
|
||||
msgstr "Nemožné vytvořit konfigurační adresář panelu barev"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1234 ../../WINGs/wcolorpanel.c:3203
|
||||
#: ../../WINGs/wcolorpanel.c:3208 ../../WINGs/wcolorpanel.c:3235
|
||||
@@ -277,12 +277,12 @@ msgstr "OK"
|
||||
#: ../../WINGs/wcolorpanel.c:1240 ../../WINGs/wcolorpanel.c:1276
|
||||
#: ../../WINGs/wcolorpanel.c:1294
|
||||
msgid "Color Panel: Could not find file"
|
||||
msgstr "Panel barev: Nemo¾né nalézt soubor"
|
||||
msgstr "Panel barev: Nemožné nalézt soubor"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1481 ../../WINGs/wcolorpanel.c:1546
|
||||
#: ../../WINGs/wcolorpanel.c:1610
|
||||
msgid "Color Panel: X failed request"
|
||||
msgstr "Panel barev: chyba po¾adavku X"
|
||||
msgstr "Panel barev: chyba požadavku X"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:2855
|
||||
msgid "Saturation"
|
||||
@@ -290,42 +290,42 @@ msgstr "Saturace"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:2891
|
||||
msgid "Hue"
|
||||
msgstr "Odteï"
|
||||
msgstr "Odteď"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3141
|
||||
msgid "Open Palette"
|
||||
msgstr "Otevøít paletu"
|
||||
msgstr "Otevřít paletu"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3203
|
||||
msgid "Invalid file format !"
|
||||
msgstr "Nesprávný souborový formát!"
|
||||
msgstr "Nesprávný souborový formát!"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3205
|
||||
#, c-format
|
||||
msgid "can't remove file %s"
|
||||
msgstr "nemo¾né odstranit soubor %s"
|
||||
msgstr "nemožné odstranit soubor %s"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3207
|
||||
msgid "Couldn't remove file from Configuration Directory !"
|
||||
msgstr "Nemo¾né odstranit soubor z konfiguraèního adresáøe!"
|
||||
msgstr "Nemožné odstranit soubor z konfiguračního adresáře!"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3234
|
||||
msgid "Rename"
|
||||
msgstr "Pøejmenovat"
|
||||
msgstr "Přejmenovat"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3234
|
||||
msgid "Rename palette to:"
|
||||
msgstr "Pøejmenovat paletu:"
|
||||
msgstr "Přejmenovat paletu:"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3235 ../../WINGs/wfilepanel.c:252
|
||||
#: ../../WINGs/wfilepanel.c:653 ../../WINGs/wfilepanel.c:752
|
||||
msgid "Cancel"
|
||||
msgstr "Zru¹it"
|
||||
msgstr "Zrušit"
|
||||
|
||||
#. Careful, this palette exists already
|
||||
#: ../../WINGs/wcolorpanel.c:3251 ../../WINGs/wfilepanel.c:752
|
||||
msgid "Warning"
|
||||
msgstr "Varování"
|
||||
msgstr "Varování"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3252
|
||||
msgid ""
|
||||
@@ -333,9 +333,9 @@ msgid ""
|
||||
"\n"
|
||||
"Overwrite ?"
|
||||
msgstr ""
|
||||
"Paleta u¾ existuje!\n"
|
||||
"Paleta už existuje!\n"
|
||||
"\n"
|
||||
"Pøepsat?"
|
||||
"Přepsat?"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3252 ../../WINGs/wcolorpanel.c:3316
|
||||
msgid "No"
|
||||
@@ -348,11 +348,11 @@ msgstr "Ano"
|
||||
#: ../../WINGs/wcolorpanel.c:3284
|
||||
#, c-format
|
||||
msgid "Couldn't rename palette %s to %s\n"
|
||||
msgstr "Nemo¾né pøejmenovat paletu %s na %s\n"
|
||||
msgstr "Nemožné přejmenovat paletu %s na %s\n"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3310
|
||||
msgid "This will permanently remove the palette "
|
||||
msgstr "Paleta bude natrvalo smazaná"
|
||||
msgstr "Paleta bude natrvalo smazaná"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3313
|
||||
msgid ""
|
||||
@@ -362,53 +362,53 @@ msgid ""
|
||||
msgstr ""
|
||||
".\n"
|
||||
"\n"
|
||||
"Jste si jisti, ¾e chcete odstranit tuto paletu?"
|
||||
"Jste si jisti, že chcete odstranit tuto paletu?"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3338
|
||||
#, c-format
|
||||
msgid "Couldn't remove palette %s\n"
|
||||
msgstr "Nemo¾né odstranit paletu %s\n"
|
||||
msgstr "Nemožné odstranit paletu %s\n"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3643
|
||||
#, c-format
|
||||
msgid "Could not open %s"
|
||||
msgstr "Nemo¾né otevøít %s"
|
||||
msgstr "Nemožné otevřít %s"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3650
|
||||
#, c-format
|
||||
msgid "Could not create %s"
|
||||
msgstr "Nemo¾né vytvoøit %s"
|
||||
msgstr "Nemožné vytvořit %s"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3661
|
||||
#, c-format
|
||||
msgid "Write error on file %s"
|
||||
msgstr "Chyba pøi zápisu do souboru %s"
|
||||
msgstr "Chyba při zápisu do souboru %s"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3706
|
||||
msgid "Color Panel: Color unspecified"
|
||||
msgstr "Panel barev: Nespecifikovaná barva"
|
||||
msgstr "Panel barev: Nespecifikovaná barva"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:228
|
||||
msgid "Name:"
|
||||
msgstr "Jméno:"
|
||||
msgstr "Jméno:"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:325 ../../WINGs/wfilepanel.c:390
|
||||
msgid "Open"
|
||||
msgstr "Otevøít"
|
||||
msgstr "Otevřít"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:343 ../../WINGs/wfilepanel.c:396
|
||||
msgid "Save"
|
||||
msgstr "Ulo¾it"
|
||||
msgstr "Uložit"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:556
|
||||
#, c-format
|
||||
msgid "WINGs: could not open directory %s\n"
|
||||
msgstr "WINGs: nemo¾né otevøít adresáø %s\n"
|
||||
msgstr "WINGs: nemožné otevřít adresář %s\n"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:574
|
||||
#, c-format
|
||||
msgid "WINGs: could not stat %s\n"
|
||||
msgstr "WINGs: nemo¾né zjistit informace o %s\n"
|
||||
msgstr "WINGs: nemožné zjistit informace o %s\n"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:641 ../../WINGs/wfilepanel.c:962
|
||||
#: ../../WINGs/wfontpanel.c:716
|
||||
@@ -417,21 +417,21 @@ msgstr "Chyba"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:652
|
||||
msgid "Create Directory"
|
||||
msgstr "Vytvoøit adresáø"
|
||||
msgstr "Vytvořit adresář"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:653
|
||||
msgid "Enter directory name"
|
||||
msgstr "Jméno adresáøe"
|
||||
msgstr "Jméno adresáře"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:689 ../../WINGs/wfilepanel.c:728
|
||||
#: ../../WINGs/wfilepanel.c:757 ../../WINGs/wfilepanel.c:785
|
||||
msgid "Permission denied."
|
||||
msgstr "Pøístup odmítnut."
|
||||
msgstr "Přístup odmítnut."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:692
|
||||
#, c-format
|
||||
msgid "'%s' already exists."
|
||||
msgstr "'%s' u¾ existuje"
|
||||
msgstr "'%s' už existuje"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:695
|
||||
msgid "Path does not exist."
|
||||
@@ -444,23 +444,23 @@ msgstr "'%s' neexistuje."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:732 ../../WINGs/wfilepanel.c:789
|
||||
msgid "Insufficient memory available."
|
||||
msgstr "Nedostatek pamìti."
|
||||
msgstr "Nedostatek paměti."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:736 ../../WINGs/wfilepanel.c:793
|
||||
#, c-format
|
||||
msgid "'%s' is on a read-only filesystem."
|
||||
msgstr "'%s' je na souborovém systému jen pro ètení."
|
||||
msgstr "'%s' je na souborovém systému jen pro čtení."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:739 ../../WINGs/wfilepanel.c:769
|
||||
#: ../../WINGs/wfilepanel.c:796
|
||||
#, c-format
|
||||
msgid "Can not delete '%s'."
|
||||
msgstr "Nemo¾né odstranit '%s'."
|
||||
msgstr "Nemožné odstranit '%s'."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:745
|
||||
#, c-format
|
||||
msgid "Delete directory %s ?"
|
||||
msgstr "Odstranit adresáø %s?"
|
||||
msgstr "Odstranit adresář %s?"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:748
|
||||
#, c-format
|
||||
@@ -470,32 +470,32 @@ msgstr "Odstranit soubor %s?"
|
||||
#: ../../WINGs/wfilepanel.c:760
|
||||
#, c-format
|
||||
msgid "Directory '%s' does not exist."
|
||||
msgstr "Adresáø '%s' neexistuje."
|
||||
msgstr "Adresář '%s' neexistuje."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:763
|
||||
#, c-format
|
||||
msgid "Directory '%s' is not empty."
|
||||
msgstr "Adresáø '%s' není prázdný."
|
||||
msgstr "Adresář '%s' není prázdný."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:766
|
||||
#, c-format
|
||||
msgid "Directory '%s' is busy."
|
||||
msgstr "Adresáø '%s' je pou¾ívaný."
|
||||
msgstr "Adresář '%s' je používaný."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:779
|
||||
#, c-format
|
||||
msgid "'%s' is a directory."
|
||||
msgstr "'%s' je adresáø."
|
||||
msgstr "'%s' je adresář."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:821
|
||||
#, c-format
|
||||
msgid "An error occured browsing '%s'."
|
||||
msgstr "Pøi prohlí¾ení '%s' nastala chyba."
|
||||
msgstr "Při prohlížení '%s' nastala chyba."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:825
|
||||
#, c-format
|
||||
msgid "'%s' is not a directory."
|
||||
msgstr "'%s' není adresáø."
|
||||
msgstr "'%s' není adresář."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:962
|
||||
msgid "File does not exist."
|
||||
@@ -504,37 +504,37 @@ msgstr "Soubor neexistuje."
|
||||
#: ../../WINGs/wfont.c:129
|
||||
#, c-format
|
||||
msgid "the following character sets are missing in %s:"
|
||||
msgstr "nasledující sady znakù chybí v %s:"
|
||||
msgstr "nasledující sady znaků chybí v %s:"
|
||||
|
||||
#: ../../WINGs/wfont.c:136
|
||||
#, c-format
|
||||
msgid ""
|
||||
"the string \"%s\" will be used in place of any characters from those sets."
|
||||
msgstr ""
|
||||
"øetìzec \"%s\" bude pou¾itý namísto znakù z tìchto sad."
|
||||
"řetězec \"%s\" bude použitý namísto znaků z těchto sad."
|
||||
|
||||
#: ../../WINGs/wfont.c:282 ../../WINGs/wfont.c:318
|
||||
#, c-format
|
||||
msgid "could not load font set %s. Trying fixed."
|
||||
msgstr "nemo¾né naèíst font %s. Zkou¹í se naèíst fixed."
|
||||
msgstr "nemožné načíst font %s. Zkouší se načíst fixed."
|
||||
|
||||
#: ../../WINGs/wfont.c:288 ../../WINGs/wfont.c:324
|
||||
#, c-format
|
||||
msgid "could not load font %s. Trying fixed."
|
||||
msgstr "nemo¾no naèíst font %s. Zko¹í se naèíst fixed."
|
||||
msgstr "nemožno načíst font %s. Zkoší se načíst fixed."
|
||||
|
||||
#: ../../WINGs/wfont.c:292 ../../WINGs/wfont.c:328
|
||||
msgid "could not load fixed font!"
|
||||
msgstr "nemo¾né naèíst font fixed!"
|
||||
msgstr "nemožné načíst font fixed!"
|
||||
|
||||
#: ../../WINGs/wfont.c:423
|
||||
#, c-format
|
||||
msgid "font description %s is too large."
|
||||
msgstr "popis fontu %s je pøíli¹ velký."
|
||||
msgstr "popis fontu %s je příliš velký."
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:205
|
||||
msgid "Test!!!"
|
||||
msgstr "Zkou¹ka!!!"
|
||||
msgstr "Zkouška!!!"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:211
|
||||
msgid "Family"
|
||||
@@ -554,16 +554,16 @@ msgstr "Sada"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:257
|
||||
msgid "Revert"
|
||||
msgstr "Zpìt"
|
||||
msgstr "Zpět"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:717
|
||||
msgid "Could not retrieve font list"
|
||||
msgstr "Nemo¾né obdr¾et seznam fontù"
|
||||
msgstr "Nemožné obdržet seznam fontů"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:729
|
||||
#, c-format
|
||||
msgid "font name %s is longer than 256, which is invalid."
|
||||
msgstr "jméno fontu %s je del¹í ne¾ 256, co¾ je ¹patnì."
|
||||
msgstr "jméno fontu %s je delší než 256, což je špatně."
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:880
|
||||
msgid "Roman"
|
||||
@@ -587,37 +587,37 @@ msgstr ""
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:895
|
||||
msgid "Normal"
|
||||
msgstr "Normílní"
|
||||
msgstr "Normílní"
|
||||
|
||||
#: ../../WINGs/widgets.c:414
|
||||
#, c-format
|
||||
msgid "WINGs: could not load widget images file: %s"
|
||||
msgstr "WINGs: nemo¾né naèíst soubor s obrázky pro widgety: %s"
|
||||
msgstr "WINGs: nemožné načíst soubor s obrázky pro widgety: %s"
|
||||
|
||||
#: ../../WINGs/widgets.c:525
|
||||
#, c-format
|
||||
msgid "WINGs: could not open display %s"
|
||||
msgstr "WINGs: nemo¾né otevøít display %s"
|
||||
msgstr "WINGs: nemožné otevřít display %s"
|
||||
|
||||
#: ../../WINGs/widgets.c:717
|
||||
msgid ""
|
||||
"could not load any fonts. Make sure your font installationand locale "
|
||||
"settings are correct."
|
||||
msgstr ""
|
||||
"nemo¾né naèíst ¾ádný font. Ubezpeète se, ¾e instalace fontù a místního "
|
||||
"nastavení jsou v poøádku."
|
||||
"nemožné načíst žádný font. Ubezpečte se, že instalace fontů a místního "
|
||||
"nastavení jsou v pořádku."
|
||||
|
||||
#: ../../WINGs/wruler.c:189
|
||||
msgid "0 inches"
|
||||
msgstr "0 palcù"
|
||||
msgstr "0 palců"
|
||||
|
||||
#: ../../WINGs/wtext.c:1212
|
||||
msgid "...for this app will surely crash :-)\n"
|
||||
msgstr "...pro tuto aplikaci to urèitì spadne :-)\n"
|
||||
msgstr "...pro tuto aplikaci to určitě spadne :-)\n"
|
||||
|
||||
#: ../../WINGs/wtext.c:2084
|
||||
msgid "didn't get it\n"
|
||||
msgstr "nedosa¾eno\n"
|
||||
msgstr "nedosaženo\n"
|
||||
|
||||
#: ../../WINGs/wtext.c:2726
|
||||
#, c-format
|
||||
@@ -626,15 +626,15 @@ msgstr "typ je [%s]\n"
|
||||
|
||||
#: ../../WINGs/wtext.c:2797
|
||||
msgid "could not request data for dropped data"
|
||||
msgstr "nemohou být vy¾ádána data pro polo¾ená data"
|
||||
msgstr "nemohou být vyžádána data pro položená data"
|
||||
|
||||
#: ../../WINGs/wtext.c:2995
|
||||
msgid "could not create text's view\n"
|
||||
msgstr "nemo¾né zobrazit text\n"
|
||||
msgstr "nemožné zobrazit text\n"
|
||||
|
||||
#: ../../WINGs/wview.c:219
|
||||
msgid "trying to realize widget of unrealized parent"
|
||||
msgstr "snaha vytvoøit widget neexistujícího rodièe objektu"
|
||||
msgstr "snaha vytvořit widget neexistujícího rodiče objektu"
|
||||
|
||||
#: ../../WINGs/wview.c:267
|
||||
msgid "trying to reparent realized view to unrealized parent"
|
||||
@@ -642,22 +642,22 @@ msgstr ""
|
||||
|
||||
#: ../../WINGs/wtextfield.c:490
|
||||
msgid "only left alignment is supported in textfields"
|
||||
msgstr "pro textové pole je povolené jen levé zarovnání"
|
||||
msgstr "pro textové pole je povolené jen levé zarovnání"
|
||||
|
||||
#pozor, co je STRING?
|
||||
#: ../../WINGs/wwindow.c:222
|
||||
msgid "window title conversion error... using STRING encoding"
|
||||
msgstr "chyba konverze titulku okna... pou¾ije se kódovaní STRING"
|
||||
msgstr "chyba konverze titulku okna... použije se kódovaní STRING"
|
||||
|
||||
#: ../../WINGs/wwindow.c:313
|
||||
msgid "could not allocate memory for window size hints"
|
||||
msgstr "nemo¾né alokovat pamì» pro pokyny velikosti okna"
|
||||
msgstr "nemožné alokovat paměť pro pokyny velikosti okna"
|
||||
|
||||
#: ../../WINGs/wwindow.c:586
|
||||
msgid "could not allocate memory for WM hints"
|
||||
msgstr "nemo¾né alokovat pamì» pro pokyny WM"
|
||||
msgstr "nemožné alokovat paměť pro pokyny WM"
|
||||
|
||||
#: ../../WINGs/wwindow.c:627
|
||||
msgid "icon title conversion error..using STRING encoding"
|
||||
msgstr "chyba konverze titulku ikony... pou¾ije se kódovaní STRING"
|
||||
msgstr "chyba konverze titulku ikony... použije se kódovaní STRING"
|
||||
|
||||
|
||||
525
WINGs/po/de.po
525
WINGs/po/de.po
@@ -1,24 +1,28 @@
|
||||
# KTranslator Generated File
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR Free Software Foundation, Inc.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
# German Message Catalog for WINGs
|
||||
#
|
||||
# Initial translation
|
||||
# Gudio Scholz <guido.scholz@bayernline.de>
|
||||
#
|
||||
# Adapted to versions 0.80 ff.
|
||||
# Torsten Marek <shlomme@gmx.net>
|
||||
#
|
||||
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WINGs 0.80.0\n"
|
||||
"POT-Creation-Date: 2002-01-09 21:06+0100\n"
|
||||
"PO-Revision-Date: 2002-01-09 21:20+0100\n"
|
||||
"Last-Translator: Guido Scholz <guido.scholz@bayernline.de>\n"
|
||||
"Language-Team: Deutsch <de@li.org>\n"
|
||||
"Project-Id-Version: WINGs\n"
|
||||
"POT-Creation-Date: 2004-11-01 16:24+0100\n"
|
||||
"PO-Revision-Date: 2004-11-05 23:48+0100\n"
|
||||
"Last-Translator: shlomme@gmx.net\n"
|
||||
"Language-Team: German\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=ISO-8859-1\n"
|
||||
"Content-Transfer-Encoding: unknown\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../../WINGs/connection.c:461 ../../WINGs/connection.c:526
|
||||
#: ../../WINGs/connection.c:569
|
||||
#: ../../WINGs/connection.c:471 ../../WINGs/connection.c:536
|
||||
#: ../../WINGs/connection.c:579
|
||||
msgid "Bad address-service-protocol combination"
|
||||
msgstr "Ungültige Adress-Dienst-Protokoll Kombination"
|
||||
msgstr "Ungültige Kombination von Adresse und Dienstprotokoll"
|
||||
|
||||
#: ../../WINGs/error.c:54
|
||||
#, c-format
|
||||
@@ -45,346 +49,349 @@ msgstr " Fehler: "
|
||||
#: ../../WINGs/findfile.c:48
|
||||
#, c-format
|
||||
msgid "could not get password entry for UID %i"
|
||||
msgstr "konnte Passwort nicht ermitteln für UID %i"
|
||||
msgstr "Passworteintrag für UID %i konnte nicht ermittelt werden"
|
||||
|
||||
#: ../../WINGs/findfile.c:66
|
||||
#, c-format
|
||||
msgid "could not get password entry for user %s"
|
||||
msgstr "konnte Passwort nicht ermitteln für Benutzer %s"
|
||||
msgstr "Passworteintrag für Benutzer %s konnte nicht ermittelt werden"
|
||||
|
||||
#: ../../WINGs/host.c:114
|
||||
msgid "Cannot get current host name"
|
||||
msgstr "Kann aktuellen Hostnamen nicht ermitteln"
|
||||
msgstr "Aktueller Hostname kann nicht ermittelt werden"
|
||||
|
||||
#: ../../WINGs/proplist.c:91
|
||||
#, c-format
|
||||
msgid "syntax error in %s %s, line %i: %s"
|
||||
msgstr "Syntaxfehler in %s %s, Zeile %i: %s"
|
||||
|
||||
#: ../../WINGs/proplist.c:150
|
||||
msgid "Only string or data is supported for a proplist dictionary key"
|
||||
msgstr ""
|
||||
"Nur string oder data wird als Schlüssel für ein proplist dictionary "
|
||||
"unterstützt"
|
||||
"Nur Zeichenketten oder Binärdaten werden als Schlüssel für ein PropList-Dictionary "
|
||||
"unterstützt"
|
||||
|
||||
#: ../../WINGs/proplist.c:184 ../../WINGs/proplist.c:236
|
||||
#: ../../WINGs/proplist.c:394 ../../WINGs/proplist.c:474
|
||||
#: ../../WINGs/proplist.c:1071 ../../WINGs/proplist.c:1123
|
||||
#: ../../WINGs/proplist.c:1289 ../../WINGs/proplist.c:1368
|
||||
#: ../../WINGs/proplist.c:1489 ../../WINGs/proplist.c:1536
|
||||
#: ../../WINGs/proplist.c:1075 ../../WINGs/proplist.c:1127
|
||||
#: ../../WINGs/proplist.c:1293 ../../WINGs/proplist.c:1372
|
||||
#: ../../WINGs/proplist.c:1493 ../../WINGs/proplist.c:1540
|
||||
msgid "Used proplist functions on non-WMPropLists objects"
|
||||
msgstr ""
|
||||
msgstr "PropList-Funktionen werden auf nicht-WMPropList-Objekte angewendet"
|
||||
|
||||
#: ../../WINGs/proplist.c:630
|
||||
msgid "unterminated PropList string"
|
||||
msgstr "nicht terminierter PropList string"
|
||||
msgstr "nicht terminierte PropList-Zeichenkette"
|
||||
|
||||
#: ../../WINGs/proplist.c:670
|
||||
msgid "unterminated PropList data"
|
||||
msgstr "nicht terminiertes PropList data"
|
||||
msgstr "nicht terminierte PropList-Binärdaten"
|
||||
|
||||
#: ../../WINGs/proplist.c:678
|
||||
msgid "unterminated PropList data (missing hexdigit)"
|
||||
msgstr "nicht terminiertes PropList data (fehlendes hex-Zeichen)"
|
||||
msgstr "nicht terminierte PropList-Binärdaten (fehlendes Hex-Zeichen)"
|
||||
|
||||
#: ../../WINGs/proplist.c:690
|
||||
#: ../../WINGs/proplist.c:690 ../../WINGs/proplist.c:695
|
||||
msgid "non hexdigit character in PropList data"
|
||||
msgstr "falsches hex-Zeichen in PropList data"
|
||||
msgstr "falsches Hex-Zeichen in PropList-Binärdaten"
|
||||
|
||||
#: ../../WINGs/proplist.c:725
|
||||
#: ../../WINGs/proplist.c:729
|
||||
msgid "unterminated PropList array"
|
||||
msgstr "nicht terminiertes PropList array"
|
||||
msgstr "nicht terminiertes PropList-Array"
|
||||
|
||||
#: ../../WINGs/proplist.c:733
|
||||
#: ../../WINGs/proplist.c:737
|
||||
msgid "missing or unterminated PropList array"
|
||||
msgstr "fehlendes oder nicht terminiertes PropList array"
|
||||
msgstr "fehlendes oder nicht terminiertes PropList-Array"
|
||||
|
||||
#: ../../WINGs/proplist.c:743
|
||||
#: ../../WINGs/proplist.c:747
|
||||
msgid "could not get PropList array element"
|
||||
msgstr ""
|
||||
msgstr "PropList-Array-Element konnte nicht gelesen werden"
|
||||
|
||||
#: ../../WINGs/proplist.c:772
|
||||
#: ../../WINGs/proplist.c:776
|
||||
msgid "unterminated PropList dictionary"
|
||||
msgstr ""
|
||||
msgstr "nicht terminiertes PropList-Dictionary"
|
||||
|
||||
#: ../../WINGs/proplist.c:789
|
||||
#: ../../WINGs/proplist.c:793
|
||||
msgid "missing PropList dictionary key"
|
||||
msgstr ""
|
||||
msgstr "fehlender Schlüssel in PropList-Dictionary"
|
||||
|
||||
#: ../../WINGs/proplist.c:791
|
||||
#: ../../WINGs/proplist.c:795
|
||||
msgid "missing PropList dictionary entry key or unterminated dictionary"
|
||||
msgstr ""
|
||||
msgstr "fehlender Schlüssel in PropList-Dictionary oder fehlende Terminierung"
|
||||
|
||||
#: ../../WINGs/proplist.c:799
|
||||
#: ../../WINGs/proplist.c:803
|
||||
msgid "error parsing PropList dictionary key"
|
||||
msgstr ""
|
||||
msgstr "Fehler beim Parsen eines PropList-Dictionary-Schlüssels"
|
||||
|
||||
#: ../../WINGs/proplist.c:807
|
||||
#: ../../WINGs/proplist.c:811
|
||||
msgid "missing = in PropList dictionary entry"
|
||||
msgstr ""
|
||||
msgstr "fehlendes \"=\" in PropList-Dictionary-Schlüssel"
|
||||
|
||||
#: ../../WINGs/proplist.c:815
|
||||
#: ../../WINGs/proplist.c:819
|
||||
msgid "error parsing PropList dictionary entry value"
|
||||
msgstr ""
|
||||
msgstr "Fehler beim Parsen eines PropList-Dictionary-Wertes"
|
||||
|
||||
#: ../../WINGs/proplist.c:823
|
||||
#: ../../WINGs/proplist.c:827
|
||||
msgid "missing ; in PropList dictionary entry"
|
||||
msgstr ""
|
||||
msgstr "fehlendes \";\" in PropList-Dictionary-Eintrag"
|
||||
|
||||
#: ../../WINGs/proplist.c:884
|
||||
#: ../../WINGs/proplist.c:888
|
||||
msgid ""
|
||||
"was expecting a string, data, array or dictionary. If it's a string, try "
|
||||
"enclosing it with \"."
|
||||
msgstr ""
|
||||
"string, data, array oder dictionary wurde erwartet. Zeichenketten mit \" "
|
||||
"Zeichenkette, Binärdaten, Array oder Dictionary erwartet. Zeichenketten ggf. mit \" "
|
||||
"einklammern."
|
||||
|
||||
#: ../../WINGs/proplist.c:888
|
||||
#: ../../WINGs/proplist.c:892
|
||||
msgid "Comments are not allowed inside WindowMaker owned domain files."
|
||||
msgstr "Kommentare sind in Domaindaten von WindowMaker nicht erlaubt."
|
||||
msgstr "Kommentare sind in Domänendaten von WindowMaker nicht erlaubt."
|
||||
|
||||
#: ../../WINGs/proplist.c:1559 ../../WINGs/proplist.c:1624
|
||||
#: ../../WINGs/proplist.c:1563 ../../WINGs/proplist.c:1630
|
||||
msgid "extra data after end of property list"
|
||||
msgstr "zusätzliche Daten hinter dem Ende der Propertyliste"
|
||||
msgstr "zusätzliche Daten hinter dem Ende der Propertyliste"
|
||||
|
||||
#: ../../WINGs/proplist.c:1602
|
||||
#: ../../WINGs/proplist.c:1606
|
||||
#, c-format
|
||||
msgid "could not get size for file '%s'"
|
||||
msgstr "konnte Dateigrösse von '%s' nicht ermitteln"
|
||||
msgstr "Dateigröße von '%s' konnte nicht ermittelt werden"
|
||||
|
||||
#: ../../WINGs/proplist.c:1614
|
||||
#: ../../WINGs/proplist.c:1619
|
||||
#, c-format
|
||||
msgid "error reading from file '%s'"
|
||||
msgstr "Fehler beim Lesen der Datei '%s'"
|
||||
|
||||
#: ../../WINGs/proplist.c:1665
|
||||
#: ../../WINGs/proplist.c:1671
|
||||
#, c-format
|
||||
msgid "mkstemp (%s) failed"
|
||||
msgstr "mkstemp (%s) schlug fehl"
|
||||
msgstr "mkstemp (%s) fehlgeschlagen"
|
||||
|
||||
#: ../../WINGs/proplist.c:1676
|
||||
#: ../../WINGs/proplist.c:1682
|
||||
#, c-format
|
||||
msgid "mktemp (%s) failed"
|
||||
msgstr "mktemp (%s) schlug fehl"
|
||||
msgstr "mktemp (%s) fehlgeschlagen"
|
||||
|
||||
#: ../../WINGs/proplist.c:1687
|
||||
#: ../../WINGs/proplist.c:1693
|
||||
#, c-format
|
||||
msgid "open (%s) failed"
|
||||
msgstr "open (%s) schlug fehl"
|
||||
msgstr "open (%s) fehlgeschlagen"
|
||||
|
||||
#: ../../WINGs/proplist.c:1694
|
||||
#: ../../WINGs/proplist.c:1700
|
||||
#, c-format
|
||||
msgid "writing to file: %s failed"
|
||||
msgstr "Schreiben in Datei: %s schlug fehl"
|
||||
msgstr "Schreiben in Datei: %s fehlgeschlagen"
|
||||
|
||||
#: ../../WINGs/proplist.c:1702
|
||||
#: ../../WINGs/proplist.c:1708
|
||||
#, c-format
|
||||
msgid "fclose (%s) failed"
|
||||
msgstr "fclose (%s) schlug fehl"
|
||||
msgstr "fclose (%s) fehlgeschlagen"
|
||||
|
||||
#: ../../WINGs/proplist.c:1711
|
||||
#: ../../WINGs/proplist.c:1717
|
||||
#, c-format
|
||||
msgid "rename ('%s' to '%s') failed"
|
||||
msgstr "rename ('%s' to '%s') schlug fehl"
|
||||
msgstr "rename ('%s' nach '%s') fehlgeschlagen"
|
||||
|
||||
#. something happened with the file. just overwrite it
|
||||
#: ../../WINGs/userdefaults.c:192 ../../WINGs/userdefaults.c:208
|
||||
#: ../../WINGs/userdefaults.c:188 ../../WINGs/userdefaults.c:204
|
||||
#, c-format
|
||||
msgid "cannot read domain from file '%s' when syncing"
|
||||
msgstr "Kannn bei der Synchronisation nicht aus Datei '%s' lesen"
|
||||
msgstr "Bei der Synchronisation konnte nicht aus der Datei '%s' gelesen werden"
|
||||
|
||||
#: ../../WINGs/wcolor.c:198 ../../WINGs/wcolor.c:211 ../../WINGs/wcolor.c:250
|
||||
#: ../../WINGs/wcolor.c:291
|
||||
#: ../../WINGs/wcolor.c:237 ../../WINGs/wcolor.c:249 ../../WINGs/wcolor.c:288
|
||||
#: ../../WINGs/wcolor.c:329
|
||||
#, c-format
|
||||
msgid "could not allocate %s color"
|
||||
msgstr "konnte die Farbe %s nicht erzeugen"
|
||||
msgstr "Farbe %s konnte nicht erzeugt werden"
|
||||
|
||||
#: ../../WINGs/wcolor.c:198
|
||||
#: ../../WINGs/wcolor.c:237
|
||||
msgid "white"
|
||||
msgstr "weiß"
|
||||
msgstr "Weiß"
|
||||
|
||||
#: ../../WINGs/wcolor.c:211
|
||||
#: ../../WINGs/wcolor.c:249
|
||||
msgid "black"
|
||||
msgstr "schwarz"
|
||||
msgstr "Schwarz"
|
||||
|
||||
#: ../../WINGs/wcolor.c:250
|
||||
#: ../../WINGs/wcolor.c:288
|
||||
msgid "gray"
|
||||
msgstr "grau"
|
||||
msgstr "Grau"
|
||||
|
||||
#: ../../WINGs/wcolor.c:291
|
||||
#: ../../WINGs/wcolor.c:329
|
||||
msgid "dark gray"
|
||||
msgstr "dunkelgrau"
|
||||
msgstr "Dunkelgrau"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:415
|
||||
#: ../../WINGs/wcolorpanel.c:420
|
||||
msgid "Colors"
|
||||
msgstr "Farben"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:605 ../../WINGs/wcolorpanel.c:2824
|
||||
#: ../../WINGs/wcolorpanel.c:610 ../../WINGs/wcolorpanel.c:2829
|
||||
msgid "Brightness"
|
||||
msgstr "Helligkeit"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:607 ../../WINGs/wcolorpanel.c:683
|
||||
#: ../../WINGs/wcolorpanel.c:716 ../../WINGs/wcolorpanel.c:750
|
||||
#: ../../WINGs/wcolorpanel.c:810 ../../WINGs/wcolorpanel.c:844
|
||||
#: ../../WINGs/wcolorpanel.c:878 ../../WINGs/wcolorpanel.c:913
|
||||
#: ../../WINGs/wcolorpanel.c:2164 ../../WINGs/wcolorpanel.c:2826
|
||||
#: ../../WINGs/wcolorpanel.c:2862 ../../WINGs/wcolorpanel.c:2898
|
||||
#: ../../WINGs/wcolorpanel.c:3746
|
||||
#: ../../WINGs/wcolorpanel.c:612 ../../WINGs/wcolorpanel.c:688
|
||||
#: ../../WINGs/wcolorpanel.c:721 ../../WINGs/wcolorpanel.c:755
|
||||
#: ../../WINGs/wcolorpanel.c:815 ../../WINGs/wcolorpanel.c:849
|
||||
#: ../../WINGs/wcolorpanel.c:883 ../../WINGs/wcolorpanel.c:918
|
||||
#: ../../WINGs/wcolorpanel.c:2169 ../../WINGs/wcolorpanel.c:2831
|
||||
#: ../../WINGs/wcolorpanel.c:2867 ../../WINGs/wcolorpanel.c:2903
|
||||
#: ../../WINGs/wcolorpanel.c:3745
|
||||
msgid "Color Panel: Could not allocate memory"
|
||||
msgstr "Color Panel: Konnte keinen Speicher reservieren"
|
||||
msgstr "Farb-Panel: Speicher konnte nicht reserviert werden"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:680 ../../WINGs/wcolorpanel.c:681
|
||||
#: ../../WINGs/wcolorpanel.c:685 ../../WINGs/wcolorpanel.c:686
|
||||
msgid "Red"
|
||||
msgstr "Rot"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:713 ../../WINGs/wcolorpanel.c:714
|
||||
#: ../../WINGs/wcolorpanel.c:718 ../../WINGs/wcolorpanel.c:719
|
||||
msgid "Green"
|
||||
msgstr "Grün"
|
||||
msgstr "Grün"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:747 ../../WINGs/wcolorpanel.c:748
|
||||
#: ../../WINGs/wcolorpanel.c:752 ../../WINGs/wcolorpanel.c:753
|
||||
msgid "Blue"
|
||||
msgstr "Blau"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:807 ../../WINGs/wcolorpanel.c:808
|
||||
#: ../../WINGs/wcolorpanel.c:812 ../../WINGs/wcolorpanel.c:813
|
||||
msgid "Cyan"
|
||||
msgstr ""
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:841 ../../WINGs/wcolorpanel.c:842
|
||||
#: ../../WINGs/wcolorpanel.c:846 ../../WINGs/wcolorpanel.c:847
|
||||
msgid "Magenta"
|
||||
msgstr ""
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:875 ../../WINGs/wcolorpanel.c:876
|
||||
#: ../../WINGs/wcolorpanel.c:880 ../../WINGs/wcolorpanel.c:881
|
||||
msgid "Yellow"
|
||||
msgstr "Gelb"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:910 ../../WINGs/wcolorpanel.c:911
|
||||
#: ../../WINGs/wcolorpanel.c:915 ../../WINGs/wcolorpanel.c:916
|
||||
msgid "Black"
|
||||
msgstr "Schwarz"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:991
|
||||
#: ../../WINGs/wcolorpanel.c:996
|
||||
msgid "Spectrum"
|
||||
msgstr "Spektrum"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1021
|
||||
#: ../../WINGs/wcolorpanel.c:1026
|
||||
msgid "Palette"
|
||||
msgstr ""
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1027
|
||||
#: ../../WINGs/wcolorpanel.c:1032
|
||||
msgid "New from File..."
|
||||
msgstr "Neu aus Datei..."
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1028 ../../WINGs/wcolorpanel.c:1076
|
||||
#: ../../WINGs/wcolorpanel.c:1093
|
||||
#: ../../WINGs/wcolorpanel.c:1033 ../../WINGs/wcolorpanel.c:1081
|
||||
#: ../../WINGs/wcolorpanel.c:1098
|
||||
msgid "Rename..."
|
||||
msgstr "Umbenennen..."
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1029 ../../WINGs/wcolorpanel.c:1077
|
||||
#: ../../WINGs/wcolorpanel.c:1094 ../../WINGs/wcolorpanel.c:3321
|
||||
#: ../../WINGs/wcolorpanel.c:1034 ../../WINGs/wcolorpanel.c:1082
|
||||
#: ../../WINGs/wcolorpanel.c:1099 ../../WINGs/wcolorpanel.c:3326
|
||||
msgid "Remove"
|
||||
msgstr "Entfernen"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1030
|
||||
#: ../../WINGs/wcolorpanel.c:1035
|
||||
msgid "Copy"
|
||||
msgstr "Kopieren"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1031
|
||||
#: ../../WINGs/wcolorpanel.c:1036
|
||||
msgid "New from Clipboard"
|
||||
msgstr "Neu aus Zwischenablage"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1052
|
||||
#: ../../WINGs/wcolorpanel.c:1057
|
||||
msgid "X11-Colors"
|
||||
msgstr "X11-Farben"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1069
|
||||
#: ../../WINGs/wcolorpanel.c:1074
|
||||
msgid "Color"
|
||||
msgstr "Farbe"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1075
|
||||
#: ../../WINGs/wcolorpanel.c:1080
|
||||
msgid "Add..."
|
||||
msgstr "Hinzufügen..."
|
||||
msgstr "Hinzufügen..."
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1085
|
||||
#: ../../WINGs/wcolorpanel.c:1090
|
||||
msgid "List"
|
||||
msgstr "Liste"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1092
|
||||
#: ../../WINGs/wcolorpanel.c:1097
|
||||
msgid "New..."
|
||||
msgstr "Neu..."
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1231
|
||||
#: ../../WINGs/wcolorpanel.c:1236
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Color Panel: Could not create directory %s needed to store configurations"
|
||||
msgstr ""
|
||||
"Color Panel: Konnte das Verzeichnis %s zum Speichern der Konfiguration nicht erzeugen"
|
||||
msgid "Color Panel: Could not create directory %s needed to store configurations"
|
||||
msgstr "Farb-Panel: Verzeichnis %s konnte zum Speichern der Konfiguration nicht erzeugt werden"
|
||||
|
||||
#. Delete the file, it doesn't belong here
|
||||
#: ../../WINGs/wcolorpanel.c:1237 ../../WINGs/wcolorpanel.c:3207
|
||||
#: ../../WINGs/wcolorpanel.c:3211
|
||||
#: ../../WINGs/wcolorpanel.c:1242 ../../WINGs/wcolorpanel.c:3212
|
||||
#: ../../WINGs/wcolorpanel.c:3216
|
||||
msgid "File Error"
|
||||
msgstr "Dateifehler"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1238
|
||||
#: ../../WINGs/wcolorpanel.c:1243
|
||||
msgid "Could not create ColorPanel configuration directory"
|
||||
msgstr "Konnte Konfigurationsverzeichnis für Farbdialog nicht erzeugen"
|
||||
msgstr "Konfigurationsverzeichnis für Farb-Panel konnte nicht erzeugt werden"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1239 ../../WINGs/wcolorpanel.c:3208
|
||||
#: ../../WINGs/wcolorpanel.c:3213 ../../WINGs/wcolorpanel.c:3240
|
||||
#: ../../WINGs/wfilepanel.c:250 ../../WINGs/wfilepanel.c:647
|
||||
#: ../../WINGs/wfilepanel.c:659 ../../WINGs/wfilepanel.c:760
|
||||
#: ../../WINGs/wfilepanel.c:971 ../../WINGs/wfontpanel.c:709
|
||||
#: ../../WINGs/wcolorpanel.c:1244 ../../WINGs/wcolorpanel.c:3213
|
||||
#: ../../WINGs/wcolorpanel.c:3218 ../../WINGs/wcolorpanel.c:3245
|
||||
#: ../../WINGs/wfilepanel.c:250 ../../WINGs/wfilepanel.c:650
|
||||
#: ../../WINGs/wfilepanel.c:662 ../../WINGs/wfilepanel.c:763
|
||||
#: ../../WINGs/wfilepanel.c:974 ../../WINGs/wfontpanel.c:591
|
||||
msgid "OK"
|
||||
msgstr "OK"
|
||||
msgstr ""
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1245 ../../WINGs/wcolorpanel.c:1281
|
||||
#: ../../WINGs/wcolorpanel.c:1299
|
||||
#: ../../WINGs/wcolorpanel.c:1250 ../../WINGs/wcolorpanel.c:1286
|
||||
#: ../../WINGs/wcolorpanel.c:1304
|
||||
msgid "Color Panel: Could not find file"
|
||||
msgstr "Color Panel: Konnte Datei nicht finden"
|
||||
msgstr "Farb-Panel: Datei konnte nicht gefunden werden"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1486 ../../WINGs/wcolorpanel.c:1551
|
||||
#: ../../WINGs/wcolorpanel.c:1615
|
||||
#: ../../WINGs/wcolorpanel.c:1491 ../../WINGs/wcolorpanel.c:1556
|
||||
#: ../../WINGs/wcolorpanel.c:1620
|
||||
msgid "Color Panel: X failed request"
|
||||
msgstr "Color Panel: X Anfrage schlug fehl"
|
||||
msgstr "Farb-Panel: X-Anfrage fehlgeschlagen"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:2860
|
||||
#: ../../WINGs/wcolorpanel.c:2865
|
||||
msgid "Saturation"
|
||||
msgstr "Sättigung"
|
||||
msgstr "Sättigung"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:2896
|
||||
#: ../../WINGs/wcolorpanel.c:2901
|
||||
msgid "Hue"
|
||||
msgstr "Farbton"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3146
|
||||
#: ../../WINGs/wcolorpanel.c:3151
|
||||
msgid "Open Palette"
|
||||
msgstr "Palette öffnen"
|
||||
msgstr "Palette öffnen"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3208
|
||||
#: ../../WINGs/wcolorpanel.c:3213
|
||||
msgid "Invalid file format !"
|
||||
msgstr "Ungültiges Dateiformat!"
|
||||
msgstr "Ungültiges Dateiformat!"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3210
|
||||
#: ../../WINGs/wcolorpanel.c:3215
|
||||
#, c-format
|
||||
msgid "can't remove file %s"
|
||||
msgstr "kann Datei %s nicht entfernen"
|
||||
msgstr "Datei %s konnte nicht entfert werden"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3212
|
||||
#: ../../WINGs/wcolorpanel.c:3217
|
||||
msgid "Couldn't remove file from Configuration Directory !"
|
||||
msgstr "Konnte Datei nicht aus Konfigurationsverzeichnis entfernen!"
|
||||
msgstr "Datei konnte nicht aus Konfigurationsverzeichnis entfernt werden!"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3239
|
||||
#: ../../WINGs/wcolorpanel.c:3244
|
||||
msgid "Rename"
|
||||
msgstr "Umbenennen"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3239
|
||||
#: ../../WINGs/wcolorpanel.c:3244
|
||||
msgid "Rename palette to:"
|
||||
msgstr "Palette umbenennen in:"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3240 ../../WINGs/wfilepanel.c:259
|
||||
#: ../../WINGs/wfilepanel.c:659 ../../WINGs/wfilepanel.c:760
|
||||
#: ../../WINGs/wcolorpanel.c:3245 ../../WINGs/wfilepanel.c:259
|
||||
#: ../../WINGs/wfilepanel.c:662 ../../WINGs/wfilepanel.c:763
|
||||
msgid "Cancel"
|
||||
msgstr "Abbrechen"
|
||||
|
||||
#. Careful, this palette exists already
|
||||
#: ../../WINGs/wcolorpanel.c:3256 ../../WINGs/wfilepanel.c:760
|
||||
#: ../../WINGs/wcolorpanel.c:3261 ../../WINGs/wfilepanel.c:763
|
||||
msgid "Warning"
|
||||
msgstr "Warnung"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3257
|
||||
#: ../../WINGs/wcolorpanel.c:3262
|
||||
msgid ""
|
||||
"Palette already exists !\n"
|
||||
"\n"
|
||||
@@ -392,26 +399,26 @@ msgid ""
|
||||
msgstr ""
|
||||
"Palette existiert bereits!\n"
|
||||
"\n"
|
||||
"Überschreiben?"
|
||||
"Überschreiben?"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3257 ../../WINGs/wcolorpanel.c:3321
|
||||
#: ../../WINGs/wcolorpanel.c:3262 ../../WINGs/wcolorpanel.c:3326
|
||||
msgid "No"
|
||||
msgstr "Nein"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3257 ../../WINGs/wcolorpanel.c:3321
|
||||
#: ../../WINGs/wcolorpanel.c:3262 ../../WINGs/wcolorpanel.c:3326
|
||||
msgid "Yes"
|
||||
msgstr "Ja"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3289
|
||||
#: ../../WINGs/wcolorpanel.c:3294
|
||||
#, c-format
|
||||
msgid "Couldn't rename palette %s to %s\n"
|
||||
msgstr "Konnte Palette %s nicht in %s umbenennen\n"
|
||||
msgstr "Palette %s konnte nicht nach %s umbenannt werden\n"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3315
|
||||
#: ../../WINGs/wcolorpanel.c:3320
|
||||
msgid "This will permanently remove the palette "
|
||||
msgstr "Das wird die Palette unwiderruflich löschen "
|
||||
msgstr "Hiermit wird die Palette unwiderruflich gelöscht "
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3318
|
||||
#: ../../WINGs/wcolorpanel.c:3323
|
||||
msgid ""
|
||||
".\n"
|
||||
"\n"
|
||||
@@ -419,31 +426,31 @@ msgid ""
|
||||
msgstr ""
|
||||
".\n"
|
||||
"\n"
|
||||
"Sind Sie sicher, dass Sie die Palette löschen wollen?"
|
||||
"Sind Sie sicher, dass Sie die Palette löschen wollen?"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3343
|
||||
#: ../../WINGs/wcolorpanel.c:3348
|
||||
#, c-format
|
||||
msgid "Couldn't remove palette %s\n"
|
||||
msgstr "Konnte Palette %s nicht löschen\n"
|
||||
msgstr "Palette %s konnte nicht gelöscht werden\n"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3648
|
||||
#: ../../WINGs/wcolorpanel.c:3647
|
||||
#, c-format
|
||||
msgid "Could not open %s"
|
||||
msgstr "Konnte %s nicht öffnen"
|
||||
msgstr "%s konnte nicht geöffnet werden"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3655
|
||||
#: ../../WINGs/wcolorpanel.c:3654
|
||||
#, c-format
|
||||
msgid "Could not create %s"
|
||||
msgstr "Konnte %s nicht erzeugen"
|
||||
msgstr "%s konnte nicht erzeugt werden"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3666
|
||||
#: ../../WINGs/wcolorpanel.c:3665
|
||||
#, c-format
|
||||
msgid "Write error on file %s"
|
||||
msgstr "Schreibfehler bei Datei %s"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3711
|
||||
#: ../../WINGs/wcolorpanel.c:3710
|
||||
msgid "Color Panel: Color unspecified"
|
||||
msgstr "Color Panel: Farbe nicht spezifiziert"
|
||||
msgstr "Farb-Panel: Farbe nicht spezifiziert"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:235
|
||||
msgid "Name:"
|
||||
@@ -451,214 +458,170 @@ msgstr "Name:"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:332 ../../WINGs/wfilepanel.c:396
|
||||
msgid "Open"
|
||||
msgstr "Öffnen"
|
||||
msgstr "Öffnen"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:350 ../../WINGs/wfilepanel.c:402
|
||||
msgid "Save"
|
||||
msgstr "Speichern"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:562
|
||||
#: ../../WINGs/wfilepanel.c:565
|
||||
#, c-format
|
||||
msgid "WINGs: could not open directory %s\n"
|
||||
msgstr "WINGs: Konnte Verzeichnis %s nicht öffen\n"
|
||||
msgstr "WINGs: Verzeichnis %s konnte nicht geöffnet werden\n"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:580
|
||||
#: ../../WINGs/wfilepanel.c:583
|
||||
#, c-format
|
||||
msgid "WINGs: could not stat %s\n"
|
||||
msgstr "WINGs: Dateistatus von %s nicht bestimmbar\n"
|
||||
msgstr "WINGs: Dateistatus von %s unbestimmbar\n"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:647 ../../WINGs/wfilepanel.c:970
|
||||
#: ../../WINGs/wfontpanel.c:708
|
||||
#: ../../WINGs/wfilepanel.c:650 ../../WINGs/wfilepanel.c:973
|
||||
#: ../../WINGs/wfontpanel.c:590
|
||||
msgid "Error"
|
||||
msgstr "Fehler"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:658
|
||||
#: ../../WINGs/wfilepanel.c:661
|
||||
msgid "Create Directory"
|
||||
msgstr "Verzeichnis anlegen"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:659
|
||||
#: ../../WINGs/wfilepanel.c:662
|
||||
msgid "Enter directory name"
|
||||
msgstr "Verzeichnisname eingeben"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:695 ../../WINGs/wfilepanel.c:734
|
||||
#: ../../WINGs/wfilepanel.c:765 ../../WINGs/wfilepanel.c:793
|
||||
#: ../../WINGs/wfilepanel.c:698 ../../WINGs/wfilepanel.c:737
|
||||
#: ../../WINGs/wfilepanel.c:768 ../../WINGs/wfilepanel.c:796
|
||||
msgid "Permission denied."
|
||||
msgstr "Zugriff verweigert."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:698
|
||||
#: ../../WINGs/wfilepanel.c:701
|
||||
#, c-format
|
||||
msgid "'%s' already exists."
|
||||
msgstr "'%s' existiert bereits."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:701
|
||||
#: ../../WINGs/wfilepanel.c:704
|
||||
msgid "Path does not exist."
|
||||
msgstr "Pfad existiert nicht."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:731 ../../WINGs/wfilepanel.c:790
|
||||
#: ../../WINGs/wfilepanel.c:734 ../../WINGs/wfilepanel.c:793
|
||||
#, c-format
|
||||
msgid "'%s' does not exist."
|
||||
msgstr "'%s' existiert nicht."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:738 ../../WINGs/wfilepanel.c:797
|
||||
#: ../../WINGs/wfilepanel.c:741 ../../WINGs/wfilepanel.c:800
|
||||
msgid "Insufficient memory available."
|
||||
msgstr "Nicht genügend Speicher verfügbar."
|
||||
msgstr "Nicht genügend Speicher verfügbar."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:742 ../../WINGs/wfilepanel.c:801
|
||||
#: ../../WINGs/wfilepanel.c:745 ../../WINGs/wfilepanel.c:804
|
||||
#, c-format
|
||||
msgid "'%s' is on a read-only filesystem."
|
||||
msgstr "'%s' liegt auf einem read-only Dateisystem."
|
||||
msgstr "'%s' liegt auf einem nur lesbaren Dateisystem."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:745 ../../WINGs/wfilepanel.c:777
|
||||
#: ../../WINGs/wfilepanel.c:804
|
||||
#: ../../WINGs/wfilepanel.c:748 ../../WINGs/wfilepanel.c:780
|
||||
#: ../../WINGs/wfilepanel.c:807
|
||||
#, c-format
|
||||
msgid "Can not delete '%s'."
|
||||
msgstr "Kann %s nicht löschen."
|
||||
msgstr "Kann %s nicht löschen."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:752
|
||||
#: ../../WINGs/wfilepanel.c:755
|
||||
#, c-format
|
||||
msgid "Delete directory %s ?"
|
||||
msgstr "Verzeichnis % s löschen?"
|
||||
msgstr "Verzeichnis %s löschen?"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:756
|
||||
#: ../../WINGs/wfilepanel.c:759
|
||||
#, c-format
|
||||
msgid "Delete file %s ?"
|
||||
msgstr "Datei %s löschen?"
|
||||
msgstr "Datei %s löschen?"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:768
|
||||
#: ../../WINGs/wfilepanel.c:771
|
||||
#, c-format
|
||||
msgid "Directory '%s' does not exist."
|
||||
msgstr "Verzeichnis '%s' existiert nicht."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:771
|
||||
#: ../../WINGs/wfilepanel.c:774
|
||||
#, c-format
|
||||
msgid "Directory '%s' is not empty."
|
||||
msgstr "Verzeichnis '%s' ist nicht leer."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:774
|
||||
#: ../../WINGs/wfilepanel.c:777
|
||||
#, c-format
|
||||
msgid "Directory '%s' is busy."
|
||||
msgstr "Verzeichnis '%s' ist belegt."
|
||||
msgstr "Verzeichnis '%s' wird benutz."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:787
|
||||
#: ../../WINGs/wfilepanel.c:790
|
||||
#, c-format
|
||||
msgid "'%s' is a directory."
|
||||
msgstr "'%s' ist ein Verzeichnis."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:829
|
||||
#: ../../WINGs/wfilepanel.c:832
|
||||
#, c-format
|
||||
msgid "An error occured browsing '%s'."
|
||||
msgstr "Fehler beim Lesen von '%s'."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:833
|
||||
#: ../../WINGs/wfilepanel.c:836
|
||||
#, c-format
|
||||
msgid "'%s' is not a directory."
|
||||
msgstr "'%s' ist kein Verzeichnis."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:970
|
||||
#: ../../WINGs/wfilepanel.c:973
|
||||
msgid "File does not exist."
|
||||
msgstr "Datei existiert nicht."
|
||||
|
||||
#: ../../WINGs/wfont.c:129
|
||||
#: ../../WINGs/wfont.c:40
|
||||
#, c-format
|
||||
msgid "the following character sets are missing in %s:"
|
||||
msgstr "die folgenden Zeichensätze fehlen in %s:"
|
||||
msgid "invalid font: %s. Trying '%s'"
|
||||
msgstr "Ungültige Schriftart: %s. Wird ersetzt durch %s."
|
||||
|
||||
#: ../../WINGs/wfont.c:136
|
||||
#: ../../WINGs/wfont.c:257 ../../WINGs/wfont.c:277
|
||||
#, c-format
|
||||
msgid ""
|
||||
"the string \"%s\" will be used in place of any characters from those sets."
|
||||
msgid "could not load font: %s."
|
||||
msgstr "Schriftart konnte nicht geladen werden: %s"
|
||||
|
||||
#. WMSetWidgetBackgroundColor(panel->win, WMWhiteColor(scr));
|
||||
#: ../../WINGs/wfontpanel.c:203
|
||||
msgid "Font Panel"
|
||||
msgstr "Schrift-Panel"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:239
|
||||
msgid "The quick brown fox jumps over the lazy dog"
|
||||
msgstr ""
|
||||
"die Zeichenkette \"%s\" ersetzt alle anderen Zeichen dieser Zeichensätze."
|
||||
|
||||
#: ../../WINGs/wfont.c:287 ../../WINGs/wfont.c:323
|
||||
#, c-format
|
||||
msgid "could not load font set %s. Trying fixed."
|
||||
msgstr "konnte Fonts nicht laden. Nehme fixed-Font."
|
||||
|
||||
#: ../../WINGs/wfont.c:293 ../../WINGs/wfont.c:329
|
||||
#, c-format
|
||||
msgid "could not load font %s. Trying fixed."
|
||||
msgstr "Konnte Font %s nicht laden. Nehme fixed-Font."
|
||||
|
||||
#: ../../WINGs/wfont.c:297 ../../WINGs/wfont.c:333
|
||||
msgid "could not load fixed font!"
|
||||
msgstr "konnte fixed-Font nicht laden!"
|
||||
|
||||
#: ../../WINGs/wfont.c:428
|
||||
#, c-format
|
||||
msgid "font description %s is too large."
|
||||
msgstr "Fontbeschreibung ist zu groß."
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:205
|
||||
msgid "Test!!!"
|
||||
msgstr "Test!"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:211
|
||||
#: ../../WINGs/wfontpanel.c:245
|
||||
msgid "Family"
|
||||
msgstr "Familie"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:222
|
||||
#: ../../WINGs/wfontpanel.c:256
|
||||
msgid "Typeface"
|
||||
msgstr "Schriftart"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:233
|
||||
#: ../../WINGs/wfontpanel.c:267
|
||||
msgid "Size"
|
||||
msgstr "Größe"
|
||||
msgstr "Größe"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:252
|
||||
#: ../../WINGs/wfontpanel.c:286
|
||||
msgid "Set"
|
||||
msgstr "Setzen"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:257
|
||||
#: ../../WINGs/wfontpanel.c:292
|
||||
msgid "Revert"
|
||||
msgstr "Zurückn."
|
||||
msgstr "Zurücksetzen"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:709
|
||||
msgid "Could not retrieve font list"
|
||||
msgstr "Konnte Fontliste nicht wiederherstellen"
|
||||
#: ../../WINGs/wfontpanel.c:591
|
||||
msgid "Could not init font config library\n"
|
||||
msgstr "\"font-config\"-Bibliothek konnte nicht initialisiert werden\n"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:721
|
||||
#, c-format
|
||||
msgid "font name %s is longer than 256, which is invalid."
|
||||
msgstr "Fontname %s ist ungültig, da länger als 256 Zeichen."
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:868
|
||||
msgid "Roman"
|
||||
msgstr "Roman"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:871
|
||||
msgid "Italic"
|
||||
msgstr "Kursiv"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:873
|
||||
msgid "Oblique"
|
||||
msgstr "Schräg"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:875
|
||||
msgid "Rev Italic"
|
||||
msgstr ""
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:877
|
||||
msgid "Rev Oblique"
|
||||
msgstr ""
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:883
|
||||
msgid "Normal"
|
||||
msgstr "Normal"
|
||||
|
||||
#: ../../WINGs/widgets.c:415
|
||||
#: ../../WINGs/widgets.c:419
|
||||
#, c-format
|
||||
msgid "WINGs: could not load widget images file: %s"
|
||||
msgstr "WINGs: Konnte Widget-Bildatei %s nicht laden."
|
||||
msgstr "WINGs: Widget-Bilderdatei konnte nicht geladen werden: %s"
|
||||
|
||||
#: ../../WINGs/widgets.c:763
|
||||
#: ../../WINGs/widgets.c:767
|
||||
msgid ""
|
||||
"could not load any fonts. Make sure your font installationand locale "
|
||||
"could not load any fonts. Make sure your font installation and locale "
|
||||
"settings are correct."
|
||||
msgstr ""
|
||||
"Konnte keine Fonts laden. Überprüfen Sie, ob Ihre Fontinstallation und "
|
||||
"-einstellungen korrekt sind."
|
||||
"Keine Schrifen konnten geladen werden. Überprüfen Sie, ob Ihre Schrifteninstallation und -"
|
||||
"Lokalisierungseinstellungen korrekt sind."
|
||||
|
||||
#: ../../WINGs/wruler.c:189
|
||||
#: ../../WINGs/wruler.c:192
|
||||
msgid "0 inches"
|
||||
msgstr "0 Inch"
|
||||
|
||||
|
||||
553
WINGs/po/fr.po
553
WINGs/po/fr.po
@@ -3,22 +3,21 @@
|
||||
# Copyright (C) YEAR Free Software Foundation, Inc.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WINGs 0.80.0\n"
|
||||
"POT-Creation-Date: 2002-01-09 21:06+0100\n"
|
||||
"POT-Creation-Date: 2003-05-02 15:39+0200\n"
|
||||
"PO-Revision-Date: 2002-01-09 21:20+0100\n"
|
||||
"Last-Translator: Emmanuel Benoit <tseeker@neptune.fr>\n"
|
||||
"Language-Team: Français <fr@li.org>\n"
|
||||
"Language-Team: Français <fr@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=ISO-8859-1\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: unknown\n"
|
||||
|
||||
#: ../../WINGs/connection.c:461 ../../WINGs/connection.c:526
|
||||
#: ../../WINGs/connection.c:569
|
||||
#: ../../WINGs/connection.c:467 ../../WINGs/connection.c:532
|
||||
#: ../../WINGs/connection.c:575
|
||||
msgid "Bad address-service-protocol combination"
|
||||
msgstr "Mauvaise combinaison Adresse-Service-Protocole"
|
||||
msgstr "Mauvaise combinaison adresse-service-protocole"
|
||||
|
||||
#: ../../WINGs/error.c:54
|
||||
#, c-format
|
||||
@@ -32,393 +31,400 @@ msgstr "Erreur %d"
|
||||
|
||||
#: ../../WINGs/error.c:110
|
||||
msgid " warning: "
|
||||
msgstr " Avertissement: "
|
||||
msgstr " Avertissement : "
|
||||
|
||||
#: ../../WINGs/error.c:137
|
||||
msgid " fatal error: "
|
||||
msgstr " erreur fatale: "
|
||||
msgstr " erreur fatale : "
|
||||
|
||||
#: ../../WINGs/error.c:163 ../../WINGs/error.c:192
|
||||
msgid " error: "
|
||||
msgstr " erreur: "
|
||||
msgstr " erreur : "
|
||||
|
||||
#: ../../WINGs/findfile.c:48
|
||||
#, c-format
|
||||
msgid "could not get password entry for UID %i"
|
||||
msgstr "Impossible de lire l'entrée password pour l'UID %i"
|
||||
msgstr "Impossible de lire le mot de passe de l'UID %i"
|
||||
|
||||
#: ../../WINGs/findfile.c:66
|
||||
#, c-format
|
||||
msgid "could not get password entry for user %s"
|
||||
msgstr "Impossible de lire l'entrée password pour l'utilisateur %s"
|
||||
msgstr "Impossible de lire le mot de passe de l'utilisateur %s"
|
||||
|
||||
#: ../../WINGs/host.c:114
|
||||
msgid "Cannot get current host name"
|
||||
msgstr "Impossible de déterminer le nom de machine actuel"
|
||||
msgstr "Impossible de déterminer le nom de la machine"
|
||||
|
||||
# TODO pas de traduction correcte possible, cf source.
|
||||
#: ../../WINGs/proplist.c:91
|
||||
#, c-format
|
||||
msgid "syntax error in %s %s, line %i: %s"
|
||||
msgstr "Faute de syntaxe dans %s %s, ligne %i : %s"
|
||||
|
||||
#: ../../WINGs/proplist.c:150
|
||||
msgid "Only string or data is supported for a proplist dictionary key"
|
||||
msgstr ""
|
||||
"Seuls string ou data sont supportés pour une clée de dictionnaire proplist"
|
||||
"Seuls les types string ou data sont supportés pour une clé de dictionnaire "
|
||||
"Proplist"
|
||||
|
||||
#: ../../WINGs/proplist.c:184 ../../WINGs/proplist.c:236
|
||||
#: ../../WINGs/proplist.c:394 ../../WINGs/proplist.c:474
|
||||
#: ../../WINGs/proplist.c:1071 ../../WINGs/proplist.c:1123
|
||||
#: ../../WINGs/proplist.c:1289 ../../WINGs/proplist.c:1368
|
||||
#: ../../WINGs/proplist.c:1489 ../../WINGs/proplist.c:1536
|
||||
#: ../../WINGs/proplist.c:1075 ../../WINGs/proplist.c:1127
|
||||
#: ../../WINGs/proplist.c:1293 ../../WINGs/proplist.c:1372
|
||||
#: ../../WINGs/proplist.c:1493 ../../WINGs/proplist.c:1540
|
||||
msgid "Used proplist functions on non-WMPropLists objects"
|
||||
msgstr "Une fonction proplist a été utilisée sur des objets non-WMPropList"
|
||||
msgstr "Une fonction Proplist a été utilisée sur des objets non-WMPropList"
|
||||
|
||||
#: ../../WINGs/proplist.c:630
|
||||
msgid "unterminated PropList string"
|
||||
msgstr "chaîne PropList sans fin"
|
||||
msgstr "chaîne PropList sans fin"
|
||||
|
||||
#: ../../WINGs/proplist.c:670
|
||||
msgid "unterminated PropList data"
|
||||
msgstr "données PropList sans fin"
|
||||
msgstr "données PropList sans fin"
|
||||
|
||||
#: ../../WINGs/proplist.c:678
|
||||
msgid "unterminated PropList data (missing hexdigit)"
|
||||
msgstr "données PropList sans fin (il manque un chiffre hexadécimal)"
|
||||
msgstr "données PropList sans fin (il manque un chiffre hexadécimal)"
|
||||
|
||||
#: ../../WINGs/proplist.c:690
|
||||
#: ../../WINGs/proplist.c:690 ../../WINGs/proplist.c:695
|
||||
msgid "non hexdigit character in PropList data"
|
||||
msgstr "caractère non-hexadécimal dans les données PropList"
|
||||
msgstr "caractère non-hexadécimal dans les données PropList"
|
||||
|
||||
#: ../../WINGs/proplist.c:725
|
||||
#: ../../WINGs/proplist.c:729
|
||||
msgid "unterminated PropList array"
|
||||
msgstr "tableau PropList sans fin"
|
||||
|
||||
#: ../../WINGs/proplist.c:733
|
||||
#: ../../WINGs/proplist.c:737
|
||||
msgid "missing or unterminated PropList array"
|
||||
msgstr "tableau PropList manquant ou sans fin"
|
||||
|
||||
#: ../../WINGs/proplist.c:743
|
||||
#: ../../WINGs/proplist.c:747
|
||||
msgid "could not get PropList array element"
|
||||
msgstr "impossible de lire l'élément du tableau PropList"
|
||||
msgstr "impossible de lire l'élément du tableau PropList"
|
||||
|
||||
#: ../../WINGs/proplist.c:772
|
||||
#: ../../WINGs/proplist.c:776
|
||||
msgid "unterminated PropList dictionary"
|
||||
msgstr "dictionnaire PropList sans fin"
|
||||
|
||||
#: ../../WINGs/proplist.c:789
|
||||
#: ../../WINGs/proplist.c:793
|
||||
msgid "missing PropList dictionary key"
|
||||
msgstr "clef du dictionnaire PropList manquante"
|
||||
|
||||
#: ../../WINGs/proplist.c:791
|
||||
#: ../../WINGs/proplist.c:795
|
||||
msgid "missing PropList dictionary entry key or unterminated dictionary"
|
||||
msgstr "clef du dictionnaire PropList manquante ou dictionnaire sans fin"
|
||||
|
||||
#: ../../WINGs/proplist.c:799
|
||||
#: ../../WINGs/proplist.c:803
|
||||
msgid "error parsing PropList dictionary key"
|
||||
msgstr "erreur lors de l'analyse de la clef de dictionnaire PropList"
|
||||
|
||||
#: ../../WINGs/proplist.c:807
|
||||
#: ../../WINGs/proplist.c:811
|
||||
msgid "missing = in PropList dictionary entry"
|
||||
msgstr "signe '=' manquant dans l'entrée du dictionnaire PropList"
|
||||
msgstr "signe '=' manquant dans l'entrée du dictionnaire PropList"
|
||||
|
||||
#: ../../WINGs/proplist.c:815
|
||||
#: ../../WINGs/proplist.c:819
|
||||
msgid "error parsing PropList dictionary entry value"
|
||||
msgstr ""
|
||||
"erreur lors de l'analyse de la valeur de l'entrée du dictionnaire PropList"
|
||||
"erreur lors de l'analyse de la valeur de l'entrée du dictionnaire PropList"
|
||||
|
||||
#: ../../WINGs/proplist.c:823
|
||||
#: ../../WINGs/proplist.c:827
|
||||
msgid "missing ; in PropList dictionary entry"
|
||||
msgstr "signe ';' manquant dans l'entrée du dictionnaire PropList"
|
||||
msgstr "signe ';' manquant dans l'entrée du dictionnaire PropList"
|
||||
|
||||
#: ../../WINGs/proplist.c:884
|
||||
#: ../../WINGs/proplist.c:888
|
||||
msgid ""
|
||||
"was expecting a string, data, array or dictionary. If it's a string, try "
|
||||
"enclosing it with \"."
|
||||
msgstr ""
|
||||
"une chaine, des données, un tableau ou un dictionnaire étaient attendus. "
|
||||
"S'il s'agit d'une chaîne, essayez de la délimiter grâce à '\"'."
|
||||
"une chaine, des données, un tableau ou un dictionnaire étaient attendus. "
|
||||
"S'il s'agit d'une chaîne, essayez de la délimiter grâce à '\"'."
|
||||
|
||||
#: ../../WINGs/proplist.c:888
|
||||
#: ../../WINGs/proplist.c:892
|
||||
msgid "Comments are not allowed inside WindowMaker owned domain files."
|
||||
msgstr ""
|
||||
"Les commentaires ne sont pas autorisés dans les fichiers appartenant au"
|
||||
"domaine de WindowMaker."
|
||||
"Les commentaires ne sont pas autorisés dans les fichiers appartenant au "
|
||||
"domaine de Window Maker."
|
||||
|
||||
#: ../../WINGs/proplist.c:1559 ../../WINGs/proplist.c:1624
|
||||
#: ../../WINGs/proplist.c:1563 ../../WINGs/proplist.c:1628
|
||||
msgid "extra data after end of property list"
|
||||
msgstr "données excédentaires après la fin de la liste de propriétés"
|
||||
msgstr "données excédentaires après la fin de la liste de propriétés"
|
||||
|
||||
#: ../../WINGs/proplist.c:1602
|
||||
#: ../../WINGs/proplist.c:1606
|
||||
#, c-format
|
||||
msgid "could not get size for file '%s'"
|
||||
msgstr "impossible de déterminer la taille du fichier '%s'"
|
||||
msgstr "impossible de déterminer la taille du fichier '%s'"
|
||||
|
||||
#: ../../WINGs/proplist.c:1614
|
||||
#: ../../WINGs/proplist.c:1618
|
||||
#, c-format
|
||||
msgid "error reading from file '%s'"
|
||||
msgstr "erreur pendant la lecture du fichier '%s'"
|
||||
|
||||
#: ../../WINGs/proplist.c:1665
|
||||
#: ../../WINGs/proplist.c:1669
|
||||
#, c-format
|
||||
msgid "mkstemp (%s) failed"
|
||||
msgstr "mkstemp (%s) a échoué"
|
||||
msgstr "mkstemp (%s) a échoué"
|
||||
|
||||
#: ../../WINGs/proplist.c:1676
|
||||
#: ../../WINGs/proplist.c:1680
|
||||
#, c-format
|
||||
msgid "mktemp (%s) failed"
|
||||
msgstr "mktemp (%s) a échoué"
|
||||
msgstr "mktemp (%s) a échoué"
|
||||
|
||||
#: ../../WINGs/proplist.c:1687
|
||||
#: ../../WINGs/proplist.c:1691
|
||||
#, c-format
|
||||
msgid "open (%s) failed"
|
||||
msgstr "open (%s) a échoué"
|
||||
msgstr "open (%s) a échoué"
|
||||
|
||||
#: ../../WINGs/proplist.c:1694
|
||||
#: ../../WINGs/proplist.c:1698
|
||||
#, c-format
|
||||
msgid "writing to file: %s failed"
|
||||
msgstr "erreur pendant l'écriture dans le fichier '%s'"
|
||||
msgstr "erreur pendant l'écriture dans le fichier '%s'"
|
||||
|
||||
#: ../../WINGs/proplist.c:1702
|
||||
#: ../../WINGs/proplist.c:1706
|
||||
#, c-format
|
||||
msgid "fclose (%s) failed"
|
||||
msgstr "erreur lors de la fermeture du fichier '%s'"
|
||||
|
||||
#: ../../WINGs/proplist.c:1711
|
||||
#: ../../WINGs/proplist.c:1715
|
||||
#, c-format
|
||||
msgid "rename ('%s' to '%s') failed"
|
||||
msgstr "impossible de renommer '%s' en '%s'"
|
||||
|
||||
#. something happened with the file. just overwrite it
|
||||
#: ../../WINGs/userdefaults.c:192 ../../WINGs/userdefaults.c:208
|
||||
#: ../../WINGs/userdefaults.c:188 ../../WINGs/userdefaults.c:204
|
||||
#, c-format
|
||||
msgid "cannot read domain from file '%s' when syncing"
|
||||
msgstr ""
|
||||
"impossible de lire le domaine depuis le fichier '%s' pendant la "
|
||||
"synchronisation"
|
||||
|
||||
#: ../../WINGs/wcolor.c:198 ../../WINGs/wcolor.c:211 ../../WINGs/wcolor.c:250
|
||||
#: ../../WINGs/wcolor.c:291
|
||||
#: ../../WINGs/wcolor.c:224 ../../WINGs/wcolor.c:236 ../../WINGs/wcolor.c:275
|
||||
#: ../../WINGs/wcolor.c:316
|
||||
#, c-format
|
||||
msgid "could not allocate %s color"
|
||||
msgstr "impossible d'allouer la couleur %s"
|
||||
|
||||
#: ../../WINGs/wcolor.c:198
|
||||
#: ../../WINGs/wcolor.c:224
|
||||
msgid "white"
|
||||
msgstr "blanc"
|
||||
|
||||
#: ../../WINGs/wcolor.c:211
|
||||
#: ../../WINGs/wcolor.c:236
|
||||
msgid "black"
|
||||
msgstr "noir"
|
||||
|
||||
#: ../../WINGs/wcolor.c:250
|
||||
#: ../../WINGs/wcolor.c:275
|
||||
msgid "gray"
|
||||
msgstr "gris"
|
||||
|
||||
#: ../../WINGs/wcolor.c:291
|
||||
#: ../../WINGs/wcolor.c:316
|
||||
msgid "dark gray"
|
||||
msgstr "gris sombre"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:415
|
||||
#: ../../WINGs/wcolorpanel.c:420
|
||||
msgid "Colors"
|
||||
msgstr "Couleurs"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:605 ../../WINGs/wcolorpanel.c:2824
|
||||
#: ../../WINGs/wcolorpanel.c:610 ../../WINGs/wcolorpanel.c:2829
|
||||
msgid "Brightness"
|
||||
msgstr "Luminosité"
|
||||
msgstr "Luminosité"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:607 ../../WINGs/wcolorpanel.c:683
|
||||
#: ../../WINGs/wcolorpanel.c:716 ../../WINGs/wcolorpanel.c:750
|
||||
#: ../../WINGs/wcolorpanel.c:810 ../../WINGs/wcolorpanel.c:844
|
||||
#: ../../WINGs/wcolorpanel.c:878 ../../WINGs/wcolorpanel.c:913
|
||||
#: ../../WINGs/wcolorpanel.c:2164 ../../WINGs/wcolorpanel.c:2826
|
||||
#: ../../WINGs/wcolorpanel.c:2862 ../../WINGs/wcolorpanel.c:2898
|
||||
#: ../../WINGs/wcolorpanel.c:3746
|
||||
#: ../../WINGs/wcolorpanel.c:612 ../../WINGs/wcolorpanel.c:688
|
||||
#: ../../WINGs/wcolorpanel.c:721 ../../WINGs/wcolorpanel.c:755
|
||||
#: ../../WINGs/wcolorpanel.c:815 ../../WINGs/wcolorpanel.c:849
|
||||
#: ../../WINGs/wcolorpanel.c:883 ../../WINGs/wcolorpanel.c:918
|
||||
#: ../../WINGs/wcolorpanel.c:2169 ../../WINGs/wcolorpanel.c:2831
|
||||
#: ../../WINGs/wcolorpanel.c:2867 ../../WINGs/wcolorpanel.c:2903
|
||||
#: ../../WINGs/wcolorpanel.c:3745
|
||||
msgid "Color Panel: Could not allocate memory"
|
||||
msgstr "Panneau de Sélection des Couleur: impossible d'allouer la mémoire"
|
||||
msgstr "Panneau de Sélection des Couleur: impossible d'allouer la mémoire"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:680 ../../WINGs/wcolorpanel.c:681
|
||||
#: ../../WINGs/wcolorpanel.c:685 ../../WINGs/wcolorpanel.c:686
|
||||
msgid "Red"
|
||||
msgstr "Rouge"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:713 ../../WINGs/wcolorpanel.c:714
|
||||
#: ../../WINGs/wcolorpanel.c:718 ../../WINGs/wcolorpanel.c:719
|
||||
msgid "Green"
|
||||
msgstr "Vert"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:747 ../../WINGs/wcolorpanel.c:748
|
||||
#: ../../WINGs/wcolorpanel.c:752 ../../WINGs/wcolorpanel.c:753
|
||||
msgid "Blue"
|
||||
msgstr "Bleu"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:807 ../../WINGs/wcolorpanel.c:808
|
||||
#: ../../WINGs/wcolorpanel.c:812 ../../WINGs/wcolorpanel.c:813
|
||||
msgid "Cyan"
|
||||
msgstr ""
|
||||
msgstr "Cyan"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:841 ../../WINGs/wcolorpanel.c:842
|
||||
#: ../../WINGs/wcolorpanel.c:846 ../../WINGs/wcolorpanel.c:847
|
||||
msgid "Magenta"
|
||||
msgstr ""
|
||||
msgstr "Magenta"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:875 ../../WINGs/wcolorpanel.c:876
|
||||
#: ../../WINGs/wcolorpanel.c:880 ../../WINGs/wcolorpanel.c:881
|
||||
msgid "Yellow"
|
||||
msgstr "Jaune"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:910 ../../WINGs/wcolorpanel.c:911
|
||||
#: ../../WINGs/wcolorpanel.c:915 ../../WINGs/wcolorpanel.c:916
|
||||
msgid "Black"
|
||||
msgstr "Noir"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:991
|
||||
#: ../../WINGs/wcolorpanel.c:996
|
||||
msgid "Spectrum"
|
||||
msgstr "Spectre"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1021
|
||||
#: ../../WINGs/wcolorpanel.c:1026
|
||||
msgid "Palette"
|
||||
msgstr ""
|
||||
msgstr "Palette"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1027
|
||||
#: ../../WINGs/wcolorpanel.c:1032
|
||||
msgid "New from File..."
|
||||
msgstr "Nouveau d'après le fichier..."
|
||||
msgstr "Nouveau d'après le fichier..."
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1028 ../../WINGs/wcolorpanel.c:1076
|
||||
#: ../../WINGs/wcolorpanel.c:1093
|
||||
#: ../../WINGs/wcolorpanel.c:1033 ../../WINGs/wcolorpanel.c:1081
|
||||
#: ../../WINGs/wcolorpanel.c:1098
|
||||
msgid "Rename..."
|
||||
msgstr "Renommer..."
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1029 ../../WINGs/wcolorpanel.c:1077
|
||||
#: ../../WINGs/wcolorpanel.c:1094 ../../WINGs/wcolorpanel.c:3321
|
||||
#: ../../WINGs/wcolorpanel.c:1034 ../../WINGs/wcolorpanel.c:1082
|
||||
#: ../../WINGs/wcolorpanel.c:1099 ../../WINGs/wcolorpanel.c:3326
|
||||
msgid "Remove"
|
||||
msgstr "Supprimer"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1030
|
||||
#: ../../WINGs/wcolorpanel.c:1035
|
||||
msgid "Copy"
|
||||
msgstr "Copier"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1031
|
||||
#: ../../WINGs/wcolorpanel.c:1036
|
||||
msgid "New from Clipboard"
|
||||
msgstr "Nouveau d'après le Presse-Papier"
|
||||
msgstr "Nouveau d'après le presse-papier"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1052
|
||||
#: ../../WINGs/wcolorpanel.c:1057
|
||||
msgid "X11-Colors"
|
||||
msgstr "Couleurs X11"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1069
|
||||
#: ../../WINGs/wcolorpanel.c:1074
|
||||
msgid "Color"
|
||||
msgstr "Couleur"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1075
|
||||
#: ../../WINGs/wcolorpanel.c:1080
|
||||
msgid "Add..."
|
||||
msgstr "Ajouter..."
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1085
|
||||
#: ../../WINGs/wcolorpanel.c:1090
|
||||
msgid "List"
|
||||
msgstr "Liste"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1092
|
||||
#: ../../WINGs/wcolorpanel.c:1097
|
||||
msgid "New..."
|
||||
msgstr "Nouveau..."
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1231
|
||||
#: ../../WINGs/wcolorpanel.c:1236
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Color Panel: Could not create directory %s needed to store configurations"
|
||||
msgstr ""
|
||||
"Panneau de Sélection des Couleurs: impossible de créer le répertoire %s "
|
||||
"requis pour enregistrer les configurations"
|
||||
"Panneau de sélection des couleurs : impossible de créer le répertoire %s "
|
||||
"requis pour enregistrer les configurations."
|
||||
|
||||
#. Delete the file, it doesn't belong here
|
||||
#: ../../WINGs/wcolorpanel.c:1237 ../../WINGs/wcolorpanel.c:3207
|
||||
#: ../../WINGs/wcolorpanel.c:3211
|
||||
#: ../../WINGs/wcolorpanel.c:1242 ../../WINGs/wcolorpanel.c:3212
|
||||
#: ../../WINGs/wcolorpanel.c:3216
|
||||
msgid "File Error"
|
||||
msgstr "Erreur de fichier"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1238
|
||||
#: ../../WINGs/wcolorpanel.c:1243
|
||||
msgid "Could not create ColorPanel configuration directory"
|
||||
msgstr ""
|
||||
"Impossible de créer le répertoire de configuration pour le Panneau "
|
||||
"de configuration des couleurs"
|
||||
"Impossible de créer le répertoire pour la configuration du panneau de "
|
||||
"sélection des couleurs."
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1239 ../../WINGs/wcolorpanel.c:3208
|
||||
#: ../../WINGs/wcolorpanel.c:3213 ../../WINGs/wcolorpanel.c:3240
|
||||
#: ../../WINGs/wfilepanel.c:250 ../../WINGs/wfilepanel.c:647
|
||||
#: ../../WINGs/wfilepanel.c:659 ../../WINGs/wfilepanel.c:760
|
||||
#: ../../WINGs/wfilepanel.c:971 ../../WINGs/wfontpanel.c:709
|
||||
#: ../../WINGs/wcolorpanel.c:1244 ../../WINGs/wcolorpanel.c:3213
|
||||
#: ../../WINGs/wcolorpanel.c:3218 ../../WINGs/wcolorpanel.c:3245
|
||||
#: ../../WINGs/wfilepanel.c:250 ../../WINGs/wfilepanel.c:650
|
||||
#: ../../WINGs/wfilepanel.c:662 ../../WINGs/wfilepanel.c:763
|
||||
#: ../../WINGs/wfilepanel.c:974 ../../WINGs/wfontpanel.c:751
|
||||
msgid "OK"
|
||||
msgstr "OK"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1245 ../../WINGs/wcolorpanel.c:1281
|
||||
#: ../../WINGs/wcolorpanel.c:1299
|
||||
#: ../../WINGs/wcolorpanel.c:1250 ../../WINGs/wcolorpanel.c:1286
|
||||
#: ../../WINGs/wcolorpanel.c:1304
|
||||
msgid "Color Panel: Could not find file"
|
||||
msgstr "Panneau de Sélection des Couleurs: Impossible de trouver le fichier"
|
||||
msgstr "Panneau de sélection des couleurs : Impossible de trouver le fichier."
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1486 ../../WINGs/wcolorpanel.c:1551
|
||||
#: ../../WINGs/wcolorpanel.c:1615
|
||||
#: ../../WINGs/wcolorpanel.c:1491 ../../WINGs/wcolorpanel.c:1556
|
||||
#: ../../WINGs/wcolorpanel.c:1620
|
||||
msgid "Color Panel: X failed request"
|
||||
msgstr "Panneau de Sélection des Couleurs: échec d'une requête X"
|
||||
msgstr "Panneau de sélection des couleurs : échec d'une requête X"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:2860
|
||||
#: ../../WINGs/wcolorpanel.c:2865
|
||||
msgid "Saturation"
|
||||
msgstr ""
|
||||
msgstr "Saturation"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:2896
|
||||
#: ../../WINGs/wcolorpanel.c:2901
|
||||
msgid "Hue"
|
||||
msgstr "Teinte"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3146
|
||||
#: ../../WINGs/wcolorpanel.c:3151
|
||||
msgid "Open Palette"
|
||||
msgstr "Ouvrir une palette"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3208
|
||||
#: ../../WINGs/wcolorpanel.c:3213
|
||||
msgid "Invalid file format !"
|
||||
msgstr "Format de fichier invalide!"
|
||||
msgstr "Format de fichier invalide !"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3210
|
||||
#: ../../WINGs/wcolorpanel.c:3215
|
||||
#, c-format
|
||||
msgid "can't remove file %s"
|
||||
msgstr "impossible de supprimer le fichier %s"
|
||||
msgstr "Impossible de supprimer le fichier %s."
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3212
|
||||
#: ../../WINGs/wcolorpanel.c:3217
|
||||
msgid "Couldn't remove file from Configuration Directory !"
|
||||
msgstr "Impossible de supprimer le fichier du répertoire de configuration !"
|
||||
msgstr "Impossible de supprimer le fichier du répertoire de configuration !"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3239
|
||||
#: ../../WINGs/wcolorpanel.c:3244
|
||||
msgid "Rename"
|
||||
msgstr "Renommer"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3239
|
||||
#: ../../WINGs/wcolorpanel.c:3244
|
||||
msgid "Rename palette to:"
|
||||
msgstr "Renommer la palette en :"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3240 ../../WINGs/wfilepanel.c:259
|
||||
#: ../../WINGs/wfilepanel.c:659 ../../WINGs/wfilepanel.c:760
|
||||
#: ../../WINGs/wcolorpanel.c:3245 ../../WINGs/wfilepanel.c:259
|
||||
#: ../../WINGs/wfilepanel.c:662 ../../WINGs/wfilepanel.c:763
|
||||
msgid "Cancel"
|
||||
msgstr "Annuler"
|
||||
|
||||
#. Careful, this palette exists already
|
||||
#: ../../WINGs/wcolorpanel.c:3256 ../../WINGs/wfilepanel.c:760
|
||||
#: ../../WINGs/wcolorpanel.c:3261 ../../WINGs/wfilepanel.c:763
|
||||
msgid "Warning"
|
||||
msgstr "Avertissement"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3257
|
||||
#: ../../WINGs/wcolorpanel.c:3262
|
||||
msgid ""
|
||||
"Palette already exists !\n"
|
||||
"\n"
|
||||
"Overwrite ?"
|
||||
msgstr ""
|
||||
"La palette existe déjà !\n"
|
||||
"La palette existe déjà !\n"
|
||||
"\n"
|
||||
"Écraser ?"
|
||||
"Écraser ?"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3257 ../../WINGs/wcolorpanel.c:3321
|
||||
#: ../../WINGs/wcolorpanel.c:3262 ../../WINGs/wcolorpanel.c:3326
|
||||
msgid "No"
|
||||
msgstr "Non"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3257 ../../WINGs/wcolorpanel.c:3321
|
||||
#: ../../WINGs/wcolorpanel.c:3262 ../../WINGs/wcolorpanel.c:3326
|
||||
msgid "Yes"
|
||||
msgstr "Oui"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3289
|
||||
#: ../../WINGs/wcolorpanel.c:3294
|
||||
#, c-format
|
||||
msgid "Couldn't rename palette %s to %s\n"
|
||||
msgstr "Impossible de renommer la palette %s en %s\n"
|
||||
msgstr "Impossible de renommer la palette %s en %s.\n"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3315
|
||||
#: ../../WINGs/wcolorpanel.c:3320
|
||||
msgid "This will permanently remove the palette "
|
||||
msgstr "Cela va détruire la palette irrécupérablement "
|
||||
msgstr "Ceci détruira définitivement la palette "
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3318
|
||||
#: ../../WINGs/wcolorpanel.c:3323
|
||||
msgid ""
|
||||
".\n"
|
||||
"\n"
|
||||
@@ -426,31 +432,31 @@ msgid ""
|
||||
msgstr ""
|
||||
".\n"
|
||||
"\n"
|
||||
"Êtes-vous sur de vouloir supprimer cette palette ?"
|
||||
"Êtes-vous sûr de vouloir supprimer cette palette ?"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3343
|
||||
#: ../../WINGs/wcolorpanel.c:3348
|
||||
#, c-format
|
||||
msgid "Couldn't remove palette %s\n"
|
||||
msgstr "Impossible de détruire la palette %s\n"
|
||||
msgstr "Impossible de détruire la palette %s.\n"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3648
|
||||
#: ../../WINGs/wcolorpanel.c:3647
|
||||
#, c-format
|
||||
msgid "Could not open %s"
|
||||
msgstr "Impossible d'ouvrir %s"
|
||||
msgstr "Impossible d'ouvrir %s."
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3655
|
||||
#: ../../WINGs/wcolorpanel.c:3654
|
||||
#, c-format
|
||||
msgid "Could not create %s"
|
||||
msgstr "Impossible de créer %s"
|
||||
msgstr "Impossible de créer %s."
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3666
|
||||
#: ../../WINGs/wcolorpanel.c:3665
|
||||
#, c-format
|
||||
msgid "Write error on file %s"
|
||||
msgstr "Erreur d'écriture dans le fichier %s"
|
||||
msgstr "Erreur d'écriture dans le fichier %s."
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3711
|
||||
#: ../../WINGs/wcolorpanel.c:3710
|
||||
msgid "Color Panel: Color unspecified"
|
||||
msgstr "Panneau de Sélection des Couleurs: couleur non spécifiée"
|
||||
msgstr "Panneau de sélection des couleurs: couleur non spécifiée."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:235
|
||||
msgid "Name:"
|
||||
@@ -462,211 +468,272 @@ msgstr "Ouvrir"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:350 ../../WINGs/wfilepanel.c:402
|
||||
msgid "Save"
|
||||
msgstr "Sauvegarder"
|
||||
msgstr "Enregistrer"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:562
|
||||
#: ../../WINGs/wfilepanel.c:565
|
||||
#, c-format
|
||||
msgid "WINGs: could not open directory %s\n"
|
||||
msgstr "WINGs: Impossible d'ouvrir le répertoire %s\n"
|
||||
msgstr "WINGs : Impossible d'ouvrir le répertoire %s.\n"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:580
|
||||
#: ../../WINGs/wfilepanel.c:583
|
||||
#, c-format
|
||||
msgid "WINGs: could not stat %s\n"
|
||||
msgstr "WINGs: impossible de lire l'état du fichier %s\n"
|
||||
msgstr "WINGs : impossible de lire l'état du fichier %s.\n"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:647 ../../WINGs/wfilepanel.c:970
|
||||
#: ../../WINGs/wfontpanel.c:708
|
||||
#: ../../WINGs/wfilepanel.c:650 ../../WINGs/wfilepanel.c:973
|
||||
#: ../../WINGs/wfontpanel.c:750
|
||||
msgid "Error"
|
||||
msgstr "Erreur"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:658
|
||||
#: ../../WINGs/wfilepanel.c:661
|
||||
msgid "Create Directory"
|
||||
msgstr "Créer un répertoire"
|
||||
msgstr "Créer un répertoire"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:659
|
||||
#: ../../WINGs/wfilepanel.c:662
|
||||
msgid "Enter directory name"
|
||||
msgstr "Saisissez le nom du répertoire"
|
||||
msgstr "Saisissez le nom du répertoire"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:695 ../../WINGs/wfilepanel.c:734
|
||||
#: ../../WINGs/wfilepanel.c:765 ../../WINGs/wfilepanel.c:793
|
||||
#: ../../WINGs/wfilepanel.c:698 ../../WINGs/wfilepanel.c:737
|
||||
#: ../../WINGs/wfilepanel.c:768 ../../WINGs/wfilepanel.c:796
|
||||
msgid "Permission denied."
|
||||
msgstr "Permission refusée."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:698
|
||||
#, c-format
|
||||
msgid "'%s' already exists."
|
||||
msgstr "'%s' existe déjà."
|
||||
msgstr "Permission refusée."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:701
|
||||
#, c-format
|
||||
msgid "'%s' already exists."
|
||||
msgstr "'%s' existe déjà."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:704
|
||||
msgid "Path does not exist."
|
||||
msgstr "Le chemin n'existe pas."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:731 ../../WINGs/wfilepanel.c:790
|
||||
#: ../../WINGs/wfilepanel.c:734 ../../WINGs/wfilepanel.c:793
|
||||
#, c-format
|
||||
msgid "'%s' does not exist."
|
||||
msgstr "'%s' n'existe pas."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:738 ../../WINGs/wfilepanel.c:797
|
||||
#: ../../WINGs/wfilepanel.c:741 ../../WINGs/wfilepanel.c:800
|
||||
msgid "Insufficient memory available."
|
||||
msgstr "Mémoire disponible insuffisante."
|
||||
msgstr "Mémoire disponible insuffisante."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:742 ../../WINGs/wfilepanel.c:801
|
||||
#: ../../WINGs/wfilepanel.c:745 ../../WINGs/wfilepanel.c:804
|
||||
#, c-format
|
||||
msgid "'%s' is on a read-only filesystem."
|
||||
msgstr "'%s' est sur un système de fichiers en lecture seule."
|
||||
msgstr "'%s' est sur un système de fichiers en lecture seule."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:745 ../../WINGs/wfilepanel.c:777
|
||||
#: ../../WINGs/wfilepanel.c:804
|
||||
#: ../../WINGs/wfilepanel.c:748 ../../WINGs/wfilepanel.c:780
|
||||
#: ../../WINGs/wfilepanel.c:807
|
||||
#, c-format
|
||||
msgid "Can not delete '%s'."
|
||||
msgstr "Impossible de supprimer '%s'."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:752
|
||||
#: ../../WINGs/wfilepanel.c:755
|
||||
#, c-format
|
||||
msgid "Delete directory %s ?"
|
||||
msgstr "Supprimer le répertoire %s ?"
|
||||
msgstr "Supprimer le répertoire %s ?"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:756
|
||||
#: ../../WINGs/wfilepanel.c:759
|
||||
#, c-format
|
||||
msgid "Delete file %s ?"
|
||||
msgstr "Supprimer le fichier %s ?"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:768
|
||||
#, c-format
|
||||
msgid "Directory '%s' does not exist."
|
||||
msgstr "Le répertoire '%s' n'existe pas."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:771
|
||||
#, c-format
|
||||
msgid "Le répertoire '%s' n'est pas vide."
|
||||
msgstr "Verzeichnis '%s' ist nicht leer."
|
||||
msgid "Directory '%s' does not exist."
|
||||
msgstr "Le répertoire '%s' n'existe pas."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:774
|
||||
#, c-format
|
||||
msgid "Directory '%s' is busy."
|
||||
msgstr "Le répertoire '%s' est occupé."
|
||||
msgid "Directory '%s' is not empty."
|
||||
msgstr "Le répertoire '%s' n'est pas vide."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:787
|
||||
#: ../../WINGs/wfilepanel.c:777
|
||||
#, c-format
|
||||
msgid "Directory '%s' is busy."
|
||||
msgstr "Le répertoire '%s' est occupé."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:790
|
||||
#, c-format
|
||||
msgid "'%s' is a directory."
|
||||
msgstr "'%s' est un répertoire."
|
||||
msgstr "'%s' est un répertoire."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:829
|
||||
#: ../../WINGs/wfilepanel.c:832
|
||||
#, c-format
|
||||
msgid "An error occured browsing '%s'."
|
||||
msgstr "Une erreur s'est produite pendant le parcours de '%s'."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:833
|
||||
#: ../../WINGs/wfilepanel.c:836
|
||||
#, c-format
|
||||
msgid "'%s' is not a directory."
|
||||
msgstr "'%s' n'est pas un répertoire."
|
||||
msgstr "'%s' n'est pas un répertoire."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:970
|
||||
#: ../../WINGs/wfilepanel.c:973
|
||||
msgid "File does not exist."
|
||||
msgstr "Le fichier n'existe pas."
|
||||
|
||||
#: ../../WINGs/wfont.c:129
|
||||
#: ../../WINGs/wfont.c:133 ../../WINGs/wfont.c:143
|
||||
#, c-format
|
||||
msgid "Invalid size specification '%s' in %s. Using default %d\n"
|
||||
msgstr ""
|
||||
"Taille invalide dans %2$s : '%1$s'. Utilisation de la valeur par défaut %3"
|
||||
"$d\n"
|
||||
|
||||
#: ../../WINGs/wfont.c:187
|
||||
#, c-format
|
||||
msgid "the following character sets are missing in %s:"
|
||||
msgstr "les jeux de caractères suivants manquent dans %s:"
|
||||
msgstr "Les jeux de caractères suivants manquent dans %s :"
|
||||
|
||||
#: ../../WINGs/wfont.c:136
|
||||
#: ../../WINGs/wfont.c:193
|
||||
#, c-format
|
||||
msgid ""
|
||||
"the string \"%s\" will be used in place of any characters from those sets."
|
||||
msgstr ""
|
||||
"la chaîne \"%s\" sera utilisée à la place de tous les caractères de ces jeux."
|
||||
"La chaîne « %s » sera utilisée à la place de tous les caractères de ces jeux."
|
||||
|
||||
#: ../../WINGs/wfont.c:287 ../../WINGs/wfont.c:323
|
||||
#. is arial a good fallback for multibyte?
|
||||
#: ../../WINGs/wfont.c:599 ../../WINGs/wfont.c:614
|
||||
#, c-format
|
||||
msgid "could not load font set %s. Trying fixed."
|
||||
msgstr "impossible de charger le jeu de fontes %s, essai du jeu 'fixed'."
|
||||
msgid "could not load font %s. Trying arial."
|
||||
msgstr ""
|
||||
"Impossible de charger la police de caractères %s, essai de la police "
|
||||
"« arial »."
|
||||
|
||||
#: ../../WINGs/wfont.c:293 ../../WINGs/wfont.c:329
|
||||
#: ../../WINGs/wfont.c:606
|
||||
msgid "could not load antialiased font set. Reverting to standard font sets."
|
||||
msgstr ""
|
||||
"Impossible de charger les polices lissées, utilisation des polices normales."
|
||||
|
||||
#: ../../WINGs/wfont.c:609
|
||||
#, c-format
|
||||
msgid "could not load FontSet %s. Trying fixed."
|
||||
msgstr ""
|
||||
"Impossible de charger la famille de polices %s, essai de la famille "
|
||||
"« fixed »."
|
||||
|
||||
#: ../../WINGs/wfont.c:621
|
||||
msgid "could not load antialiased fonts. Reverting to normal fonts."
|
||||
msgstr ""
|
||||
"Impossible de charger les polices lissées, utilisation des polices normales."
|
||||
|
||||
#: ../../WINGs/wfont.c:624 ../../WINGs/wfont.c:635
|
||||
#, c-format
|
||||
msgid "could not load font %s. Trying fixed."
|
||||
msgstr "impossible de charger la fonte %s, essai de la fonte 'fixed'."
|
||||
msgstr ""
|
||||
"Impossible de charger la police de caractères %s, essai de la police "
|
||||
"« fixed »."
|
||||
|
||||
#: ../../WINGs/wfont.c:297 ../../WINGs/wfont.c:333
|
||||
#: ../../WINGs/wfont.c:629
|
||||
#, c-format
|
||||
msgid "could not load font set %s. Trying fixed."
|
||||
msgstr ""
|
||||
"Impossible de charger la famille de polices %s, essai de la famille "
|
||||
"« fixed »."
|
||||
|
||||
#: ../../WINGs/wfont.c:639
|
||||
msgid "could not load fixed font!"
|
||||
msgstr "impossible de charger la fonte 'fixed' !"
|
||||
msgstr "Impossible de charger la police de caractères « fixed » !"
|
||||
|
||||
#: ../../WINGs/wfont.c:428
|
||||
#: ../../WINGs/wfont.c:704 ../../WINGs/wfont.c:765 ../../WINGs/wfont.c:836
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Conversion to widechar failed (possible invalid multibyte sequence): '%s':"
|
||||
"(pos %d)\n"
|
||||
msgstr ""
|
||||
"Échec de la conversion en widechar (probablement une séquence d'octets "
|
||||
"erronée) : « %s » (pos %d)\n"
|
||||
|
||||
#: ../../WINGs/wfont.c:887
|
||||
#, c-format
|
||||
msgid "font description %s is too large."
|
||||
msgstr "description de fonte %s trop grosse"
|
||||
msgstr "La description de la police de caractères %s est trop volumineuse."
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:205
|
||||
#. // remove warning later. or maybe not
|
||||
#: ../../WINGs/wfont.c:935
|
||||
#, c-format
|
||||
msgid "Invalid font specification: '%s'\n"
|
||||
msgstr "Déclaration de police invalide : « %s »\n"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:235
|
||||
msgid "Test!!!"
|
||||
msgstr ""
|
||||
msgstr "Test !"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:211
|
||||
#: ../../WINGs/wfontpanel.c:241
|
||||
msgid "Family"
|
||||
msgstr "Famille"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:222
|
||||
#: ../../WINGs/wfontpanel.c:252
|
||||
msgid "Typeface"
|
||||
msgstr ""
|
||||
msgstr "Caractère"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:233
|
||||
#: ../../WINGs/wfontpanel.c:263
|
||||
msgid "Size"
|
||||
msgstr "Taille"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:252
|
||||
#: ../../WINGs/wfontpanel.c:282
|
||||
msgid "Set"
|
||||
msgstr ""
|
||||
msgstr "Famille"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:257
|
||||
#: ../../WINGs/wfontpanel.c:288
|
||||
msgid "Revert"
|
||||
msgstr "Revenir"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:709
|
||||
#: ../../WINGs/wfontpanel.c:751
|
||||
msgid "Could not retrieve font list"
|
||||
msgstr "Impossible de lire la liste des fontes"
|
||||
msgstr "Impossible de lire la liste des polices de caractères."
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:721
|
||||
#: ../../WINGs/wfontpanel.c:765
|
||||
#, c-format
|
||||
msgid "font name %s is longer than 256, which is invalid."
|
||||
msgstr ""
|
||||
"Le nom de fonte %s a plus de 256 caractères et est par conséquent invalide."
|
||||
"Le nom de police %s a plus de 256 caractères et est par conséquent invalide."
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:868
|
||||
#: ../../WINGs/wfontpanel.c:913
|
||||
msgid "Roman"
|
||||
msgstr "Roman"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:871
|
||||
#: ../../WINGs/wfontpanel.c:916
|
||||
msgid "Italic"
|
||||
msgstr "Italique"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:873
|
||||
#: ../../WINGs/wfontpanel.c:918
|
||||
msgid "Oblique"
|
||||
msgstr ""
|
||||
msgstr "Penché"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:875
|
||||
#: ../../WINGs/wfontpanel.c:920
|
||||
msgid "Rev Italic"
|
||||
msgstr ""
|
||||
msgstr "Italique inverse"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:877
|
||||
#: ../../WINGs/wfontpanel.c:922
|
||||
msgid "Rev Oblique"
|
||||
msgstr ""
|
||||
msgstr "Penché inverse"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:883
|
||||
#: ../../WINGs/wfontpanel.c:928
|
||||
msgid "Normal"
|
||||
msgstr "Normal"
|
||||
|
||||
#: ../../WINGs/widgets.c:415
|
||||
#: ../../WINGs/widgets.c:419
|
||||
#, c-format
|
||||
msgid "WINGs: could not load widget images file: %s"
|
||||
msgstr "WINGs: impossible de charger le fichier d'images de widget '%s'."
|
||||
msgstr "WINGs : impossible de charger le fichier d'images de widget '%s'."
|
||||
|
||||
#: ../../WINGs/widgets.c:763
|
||||
#: ../../WINGs/widgets.c:770
|
||||
msgid ""
|
||||
"could not load any fonts. Make sure your font installationand locale "
|
||||
"Text antialiasing is enabled in the configuration but the X server doesn't "
|
||||
"have the required capabilities (missing RENDER extension). Disabling text "
|
||||
"antialiasing."
|
||||
msgstr ""
|
||||
"Le lissage du texte est activé dans la configuration mais le serveur X ne "
|
||||
"dispose pas de l'extension adéquate (extension RENDER). Desactivation du "
|
||||
"lissage."
|
||||
|
||||
#: ../../WINGs/widgets.c:787
|
||||
msgid ""
|
||||
"could not load any fonts. Make sure your font installation and locale "
|
||||
"settings are correct."
|
||||
msgstr ""
|
||||
"Aucune fonte n'a pu être chargée. Veuillez vérifier que votre installation "
|
||||
"et vos paramètres d'installation sont corrects."
|
||||
"Aucune police n'a pu être chargée. Veuillez vérifier que vos polices sont "
|
||||
"correctement installées et que votre langue est bien configurée."
|
||||
|
||||
#: ../../WINGs/wruler.c:189
|
||||
#: ../../WINGs/wruler.c:192
|
||||
msgid "0 inches"
|
||||
msgstr "0 pouces"
|
||||
|
||||
609
WINGs/po/sk.po
609
WINGs/po/sk.po
@@ -5,32 +5,33 @@
|
||||
# Currently maintained by Jan "judas" Tomka <judas@linux.sk>
|
||||
#
|
||||
# Version history:
|
||||
# WM-ver author email date
|
||||
# 0.65.1 Jan "judas" Tomka <judas@linux.sk> Aug 08 2001
|
||||
# 0.70.0 Jan "judas" Tomka <judas@linux.sk> Oct 15 2001
|
||||
# 0.70.1 Jan "judas" Tomka <judas@linux.sk> Nov 02 2001
|
||||
# 0.80.0 Jan "judas" Tomka <judas@linux.sk> Dec 20 2001
|
||||
# WM-ver author email date
|
||||
# 0.65.1 Jan "judas" Tomka <judas@linux.sk> Aug 08 2001
|
||||
# 0.70.0 Jan "judas" Tomka <judas@linux.sk> Oct 15 2001
|
||||
# 0.70.1 Jan "judas" Tomka <judas@linux.sk> Nov 02 2001
|
||||
# 0.80.0 Jan "judas" Tomka <judas@linux.sk> Dec 20 2001
|
||||
# 0.80.2 Jan "judas" Tomka <judas@linux.sk> Jan 31 2004
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WINGs 0.80.0\n"
|
||||
"POT-Creation-Date: 2001-12-20 03:50+0100\n"
|
||||
"POT-Creation-Date: 2004-01-31 18:36+0100\n"
|
||||
"PO-Revision-Date: 2001-12-20 04:00+0100\n"
|
||||
"Last-Translator: Jan \"judas\" Tomka <judas@linux.sk>\n"
|
||||
"Language-Team: Slovak <sk@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=ISO-8859-2\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../../WINGs/connection.c:461 ../../WINGs/connection.c:526
|
||||
#: ../../WINGs/connection.c:569
|
||||
#: ../../WINGs/connection.c:467 ../../WINGs/connection.c:532
|
||||
#: ../../WINGs/connection.c:575
|
||||
msgid "Bad address-service-protocol combination"
|
||||
msgstr "Nesprávna kombinácia adresa-slu¾ba-protokol"
|
||||
msgstr "Nesprávna kombinácia adresa-služba-protokol"
|
||||
|
||||
#: ../../WINGs/error.c:54
|
||||
#, c-format
|
||||
msgid "Unknown error %d"
|
||||
msgstr "Nezmána chyba %d"
|
||||
msgstr "Nezmána chyba %d"
|
||||
|
||||
#: ../../WINGs/error.c:59
|
||||
#, c-format
|
||||
@@ -43,7 +44,7 @@ msgstr " varovanie: "
|
||||
|
||||
#: ../../WINGs/error.c:137
|
||||
msgid " fatal error: "
|
||||
msgstr " fatálna chyba: "
|
||||
msgstr " fatálna chyba: "
|
||||
|
||||
#: ../../WINGs/error.c:163 ../../WINGs/error.c:192
|
||||
msgid " error: "
|
||||
@@ -52,371 +53,376 @@ msgstr " chyba: "
|
||||
#: ../../WINGs/findfile.c:48
|
||||
#, c-format
|
||||
msgid "could not get password entry for UID %i"
|
||||
msgstr "nemo¾no zisti» informácie o UID %i"
|
||||
msgstr "nemožno zistiť informácie o UID %i"
|
||||
|
||||
#: ../../WINGs/findfile.c:66
|
||||
#, c-format
|
||||
msgid "could not get password entry for user %s"
|
||||
msgstr "nemo¾no zisti» informácie o u¾ívateµovi %s"
|
||||
msgstr "nemožno zistiť informácie o užívateľovi %s"
|
||||
|
||||
#: ../../WINGs/host.c:114
|
||||
msgid "Cannot get current host name"
|
||||
msgstr "Nemo¾no zisti» aktuálne meno poèítaèa"
|
||||
msgstr "Nemožno zistiť aktuálne meno počítača"
|
||||
|
||||
#: ../../WINGs/proplist.c:91
|
||||
#, c-format
|
||||
msgid "syntax error in %s %s, line %i: %s"
|
||||
msgstr "chyba syntaxe v %s %s, riadok %i: %s"
|
||||
|
||||
#: ../../WINGs/proplist.c:150
|
||||
msgid "Only string or data is supported for a proplist dictionary key"
|
||||
msgstr "Pre kµúè slovníka proplist je podporovaný len re»azec alebo dáta"
|
||||
msgstr "Pre kľúč slovníka proplist je podporovaný len reťazec alebo dáta"
|
||||
|
||||
#: ../../WINGs/proplist.c:184 ../../WINGs/proplist.c:236
|
||||
#: ../../WINGs/proplist.c:394 ../../WINGs/proplist.c:474
|
||||
#: ../../WINGs/proplist.c:1071 ../../WINGs/proplist.c:1123
|
||||
#: ../../WINGs/proplist.c:1251 ../../WINGs/proplist.c:1330
|
||||
#: ../../WINGs/proplist.c:1451 ../../WINGs/proplist.c:1498
|
||||
#: ../../WINGs/proplist.c:1075 ../../WINGs/proplist.c:1127
|
||||
#: ../../WINGs/proplist.c:1293 ../../WINGs/proplist.c:1372
|
||||
#: ../../WINGs/proplist.c:1493 ../../WINGs/proplist.c:1540
|
||||
msgid "Used proplist functions on non-WMPropLists objects"
|
||||
msgstr "Pou¾itá proplist funkcia na iných ako WMPropLists objektoch"
|
||||
msgstr "Použitá proplist funkcia na iných ako WMPropLists objektoch"
|
||||
|
||||
#: ../../WINGs/proplist.c:630
|
||||
msgid "unterminated PropList string"
|
||||
msgstr "neukonèený PropList re»azec"
|
||||
msgstr "neukončený PropList reťazec"
|
||||
|
||||
#: ../../WINGs/proplist.c:670
|
||||
msgid "unterminated PropList data"
|
||||
msgstr "neukonèené PropList dáta"
|
||||
msgstr "neukončené PropList dáta"
|
||||
|
||||
#: ../../WINGs/proplist.c:678
|
||||
msgid "unterminated PropList data (missing hexdigit)"
|
||||
msgstr "neukonèené PropList dáta (chýbajúca hex èíslica)"
|
||||
msgstr "neukončené PropList dáta (chýbajúca hex číslica)"
|
||||
|
||||
#: ../../WINGs/proplist.c:690
|
||||
#: ../../WINGs/proplist.c:690 ../../WINGs/proplist.c:695
|
||||
msgid "non hexdigit character in PropList data"
|
||||
msgstr "v PropList dátach je znak, ktorý nie je hex èíslicou"
|
||||
msgstr "v PropList dátach je znak, ktorý nie je hex číslicou"
|
||||
|
||||
#: ../../WINGs/proplist.c:725
|
||||
#: ../../WINGs/proplist.c:729
|
||||
msgid "unterminated PropList array"
|
||||
msgstr "neukonèené PropList pole"
|
||||
msgstr "neukončené PropList pole"
|
||||
|
||||
#: ../../WINGs/proplist.c:733
|
||||
#: ../../WINGs/proplist.c:737
|
||||
msgid "missing or unterminated PropList array"
|
||||
msgstr "chýbajúce alebo neukonèené PropList pole"
|
||||
msgstr "chýbajúce alebo neukončené PropList pole"
|
||||
|
||||
#: ../../WINGs/proplist.c:743
|
||||
#: ../../WINGs/proplist.c:747
|
||||
msgid "could not get PropList array element"
|
||||
msgstr "nemo¾no zisti» prvok PropList poµa"
|
||||
msgstr "nemožno zistiť prvok PropList poľa"
|
||||
|
||||
#: ../../WINGs/proplist.c:772
|
||||
#: ../../WINGs/proplist.c:776
|
||||
msgid "unterminated PropList dictionary"
|
||||
msgstr "neukonèený PropList slovník"
|
||||
msgstr "neukončený PropList slovník"
|
||||
|
||||
#: ../../WINGs/proplist.c:789
|
||||
#: ../../WINGs/proplist.c:793
|
||||
msgid "missing PropList dictionary key"
|
||||
msgstr "chýbajúci kµúè PropList slovníka"
|
||||
msgstr "chýbajúci kľúč PropList slovníka"
|
||||
|
||||
#: ../../WINGs/proplist.c:791
|
||||
#: ../../WINGs/proplist.c:795
|
||||
msgid "missing PropList dictionary entry key or unterminated dictionary"
|
||||
msgstr "chýbajúci kµúè polo¾ky PropList slovníka alebo neukonèený slovník"
|
||||
msgstr "chýbajúci kľúč položky PropList slovníka alebo neukončený slovník"
|
||||
|
||||
#: ../../WINGs/proplist.c:799
|
||||
#: ../../WINGs/proplist.c:803
|
||||
msgid "error parsing PropList dictionary key"
|
||||
msgstr "chyba pri parsovaní kµúèa PropList slovníka"
|
||||
msgstr "chyba pri parsovaní kľúča PropList slovníka"
|
||||
|
||||
#: ../../WINGs/proplist.c:807
|
||||
#: ../../WINGs/proplist.c:811
|
||||
msgid "missing = in PropList dictionary entry"
|
||||
msgstr "chýbajúce = v polo¾ke PropList slovníka"
|
||||
msgstr "chýbajúce = v položke PropList slovníka"
|
||||
|
||||
#: ../../WINGs/proplist.c:815
|
||||
#: ../../WINGs/proplist.c:819
|
||||
msgid "error parsing PropList dictionary entry value"
|
||||
msgstr "chyba pri parsovaní hodnoty polo¾ky PropList slovníka"
|
||||
msgstr "chyba pri parsovaní hodnoty položky PropList slovníka"
|
||||
|
||||
#: ../../WINGs/proplist.c:823
|
||||
#: ../../WINGs/proplist.c:827
|
||||
msgid "missing ; in PropList dictionary entry"
|
||||
msgstr "chýbajúca ; v polo¾ke PropList slovníka"
|
||||
msgstr "chýbajúca ; v položke PropList slovníka"
|
||||
|
||||
#: ../../WINGs/proplist.c:884
|
||||
#: ../../WINGs/proplist.c:888
|
||||
msgid ""
|
||||
"was expecting a string, data, array or dictionary. If it's a string, try "
|
||||
"enclosing it with \"."
|
||||
msgstr ""
|
||||
"oèakávaný bol re»azec, dáta, pole alebo slovník. Ak je to re»azec, skúste ho "
|
||||
"uzavrie» medzi \"."
|
||||
"očakávaný bol reťazec, dáta, pole alebo slovník. Ak je to reťazec, skúste ho "
|
||||
"uzavrieť medzi \"."
|
||||
|
||||
#: ../../WINGs/proplist.c:888
|
||||
#: ../../WINGs/proplist.c:892
|
||||
msgid "Comments are not allowed inside WindowMaker owned domain files."
|
||||
msgstr "Komentáre v doménových súboroch Window Makera nie sú povolené."
|
||||
msgstr "Komentáre v doménových súboroch Window Makera nie sú povolené."
|
||||
|
||||
#: ../../WINGs/proplist.c:1521 ../../WINGs/proplist.c:1586
|
||||
#: ../../WINGs/proplist.c:1563 ../../WINGs/proplist.c:1630
|
||||
msgid "extra data after end of property list"
|
||||
msgstr "prebytoèné dáta na konci property listu"
|
||||
msgstr "prebytočné dáta na konci property listu"
|
||||
|
||||
#: ../../WINGs/proplist.c:1564
|
||||
#: ../../WINGs/proplist.c:1606
|
||||
#, c-format
|
||||
msgid "could not get size for file '%s'"
|
||||
msgstr "nemo¾no zisti» veµkos» súboru '%s'"
|
||||
msgstr "nemožno zistiť veľkosť súboru '%s'"
|
||||
|
||||
#: ../../WINGs/proplist.c:1576
|
||||
#: ../../WINGs/proplist.c:1619
|
||||
#, c-format
|
||||
msgid "error reading from file '%s'"
|
||||
msgstr "chyba pri èítaní zo súboru '%s'"
|
||||
msgstr "chyba pri čítaní zo súboru '%s'"
|
||||
|
||||
#: ../../WINGs/proplist.c:1627
|
||||
#: ../../WINGs/proplist.c:1671
|
||||
#, c-format
|
||||
msgid "mkstemp (%s) failed"
|
||||
msgstr "chyba mkstemp (%s)"
|
||||
|
||||
#: ../../WINGs/proplist.c:1638
|
||||
#: ../../WINGs/proplist.c:1682
|
||||
#, c-format
|
||||
msgid "mktemp (%s) failed"
|
||||
msgstr "chyba mktemp(%s)"
|
||||
|
||||
#: ../../WINGs/proplist.c:1649
|
||||
#: ../../WINGs/proplist.c:1693
|
||||
#, c-format
|
||||
msgid "open (%s) failed"
|
||||
msgstr "chyba pri otváraní (%s)"
|
||||
msgstr "chyba pri otváraní (%s)"
|
||||
|
||||
#: ../../WINGs/proplist.c:1656
|
||||
#: ../../WINGs/proplist.c:1700
|
||||
#, c-format
|
||||
msgid "writing to file: %s failed"
|
||||
msgstr "chyba pri zápise do súboru: %s"
|
||||
msgstr "chyba pri zápise do súboru: %s"
|
||||
|
||||
#: ../../WINGs/proplist.c:1664
|
||||
#: ../../WINGs/proplist.c:1708
|
||||
#, c-format
|
||||
msgid "fclose (%s) failed"
|
||||
msgstr "chyba fclose (%s)"
|
||||
|
||||
#: ../../WINGs/proplist.c:1673
|
||||
#: ../../WINGs/proplist.c:1717
|
||||
#, c-format
|
||||
msgid "rename ('%s' to '%s') failed"
|
||||
msgstr "chyba rename ('%s' na '%s')"
|
||||
|
||||
#. something happened with the file. just overwrite it
|
||||
#: ../../WINGs/userdefaults.c:192 ../../WINGs/userdefaults.c:208
|
||||
#: ../../WINGs/userdefaults.c:188 ../../WINGs/userdefaults.c:204
|
||||
#, c-format
|
||||
msgid "cannot read domain from file '%s' when syncing"
|
||||
msgstr "nemo¾no èíta» doménu zo súboru '%s' pri synchronizácii"
|
||||
msgstr "nemožno čítať doménu zo súboru '%s' pri synchronizácii"
|
||||
|
||||
#: ../../WINGs/wcolor.c:198 ../../WINGs/wcolor.c:211 ../../WINGs/wcolor.c:250
|
||||
#: ../../WINGs/wcolor.c:291
|
||||
#: ../../WINGs/wcolor.c:224 ../../WINGs/wcolor.c:236 ../../WINGs/wcolor.c:275
|
||||
#: ../../WINGs/wcolor.c:316
|
||||
#, c-format
|
||||
msgid "could not allocate %s color"
|
||||
msgstr "nemo¾no alokova» %s farbu"
|
||||
msgstr "nemožno alokovať %s farbu"
|
||||
|
||||
#: ../../WINGs/wcolor.c:198
|
||||
#: ../../WINGs/wcolor.c:224
|
||||
msgid "white"
|
||||
msgstr "bielu"
|
||||
|
||||
#: ../../WINGs/wcolor.c:211
|
||||
#: ../../WINGs/wcolor.c:236
|
||||
msgid "black"
|
||||
msgstr "èiernu"
|
||||
msgstr "čiernu"
|
||||
|
||||
#: ../../WINGs/wcolor.c:250
|
||||
#: ../../WINGs/wcolor.c:275
|
||||
msgid "gray"
|
||||
msgstr "¹edú"
|
||||
msgstr "šedú"
|
||||
|
||||
#: ../../WINGs/wcolor.c:291
|
||||
#: ../../WINGs/wcolor.c:316
|
||||
msgid "dark gray"
|
||||
msgstr "tmavo¹edú"
|
||||
msgstr "tmavošedú"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:415
|
||||
#: ../../WINGs/wcolorpanel.c:420
|
||||
msgid "Colors"
|
||||
msgstr "Farby"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:605 ../../WINGs/wcolorpanel.c:2824
|
||||
#: ../../WINGs/wcolorpanel.c:610 ../../WINGs/wcolorpanel.c:2829
|
||||
msgid "Brightness"
|
||||
msgstr "Svetlos»"
|
||||
msgstr "Svetlosť"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:607 ../../WINGs/wcolorpanel.c:683
|
||||
#: ../../WINGs/wcolorpanel.c:716 ../../WINGs/wcolorpanel.c:750
|
||||
#: ../../WINGs/wcolorpanel.c:810 ../../WINGs/wcolorpanel.c:844
|
||||
#: ../../WINGs/wcolorpanel.c:878 ../../WINGs/wcolorpanel.c:913
|
||||
#: ../../WINGs/wcolorpanel.c:2164 ../../WINGs/wcolorpanel.c:2826
|
||||
#: ../../WINGs/wcolorpanel.c:2862 ../../WINGs/wcolorpanel.c:2898
|
||||
#: ../../WINGs/wcolorpanel.c:3746
|
||||
#: ../../WINGs/wcolorpanel.c:612 ../../WINGs/wcolorpanel.c:688
|
||||
#: ../../WINGs/wcolorpanel.c:721 ../../WINGs/wcolorpanel.c:755
|
||||
#: ../../WINGs/wcolorpanel.c:815 ../../WINGs/wcolorpanel.c:849
|
||||
#: ../../WINGs/wcolorpanel.c:883 ../../WINGs/wcolorpanel.c:918
|
||||
#: ../../WINGs/wcolorpanel.c:2169 ../../WINGs/wcolorpanel.c:2831
|
||||
#: ../../WINGs/wcolorpanel.c:2867 ../../WINGs/wcolorpanel.c:2903
|
||||
#: ../../WINGs/wcolorpanel.c:3745
|
||||
msgid "Color Panel: Could not allocate memory"
|
||||
msgstr "Panel farieb: Nemo¾no alokova» pamä»"
|
||||
msgstr "Panel farieb: Nemožno alokovať pamäť"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:680 ../../WINGs/wcolorpanel.c:681
|
||||
#: ../../WINGs/wcolorpanel.c:685 ../../WINGs/wcolorpanel.c:686
|
||||
msgid "Red"
|
||||
msgstr "Èervená"
|
||||
msgstr "Červená"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:713 ../../WINGs/wcolorpanel.c:714
|
||||
#: ../../WINGs/wcolorpanel.c:718 ../../WINGs/wcolorpanel.c:719
|
||||
msgid "Green"
|
||||
msgstr "Zelená"
|
||||
msgstr "Zelená"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:747 ../../WINGs/wcolorpanel.c:748
|
||||
#: ../../WINGs/wcolorpanel.c:752 ../../WINGs/wcolorpanel.c:753
|
||||
msgid "Blue"
|
||||
msgstr "Modrá"
|
||||
msgstr "Modrá"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:807 ../../WINGs/wcolorpanel.c:808
|
||||
#: ../../WINGs/wcolorpanel.c:812 ../../WINGs/wcolorpanel.c:813
|
||||
msgid "Cyan"
|
||||
msgstr "Azúrová"
|
||||
msgstr "Azúrová"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:841 ../../WINGs/wcolorpanel.c:842
|
||||
#: ../../WINGs/wcolorpanel.c:846 ../../WINGs/wcolorpanel.c:847
|
||||
msgid "Magenta"
|
||||
msgstr "Purpurová"
|
||||
msgstr "Purpurová"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:875 ../../WINGs/wcolorpanel.c:876
|
||||
#: ../../WINGs/wcolorpanel.c:880 ../../WINGs/wcolorpanel.c:881
|
||||
msgid "Yellow"
|
||||
msgstr "®ltá"
|
||||
msgstr "Žltá"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:910 ../../WINGs/wcolorpanel.c:911
|
||||
#: ../../WINGs/wcolorpanel.c:915 ../../WINGs/wcolorpanel.c:916
|
||||
msgid "Black"
|
||||
msgstr "Èierna"
|
||||
msgstr "Čierna"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:991
|
||||
#: ../../WINGs/wcolorpanel.c:996
|
||||
msgid "Spectrum"
|
||||
msgstr "Spektrum"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1021
|
||||
#: ../../WINGs/wcolorpanel.c:1026
|
||||
msgid "Palette"
|
||||
msgstr "Paleta"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1027
|
||||
#: ../../WINGs/wcolorpanel.c:1032
|
||||
msgid "New from File..."
|
||||
msgstr "Nová zo súboru..."
|
||||
msgstr "Nová zo súboru..."
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1028 ../../WINGs/wcolorpanel.c:1076
|
||||
#: ../../WINGs/wcolorpanel.c:1093
|
||||
#: ../../WINGs/wcolorpanel.c:1033 ../../WINGs/wcolorpanel.c:1081
|
||||
#: ../../WINGs/wcolorpanel.c:1098
|
||||
msgid "Rename..."
|
||||
msgstr "Premenova»..."
|
||||
msgstr "Premenovať..."
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1029 ../../WINGs/wcolorpanel.c:1077
|
||||
#: ../../WINGs/wcolorpanel.c:1094 ../../WINGs/wcolorpanel.c:3321
|
||||
#: ../../WINGs/wcolorpanel.c:1034 ../../WINGs/wcolorpanel.c:1082
|
||||
#: ../../WINGs/wcolorpanel.c:1099 ../../WINGs/wcolorpanel.c:3326
|
||||
msgid "Remove"
|
||||
msgstr "Odstráni»"
|
||||
msgstr "Odstrániť"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1030
|
||||
#: ../../WINGs/wcolorpanel.c:1035
|
||||
msgid "Copy"
|
||||
msgstr "Kopírova»"
|
||||
msgstr "Kopírovať"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1031
|
||||
#: ../../WINGs/wcolorpanel.c:1036
|
||||
msgid "New from Clipboard"
|
||||
msgstr "Nová z nástenky"
|
||||
msgstr "Nová z nástenky"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1052
|
||||
#: ../../WINGs/wcolorpanel.c:1057
|
||||
msgid "X11-Colors"
|
||||
msgstr "Farby X11"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1069
|
||||
#: ../../WINGs/wcolorpanel.c:1074
|
||||
msgid "Color"
|
||||
msgstr "Farba"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1075
|
||||
#: ../../WINGs/wcolorpanel.c:1080
|
||||
msgid "Add..."
|
||||
msgstr "Prida»..."
|
||||
msgstr "Pridať..."
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1085
|
||||
#: ../../WINGs/wcolorpanel.c:1090
|
||||
msgid "List"
|
||||
msgstr "Zoznam"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1092
|
||||
#: ../../WINGs/wcolorpanel.c:1097
|
||||
msgid "New..."
|
||||
msgstr "Nový..."
|
||||
msgstr "Nový..."
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1231
|
||||
#: ../../WINGs/wcolorpanel.c:1236
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Color Panel: Could not create directory %s needed to store configurations"
|
||||
msgstr ""
|
||||
"Panel farieb: Nemo¾no vytvori» adresár %s potrebný na ulo¾enie nastavení"
|
||||
"Panel farieb: Nemožno vytvoriť adresár %s potrebný na uloženie nastavení"
|
||||
|
||||
#. Delete the file, it doesn't belong here
|
||||
#: ../../WINGs/wcolorpanel.c:1237 ../../WINGs/wcolorpanel.c:3207
|
||||
#: ../../WINGs/wcolorpanel.c:3211
|
||||
#: ../../WINGs/wcolorpanel.c:1242 ../../WINGs/wcolorpanel.c:3212
|
||||
#: ../../WINGs/wcolorpanel.c:3216
|
||||
msgid "File Error"
|
||||
msgstr "Chyba súboru"
|
||||
msgstr "Chyba súboru"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1238
|
||||
#: ../../WINGs/wcolorpanel.c:1243
|
||||
msgid "Could not create ColorPanel configuration directory"
|
||||
msgstr "Nemo¾no vytvori» konfiguraèný adresár panelu farieb"
|
||||
msgstr "Nemožno vytvoriť konfiguračný adresár panelu farieb"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1239 ../../WINGs/wcolorpanel.c:3208
|
||||
#: ../../WINGs/wcolorpanel.c:3213 ../../WINGs/wcolorpanel.c:3240
|
||||
#: ../../WINGs/wfilepanel.c:250 ../../WINGs/wfilepanel.c:647
|
||||
#: ../../WINGs/wfilepanel.c:659 ../../WINGs/wfilepanel.c:760
|
||||
#: ../../WINGs/wfilepanel.c:971 ../../WINGs/wfontpanel.c:709
|
||||
#: ../../WINGs/wcolorpanel.c:1244 ../../WINGs/wcolorpanel.c:3213
|
||||
#: ../../WINGs/wcolorpanel.c:3218 ../../WINGs/wcolorpanel.c:3245
|
||||
#: ../../WINGs/wfilepanel.c:250 ../../WINGs/wfilepanel.c:650
|
||||
#: ../../WINGs/wfilepanel.c:662 ../../WINGs/wfilepanel.c:763
|
||||
#: ../../WINGs/wfilepanel.c:974 ../../WINGs/wfontpanel.c:751
|
||||
msgid "OK"
|
||||
msgstr "OK"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1245 ../../WINGs/wcolorpanel.c:1281
|
||||
#: ../../WINGs/wcolorpanel.c:1299
|
||||
#: ../../WINGs/wcolorpanel.c:1250 ../../WINGs/wcolorpanel.c:1286
|
||||
#: ../../WINGs/wcolorpanel.c:1304
|
||||
msgid "Color Panel: Could not find file"
|
||||
msgstr "Panel farieb: Nemo¾no nájs» súbor"
|
||||
msgstr "Panel farieb: Nemožno nájsť súbor"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:1486 ../../WINGs/wcolorpanel.c:1551
|
||||
#: ../../WINGs/wcolorpanel.c:1615
|
||||
#: ../../WINGs/wcolorpanel.c:1491 ../../WINGs/wcolorpanel.c:1556
|
||||
#: ../../WINGs/wcolorpanel.c:1620
|
||||
msgid "Color Panel: X failed request"
|
||||
msgstr "Panel farieb: chyba po¾iadavky X"
|
||||
msgstr "Panel farieb: chyba požiadavky X"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:2860
|
||||
#: ../../WINGs/wcolorpanel.c:2865
|
||||
msgid "Saturation"
|
||||
msgstr "Saturácia"
|
||||
msgstr "Saturácia"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:2896
|
||||
#: ../../WINGs/wcolorpanel.c:2901
|
||||
msgid "Hue"
|
||||
msgstr "Odtieò"
|
||||
msgstr "Odtieň"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3146
|
||||
#: ../../WINGs/wcolorpanel.c:3151
|
||||
msgid "Open Palette"
|
||||
msgstr "Otvori» paletu"
|
||||
msgstr "Otvoriť paletu"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3208
|
||||
#: ../../WINGs/wcolorpanel.c:3213
|
||||
msgid "Invalid file format !"
|
||||
msgstr "Nesprávny súborový formát!"
|
||||
msgstr "Nesprávny súborový formát!"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3210
|
||||
#: ../../WINGs/wcolorpanel.c:3215
|
||||
#, c-format
|
||||
msgid "can't remove file %s"
|
||||
msgstr "namo¾no odstráni» súbor %s"
|
||||
msgstr "namožno odstrániť súbor %s"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3212
|
||||
#: ../../WINGs/wcolorpanel.c:3217
|
||||
msgid "Couldn't remove file from Configuration Directory !"
|
||||
msgstr "Nemo¾no odstráni» súbor z konfiguraèného adresára!"
|
||||
msgstr "Nemožno odstrániť súbor z konfiguračného adresára!"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3239
|
||||
#: ../../WINGs/wcolorpanel.c:3244
|
||||
msgid "Rename"
|
||||
msgstr "Premenova»"
|
||||
msgstr "Premenovať"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3239
|
||||
#: ../../WINGs/wcolorpanel.c:3244
|
||||
msgid "Rename palette to:"
|
||||
msgstr "Premenova» paletu:"
|
||||
msgstr "Premenovať paletu:"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3240 ../../WINGs/wfilepanel.c:259
|
||||
#: ../../WINGs/wfilepanel.c:659 ../../WINGs/wfilepanel.c:760
|
||||
#: ../../WINGs/wcolorpanel.c:3245 ../../WINGs/wfilepanel.c:259
|
||||
#: ../../WINGs/wfilepanel.c:662 ../../WINGs/wfilepanel.c:763
|
||||
msgid "Cancel"
|
||||
msgstr "Zru¹i»"
|
||||
msgstr "Zrušiť"
|
||||
|
||||
#. Careful, this palette exists already
|
||||
#: ../../WINGs/wcolorpanel.c:3256 ../../WINGs/wfilepanel.c:760
|
||||
#: ../../WINGs/wcolorpanel.c:3261 ../../WINGs/wfilepanel.c:763
|
||||
msgid "Warning"
|
||||
msgstr "Varovanie"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3257
|
||||
#: ../../WINGs/wcolorpanel.c:3262
|
||||
msgid ""
|
||||
"Palette already exists !\n"
|
||||
"\n"
|
||||
"Overwrite ?"
|
||||
msgstr ""
|
||||
"Paleta u¾ existuje!\n"
|
||||
"Paleta už existuje!\n"
|
||||
"\n"
|
||||
"Prepísa»?"
|
||||
"Prepísať?"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3257 ../../WINGs/wcolorpanel.c:3321
|
||||
#: ../../WINGs/wcolorpanel.c:3262 ../../WINGs/wcolorpanel.c:3326
|
||||
msgid "No"
|
||||
msgstr "Nie"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3257 ../../WINGs/wcolorpanel.c:3321
|
||||
#: ../../WINGs/wcolorpanel.c:3262 ../../WINGs/wcolorpanel.c:3326
|
||||
msgid "Yes"
|
||||
msgstr "Áno"
|
||||
msgstr "Áno"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3289
|
||||
#: ../../WINGs/wcolorpanel.c:3294
|
||||
#, c-format
|
||||
msgid "Couldn't rename palette %s to %s\n"
|
||||
msgstr "Nemo¾no premenova» paletu %s na %s\n"
|
||||
msgstr "Nemožno premenovať paletu %s na %s\n"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3315
|
||||
#: ../../WINGs/wcolorpanel.c:3320
|
||||
msgid "This will permanently remove the palette "
|
||||
msgstr "Paleta bude natrvalo zmazaná"
|
||||
msgstr "Paleta bude natrvalo zmazaná"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3318
|
||||
#: ../../WINGs/wcolorpanel.c:3323
|
||||
msgid ""
|
||||
".\n"
|
||||
"\n"
|
||||
@@ -424,31 +430,31 @@ msgid ""
|
||||
msgstr ""
|
||||
".\n"
|
||||
"\n"
|
||||
"Ste si istý, ¾e chcete odstráni» túto paletu?"
|
||||
"Ste si istý, že chcete odstrániť túto paletu?"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3343
|
||||
#: ../../WINGs/wcolorpanel.c:3348
|
||||
#, c-format
|
||||
msgid "Couldn't remove palette %s\n"
|
||||
msgstr "Nemo¾no odstráni» paletu %s\n"
|
||||
msgstr "Nemožno odstrániť paletu %s\n"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3648
|
||||
#: ../../WINGs/wcolorpanel.c:3647
|
||||
#, c-format
|
||||
msgid "Could not open %s"
|
||||
msgstr "Nemo¾no otvori» %s"
|
||||
msgstr "Nemožno otvoriť %s"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3655
|
||||
#: ../../WINGs/wcolorpanel.c:3654
|
||||
#, c-format
|
||||
msgid "Could not create %s"
|
||||
msgstr "Nemo¾no vytvori» %s"
|
||||
msgstr "Nemožno vytvoriť %s"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3666
|
||||
#: ../../WINGs/wcolorpanel.c:3665
|
||||
#, c-format
|
||||
msgid "Write error on file %s"
|
||||
msgstr "Chyba zápisu do súboru %s"
|
||||
msgstr "Chyba zápisu do súboru %s"
|
||||
|
||||
#: ../../WINGs/wcolorpanel.c:3711
|
||||
#: ../../WINGs/wcolorpanel.c:3710
|
||||
msgid "Color Panel: Color unspecified"
|
||||
msgstr "Panel farieb: Ne¹pecifikovaná farba"
|
||||
msgstr "Panel farieb: Nešpecifikovaná farba"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:235
|
||||
msgid "Name:"
|
||||
@@ -456,213 +462,258 @@ msgstr "Meno:"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:332 ../../WINGs/wfilepanel.c:396
|
||||
msgid "Open"
|
||||
msgstr "Otvori»"
|
||||
msgstr "Otvoriť"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:350 ../../WINGs/wfilepanel.c:402
|
||||
msgid "Save"
|
||||
msgstr "Ulo¾i»"
|
||||
msgstr "Uložiť"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:562
|
||||
#: ../../WINGs/wfilepanel.c:565
|
||||
#, c-format
|
||||
msgid "WINGs: could not open directory %s\n"
|
||||
msgstr "WINGs: nemo¾no otvori» adresár %s\n"
|
||||
msgstr "WINGs: nemožno otvoriť adresár %s\n"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:580
|
||||
#: ../../WINGs/wfilepanel.c:583
|
||||
#, c-format
|
||||
msgid "WINGs: could not stat %s\n"
|
||||
msgstr "WINGs: nemo¾no zisti» informácie o %s\n"
|
||||
msgstr "WINGs: nemožno zistiť informácie o %s\n"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:647 ../../WINGs/wfilepanel.c:970
|
||||
#: ../../WINGs/wfontpanel.c:708
|
||||
#: ../../WINGs/wfilepanel.c:650 ../../WINGs/wfilepanel.c:973
|
||||
#: ../../WINGs/wfontpanel.c:750
|
||||
msgid "Error"
|
||||
msgstr "Chyba"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:658
|
||||
#: ../../WINGs/wfilepanel.c:661
|
||||
msgid "Create Directory"
|
||||
msgstr "Vytvori» adresár"
|
||||
msgstr "Vytvoriť adresár"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:659
|
||||
#: ../../WINGs/wfilepanel.c:662
|
||||
msgid "Enter directory name"
|
||||
msgstr "Meno adresára"
|
||||
msgstr "Meno adresára"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:695 ../../WINGs/wfilepanel.c:734
|
||||
#: ../../WINGs/wfilepanel.c:765 ../../WINGs/wfilepanel.c:793
|
||||
#: ../../WINGs/wfilepanel.c:698 ../../WINGs/wfilepanel.c:737
|
||||
#: ../../WINGs/wfilepanel.c:768 ../../WINGs/wfilepanel.c:796
|
||||
msgid "Permission denied."
|
||||
msgstr "Prístup zamietnutý."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:698
|
||||
#, c-format
|
||||
msgid "'%s' already exists."
|
||||
msgstr "'%s' u¾ existuje"
|
||||
msgstr "Prístup zamietnutý."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:701
|
||||
#, c-format
|
||||
msgid "'%s' already exists."
|
||||
msgstr "'%s' už existuje"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:704
|
||||
msgid "Path does not exist."
|
||||
msgstr "Cesta neexistuje."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:731 ../../WINGs/wfilepanel.c:790
|
||||
#: ../../WINGs/wfilepanel.c:734 ../../WINGs/wfilepanel.c:793
|
||||
#, c-format
|
||||
msgid "'%s' does not exist."
|
||||
msgstr "'%s' neexistuje."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:738 ../../WINGs/wfilepanel.c:797
|
||||
#: ../../WINGs/wfilepanel.c:741 ../../WINGs/wfilepanel.c:800
|
||||
msgid "Insufficient memory available."
|
||||
msgstr "Nedostatok pamäti."
|
||||
msgstr "Nedostatok pamäti."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:742 ../../WINGs/wfilepanel.c:801
|
||||
#: ../../WINGs/wfilepanel.c:745 ../../WINGs/wfilepanel.c:804
|
||||
#, c-format
|
||||
msgid "'%s' is on a read-only filesystem."
|
||||
msgstr "'%s' je na súborovom systéme len pre èítanie."
|
||||
msgstr "'%s' je na súborovom systéme len pre čítanie."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:745 ../../WINGs/wfilepanel.c:777
|
||||
#: ../../WINGs/wfilepanel.c:804
|
||||
#: ../../WINGs/wfilepanel.c:748 ../../WINGs/wfilepanel.c:780
|
||||
#: ../../WINGs/wfilepanel.c:807
|
||||
#, c-format
|
||||
msgid "Can not delete '%s'."
|
||||
msgstr "Nemo¾no odstráni» '%s'."
|
||||
msgstr "Nemožno odstrániť '%s'."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:752
|
||||
#: ../../WINGs/wfilepanel.c:755
|
||||
#, c-format
|
||||
msgid "Delete directory %s ?"
|
||||
msgstr "Odstráni» adresár %s?"
|
||||
msgstr "Odstrániť adresár %s?"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:756
|
||||
#: ../../WINGs/wfilepanel.c:759
|
||||
#, c-format
|
||||
msgid "Delete file %s ?"
|
||||
msgstr "Odstráni» súbor %s?"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:768
|
||||
#, c-format
|
||||
msgid "Directory '%s' does not exist."
|
||||
msgstr "Adresár '%s' neexistuje."
|
||||
msgstr "Odstrániť súbor %s?"
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:771
|
||||
#, c-format
|
||||
msgid "Directory '%s' is not empty."
|
||||
msgstr "Adresár '%s' nie je prázdny."
|
||||
msgid "Directory '%s' does not exist."
|
||||
msgstr "Adresár '%s' neexistuje."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:774
|
||||
#, c-format
|
||||
msgid "Directory '%s' is busy."
|
||||
msgstr "Adresár '%s' je pou¾ívaný."
|
||||
msgid "Directory '%s' is not empty."
|
||||
msgstr "Adresár '%s' nie je prázdny."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:787
|
||||
#: ../../WINGs/wfilepanel.c:777
|
||||
#, c-format
|
||||
msgid "Directory '%s' is busy."
|
||||
msgstr "Adresár '%s' je používaný."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:790
|
||||
#, c-format
|
||||
msgid "'%s' is a directory."
|
||||
msgstr "'%s' je adresár."
|
||||
msgstr "'%s' je adresár."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:829
|
||||
#: ../../WINGs/wfilepanel.c:832
|
||||
#, c-format
|
||||
msgid "An error occured browsing '%s'."
|
||||
msgstr "Pri prehliadaní '%s' nastala chyba."
|
||||
msgstr "Pri prehliadaní '%s' nastala chyba."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:833
|
||||
#: ../../WINGs/wfilepanel.c:836
|
||||
#, c-format
|
||||
msgid "'%s' is not a directory."
|
||||
msgstr "'%s' nie je adresár."
|
||||
msgstr "'%s' nie je adresár."
|
||||
|
||||
#: ../../WINGs/wfilepanel.c:970
|
||||
#: ../../WINGs/wfilepanel.c:973
|
||||
msgid "File does not exist."
|
||||
msgstr "Súbor neexistuje."
|
||||
msgstr "Súbor neexistuje."
|
||||
|
||||
#: ../../WINGs/wfont.c:129
|
||||
#: ../../WINGs/wfont.c:324 ../../WINGs/wfont.c:344
|
||||
#, c-format
|
||||
msgid "could not load font %s."
|
||||
msgstr "nemožno načítať font %s."
|
||||
|
||||
#: ../../WINGs/wfont.c:375 ../../WINGs/wfont.c:420 ../../WINGs/wfont.c:475
|
||||
#: ../../WINGs/wfont.c:1337 ../../WINGs/wfont.c:1398 ../../WINGs/wfont.c:1469
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Conversion to widechar failed (possible invalid multibyte sequence): '%s':"
|
||||
"(pos %d)\n"
|
||||
msgstr ""
|
||||
"Konverzia do widechar zlyhala (možno nesprávna multibyte sekvencia): '%s':"
|
||||
"(pos %d)\n"
|
||||
|
||||
#. // remove warning later. or maybe not
|
||||
#: ../../WINGs/wfont.c:591 ../../WINGs/wfont.c:1568
|
||||
#, c-format
|
||||
msgid "Invalid font specification: '%s'\n"
|
||||
msgstr "Chybná špecifikácia fontu: '%s'\n"
|
||||
|
||||
#: ../../WINGs/wfont.c:770 ../../WINGs/wfont.c:780
|
||||
#, c-format
|
||||
msgid "Invalid size specification '%s' in %s. Using default %d\n"
|
||||
msgstr "Chybná špecifikácia veľkosti '%s' v %s. Použije sa implicitná %d\n"
|
||||
|
||||
#: ../../WINGs/wfont.c:824
|
||||
#, c-format
|
||||
msgid "the following character sets are missing in %s:"
|
||||
msgstr "nasledujúce sady znakov chýbajú v %s:"
|
||||
msgstr "nasledujúce sady znakov chýbajú v %s:"
|
||||
|
||||
#: ../../WINGs/wfont.c:136
|
||||
#: ../../WINGs/wfont.c:830
|
||||
#, c-format
|
||||
msgid ""
|
||||
"the string \"%s\" will be used in place of any characters from those sets."
|
||||
msgstr "re»azec \"%s\" bude pou¾itý namiesto znakov z týchto sád."
|
||||
msgstr "reťazec \"%s\" bude použitý namiesto znakov z týchto sád."
|
||||
|
||||
#: ../../WINGs/wfont.c:282 ../../WINGs/wfont.c:318
|
||||
#. is arial a good fallback for multibyte?
|
||||
#: ../../WINGs/wfont.c:1232 ../../WINGs/wfont.c:1247
|
||||
#, c-format
|
||||
msgid "could not load font set %s. Trying fixed."
|
||||
msgstr "nemo¾no naèíta» font %s. Skú¹a sa naèíta» fixed."
|
||||
msgid "could not load font %s. Trying arial."
|
||||
msgstr "nemožno načítať font %s. Skúša sa načítať arial."
|
||||
|
||||
#: ../../WINGs/wfont.c:288 ../../WINGs/wfont.c:324
|
||||
#: ../../WINGs/wfont.c:1239
|
||||
msgid "could not load antialiased font set. Reverting to standard font sets."
|
||||
msgstr "nemožno načítať antialiasovanú sadu fontov. Späť k štandardnej sade fontov."
|
||||
|
||||
#: ../../WINGs/wfont.c:1242
|
||||
#, c-format
|
||||
msgid "could not load FontSet %s. Trying fixed."
|
||||
msgstr "nemožno načítať sadu fontov %s. Skúša sa načítať fixed."
|
||||
|
||||
#: ../../WINGs/wfont.c:1254
|
||||
msgid "could not load antialiased fonts. Reverting to normal fonts."
|
||||
msgstr "nemožno zaviesť antialiasovaný font. Návrat k normálnemu fontu."
|
||||
|
||||
#: ../../WINGs/wfont.c:1257 ../../WINGs/wfont.c:1268
|
||||
#, c-format
|
||||
msgid "could not load font %s. Trying fixed."
|
||||
msgstr "nemo¾no naèíta» font %s. Skú¹a sa naèíta» fixed."
|
||||
msgstr "nemožno načítať font %s. Skúša sa načítať fixed."
|
||||
|
||||
#: ../../WINGs/wfont.c:292 ../../WINGs/wfont.c:328
|
||||
#: ../../WINGs/wfont.c:1262
|
||||
#, c-format
|
||||
msgid "could not load font set %s. Trying fixed."
|
||||
msgstr "nemožno načítať font %s. Skúša sa načítať fixed."
|
||||
|
||||
#: ../../WINGs/wfont.c:1272
|
||||
msgid "could not load fixed font!"
|
||||
msgstr "nemo¾no naèíta» font fixed!"
|
||||
msgstr "nemožno načítať font fixed!"
|
||||
|
||||
#: ../../WINGs/wfont.c:423
|
||||
#: ../../WINGs/wfont.c:1520
|
||||
#, c-format
|
||||
msgid "font description %s is too large."
|
||||
msgstr "popis fontu %s je príli¹ veµký."
|
||||
msgstr "popis fontu %s je príliš veľký."
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:205
|
||||
#: ../../WINGs/wfontpanel.c:235
|
||||
msgid "Test!!!"
|
||||
msgstr "Skú¹ka!!!"
|
||||
msgstr "Skúška!!!"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:211
|
||||
#: ../../WINGs/wfontpanel.c:241
|
||||
msgid "Family"
|
||||
msgstr "Rodina"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:222
|
||||
msgid "Typeface"
|
||||
msgstr "Vzhµad"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:233
|
||||
msgid "Size"
|
||||
msgstr "Veµkos»"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:252
|
||||
msgid "Typeface"
|
||||
msgstr "Vzhľad"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:263
|
||||
msgid "Size"
|
||||
msgstr "Veľkosť"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:282
|
||||
msgid "Set"
|
||||
msgstr "Sada"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:257
|
||||
#: ../../WINGs/wfontpanel.c:288
|
||||
msgid "Revert"
|
||||
msgstr "Obráti»"
|
||||
msgstr "Obrátiť"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:709
|
||||
#: ../../WINGs/wfontpanel.c:751
|
||||
msgid "Could not retrieve font list"
|
||||
msgstr "Nemo¾no obdr¾a» zoznam fontov"
|
||||
msgstr "Nemožno obdržať zoznam fontov"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:721
|
||||
#: ../../WINGs/wfontpanel.c:765
|
||||
#, c-format
|
||||
msgid "font name %s is longer than 256, which is invalid."
|
||||
msgstr "meno fontu %s je dlh¹ie ako 256, èo je nesprávne."
|
||||
msgstr "meno fontu %s je dlhšie ako 256, čo je nesprávne."
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:868
|
||||
#: ../../WINGs/wfontpanel.c:913
|
||||
msgid "Roman"
|
||||
msgstr "roman"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:871
|
||||
#: ../../WINGs/wfontpanel.c:916
|
||||
msgid "Italic"
|
||||
msgstr "kurzíva"
|
||||
msgstr "kurzíva"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:873
|
||||
#: ../../WINGs/wfontpanel.c:918
|
||||
msgid "Oblique"
|
||||
msgstr "¹ikmé"
|
||||
msgstr "šikmé"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:875
|
||||
#: ../../WINGs/wfontpanel.c:920
|
||||
msgid "Rev Italic"
|
||||
msgstr "obr. kurzíva"
|
||||
msgstr "obr. kurzíva"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:877
|
||||
#: ../../WINGs/wfontpanel.c:922
|
||||
msgid "Rev Oblique"
|
||||
msgstr "obr. ¹ikmé"
|
||||
msgstr "obr. šikmé"
|
||||
|
||||
#: ../../WINGs/wfontpanel.c:883
|
||||
#: ../../WINGs/wfontpanel.c:928
|
||||
msgid "Normal"
|
||||
msgstr "normálne"
|
||||
msgstr "normálne"
|
||||
|
||||
#: ../../WINGs/widgets.c:415
|
||||
#: ../../WINGs/widgets.c:419
|
||||
#, c-format
|
||||
msgid "WINGs: could not load widget images file: %s"
|
||||
msgstr "WINGs: nemo¾no naèíta» súbor s obrázkami pre widgety: %s"
|
||||
msgstr "WINGs: nemožno načítať súbor s obrázkami pre widgety: %s"
|
||||
|
||||
#: ../../WINGs/widgets.c:761
|
||||
#: ../../WINGs/widgets.c:772
|
||||
msgid ""
|
||||
"could not load any fonts. Make sure your font installationand locale "
|
||||
"could not load any fonts. Make sure your font installation and locale "
|
||||
"settings are correct."
|
||||
msgstr ""
|
||||
"nemo¾no naèíta» ¾iadny font. Ubezpeète sa, ¾e in¹talácia fontov a miestne "
|
||||
"nastavenia sú v poriadku."
|
||||
"nemožno načítať žiadny font. Ubezpečte sa, že inštalácia fontov a miestne "
|
||||
"nastavenia sú v poriadku."
|
||||
|
||||
#: ../../WINGs/wruler.c:189
|
||||
#: ../../WINGs/wruler.c:192
|
||||
msgid "0 inches"
|
||||
msgstr "0 palcov"
|
||||
|
||||
2555
WINGs/proplist.c
2555
WINGs/proplist.c
File diff suppressed because it is too large
Load Diff
361
WINGs/puzzle.c
361
WINGs/puzzle.c
@@ -1,15 +1,10 @@
|
||||
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <WINGs.h>
|
||||
|
||||
|
||||
|
||||
#define MAX_SIZE 10*10
|
||||
|
||||
|
||||
WMWindow *win;
|
||||
WMButton *Button[MAX_SIZE];
|
||||
char Map[MAX_SIZE];
|
||||
@@ -20,222 +15,218 @@ int MoveCount;
|
||||
|
||||
int WinSize = 120;
|
||||
|
||||
|
||||
Bool CheckWin(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < Size*Size-1; i++) {
|
||||
if (Map[i] != i)
|
||||
return False;
|
||||
}
|
||||
|
||||
return True;
|
||||
}
|
||||
int i;
|
||||
|
||||
for (i = 0; i < Size * Size - 1; i++) {
|
||||
if (Map[i] != i)
|
||||
return False;
|
||||
}
|
||||
|
||||
return True;
|
||||
}
|
||||
|
||||
void MoveButton(int button, int x, int y)
|
||||
{
|
||||
WMMoveWidget(Button[button], x*(WinSize/Size), y*(WinSize/Size));
|
||||
WMMoveWidget(Button[button], x * (WinSize / Size), y * (WinSize / Size));
|
||||
}
|
||||
|
||||
|
||||
Bool SlideButton(int button)
|
||||
{
|
||||
int x, y, done = 0;
|
||||
|
||||
/* locate the button */
|
||||
for (y = 0; y < Size; y++) {
|
||||
for (x = 0; x < Size; x++) {
|
||||
if (MAP(x,y) == button) {
|
||||
done = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (done)
|
||||
break;
|
||||
}
|
||||
|
||||
if (x > 0 && MAP(x-1, y) < 0) {
|
||||
MAP(x,y) = -1;
|
||||
MoveButton(button, x-1, y);
|
||||
MAP(x-1,y) = button;
|
||||
} else if (x < Size-1 && MAP(x+1, y) < 0) {
|
||||
MAP(x,y) = -1;
|
||||
MoveButton(button, x+1, y);
|
||||
MAP(x+1,y) = button;
|
||||
} else if (y > 0 && MAP(x, y-1) < 0) {
|
||||
MAP(x,y) = -1;
|
||||
MoveButton(button, x, y-1);
|
||||
MAP(x,y-1) = button;
|
||||
} else if (y < Size-1 && MAP(x, y+1) < 0) {
|
||||
MAP(x,y) = -1;
|
||||
MoveButton(button, x, y+1);
|
||||
MAP(x,y+1) = button;
|
||||
} else {
|
||||
return False;
|
||||
}
|
||||
return True;
|
||||
}
|
||||
int x, y, done = 0;
|
||||
|
||||
/* locate the button */
|
||||
for (y = 0; y < Size; y++) {
|
||||
for (x = 0; x < Size; x++) {
|
||||
if (MAP(x, y) == button) {
|
||||
done = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (done)
|
||||
break;
|
||||
}
|
||||
|
||||
if (x > 0 && MAP(x - 1, y) < 0) {
|
||||
MAP(x, y) = -1;
|
||||
MoveButton(button, x - 1, y);
|
||||
MAP(x - 1, y) = button;
|
||||
} else if (x < Size - 1 && MAP(x + 1, y) < 0) {
|
||||
MAP(x, y) = -1;
|
||||
MoveButton(button, x + 1, y);
|
||||
MAP(x + 1, y) = button;
|
||||
} else if (y > 0 && MAP(x, y - 1) < 0) {
|
||||
MAP(x, y) = -1;
|
||||
MoveButton(button, x, y - 1);
|
||||
MAP(x, y - 1) = button;
|
||||
} else if (y < Size - 1 && MAP(x, y + 1) < 0) {
|
||||
MAP(x, y) = -1;
|
||||
MoveButton(button, x, y + 1);
|
||||
MAP(x, y + 1) = button;
|
||||
} else {
|
||||
return False;
|
||||
}
|
||||
return True;
|
||||
}
|
||||
|
||||
#define SWAP(a,b) {int tmp; tmp=a; a=b; b=tmp;}
|
||||
|
||||
void ResetGame(void)
|
||||
{
|
||||
int i, x, y, ox, oy;
|
||||
|
||||
|
||||
MoveCount = 0;
|
||||
|
||||
for (i = 0; i < Size*Size-1; i++) {
|
||||
Map[i] = i;
|
||||
}
|
||||
Map[i] = -1;
|
||||
ox = x = Size-1;
|
||||
oy = y = Size-1;
|
||||
for (i = 0; i < 5; i++) {
|
||||
int ok;
|
||||
ok = 1;
|
||||
switch (rand()%4) {
|
||||
case 0:
|
||||
if (x > 0) x--; else ok = 0;
|
||||
break;
|
||||
case 2:
|
||||
if (x < Size-1) x++; else ok = 0;
|
||||
break;
|
||||
case 1:
|
||||
if (y > 0) y--; else ok = 0;
|
||||
break;
|
||||
case 3:
|
||||
if (y < Size-1) y++; else ok = 0;
|
||||
break;
|
||||
}
|
||||
if (ok) {
|
||||
MoveButton(MAP(x,y), ox, oy);
|
||||
int i, x, y, ox, oy;
|
||||
|
||||
SWAP(MAP(ox, oy), MAP(x, y));
|
||||
|
||||
while (XPending(WMScreenDisplay(WMWidgetScreen(win)))) {
|
||||
XEvent ev;
|
||||
WMNextEvent(WMScreenDisplay(WMWidgetScreen(win)), &ev);
|
||||
WMHandleEvent(&ev);
|
||||
}
|
||||
ox = x;
|
||||
oy = y;
|
||||
MoveCount = 0;
|
||||
|
||||
for (i = 0; i < Size * Size - 1; i++) {
|
||||
Map[i] = i;
|
||||
}
|
||||
Map[i] = -1;
|
||||
ox = x = Size - 1;
|
||||
oy = y = Size - 1;
|
||||
for (i = 0; i < 5; i++) {
|
||||
int ok;
|
||||
ok = 1;
|
||||
switch (rand() % 4) {
|
||||
case 0:
|
||||
if (x > 0)
|
||||
x--;
|
||||
else
|
||||
ok = 0;
|
||||
break;
|
||||
case 2:
|
||||
if (x < Size - 1)
|
||||
x++;
|
||||
else
|
||||
ok = 0;
|
||||
break;
|
||||
case 1:
|
||||
if (y > 0)
|
||||
y--;
|
||||
else
|
||||
ok = 0;
|
||||
break;
|
||||
case 3:
|
||||
if (y < Size - 1)
|
||||
y++;
|
||||
else
|
||||
ok = 0;
|
||||
break;
|
||||
}
|
||||
if (ok) {
|
||||
MoveButton(MAP(x, y), ox, oy);
|
||||
|
||||
SWAP(MAP(ox, oy), MAP(x, y));
|
||||
|
||||
while (XPending(WMScreenDisplay(WMWidgetScreen(win)))) {
|
||||
XEvent ev;
|
||||
WMNextEvent(WMScreenDisplay(WMWidgetScreen(win)), &ev);
|
||||
WMHandleEvent(&ev);
|
||||
}
|
||||
ox = x;
|
||||
oy = y;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void buttonClick(WMWidget *w, void *ptr)
|
||||
void buttonClick(WMWidget * w, void *ptr)
|
||||
{
|
||||
char buffer[300];
|
||||
char buffer[300];
|
||||
|
||||
if (SlideButton((int)ptr)) {
|
||||
MoveCount++;
|
||||
if (SlideButton((int)ptr)) {
|
||||
MoveCount++;
|
||||
|
||||
if (CheckWin()) {
|
||||
sprintf(buffer, "You finished the game in %i moves.", MoveCount);
|
||||
if (CheckWin()) {
|
||||
sprintf(buffer, "You finished the game in %i moves.", MoveCount);
|
||||
|
||||
if (WMRunAlertPanel(WMWidgetScreen(w), win, "You Won!", buffer,
|
||||
"Wee!", "Gah! Lemme retry!", NULL) == WAPRDefault) {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
ResetGame();
|
||||
if (WMRunAlertPanel(WMWidgetScreen(w), win, "You Won!", buffer,
|
||||
"Wee!", "Gah! Lemme retry!", NULL) == WAPRDefault) {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
ResetGame();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void resizeObserver(void *self, WMNotification *notif)
|
||||
static void resizeObserver(void *self, WMNotification * notif)
|
||||
{
|
||||
WMSize size = WMGetViewSize(WMWidgetView(win));
|
||||
int x, y;
|
||||
|
||||
WinSize = size.width;
|
||||
for (y = 0; y < Size; y++) {
|
||||
for (x = 0; x < Size; x++) {
|
||||
if (MAP(x,y) >= 0) {
|
||||
WMResizeWidget(Button[(int)MAP(x,y)],
|
||||
WinSize/Size, WinSize/Size);
|
||||
WMMoveWidget(Button[(int)MAP(x,y)],
|
||||
x*(WinSize/Size), y*(WinSize/Size));
|
||||
}
|
||||
WMSize size = WMGetViewSize(WMWidgetView(win));
|
||||
int x, y;
|
||||
|
||||
WinSize = size.width;
|
||||
for (y = 0; y < Size; y++) {
|
||||
for (x = 0; x < Size; x++) {
|
||||
if (MAP(x, y) >= 0) {
|
||||
WMResizeWidget(Button[(int)MAP(x, y)], WinSize / Size, WinSize / Size);
|
||||
WMMoveWidget(Button[(int)MAP(x, y)], x * (WinSize / Size), y * (WinSize / Size));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
Display *dpy;
|
||||
WMScreen *scr;
|
||||
int x, y, i;
|
||||
|
||||
WMInitializeApplication("Puzzle", &argc, argv);
|
||||
Display *dpy;
|
||||
WMScreen *scr;
|
||||
int x, y, i;
|
||||
|
||||
|
||||
dpy = XOpenDisplay("");
|
||||
if (!dpy) {
|
||||
printf("could not open display\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
scr = WMCreateScreen(dpy, DefaultScreen(dpy));
|
||||
|
||||
win = WMCreateWindow(scr, "puzzle");
|
||||
WMResizeWidget(win, WinSize, WinSize);
|
||||
WMSetWindowTitle(win, "zuPzel");
|
||||
WMSetWindowMinSize(win, 80, 80);
|
||||
WMSetWindowAspectRatio(win, 2, 2, 2, 2);
|
||||
WMSetWindowResizeIncrements(win, Size, Size);
|
||||
WMSetViewNotifySizeChanges(WMWidgetView(win), True);
|
||||
WMAddNotificationObserver(resizeObserver, NULL,
|
||||
WMViewSizeDidChangeNotification,
|
||||
WMWidgetView(win));
|
||||
|
||||
|
||||
|
||||
for (i = y = 0; y < Size && i < Size*Size-1; y++) {
|
||||
for (x = 0; x < Size && i < Size*Size-1; x++) {
|
||||
char buf[32];
|
||||
WMColor *color;
|
||||
RColor col;
|
||||
RHSVColor hsv;
|
||||
|
||||
hsv.hue = i*360/(Size*Size-1);
|
||||
hsv.saturation = 120;
|
||||
hsv.value = 200;
|
||||
|
||||
RHSVtoRGB(&hsv, &col);
|
||||
WMInitializeApplication("Puzzle", &argc, argv);
|
||||
|
||||
color = WMCreateRGBColor(scr, col.red<<8, col.green<<8,
|
||||
col.blue<<8, False);
|
||||
|
||||
MAP(x,y) = i;
|
||||
Button[i] = WMCreateButton(win, WBTMomentaryLight);
|
||||
WMSetWidgetBackgroundColor(Button[i], color);
|
||||
WMReleaseColor(color);
|
||||
WMSetButtonAction(Button[i], buttonClick, (void*)i);
|
||||
WMResizeWidget(Button[i], WinSize/Size, WinSize/Size);
|
||||
WMMoveWidget(Button[i], x*(WinSize/Size), y*(WinSize/Size));
|
||||
sprintf(buf, "%i", i+1);
|
||||
WMSetButtonText(Button[i], buf);
|
||||
WMSetButtonTextAlignment(Button[i], WACenter);
|
||||
i++;
|
||||
dpy = XOpenDisplay("");
|
||||
if (!dpy) {
|
||||
printf("could not open display\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
WMMapSubwidgets(win);
|
||||
WMMapWidget(win);
|
||||
WMRealizeWidget(win);
|
||||
|
||||
ResetGame();
|
||||
|
||||
WMScreenMainLoop(scr);
|
||||
|
||||
return 0;
|
||||
scr = WMCreateScreen(dpy, DefaultScreen(dpy));
|
||||
|
||||
win = WMCreateWindow(scr, "puzzle");
|
||||
WMResizeWidget(win, WinSize, WinSize);
|
||||
WMSetWindowTitle(win, "zuPzel");
|
||||
WMSetWindowMinSize(win, 80, 80);
|
||||
WMSetWindowAspectRatio(win, 2, 2, 2, 2);
|
||||
WMSetWindowResizeIncrements(win, Size, Size);
|
||||
WMSetViewNotifySizeChanges(WMWidgetView(win), True);
|
||||
WMAddNotificationObserver(resizeObserver, NULL, WMViewSizeDidChangeNotification, WMWidgetView(win));
|
||||
|
||||
for (i = y = 0; y < Size && i < Size * Size - 1; y++) {
|
||||
for (x = 0; x < Size && i < Size * Size - 1; x++) {
|
||||
char buf[32];
|
||||
WMColor *color;
|
||||
RColor col;
|
||||
RHSVColor hsv;
|
||||
|
||||
hsv.hue = i * 360 / (Size * Size - 1);
|
||||
hsv.saturation = 120;
|
||||
hsv.value = 200;
|
||||
|
||||
RHSVtoRGB(&hsv, &col);
|
||||
|
||||
color = WMCreateRGBColor(scr, col.red << 8, col.green << 8, col.blue << 8, False);
|
||||
|
||||
MAP(x, y) = i;
|
||||
Button[i] = WMCreateButton(win, WBTMomentaryLight);
|
||||
WMSetWidgetBackgroundColor(Button[i], color);
|
||||
WMReleaseColor(color);
|
||||
WMSetButtonAction(Button[i], buttonClick, (void *)i);
|
||||
WMResizeWidget(Button[i], WinSize / Size, WinSize / Size);
|
||||
WMMoveWidget(Button[i], x * (WinSize / Size), y * (WinSize / Size));
|
||||
sprintf(buf, "%i", i + 1);
|
||||
WMSetButtonText(Button[i], buf);
|
||||
WMSetButtonTextAlignment(Button[i], WACenter);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
WMMapSubwidgets(win);
|
||||
WMMapWidget(win);
|
||||
WMRealizeWidget(win);
|
||||
|
||||
ResetGame();
|
||||
|
||||
WMScreenMainLoop(scr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
5
WINGs/python/.cvsignore
Normal file
5
WINGs/python/.cvsignore
Normal file
@@ -0,0 +1,5 @@
|
||||
build
|
||||
WINGs.c
|
||||
wings.so
|
||||
*.pyc
|
||||
*.pyo
|
||||
17
WINGs/python/Makefile
Normal file
17
WINGs/python/Makefile
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
all: WINGs.c
|
||||
python setup.py build
|
||||
ln -sf `find build/ -name wings.so` .
|
||||
|
||||
install: WINGs.c
|
||||
python setup.py install
|
||||
|
||||
clean:
|
||||
rm -rf build dist WINGs.c *.o *~ *.so MANIFEST wings.py *.pyc *.pyo core
|
||||
|
||||
dist:
|
||||
python setup.py sdist
|
||||
|
||||
WINGs.c: WINGs.i
|
||||
swig -python -noproxy `get-wings-flags --cflags` -I.. -o WINGs.c WINGs.i
|
||||
|
||||
20
WINGs/python/README
Normal file
20
WINGs/python/README
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
This is a python wrapper for the WINGs library, that can be used to write python
|
||||
based programs with WINGs-based graphic interfaces.
|
||||
|
||||
This module in not built by default. To build it you need python2.1 or later
|
||||
and swig-1.3.14 or later.
|
||||
|
||||
To build it, first compile and install WINGs. after that run 'make' in this
|
||||
directory. 'make install' will install the python module into the python tree.
|
||||
|
||||
run test.py or WINGs.py for an example.
|
||||
|
||||
the code is not finished yet and may fail to work as expected in some cases.
|
||||
|
||||
Note: currently the module expects WINGs installed to build. it won't take
|
||||
the WINGs libraries and header files from the source tree. You need to
|
||||
install WINGs first. Even if an old version of WINGs is already installed,
|
||||
you still need to install the newly built WINGs, else the python module will
|
||||
be built against the old version.
|
||||
|
||||
699
WINGs/python/WINGs.i
Normal file
699
WINGs/python/WINGs.i
Normal file
@@ -0,0 +1,699 @@
|
||||
%module wings
|
||||
%{
|
||||
#include "WINGs/WINGsP.h"
|
||||
%}
|
||||
|
||||
%include typemaps.i
|
||||
|
||||
// This tells SWIG to treat char ** as a special case
|
||||
%typemap(python, in) char ** {
|
||||
/* Check if is a list */
|
||||
if (PyList_Check($input)) {
|
||||
int size = PyList_Size($input);
|
||||
int i = 0;
|
||||
$1 = (char **) wmalloc((size+1)*sizeof(char *));
|
||||
for (i = 0; i < size; i++) {
|
||||
PyObject *o = PyList_GetItem($input, i);
|
||||
if (PyString_Check(o))
|
||||
$1[i] = PyString_AsString(PyList_GetItem($input, i));
|
||||
else {
|
||||
PyErr_SetString(PyExc_TypeError, "list must contain strings");
|
||||
wfree($1);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
$1[i] = 0;
|
||||
} else {
|
||||
PyErr_SetString(PyExc_TypeError, "not a list");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
// This cleans up the char ** array we malloc-ed before the function call
|
||||
%typemap(python, freearg) char ** {
|
||||
wfree($1);
|
||||
}
|
||||
// This allows a C function to return a char ** as a Python list
|
||||
%typemap(python, out) char ** {
|
||||
int len,i;
|
||||
len = 0;
|
||||
while ($1[len]) len++;
|
||||
$result = PyList_New(len);
|
||||
for (i = 0; i < len; i++) {
|
||||
PyList_SetItem($result, i, PyString_FromString($1[i]));
|
||||
}
|
||||
}
|
||||
|
||||
// Now for some callbacks
|
||||
%typemap(python, in) PyObject *pyacArgs {
|
||||
if (PyTuple_Check($input)) {
|
||||
if (PyTuple_Size($input) != 3) {
|
||||
PyErr_SetString(PyExc_ValueError,
|
||||
"wrong number of parameters in tuple. should be 3.");
|
||||
return NULL;
|
||||
} else {
|
||||
PyObject *func = PyTuple_GetItem($input, 1);
|
||||
if (func!=Py_None && !PyCallable_Check(func)) {
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"'action' needs to be a callable object!");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
PyErr_SetString(PyExc_TypeError, "2nd argument not a tuple!");
|
||||
return NULL;
|
||||
}
|
||||
$1 = $input;
|
||||
}
|
||||
|
||||
%typemap(python, in) PyObject *pycArgs {
|
||||
if (PyTuple_Check($input)) {
|
||||
if (PyTuple_Size($input) != 2) {
|
||||
PyErr_SetString(PyExc_ValueError,
|
||||
"wrong number of parameters in tuple. should be 2.");
|
||||
return NULL;
|
||||
} else {
|
||||
PyObject *func = PyTuple_GetItem($input, 0);
|
||||
if (func!=Py_None && !PyCallable_Check(func)) {
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"'action' needs to be a callable object!");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
PyErr_SetString(PyExc_TypeError, "2nd argument not a tuple!");
|
||||
return NULL;
|
||||
}
|
||||
$1 = $input;
|
||||
}
|
||||
|
||||
// Type mapping for grabbing a FILE * from Python
|
||||
%typemap(python, in) FILE * {
|
||||
if (!PyFile_Check($input)) {
|
||||
PyErr_SetString(PyExc_TypeError, "Need a file!");
|
||||
return NULL;
|
||||
}
|
||||
$1 = PyFile_AsFile($input);
|
||||
}
|
||||
|
||||
/* These are for free-ing the return of functions that need to be freed
|
||||
* before returning control to python. */
|
||||
%typemap(python, ret) char* WMGetTextFieldText { wfree($1); };
|
||||
|
||||
|
||||
%include exception.i
|
||||
|
||||
%exception pyWMScreenMainLoop {
|
||||
$function
|
||||
if (PyErr_Occurred())
|
||||
return NULL;
|
||||
}
|
||||
|
||||
%exception pyWMRunModalLoop {
|
||||
$function
|
||||
if (PyErr_Occurred())
|
||||
return NULL;
|
||||
}
|
||||
|
||||
%{
|
||||
static int mainLoopDone = 0;
|
||||
%}
|
||||
|
||||
|
||||
%inline %{
|
||||
WMScreen *pyWMOpenScreen(const char *display, int simpleapp)
|
||||
{
|
||||
Display *dpy = XOpenDisplay(display);
|
||||
|
||||
if (!dpy) {
|
||||
wwarning("WINGs: could not open display %s", XDisplayName(display));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (simpleapp) {
|
||||
return WMCreateSimpleApplicationScreen(dpy);
|
||||
} else {
|
||||
return WMCreateScreen(dpy, DefaultScreen(dpy));
|
||||
}
|
||||
}
|
||||
|
||||
void pyWMScreenMainLoop(WMScreen *scr)
|
||||
{
|
||||
XEvent event;
|
||||
|
||||
while (!PyErr_Occurred() && !mainLoopDone) {
|
||||
WMNextEvent(((W_Screen*)scr)->display, &event);
|
||||
WMHandleEvent(&event);
|
||||
}
|
||||
}
|
||||
|
||||
void pyWMBreakScreenMainLoop(WMScreen *scr)
|
||||
{
|
||||
mainLoopDone = 1;
|
||||
}
|
||||
|
||||
void pyWMRunModalLoop(WMScreen *scr, WMView *view)
|
||||
{
|
||||
int oldModalLoop = scr->modalLoop;
|
||||
WMView *oldModalView = scr->modalView;
|
||||
|
||||
scr->modalView = view;
|
||||
|
||||
scr->modalLoop = 1;
|
||||
while (!PyErr_Occurred() && scr->modalLoop) {
|
||||
XEvent event;
|
||||
|
||||
WMNextEvent(scr->display, &event);
|
||||
WMHandleEvent(&event);
|
||||
}
|
||||
|
||||
scr->modalView = oldModalView;
|
||||
scr->modalLoop = oldModalLoop;
|
||||
}
|
||||
%}
|
||||
|
||||
|
||||
//%rename WMScreenMainLoop _WMScreenMainLoop;
|
||||
//%rename(_WMScreenMainLoop) WMScreenMainLoop;
|
||||
//%rename WMRunModalLoop _WMRunModalLoop;
|
||||
|
||||
|
||||
%{
|
||||
/* These functions match the prototypes of the normal C callback
|
||||
* functions. However, we use the clientdata pointer for holding a
|
||||
* reference to a Python tuple containing (object, funct, clientData).
|
||||
*/
|
||||
static void PythonWMActionCallback(WMWidget *widget, void *cdata)
|
||||
{
|
||||
PyObject *pyobj, *func, *pydata, *arglist, *tuple, *result;
|
||||
|
||||
tuple = (PyObject*) cdata;
|
||||
pyobj = PyTuple_GetItem(tuple, 0);
|
||||
func = PyTuple_GetItem(tuple, 1);
|
||||
if (func && func!=Py_None) {
|
||||
pydata = PyTuple_GetItem(tuple, 2);
|
||||
arglist = Py_BuildValue("(OO)", pyobj, pydata);
|
||||
result = PyEval_CallObject(func, arglist);
|
||||
Py_DECREF(arglist);
|
||||
Py_XDECREF(result);
|
||||
}
|
||||
}
|
||||
|
||||
static void PythonWMCallback(void *data)
|
||||
{
|
||||
PyObject *func, *pydata, *arglist, *tuple, *result;
|
||||
|
||||
tuple = (PyObject*) data;
|
||||
func = PyTuple_GetItem(tuple, 0);
|
||||
if (func && func!=Py_None) {
|
||||
pydata = PyTuple_GetItem(tuple, 1);
|
||||
arglist = Py_BuildValue("(O)", pydata);
|
||||
result = PyEval_CallObject(func, arglist);
|
||||
Py_DECREF(arglist);
|
||||
Py_XDECREF(result);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
pyTextFieldDidBeginEditing(WMTextFieldDelegate *self, WMNotification *notif)
|
||||
{
|
||||
PyObject *pyobj, *delegate, *func, *pydata, *arglist, *tuple, *result;
|
||||
int action;
|
||||
|
||||
tuple = (PyObject*) self->data;
|
||||
pyobj = PyTuple_GetItem(tuple, 0);
|
||||
delegate = PyTuple_GetItem(tuple, 1);
|
||||
if (delegate != Py_None) {
|
||||
// should we call PyObject_HasAttrString()?? rather not and let
|
||||
// python raise an exception because the object doesn't has the
|
||||
// attribute
|
||||
func = PyObject_GetAttrString(delegate, "didBeginEditing");
|
||||
if (func!=NULL && func!=Py_None) {
|
||||
pydata = PyObject_GetAttrString(delegate, "data");
|
||||
if (!pydata) {
|
||||
Py_INCREF(Py_None);
|
||||
pydata = Py_None;
|
||||
}
|
||||
action = (int)WMGetNotificationClientData(notif);
|
||||
arglist = Py_BuildValue("(OOi)", pyobj, pydata, action);
|
||||
result = PyEval_CallObject(func, arglist);
|
||||
Py_DECREF(pydata);
|
||||
Py_DECREF(arglist);
|
||||
Py_XDECREF(result);
|
||||
}
|
||||
Py_XDECREF(func);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
pyTextFieldDidChange(WMTextFieldDelegate *self, WMNotification *notif)
|
||||
{
|
||||
PyObject *pyobj, *delegate, *func, *pydata, *arglist, *tuple, *result;
|
||||
int action;
|
||||
|
||||
tuple = (PyObject*) self->data;
|
||||
pyobj = PyTuple_GetItem(tuple, 0);
|
||||
delegate = PyTuple_GetItem(tuple, 1);
|
||||
if (delegate != Py_None) {
|
||||
func = PyObject_GetAttrString(delegate, "didChange");
|
||||
if (func!=NULL && func!=Py_None) {
|
||||
pydata = PyObject_GetAttrString(delegate, "data");
|
||||
if (!pydata) {
|
||||
Py_INCREF(Py_None);
|
||||
pydata = Py_None;
|
||||
}
|
||||
action = (int)WMGetNotificationClientData(notif);
|
||||
arglist = Py_BuildValue("(OOi)", pyobj, pydata, action);
|
||||
result = PyEval_CallObject(func, arglist);
|
||||
Py_DECREF(pydata);
|
||||
Py_DECREF(arglist);
|
||||
Py_XDECREF(result);
|
||||
}
|
||||
Py_XDECREF(func);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
pyTextFieldDidEndEditing(WMTextFieldDelegate *self, WMNotification *notif)
|
||||
{
|
||||
PyObject *pyobj, *delegate, *func, *pydata, *arglist, *tuple, *result;
|
||||
int action;
|
||||
|
||||
tuple = (PyObject*) self->data;
|
||||
pyobj = PyTuple_GetItem(tuple, 0);
|
||||
delegate = PyTuple_GetItem(tuple, 1);
|
||||
if (delegate != Py_None) {
|
||||
func = PyObject_GetAttrString(delegate, "didEndEditing");
|
||||
if (func!=NULL && func!=Py_None) {
|
||||
pydata = PyObject_GetAttrString(delegate, "data");
|
||||
if (!pydata) {
|
||||
Py_INCREF(Py_None);
|
||||
pydata = Py_None;
|
||||
}
|
||||
action = (int)WMGetNotificationClientData(notif);
|
||||
arglist = Py_BuildValue("(OOi)", pyobj, pydata, action);
|
||||
result = PyEval_CallObject(func, arglist);
|
||||
Py_DECREF(pydata);
|
||||
Py_DECREF(arglist);
|
||||
Py_XDECREF(result);
|
||||
}
|
||||
Py_XDECREF(func);
|
||||
}
|
||||
}
|
||||
|
||||
static Bool
|
||||
pyTextFieldShouldBeginEditing(WMTextFieldDelegate *self, WMTextField *tPtr)
|
||||
{
|
||||
PyObject *pyobj, *delegate, *func, *pydata, *arglist, *tuple, *result;
|
||||
Bool retval = False;
|
||||
|
||||
tuple = (PyObject*) self->data;
|
||||
pyobj = PyTuple_GetItem(tuple, 0);
|
||||
delegate = PyTuple_GetItem(tuple, 1);
|
||||
if (delegate != Py_None) {
|
||||
func = PyObject_GetAttrString(delegate, "shouldBeginEditing");
|
||||
if (func!=NULL && func!=Py_None) {
|
||||
pydata = PyObject_GetAttrString(delegate, "data");
|
||||
if (!pydata) {
|
||||
Py_INCREF(Py_None);
|
||||
pydata = Py_None;
|
||||
}
|
||||
arglist = Py_BuildValue("(OO)", pyobj, pydata);
|
||||
result = PyEval_CallObject(func, arglist);
|
||||
if (result!=Py_None && PyInt_AsLong(result)!=0) {
|
||||
retval = True;
|
||||
}
|
||||
Py_DECREF(pydata);
|
||||
Py_DECREF(arglist);
|
||||
Py_XDECREF(result);
|
||||
}
|
||||
Py_XDECREF(func);
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
static Bool
|
||||
pyTextFieldShouldEndEditing(WMTextFieldDelegate *self, WMTextField *tPtr)
|
||||
{
|
||||
PyObject *pyobj, *delegate, *func, *pydata, *arglist, *tuple, *result;
|
||||
Bool retval = False;
|
||||
|
||||
tuple = (PyObject*) self->data;
|
||||
pyobj = PyTuple_GetItem(tuple, 0);
|
||||
delegate = PyTuple_GetItem(tuple, 1);
|
||||
if (delegate != Py_None) {
|
||||
func = PyObject_GetAttrString(delegate, "shouldEndEditing");
|
||||
if (func!=NULL && func!=Py_None) {
|
||||
pydata = PyObject_GetAttrString(delegate, "data");
|
||||
if (!pydata) {
|
||||
Py_INCREF(Py_None);
|
||||
pydata = Py_None;
|
||||
}
|
||||
arglist = Py_BuildValue("(OO)", pyobj, pydata);
|
||||
result = PyEval_CallObject(func, arglist);
|
||||
if (result!=Py_None && PyInt_AsLong(result)!=0) {
|
||||
retval = True;
|
||||
}
|
||||
Py_DECREF(pydata);
|
||||
Py_DECREF(arglist);
|
||||
Py_XDECREF(result);
|
||||
}
|
||||
Py_XDECREF(func);
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
%}
|
||||
|
||||
%inline %{
|
||||
void pyWMSetWindowCloseAction(WMWindow *win, PyObject *pyacArgs) {
|
||||
WMSetWindowCloseAction(win, PythonWMActionCallback, (void*)pyacArgs);
|
||||
Py_INCREF(pyacArgs);
|
||||
}
|
||||
|
||||
void pyWMSetButtonAction(WMButton *bPtr, PyObject *pyacArgs) {
|
||||
WMSetButtonAction(bPtr, PythonWMActionCallback, (void*)pyacArgs);
|
||||
Py_INCREF(pyacArgs);
|
||||
}
|
||||
|
||||
void pyWMSetScrollerAction(WMScroller *sPtr, PyObject *pyacArgs) {
|
||||
WMSetScrollerAction(sPtr, PythonWMActionCallback, (void*)pyacArgs);
|
||||
Py_INCREF(pyacArgs);
|
||||
}
|
||||
|
||||
void pyWMSetListAction(WMList *lPtr, PyObject *pyacArgs) {
|
||||
WMSetListAction(lPtr, PythonWMActionCallback, (void*)pyacArgs);
|
||||
Py_INCREF(pyacArgs);
|
||||
}
|
||||
|
||||
void pyWMSetListDoubleAction(WMList *lPtr, PyObject *pyacArgs) {
|
||||
WMSetListDoubleAction(lPtr, PythonWMActionCallback, (void*)pyacArgs);
|
||||
Py_INCREF(pyacArgs);
|
||||
}
|
||||
|
||||
void pyWMSetBrowserAction(WMBrowser *bPtr, PyObject *pyacArgs) {
|
||||
WMSetBrowserAction(bPtr, PythonWMActionCallback, (void*)pyacArgs);
|
||||
Py_INCREF(pyacArgs);
|
||||
}
|
||||
|
||||
void pyWMSetBrowserDoubleAction(WMBrowser *bPtr, PyObject *pyacArgs) {
|
||||
WMSetBrowserDoubleAction(bPtr, PythonWMActionCallback, (void*)pyacArgs);
|
||||
Py_INCREF(pyacArgs);
|
||||
}
|
||||
|
||||
void pyWMSetMenuItemAction(WMMenuItem *miPtr, PyObject *pyacArgs) {
|
||||
WMSetMenuItemAction(miPtr, PythonWMActionCallback, (void*)pyacArgs);
|
||||
Py_INCREF(pyacArgs);
|
||||
}
|
||||
|
||||
void pyWMSetPopUpButtonAction(WMPopUpButton *pPtr, PyObject *pyacArgs) {
|
||||
WMSetPopUpButtonAction(pPtr, PythonWMActionCallback, (void*)pyacArgs);
|
||||
Py_INCREF(pyacArgs);
|
||||
}
|
||||
|
||||
void pyWMSetSliderAction(WMSlider *sPtr, PyObject *pyacArgs) {
|
||||
WMSetSliderAction(sPtr, PythonWMActionCallback, (void*)pyacArgs);
|
||||
Py_INCREF(pyacArgs);
|
||||
}
|
||||
|
||||
void pyWMSetRulerMoveAction(WMRuler *rPtr, PyObject *pyacArgs) {
|
||||
WMSetRulerMoveAction(rPtr, PythonWMActionCallback, (void*)pyacArgs);
|
||||
Py_INCREF(pyacArgs);
|
||||
}
|
||||
|
||||
void pyWMSetRulerReleaseAction(WMRuler *rPtr, PyObject *pyacArgs) {
|
||||
WMSetRulerReleaseAction(rPtr, PythonWMActionCallback, (void*)pyacArgs);
|
||||
Py_INCREF(pyacArgs);
|
||||
}
|
||||
|
||||
void pyWMSetColorPanelAction(WMColorPanel *panel, PyObject *pyacArgs) {
|
||||
WMSetColorPanelAction(panel, (WMAction2*)PythonWMActionCallback, (void*)pyacArgs);
|
||||
Py_INCREF(pyacArgs);
|
||||
}
|
||||
|
||||
void* pyWMAddTimerHandler(int miliseconds, PyObject *pycArgs) {
|
||||
Py_INCREF(pycArgs);
|
||||
return (void*)WMAddTimerHandler(miliseconds, PythonWMCallback,
|
||||
(void*)pycArgs);
|
||||
}
|
||||
|
||||
void* pyWMAddPersistentTimerHandler(int miliseconds, PyObject *pycArgs) {
|
||||
Py_INCREF(pycArgs);
|
||||
return (void*)WMAddPersistentTimerHandler(miliseconds, PythonWMCallback,
|
||||
(void*)pycArgs);
|
||||
}
|
||||
|
||||
/* this doesn't work. we pass (func, data) as cdata at creation time, but
|
||||
* only data at destruction, so it won't find it unless we change
|
||||
* WMDeleteTimerWithClientData() to extract data from the tuple, and this
|
||||
* requires access to the internals of WINGs
|
||||
void pyWMDeleteTimerWithClientData(PyObject *pycData) {
|
||||
WMDeleteTimerWithClientData((void*)pycData);
|
||||
}*/
|
||||
|
||||
void pyWMDeleteTimerHandler(void *handlerID) {
|
||||
WMDeleteTimerHandler((WMHandlerID)handlerID);
|
||||
}
|
||||
|
||||
void* pyWMAddIdleHandler(PyObject *pycArgs) {
|
||||
Py_INCREF(pycArgs);
|
||||
return (void*)WMAddIdleHandler(PythonWMCallback, (void*)pycArgs);
|
||||
}
|
||||
|
||||
void pyWMDeleteIdleHandler(void *handlerID) {
|
||||
WMDeleteIdleHandler((WMHandlerID)handlerID);
|
||||
}
|
||||
|
||||
%}
|
||||
|
||||
|
||||
%exception pyWMSetTextFieldDelegate {
|
||||
$function
|
||||
if (PyErr_Occurred()) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
%inline %{
|
||||
void pyWMSetTextFieldDelegate(WMTextField *tPtr, PyObject *txtArgs) {
|
||||
WMTextFieldDelegate *td;
|
||||
|
||||
if (!txtArgs || !PyTuple_Check(txtArgs) || PyTuple_Size(txtArgs)!=2) {
|
||||
PyErr_SetString(PyExc_TypeError, "invalid setting of WMTextField "
|
||||
"delegate. Should be '(self, delegate)'");
|
||||
return;
|
||||
}
|
||||
// how do I check if txtArgs[1] is an instance of WMTextFieldDelegate?
|
||||
td = WMGetTextFieldDelegate(tPtr);
|
||||
if (!td) {
|
||||
td = (WMTextFieldDelegate*)wmalloc(sizeof(WMTextFieldDelegate));
|
||||
td->didBeginEditing = pyTextFieldDidBeginEditing;
|
||||
td->didChange = pyTextFieldDidChange;
|
||||
td->didEndEditing = pyTextFieldDidEndEditing;
|
||||
td->shouldBeginEditing = pyTextFieldShouldBeginEditing;
|
||||
td->shouldEndEditing = pyTextFieldShouldEndEditing;
|
||||
} else {
|
||||
Py_XDECREF((PyObject*)td->data);
|
||||
}
|
||||
Py_INCREF(txtArgs);
|
||||
td->data = txtArgs;
|
||||
WMSetTextFieldDelegate(tPtr, td);
|
||||
}
|
||||
%}
|
||||
|
||||
|
||||
%inline %{
|
||||
PyObject* pyWMGetTextFieldDelegate(WMTextField *tPtr) {
|
||||
WMTextFieldDelegate *td;
|
||||
PyObject *result, *tuple;
|
||||
|
||||
td = WMGetTextFieldDelegate(tPtr);
|
||||
if (!td) {
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
}
|
||||
|
||||
tuple = (PyObject*)td->data;
|
||||
if (!tuple || !PyTuple_Check(tuple) || PyTuple_Size(tuple)!=2) {
|
||||
PyErr_SetString(PyExc_TypeError, "invalid TextField delegate");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
result = PyTuple_GetItem(tuple, 1);
|
||||
if (!result)
|
||||
result = Py_None;
|
||||
|
||||
Py_INCREF(result);
|
||||
|
||||
return result;
|
||||
}
|
||||
%}
|
||||
|
||||
|
||||
/* ignore structures we will not use */
|
||||
%ignore ConnectionDelegate;
|
||||
|
||||
/* ignore functions we don't need */
|
||||
// should we ignore vararg functions, or just convert them to functions with
|
||||
// a fixed number of parameters?
|
||||
%varargs(char*) wmessage;
|
||||
//%ignore wmessage;
|
||||
%ignore wwarning;
|
||||
%ignore wfatal;
|
||||
%ignore wsyserror;
|
||||
%ignore wsyserrorwithcode;
|
||||
%ignore WMCreatePLArray;
|
||||
%ignore WMCreatePLDictionary;
|
||||
|
||||
%apply int *INPUT { int *argc };
|
||||
|
||||
#define Bool int
|
||||
|
||||
%include "WINGs/WUtil.h"
|
||||
|
||||
/* ignore structures we will not use */
|
||||
|
||||
/* ignore functions we don't need */
|
||||
|
||||
%include "WINGs/WINGs.h"
|
||||
|
||||
|
||||
%{
|
||||
void
|
||||
WHandleEvents()
|
||||
{
|
||||
/* Check any expired timers */
|
||||
W_CheckTimerHandlers();
|
||||
|
||||
/* Do idle and timer stuff while there are no input events */
|
||||
/* Do not wait for input here. just peek to se if input is available */
|
||||
while (!W_HandleInputEvents(False, -1) && W_CheckIdleHandlers()) {
|
||||
/* dispatch timer events */
|
||||
W_CheckTimerHandlers();
|
||||
}
|
||||
|
||||
W_HandleInputEvents(True, -1);
|
||||
|
||||
/* Check any expired timers */
|
||||
W_CheckTimerHandlers();
|
||||
}
|
||||
%}
|
||||
|
||||
|
||||
/* rewrite functions originally defined as macros */
|
||||
%inline %{
|
||||
#undef WMDuplicateArray
|
||||
WMArray* WMDuplicateArray(WMArray* array) {
|
||||
return WMCreateArrayWithArray(array);
|
||||
}
|
||||
|
||||
#undef WMPushInArray
|
||||
void WMPushInArray(WMArray *array, void *item) {
|
||||
WMAddToArray(array, item);
|
||||
}
|
||||
|
||||
#undef WMSetInArray
|
||||
void* WMSetInArray(WMArray *array, int index, void *item) {
|
||||
return WMReplaceInArray(array, index, item);
|
||||
}
|
||||
|
||||
#undef WMRemoveFromArray
|
||||
int WMRemoveFromArray(WMArray *array, void *item) {
|
||||
return WMRemoveFromArrayMatching(array, NULL, item);
|
||||
}
|
||||
|
||||
#undef WMGetFirstInArray
|
||||
int WMGetFirstInArray(WMArray *array, void *item) {
|
||||
return WMFindInArray(array, NULL, item);
|
||||
}
|
||||
|
||||
#undef WMCreateBag
|
||||
WMBag* WMCreateBag(int size) {
|
||||
return WMCreateTreeBag();
|
||||
}
|
||||
|
||||
#undef WMCreateBagWithDestructor
|
||||
WMBag* WMCreateBagWithDestructor(int size, WMFreeDataProc *destructor) {
|
||||
return WMCreateTreeBagWithDestructor(destructor);
|
||||
}
|
||||
|
||||
#undef WMSetInBag
|
||||
void* WMSetInBag(WMBag *bag, int index, void *item) {
|
||||
return WMReplaceInBag(bag, index, item);
|
||||
}
|
||||
|
||||
#undef WMAddItemToTree
|
||||
WMTreeNode* WMAddItemToTree(WMTreeNode *parent, void *item) {
|
||||
return WMInsertItemInTree(parent, -1, item);
|
||||
}
|
||||
|
||||
#undef WMAddNodeToTree
|
||||
WMTreeNode* WMAddNodeToTree(WMTreeNode *parent, WMTreeNode *aNode) {
|
||||
return WMInsertNodeInTree(parent, -1, aNode);
|
||||
}
|
||||
|
||||
#undef WMGetFirstInTree
|
||||
/* Returns first tree node that has data == cdata */
|
||||
WMTreeNode* WMGetFirstInTree(WMTreeNode *aTree, void *cdata) {
|
||||
return WMFindInTree(aTree, NULL, cdata);
|
||||
}
|
||||
|
||||
#undef WMFlushConnection
|
||||
int WMFlushConnection(WMConnection *cPtr) {
|
||||
return WMSendConnectionData(cPtr, NULL);
|
||||
}
|
||||
|
||||
#undef WMGetConnectionQueuedData
|
||||
WMArray* WMGetConnectionQueuedData(WMConnection *cPtr) {
|
||||
return WMGetConnectionUnsentData(cPtr);
|
||||
}
|
||||
|
||||
#undef WMWidgetClass
|
||||
W_Class WMWidgetClass(WMWidget *widget) {
|
||||
return (((W_WidgetType*)(widget))->widgetClass);
|
||||
}
|
||||
|
||||
#undef WMWidgetView
|
||||
WMView* WMWidgetView(WMWidget *widget) {
|
||||
return (((W_WidgetType*)(widget))->view);
|
||||
}
|
||||
|
||||
#undef WMCreateCommandButton
|
||||
WMButton* WMCreateCommandButton(WMWidget *parent) {
|
||||
return WMCreateCustomButton(parent, WBBSpringLoadedMask|WBBPushInMask
|
||||
|WBBPushLightMask|WBBPushChangeMask);
|
||||
}
|
||||
|
||||
#undef WMCreateRadioButton
|
||||
WMButton* WMCreateRadioButton(WMWidget *parent) {
|
||||
return WMCreateButton(parent, WBTRadio);
|
||||
}
|
||||
|
||||
#undef WMCreateSwitchButton
|
||||
WMButton* WMCreateSwitchButton(WMWidget *parent) {
|
||||
return WMCreateButton(parent, WBTSwitch);
|
||||
}
|
||||
|
||||
#undef WMAddListItem
|
||||
WMListItem* WMAddListItem(WMList *lPtr, char *text)
|
||||
{
|
||||
return WMInsertListItem(lPtr, -1, text);
|
||||
}
|
||||
|
||||
#undef WMCreateText
|
||||
WMText* WMCreateText(WMWidget *parent) {
|
||||
return WMCreateTextForDocumentType(parent, NULL, NULL);
|
||||
}
|
||||
|
||||
#undef WMRefreshText
|
||||
void WMRefreshText(WMText *tPtr) {
|
||||
return WMThawText(tPtr);
|
||||
}
|
||||
|
||||
#undef WMClearText
|
||||
void WMClearText(WMText *tPtr) {
|
||||
return WMAppendTextStream(tPtr, NULL);
|
||||
}
|
||||
%}
|
||||
|
||||
|
||||
643
WINGs/python/WINGs.py
Normal file
643
WINGs/python/WINGs.py
Normal file
@@ -0,0 +1,643 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
import wings
|
||||
|
||||
# Some useful constants
|
||||
|
||||
False = 0
|
||||
True = 1
|
||||
|
||||
# check about None as action for buttonAction/windowCloseAction ...
|
||||
|
||||
################################################################################
|
||||
# Exceptions
|
||||
################################################################################
|
||||
from exceptions import Exception, StandardError
|
||||
|
||||
class Error(StandardError):
|
||||
pass
|
||||
|
||||
del Exception, StandardError
|
||||
|
||||
class WMTimer:
|
||||
def __init__(self, milliseconds, callback, cdata=None, persistent=False):
|
||||
if persistent:
|
||||
self._o = wings.pyWMAddPersistentTimerHandler(milliseconds, (callback, cdata))
|
||||
else:
|
||||
self._o = wings.pyWMAddTimerHandler(milliseconds, (callback, cdata))
|
||||
self.__WMDeleteTimerHandler = wings.pyWMDeleteTimerHandler
|
||||
|
||||
def __del__(self):
|
||||
self.__WMDeleteTimerHandler(self._o)
|
||||
|
||||
|
||||
class WMPersistentTimer(WMTimer):
|
||||
def __init__(self, milliseconds, callback, cdata=None):
|
||||
WMTimer.__init__(self, milliseconds, callback, cdata, persistent=True)
|
||||
|
||||
|
||||
class WMScreen:
|
||||
__readonly = ('display', 'width', 'height', 'depth')
|
||||
|
||||
def __init__(self, appname, display="", simpleapp=False):
|
||||
wings.WMInitializeApplication(appname, len(sys.argv), sys.argv)
|
||||
self._o = wings.pyWMOpenScreen(display, simpleapp)
|
||||
if not self._o:
|
||||
raise Error, "Cannot open display %s" % display
|
||||
self.__dict__['display'] = wings.WMScreenDisplay(self._o)
|
||||
self.__dict__['width'] = wings.WMScreenWidth(self._o)
|
||||
self.__dict__['height'] = wings.WMScreenHeight(self._o)
|
||||
self.__dict__['depth'] = wings.WMScreenDepth(self._o)
|
||||
|
||||
def __setattr__(self, name ,value):
|
||||
if name in self.__readonly:
|
||||
#raise AttributeError, "'%s' is a read-only WMScreen attribute" % name
|
||||
raise Error, "'%s' is a read-only WMScreen attribute" % name
|
||||
self.__dict__[name] = value
|
||||
|
||||
def __delattr__(self, name):
|
||||
if name in self.__readonly:
|
||||
#raise AttributeError, "'%s' attribute cannot be deleted from WMScreen instance" % name
|
||||
raise Error, "'%s' attribute cannot be deleted from WMScreen instance" % name
|
||||
try:
|
||||
del(self.__dict__[name])
|
||||
except KeyError:
|
||||
raise AttributeError, "%s instance has no attribute '%s'" % \
|
||||
(self.__class__.__name__, name)
|
||||
|
||||
def mainLoop(self):
|
||||
wings.pyWMScreenMainLoop(self._o)
|
||||
|
||||
def breakMainLoop(self):
|
||||
wings.pyWMBreakScreenMainLoop(self._o)
|
||||
|
||||
def runModalLoop(self, view):
|
||||
wings.pyWMRunModalLoop(self._o, view)
|
||||
|
||||
def breakModalLoop(self):
|
||||
wings.WMBreakModalLoop(self._o)
|
||||
|
||||
def size(self):
|
||||
return (self.width, self.height)
|
||||
|
||||
|
||||
class WMView:
|
||||
pass
|
||||
|
||||
|
||||
class WMWidget(WMView):
|
||||
def __init__(self):
|
||||
if self.__class__ == WMWidget:
|
||||
raise Error, "a WMWidget can't be instantiated directly"
|
||||
self._o = None
|
||||
self.__WMDestroyWidget = wings.WMDestroyWidget
|
||||
|
||||
def __del__(self):
|
||||
if self._o is not None:
|
||||
self.__WMDestroyWidget(self._o)
|
||||
|
||||
def resize(self, width, height):
|
||||
wings.WMResizeWidget(self._o, width, height)
|
||||
|
||||
def move(self, x, y):
|
||||
wings.WMMoveWidget(self._o, x, y)
|
||||
|
||||
def realize(self):
|
||||
wings.WMRealizeWidget(self._o)
|
||||
|
||||
def show(self):
|
||||
wings.WMMapWidget(self._o)
|
||||
|
||||
def hide(self):
|
||||
wings.WMUnmapWidget(self._o)
|
||||
|
||||
def redisplay(self):
|
||||
wings.WMRedisplayWidget(self._o)
|
||||
|
||||
def width(self):
|
||||
return wings.WMWidgetWidth(self._o)
|
||||
|
||||
def height(self):
|
||||
return wings.WMWidgetHeight(self._o)
|
||||
|
||||
def screen(self):
|
||||
return wings.WMWidgetScreen(self._o)
|
||||
|
||||
def view(self):
|
||||
return wings.WMWidgetView(self._o)
|
||||
|
||||
def setFocusTo(self, other):
|
||||
wings.WMSetFocusToWidget(other._o)
|
||||
|
||||
|
||||
class WMWindow(WMWidget):
|
||||
def __init__(self, screen, name, style=wings.WMTitledWindowMask
|
||||
|wings.WMClosableWindowMask|wings.WMMiniaturizableWindowMask
|
||||
|wings.WMResizableWindowMask):
|
||||
WMWidget.__init__(self)
|
||||
self._o = wings.WMCreateWindowWithStyle(screen._o, name, style)
|
||||
|
||||
def setMinSize(self, minWidth, minHeight):
|
||||
wings.WMSetWindowMinSize(self._o, minWidth, minHeight)
|
||||
|
||||
def setMaxSize(self, maxWidth, maxHeight):
|
||||
wings.WMSetWindowMaxSize(self._o, maxWidth, maxHeight)
|
||||
|
||||
def setInitialPosition(self, x, y):
|
||||
wings.WMSetWindowInitialPosition(self._o, x, y)
|
||||
|
||||
def setTitle(self, title):
|
||||
wings.WMSetWindowTitle(self._o, title)
|
||||
|
||||
def setCloseAction(self, action, data=None):
|
||||
if action!=None and (not callable(action)):
|
||||
raise Error, "action needs to be a callable object or None"
|
||||
wings.pyWMSetWindowCloseAction(self._o, (self, action, data))
|
||||
|
||||
|
||||
class WMPanel(WMWindow):
|
||||
def __init__(self, owner, name, style=wings.WMTitledWindowMask
|
||||
|wings.WMClosableWindowMask|wings.WMResizableWindowMask):
|
||||
WMWidget.__init__(self)
|
||||
self._o = wings.WMCreatePanelWithStyleForWindow(owner._o, name, style)
|
||||
|
||||
class WMFrame(WMWidget):
|
||||
def __init__(self, parent, title=None):
|
||||
WMWidget.__init__(self)
|
||||
self._o = wings.WMCreateFrame(parent._o)
|
||||
self.setTitle(title)
|
||||
|
||||
def setRelief(self, relief):
|
||||
wings.WMSetFrameRelief(self._o, relief)
|
||||
|
||||
def setTitle(self, title=""):
|
||||
wings.WMSetFrameTitle(self._o, title)
|
||||
|
||||
def setTitlePosition(self, position):
|
||||
wings.WMSetFrameTitlePosition(self._o, position)
|
||||
|
||||
class WMLabel(WMWidget):
|
||||
def __init__(self, parent, text=None):
|
||||
WMWidget.__init__(self)
|
||||
self._o = wings.WMCreateLabel(parent._o)
|
||||
self.setText(text)
|
||||
|
||||
def setWraps(self, flag):
|
||||
# bool(flag) for python2.2
|
||||
wings.WMSetLabelWraps(self._o, flag)
|
||||
|
||||
def setRelief(self, relief):
|
||||
wings.WMSetLabelRelief(self._o, relief)
|
||||
|
||||
def setText(self, text=""):
|
||||
wings.WMSetLabelText(self._o, text)
|
||||
|
||||
def setTextColor(self, color):
|
||||
wings.WMSetLabelTextColor(self._o, color)
|
||||
|
||||
def setFont(self, font):
|
||||
wings.WMSetLabelFont(self._o, font)
|
||||
|
||||
def setTextAlignment(self, alignment):
|
||||
wings.WMSetLabelTextAlignment(self._o, alignment)
|
||||
|
||||
def setImage(self, image):
|
||||
wings.WMSetLabelImage(self._o, image)
|
||||
|
||||
def setImagePosition(self, position):
|
||||
wings.WMSetLabelImagePosition(self._o, position)
|
||||
|
||||
def text(self):
|
||||
return wings.WMGetLabelText(self._o)
|
||||
|
||||
def font(self):
|
||||
return wings.WMGetLabelFont(self._o)
|
||||
|
||||
def image(self):
|
||||
return wings.WMGetLabelImage(self._o)
|
||||
|
||||
|
||||
class WMBox(WMWidget):
|
||||
def __init__(self, parent):
|
||||
WMWidget.__init__(self)
|
||||
self._o = wings.WMCreateBox(parent._o)
|
||||
|
||||
def setHorizontal(self, flag):
|
||||
# bool(flag) for python2.2
|
||||
wings.WMSetBoxHorizontal(self._o, flag)
|
||||
|
||||
def setBorderWidth(self, width):
|
||||
wings.WMSetBoxBorderWidth(self._o, width)
|
||||
|
||||
def addSubview(self, view, expand, fill, minSize, maxSize, space):
|
||||
wings.WMAddBoxSubview(self._o, view, expand, fill, minSize, maxSixe, space)
|
||||
|
||||
def addSubviewAtEnd(self, view, expand, fill, minSize, maxSize, space):
|
||||
wings.WMAddBoxSubviewAtEnd(self._o, view, expand, fill, minSize, maxSixe, space)
|
||||
|
||||
def removeSubview(self, view):
|
||||
wings.WMRemoveBoxSubview(self._o, view)
|
||||
|
||||
|
||||
class WMButton(WMWidget): # not for user instantiation
|
||||
def __init__(self, parent):
|
||||
WMWidget.__init__(self)
|
||||
if self.__class__ == WMButton:
|
||||
raise Error, "a WMButton can't be instantiated directly"
|
||||
|
||||
|
||||
def setText(self, text=""):
|
||||
wings.WMSetButtonText(self._o, text)
|
||||
|
||||
def setAction(self, action, data=None):
|
||||
if action!=None and (not callable(action)):
|
||||
raise Error, "action needs to be a callable object or None"
|
||||
wings.pyWMSetButtonAction(self._o, (self, action, data))
|
||||
|
||||
def performClick(self):
|
||||
wings.WMPerformButtonClick(self._o)
|
||||
|
||||
def setEnabled(self, flag):
|
||||
# bool(flag) for python2.2
|
||||
wings.WMSetButtonEnabled(self._o, flag)
|
||||
|
||||
def isEnabled(self):
|
||||
return wings.WMGetButtonEnabled(self._o)
|
||||
|
||||
def setImageDimsWhenDisabled(self, flag):
|
||||
# bool(flag)
|
||||
wings.WMSetButtonImageDimsWhenDisabled(self._o, flag)
|
||||
|
||||
def setImage(self, image):
|
||||
wings.WMSetButtonImage(self_.o, image)
|
||||
|
||||
def setAlternateImage(self, image):
|
||||
wings.WMSetButtonAltImage(self._o, image)
|
||||
|
||||
def setImagePosition(self, position):
|
||||
wings.WMSetButtonImagePosition(self._o, position)
|
||||
|
||||
def setImageDefault(self):
|
||||
wings.WMSetButtonImageDefault(self._o)
|
||||
|
||||
|
||||
class WMCommandButton(WMButton):
|
||||
def __init__(self, parent):
|
||||
WMButton.__init__(self, parent)
|
||||
self._o = wings.WMCreateCommandButton(parent._o)
|
||||
|
||||
|
||||
class WMSwitchButton(WMButton):
|
||||
def __init__(self, parent):
|
||||
WMButton.__init__(self, parent)
|
||||
self._o = wings.WMCreateSwitchButton(parent._o)
|
||||
|
||||
|
||||
class WMRadioButton(WMButton):
|
||||
def __init__(self, parent, group=None):
|
||||
WMButton.__init__(self, parent)
|
||||
self._o = wings.WMCreateRadioButton(parent._o)
|
||||
if group:
|
||||
wings.WMGroupButtons(group._o, self._o)
|
||||
|
||||
|
||||
class WMListItem:
|
||||
pass
|
||||
|
||||
|
||||
class WMList(WMWidget):
|
||||
def __init__(self, parent):
|
||||
WMWidget.__init__(self)
|
||||
self._o = wings.WMCreateList(parent._o)
|
||||
|
||||
def allowEmptySelection(self, flag):
|
||||
# bool(flag)
|
||||
wings.WMSetListAllowEmptySelection(self._o, flag)
|
||||
|
||||
def allowMultipleSelection(self, flag):
|
||||
# bool(flag)
|
||||
wings.WMSetListAllowMultipleSelection(self._o, flag)
|
||||
|
||||
def addItem(self, item):
|
||||
wings.WMAddListItem(self._o, item)
|
||||
|
||||
def insertItem(self, row, item):
|
||||
wings.WMInsertListItem(self._o, row, item)
|
||||
|
||||
def sortItems(self):
|
||||
wings.WMSortListItems(self._o)
|
||||
|
||||
def rowWithTitle(self, title):
|
||||
return wings.WMFindRowOfListItemWithTitle(self._o, title)
|
||||
|
||||
def selectedItemRow(self):
|
||||
return wings.WMGetListSelectedItemRow(self._o)
|
||||
|
||||
def selectedItem(self):
|
||||
return wings.WMGetListSelectedItem(self._o)
|
||||
|
||||
def removeItem(self, index):
|
||||
wings.WMRemoveListItem(self._o, index)
|
||||
|
||||
def selectItem(self, index):
|
||||
wings.WMSelectListItem(self._o, index)
|
||||
|
||||
def unselectItem(self, index):
|
||||
wings.WMUnselectListItem(self._o, index)
|
||||
|
||||
|
||||
class WMTextFieldDelegate:
|
||||
__callbacks = ('didBeginEditing', 'didChange', 'didEndEditing',
|
||||
'shouldBeginEditing', 'shouldEndEditing')
|
||||
|
||||
def __init__(self):
|
||||
self.__dict__['data'] = None
|
||||
self.__dict__['didBeginEditing'] = None
|
||||
self.__dict__['didChange'] = None
|
||||
self.__dict__['didEndEditing'] = None
|
||||
self.__dict__['shouldBeginEditing'] = None
|
||||
self.__dict__['shouldEndEditing'] = None
|
||||
|
||||
def __setattr__(self, name ,value):
|
||||
if name in self.__callbacks and value!=None and (not callable(value)):
|
||||
#raise AttributeError, "%s.%s needs to be a callable object or None" % (self.__class__.__name__, name)
|
||||
raise Error, "%s.%s needs to be a callable object or None" % (self.__class__.__name__, name)
|
||||
else:
|
||||
self.__dict__[name] = value
|
||||
|
||||
|
||||
class WMTextField(WMWidget):
|
||||
def __init__(self, parent, text=""):
|
||||
WMWidget.__init__(self)
|
||||
self._o = wings.WMCreateTextField(parent._o)
|
||||
wings.WMSetTextFieldText(self._o, text)
|
||||
|
||||
def setDelegate(self, delegate):
|
||||
if delegate.__class__ != WMTextFieldDelegate:
|
||||
raise Error, "textfield delegate must be of type 'WMTextFieldDelegate'"
|
||||
wings.pyWMSetTextFieldDelegate(self._o, (self, delegate))
|
||||
|
||||
def delegate(self):
|
||||
return wings.pyWMGetTextFieldDelegate(self._o)
|
||||
|
||||
def text(self):
|
||||
return wings.WMGetTextFieldText(self._o)
|
||||
|
||||
def setEditable(self, flag):
|
||||
# bool(flag)
|
||||
wings.WMSetTextFieldEditable(self._o, flag)
|
||||
|
||||
def setBordered(self, flag):
|
||||
# bool(flag)
|
||||
wings.WMSetTextFieldBordered(self._o, flag)
|
||||
|
||||
def setBeveled(self, flag):
|
||||
# bool(flag)
|
||||
wings.WMSetTextFieldBeveled(self._o, flag)
|
||||
|
||||
def setSecure(self, flag):
|
||||
# bool(flag)
|
||||
wings.WMSetTextFieldSecure(self._o, flag)
|
||||
|
||||
def setCursorPosition(self, position):
|
||||
wings.WMSetTextFieldCursorPosition(self._o, position)
|
||||
|
||||
def setNextText(self, next):
|
||||
wings.WMSetTextFieldNextTextField(self._o, next._o)
|
||||
|
||||
def setPreviousText(self, previous):
|
||||
wings.WMSetTextFieldPrevTextField(self._o, previous._o)
|
||||
|
||||
def setTextAlignment(self, alignment):
|
||||
wings.WMSetTextFieldAlignment(self._o, alignment)
|
||||
|
||||
def isEditable(self):
|
||||
return wings.WMGetTextFieldEditable(self._o)
|
||||
|
||||
def insertText(self, text, position):
|
||||
wings.WMInsertTextFieldText(self._o, text, position)
|
||||
|
||||
def deleteText(self, start, count):
|
||||
wings.WMDeleteTextFieldRange(self._o, wings.wmkrange(start, count))
|
||||
|
||||
def selectText(self, start, count):
|
||||
wings.WMSelectTextFieldRange(self._o, wings.wmkrange(start, count))
|
||||
|
||||
def setFont(self, font):
|
||||
wings.WMSetTextFieldFont(self._o, font)
|
||||
|
||||
def font(self):
|
||||
return wings.WMGetTextFieldFont(self._o)
|
||||
|
||||
|
||||
################################################################################
|
||||
# wrap the WINGs constants so we don't need wings.constant_name
|
||||
################################################################################
|
||||
|
||||
# WMWindow title style
|
||||
WMTitledWindowMask = wings.WMTitledWindowMask
|
||||
WMClosableWindowMask = wings.WMClosableWindowMask
|
||||
WMMiniaturizableWindowMask = wings.WMMiniaturizableWindowMask
|
||||
WMResizableWindowMask = wings.WMResizableWindowMask
|
||||
|
||||
# WMFrame title positions
|
||||
WTPNoTitle = wings.WTPNoTitle
|
||||
WTPAboveTop = wings.WTPAboveTop
|
||||
WTPAtTop = wings.WTPAtTop
|
||||
WTPBelowTop = wings.WTPBelowTop
|
||||
WTPAboveBottom = wings.WTPAboveBottom
|
||||
WTPAtBottom = wings.WTPAtBottom
|
||||
WTPBelowBottom = wings.WTPBelowBottom
|
||||
|
||||
# Alingments
|
||||
WALeft = wings.WALeft
|
||||
WACenter = wings.WACenter
|
||||
WARight = wings.WARight
|
||||
WAJustified = wings.WAJustified # not valid for textfields
|
||||
|
||||
# Image positions
|
||||
WIPNoImage = wings.WIPNoImage
|
||||
WIPImageOnly = wings.WIPImageOnly
|
||||
WIPLeft = wings.WIPLeft
|
||||
WIPRight = wings.WIPRight
|
||||
WIPBelow = wings.WIPBelow
|
||||
WIPAbove = wings.WIPAbove
|
||||
WIPOverlaps = wings.WIPOverlaps
|
||||
|
||||
# Relief types
|
||||
WRFlat = wings.WRFlat
|
||||
WRSimple = wings.WRSimple
|
||||
WRRaised = wings.WRRaised
|
||||
WRSunken = wings.WRSunken
|
||||
WRGroove = wings.WRGroove
|
||||
WRRidge = wings.WRRidge
|
||||
WRPushed = wings.WRPushed
|
||||
|
||||
|
||||
# TextField events
|
||||
WMReturnTextMovement = wings.WMReturnTextMovement
|
||||
WMEscapeTextMovement = wings.WMEscapeTextMovement
|
||||
WMIllegalTextMovement = wings.WMIllegalTextMovement
|
||||
WMTabTextMovement = wings.WMTabTextMovement
|
||||
WMBacktabTextMovement = wings.WMBacktabTextMovement
|
||||
WMLeftTextMovement = wings.WMLeftTextMovement
|
||||
WMRightTextMovement = wings.WMRightTextMovement
|
||||
WMUpTextMovement = wings.WMUpTextMovement
|
||||
WMDownTextMovement = wings.WMDownTextMovement
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
def quit(obj, data):
|
||||
#sys.exit()
|
||||
scr.breakMainLoop()
|
||||
|
||||
def click(btn, list):
|
||||
print win.width(), win.height()
|
||||
print list.selectedItemRow()
|
||||
win2.show()
|
||||
scr.runModalLoop(win2.view())
|
||||
print txt2.text()
|
||||
|
||||
def sayhi(btn, data):
|
||||
print "hi"
|
||||
|
||||
def breakLoop(btn, data):
|
||||
#sys.exit()
|
||||
scr.breakModalLoop()
|
||||
win2.hide()
|
||||
|
||||
def dc(object, data, action):
|
||||
print "didChange:", object, data, action
|
||||
|
||||
def dbe(object, data, action):
|
||||
print "didBeginEditing:", object, data, action
|
||||
|
||||
def dee(object, data, action):
|
||||
if action == wings.WMReturnTextMovement:
|
||||
if object == txt:
|
||||
object.setFocusTo(txt2)
|
||||
else:
|
||||
object.setFocusTo(txt)
|
||||
print "didEndEditing:", object, data, action, object.text()
|
||||
|
||||
def tcb(one):
|
||||
old = list.selectedItemRow()
|
||||
list.selectItem(list.index)
|
||||
list.unselectItem(old)
|
||||
list.index = (list.index+1) % 3
|
||||
#print one
|
||||
|
||||
scr = WMScreen("foobar")
|
||||
win = WMWindow(scr, "aWindow")
|
||||
win.setCloseAction(quit)
|
||||
win.setTitle("test window")
|
||||
win.resize(400, 180)
|
||||
win.setInitialPosition((scr.width-win.width())/2, (scr.height-win.height())/2)
|
||||
|
||||
btn = WMCommandButton(win)
|
||||
btn.setText("Click Me")
|
||||
btn.resize(100, 25)
|
||||
btn.move(20, 20)
|
||||
btn.show()
|
||||
|
||||
sw = WMSwitchButton(win)
|
||||
sw.setText("Some option")
|
||||
sw.resize(100, 25)
|
||||
sw.move(20, 50)
|
||||
sw.show()
|
||||
|
||||
radios = []
|
||||
r = None
|
||||
j = 0
|
||||
for i in ["One", "Two", "Four"]:
|
||||
r = WMRadioButton(win, r)
|
||||
radios.append(r)
|
||||
r.show()
|
||||
r.setText(i)
|
||||
r.move(20, 70+j*25)
|
||||
r.resize(100, 25)
|
||||
j=j+1
|
||||
|
||||
sw.setAction(sayhi)
|
||||
|
||||
list = WMList(win)
|
||||
list.resize(100,100)
|
||||
list.move(130, 20)
|
||||
list.addItem("one")
|
||||
list.addItem("two")
|
||||
list.addItem("three")
|
||||
list.allowMultipleSelection(1)
|
||||
list.show()
|
||||
list.index = 0
|
||||
|
||||
txtdel = WMTextFieldDelegate()
|
||||
txtdel.data = 'mydata'
|
||||
txtdel.didBeginEditing = dbe
|
||||
txtdel.didEndEditing = dee
|
||||
txtdel.didChange = dc
|
||||
|
||||
txt = WMTextField(win, "abc")
|
||||
txt.resize(95, 20)
|
||||
txt.move(295, 20)
|
||||
txt.setDelegate(txtdel)
|
||||
txt.show()
|
||||
txt2 = WMTextField(win, "01234567890")
|
||||
txt2.resize(95, 20)
|
||||
txt2.move(295, 45)
|
||||
txt2.setDelegate(txtdel)
|
||||
txt2.show()
|
||||
|
||||
txt.setNextText(txt2)
|
||||
txt2.setNextText(txt)
|
||||
|
||||
label = WMLabel(win, "Text1:")
|
||||
label.setTextAlignment(WARight)
|
||||
label.move(240, 20)
|
||||
label.resize(55, 20)
|
||||
label.show()
|
||||
|
||||
label2 = WMLabel(win, "mytext2:")
|
||||
label2.setTextAlignment(WARight)
|
||||
label2.move(240, 45)
|
||||
label2.resize(55, 20)
|
||||
label2.show()
|
||||
|
||||
btn.setAction(click, list)
|
||||
|
||||
frame = WMFrame(win, "My Frame")
|
||||
frame.resize(150, 50)
|
||||
frame.move(240, 70)
|
||||
#frame.setRelief(WRPushed)
|
||||
frame.show()
|
||||
|
||||
ebtn = WMCommandButton(win)
|
||||
ebtn.setText("Exit")
|
||||
ebtn.resize(100, 25)
|
||||
ebtn.move(290, 147)
|
||||
ebtn.setAction(quit)
|
||||
ebtn.show()
|
||||
|
||||
win.realize()
|
||||
win.show()
|
||||
|
||||
timer = WMPersistentTimer(1000, tcb, win)
|
||||
#del(timer)
|
||||
#timer.delete()
|
||||
|
||||
win2 = WMPanel(win, "anotherWindow", WMTitledWindowMask)
|
||||
win2.setTitle("transient test window")
|
||||
win2.resize(150, 50)
|
||||
win2.setInitialPosition((scr.width-win2.width())/2, (scr.height-win2.height())/2)
|
||||
|
||||
btn7 = WMCommandButton(win2)
|
||||
btn7.setText("Dismiss")
|
||||
btn7.resize(100, 25)
|
||||
btn7.move(27, 10)
|
||||
btn7.show()
|
||||
btn7.setAction(breakLoop)
|
||||
|
||||
win2.realize()
|
||||
|
||||
scr.mainLoop()
|
||||
|
||||
71
WINGs/python/setup.py
Executable file
71
WINGs/python/setup.py
Executable file
@@ -0,0 +1,71 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
"""Setup script for the WINGs module distribution."""
|
||||
|
||||
import os, sys
|
||||
from distutils.core import setup
|
||||
from distutils.extension import Extension
|
||||
|
||||
## Get the include dirs
|
||||
wings = os.popen("get-wings-flags --cflags", "r")
|
||||
flags = wings.read().split()
|
||||
include_dirs = [x[2:] for x in flags]
|
||||
#include_dirs += [".."]
|
||||
wings.close()
|
||||
|
||||
## Get the library dirs
|
||||
wings = os.popen("get-wings-flags --ldflags", "r")
|
||||
flags = wings.read().split()
|
||||
library_dirs = [x[2:] for x in flags]
|
||||
#library_dirs += [".."]
|
||||
wings.close()
|
||||
|
||||
## Get the libraries
|
||||
wings = os.popen("get-wings-flags --libs", "r")
|
||||
flags = wings.read().split()
|
||||
libraries = [x[2:] for x in flags]
|
||||
wings.close()
|
||||
|
||||
runtime_library_dirs = []
|
||||
extra_objects = []
|
||||
extra_compile_args = ['-Wno-strict-prototypes', '-Wno-unused']
|
||||
|
||||
long_description = \
|
||||
"""Python interface to the WINGs library
|
||||
|
||||
Python WINGs is an interface to WINGs, a small widget set with the
|
||||
N*XTSTEP look and feel. It's API is inspired in OpenStep and it's
|
||||
implementation borrows some ideas from Tk. It has a reasonable set of
|
||||
widgets, sufficient for building small applications (like a CDPlayer
|
||||
or hacking something like rxvt). It also has other functions that are
|
||||
usefull for applications, like a User Defaults alike configuration
|
||||
manager and a notification system.
|
||||
|
||||
"""
|
||||
|
||||
setup (# Distribution meta-data
|
||||
name = "Python-WINGs",
|
||||
version = "0.81.0",
|
||||
description = "A python interface to WINGs",
|
||||
long_description=long_description,
|
||||
author = "Dan Pascu",
|
||||
author_email = "dan@windowmaker.info",
|
||||
license = "GPL",
|
||||
platforms = "ALL",
|
||||
url = "http://windowmaker.info/",
|
||||
|
||||
# Description of the modules and packages in the distribution
|
||||
|
||||
py_modules = ["WINGs"],
|
||||
|
||||
ext_modules = [Extension(
|
||||
name='wings',
|
||||
sources=['WINGs.c'],
|
||||
include_dirs=include_dirs,
|
||||
library_dirs=library_dirs,
|
||||
runtime_library_dirs=runtime_library_dirs,
|
||||
libraries=libraries,
|
||||
extra_objects=extra_objects,
|
||||
extra_compile_args=extra_compile_args,
|
||||
)],
|
||||
)
|
||||
159
WINGs/python/test.py
Executable file
159
WINGs/python/test.py
Executable file
@@ -0,0 +1,159 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
from WINGs import *
|
||||
|
||||
if __name__ == "__main__":
|
||||
def quit(obj, data):
|
||||
#sys.exit()
|
||||
scr.breakMainLoop()
|
||||
|
||||
def click(btn, list):
|
||||
print win.width(), win.height()
|
||||
print list.selectedItemRow()
|
||||
win2.show()
|
||||
scr.runModalLoop(win2.view())
|
||||
print txt2.text()
|
||||
|
||||
def sayhi(btn, data):
|
||||
print "hi"
|
||||
|
||||
def breakLoop(btn, data):
|
||||
#sys.exit()
|
||||
scr.breakModalLoop()
|
||||
win2.hide()
|
||||
|
||||
def dc(object, data, action):
|
||||
print "didChange:", object, data, action
|
||||
|
||||
def dbe(object, data, action):
|
||||
print "didBeginEditing:", object, data, action
|
||||
|
||||
def dee(object, data, action):
|
||||
if action == wings.WMReturnTextMovement:
|
||||
if object == txt:
|
||||
object.setFocusTo(txt2)
|
||||
else:
|
||||
object.setFocusTo(txt)
|
||||
print "didEndEditing:", object, data, action, object.text()
|
||||
|
||||
def tcb(one):
|
||||
old = list.selectedItemRow()
|
||||
list.selectItem(list.index)
|
||||
list.unselectItem(old)
|
||||
list.index = (list.index+1) % 3
|
||||
#print one
|
||||
|
||||
scr = WMScreen("foobar")
|
||||
win = WMWindow(scr, "aWindow")
|
||||
win.setCloseAction(quit)
|
||||
win.setTitle("test window")
|
||||
win.resize(400, 180)
|
||||
win.setInitialPosition((scr.width-win.width())/2, (scr.height-win.height())/2)
|
||||
|
||||
btn = WMCommandButton(win)
|
||||
btn.setText("Click Me")
|
||||
btn.resize(100, 25)
|
||||
btn.move(20, 20)
|
||||
btn.show()
|
||||
|
||||
sw = WMSwitchButton(win)
|
||||
sw.setText("Some option")
|
||||
sw.resize(100, 25)
|
||||
sw.move(20, 50)
|
||||
sw.show()
|
||||
|
||||
radios = []
|
||||
r = None
|
||||
j = 0
|
||||
for i in ["One", "Two", "Four"]:
|
||||
r = WMRadioButton(win, r)
|
||||
radios.append(r)
|
||||
r.show()
|
||||
r.setText(i)
|
||||
r.move(20, 70+j*25)
|
||||
r.resize(100, 25)
|
||||
j=j+1
|
||||
|
||||
sw.setAction(sayhi)
|
||||
|
||||
list = WMList(win)
|
||||
list.resize(100,100)
|
||||
list.move(130, 20)
|
||||
list.addItem("one")
|
||||
list.addItem("two")
|
||||
list.addItem("three")
|
||||
list.allowMultipleSelection(1)
|
||||
list.show()
|
||||
list.index = 0
|
||||
|
||||
txtdel = WMTextFieldDelegate()
|
||||
txtdel.data = 'mydata'
|
||||
txtdel.didBeginEditing = dbe
|
||||
txtdel.didEndEditing = dee
|
||||
txtdel.didChange = dc
|
||||
|
||||
txt = WMTextField(win)
|
||||
txt.resize(95, 20)
|
||||
txt.move(295, 20)
|
||||
txt.setDelegate(txtdel)
|
||||
txt.show()
|
||||
txt2 = WMTextField(win, "01234567890")
|
||||
txt2.resize(95, 20)
|
||||
txt2.move(295, 45)
|
||||
txt2.setDelegate(txtdel)
|
||||
txt2.show()
|
||||
|
||||
txt.setNextText(txt2)
|
||||
txt2.setNextText(txt)
|
||||
|
||||
label = WMLabel(win, "Text1:")
|
||||
label.setTextAlignment(WARight)
|
||||
label.move(240, 20)
|
||||
label.resize(55, 20)
|
||||
label.show()
|
||||
|
||||
label2 = WMLabel(win, "mytext2:")
|
||||
label2.setTextAlignment(WARight)
|
||||
label2.move(240, 45)
|
||||
label2.resize(55, 20)
|
||||
label2.show()
|
||||
|
||||
btn.setAction(click, list)
|
||||
|
||||
frame = WMFrame(win, "My Frame")
|
||||
frame.resize(150, 50)
|
||||
frame.move(240, 70)
|
||||
#frame.setRelief(WRPushed)
|
||||
frame.show()
|
||||
|
||||
ebtn = WMCommandButton(win)
|
||||
ebtn.setText("Exit")
|
||||
ebtn.resize(100, 25)
|
||||
ebtn.move(290, 147)
|
||||
ebtn.setAction(quit)
|
||||
ebtn.show()
|
||||
|
||||
win.realize()
|
||||
win.show()
|
||||
|
||||
timer = WMPersistentTimer(1000, tcb, win)
|
||||
#del(timer)
|
||||
#timer.delete()
|
||||
|
||||
win2 = WMPanel(win, "anotherWindow", WMTitledWindowMask)
|
||||
win2.setTitle("transient test window")
|
||||
win2.resize(150, 50)
|
||||
win2.setInitialPosition((scr.width-win2.width())/2, (scr.height-win2.height())/2)
|
||||
|
||||
btn7 = WMCommandButton(win2)
|
||||
btn7.setText("Dismiss")
|
||||
btn7.resize(100, 25)
|
||||
btn7.move(27, 10)
|
||||
btn7.show()
|
||||
btn7.setAction(breakLoop)
|
||||
|
||||
win2.realize()
|
||||
|
||||
scr.mainLoop()
|
||||
|
||||
771
WINGs/rgb.h
Normal file
771
WINGs/rgb.h
Normal file
@@ -0,0 +1,771 @@
|
||||
|
||||
/* Automatically generated file. Do NOT edit. Regenerate it using make-rgb */
|
||||
|
||||
#ifndef RGB_H_
|
||||
#define RGB_H_
|
||||
|
||||
#include <wraster.h>
|
||||
|
||||
typedef struct RGBColor {
|
||||
RColor color;
|
||||
char *name;
|
||||
} RGBColor;
|
||||
|
||||
RGBColor rgbColors[] = {
|
||||
{{255, 250, 250, 0}, "snow"},
|
||||
{{248, 248, 255, 0}, "ghost"},
|
||||
{{248, 248, 255, 0}, "GhostWhite"},
|
||||
{{245, 245, 245, 0}, "white"},
|
||||
{{245, 245, 245, 0}, "WhiteSmoke"},
|
||||
{{220, 220, 220, 0}, "gainsboro"},
|
||||
{{255, 250, 240, 0}, "floral"},
|
||||
{{255, 250, 240, 0}, "FloralWhite"},
|
||||
{{253, 245, 230, 0}, "old"},
|
||||
{{253, 245, 230, 0}, "OldLace"},
|
||||
{{250, 240, 230, 0}, "linen"},
|
||||
{{250, 235, 215, 0}, "antique"},
|
||||
{{250, 235, 215, 0}, "AntiqueWhite"},
|
||||
{{255, 239, 213, 0}, "papaya"},
|
||||
{{255, 239, 213, 0}, "PapayaWhip"},
|
||||
{{255, 235, 205, 0}, "blanched"},
|
||||
{{255, 235, 205, 0}, "BlanchedAlmond"},
|
||||
{{255, 228, 196, 0}, "bisque"},
|
||||
{{255, 218, 185, 0}, "peach"},
|
||||
{{255, 218, 185, 0}, "PeachPuff"},
|
||||
{{255, 222, 173, 0}, "navajo"},
|
||||
{{255, 222, 173, 0}, "NavajoWhite"},
|
||||
{{255, 228, 181, 0}, "moccasin"},
|
||||
{{255, 248, 220, 0}, "cornsilk"},
|
||||
{{255, 255, 240, 0}, "ivory"},
|
||||
{{255, 250, 205, 0}, "lemon"},
|
||||
{{255, 250, 205, 0}, "LemonChiffon"},
|
||||
{{255, 245, 238, 0}, "seashell"},
|
||||
{{240, 255, 240, 0}, "honeydew"},
|
||||
{{245, 255, 250, 0}, "mint"},
|
||||
{{245, 255, 250, 0}, "MintCream"},
|
||||
{{240, 255, 255, 0}, "azure"},
|
||||
{{240, 248, 255, 0}, "alice"},
|
||||
{{240, 248, 255, 0}, "AliceBlue"},
|
||||
{{230, 230, 250, 0}, "lavender"},
|
||||
{{255, 240, 245, 0}, "lavender"},
|
||||
{{255, 240, 245, 0}, "LavenderBlush"},
|
||||
{{255, 228, 225, 0}, "misty"},
|
||||
{{255, 228, 225, 0}, "MistyRose"},
|
||||
{{255, 255, 255, 0}, "white"},
|
||||
{{ 0, 0, 0, 0}, "black"},
|
||||
{{ 47, 79, 79, 0}, "dark"},
|
||||
{{ 47, 79, 79, 0}, "DarkSlateGray"},
|
||||
{{ 47, 79, 79, 0}, "dark"},
|
||||
{{ 47, 79, 79, 0}, "DarkSlateGrey"},
|
||||
{{105, 105, 105, 0}, "dim"},
|
||||
{{105, 105, 105, 0}, "DimGray"},
|
||||
{{105, 105, 105, 0}, "dim"},
|
||||
{{105, 105, 105, 0}, "DimGrey"},
|
||||
{{112, 128, 144, 0}, "slate"},
|
||||
{{112, 128, 144, 0}, "SlateGray"},
|
||||
{{112, 128, 144, 0}, "slate"},
|
||||
{{112, 128, 144, 0}, "SlateGrey"},
|
||||
{{119, 136, 153, 0}, "light"},
|
||||
{{119, 136, 153, 0}, "LightSlateGray"},
|
||||
{{119, 136, 153, 0}, "light"},
|
||||
{{119, 136, 153, 0}, "LightSlateGrey"},
|
||||
{{190, 190, 190, 0}, "gray"},
|
||||
{{190, 190, 190, 0}, "grey"},
|
||||
{{211, 211, 211, 0}, "light"},
|
||||
{{211, 211, 211, 0}, "LightGrey"},
|
||||
{{211, 211, 211, 0}, "light"},
|
||||
{{211, 211, 211, 0}, "LightGray"},
|
||||
{{ 25, 25, 112, 0}, "midnight"},
|
||||
{{ 25, 25, 112, 0}, "MidnightBlue"},
|
||||
{{ 0, 0, 128, 0}, "navy"},
|
||||
{{ 0, 0, 128, 0}, "navy"},
|
||||
{{ 0, 0, 128, 0}, "NavyBlue"},
|
||||
{{100, 149, 237, 0}, "cornflower"},
|
||||
{{100, 149, 237, 0}, "CornflowerBlue"},
|
||||
{{ 72, 61, 139, 0}, "dark"},
|
||||
{{ 72, 61, 139, 0}, "DarkSlateBlue"},
|
||||
{{106, 90, 205, 0}, "slate"},
|
||||
{{106, 90, 205, 0}, "SlateBlue"},
|
||||
{{123, 104, 238, 0}, "medium"},
|
||||
{{123, 104, 238, 0}, "MediumSlateBlue"},
|
||||
{{132, 112, 255, 0}, "light"},
|
||||
{{132, 112, 255, 0}, "LightSlateBlue"},
|
||||
{{ 0, 0, 205, 0}, "medium"},
|
||||
{{ 0, 0, 205, 0}, "MediumBlue"},
|
||||
{{ 65, 105, 225, 0}, "royal"},
|
||||
{{ 65, 105, 225, 0}, "RoyalBlue"},
|
||||
{{ 0, 0, 255, 0}, "blue"},
|
||||
{{ 30, 144, 255, 0}, "dodger"},
|
||||
{{ 30, 144, 255, 0}, "DodgerBlue"},
|
||||
{{ 0, 191, 255, 0}, "deep"},
|
||||
{{ 0, 191, 255, 0}, "DeepSkyBlue"},
|
||||
{{135, 206, 235, 0}, "sky"},
|
||||
{{135, 206, 235, 0}, "SkyBlue"},
|
||||
{{135, 206, 250, 0}, "light"},
|
||||
{{135, 206, 250, 0}, "LightSkyBlue"},
|
||||
{{ 70, 130, 180, 0}, "steel"},
|
||||
{{ 70, 130, 180, 0}, "SteelBlue"},
|
||||
{{176, 196, 222, 0}, "light"},
|
||||
{{176, 196, 222, 0}, "LightSteelBlue"},
|
||||
{{173, 216, 230, 0}, "light"},
|
||||
{{173, 216, 230, 0}, "LightBlue"},
|
||||
{{176, 224, 230, 0}, "powder"},
|
||||
{{176, 224, 230, 0}, "PowderBlue"},
|
||||
{{175, 238, 238, 0}, "pale"},
|
||||
{{175, 238, 238, 0}, "PaleTurquoise"},
|
||||
{{ 0, 206, 209, 0}, "dark"},
|
||||
{{ 0, 206, 209, 0}, "DarkTurquoise"},
|
||||
{{ 72, 209, 204, 0}, "medium"},
|
||||
{{ 72, 209, 204, 0}, "MediumTurquoise"},
|
||||
{{ 64, 224, 208, 0}, "turquoise"},
|
||||
{{ 0, 255, 255, 0}, "cyan"},
|
||||
{{224, 255, 255, 0}, "light"},
|
||||
{{224, 255, 255, 0}, "LightCyan"},
|
||||
{{ 95, 158, 160, 0}, "cadet"},
|
||||
{{ 95, 158, 160, 0}, "CadetBlue"},
|
||||
{{102, 205, 170, 0}, "medium"},
|
||||
{{102, 205, 170, 0}, "MediumAquamarine"},
|
||||
{{127, 255, 212, 0}, "aquamarine"},
|
||||
{{ 0, 100, 0, 0}, "dark"},
|
||||
{{ 0, 100, 0, 0}, "DarkGreen"},
|
||||
{{ 85, 107, 47, 0}, "dark"},
|
||||
{{ 85, 107, 47, 0}, "DarkOliveGreen"},
|
||||
{{143, 188, 143, 0}, "dark"},
|
||||
{{143, 188, 143, 0}, "DarkSeaGreen"},
|
||||
{{ 46, 139, 87, 0}, "sea"},
|
||||
{{ 46, 139, 87, 0}, "SeaGreen"},
|
||||
{{ 60, 179, 113, 0}, "medium"},
|
||||
{{ 60, 179, 113, 0}, "MediumSeaGreen"},
|
||||
{{ 32, 178, 170, 0}, "light"},
|
||||
{{ 32, 178, 170, 0}, "LightSeaGreen"},
|
||||
{{152, 251, 152, 0}, "pale"},
|
||||
{{152, 251, 152, 0}, "PaleGreen"},
|
||||
{{ 0, 255, 127, 0}, "spring"},
|
||||
{{ 0, 255, 127, 0}, "SpringGreen"},
|
||||
{{124, 252, 0, 0}, "lawn"},
|
||||
{{124, 252, 0, 0}, "LawnGreen"},
|
||||
{{ 0, 255, 0, 0}, "green"},
|
||||
{{127, 255, 0, 0}, "chartreuse"},
|
||||
{{ 0, 250, 154, 0}, "medium"},
|
||||
{{ 0, 250, 154, 0}, "MediumSpringGreen"},
|
||||
{{173, 255, 47, 0}, "green"},
|
||||
{{173, 255, 47, 0}, "GreenYellow"},
|
||||
{{ 50, 205, 50, 0}, "lime"},
|
||||
{{ 50, 205, 50, 0}, "LimeGreen"},
|
||||
{{154, 205, 50, 0}, "yellow"},
|
||||
{{154, 205, 50, 0}, "YellowGreen"},
|
||||
{{ 34, 139, 34, 0}, "forest"},
|
||||
{{ 34, 139, 34, 0}, "ForestGreen"},
|
||||
{{107, 142, 35, 0}, "olive"},
|
||||
{{107, 142, 35, 0}, "OliveDrab"},
|
||||
{{189, 183, 107, 0}, "dark"},
|
||||
{{189, 183, 107, 0}, "DarkKhaki"},
|
||||
{{240, 230, 140, 0}, "khaki"},
|
||||
{{238, 232, 170, 0}, "pale"},
|
||||
{{238, 232, 170, 0}, "PaleGoldenrod"},
|
||||
{{250, 250, 210, 0}, "light"},
|
||||
{{250, 250, 210, 0}, "LightGoldenrodYellow"},
|
||||
{{255, 255, 224, 0}, "light"},
|
||||
{{255, 255, 224, 0}, "LightYellow"},
|
||||
{{255, 255, 0, 0}, "yellow"},
|
||||
{{255, 215, 0, 0}, "gold"},
|
||||
{{238, 221, 130, 0}, "light"},
|
||||
{{238, 221, 130, 0}, "LightGoldenrod"},
|
||||
{{218, 165, 32, 0}, "goldenrod"},
|
||||
{{184, 134, 11, 0}, "dark"},
|
||||
{{184, 134, 11, 0}, "DarkGoldenrod"},
|
||||
{{188, 143, 143, 0}, "rosy"},
|
||||
{{188, 143, 143, 0}, "RosyBrown"},
|
||||
{{205, 92, 92, 0}, "indian"},
|
||||
{{205, 92, 92, 0}, "IndianRed"},
|
||||
{{139, 69, 19, 0}, "saddle"},
|
||||
{{139, 69, 19, 0}, "SaddleBrown"},
|
||||
{{160, 82, 45, 0}, "sienna"},
|
||||
{{205, 133, 63, 0}, "peru"},
|
||||
{{222, 184, 135, 0}, "burlywood"},
|
||||
{{245, 245, 220, 0}, "beige"},
|
||||
{{245, 222, 179, 0}, "wheat"},
|
||||
{{244, 164, 96, 0}, "sandy"},
|
||||
{{244, 164, 96, 0}, "SandyBrown"},
|
||||
{{210, 180, 140, 0}, "tan"},
|
||||
{{210, 105, 30, 0}, "chocolate"},
|
||||
{{178, 34, 34, 0}, "firebrick"},
|
||||
{{165, 42, 42, 0}, "brown"},
|
||||
{{233, 150, 122, 0}, "dark"},
|
||||
{{233, 150, 122, 0}, "DarkSalmon"},
|
||||
{{250, 128, 114, 0}, "salmon"},
|
||||
{{255, 160, 122, 0}, "light"},
|
||||
{{255, 160, 122, 0}, "LightSalmon"},
|
||||
{{255, 165, 0, 0}, "orange"},
|
||||
{{255, 140, 0, 0}, "dark"},
|
||||
{{255, 140, 0, 0}, "DarkOrange"},
|
||||
{{255, 127, 80, 0}, "coral"},
|
||||
{{240, 128, 128, 0}, "light"},
|
||||
{{240, 128, 128, 0}, "LightCoral"},
|
||||
{{255, 99, 71, 0}, "tomato"},
|
||||
{{255, 69, 0, 0}, "orange"},
|
||||
{{255, 69, 0, 0}, "OrangeRed"},
|
||||
{{255, 0, 0, 0}, "red"},
|
||||
{{255, 105, 180, 0}, "hot"},
|
||||
{{255, 105, 180, 0}, "HotPink"},
|
||||
{{255, 20, 147, 0}, "deep"},
|
||||
{{255, 20, 147, 0}, "DeepPink"},
|
||||
{{255, 192, 203, 0}, "pink"},
|
||||
{{255, 182, 193, 0}, "light"},
|
||||
{{255, 182, 193, 0}, "LightPink"},
|
||||
{{219, 112, 147, 0}, "pale"},
|
||||
{{219, 112, 147, 0}, "PaleVioletRed"},
|
||||
{{176, 48, 96, 0}, "maroon"},
|
||||
{{199, 21, 133, 0}, "medium"},
|
||||
{{199, 21, 133, 0}, "MediumVioletRed"},
|
||||
{{208, 32, 144, 0}, "violet"},
|
||||
{{208, 32, 144, 0}, "VioletRed"},
|
||||
{{255, 0, 255, 0}, "magenta"},
|
||||
{{238, 130, 238, 0}, "violet"},
|
||||
{{221, 160, 221, 0}, "plum"},
|
||||
{{218, 112, 214, 0}, "orchid"},
|
||||
{{186, 85, 211, 0}, "medium"},
|
||||
{{186, 85, 211, 0}, "MediumOrchid"},
|
||||
{{153, 50, 204, 0}, "dark"},
|
||||
{{153, 50, 204, 0}, "DarkOrchid"},
|
||||
{{148, 0, 211, 0}, "dark"},
|
||||
{{148, 0, 211, 0}, "DarkViolet"},
|
||||
{{138, 43, 226, 0}, "blue"},
|
||||
{{138, 43, 226, 0}, "BlueViolet"},
|
||||
{{160, 32, 240, 0}, "purple"},
|
||||
{{147, 112, 219, 0}, "medium"},
|
||||
{{147, 112, 219, 0}, "MediumPurple"},
|
||||
{{216, 191, 216, 0}, "thistle"},
|
||||
{{255, 250, 250, 0}, "snow1"},
|
||||
{{238, 233, 233, 0}, "snow2"},
|
||||
{{205, 201, 201, 0}, "snow3"},
|
||||
{{139, 137, 137, 0}, "snow4"},
|
||||
{{255, 245, 238, 0}, "seashell1"},
|
||||
{{238, 229, 222, 0}, "seashell2"},
|
||||
{{205, 197, 191, 0}, "seashell3"},
|
||||
{{139, 134, 130, 0}, "seashell4"},
|
||||
{{255, 239, 219, 0}, "AntiqueWhite1"},
|
||||
{{238, 223, 204, 0}, "AntiqueWhite2"},
|
||||
{{205, 192, 176, 0}, "AntiqueWhite3"},
|
||||
{{139, 131, 120, 0}, "AntiqueWhite4"},
|
||||
{{255, 228, 196, 0}, "bisque1"},
|
||||
{{238, 213, 183, 0}, "bisque2"},
|
||||
{{205, 183, 158, 0}, "bisque3"},
|
||||
{{139, 125, 107, 0}, "bisque4"},
|
||||
{{255, 218, 185, 0}, "PeachPuff1"},
|
||||
{{238, 203, 173, 0}, "PeachPuff2"},
|
||||
{{205, 175, 149, 0}, "PeachPuff3"},
|
||||
{{139, 119, 101, 0}, "PeachPuff4"},
|
||||
{{255, 222, 173, 0}, "NavajoWhite1"},
|
||||
{{238, 207, 161, 0}, "NavajoWhite2"},
|
||||
{{205, 179, 139, 0}, "NavajoWhite3"},
|
||||
{{139, 121, 94, 0}, "NavajoWhite4"},
|
||||
{{255, 250, 205, 0}, "LemonChiffon1"},
|
||||
{{238, 233, 191, 0}, "LemonChiffon2"},
|
||||
{{205, 201, 165, 0}, "LemonChiffon3"},
|
||||
{{139, 137, 112, 0}, "LemonChiffon4"},
|
||||
{{255, 248, 220, 0}, "cornsilk1"},
|
||||
{{238, 232, 205, 0}, "cornsilk2"},
|
||||
{{205, 200, 177, 0}, "cornsilk3"},
|
||||
{{139, 136, 120, 0}, "cornsilk4"},
|
||||
{{255, 255, 240, 0}, "ivory1"},
|
||||
{{238, 238, 224, 0}, "ivory2"},
|
||||
{{205, 205, 193, 0}, "ivory3"},
|
||||
{{139, 139, 131, 0}, "ivory4"},
|
||||
{{240, 255, 240, 0}, "honeydew1"},
|
||||
{{224, 238, 224, 0}, "honeydew2"},
|
||||
{{193, 205, 193, 0}, "honeydew3"},
|
||||
{{131, 139, 131, 0}, "honeydew4"},
|
||||
{{255, 240, 245, 0}, "LavenderBlush1"},
|
||||
{{238, 224, 229, 0}, "LavenderBlush2"},
|
||||
{{205, 193, 197, 0}, "LavenderBlush3"},
|
||||
{{139, 131, 134, 0}, "LavenderBlush4"},
|
||||
{{255, 228, 225, 0}, "MistyRose1"},
|
||||
{{238, 213, 210, 0}, "MistyRose2"},
|
||||
{{205, 183, 181, 0}, "MistyRose3"},
|
||||
{{139, 125, 123, 0}, "MistyRose4"},
|
||||
{{240, 255, 255, 0}, "azure1"},
|
||||
{{224, 238, 238, 0}, "azure2"},
|
||||
{{193, 205, 205, 0}, "azure3"},
|
||||
{{131, 139, 139, 0}, "azure4"},
|
||||
{{131, 111, 255, 0}, "SlateBlue1"},
|
||||
{{122, 103, 238, 0}, "SlateBlue2"},
|
||||
{{105, 89, 205, 0}, "SlateBlue3"},
|
||||
{{ 71, 60, 139, 0}, "SlateBlue4"},
|
||||
{{ 72, 118, 255, 0}, "RoyalBlue1"},
|
||||
{{ 67, 110, 238, 0}, "RoyalBlue2"},
|
||||
{{ 58, 95, 205, 0}, "RoyalBlue3"},
|
||||
{{ 39, 64, 139, 0}, "RoyalBlue4"},
|
||||
{{ 0, 0, 255, 0}, "blue1"},
|
||||
{{ 0, 0, 238, 0}, "blue2"},
|
||||
{{ 0, 0, 205, 0}, "blue3"},
|
||||
{{ 0, 0, 139, 0}, "blue4"},
|
||||
{{ 30, 144, 255, 0}, "DodgerBlue1"},
|
||||
{{ 28, 134, 238, 0}, "DodgerBlue2"},
|
||||
{{ 24, 116, 205, 0}, "DodgerBlue3"},
|
||||
{{ 16, 78, 139, 0}, "DodgerBlue4"},
|
||||
{{ 99, 184, 255, 0}, "SteelBlue1"},
|
||||
{{ 92, 172, 238, 0}, "SteelBlue2"},
|
||||
{{ 79, 148, 205, 0}, "SteelBlue3"},
|
||||
{{ 54, 100, 139, 0}, "SteelBlue4"},
|
||||
{{ 0, 191, 255, 0}, "DeepSkyBlue1"},
|
||||
{{ 0, 178, 238, 0}, "DeepSkyBlue2"},
|
||||
{{ 0, 154, 205, 0}, "DeepSkyBlue3"},
|
||||
{{ 0, 104, 139, 0}, "DeepSkyBlue4"},
|
||||
{{135, 206, 255, 0}, "SkyBlue1"},
|
||||
{{126, 192, 238, 0}, "SkyBlue2"},
|
||||
{{108, 166, 205, 0}, "SkyBlue3"},
|
||||
{{ 74, 112, 139, 0}, "SkyBlue4"},
|
||||
{{176, 226, 255, 0}, "LightSkyBlue1"},
|
||||
{{164, 211, 238, 0}, "LightSkyBlue2"},
|
||||
{{141, 182, 205, 0}, "LightSkyBlue3"},
|
||||
{{ 96, 123, 139, 0}, "LightSkyBlue4"},
|
||||
{{198, 226, 255, 0}, "SlateGray1"},
|
||||
{{185, 211, 238, 0}, "SlateGray2"},
|
||||
{{159, 182, 205, 0}, "SlateGray3"},
|
||||
{{108, 123, 139, 0}, "SlateGray4"},
|
||||
{{202, 225, 255, 0}, "LightSteelBlue1"},
|
||||
{{188, 210, 238, 0}, "LightSteelBlue2"},
|
||||
{{162, 181, 205, 0}, "LightSteelBlue3"},
|
||||
{{110, 123, 139, 0}, "LightSteelBlue4"},
|
||||
{{191, 239, 255, 0}, "LightBlue1"},
|
||||
{{178, 223, 238, 0}, "LightBlue2"},
|
||||
{{154, 192, 205, 0}, "LightBlue3"},
|
||||
{{104, 131, 139, 0}, "LightBlue4"},
|
||||
{{224, 255, 255, 0}, "LightCyan1"},
|
||||
{{209, 238, 238, 0}, "LightCyan2"},
|
||||
{{180, 205, 205, 0}, "LightCyan3"},
|
||||
{{122, 139, 139, 0}, "LightCyan4"},
|
||||
{{187, 255, 255, 0}, "PaleTurquoise1"},
|
||||
{{174, 238, 238, 0}, "PaleTurquoise2"},
|
||||
{{150, 205, 205, 0}, "PaleTurquoise3"},
|
||||
{{102, 139, 139, 0}, "PaleTurquoise4"},
|
||||
{{152, 245, 255, 0}, "CadetBlue1"},
|
||||
{{142, 229, 238, 0}, "CadetBlue2"},
|
||||
{{122, 197, 205, 0}, "CadetBlue3"},
|
||||
{{ 83, 134, 139, 0}, "CadetBlue4"},
|
||||
{{ 0, 245, 255, 0}, "turquoise1"},
|
||||
{{ 0, 229, 238, 0}, "turquoise2"},
|
||||
{{ 0, 197, 205, 0}, "turquoise3"},
|
||||
{{ 0, 134, 139, 0}, "turquoise4"},
|
||||
{{ 0, 255, 255, 0}, "cyan1"},
|
||||
{{ 0, 238, 238, 0}, "cyan2"},
|
||||
{{ 0, 205, 205, 0}, "cyan3"},
|
||||
{{ 0, 139, 139, 0}, "cyan4"},
|
||||
{{151, 255, 255, 0}, "DarkSlateGray1"},
|
||||
{{141, 238, 238, 0}, "DarkSlateGray2"},
|
||||
{{121, 205, 205, 0}, "DarkSlateGray3"},
|
||||
{{ 82, 139, 139, 0}, "DarkSlateGray4"},
|
||||
{{127, 255, 212, 0}, "aquamarine1"},
|
||||
{{118, 238, 198, 0}, "aquamarine2"},
|
||||
{{102, 205, 170, 0}, "aquamarine3"},
|
||||
{{ 69, 139, 116, 0}, "aquamarine4"},
|
||||
{{193, 255, 193, 0}, "DarkSeaGreen1"},
|
||||
{{180, 238, 180, 0}, "DarkSeaGreen2"},
|
||||
{{155, 205, 155, 0}, "DarkSeaGreen3"},
|
||||
{{105, 139, 105, 0}, "DarkSeaGreen4"},
|
||||
{{ 84, 255, 159, 0}, "SeaGreen1"},
|
||||
{{ 78, 238, 148, 0}, "SeaGreen2"},
|
||||
{{ 67, 205, 128, 0}, "SeaGreen3"},
|
||||
{{ 46, 139, 87, 0}, "SeaGreen4"},
|
||||
{{154, 255, 154, 0}, "PaleGreen1"},
|
||||
{{144, 238, 144, 0}, "PaleGreen2"},
|
||||
{{124, 205, 124, 0}, "PaleGreen3"},
|
||||
{{ 84, 139, 84, 0}, "PaleGreen4"},
|
||||
{{ 0, 255, 127, 0}, "SpringGreen1"},
|
||||
{{ 0, 238, 118, 0}, "SpringGreen2"},
|
||||
{{ 0, 205, 102, 0}, "SpringGreen3"},
|
||||
{{ 0, 139, 69, 0}, "SpringGreen4"},
|
||||
{{ 0, 255, 0, 0}, "green1"},
|
||||
{{ 0, 238, 0, 0}, "green2"},
|
||||
{{ 0, 205, 0, 0}, "green3"},
|
||||
{{ 0, 139, 0, 0}, "green4"},
|
||||
{{127, 255, 0, 0}, "chartreuse1"},
|
||||
{{118, 238, 0, 0}, "chartreuse2"},
|
||||
{{102, 205, 0, 0}, "chartreuse3"},
|
||||
{{ 69, 139, 0, 0}, "chartreuse4"},
|
||||
{{192, 255, 62, 0}, "OliveDrab1"},
|
||||
{{179, 238, 58, 0}, "OliveDrab2"},
|
||||
{{154, 205, 50, 0}, "OliveDrab3"},
|
||||
{{105, 139, 34, 0}, "OliveDrab4"},
|
||||
{{202, 255, 112, 0}, "DarkOliveGreen1"},
|
||||
{{188, 238, 104, 0}, "DarkOliveGreen2"},
|
||||
{{162, 205, 90, 0}, "DarkOliveGreen3"},
|
||||
{{110, 139, 61, 0}, "DarkOliveGreen4"},
|
||||
{{255, 246, 143, 0}, "khaki1"},
|
||||
{{238, 230, 133, 0}, "khaki2"},
|
||||
{{205, 198, 115, 0}, "khaki3"},
|
||||
{{139, 134, 78, 0}, "khaki4"},
|
||||
{{255, 236, 139, 0}, "LightGoldenrod1"},
|
||||
{{238, 220, 130, 0}, "LightGoldenrod2"},
|
||||
{{205, 190, 112, 0}, "LightGoldenrod3"},
|
||||
{{139, 129, 76, 0}, "LightGoldenrod4"},
|
||||
{{255, 255, 224, 0}, "LightYellow1"},
|
||||
{{238, 238, 209, 0}, "LightYellow2"},
|
||||
{{205, 205, 180, 0}, "LightYellow3"},
|
||||
{{139, 139, 122, 0}, "LightYellow4"},
|
||||
{{255, 255, 0, 0}, "yellow1"},
|
||||
{{238, 238, 0, 0}, "yellow2"},
|
||||
{{205, 205, 0, 0}, "yellow3"},
|
||||
{{139, 139, 0, 0}, "yellow4"},
|
||||
{{255, 215, 0, 0}, "gold1"},
|
||||
{{238, 201, 0, 0}, "gold2"},
|
||||
{{205, 173, 0, 0}, "gold3"},
|
||||
{{139, 117, 0, 0}, "gold4"},
|
||||
{{255, 193, 37, 0}, "goldenrod1"},
|
||||
{{238, 180, 34, 0}, "goldenrod2"},
|
||||
{{205, 155, 29, 0}, "goldenrod3"},
|
||||
{{139, 105, 20, 0}, "goldenrod4"},
|
||||
{{255, 185, 15, 0}, "DarkGoldenrod1"},
|
||||
{{238, 173, 14, 0}, "DarkGoldenrod2"},
|
||||
{{205, 149, 12, 0}, "DarkGoldenrod3"},
|
||||
{{139, 101, 8, 0}, "DarkGoldenrod4"},
|
||||
{{255, 193, 193, 0}, "RosyBrown1"},
|
||||
{{238, 180, 180, 0}, "RosyBrown2"},
|
||||
{{205, 155, 155, 0}, "RosyBrown3"},
|
||||
{{139, 105, 105, 0}, "RosyBrown4"},
|
||||
{{255, 106, 106, 0}, "IndianRed1"},
|
||||
{{238, 99, 99, 0}, "IndianRed2"},
|
||||
{{205, 85, 85, 0}, "IndianRed3"},
|
||||
{{139, 58, 58, 0}, "IndianRed4"},
|
||||
{{255, 130, 71, 0}, "sienna1"},
|
||||
{{238, 121, 66, 0}, "sienna2"},
|
||||
{{205, 104, 57, 0}, "sienna3"},
|
||||
{{139, 71, 38, 0}, "sienna4"},
|
||||
{{255, 211, 155, 0}, "burlywood1"},
|
||||
{{238, 197, 145, 0}, "burlywood2"},
|
||||
{{205, 170, 125, 0}, "burlywood3"},
|
||||
{{139, 115, 85, 0}, "burlywood4"},
|
||||
{{255, 231, 186, 0}, "wheat1"},
|
||||
{{238, 216, 174, 0}, "wheat2"},
|
||||
{{205, 186, 150, 0}, "wheat3"},
|
||||
{{139, 126, 102, 0}, "wheat4"},
|
||||
{{255, 165, 79, 0}, "tan1"},
|
||||
{{238, 154, 73, 0}, "tan2"},
|
||||
{{205, 133, 63, 0}, "tan3"},
|
||||
{{139, 90, 43, 0}, "tan4"},
|
||||
{{255, 127, 36, 0}, "chocolate1"},
|
||||
{{238, 118, 33, 0}, "chocolate2"},
|
||||
{{205, 102, 29, 0}, "chocolate3"},
|
||||
{{139, 69, 19, 0}, "chocolate4"},
|
||||
{{255, 48, 48, 0}, "firebrick1"},
|
||||
{{238, 44, 44, 0}, "firebrick2"},
|
||||
{{205, 38, 38, 0}, "firebrick3"},
|
||||
{{139, 26, 26, 0}, "firebrick4"},
|
||||
{{255, 64, 64, 0}, "brown1"},
|
||||
{{238, 59, 59, 0}, "brown2"},
|
||||
{{205, 51, 51, 0}, "brown3"},
|
||||
{{139, 35, 35, 0}, "brown4"},
|
||||
{{255, 140, 105, 0}, "salmon1"},
|
||||
{{238, 130, 98, 0}, "salmon2"},
|
||||
{{205, 112, 84, 0}, "salmon3"},
|
||||
{{139, 76, 57, 0}, "salmon4"},
|
||||
{{255, 160, 122, 0}, "LightSalmon1"},
|
||||
{{238, 149, 114, 0}, "LightSalmon2"},
|
||||
{{205, 129, 98, 0}, "LightSalmon3"},
|
||||
{{139, 87, 66, 0}, "LightSalmon4"},
|
||||
{{255, 165, 0, 0}, "orange1"},
|
||||
{{238, 154, 0, 0}, "orange2"},
|
||||
{{205, 133, 0, 0}, "orange3"},
|
||||
{{139, 90, 0, 0}, "orange4"},
|
||||
{{255, 127, 0, 0}, "DarkOrange1"},
|
||||
{{238, 118, 0, 0}, "DarkOrange2"},
|
||||
{{205, 102, 0, 0}, "DarkOrange3"},
|
||||
{{139, 69, 0, 0}, "DarkOrange4"},
|
||||
{{255, 114, 86, 0}, "coral1"},
|
||||
{{238, 106, 80, 0}, "coral2"},
|
||||
{{205, 91, 69, 0}, "coral3"},
|
||||
{{139, 62, 47, 0}, "coral4"},
|
||||
{{255, 99, 71, 0}, "tomato1"},
|
||||
{{238, 92, 66, 0}, "tomato2"},
|
||||
{{205, 79, 57, 0}, "tomato3"},
|
||||
{{139, 54, 38, 0}, "tomato4"},
|
||||
{{255, 69, 0, 0}, "OrangeRed1"},
|
||||
{{238, 64, 0, 0}, "OrangeRed2"},
|
||||
{{205, 55, 0, 0}, "OrangeRed3"},
|
||||
{{139, 37, 0, 0}, "OrangeRed4"},
|
||||
{{255, 0, 0, 0}, "red1"},
|
||||
{{238, 0, 0, 0}, "red2"},
|
||||
{{205, 0, 0, 0}, "red3"},
|
||||
{{139, 0, 0, 0}, "red4"},
|
||||
{{255, 20, 147, 0}, "DeepPink1"},
|
||||
{{238, 18, 137, 0}, "DeepPink2"},
|
||||
{{205, 16, 118, 0}, "DeepPink3"},
|
||||
{{139, 10, 80, 0}, "DeepPink4"},
|
||||
{{255, 110, 180, 0}, "HotPink1"},
|
||||
{{238, 106, 167, 0}, "HotPink2"},
|
||||
{{205, 96, 144, 0}, "HotPink3"},
|
||||
{{139, 58, 98, 0}, "HotPink4"},
|
||||
{{255, 181, 197, 0}, "pink1"},
|
||||
{{238, 169, 184, 0}, "pink2"},
|
||||
{{205, 145, 158, 0}, "pink3"},
|
||||
{{139, 99, 108, 0}, "pink4"},
|
||||
{{255, 174, 185, 0}, "LightPink1"},
|
||||
{{238, 162, 173, 0}, "LightPink2"},
|
||||
{{205, 140, 149, 0}, "LightPink3"},
|
||||
{{139, 95, 101, 0}, "LightPink4"},
|
||||
{{255, 130, 171, 0}, "PaleVioletRed1"},
|
||||
{{238, 121, 159, 0}, "PaleVioletRed2"},
|
||||
{{205, 104, 137, 0}, "PaleVioletRed3"},
|
||||
{{139, 71, 93, 0}, "PaleVioletRed4"},
|
||||
{{255, 52, 179, 0}, "maroon1"},
|
||||
{{238, 48, 167, 0}, "maroon2"},
|
||||
{{205, 41, 144, 0}, "maroon3"},
|
||||
{{139, 28, 98, 0}, "maroon4"},
|
||||
{{255, 62, 150, 0}, "VioletRed1"},
|
||||
{{238, 58, 140, 0}, "VioletRed2"},
|
||||
{{205, 50, 120, 0}, "VioletRed3"},
|
||||
{{139, 34, 82, 0}, "VioletRed4"},
|
||||
{{255, 0, 255, 0}, "magenta1"},
|
||||
{{238, 0, 238, 0}, "magenta2"},
|
||||
{{205, 0, 205, 0}, "magenta3"},
|
||||
{{139, 0, 139, 0}, "magenta4"},
|
||||
{{255, 131, 250, 0}, "orchid1"},
|
||||
{{238, 122, 233, 0}, "orchid2"},
|
||||
{{205, 105, 201, 0}, "orchid3"},
|
||||
{{139, 71, 137, 0}, "orchid4"},
|
||||
{{255, 187, 255, 0}, "plum1"},
|
||||
{{238, 174, 238, 0}, "plum2"},
|
||||
{{205, 150, 205, 0}, "plum3"},
|
||||
{{139, 102, 139, 0}, "plum4"},
|
||||
{{224, 102, 255, 0}, "MediumOrchid1"},
|
||||
{{209, 95, 238, 0}, "MediumOrchid2"},
|
||||
{{180, 82, 205, 0}, "MediumOrchid3"},
|
||||
{{122, 55, 139, 0}, "MediumOrchid4"},
|
||||
{{191, 62, 255, 0}, "DarkOrchid1"},
|
||||
{{178, 58, 238, 0}, "DarkOrchid2"},
|
||||
{{154, 50, 205, 0}, "DarkOrchid3"},
|
||||
{{104, 34, 139, 0}, "DarkOrchid4"},
|
||||
{{155, 48, 255, 0}, "purple1"},
|
||||
{{145, 44, 238, 0}, "purple2"},
|
||||
{{125, 38, 205, 0}, "purple3"},
|
||||
{{ 85, 26, 139, 0}, "purple4"},
|
||||
{{171, 130, 255, 0}, "MediumPurple1"},
|
||||
{{159, 121, 238, 0}, "MediumPurple2"},
|
||||
{{137, 104, 205, 0}, "MediumPurple3"},
|
||||
{{ 93, 71, 139, 0}, "MediumPurple4"},
|
||||
{{255, 225, 255, 0}, "thistle1"},
|
||||
{{238, 210, 238, 0}, "thistle2"},
|
||||
{{205, 181, 205, 0}, "thistle3"},
|
||||
{{139, 123, 139, 0}, "thistle4"},
|
||||
{{ 0, 0, 0, 0}, "gray0"},
|
||||
{{ 0, 0, 0, 0}, "grey0"},
|
||||
{{ 3, 3, 3, 0}, "gray1"},
|
||||
{{ 3, 3, 3, 0}, "grey1"},
|
||||
{{ 5, 5, 5, 0}, "gray2"},
|
||||
{{ 5, 5, 5, 0}, "grey2"},
|
||||
{{ 8, 8, 8, 0}, "gray3"},
|
||||
{{ 8, 8, 8, 0}, "grey3"},
|
||||
{{ 10, 10, 10, 0}, "gray4"},
|
||||
{{ 10, 10, 10, 0}, "grey4"},
|
||||
{{ 13, 13, 13, 0}, "gray5"},
|
||||
{{ 13, 13, 13, 0}, "grey5"},
|
||||
{{ 15, 15, 15, 0}, "gray6"},
|
||||
{{ 15, 15, 15, 0}, "grey6"},
|
||||
{{ 18, 18, 18, 0}, "gray7"},
|
||||
{{ 18, 18, 18, 0}, "grey7"},
|
||||
{{ 20, 20, 20, 0}, "gray8"},
|
||||
{{ 20, 20, 20, 0}, "grey8"},
|
||||
{{ 23, 23, 23, 0}, "gray9"},
|
||||
{{ 23, 23, 23, 0}, "grey9"},
|
||||
{{ 26, 26, 26, 0}, "gray10"},
|
||||
{{ 26, 26, 26, 0}, "grey10"},
|
||||
{{ 28, 28, 28, 0}, "gray11"},
|
||||
{{ 28, 28, 28, 0}, "grey11"},
|
||||
{{ 31, 31, 31, 0}, "gray12"},
|
||||
{{ 31, 31, 31, 0}, "grey12"},
|
||||
{{ 33, 33, 33, 0}, "gray13"},
|
||||
{{ 33, 33, 33, 0}, "grey13"},
|
||||
{{ 36, 36, 36, 0}, "gray14"},
|
||||
{{ 36, 36, 36, 0}, "grey14"},
|
||||
{{ 38, 38, 38, 0}, "gray15"},
|
||||
{{ 38, 38, 38, 0}, "grey15"},
|
||||
{{ 41, 41, 41, 0}, "gray16"},
|
||||
{{ 41, 41, 41, 0}, "grey16"},
|
||||
{{ 43, 43, 43, 0}, "gray17"},
|
||||
{{ 43, 43, 43, 0}, "grey17"},
|
||||
{{ 46, 46, 46, 0}, "gray18"},
|
||||
{{ 46, 46, 46, 0}, "grey18"},
|
||||
{{ 48, 48, 48, 0}, "gray19"},
|
||||
{{ 48, 48, 48, 0}, "grey19"},
|
||||
{{ 51, 51, 51, 0}, "gray20"},
|
||||
{{ 51, 51, 51, 0}, "grey20"},
|
||||
{{ 54, 54, 54, 0}, "gray21"},
|
||||
{{ 54, 54, 54, 0}, "grey21"},
|
||||
{{ 56, 56, 56, 0}, "gray22"},
|
||||
{{ 56, 56, 56, 0}, "grey22"},
|
||||
{{ 59, 59, 59, 0}, "gray23"},
|
||||
{{ 59, 59, 59, 0}, "grey23"},
|
||||
{{ 61, 61, 61, 0}, "gray24"},
|
||||
{{ 61, 61, 61, 0}, "grey24"},
|
||||
{{ 64, 64, 64, 0}, "gray25"},
|
||||
{{ 64, 64, 64, 0}, "grey25"},
|
||||
{{ 66, 66, 66, 0}, "gray26"},
|
||||
{{ 66, 66, 66, 0}, "grey26"},
|
||||
{{ 69, 69, 69, 0}, "gray27"},
|
||||
{{ 69, 69, 69, 0}, "grey27"},
|
||||
{{ 71, 71, 71, 0}, "gray28"},
|
||||
{{ 71, 71, 71, 0}, "grey28"},
|
||||
{{ 74, 74, 74, 0}, "gray29"},
|
||||
{{ 74, 74, 74, 0}, "grey29"},
|
||||
{{ 77, 77, 77, 0}, "gray30"},
|
||||
{{ 77, 77, 77, 0}, "grey30"},
|
||||
{{ 79, 79, 79, 0}, "gray31"},
|
||||
{{ 79, 79, 79, 0}, "grey31"},
|
||||
{{ 82, 82, 82, 0}, "gray32"},
|
||||
{{ 82, 82, 82, 0}, "grey32"},
|
||||
{{ 84, 84, 84, 0}, "gray33"},
|
||||
{{ 84, 84, 84, 0}, "grey33"},
|
||||
{{ 87, 87, 87, 0}, "gray34"},
|
||||
{{ 87, 87, 87, 0}, "grey34"},
|
||||
{{ 89, 89, 89, 0}, "gray35"},
|
||||
{{ 89, 89, 89, 0}, "grey35"},
|
||||
{{ 92, 92, 92, 0}, "gray36"},
|
||||
{{ 92, 92, 92, 0}, "grey36"},
|
||||
{{ 94, 94, 94, 0}, "gray37"},
|
||||
{{ 94, 94, 94, 0}, "grey37"},
|
||||
{{ 97, 97, 97, 0}, "gray38"},
|
||||
{{ 97, 97, 97, 0}, "grey38"},
|
||||
{{ 99, 99, 99, 0}, "gray39"},
|
||||
{{ 99, 99, 99, 0}, "grey39"},
|
||||
{{102, 102, 102, 0}, "gray40"},
|
||||
{{102, 102, 102, 0}, "grey40"},
|
||||
{{105, 105, 105, 0}, "gray41"},
|
||||
{{105, 105, 105, 0}, "grey41"},
|
||||
{{107, 107, 107, 0}, "gray42"},
|
||||
{{107, 107, 107, 0}, "grey42"},
|
||||
{{110, 110, 110, 0}, "gray43"},
|
||||
{{110, 110, 110, 0}, "grey43"},
|
||||
{{112, 112, 112, 0}, "gray44"},
|
||||
{{112, 112, 112, 0}, "grey44"},
|
||||
{{115, 115, 115, 0}, "gray45"},
|
||||
{{115, 115, 115, 0}, "grey45"},
|
||||
{{117, 117, 117, 0}, "gray46"},
|
||||
{{117, 117, 117, 0}, "grey46"},
|
||||
{{120, 120, 120, 0}, "gray47"},
|
||||
{{120, 120, 120, 0}, "grey47"},
|
||||
{{122, 122, 122, 0}, "gray48"},
|
||||
{{122, 122, 122, 0}, "grey48"},
|
||||
{{125, 125, 125, 0}, "gray49"},
|
||||
{{125, 125, 125, 0}, "grey49"},
|
||||
{{127, 127, 127, 0}, "gray50"},
|
||||
{{127, 127, 127, 0}, "grey50"},
|
||||
{{130, 130, 130, 0}, "gray51"},
|
||||
{{130, 130, 130, 0}, "grey51"},
|
||||
{{133, 133, 133, 0}, "gray52"},
|
||||
{{133, 133, 133, 0}, "grey52"},
|
||||
{{135, 135, 135, 0}, "gray53"},
|
||||
{{135, 135, 135, 0}, "grey53"},
|
||||
{{138, 138, 138, 0}, "gray54"},
|
||||
{{138, 138, 138, 0}, "grey54"},
|
||||
{{140, 140, 140, 0}, "gray55"},
|
||||
{{140, 140, 140, 0}, "grey55"},
|
||||
{{143, 143, 143, 0}, "gray56"},
|
||||
{{143, 143, 143, 0}, "grey56"},
|
||||
{{145, 145, 145, 0}, "gray57"},
|
||||
{{145, 145, 145, 0}, "grey57"},
|
||||
{{148, 148, 148, 0}, "gray58"},
|
||||
{{148, 148, 148, 0}, "grey58"},
|
||||
{{150, 150, 150, 0}, "gray59"},
|
||||
{{150, 150, 150, 0}, "grey59"},
|
||||
{{153, 153, 153, 0}, "gray60"},
|
||||
{{153, 153, 153, 0}, "grey60"},
|
||||
{{156, 156, 156, 0}, "gray61"},
|
||||
{{156, 156, 156, 0}, "grey61"},
|
||||
{{158, 158, 158, 0}, "gray62"},
|
||||
{{158, 158, 158, 0}, "grey62"},
|
||||
{{161, 161, 161, 0}, "gray63"},
|
||||
{{161, 161, 161, 0}, "grey63"},
|
||||
{{163, 163, 163, 0}, "gray64"},
|
||||
{{163, 163, 163, 0}, "grey64"},
|
||||
{{166, 166, 166, 0}, "gray65"},
|
||||
{{166, 166, 166, 0}, "grey65"},
|
||||
{{168, 168, 168, 0}, "gray66"},
|
||||
{{168, 168, 168, 0}, "grey66"},
|
||||
{{171, 171, 171, 0}, "gray67"},
|
||||
{{171, 171, 171, 0}, "grey67"},
|
||||
{{173, 173, 173, 0}, "gray68"},
|
||||
{{173, 173, 173, 0}, "grey68"},
|
||||
{{176, 176, 176, 0}, "gray69"},
|
||||
{{176, 176, 176, 0}, "grey69"},
|
||||
{{179, 179, 179, 0}, "gray70"},
|
||||
{{179, 179, 179, 0}, "grey70"},
|
||||
{{181, 181, 181, 0}, "gray71"},
|
||||
{{181, 181, 181, 0}, "grey71"},
|
||||
{{184, 184, 184, 0}, "gray72"},
|
||||
{{184, 184, 184, 0}, "grey72"},
|
||||
{{186, 186, 186, 0}, "gray73"},
|
||||
{{186, 186, 186, 0}, "grey73"},
|
||||
{{189, 189, 189, 0}, "gray74"},
|
||||
{{189, 189, 189, 0}, "grey74"},
|
||||
{{191, 191, 191, 0}, "gray75"},
|
||||
{{191, 191, 191, 0}, "grey75"},
|
||||
{{194, 194, 194, 0}, "gray76"},
|
||||
{{194, 194, 194, 0}, "grey76"},
|
||||
{{196, 196, 196, 0}, "gray77"},
|
||||
{{196, 196, 196, 0}, "grey77"},
|
||||
{{199, 199, 199, 0}, "gray78"},
|
||||
{{199, 199, 199, 0}, "grey78"},
|
||||
{{201, 201, 201, 0}, "gray79"},
|
||||
{{201, 201, 201, 0}, "grey79"},
|
||||
{{204, 204, 204, 0}, "gray80"},
|
||||
{{204, 204, 204, 0}, "grey80"},
|
||||
{{207, 207, 207, 0}, "gray81"},
|
||||
{{207, 207, 207, 0}, "grey81"},
|
||||
{{209, 209, 209, 0}, "gray82"},
|
||||
{{209, 209, 209, 0}, "grey82"},
|
||||
{{212, 212, 212, 0}, "gray83"},
|
||||
{{212, 212, 212, 0}, "grey83"},
|
||||
{{214, 214, 214, 0}, "gray84"},
|
||||
{{214, 214, 214, 0}, "grey84"},
|
||||
{{217, 217, 217, 0}, "gray85"},
|
||||
{{217, 217, 217, 0}, "grey85"},
|
||||
{{219, 219, 219, 0}, "gray86"},
|
||||
{{219, 219, 219, 0}, "grey86"},
|
||||
{{222, 222, 222, 0}, "gray87"},
|
||||
{{222, 222, 222, 0}, "grey87"},
|
||||
{{224, 224, 224, 0}, "gray88"},
|
||||
{{224, 224, 224, 0}, "grey88"},
|
||||
{{227, 227, 227, 0}, "gray89"},
|
||||
{{227, 227, 227, 0}, "grey89"},
|
||||
{{229, 229, 229, 0}, "gray90"},
|
||||
{{229, 229, 229, 0}, "grey90"},
|
||||
{{232, 232, 232, 0}, "gray91"},
|
||||
{{232, 232, 232, 0}, "grey91"},
|
||||
{{235, 235, 235, 0}, "gray92"},
|
||||
{{235, 235, 235, 0}, "grey92"},
|
||||
{{237, 237, 237, 0}, "gray93"},
|
||||
{{237, 237, 237, 0}, "grey93"},
|
||||
{{240, 240, 240, 0}, "gray94"},
|
||||
{{240, 240, 240, 0}, "grey94"},
|
||||
{{242, 242, 242, 0}, "gray95"},
|
||||
{{242, 242, 242, 0}, "grey95"},
|
||||
{{245, 245, 245, 0}, "gray96"},
|
||||
{{245, 245, 245, 0}, "grey96"},
|
||||
{{247, 247, 247, 0}, "gray97"},
|
||||
{{247, 247, 247, 0}, "grey97"},
|
||||
{{250, 250, 250, 0}, "gray98"},
|
||||
{{250, 250, 250, 0}, "grey98"},
|
||||
{{252, 252, 252, 0}, "gray99"},
|
||||
{{252, 252, 252, 0}, "grey99"},
|
||||
{{255, 255, 255, 0}, "gray100"},
|
||||
{{255, 255, 255, 0}, "grey100"},
|
||||
{{169, 169, 169, 0}, "dark"},
|
||||
{{169, 169, 169, 0}, "DarkGrey"},
|
||||
{{169, 169, 169, 0}, "dark"},
|
||||
{{169, 169, 169, 0}, "DarkGray"},
|
||||
{{ 0, 0, 139, 0}, "dark"},
|
||||
{{ 0, 0, 139, 0}, "DarkBlue"},
|
||||
{{ 0, 139, 139, 0}, "dark"},
|
||||
{{ 0, 139, 139, 0}, "DarkCyan"},
|
||||
{{139, 0, 139, 0}, "dark"},
|
||||
{{139, 0, 139, 0}, "DarkMagenta"},
|
||||
{{139, 0, 0, 0}, "dark"},
|
||||
{{139, 0, 0, 0}, "DarkRed"},
|
||||
{{144, 238, 144, 0}, "light"},
|
||||
{{144, 238, 144, 0}, "LightGreen"},
|
||||
{{ 0, 0, 0, 0}, NULL}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <X11/Xatom.h>
|
||||
@@ -8,436 +7,386 @@
|
||||
|
||||
#define MAX_PROPERTY_SIZE 8*1024
|
||||
|
||||
|
||||
char *WMSelectionOwnerDidChangeNotification = "WMSelectionOwnerDidChange";
|
||||
|
||||
|
||||
typedef struct SelectionHandler {
|
||||
WMView *view;
|
||||
Atom selection;
|
||||
Time timestamp;
|
||||
WMSelectionProcs procs;
|
||||
void *data;
|
||||
WMView *view;
|
||||
Atom selection;
|
||||
Time timestamp;
|
||||
WMSelectionProcs procs;
|
||||
void *data;
|
||||
|
||||
struct {
|
||||
unsigned delete_pending:1;
|
||||
unsigned done_pending:1;
|
||||
} flags;
|
||||
struct {
|
||||
unsigned delete_pending:1;
|
||||
unsigned done_pending:1;
|
||||
} flags;
|
||||
} SelectionHandler;
|
||||
|
||||
|
||||
typedef struct SelectionCallback {
|
||||
WMView *view;
|
||||
Atom selection;
|
||||
Atom target;
|
||||
Time timestamp;
|
||||
WMSelectionCallback *callback;
|
||||
void *data;
|
||||
WMView *view;
|
||||
Atom selection;
|
||||
Atom target;
|
||||
Time timestamp;
|
||||
WMSelectionCallback *callback;
|
||||
void *data;
|
||||
|
||||
struct {
|
||||
unsigned delete_pending:1;
|
||||
unsigned done_pending:1;
|
||||
} flags;
|
||||
struct {
|
||||
unsigned delete_pending:1;
|
||||
unsigned done_pending:1;
|
||||
} flags;
|
||||
} SelectionCallback;
|
||||
|
||||
|
||||
|
||||
static WMArray *selCallbacks = NULL;
|
||||
|
||||
static WMArray *selHandlers = NULL;
|
||||
|
||||
static Bool gotXError = False;
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
WMDeleteSelectionHandler(WMView *view, Atom selection, Time timestamp)
|
||||
void WMDeleteSelectionHandler(WMView * view, Atom selection, Time timestamp)
|
||||
{
|
||||
SelectionHandler *handler;
|
||||
Display *dpy = W_VIEW_SCREEN(view)->display;
|
||||
Window win = W_VIEW_DRAWABLE(view);
|
||||
WMArrayIterator iter;
|
||||
SelectionHandler *handler;
|
||||
Display *dpy = W_VIEW_SCREEN(view)->display;
|
||||
Window win = W_VIEW_DRAWABLE(view);
|
||||
WMArrayIterator iter;
|
||||
|
||||
if (!selHandlers)
|
||||
return;
|
||||
|
||||
/*//printf("deleting selection handler for %d", win);*/
|
||||
|
||||
WM_ITERATE_ARRAY(selHandlers, handler, iter) {
|
||||
if (handler->view == view
|
||||
&& (handler->selection == selection || selection == None)
|
||||
&& (handler->timestamp == timestamp || timestamp == CurrentTime)) {
|
||||
|
||||
if (handler->flags.done_pending) {
|
||||
handler->flags.delete_pending = 1;
|
||||
/*//puts(": postponed because still pending");*/
|
||||
return;
|
||||
}
|
||||
/*//printf(": found & removed");*/
|
||||
WMRemoveFromArray(selHandlers, handler);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*//printf("\n");*/
|
||||
|
||||
XGrabServer(dpy);
|
||||
if (XGetSelectionOwner(dpy, selection) == win) {
|
||||
XSetSelectionOwner(dpy, selection, None, timestamp);
|
||||
}
|
||||
XUngrabServer(dpy);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
WMDeleteSelectionCallback(WMView *view, Atom selection, Time timestamp)
|
||||
{
|
||||
SelectionCallback *handler;
|
||||
WMArrayIterator iter;
|
||||
|
||||
if (!selCallbacks)
|
||||
return;
|
||||
|
||||
WM_ITERATE_ARRAY(selCallbacks, handler, iter) {
|
||||
if (handler->view == view
|
||||
&& (handler->selection == selection || selection == None)
|
||||
&& (handler->timestamp == timestamp || timestamp == CurrentTime)) {
|
||||
|
||||
if (handler->flags.done_pending) {
|
||||
handler->flags.delete_pending = 1;
|
||||
if (!selHandlers)
|
||||
return;
|
||||
}
|
||||
WMRemoveFromArray(selCallbacks, handler);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*//printf("deleting selection handler for %d", win); */
|
||||
|
||||
static int
|
||||
handleXError(Display *dpy, XErrorEvent *ev)
|
||||
{
|
||||
gotXError = True;
|
||||
WM_ITERATE_ARRAY(selHandlers, handler, iter) {
|
||||
if (handler->view == view && (handler->selection == selection || selection == None)
|
||||
&& (handler->timestamp == timestamp || timestamp == CurrentTime)) {
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static Bool
|
||||
writeSelection(Display *dpy, Window requestor, Atom property, Atom type,
|
||||
WMData *data)
|
||||
{
|
||||
static void *oldHandler;
|
||||
int format, bpi;
|
||||
|
||||
format = WMGetDataFormat(data);
|
||||
if (format == 0)
|
||||
format = 8;
|
||||
|
||||
bpi = format/8;
|
||||
|
||||
/* printf("write to %x: %s\n", requestor, XGetAtomName(dpy, property)); */
|
||||
|
||||
oldHandler = XSetErrorHandler(handleXError);
|
||||
|
||||
gotXError = False;
|
||||
|
||||
XChangeProperty(dpy, requestor, property, type, format, PropModeReplace,
|
||||
WMDataBytes(data), WMGetDataLength(data)/bpi);
|
||||
|
||||
XFlush(dpy);
|
||||
|
||||
XSetErrorHandler(oldHandler);
|
||||
|
||||
return !gotXError;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
notifySelection(XEvent *event, Atom prop)
|
||||
{
|
||||
XEvent ev;
|
||||
|
||||
/* printf("event to %x\n", event->xselectionrequest.requestor); */
|
||||
|
||||
ev.xselection.type = SelectionNotify;
|
||||
ev.xselection.serial = 0;
|
||||
ev.xselection.send_event = True;
|
||||
ev.xselection.display = event->xselectionrequest.display;
|
||||
ev.xselection.requestor = event->xselectionrequest.requestor;
|
||||
ev.xselection.target = event->xselectionrequest.target;
|
||||
ev.xselection.selection = event->xselectionrequest.selection;
|
||||
ev.xselection.property = prop;
|
||||
ev.xselection.time = event->xselectionrequest.time;
|
||||
|
||||
XSendEvent(event->xany.display, event->xselectionrequest.requestor,
|
||||
False, 0, &ev);
|
||||
XFlush(event->xany.display);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
handleRequestEvent(XEvent *event)
|
||||
{
|
||||
SelectionHandler *handler;
|
||||
WMArrayIterator iter;
|
||||
WMArray *copy;
|
||||
Bool handledRequest;
|
||||
|
||||
WM_ITERATE_ARRAY(selHandlers, handler, iter) {
|
||||
|
||||
switch (event->type) {
|
||||
case SelectionClear:
|
||||
if (W_VIEW_DRAWABLE(handler->view)
|
||||
!= event->xselectionclear.window) {
|
||||
break;
|
||||
}
|
||||
|
||||
handler->flags.done_pending = 1;
|
||||
if (handler->procs.selectionLost)
|
||||
handler->procs.selectionLost(handler->view,
|
||||
handler->selection,
|
||||
handler->data);
|
||||
handler->flags.done_pending = 0;
|
||||
handler->flags.delete_pending = 1;
|
||||
break;
|
||||
|
||||
case SelectionRequest:
|
||||
if (W_VIEW_DRAWABLE(handler->view)!=event->xselectionrequest.owner) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (handler->procs.convertSelection != NULL
|
||||
&& handler->selection == event->xselectionrequest.selection) {
|
||||
Atom atom;
|
||||
WMData *data;
|
||||
Atom prop;
|
||||
|
||||
/* they're requesting for something old.. maybe another handler
|
||||
* can handle it */
|
||||
if (event->xselectionrequest.time < handler->timestamp
|
||||
&& event->xselectionrequest.time != CurrentTime) {
|
||||
break;
|
||||
if (handler->flags.done_pending) {
|
||||
handler->flags.delete_pending = 1;
|
||||
/*//puts(": postponed because still pending"); */
|
||||
return;
|
||||
}
|
||||
/*//printf(": found & removed"); */
|
||||
WMRemoveFromArray(selHandlers, handler);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
handledRequest = False;
|
||||
/*//printf("\n"); */
|
||||
|
||||
XGrabServer(dpy);
|
||||
if (XGetSelectionOwner(dpy, selection) == win) {
|
||||
XSetSelectionOwner(dpy, selection, None, timestamp);
|
||||
}
|
||||
XUngrabServer(dpy);
|
||||
}
|
||||
|
||||
void WMDeleteSelectionCallback(WMView * view, Atom selection, Time timestamp)
|
||||
{
|
||||
SelectionCallback *handler;
|
||||
WMArrayIterator iter;
|
||||
|
||||
if (!selCallbacks)
|
||||
return;
|
||||
|
||||
WM_ITERATE_ARRAY(selCallbacks, handler, iter) {
|
||||
if (handler->view == view && (handler->selection == selection || selection == None)
|
||||
&& (handler->timestamp == timestamp || timestamp == CurrentTime)) {
|
||||
|
||||
if (handler->flags.done_pending) {
|
||||
handler->flags.delete_pending = 1;
|
||||
return;
|
||||
}
|
||||
WMRemoveFromArray(selCallbacks, handler);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int handleXError(Display * dpy, XErrorEvent * ev)
|
||||
{
|
||||
gotXError = True;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static Bool writeSelection(Display * dpy, Window requestor, Atom property, Atom type, WMData * data)
|
||||
{
|
||||
static void *oldHandler;
|
||||
int format, bpi;
|
||||
|
||||
format = WMGetDataFormat(data);
|
||||
if (format == 0)
|
||||
format = 8;
|
||||
|
||||
bpi = format / 8;
|
||||
|
||||
/* printf("write to %x: %s\n", requestor, XGetAtomName(dpy, property)); */
|
||||
|
||||
oldHandler = XSetErrorHandler(handleXError);
|
||||
|
||||
gotXError = False;
|
||||
|
||||
XChangeProperty(dpy, requestor, property, type, format, PropModeReplace,
|
||||
WMDataBytes(data), WMGetDataLength(data) / bpi);
|
||||
|
||||
XFlush(dpy);
|
||||
|
||||
XSetErrorHandler(oldHandler);
|
||||
|
||||
return !gotXError;
|
||||
}
|
||||
|
||||
static void notifySelection(XEvent * event, Atom prop)
|
||||
{
|
||||
XEvent ev;
|
||||
|
||||
/* printf("event to %x\n", event->xselectionrequest.requestor); */
|
||||
|
||||
ev.xselection.type = SelectionNotify;
|
||||
ev.xselection.serial = 0;
|
||||
ev.xselection.send_event = True;
|
||||
ev.xselection.display = event->xselectionrequest.display;
|
||||
ev.xselection.requestor = event->xselectionrequest.requestor;
|
||||
ev.xselection.target = event->xselectionrequest.target;
|
||||
ev.xselection.selection = event->xselectionrequest.selection;
|
||||
ev.xselection.property = prop;
|
||||
ev.xselection.time = event->xselectionrequest.time;
|
||||
|
||||
XSendEvent(event->xany.display, event->xselectionrequest.requestor, False, 0, &ev);
|
||||
XFlush(event->xany.display);
|
||||
}
|
||||
|
||||
static void handleRequestEvent(XEvent * event)
|
||||
{
|
||||
SelectionHandler *handler;
|
||||
WMArrayIterator iter;
|
||||
WMArray *copy;
|
||||
Bool handledRequest;
|
||||
|
||||
WM_ITERATE_ARRAY(selHandlers, handler, iter) {
|
||||
|
||||
switch (event->type) {
|
||||
case SelectionClear:
|
||||
if (W_VIEW_DRAWABLE(handler->view)
|
||||
!= event->xselectionclear.window) {
|
||||
break;
|
||||
}
|
||||
|
||||
handler->flags.done_pending = 1;
|
||||
if (handler->procs.selectionLost)
|
||||
handler->procs.selectionLost(handler->view, handler->selection, handler->data);
|
||||
handler->flags.done_pending = 0;
|
||||
handler->flags.delete_pending = 1;
|
||||
break;
|
||||
|
||||
case SelectionRequest:
|
||||
if (W_VIEW_DRAWABLE(handler->view) != event->xselectionrequest.owner) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (handler->procs.convertSelection != NULL
|
||||
&& handler->selection == event->xselectionrequest.selection) {
|
||||
Atom atom;
|
||||
WMData *data;
|
||||
Atom prop;
|
||||
|
||||
/* they're requesting for something old.. maybe another handler
|
||||
* can handle it */
|
||||
if (event->xselectionrequest.time < handler->timestamp
|
||||
&& event->xselectionrequest.time != CurrentTime) {
|
||||
break;
|
||||
}
|
||||
|
||||
handledRequest = False;
|
||||
|
||||
handler->flags.done_pending = 1;
|
||||
|
||||
data = handler->procs.convertSelection(handler->view,
|
||||
handler->selection,
|
||||
event->xselectionrequest.target,
|
||||
handler->data, &atom);
|
||||
|
||||
prop = event->xselectionrequest.property;
|
||||
/* obsolete clients that don't set the property field */
|
||||
if (prop == None)
|
||||
prop = event->xselectionrequest.target;
|
||||
|
||||
if (data) {
|
||||
if (writeSelection(event->xselectionrequest.display,
|
||||
event->xselectionrequest.requestor, prop, atom, data)) {
|
||||
handledRequest = True;
|
||||
}
|
||||
WMReleaseData(data);
|
||||
}
|
||||
|
||||
notifySelection(event, (handledRequest == True ? prop : None));
|
||||
|
||||
if (handler->procs.selectionDone != NULL) {
|
||||
handler->procs.selectionDone(handler->view,
|
||||
handler->selection,
|
||||
event->xselectionrequest.target,
|
||||
handler->data);
|
||||
}
|
||||
|
||||
handler->flags.done_pending = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* delete handlers */
|
||||
copy = WMDuplicateArray(selHandlers);
|
||||
WM_ITERATE_ARRAY(copy, handler, iter) {
|
||||
if (handler && handler->flags.delete_pending) {
|
||||
WMDeleteSelectionHandler(handler->view, handler->selection, handler->timestamp);
|
||||
}
|
||||
}
|
||||
WMFreeArray(copy);
|
||||
}
|
||||
|
||||
static WMData *getSelectionData(Display * dpy, Window win, Atom where)
|
||||
{
|
||||
WMData *wdata;
|
||||
unsigned char *data;
|
||||
Atom rtype;
|
||||
int bits, bpi;
|
||||
unsigned long len, bytes;
|
||||
|
||||
if (XGetWindowProperty(dpy, win, where, 0, MAX_PROPERTY_SIZE,
|
||||
False, AnyPropertyType, &rtype, &bits, &len, &bytes, &data) != Success) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bpi = bits / 8;
|
||||
|
||||
wdata = WMCreateDataWithBytesNoCopy(data, len * bpi, (WMFreeDataProc *) XFree);
|
||||
WMSetDataFormat(wdata, bits);
|
||||
|
||||
return wdata;
|
||||
}
|
||||
|
||||
static void handleNotifyEvent(XEvent * event)
|
||||
{
|
||||
SelectionCallback *handler;
|
||||
WMArrayIterator iter;
|
||||
WMArray *copy;
|
||||
WMData *data;
|
||||
|
||||
WM_ITERATE_ARRAY(selCallbacks, handler, iter) {
|
||||
|
||||
if (W_VIEW_DRAWABLE(handler->view) != event->xselection.requestor
|
||||
|| handler->selection != event->xselection.selection) {
|
||||
continue;
|
||||
}
|
||||
handler->flags.done_pending = 1;
|
||||
|
||||
data = handler->procs.convertSelection(handler->view,
|
||||
handler->selection,
|
||||
event->xselectionrequest.target,
|
||||
handler->data,
|
||||
&atom);
|
||||
|
||||
prop = event->xselectionrequest.property;
|
||||
/* obsolete clients that don't set the property field */
|
||||
if (prop == None)
|
||||
prop = event->xselectionrequest.target;
|
||||
|
||||
if (data) {
|
||||
if (writeSelection(event->xselectionrequest.display,
|
||||
event->xselectionrequest.requestor,
|
||||
prop, atom, data)) {
|
||||
handledRequest = True;
|
||||
}
|
||||
WMReleaseData(data);
|
||||
}
|
||||
|
||||
notifySelection(event, (handledRequest==True ? prop : None));
|
||||
|
||||
if (handler->procs.selectionDone != NULL) {
|
||||
handler->procs.selectionDone(handler->view,
|
||||
handler->selection,
|
||||
event->xselectionrequest.target,
|
||||
handler->data);
|
||||
if (event->xselection.property == None) {
|
||||
data = NULL;
|
||||
} else {
|
||||
data = getSelectionData(event->xselection.display,
|
||||
event->xselection.requestor, event->xselection.property);
|
||||
}
|
||||
|
||||
(*handler->callback) (handler->view, handler->selection,
|
||||
handler->target, handler->timestamp, handler->data, data);
|
||||
|
||||
if (data != NULL) {
|
||||
WMReleaseData(data);
|
||||
}
|
||||
handler->flags.done_pending = 0;
|
||||
}
|
||||
break;
|
||||
handler->flags.delete_pending = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* delete handlers */
|
||||
copy = WMDuplicateArray(selHandlers);
|
||||
WM_ITERATE_ARRAY(copy, handler, iter) {
|
||||
if (handler && handler->flags.delete_pending) {
|
||||
WMDeleteSelectionHandler(handler->view, handler->selection,
|
||||
handler->timestamp);
|
||||
}
|
||||
}
|
||||
WMFreeArray(copy);
|
||||
/* delete callbacks */
|
||||
copy = WMDuplicateArray(selCallbacks);
|
||||
WM_ITERATE_ARRAY(copy, handler, iter) {
|
||||
if (handler && handler->flags.delete_pending) {
|
||||
WMDeleteSelectionCallback(handler->view, handler->selection, handler->timestamp);
|
||||
}
|
||||
}
|
||||
WMFreeArray(copy);
|
||||
}
|
||||
|
||||
|
||||
static WMData*
|
||||
getSelectionData(Display *dpy, Window win, Atom where)
|
||||
void W_HandleSelectionEvent(XEvent * event)
|
||||
{
|
||||
WMData *wdata;
|
||||
unsigned char *data;
|
||||
Atom rtype;
|
||||
unsigned bits, bpi;
|
||||
unsigned long len, bytes;
|
||||
/*//printf("%d received selection ", event->xany.window); */
|
||||
/*//switch(event->type) {
|
||||
case SelectionNotify:
|
||||
puts("notify"); break;
|
||||
case SelectionRequest:
|
||||
puts("request"); break;
|
||||
case SelectionClear:
|
||||
puts("clear"); break;
|
||||
default:
|
||||
puts("unknown"); break;
|
||||
} */
|
||||
|
||||
|
||||
if (XGetWindowProperty(dpy, win, where, 0, MAX_PROPERTY_SIZE,
|
||||
False, AnyPropertyType, &rtype, &bits, &len,
|
||||
&bytes, &data)!=Success) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bpi = bits/8;
|
||||
|
||||
wdata = WMCreateDataWithBytesNoCopy(data, len*bpi, (WMFreeDataProc*)XFree);
|
||||
WMSetDataFormat(wdata, bits);
|
||||
|
||||
return wdata;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
handleNotifyEvent(XEvent *event)
|
||||
{
|
||||
SelectionCallback *handler;
|
||||
WMArrayIterator iter;
|
||||
WMArray *copy;
|
||||
WMData *data;
|
||||
|
||||
WM_ITERATE_ARRAY(selCallbacks, handler, iter) {
|
||||
|
||||
if (W_VIEW_DRAWABLE(handler->view) != event->xselection.requestor
|
||||
|| handler->selection != event->xselection.selection) {
|
||||
continue;
|
||||
}
|
||||
handler->flags.done_pending = 1;
|
||||
|
||||
if (event->xselection.property == None) {
|
||||
data = NULL;
|
||||
if (event->type == SelectionNotify) {
|
||||
handleNotifyEvent(event);
|
||||
} else {
|
||||
data = getSelectionData(event->xselection.display,
|
||||
event->xselection.requestor,
|
||||
event->xselection.property);
|
||||
handleRequestEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
Bool WMCreateSelectionHandler(WMView * view, Atom selection, Time timestamp, WMSelectionProcs * procs, void *cdata)
|
||||
{
|
||||
SelectionHandler *handler;
|
||||
Display *dpy = W_VIEW_SCREEN(view)->display;
|
||||
|
||||
XSetSelectionOwner(dpy, selection, W_VIEW_DRAWABLE(view), timestamp);
|
||||
if (XGetSelectionOwner(dpy, selection) != W_VIEW_DRAWABLE(view)) {
|
||||
return False;
|
||||
}
|
||||
|
||||
(*handler->callback)(handler->view, handler->selection,
|
||||
handler->target, handler->timestamp,
|
||||
handler->data, data);
|
||||
WMPostNotificationName(WMSelectionOwnerDidChangeNotification, (void *)selection, (void *)view);
|
||||
|
||||
if (data != NULL) {
|
||||
WMReleaseData(data);
|
||||
/*//printf("created selection handler for %d\n", W_VIEW_DRAWABLE(view)); */
|
||||
|
||||
handler = wmalloc(sizeof(SelectionHandler));
|
||||
|
||||
handler->view = view;
|
||||
handler->selection = selection;
|
||||
handler->timestamp = timestamp;
|
||||
handler->procs = *procs;
|
||||
handler->data = cdata;
|
||||
memset(&handler->flags, 0, sizeof(handler->flags));
|
||||
|
||||
if (selHandlers == NULL) {
|
||||
selHandlers = WMCreateArrayWithDestructor(4, wfree);
|
||||
}
|
||||
handler->flags.done_pending = 0;
|
||||
handler->flags.delete_pending = 1;
|
||||
}
|
||||
|
||||
/* delete callbacks */
|
||||
copy = WMDuplicateArray(selCallbacks);
|
||||
WM_ITERATE_ARRAY(copy, handler, iter) {
|
||||
if (handler && handler->flags.delete_pending) {
|
||||
WMDeleteSelectionCallback(handler->view, handler->selection,
|
||||
handler->timestamp);
|
||||
}
|
||||
}
|
||||
WMFreeArray(copy);
|
||||
WMAddToArray(selHandlers, handler);
|
||||
|
||||
return True;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
W_HandleSelectionEvent(XEvent *event)
|
||||
{
|
||||
/*//printf("%d received selection ", event->xany.window);*/
|
||||
/*//switch(event->type) {
|
||||
case SelectionNotify:
|
||||
puts("notify"); break;
|
||||
case SelectionRequest:
|
||||
puts("request"); break;
|
||||
case SelectionClear:
|
||||
puts("clear"); break;
|
||||
default:
|
||||
puts("unknown"); break;
|
||||
}*/
|
||||
|
||||
if (event->type == SelectionNotify) {
|
||||
handleNotifyEvent(event);
|
||||
} else {
|
||||
handleRequestEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Bool
|
||||
WMCreateSelectionHandler(WMView *view, Atom selection, Time timestamp,
|
||||
WMSelectionProcs *procs, void *cdata)
|
||||
WMRequestSelection(WMView * view, Atom selection, Atom target, Time timestamp,
|
||||
WMSelectionCallback * callback, void *cdata)
|
||||
{
|
||||
SelectionHandler *handler;
|
||||
Display *dpy = W_VIEW_SCREEN(view)->display;
|
||||
SelectionCallback *handler;
|
||||
|
||||
XSetSelectionOwner(dpy, selection, W_VIEW_DRAWABLE(view), timestamp);
|
||||
if (XGetSelectionOwner(dpy, selection) != W_VIEW_DRAWABLE(view)) {
|
||||
return False;
|
||||
}
|
||||
if (XGetSelectionOwner(W_VIEW_SCREEN(view)->display, selection) == None)
|
||||
return False;
|
||||
|
||||
WMPostNotificationName(WMSelectionOwnerDidChangeNotification,
|
||||
(void*)selection, (void*)view);
|
||||
if (!XConvertSelection(W_VIEW_SCREEN(view)->display, selection, target,
|
||||
W_VIEW_SCREEN(view)->clipboardAtom, W_VIEW_DRAWABLE(view), timestamp)) {
|
||||
return False;
|
||||
}
|
||||
|
||||
/*//printf("created selection handler for %d\n", W_VIEW_DRAWABLE(view));*/
|
||||
handler = wmalloc(sizeof(SelectionCallback));
|
||||
|
||||
handler = wmalloc(sizeof(SelectionHandler));
|
||||
handler->view = view;
|
||||
handler->selection = selection;
|
||||
handler->target = target;
|
||||
handler->timestamp = timestamp;
|
||||
handler->callback = callback;
|
||||
handler->data = cdata;
|
||||
memset(&handler->flags, 0, sizeof(handler->flags));
|
||||
|
||||
handler->view = view;
|
||||
handler->selection = selection;
|
||||
handler->timestamp = timestamp;
|
||||
handler->procs = *procs;
|
||||
handler->data = cdata;
|
||||
memset(&handler->flags, 0, sizeof(handler->flags));
|
||||
if (selCallbacks == NULL) {
|
||||
selCallbacks = WMCreateArrayWithDestructor(4, wfree);
|
||||
}
|
||||
|
||||
if (selHandlers == NULL) {
|
||||
selHandlers = WMCreateArrayWithDestructor(4, wfree);
|
||||
}
|
||||
WMAddToArray(selCallbacks, handler);
|
||||
|
||||
WMAddToArray(selHandlers, handler);
|
||||
|
||||
return True;
|
||||
return True;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Bool
|
||||
WMRequestSelection(WMView *view, Atom selection, Atom target, Time timestamp,
|
||||
WMSelectionCallback *callback, void *cdata)
|
||||
{
|
||||
SelectionCallback *handler;
|
||||
|
||||
if (XGetSelectionOwner(W_VIEW_SCREEN(view)->display, selection) == None)
|
||||
return False;
|
||||
|
||||
if (!XConvertSelection(W_VIEW_SCREEN(view)->display, selection, target,
|
||||
W_VIEW_SCREEN(view)->clipboardAtom,
|
||||
W_VIEW_DRAWABLE(view), timestamp)) {
|
||||
return False;
|
||||
}
|
||||
|
||||
handler = wmalloc(sizeof(SelectionCallback));
|
||||
|
||||
handler->view = view;
|
||||
handler->selection = selection;
|
||||
handler->target = target;
|
||||
handler->timestamp = timestamp;
|
||||
handler->callback = callback;
|
||||
handler->data = cdata;
|
||||
memset(&handler->flags, 0, sizeof(handler->flags));
|
||||
|
||||
if (selCallbacks == NULL) {
|
||||
selCallbacks = WMCreateArrayWithDestructor(4, wfree);
|
||||
}
|
||||
|
||||
WMAddToArray(selCallbacks, handler);
|
||||
|
||||
return True;
|
||||
}
|
||||
|
||||
|
||||
446
WINGs/snprintf.c
446
WINGs/snprintf.c
@@ -35,9 +35,9 @@
|
||||
* original. Also, there is now a builtin-test, just compile with:
|
||||
* gcc -DTEST_SNPRINTF -o snprintf snprintf.c -lm
|
||||
* and run snprintf for results.
|
||||
*
|
||||
*
|
||||
* Thomas Roessler <roessler@guug.de> 01/27/98 for mutt 0.89i
|
||||
* The PGP code was using unsigned hexadecimal formats.
|
||||
* The PGP code was using unsigned hexadecimal formats.
|
||||
* Unfortunately, unsigned formats simply didn't work.
|
||||
*
|
||||
* Michael Elkins <me@cs.hmc.edu> 03/05/98 for mutt 0.90.8
|
||||
@@ -55,7 +55,7 @@
|
||||
*
|
||||
**************************************************************/
|
||||
|
||||
#ifndef NO_CONFIG_H /* for some tests */
|
||||
#ifndef NO_CONFIG_H /* for some tests */
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
@@ -78,8 +78,10 @@
|
||||
#if defined(HAVE_SNPRINTF) && defined(HAVE_VSNPRINTF) && defined(HAVE_C99_VSNPRINTF)
|
||||
/* only include stdio.h if we are not re-defining snprintf or vsnprintf */
|
||||
#include <stdio.h>
|
||||
/* make the compiler happy with an empty file */
|
||||
void dummy_snprintf(void) {}
|
||||
/* make the compiler happy with an empty file */
|
||||
void dummy_snprintf(void)
|
||||
{
|
||||
}
|
||||
#else
|
||||
|
||||
#ifdef HAVE_LONG_DOUBLE
|
||||
@@ -94,15 +96,12 @@
|
||||
#define LLONG long
|
||||
#endif
|
||||
|
||||
static size_t dopr(char *buffer, size_t maxlen, const char *format,
|
||||
va_list args);
|
||||
static void fmtstr(char *buffer, size_t *currlen, size_t maxlen,
|
||||
char *value, int flags, int min, int max);
|
||||
static void fmtint(char *buffer, size_t *currlen, size_t maxlen,
|
||||
long value, int base, int min, int max, int flags);
|
||||
static void fmtfp(char *buffer, size_t *currlen, size_t maxlen,
|
||||
LDOUBLE fvalue, int min, int max, int flags);
|
||||
static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c);
|
||||
static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args);
|
||||
static void fmtstr(char *buffer, size_t * currlen, size_t maxlen, char *value, int flags, int min, int max);
|
||||
static void fmtint(char *buffer, size_t * currlen, size_t maxlen,
|
||||
long value, int base, int min, int max, int flags);
|
||||
static void fmtfp(char *buffer, size_t * currlen, size_t maxlen, LDOUBLE fvalue, int min, int max, int flags);
|
||||
static void dopr_outch(char *buffer, size_t * currlen, size_t maxlen, char c);
|
||||
|
||||
/*
|
||||
* dopr(): poor man's version of doprintf
|
||||
@@ -150,22 +149,22 @@ static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args
|
||||
int flags;
|
||||
int cflags;
|
||||
size_t currlen;
|
||||
|
||||
|
||||
state = DP_S_DEFAULT;
|
||||
currlen = flags = cflags = min = 0;
|
||||
max = -1;
|
||||
ch = *format++;
|
||||
|
||||
|
||||
while (state != DP_S_DONE) {
|
||||
if (ch == '\0')
|
||||
if (ch == '\0')
|
||||
state = DP_S_DONE;
|
||||
|
||||
switch(state) {
|
||||
switch (state) {
|
||||
case DP_S_DEFAULT:
|
||||
if (ch == '%')
|
||||
if (ch == '%')
|
||||
state = DP_S_FLAGS;
|
||||
else
|
||||
dopr_outch (buffer, &currlen, maxlen, ch);
|
||||
else
|
||||
dopr_outch(buffer, &currlen, maxlen, ch);
|
||||
ch = *format++;
|
||||
break;
|
||||
case DP_S_FLAGS:
|
||||
@@ -197,10 +196,10 @@ static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args
|
||||
break;
|
||||
case DP_S_MIN:
|
||||
if (isdigit((unsigned char)ch)) {
|
||||
min = 10*min + char_to_int (ch);
|
||||
min = 10 * min + char_to_int(ch);
|
||||
ch = *format++;
|
||||
} else if (ch == '*') {
|
||||
min = va_arg (args, int);
|
||||
min = va_arg(args, int);
|
||||
ch = *format++;
|
||||
state = DP_S_DOT;
|
||||
} else {
|
||||
@@ -211,7 +210,7 @@ static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args
|
||||
if (ch == '.') {
|
||||
state = DP_S_MAX;
|
||||
ch = *format++;
|
||||
} else {
|
||||
} else {
|
||||
state = DP_S_MOD;
|
||||
}
|
||||
break;
|
||||
@@ -219,10 +218,10 @@ static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args
|
||||
if (isdigit((unsigned char)ch)) {
|
||||
if (max < 0)
|
||||
max = 0;
|
||||
max = 10*max + char_to_int (ch);
|
||||
max = 10 * max + char_to_int(ch);
|
||||
ch = *format++;
|
||||
} else if (ch == '*') {
|
||||
max = va_arg (args, int);
|
||||
max = va_arg(args, int);
|
||||
ch = *format++;
|
||||
state = DP_S_MOD;
|
||||
} else {
|
||||
@@ -256,114 +255,115 @@ static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args
|
||||
switch (ch) {
|
||||
case 'd':
|
||||
case 'i':
|
||||
if (cflags == DP_C_SHORT)
|
||||
value = va_arg (args, int);
|
||||
if (cflags == DP_C_SHORT)
|
||||
value = va_arg(args, int);
|
||||
else if (cflags == DP_C_LONG)
|
||||
value = va_arg (args, long int);
|
||||
value = va_arg(args, long int);
|
||||
else if (cflags == DP_C_LLONG)
|
||||
value = va_arg (args, LLONG);
|
||||
value = va_arg(args, LLONG);
|
||||
else
|
||||
value = va_arg (args, int);
|
||||
fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags);
|
||||
value = va_arg(args, int);
|
||||
fmtint(buffer, &currlen, maxlen, value, 10, min, max, flags);
|
||||
break;
|
||||
case 'o':
|
||||
flags |= DP_F_UNSIGNED;
|
||||
if (cflags == DP_C_SHORT)
|
||||
value = va_arg (args, unsigned int);
|
||||
value = va_arg(args, unsigned int);
|
||||
else if (cflags == DP_C_LONG)
|
||||
value = (long)va_arg (args, unsigned long int);
|
||||
value = (long)va_arg(args, unsigned long int);
|
||||
else if (cflags == DP_C_LLONG)
|
||||
value = (long)va_arg (args, unsigned LLONG);
|
||||
value = (long)va_arg(args, unsigned LLONG);
|
||||
else
|
||||
value = (long)va_arg (args, unsigned int);
|
||||
fmtint (buffer, &currlen, maxlen, value, 8, min, max, flags);
|
||||
value = (long)va_arg(args, unsigned int);
|
||||
fmtint(buffer, &currlen, maxlen, value, 8, min, max, flags);
|
||||
break;
|
||||
case 'u':
|
||||
flags |= DP_F_UNSIGNED;
|
||||
if (cflags == DP_C_SHORT)
|
||||
value = va_arg (args, unsigned int);
|
||||
value = va_arg(args, unsigned int);
|
||||
else if (cflags == DP_C_LONG)
|
||||
value = (long)va_arg (args, unsigned long int);
|
||||
value = (long)va_arg(args, unsigned long int);
|
||||
else if (cflags == DP_C_LLONG)
|
||||
value = (LLONG)va_arg (args, unsigned LLONG);
|
||||
value = (LLONG) va_arg(args, unsigned LLONG);
|
||||
else
|
||||
value = (long)va_arg (args, unsigned int);
|
||||
fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags);
|
||||
value = (long)va_arg(args, unsigned int);
|
||||
fmtint(buffer, &currlen, maxlen, value, 10, min, max, flags);
|
||||
break;
|
||||
case 'X':
|
||||
flags |= DP_F_UP;
|
||||
case 'x':
|
||||
flags |= DP_F_UNSIGNED;
|
||||
if (cflags == DP_C_SHORT)
|
||||
value = va_arg (args, unsigned int);
|
||||
value = va_arg(args, unsigned int);
|
||||
else if (cflags == DP_C_LONG)
|
||||
value = (long)va_arg (args, unsigned long int);
|
||||
value = (long)va_arg(args, unsigned long int);
|
||||
else if (cflags == DP_C_LLONG)
|
||||
value = (LLONG)va_arg (args, unsigned LLONG);
|
||||
value = (LLONG) va_arg(args, unsigned LLONG);
|
||||
else
|
||||
value = (long)va_arg (args, unsigned int);
|
||||
fmtint (buffer, &currlen, maxlen, value, 16, min, max, flags);
|
||||
value = (long)va_arg(args, unsigned int);
|
||||
fmtint(buffer, &currlen, maxlen, value, 16, min, max, flags);
|
||||
break;
|
||||
case 'f':
|
||||
if (cflags == DP_C_LDOUBLE)
|
||||
fvalue = va_arg (args, LDOUBLE);
|
||||
fvalue = va_arg(args, LDOUBLE);
|
||||
else
|
||||
fvalue = va_arg (args, double);
|
||||
fvalue = va_arg(args, double);
|
||||
/* um, floating point? */
|
||||
fmtfp (buffer, &currlen, maxlen, fvalue, min, max, flags);
|
||||
fmtfp(buffer, &currlen, maxlen, fvalue, min, max, flags);
|
||||
break;
|
||||
case 'E':
|
||||
flags |= DP_F_UP;
|
||||
case 'e':
|
||||
if (cflags == DP_C_LDOUBLE)
|
||||
fvalue = va_arg (args, LDOUBLE);
|
||||
fvalue = va_arg(args, LDOUBLE);
|
||||
else
|
||||
fvalue = va_arg (args, double);
|
||||
fvalue = va_arg(args, double);
|
||||
break;
|
||||
case 'G':
|
||||
flags |= DP_F_UP;
|
||||
case 'g':
|
||||
if (cflags == DP_C_LDOUBLE)
|
||||
fvalue = va_arg (args, LDOUBLE);
|
||||
fvalue = va_arg(args, LDOUBLE);
|
||||
else
|
||||
fvalue = va_arg (args, double);
|
||||
fvalue = va_arg(args, double);
|
||||
break;
|
||||
case 'c':
|
||||
dopr_outch (buffer, &currlen, maxlen, va_arg (args, int));
|
||||
dopr_outch(buffer, &currlen, maxlen, va_arg(args, int));
|
||||
break;
|
||||
case 's':
|
||||
strvalue = va_arg (args, char *);
|
||||
strvalue = va_arg(args, char *);
|
||||
if (max == -1) {
|
||||
max = strlen(strvalue);
|
||||
}
|
||||
if (min > 0 && max >= 0 && min > max) max = min;
|
||||
fmtstr (buffer, &currlen, maxlen, strvalue, flags, min, max);
|
||||
if (min > 0 && max >= 0 && min > max)
|
||||
max = min;
|
||||
fmtstr(buffer, &currlen, maxlen, strvalue, flags, min, max);
|
||||
break;
|
||||
case 'p':
|
||||
strvalue = va_arg (args, void *);
|
||||
fmtint (buffer, &currlen, maxlen, (long) strvalue, 16, min, max, flags);
|
||||
strvalue = va_arg(args, void *);
|
||||
fmtint(buffer, &currlen, maxlen, (long)strvalue, 16, min, max, flags);
|
||||
break;
|
||||
case 'n':
|
||||
if (cflags == DP_C_SHORT) {
|
||||
short int *num;
|
||||
num = va_arg (args, short int *);
|
||||
num = va_arg(args, short int *);
|
||||
*num = currlen;
|
||||
} else if (cflags == DP_C_LONG) {
|
||||
long int *num;
|
||||
num = va_arg (args, long int *);
|
||||
num = va_arg(args, long int *);
|
||||
*num = (long int)currlen;
|
||||
} else if (cflags == DP_C_LLONG) {
|
||||
LLONG *num;
|
||||
num = va_arg (args, LLONG *);
|
||||
*num = (LLONG)currlen;
|
||||
num = va_arg(args, LLONG *);
|
||||
*num = (LLONG) currlen;
|
||||
} else {
|
||||
int *num;
|
||||
num = va_arg (args, int *);
|
||||
num = va_arg(args, int *);
|
||||
*num = currlen;
|
||||
}
|
||||
break;
|
||||
case '%':
|
||||
dopr_outch (buffer, &currlen, maxlen, ch);
|
||||
dopr_outch(buffer, &currlen, maxlen, ch);
|
||||
break;
|
||||
case 'w':
|
||||
/* not supported yet, treat as next char */
|
||||
@@ -382,23 +382,22 @@ static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args
|
||||
break;
|
||||
default:
|
||||
/* hmm? */
|
||||
break; /* some picky compilers need this */
|
||||
break; /* some picky compilers need this */
|
||||
}
|
||||
}
|
||||
if (maxlen != 0) {
|
||||
if (currlen < maxlen - 1)
|
||||
if (currlen < maxlen - 1)
|
||||
buffer[currlen] = '\0';
|
||||
else if (maxlen > 0)
|
||||
else if (maxlen > 0)
|
||||
buffer[maxlen - 1] = '\0';
|
||||
}
|
||||
|
||||
|
||||
return currlen;
|
||||
}
|
||||
|
||||
static void fmtstr(char *buffer, size_t *currlen, size_t maxlen,
|
||||
char *value, int flags, int min, int max)
|
||||
static void fmtstr(char *buffer, size_t * currlen, size_t maxlen, char *value, int flags, int min, int max)
|
||||
{
|
||||
int padlen, strln; /* amount to pad */
|
||||
int padlen, strln; /* amount to pad */
|
||||
int cnt = 0;
|
||||
|
||||
#ifdef DEBUG_SNPRINTF
|
||||
@@ -408,24 +407,24 @@ static void fmtstr(char *buffer, size_t *currlen, size_t maxlen,
|
||||
value = "<NULL>";
|
||||
}
|
||||
|
||||
for (strln = 0; value[strln]; ++strln); /* strlen */
|
||||
for (strln = 0; value[strln]; ++strln) ; /* strlen */
|
||||
padlen = min - strln;
|
||||
if (padlen < 0)
|
||||
if (padlen < 0)
|
||||
padlen = 0;
|
||||
if (flags & DP_F_MINUS)
|
||||
padlen = -padlen; /* Left Justify */
|
||||
|
||||
if (flags & DP_F_MINUS)
|
||||
padlen = -padlen; /* Left Justify */
|
||||
|
||||
while ((padlen > 0) && (cnt < max)) {
|
||||
dopr_outch (buffer, currlen, maxlen, ' ');
|
||||
dopr_outch(buffer, currlen, maxlen, ' ');
|
||||
--padlen;
|
||||
++cnt;
|
||||
}
|
||||
while (*value && (cnt < max)) {
|
||||
dopr_outch (buffer, currlen, maxlen, *value++);
|
||||
dopr_outch(buffer, currlen, maxlen, *value++);
|
||||
++cnt;
|
||||
}
|
||||
while ((padlen < 0) && (cnt < max)) {
|
||||
dopr_outch (buffer, currlen, maxlen, ' ');
|
||||
dopr_outch(buffer, currlen, maxlen, ' ');
|
||||
++padlen;
|
||||
++cnt;
|
||||
}
|
||||
@@ -433,86 +432,88 @@ static void fmtstr(char *buffer, size_t *currlen, size_t maxlen,
|
||||
|
||||
/* Have to handle DP_F_NUM (ie 0x and 0 alternates) */
|
||||
|
||||
static void fmtint(char *buffer, size_t *currlen, size_t maxlen,
|
||||
long value, int base, int min, int max, int flags)
|
||||
static void fmtint(char *buffer, size_t * currlen, size_t maxlen,
|
||||
long value, int base, int min, int max, int flags)
|
||||
{
|
||||
int signvalue = 0;
|
||||
unsigned long uvalue;
|
||||
char convert[20];
|
||||
int place = 0;
|
||||
int spadlen = 0; /* amount to space pad */
|
||||
int zpadlen = 0; /* amount to zero pad */
|
||||
int spadlen = 0; /* amount to space pad */
|
||||
int zpadlen = 0; /* amount to zero pad */
|
||||
int caps = 0;
|
||||
|
||||
|
||||
if (max < 0)
|
||||
max = 0;
|
||||
|
||||
|
||||
uvalue = value;
|
||||
|
||||
if(!(flags & DP_F_UNSIGNED)) {
|
||||
if( value < 0 ) {
|
||||
|
||||
if (!(flags & DP_F_UNSIGNED)) {
|
||||
if (value < 0) {
|
||||
signvalue = '-';
|
||||
uvalue = -value;
|
||||
} else {
|
||||
if (flags & DP_F_PLUS) /* Do a sign (+/i) */
|
||||
if (flags & DP_F_PLUS) /* Do a sign (+/i) */
|
||||
signvalue = '+';
|
||||
else if (flags & DP_F_SPACE)
|
||||
signvalue = ' ';
|
||||
}
|
||||
}
|
||||
|
||||
if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */
|
||||
|
||||
if (flags & DP_F_UP)
|
||||
caps = 1; /* Should characters be upper case? */
|
||||
|
||||
do {
|
||||
convert[place++] =
|
||||
(caps? "0123456789ABCDEF":"0123456789abcdef")
|
||||
[uvalue % (unsigned)base ];
|
||||
uvalue = (uvalue / (unsigned)base );
|
||||
} while(uvalue && (place < 20));
|
||||
if (place == 20) place--;
|
||||
convert[place++] = (caps ? "0123456789ABCDEF" : "0123456789abcdef")
|
||||
[uvalue % (unsigned)base];
|
||||
uvalue = (uvalue / (unsigned)base);
|
||||
} while (uvalue && (place < 20));
|
||||
if (place == 20)
|
||||
place--;
|
||||
convert[place] = 0;
|
||||
|
||||
zpadlen = max - place;
|
||||
spadlen = min - MAX (max, place) - (signvalue ? 1 : 0);
|
||||
if (zpadlen < 0) zpadlen = 0;
|
||||
if (spadlen < 0) spadlen = 0;
|
||||
spadlen = min - MAX(max, place) - (signvalue ? 1 : 0);
|
||||
if (zpadlen < 0)
|
||||
zpadlen = 0;
|
||||
if (spadlen < 0)
|
||||
spadlen = 0;
|
||||
if (flags & DP_F_ZERO) {
|
||||
zpadlen = MAX(zpadlen, spadlen);
|
||||
spadlen = 0;
|
||||
}
|
||||
if (flags & DP_F_MINUS)
|
||||
spadlen = -spadlen; /* Left Justifty */
|
||||
if (flags & DP_F_MINUS)
|
||||
spadlen = -spadlen; /* Left Justifty */
|
||||
|
||||
#ifdef DEBUG_SNPRINTF
|
||||
printf("zpad: %d, spad: %d, min: %d, max: %d, place: %d\n",
|
||||
zpadlen, spadlen, min, max, place);
|
||||
printf("zpad: %d, spad: %d, min: %d, max: %d, place: %d\n", zpadlen, spadlen, min, max, place);
|
||||
#endif
|
||||
|
||||
/* Spaces */
|
||||
while (spadlen > 0) {
|
||||
dopr_outch (buffer, currlen, maxlen, ' ');
|
||||
dopr_outch(buffer, currlen, maxlen, ' ');
|
||||
--spadlen;
|
||||
}
|
||||
|
||||
/* Sign */
|
||||
if (signvalue)
|
||||
dopr_outch (buffer, currlen, maxlen, signvalue);
|
||||
if (signvalue)
|
||||
dopr_outch(buffer, currlen, maxlen, signvalue);
|
||||
|
||||
/* Zeros */
|
||||
if (zpadlen > 0) {
|
||||
while (zpadlen > 0) {
|
||||
dopr_outch (buffer, currlen, maxlen, '0');
|
||||
dopr_outch(buffer, currlen, maxlen, '0');
|
||||
--zpadlen;
|
||||
}
|
||||
}
|
||||
|
||||
/* Digits */
|
||||
while (place > 0)
|
||||
dopr_outch (buffer, currlen, maxlen, convert[--place]);
|
||||
|
||||
while (place > 0)
|
||||
dopr_outch(buffer, currlen, maxlen, convert[--place]);
|
||||
|
||||
/* Left Justified spaces */
|
||||
while (spadlen < 0) {
|
||||
dopr_outch (buffer, currlen, maxlen, ' ');
|
||||
dopr_outch(buffer, currlen, maxlen, ' ');
|
||||
++spadlen;
|
||||
}
|
||||
}
|
||||
@@ -523,19 +524,19 @@ static LDOUBLE abs_val(LDOUBLE value)
|
||||
|
||||
if (value < 0)
|
||||
result = -value;
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static LDOUBLE POW10(int exp)
|
||||
{
|
||||
LDOUBLE result = 1;
|
||||
|
||||
|
||||
while (exp) {
|
||||
result *= 10;
|
||||
exp--;
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -543,15 +544,16 @@ static LLONG ROUND(LDOUBLE value)
|
||||
{
|
||||
LLONG intpart;
|
||||
|
||||
intpart = (LLONG)value;
|
||||
intpart = (LLONG) value;
|
||||
value = value - intpart;
|
||||
if (value >= 0.5) intpart++;
|
||||
|
||||
if (value >= 0.5)
|
||||
intpart++;
|
||||
|
||||
return intpart;
|
||||
}
|
||||
|
||||
/* a replacement for modf that doesn't need the math library. Should
|
||||
be portable, but slow */
|
||||
be portable, but slow */
|
||||
static double my_modf(double x0, double *iptr)
|
||||
{
|
||||
int i;
|
||||
@@ -559,9 +561,10 @@ static double my_modf(double x0, double *iptr)
|
||||
double x = x0;
|
||||
double f = 1.0;
|
||||
|
||||
for (i=0;i<100;i++) {
|
||||
for (i = 0; i < 100; i++) {
|
||||
l = (long)x;
|
||||
if (l <= (x+1) && l >= (x-1)) break;
|
||||
if (l <= (x + 1) && l >= (x - 1))
|
||||
break;
|
||||
x *= 0.1;
|
||||
f *= 10.0;
|
||||
}
|
||||
@@ -576,18 +579,16 @@ static double my_modf(double x0, double *iptr)
|
||||
double i2;
|
||||
double ret;
|
||||
|
||||
ret = my_modf(x0-l*f, &i2);
|
||||
(*iptr) = l*f + i2;
|
||||
ret = my_modf(x0 - l * f, &i2);
|
||||
(*iptr) = l * f + i2;
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
(*iptr) = l;
|
||||
return x - (*iptr);
|
||||
}
|
||||
|
||||
|
||||
static void fmtfp (char *buffer, size_t *currlen, size_t maxlen,
|
||||
LDOUBLE fvalue, int min, int max, int flags)
|
||||
static void fmtfp(char *buffer, size_t * currlen, size_t maxlen, LDOUBLE fvalue, int min, int max, int flags)
|
||||
{
|
||||
int signvalue = 0;
|
||||
double ufvalue;
|
||||
@@ -595,27 +596,27 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen,
|
||||
char fconvert[311];
|
||||
int iplace = 0;
|
||||
int fplace = 0;
|
||||
int padlen = 0; /* amount to pad */
|
||||
int zpadlen = 0;
|
||||
int padlen = 0; /* amount to pad */
|
||||
int zpadlen = 0;
|
||||
int caps = 0;
|
||||
int index;
|
||||
double intpart;
|
||||
double fracpart;
|
||||
double temp;
|
||||
|
||||
/*
|
||||
|
||||
/*
|
||||
* AIX manpage says the default is 0, but Solaris says the default
|
||||
* is 6, and sprintf on AIX defaults to 6
|
||||
*/
|
||||
if (max < 0)
|
||||
max = 6;
|
||||
|
||||
ufvalue = abs_val (fvalue);
|
||||
ufvalue = abs_val(fvalue);
|
||||
|
||||
if (fvalue < 0) {
|
||||
signvalue = '-';
|
||||
} else {
|
||||
if (flags & DP_F_PLUS) { /* Do a sign (+/i) */
|
||||
if (flags & DP_F_PLUS) { /* Do a sign (+/i) */
|
||||
signvalue = '+';
|
||||
} else {
|
||||
if (flags & DP_F_SPACE)
|
||||
@@ -624,15 +625,17 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen,
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */
|
||||
if (flags & DP_F_UP)
|
||||
caps = 1; /* Should characters be upper case? */
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
if (max == 0) ufvalue += 0.5; /* if max = 0 we must round */
|
||||
if (max == 0)
|
||||
ufvalue += 0.5; /* if max = 0 we must round */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Sorry, we only support 16 digits past the decimal because of our
|
||||
/*
|
||||
* Sorry, we only support 16 digits past the decimal because of our
|
||||
* conversion method
|
||||
*/
|
||||
if (max > 16)
|
||||
@@ -646,73 +649,72 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen,
|
||||
my_modf(temp, &intpart);
|
||||
|
||||
fracpart = ROUND((POW10(max)) * (ufvalue - intpart));
|
||||
|
||||
|
||||
if (fracpart >= POW10(max)) {
|
||||
intpart++;
|
||||
fracpart -= POW10(max);
|
||||
}
|
||||
|
||||
|
||||
/* Convert integer part */
|
||||
do {
|
||||
temp = intpart;
|
||||
my_modf(intpart*0.1, &intpart);
|
||||
temp = temp*0.1;
|
||||
index = (int) ((temp -intpart +0.05)* 10.0);
|
||||
my_modf(intpart * 0.1, &intpart);
|
||||
temp = temp * 0.1;
|
||||
index = (int)((temp - intpart + 0.05) * 10.0);
|
||||
/* index = (int) (((double)(temp*0.1) -intpart +0.05) *10.0); */
|
||||
/* printf ("%llf, %f, %x\n", temp, intpart, index); */
|
||||
iconvert[iplace++] =
|
||||
(caps? "0123456789ABCDEF":"0123456789abcdef")[index];
|
||||
iconvert[iplace++] = (caps ? "0123456789ABCDEF" : "0123456789abcdef")[index];
|
||||
} while (intpart && (iplace < 311));
|
||||
if (iplace == 311) iplace--;
|
||||
if (iplace == 311)
|
||||
iplace--;
|
||||
iconvert[iplace] = 0;
|
||||
|
||||
/* Convert fractional part */
|
||||
if (fracpart)
|
||||
{
|
||||
if (fracpart) {
|
||||
do {
|
||||
temp = fracpart;
|
||||
my_modf(fracpart*0.1, &fracpart);
|
||||
temp = temp*0.1;
|
||||
index = (int) ((temp -fracpart +0.05)* 10.0);
|
||||
my_modf(fracpart * 0.1, &fracpart);
|
||||
temp = temp * 0.1;
|
||||
index = (int)((temp - fracpart + 0.05) * 10.0);
|
||||
/* index = (int) ((((temp/10) -fracpart) +0.05) *10); */
|
||||
/* printf ("%lf, %lf, %ld\n", temp, fracpart, index); */
|
||||
fconvert[fplace++] =
|
||||
(caps? "0123456789ABCDEF":"0123456789abcdef")[index];
|
||||
} while(fracpart && (fplace < 311));
|
||||
if (fplace == 311) fplace--;
|
||||
fconvert[fplace++] = (caps ? "0123456789ABCDEF" : "0123456789abcdef")[index];
|
||||
} while (fracpart && (fplace < 311));
|
||||
if (fplace == 311)
|
||||
fplace--;
|
||||
}
|
||||
fconvert[fplace] = 0;
|
||||
|
||||
|
||||
/* -1 for decimal point, another -1 if we are printing a sign */
|
||||
padlen = min - iplace - max - 1 - ((signvalue) ? 1 : 0);
|
||||
padlen = min - iplace - max - 1 - ((signvalue) ? 1 : 0);
|
||||
zpadlen = max - fplace;
|
||||
if (zpadlen < 0) zpadlen = 0;
|
||||
if (padlen < 0)
|
||||
if (zpadlen < 0)
|
||||
zpadlen = 0;
|
||||
if (padlen < 0)
|
||||
padlen = 0;
|
||||
if (flags & DP_F_MINUS)
|
||||
padlen = -padlen; /* Left Justifty */
|
||||
|
||||
if (flags & DP_F_MINUS)
|
||||
padlen = -padlen; /* Left Justifty */
|
||||
|
||||
if ((flags & DP_F_ZERO) && (padlen > 0)) {
|
||||
if (signvalue) {
|
||||
dopr_outch (buffer, currlen, maxlen, signvalue);
|
||||
dopr_outch(buffer, currlen, maxlen, signvalue);
|
||||
--padlen;
|
||||
signvalue = 0;
|
||||
}
|
||||
while (padlen > 0) {
|
||||
dopr_outch (buffer, currlen, maxlen, '0');
|
||||
dopr_outch(buffer, currlen, maxlen, '0');
|
||||
--padlen;
|
||||
}
|
||||
}
|
||||
while (padlen > 0) {
|
||||
dopr_outch (buffer, currlen, maxlen, ' ');
|
||||
dopr_outch(buffer, currlen, maxlen, ' ');
|
||||
--padlen;
|
||||
}
|
||||
if (signvalue)
|
||||
dopr_outch (buffer, currlen, maxlen, signvalue);
|
||||
|
||||
while (iplace > 0)
|
||||
dopr_outch (buffer, currlen, maxlen, iconvert[--iplace]);
|
||||
if (signvalue)
|
||||
dopr_outch(buffer, currlen, maxlen, signvalue);
|
||||
|
||||
while (iplace > 0)
|
||||
dopr_outch(buffer, currlen, maxlen, iconvert[--iplace]);
|
||||
|
||||
#ifdef DEBUG_SNPRINTF
|
||||
printf("fmtfp: fplace=%d zpadlen=%d\n", fplace, zpadlen);
|
||||
@@ -723,24 +725,24 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen,
|
||||
* char to print out.
|
||||
*/
|
||||
if (max > 0) {
|
||||
dopr_outch (buffer, currlen, maxlen, '.');
|
||||
|
||||
while (fplace > 0)
|
||||
dopr_outch (buffer, currlen, maxlen, fconvert[--fplace]);
|
||||
dopr_outch(buffer, currlen, maxlen, '.');
|
||||
|
||||
while (fplace > 0)
|
||||
dopr_outch(buffer, currlen, maxlen, fconvert[--fplace]);
|
||||
}
|
||||
|
||||
|
||||
while (zpadlen > 0) {
|
||||
dopr_outch (buffer, currlen, maxlen, '0');
|
||||
dopr_outch(buffer, currlen, maxlen, '0');
|
||||
--zpadlen;
|
||||
}
|
||||
|
||||
while (padlen < 0) {
|
||||
dopr_outch (buffer, currlen, maxlen, ' ');
|
||||
dopr_outch(buffer, currlen, maxlen, ' ');
|
||||
++padlen;
|
||||
}
|
||||
}
|
||||
|
||||
static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c)
|
||||
static void dopr_outch(char *buffer, size_t * currlen, size_t maxlen, char c)
|
||||
{
|
||||
if (*currlen < maxlen) {
|
||||
buffer[(*currlen)] = c;
|
||||
@@ -749,18 +751,18 @@ static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c)
|
||||
}
|
||||
|
||||
#if !defined(HAVE_VSNPRINTF) || !defined(HAVE_C99_VSNPRINTF)
|
||||
int vsnprintf (char *str, size_t count, const char *fmt, va_list args)
|
||||
int vsnprintf(char *str, size_t count, const char *fmt, va_list args)
|
||||
{
|
||||
return dopr(str, count, fmt, args);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_SNPRINTF) || !defined(HAVE_C99_VSNPRINTF)
|
||||
int snprintf(char *str,size_t count,const char *fmt,...)
|
||||
int snprintf(char *str, size_t count, const char *fmt, ...)
|
||||
{
|
||||
size_t ret;
|
||||
va_list ap;
|
||||
|
||||
|
||||
va_start(ap, fmt);
|
||||
ret = vsnprintf(str, count, fmt, ap);
|
||||
va_end(ap);
|
||||
@@ -768,31 +770,32 @@ static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_VASPRINTF
|
||||
int vasprintf(char **ptr, const char *format, va_list ap)
|
||||
int vasprintf(char **ptr, const char *format, va_list ap)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = vsnprintf(NULL, 0, format, ap);
|
||||
if (ret <= 0) return ret;
|
||||
|
||||
(*ptr) = (char *)malloc(ret+1);
|
||||
if (!*ptr) return -1;
|
||||
ret = vsnprintf(*ptr, ret+1, format, ap);
|
||||
ret = vsnprintf(NULL, 0, format, ap);
|
||||
if (ret <= 0)
|
||||
return ret;
|
||||
|
||||
(*ptr) = (char *)malloc(ret + 1);
|
||||
if (!*ptr)
|
||||
return -1;
|
||||
ret = vsnprintf(*ptr, ret + 1, format, ap);
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef HAVE_ASPRINTF
|
||||
int asprintf(char **ptr, const char *format, ...)
|
||||
int asprintf(char **ptr, const char *format, ...)
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
|
||||
va_start(ap, format);
|
||||
ret = vasprintf(ptr, format, ap);
|
||||
va_end(ap);
|
||||
@@ -803,9 +806,9 @@ static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c)
|
||||
|
||||
#ifdef TEST_SNPRINTF
|
||||
|
||||
int sprintf(char *str,const char *fmt,...);
|
||||
int sprintf(char *str, const char *fmt, ...);
|
||||
|
||||
int main (void)
|
||||
int main(void)
|
||||
{
|
||||
char buf1[1024];
|
||||
char buf2[1024];
|
||||
@@ -827,8 +830,9 @@ static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c)
|
||||
"-16.16f",
|
||||
NULL
|
||||
};
|
||||
double fp_nums[] = { 6442452944.1234, -1.5, 134.21, 91340.2, 341.1234, 0203.9, 0.96, 0.996,
|
||||
0.9996, 1.996, 4.136, 0};
|
||||
double fp_nums[] = { 6442452944.1234, -1.5, 134.21, 91340.2, 341.1234, 0203.9, 0.96, 0.996,
|
||||
0.9996, 1.996, 4.136, 0
|
||||
};
|
||||
char *int_fmt[] = {
|
||||
"%-1.5d",
|
||||
"%1.5d",
|
||||
@@ -842,7 +846,7 @@ static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c)
|
||||
"%d",
|
||||
NULL
|
||||
};
|
||||
long int_nums[] = { -1, 134, 91340, 341, 0203, 0};
|
||||
long int_nums[] = { -1, 134, 91340, 341, 0203, 0 };
|
||||
char *str_fmt[] = {
|
||||
"10.5s",
|
||||
"5.10s",
|
||||
@@ -856,20 +860,20 @@ static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c)
|
||||
"%10s",
|
||||
NULL
|
||||
};
|
||||
char *str_vals[] = {"hello", "a", "", "a longer string", NULL};
|
||||
char *str_vals[] = { "hello", "a", "", "a longer string", NULL };
|
||||
int x, y;
|
||||
int fail = 0;
|
||||
int num = 0;
|
||||
|
||||
printf ("Testing snprintf format codes against system sprintf...\n");
|
||||
printf("Testing snprintf format codes against system sprintf...\n");
|
||||
|
||||
for (x = 0; fp_fmt[x] ; x++) {
|
||||
for (y = 0; fp_nums[y] != 0 ; y++) {
|
||||
for (x = 0; fp_fmt[x]; x++) {
|
||||
for (y = 0; fp_nums[y] != 0; y++) {
|
||||
int l1 = snprintf(NULL, 0, fp_fmt[x], fp_nums[y]);
|
||||
int l2 = snprintf(buf1, sizeof(buf1), fp_fmt[x], fp_nums[y]);
|
||||
sprintf (buf2, fp_fmt[x], fp_nums[y]);
|
||||
if (strcmp (buf1, buf2)) {
|
||||
printf("snprintf doesn't match Format: %s\n\tsnprintf = [%s]\n\t sprintf = [%s]\n",
|
||||
sprintf(buf2, fp_fmt[x], fp_nums[y]);
|
||||
if (strcmp(buf1, buf2)) {
|
||||
printf("snprintf doesn't match Format: %s\n\tsnprintf = [%s]\n\t sprintf = [%s]\n",
|
||||
fp_fmt[x], buf1, buf2);
|
||||
fail++;
|
||||
}
|
||||
@@ -881,13 +885,13 @@ static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c)
|
||||
}
|
||||
}
|
||||
|
||||
for (x = 0; int_fmt[x] ; x++) {
|
||||
for (y = 0; int_nums[y] != 0 ; y++) {
|
||||
for (x = 0; int_fmt[x]; x++) {
|
||||
for (y = 0; int_nums[y] != 0; y++) {
|
||||
int l1 = snprintf(NULL, 0, int_fmt[x], int_nums[y]);
|
||||
int l2 = snprintf(buf1, sizeof(buf1), int_fmt[x], int_nums[y]);
|
||||
sprintf (buf2, int_fmt[x], int_nums[y]);
|
||||
if (strcmp (buf1, buf2)) {
|
||||
printf("snprintf doesn't match Format: %s\n\tsnprintf = [%s]\n\t sprintf = [%s]\n",
|
||||
sprintf(buf2, int_fmt[x], int_nums[y]);
|
||||
if (strcmp(buf1, buf2)) {
|
||||
printf("snprintf doesn't match Format: %s\n\tsnprintf = [%s]\n\t sprintf = [%s]\n",
|
||||
int_fmt[x], buf1, buf2);
|
||||
fail++;
|
||||
}
|
||||
@@ -899,13 +903,13 @@ static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c)
|
||||
}
|
||||
}
|
||||
|
||||
for (x = 0; str_fmt[x] ; x++) {
|
||||
for (y = 0; str_vals[y] != 0 ; y++) {
|
||||
for (x = 0; str_fmt[x]; x++) {
|
||||
for (y = 0; str_vals[y] != 0; y++) {
|
||||
int l1 = snprintf(NULL, 0, str_fmt[x], str_vals[y]);
|
||||
int l2 = snprintf(buf1, sizeof(buf1), str_fmt[x], str_vals[y]);
|
||||
sprintf (buf2, str_fmt[x], str_vals[y]);
|
||||
if (strcmp (buf1, buf2)) {
|
||||
printf("snprintf doesn't match Format: %s\n\tsnprintf = [%s]\n\t sprintf = [%s]\n",
|
||||
sprintf(buf2, str_fmt[x], str_vals[y]);
|
||||
if (strcmp(buf1, buf2)) {
|
||||
printf("snprintf doesn't match Format: %s\n\tsnprintf = [%s]\n\t sprintf = [%s]\n",
|
||||
str_fmt[x], buf1, buf2);
|
||||
fail++;
|
||||
}
|
||||
@@ -917,16 +921,16 @@ static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c)
|
||||
}
|
||||
}
|
||||
|
||||
printf ("%d tests failed out of %d.\n", fail, num);
|
||||
printf("%d tests failed out of %d.\n", fail, num);
|
||||
|
||||
printf("seeing how many digits we support\n");
|
||||
{
|
||||
double v0 = 0.12345678901234567890123456789012345678901;
|
||||
for (x=0; x<100; x++) {
|
||||
snprintf(buf1, sizeof(buf1), "%1.1f", v0*pow(10, x));
|
||||
sprintf(buf2, "%1.1f", v0*pow(10, x));
|
||||
for (x = 0; x < 100; x++) {
|
||||
snprintf(buf1, sizeof(buf1), "%1.1f", v0 * pow(10, x));
|
||||
sprintf(buf2, "%1.1f", v0 * pow(10, x));
|
||||
if (strcmp(buf1, buf2)) {
|
||||
printf("we seem to support %d digits\n", x-1);
|
||||
printf("we seem to support %d digits\n", x - 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -934,4 +938,4 @@ static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c)
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* SNPRINTF_TEST */
|
||||
#endif /* SNPRINTF_TEST */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user