mirror of
https://github.com/gryf/wmaker.git
synced 2026-05-08 09:42:57 +02:00
Compare commits
179 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 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 | |||
| 048b43aea4 | |||
| 579eb01c6c | |||
| ca212985df | |||
| c32806ae14 | |||
| ee5b28b0af | |||
| 750917986e | |||
| 6e72c20248 | |||
| ad0ad5af22 | |||
| e4a53ba71e | |||
| 208ee16849 | |||
| f9acc9313e | |||
| 92fb96eb69 | |||
| 18d347ecd5 | |||
| 97e20d94de | |||
| 65e65c4e9d | |||
| 84fa789cd6 | |||
| efcf27f854 | |||
| 5fe90167a3 | |||
| f857012f7a | |||
| efb0090f8c | |||
| 1cd1f16c3c | |||
| 0c1881e224 | |||
| 5bb35d94a5 | |||
| 321bb04586 | |||
| 77b8fe05ac | |||
| 9466c00f2b | |||
| a8950af8ac | |||
| 58e719654f | |||
| ad58481487 | |||
| 5402fccd1e | |||
| cf7859d145 | |||
| 5db8b5660f | |||
| 5873385d32 | |||
| a26b723c5a | |||
| bc3d012e7c | |||
| c08b3c5f32 | |||
| f37b4cf5d0 | |||
| 06f1bf91a9 | |||
| 8b5f31ad8b | |||
| 2cc90e649a | |||
| 9d41f432b9 | |||
| b4f540ddd6 | |||
| 03f534c0bf | |||
| 9078b1a5a7 | |||
| da02e76051 | |||
| 9c19d14d1a | |||
| bc88390918 | |||
| a1b9bf23a9 | |||
| 511a06628b | |||
| 8a25fdc672 | |||
| a1a7ba7689 | |||
| 4f84c48ccb | |||
| 9b63a77d6a | |||
| 89a32e3663 | |||
| 501c3f48b8 | |||
| cab71ba6a1 | |||
| 96f8ab167f | |||
| a8c7375623 | |||
| 365556b676 | |||
| 7b00d9ec12 | |||
| 89cb6559cc | |||
| 372da5ca39 | |||
| 514258fd35 | |||
| 0b0002f75a | |||
| cf2322ee03 | |||
| c9dfd7f3a4 | |||
| 7eb705472f | |||
| d35dd84ae5 | |||
| 0613a758f4 | |||
| 9e615bcff9 | |||
| 9031641ba6 | |||
| 9bfa0b6efb | |||
| 60409e290d |
+4
-3
@@ -2,6 +2,7 @@ Makefile Makefile.in
|
|||||||
aclocal.m4
|
aclocal.m4
|
||||||
configure config.log config.cache config.guess config.status config.sub
|
configure config.log config.cache config.guess config.status config.sub
|
||||||
libtool ltconfig ltmain.sh
|
libtool ltconfig ltmain.sh
|
||||||
.psrc .inslog2 tca.map tca.log
|
autom4te.cache
|
||||||
*.rpt
|
.psrc .inslog2 tca.map tca.log pchdir *.rpt
|
||||||
update update-autoconf
|
update
|
||||||
|
WindowMaker*.tar.gz
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ FRBall <frb@umr.edu>
|
|||||||
dgradient fix
|
dgradient fix
|
||||||
|
|
||||||
|
|
||||||
"]d" <id@maliwan.org>
|
"]d" <id@windowmaker.org>
|
||||||
Window list menu miniaturized/hidden hints, XDE support, XKB lock
|
Window list menu miniaturized/hidden hints, XDE support, XKB lock
|
||||||
language status, WINGs enhancements, bug fixes, window commands menu
|
language status, WINGs enhancements, bug fixes, window commands menu
|
||||||
enhancement, window move/resize by keyboard. GNUstepGlow.tiff icon,
|
enhancement, window move/resize by keyboard. GNUstepGlow.tiff icon,
|
||||||
|
|||||||
+10
-1
@@ -29,7 +29,16 @@ xpm/textr.xpm
|
|||||||
xpm/tnew.xpm
|
xpm/tnew.xpm
|
||||||
inside Resources/Images.tiff "the little house", "the trash can",
|
inside Resources/Images.tiff "the little house", "the trash can",
|
||||||
"the folder", "the floppies"
|
"the folder", "the floppies"
|
||||||
|
Ear.png
|
||||||
|
Ftp.png
|
||||||
|
ICQ.png
|
||||||
|
Jabber.png
|
||||||
|
Mozilla.png
|
||||||
|
Pen.png
|
||||||
|
Pencil.png
|
||||||
|
Shell.png
|
||||||
|
Speaker.png
|
||||||
|
XChat.png
|
||||||
|
|
||||||
do What The Fuck you want to Public License
|
do What The Fuck you want to Public License
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,173 @@
|
|||||||
|
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 Xft 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 the 'focus flicker' problem, seen with GTK2 applications.
|
||||||
|
|
||||||
|
|
||||||
|
Changes since version 0.80.1:
|
||||||
|
.............................
|
||||||
|
|
||||||
|
- Fixed a buffer overflow when allocating an RImage struct.
|
||||||
|
|
||||||
|
|
||||||
|
Changes since version 0.80.0:
|
||||||
|
.............................
|
||||||
|
|
||||||
|
- Fixed a bug that crashed wmaker when closing a window if multiple screens
|
||||||
|
were managed by wmaker (Valery Kotchiev <aggregator@nospam.dk>)
|
||||||
|
- Fixed a problem that crashed wmaker when trying to read an unexisting
|
||||||
|
WMState.<number> file on multihead system.
|
||||||
|
- Fixed problem with keyboard shortcuts executed an every screen for
|
||||||
|
multihead systems.
|
||||||
|
- Updated traditional chinese translations
|
||||||
|
- Fixed buglet in non-caching rootmenu option
|
||||||
|
("John H. Robinson, IV" <jhriv@ucsd.edu>)
|
||||||
|
- Added Malay translation
|
||||||
|
- Fixed problem with kcalc not having a miniaturize button.
|
||||||
|
- Added "Hide Others" to the window menu.
|
||||||
|
- Fixed text in info panel for multibyte (Seiichi SATO <ssato@sh.rim.or.jp>)
|
||||||
|
- Separated the font caches for normal fonts and fontsets in WINGs (they can
|
||||||
|
have the same names and collide in the cache giving unwanted results)
|
||||||
|
- Fixed Legal Panel not to display rectangles in place of new lines.
|
||||||
|
- Fixed problem with losing focus when changing to an empty workspace and back.
|
||||||
|
- Fixed another focus related problem when changing workspaces.
|
||||||
|
- Fixed problem with saving session when shared appicon is enabled (not
|
||||||
|
all instances were saved in the session, only one per shared appicon)
|
||||||
|
- Added support for the ukrainian language in wsetfont
|
||||||
|
(Bohdan Vlasyuk <bohdan@bodq.vstu.vinnica.ua>)
|
||||||
|
- Fixed a bug that crashed Window Maker when setting the "Emulate AppIcon"
|
||||||
|
option for a window using the window Inspector.
|
||||||
|
- Let XRender transparent window be see-through to desktop
|
||||||
|
- Added Greek (el) language pixmap (Michalis Kabrianis <Michalis@bigfoot.com>)
|
||||||
|
- Fixes icons being reduced twice when icon size != 64x64
|
||||||
|
Eduardo Pereira Habkost <ehabkost@conectiva.com.br>
|
||||||
|
- Fixed a bug that crashed wmaker when selecting the "Start alternate window
|
||||||
|
manager" option in the crashing dialog panel.
|
||||||
|
- Window Maker will now use the WINDOWMAKER_ALT_WM environment variable (if
|
||||||
|
it is defined) to overwrite the default hardcoded fallback window manager.
|
||||||
|
- Fixed marks for menu entries to be grayed as the text for disabled entries.
|
||||||
|
- Fixed Clip's "Autoraise" option to be marked as disabled when the
|
||||||
|
"Keep on Top" option is active.
|
||||||
|
- Added ability to browse for files/directories in the WPrefs menu editor.
|
||||||
|
- Added Czech translations of documentation (Jiri Hnidek <Jiri.Hnidek@vslib.cz>)
|
||||||
|
- Fixed segfault with incomplete WM_CLASS specifications.
|
||||||
|
- Fixed a bug about arranging subviews in a WMBox after removing a subview
|
||||||
|
and a memleak occuring in the same situation.
|
||||||
|
- Fixed a bug in wdread
|
||||||
|
- Fixed bug with windows that have WM_HINTS.take_focus = False. These windows
|
||||||
|
will not receive focus at all.
|
||||||
|
- Fixed a buffer overflow in winmenu.c
|
||||||
|
|
||||||
|
|
||||||
Changes since version 0.70.0:
|
Changes since version 0.70.0:
|
||||||
.............................
|
.............................
|
||||||
|
|
||||||
@@ -24,6 +194,7 @@ Changes since version 0.70.0:
|
|||||||
default.
|
default.
|
||||||
- Mapping a new window that belongs to a running application that is hidden,
|
- Mapping a new window that belongs to a running application that is hidden,
|
||||||
will unhide the application.
|
will unhide the application.
|
||||||
|
- Added || pipe menu for generating non-cached menus
|
||||||
- Removed the collapse appicons thing.
|
- Removed the collapse appicons thing.
|
||||||
- Added real appicon sharing (apps of the same kind will have a single shared
|
- Added real appicon sharing (apps of the same kind will have a single shared
|
||||||
appicon).
|
appicon).
|
||||||
@@ -39,6 +210,7 @@ Changes since version 0.70.0:
|
|||||||
adapt to newer/faster machines. Also used wusleep(10) when the delay was 0
|
adapt to newer/faster machines. Also used wusleep(10) when the delay was 0
|
||||||
to get rid of the jerky animation when there was no delay.
|
to get rid of the jerky animation when there was no delay.
|
||||||
- Fixed bug with Unhide mapping windows from other workspaces.
|
- Fixed bug with Unhide mapping windows from other workspaces.
|
||||||
|
- keyboard shortcuts are active during mouse window drag
|
||||||
- Saving a domain file will first strip all entries that are also present in
|
- Saving a domain file will first strip all entries that are also present in
|
||||||
the global domain as well and are exactly the same. This fixes a bug where
|
the global domain as well and are exactly the same. This fixes a bug where
|
||||||
settings from the global domain file were merged in the user domain file
|
settings from the global domain file were merged in the user domain file
|
||||||
@@ -47,7 +219,6 @@ Changes since version 0.70.0:
|
|||||||
using the global domains.
|
using the global domains.
|
||||||
- Fixed bug with improper setting of root/titlebar cursor (definable cursors).
|
- Fixed bug with improper setting of root/titlebar cursor (definable cursors).
|
||||||
|
|
||||||
|
|
||||||
Changes since version 0.65.1:
|
Changes since version 0.65.1:
|
||||||
.............................
|
.............................
|
||||||
|
|
||||||
@@ -66,10 +237,15 @@ Changes since version 0.65.1:
|
|||||||
- added spanish INSTALL file (Efrain Maximiliano Palermo <max_drake2001@yahoo.com.ar>)
|
- added spanish INSTALL file (Efrain Maximiliano Palermo <max_drake2001@yahoo.com.ar>)
|
||||||
- updated Finnish pots (Tomi Kajala <tomi@iki.fi>)
|
- updated Finnish pots (Tomi Kajala <tomi@iki.fi>)
|
||||||
- copy/paste launching in Dock
|
- copy/paste launching in Dock
|
||||||
|
- fixed switch to wrong workspace bug (Masashi Shimbo <shimbo@cis.ibaraki.ac.jp>)
|
||||||
|
- added snprintf and removed XConvertCase usage for portability
|
||||||
|
- added wcopy/wpaste scripts from (<luke@research.canon.com.au>)
|
||||||
|
- added Xinerama support: see details in NEWS
|
||||||
|
- fixed artifact pattern left in TrueColor dithering code (visible with
|
||||||
|
tiled gradients)
|
||||||
- fixed bug in positioning of window list menu when opened by kbd
|
- fixed bug in positioning of window list menu when opened by kbd
|
||||||
- internal code clean-up with notifications for window state change and other
|
- internal code clean-up with notifications for window state change and other
|
||||||
stuff
|
stuff
|
||||||
- added snprintf implementation for systems that don't have this function
|
|
||||||
- removed the libPropList dependancy by adding property list handling
|
- removed the libPropList dependancy by adding property list handling
|
||||||
code to WINGs. This code is not only better integrated with the other
|
code to WINGs. This code is not only better integrated with the other
|
||||||
WINGs data structures, but it's also more robust. Also a backward
|
WINGs data structures, but it's also more robust. Also a backward
|
||||||
|
|||||||
@@ -1074,16 +1074,29 @@ to force the modification time into the future.
|
|||||||
4.16 How can I set dock/clip to use single click to launch
|
4.16 How can I set dock/clip to use single click to launch
|
||||||
applications, instead of double click?
|
applications, instead of double click?
|
||||||
----------------------------------
|
----------------------------------
|
||||||
You cannot do this. This is because single click is used to select app-icons,
|
This question was officially answered as follows:
|
||||||
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
|
You cannot do this. This is because single click is used to select
|
||||||
click is used for a reason, is not just some weird idea we got in a morning
|
app-icons, or to raise/lower the app-icon or the dock/clip. If
|
||||||
when we wake up too early.
|
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?
|
4.18 How do I restore the configuration app to the dock?
|
||||||
|
|||||||
+70
@@ -0,0 +1,70 @@
|
|||||||
|
Často kladené otázky na podporu místního nastavení
|
||||||
|
==================================================
|
||||||
|
|
||||||
|
Pokud vám nefunguje podpora I18N, tak zkontrolujte tato nastavení:
|
||||||
|
|
||||||
|
- systémová proměnná LANG musí být nastavená tak, aby odpovídala vašemu
|
||||||
|
místnímu nastavení (čeština = czech), vaše místní nastavení musí být
|
||||||
|
podporovatelné vaším operačním systémem nebo X emulací. Všechny
|
||||||
|
podporovatelné lokalizace zobrazíte příkazem "locale -a". Měli byste
|
||||||
|
také zkontrolovat, zda-li je vaše místní nastavení podporované
|
||||||
|
X emulací. Soubor: "/usr/X11R6/lib/X11/locale/locale.alias" by měl
|
||||||
|
obsahovat podobnou sekvenci (podpora pro češtinu):
|
||||||
|
|
||||||
|
cs cs_CZ.ISO8859-2
|
||||||
|
cs_CS cs_CZ.ISO8859-2
|
||||||
|
cs_CS.ISO8859-2 cs_CZ.ISO8859-2
|
||||||
|
cs_CZ cs_CZ.ISO8859-2
|
||||||
|
cs_CZ.iso88592 cs_CZ.ISO8859-2
|
||||||
|
cz cz_CZ.ISO8859-2
|
||||||
|
cz_CZ cz_CZ.ISO8859-2
|
||||||
|
|
||||||
|
- zkontrolujte použití správných fontů pro vaše místní nastavení.
|
||||||
|
Pokud nepoužíváte správné fonty s kódováním, které je nastaveno v
|
||||||
|
Xlib nebo libc, tak se můžou dít "dost divné věci". Zkuste explicitně
|
||||||
|
zadat kování do proměnné LANG: LANG=cs_CS.ISO8859-2 nebo
|
||||||
|
LANG=cs_CZ.iso88592 a znovu zkontrolujte:
|
||||||
|
"/usr/X11R6/lib/X11/locale/locale.alias"
|
||||||
|
|
||||||
|
- pokud váš operační systém nepodporuje místní nastavení (locales), nebo
|
||||||
|
pokud váš OS nepodporuje místní nastavení pro váš jazyk, můžete
|
||||||
|
použít emulaci místního nastavení X Window Systému. Zprovoznit tuto
|
||||||
|
emulaci je možné spuštěním ./configure s volbou "--witn-x-locale".
|
||||||
|
Pokud používáte nějaký komerční systém jako je například IRIX, AIX,
|
||||||
|
Solaris, ...,tak asi X emulaci nebudete potřebovat. Ovšem pokud je
|
||||||
|
vaším operačním systémem Linux, NetBSD nebo jiný užasný, volně
|
||||||
|
šiřitelný operační systém, tak je možné, že vaše místní nastavení
|
||||||
|
zatím není podporované. Potom použijte volbu "--witn-x-locale".
|
||||||
|
|
||||||
|
Pozn: Aby jste mohli používat X emulaci místních nastavení, tak vaše
|
||||||
|
Xlib musí být zkompilované s touto podporou. Xlib v RedHat 5.0
|
||||||
|
tak zkompilované nejsou (RH4.x jsou OK). Překompilované Xlib
|
||||||
|
s podporou pro emulací místních nastavení pro RH5.0 jsou
|
||||||
|
dostupné na adrese:
|
||||||
|
|
||||||
|
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:
|
||||||
|
|
||||||
|
WindowTitleFont = "-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-*-*";
|
||||||
|
MenuTitleFont = "-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-*-*"; ,
|
||||||
|
|
||||||
|
nemůžete zobrazovat znaky jiné než iso8859-x ve fontu helvetica.
|
||||||
|
Jednoduchý způsob, jak zobrazovat znaky různých jazyků, je nastavit všechny
|
||||||
|
fonty takto:
|
||||||
|
|
||||||
|
"-*-*-medium-r-normal-*-14-*-*-*-*-*-*-*"
|
||||||
|
|
||||||
|
Také je nutné změnit nastavení fontů v souborech stylů v adresáři:
|
||||||
|
~/Library/WindowMaker/Style.
|
||||||
|
|
||||||
|
- pokud si nejste jisti, zda-li má systémová proměnná LC_TYPE správnou
|
||||||
|
hodnotu, tak ji nenastavujte.
|
||||||
@@ -40,6 +40,7 @@ SUPPORTED PLATFORMS
|
|||||||
- IBM S/390 running Linux
|
- IBM S/390 running Linux
|
||||||
- IBM S/390 running Conectiva Linux (experimental)
|
- IBM S/390 running Conectiva Linux (experimental)
|
||||||
- iBook running Darwin
|
- iBook running Darwin
|
||||||
|
- Darwin PPC / Macos X
|
||||||
- Windows NT with Cygwin/XFree86
|
- Windows NT with Cygwin/XFree86
|
||||||
- Sony PlayStation2 running Linux
|
- Sony PlayStation2 running Linux
|
||||||
|
|
||||||
@@ -73,9 +74,9 @@ The following is required to build Window Maker:
|
|||||||
These tools are NOT needed, but IF you have one or
|
These tools are NOT needed, but IF you have one or
|
||||||
more of them installed, make sure you have ALL of the following
|
more of them installed, make sure you have ALL of the following
|
||||||
with exactly these versions:
|
with exactly these versions:
|
||||||
autoconf 2.13
|
autoconf 2.54
|
||||||
automake 1.4
|
automake 1.4
|
||||||
libtool 1.3
|
libtool 1.4.2
|
||||||
If you have a different version, disable them by temporarily
|
If you have a different version, disable them by temporarily
|
||||||
renaming them to something else or uninstalling them from your
|
renaming them to something else or uninstalling them from your
|
||||||
system. If you don't develop software you don't need them,
|
system. If you don't develop software you don't need them,
|
||||||
@@ -114,11 +115,6 @@ might work too.
|
|||||||
For GIF image support
|
For GIF image support
|
||||||
ftp://prtr-13.ucsc.edu/pub/libungif/
|
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
|
- GNU xgettext
|
||||||
If you want to use translated messages, you will need GNU gettext.
|
If you want to use translated messages, you will need GNU gettext.
|
||||||
Other versions of gettext are not compatible and will not work.
|
Other versions of gettext are not compatible and will not work.
|
||||||
@@ -149,12 +145,6 @@ To get a list of other options, run ./configure --help
|
|||||||
The -I flag must precede each paths, like:
|
The -I flag must precede each paths, like:
|
||||||
--with-incs-from="-I/opt/headers -I/usr/local/include"
|
--with-incs-from="-I/opt/headers -I/usr/local/include"
|
||||||
|
|
||||||
--enable-single-icon
|
|
||||||
enables the collapsing of all appicons of the WM_CLASS+WM_INSTANCE
|
|
||||||
into a single one. This feature is not supported at all by the
|
|
||||||
developers. If you have some trouble with it, contact it's author:
|
|
||||||
Christopher Seawood <cls@seawood.org>
|
|
||||||
|
|
||||||
--disable-shm
|
--disable-shm
|
||||||
disable use of the MIT shared memory extension. This will slow down
|
disable use of the MIT shared memory extension. This will slow down
|
||||||
texture generation a little bit, but in some cases it seems to be
|
texture generation a little bit, but in some cases it seems to be
|
||||||
@@ -184,9 +174,6 @@ To get a list of other options, run ./configure --help
|
|||||||
XKB language status lock support. If you don't know what it is you
|
XKB language status lock support. If you don't know what it is you
|
||||||
probably don't need it.
|
probably don't need it.
|
||||||
|
|
||||||
--enable-sound
|
|
||||||
enable support of sound effects module
|
|
||||||
|
|
||||||
--disable-xpm
|
--disable-xpm
|
||||||
disables use of the XPM library even if it is available on your
|
disables use of the XPM library even if it is available on your
|
||||||
system.
|
system.
|
||||||
|
|||||||
+613
@@ -0,0 +1,613 @@
|
|||||||
|
Instrukce pro instalaci okenního manažera Window Maker
|
||||||
|
|
||||||
|
PODPOROVANÉ PLATFORMY
|
||||||
|
=====================
|
||||||
|
("Podporované" znamená, že už to na dané platformě někdo zprovoznil...)
|
||||||
|
|
||||||
|
- Intel GNU/Linux Conectiva 5.9 (beta)
|
||||||
|
- Intel GNU/Linux Slackware
|
||||||
|
- Intel GNU/Linux Debian
|
||||||
|
- Intel GNU/Linux ostatní distribuce
|
||||||
|
- Sparc GNU/Linux RedHat 5.1
|
||||||
|
- PowerPC GNU/MkLinux
|
||||||
|
- Alpha GNU/Linux RedHat 5.1
|
||||||
|
- FreeBSD
|
||||||
|
- NetBSD
|
||||||
|
- OpenBSD
|
||||||
|
- BSDI 4.0
|
||||||
|
- Solaris 2.5.1, 2.5.2
|
||||||
|
- Solaris 2.6.0
|
||||||
|
- Solaris 2.7beta
|
||||||
|
- SCO Unix
|
||||||
|
- SGI Irix 5.x, 6.5
|
||||||
|
- OSF/1
|
||||||
|
- HP-UX
|
||||||
|
- AIX 3.2.5
|
||||||
|
- AIX 4.1.4 / IBM PowerPC
|
||||||
|
- AIX 4.3.1 / IBM CC compiler
|
||||||
|
- AIX 4.3.2 / IBM PowerPC
|
||||||
|
- AIX 5.3
|
||||||
|
- DEC Alpha/Digital UNIX 4.x
|
||||||
|
- XFree86 / OS/2
|
||||||
|
- Corel NetWinder
|
||||||
|
- SunOS 4.x
|
||||||
|
- PowerMac / Power MachTen 4.1.1 over MacOS
|
||||||
|
- Amiga 3000 running RedHat Linux 5.1 (Rawhide)
|
||||||
|
- IBM S/390 s Linuxem
|
||||||
|
- iBook s OS Darwin
|
||||||
|
|
||||||
|
Patche pro rozběhání na jiných platformách jsou vítané.
|
||||||
|
|
||||||
|
POŽADAVKY
|
||||||
|
=========
|
||||||
|
|
||||||
|
Následující software je potřebný/nezbytný pro běh Window Makeru:
|
||||||
|
|
||||||
|
- X11R6.x
|
||||||
|
Window Maker může být zkompilován na starších verzích X, jako
|
||||||
|
je X11R5 (Solaris) nebo X11R4 (OpenWindows), ale nebude to pracovat
|
||||||
|
100% spolehlivě. Na těchto systémech nebudou fungovat ikony
|
||||||
|
aplikací a budete mít problémy s používáním doku. Upgrade
|
||||||
|
uživatelských knihoven (Xlib, Xt atd.) zlepší tyto problémy pokud
|
||||||
|
nemůžete aktualizovat váš X server.
|
||||||
|
|
||||||
|
Následující software je potřebný ke zkompilování Window Makeru:
|
||||||
|
|
||||||
|
- Zákládní běžné věci
|
||||||
|
Když budete komplivat Window Maker, tak se ujistěte, že máte gcc
|
||||||
|
(nebo jiný ANCI C kompilátor) a nainstalované hlavičkové soubory
|
||||||
|
pro X. Hlavně pro začátečníky v Linuxu: musíte nainstalovat všechny
|
||||||
|
X-devel balíky a gcc. Jinak nebudete schopni zkompilovat žádný
|
||||||
|
program s grafickým rozhraním, tedy ani Window Maker.
|
||||||
|
|
||||||
|
- autoconf, automake a libtool
|
||||||
|
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.54
|
||||||
|
automake 1.4
|
||||||
|
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.
|
||||||
|
|
||||||
|
Pozn. libProblist už není potřeba ke zkompilování Window Makeru, protože
|
||||||
|
libProblist byl přímo zabudován do WINGs. Z toho důvodu už není
|
||||||
|
potřeba ani lex (flex) a yacc (nebo bison).
|
||||||
|
|
||||||
|
|
||||||
|
NEPOVINNÉ
|
||||||
|
=========
|
||||||
|
|
||||||
|
Tyto knihovny nejsou nutné pro běh Windo Makeru, ale jsou podporované, když
|
||||||
|
je budete chtít použít. Tyto verze jsou používané vývojovým týmem, který
|
||||||
|
garantuje, že budou fungovat. Ostatní verze by měli fungovat také.
|
||||||
|
|
||||||
|
- libXPM 4.7 nebo novější
|
||||||
|
Starší verze nemusí fungovat!!!
|
||||||
|
Dostupné na ftp://sunsite.unc.edu/pub/Linux/libs/X/
|
||||||
|
|
||||||
|
Je zde zabudovaná podpora pro soubory XPM, ale nenačte obrázky s
|
||||||
|
nestandardním formátem kódování.
|
||||||
|
|
||||||
|
- libpng 0.96 nebo novější a zlib
|
||||||
|
Pro podporu PNG obrázků
|
||||||
|
http://www.cdrom.com/pub/png/
|
||||||
|
|
||||||
|
- libtiff 3.4 nebo novější
|
||||||
|
Pro podporu TIFF obrázků
|
||||||
|
Dostupné na ftp://ftp.sgi.com/graphics/tiff
|
||||||
|
|
||||||
|
- libjpeg 6.0.1 nebo novější
|
||||||
|
Pro podporu JPEG obrázků
|
||||||
|
http://www.ijg.org/
|
||||||
|
|
||||||
|
- libgif 2.2 nebo libungif
|
||||||
|
Pro podporu GIF obrázků
|
||||||
|
Dostupné na ftp://prtr-13.ucsc.edu/pub/libungif/
|
||||||
|
|
||||||
|
-GNU xgettxt
|
||||||
|
Když chcete používat češtinu nebo jiné jazyky kromě angličtiny,
|
||||||
|
tak potřebujete GNU xgettext.
|
||||||
|
Ostatní verze nejsou kompatibilní a nebudou fungovat
|
||||||
|
GNU verze je dostupná na ftp://ftp.gnu.org
|
||||||
|
|
||||||
|
|
||||||
|
KONFIGURAČNÍ NASTAVENÍ
|
||||||
|
======================
|
||||||
|
|
||||||
|
Tyto volby mohou být předané konfiguračnímu skriptu jako argumenty za
|
||||||
|
účelem povolení/zakázání určité vlastnosti Window Makera.
|
||||||
|
|
||||||
|
Příklad:
|
||||||
|
|
||||||
|
./configura --enable-kde --enable-gnome
|
||||||
|
|
||||||
|
nakonfiguruje Window Maker s podporou KDE a GNOME
|
||||||
|
|
||||||
|
Seznam ostatních možností dostanete spuštěním ./configure --help
|
||||||
|
|
||||||
|
--with-libs-from
|
||||||
|
specifikuje, které další adresáře s knihovnami se mají
|
||||||
|
prohledávat. Řetězec -L musí předcházet každému adresáři,
|
||||||
|
např:
|
||||||
|
--with-libs-from="-L/opt/libs -L/usr/local/lib"
|
||||||
|
|
||||||
|
--with-incs-from
|
||||||
|
určuje, které další adresáře s hlavičkovými soubory se mají
|
||||||
|
prohledat. Řetězec -I musí předcházet každému adresáři,
|
||||||
|
např:
|
||||||
|
--with-incs-from="-I/opt/headers -I/usr/local/include"
|
||||||
|
|
||||||
|
--enable-single-icon
|
||||||
|
umožňuje skrýt všechny ikony aplikací WM_CLASS+WM_INSTANCE
|
||||||
|
do jedné jediné. Tato vlastnost není podporovaná ze strany vývojářů.
|
||||||
|
Když budete mít s touto funkcí problémy, tak se obraťte na jejího
|
||||||
|
autora: Christopher Seawood <cls@seawood.org>
|
||||||
|
|
||||||
|
--disable-shm
|
||||||
|
zakáže používání zdílené paměti MIT. To trochu zpomalí generování
|
||||||
|
textur, ale v některých případech se to jeví jako nezbytnost z důvodu
|
||||||
|
chyby, která způsobuje špatné zobrazování ikon a textur.
|
||||||
|
|
||||||
|
--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í,
|
||||||
|
výběr více oken. Uvědomte si, že takto už nebudete schopni ukončit
|
||||||
|
samotný Window Maker pomocí aplikačního menu. Budete muset zabít Window
|
||||||
|
Maker z textové konzole nebo ho ukončit z KDE nebo GNOME.
|
||||||
|
Nedoporučuje se povolit tuto vlastnost.
|
||||||
|
|
||||||
|
--enable-modelock
|
||||||
|
podpora pro XKB nastavení jazyka. Když nevíte, o co jde, tak to
|
||||||
|
pravděpodobně nebudete potřebovat.
|
||||||
|
|
||||||
|
--enable-sound
|
||||||
|
povolí podporu modulu zvukových efektů.
|
||||||
|
|
||||||
|
--disable-xpm
|
||||||
|
zakáže podporu knihovny XPM, pokud je dostupná na vašem systému.
|
||||||
|
|
||||||
|
--disable-png
|
||||||
|
zakáže podporu knihovny PNG.
|
||||||
|
|
||||||
|
--disable-tiff
|
||||||
|
zakáže podporu knihovny TIFF.
|
||||||
|
|
||||||
|
--disable-gif
|
||||||
|
zakáže podporu knihovny GIF.
|
||||||
|
|
||||||
|
--disable-jpeg
|
||||||
|
zakáže podporu knihovny JPEG.
|
||||||
|
|
||||||
|
--disable-shape
|
||||||
|
zakáže tvarovaná okna (pro oclock, xeyes, atd.).
|
||||||
|
|
||||||
|
POŽADAVKY PRO SPECIFICKÉ PLATFORMY
|
||||||
|
==================================
|
||||||
|
|
||||||
|
-DEC/Alpha
|
||||||
|
|
||||||
|
Následující mail není přeložen, ale hovoří se v něm, že pravděpodobně
|
||||||
|
není potřeba konfigurovat Window Maker na Alphě s volbou --disable-shm.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
From: Anton Ivanov <aivanov@eu.level3.net>
|
||||||
|
To: Marcelo E. Magallon <mmagallo@debian.org>
|
||||||
|
Subject: Re: Is the WindowMaker package working ok on Alpha?
|
||||||
|
|
||||||
|
> Hi,
|
||||||
|
>
|
||||||
|
> I was reading some docs on the WindowMaker tarball, and found this:
|
||||||
|
>
|
||||||
|
> | - DEC/Alpha machines
|
||||||
|
> | You might need to pass the --disable-shm flag to configure,
|
||||||
|
> | like ./configure --disable-shm
|
||||||
|
>
|
||||||
|
> is anyone having problems with WindowMaker on Alpha? Can someone
|
||||||
|
> please test this? Should the flag be passed when building on Alpha?
|
||||||
|
|
||||||
|
Disclaimer: alphas under my command have never run X and are least likely to
|
||||||
|
suddenly start running it anytime soon.
|
||||||
|
|
||||||
|
Alpha used to have some ridiculously low amount of shared memory
|
||||||
|
configured.
|
||||||
|
So quite a lot of apps used to barf. Namely - cdrecord, mysql server, etc.
|
||||||
|
|
||||||
|
Check where is yours at the moment and raise it to a more appropriate
|
||||||
|
value by either catting to the appropriate /proc entry or changing the
|
||||||
|
/usr/src/linux/include/asm/shmparam.h.
|
||||||
|
|
||||||
|
Otherwise the shared memory on alpha should be fully functional and I
|
||||||
|
see no reason to disable it. Mine are bumped up to 32 or more on most
|
||||||
|
machines.
|
||||||
|
|
||||||
|
And If I recall correctly the comments in that file are actually
|
||||||
|
wrong. Value is not bytes, but in machine size word. For alpha *8.
|
||||||
|
|
||||||
|
As I said - I do not run X on them so all #include "stdisclaimer.h"
|
||||||
|
apply.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
- SCO Unix - configure spusťte takto:
|
||||||
|
CFLAGS="-belf -DANSICPP" ./configure
|
||||||
|
|
||||||
|
- SunOS, Solaris
|
||||||
|
Když máte naistalovaný gcc, tak configure spusťte takto:
|
||||||
|
CPP_PATH="gcc -E -x c" ./configure
|
||||||
|
Preprocesoru cpp od Sunu chybějí některé vlastnosti, které Window Maker
|
||||||
|
potřebuje, a to může způsobit problémy během parsování konfiguračních
|
||||||
|
souborů. Je možné, že budete muset použít --with-libs-from a
|
||||||
|
--with-incs-from k nahrazení adresáře s libtiff.
|
||||||
|
Někdo doporučuje použít /usr/local/lib jako první cestu v LD_LIBRARY_PATH.
|
||||||
|
|
||||||
|
Když máte Ultra Creator 3D nebo jinou high-end grafickou kartu, tak se
|
||||||
|
ujistěte, že X server startuje s 24 bitovou barevnou hloubkou, jinak
|
||||||
|
můžete mít problémy s pomícháním barev. Toto je chyba Window Makeru,
|
||||||
|
která bude odstraněna.
|
||||||
|
|
||||||
|
- GNU/Linux obecně
|
||||||
|
Ujistěte se, že soubor /etc/ld.so.conf obsahuje řádek "/usr/local/lib".
|
||||||
|
Odinstalujte jakoukoliv starší verzi balíčku Window Makeru před instalací
|
||||||
|
novější verze.
|
||||||
|
Nezapomeňte spustit ldconfig po instalaci Window Makeru.
|
||||||
|
|
||||||
|
- RedHat GNU/Linux
|
||||||
|
RedHat má několik obtěžujících chyb. Pokud ho používáte dodržujte několik
|
||||||
|
následujících kroků, jinak vám Window Maker nebude fungovat.
|
||||||
|
|
||||||
|
* pokud máte nainstalovaný Window Maker z distribuce RedHat, tak ho před
|
||||||
|
upgradem odinstalujte
|
||||||
|
|
||||||
|
* ujistěte se, že nemáte systémové proměnné LANG a LINGUAS nastavené
|
||||||
|
na en_RN
|
||||||
|
|
||||||
|
* ujistěte se, že vaše systémová proměnná PATH obsahuje položku
|
||||||
|
/usr/local/bin
|
||||||
|
|
||||||
|
* ujistěte se, že soubor /etc/ld.so.conf obsahuje řádek "/usr/local/lib"
|
||||||
|
před tím, než spustíte ldconfig (na konci instalace)
|
||||||
|
|
||||||
|
* pokud máte problémy, které se projevují chybovou hláškou, která
|
||||||
|
obsahuje text --no-reexec, tak odinstalujte libtool-1.2b a nainstalujte
|
||||||
|
si novější verzi libtool-1.3. libtool-1.3 můžete nalézt na adrese:
|
||||||
|
ftp.gnu.org . Přečtěte si také odstavec ŘEŠENÍ PROBLÉMÚ.
|
||||||
|
|
||||||
|
* pokud máte nainstalovaný balíček Window Maker od RedHatu a nyní
|
||||||
|
instalujete novou verzi "ručně" (kompilováním zdrojových kódů), tak
|
||||||
|
nejprve odinstalujte stávající balíček.
|
||||||
|
|
||||||
|
* ujistěte se, že se na vašem systému nachází symbolický link z
|
||||||
|
/usr/include/X11 na /usr/X11R6/include/X11. Pokud tomu tak není, tak
|
||||||
|
na příkazovou řádku napište:
|
||||||
|
|
||||||
|
ln -s /usr/X11R6/include/X11 /usr/include/X11
|
||||||
|
|
||||||
|
* ujistěte se, že máte symbolický link /lib/cpp ukazující na cpp
|
||||||
|
program
|
||||||
|
|
||||||
|
Pokud pochybujete o nějakém z předcházejích kroků, tak neváhejte
|
||||||
|
kontaktovat uživatelskou podporu distribuce RedHat. Oni vám laskavě
|
||||||
|
zodpoví všechny vaše dotazy zohledňující váš systém. Oni vědí
|
||||||
|
mnohem více o vašem (jejich) systému než my (my nepoužíváme
|
||||||
|
RedHat).
|
||||||
|
|
||||||
|
- PowerPC MkLinux
|
||||||
|
Budete potřebovat poslední verzi Xpma. Starší verze pravděpodobně
|
||||||
|
obsahují chybu, která způsobuje zamrznutí systému.
|
||||||
|
|
||||||
|
- Debian GNU/Linux
|
||||||
|
Pokud chcete podporu JPEG a TIFF, tak se ujistěte, že máte nainstalovány
|
||||||
|
balíčky libtiff-dev a libjpeg-dev.
|
||||||
|
|
||||||
|
- SuSE GNU/Linux
|
||||||
|
Pokud máte již nainstalován baliček Window Maker od SuSE, tak ho
|
||||||
|
odstraňte než se pustíte do kompilace Window Makeru. když tak
|
||||||
|
neučiníte, budete mít problémy.
|
||||||
|
|
||||||
|
- MetroX (neznámá verze)
|
||||||
|
Metrox obsahuje chybu, která zapřičiňuje, že obrázky, které jsou
|
||||||
|
nastaveny jako pozadí, jsou poškozeny. Pokud používáte Metrox a
|
||||||
|
máte podivné problémy s texturami, tak nepoužívejte textury v
|
||||||
|
titulcích nebo používejte jiný X server.
|
||||||
|
|
||||||
|
INSTALACE
|
||||||
|
=========
|
||||||
|
|
||||||
|
Nejjednodušší způsob, jak nainstalovat Window Maker, je spustit skript
|
||||||
|
Install nebo Install.cs (ten s vámi komunikuje česky). Oba skripty
|
||||||
|
vás jednoduše provedou celou instalací.
|
||||||
|
|
||||||
|
su
|
||||||
|
Install.cs
|
||||||
|
|
||||||
|
Poznámka: tato metoda neposkytuje všechny možnosti konfigurace a pokud
|
||||||
|
se setkáte s nějakými problémy, tak stejně budete muset
|
||||||
|
použít následující způsob kompilace.
|
||||||
|
|
||||||
|
Kompilace Window Makeru
|
||||||
|
-----------------------
|
||||||
|
Pro osvědčený způsob zadejte následující příkazy v shellu:
|
||||||
|
|
||||||
|
./configure
|
||||||
|
make
|
||||||
|
|
||||||
|
pak se přihlašte jako root a zadejte:
|
||||||
|
|
||||||
|
make install
|
||||||
|
ldconfig
|
||||||
|
|
||||||
|
pokud nejste programátor a nebudete ladit Window Maker, tak se můžete zbavit
|
||||||
|
ladících symbolů v binárních souborech a zmenšit jejich velikost:
|
||||||
|
|
||||||
|
make install-strip
|
||||||
|
ldconfig
|
||||||
|
|
||||||
|
Takto zkompilujete a nainstalujete Window Maker se standartními parametry.
|
||||||
|
|
||||||
|
Pokud chcete upravit některé vlastnosti, tak musíte učinit následující:
|
||||||
|
|
||||||
|
1. (volitelné) Podívejte se na část MOŽNOSTI KONFIGURACE, kde jsou
|
||||||
|
uvedené možnosti konfigurace. Nebo spusťte:
|
||||||
|
|
||||||
|
./configure --help
|
||||||
|
|
||||||
|
tak dostanete kompletní seznam všech dostupných možností konfigurace.
|
||||||
|
|
||||||
|
2. Spusťte ./configure s možností, kterou jste si vybrali. Například,
|
||||||
|
pokud chcete použít možnost --enable-kde, tak zadejte:
|
||||||
|
|
||||||
|
./configure --enable-kde
|
||||||
|
|
||||||
|
3. (volitelné) Otevřete soubor ./src/wconfig.h vaším oblíbeným editorem
|
||||||
|
a upravte některé možnosti, které si přejete změnit.
|
||||||
|
|
||||||
|
4. Kompilace. Zadejte pouze:
|
||||||
|
|
||||||
|
make
|
||||||
|
|
||||||
|
5. Přihlaste se jako root (pokud tak nemůžetet učinit, tak si přečtěte
|
||||||
|
část "Nemám rootovské helso :-(") a nainstalujte Window Maker na váš
|
||||||
|
systém:
|
||||||
|
|
||||||
|
su root
|
||||||
|
make install
|
||||||
|
|
||||||
|
Nastavení specifické pro uživatele
|
||||||
|
----------------------------------
|
||||||
|
|
||||||
|
Tyto instrukce nejsou povinné, pokud upgradujete Window Maker ze starší
|
||||||
|
verze na novější a pokud není uvedeno jinak v souboru NEWS.
|
||||||
|
|
||||||
|
Každý uživatel na vašem systému, který si přeje používat Window Maker musí
|
||||||
|
udělat následující:
|
||||||
|
|
||||||
|
1. Nainsatlovat konfigurační soubory Window Makeru do jeho domovského
|
||||||
|
adresáře:
|
||||||
|
|
||||||
|
wmaker.inst
|
||||||
|
|
||||||
|
wmaker.inst nainstaluje konfigurační soubory a nastaví X server tak,
|
||||||
|
aby automaticky spouštěl Window Maker při jejich spuštění.
|
||||||
|
|
||||||
|
To je všechno, přátelé.
|
||||||
|
|
||||||
|
Informace o konfiguraci a spoustě ostatních věcí vám poskytne:
|
||||||
|
|
||||||
|
man wmaker
|
||||||
|
|
||||||
|
Pro hlubší úvod do Window Makeru si přečtěte Uživatelskou příručku (User Guide).
|
||||||
|
|
||||||
|
Měli byste se také podívat na FAQ (Frequently Asked Questions = často kladené
|
||||||
|
otázky), pokud budete mít nějaké problémy/potíže jak při samotné kompilaci,
|
||||||
|
tak s užíváním Window Makeru.
|
||||||
|
|
||||||
|
Instalování speciálního balíčku
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
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
|
||||||
|
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.
|
||||||
|
|
||||||
|
Nemám rootovské helso :-(
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
Pokud nemáte superuživatelská privilegia (nemůžete se přihlásit jako root),
|
||||||
|
tak nezoufejte, protože můžete nainstalovat Window Maker do vašeho vlastního
|
||||||
|
domovského adresáře. K tomu musíte použít volbu --prefix při spuštění
|
||||||
|
./configure. Také musíte použít volbu --with-appspath, která specifikuje
|
||||||
|
cestu pro WPrefs.app.
|
||||||
|
Příklad:
|
||||||
|
|
||||||
|
./configure --prefix=/home/karel --with-appspath=/home/karel/GNUstep/Apps
|
||||||
|
|
||||||
|
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
|
||||||
|
~/bin/wmaker.inst.
|
||||||
|
|
||||||
|
Samozřejmě, že adresář /home/karel bude ve vašem případě nahrazen vaším
|
||||||
|
vlastním domovským adresářem.
|
||||||
|
|
||||||
|
|
||||||
|
UPGRADE
|
||||||
|
=======
|
||||||
|
|
||||||
|
Pokud upgradujete ze starší verze Window Makeru:
|
||||||
|
|
||||||
|
1. Nakonfigurujte a zkompilujte Window Maker jako obvykle.
|
||||||
|
2. Nainstalujte Window Maker (ale nespouštějte wmaker.inst).
|
||||||
|
3. Přečtěte si soubor NEWS a aktualizujte vaše konfigurační soubory,
|
||||||
|
pokud je to nezbytné.
|
||||||
|
|
||||||
|
ŘEŠENÍ PROBLÉMÚ
|
||||||
|
===============
|
||||||
|
|
||||||
|
Pokud máte nějaké problémy během konfigurace (když běží configure), jako
|
||||||
|
například neschopnost použít knihovnu grafického formátu, o kterém víte, že
|
||||||
|
ho máte nainstalován, tak se podívejte do souboru config.log. Možná zde
|
||||||
|
najdete příčinu svých problémů.
|
||||||
|
|
||||||
|
== Error with loading fonts, even if they exist.
|
||||||
|
|
||||||
|
Zkuste kompilaci bez podpory NLS (národního prostředí).
|
||||||
|
|
||||||
|
== Error when configuring
|
||||||
|
|
||||||
|
ltconfig: unrecognized option `--no-reexec'
|
||||||
|
Try `ltconfig --help' for more information.
|
||||||
|
configure: error: libtool configure failed
|
||||||
|
|
||||||
|
odstraňte volbu --no-reexec ze souboru aclocal.mc a spusťte znovu configure.
|
||||||
|
Také zkontrolujte, zda verze autoconfu a automaku, které máte nainsatlované
|
||||||
|
odpovídají níže uvedeným hodnotám:
|
||||||
|
autoconf 2.13
|
||||||
|
automake 1.4
|
||||||
|
libtool 1.3
|
||||||
|
|
||||||
|
Poznámka: nemůže to být libtool 1.2b, ale musí to být libtool 1.3 ze stránek
|
||||||
|
GNU.
|
||||||
|
|
||||||
|
== configure doesn't detect libtiff, or other graphic libraries.
|
||||||
|
|
||||||
|
Smažte soubor config.cache, pak znovu spusťte configure s následujícími
|
||||||
|
volbami (a jinými, které používáte):
|
||||||
|
--with-libs-from="-L/usr/local/lib"
|
||||||
|
--with-incs-from="-I/usr/local/include -I/usr/local/include/tiff"
|
||||||
|
Na příslušná místa vložte cesty k vaším grafickým knihovnám a odpovídajícím
|
||||||
|
hlavičkovým souborům. Můžete zadat několik cest do těchto voleb, jako je to
|
||||||
|
ve výše uvedeném příkladě --with-incs-from. Jenom je nezapomeňte oddělit
|
||||||
|
mezerou.
|
||||||
|
|
||||||
|
== configure doesn't detect libXpm.
|
||||||
|
|
||||||
|
* Zkontrolujte, jestli máte symbolický link ze souboru libXpm.so.4.9 na
|
||||||
|
soubor libXpm.so
|
||||||
|
|
||||||
|
== Segmentation fault on startup
|
||||||
|
|
||||||
|
* Zkontrolujte, jestli verze knihovny libXPM je vyšší než 4.7
|
||||||
|
|
||||||
|
* Zkontrolujte, zda-li máte upravenou verzi ~/GNUstep/Defaults/WindowMaker
|
||||||
|
Pokud si nejste jisti, tak zkuste přejmenovat ~/GNUstep na ~/GNUtmp a
|
||||||
|
spusťte wmaker.inst
|
||||||
|
|
||||||
|
== "...: your machine is misconfigured. gethostname() returned (none)"
|
||||||
|
|
||||||
|
* Jméno vašeho počítače je nastaveno nesprávně, protože začíná uvozovkami.
|
||||||
|
Spusťte man hostname a zde se dozvíte, jak změnit jméno vašeho počítače.
|
||||||
|
|
||||||
|
== The root menu contains only 2 entries. ("XTerm" and "Exit...")
|
||||||
|
|
||||||
|
* Window Maker nemůže nalézt cpp (preprocesor jazyka C). Pokud se váš cpp
|
||||||
|
nenachází v /lib/cpp, tak otevřte soubor src/config.h a nastavte správně
|
||||||
|
cestu CPP_PATH.
|
||||||
|
|
||||||
|
== checking lex output file root... configure: error: cannot find output from true; giving up
|
||||||
|
|
||||||
|
* Přečtěte si odstavec POŽADAVKY na začátku tohoto souboru.
|
||||||
|
|
||||||
|
MÍSTNÍ NASTAVENÍ / INTERNACIONALIZACE
|
||||||
|
=====================================
|
||||||
|
|
||||||
|
Window Maker má podporu národních jazyků. Aby jste ji povolili, tak
|
||||||
|
musíte zkompilovat Window Maker s několika dalšími parametry.
|
||||||
|
Seznam podporovaných jazyků naleznete v souboru ./po/README.
|
||||||
|
|
||||||
|
0 - Musíte mít nainstalovaný balíček GNU gettextu. Tento balíček
|
||||||
|
můžete nalézt na ftp://prep.ai.mit.edu/pub/gnu/gettext-nnn.tar.gz
|
||||||
|
|
||||||
|
Kroky 1,2 a 3 můžete vynechat, pokud používáte skript Install.cs nebo
|
||||||
|
skript Install.
|
||||||
|
|
||||||
|
1 - Vyberte si jazyky, které budete chtít používat. Zadejte seznam
|
||||||
|
těchto jazyků do systémové proměnné LINGUAS. Angličtina je
|
||||||
|
podporována vždy. Příklady
|
||||||
|
|
||||||
|
C - shell:
|
||||||
|
|
||||||
|
setenv LINGUAS "pt ja de"
|
||||||
|
|
||||||
|
Bash(sh):
|
||||||
|
|
||||||
|
export LINGUAS
|
||||||
|
LINGUAS="pt ja de"
|
||||||
|
|
||||||
|
Přečtěte si soubor po/README pokud chcete přeložit Window Maker
|
||||||
|
pro nějaký další jazyk.
|
||||||
|
|
||||||
|
2 - Navíc, pokud váš jazyk používá multi-byte znaky, například Japonština
|
||||||
|
nebo Korejština, tak musíte nastavit volbu the MultiByteText na YES
|
||||||
|
v souboru ~/GNUstep/Defaults/WMGLOBAL
|
||||||
|
|
||||||
|
3 - Nakonfigurujte, zkompilujte a nainstalujte Window Maker jako obvykle.
|
||||||
|
|
||||||
|
4 - Národní prostředí si můžete změnit i za běhu Window Makeru. Systémovou
|
||||||
|
proměnnou LANG nastavíte na vámi zvolenou hodnotu. Například, pokud
|
||||||
|
chcete použít portugalské prostředí, musíte spustit:
|
||||||
|
|
||||||
|
C - shell:
|
||||||
|
|
||||||
|
setenv LANG pt
|
||||||
|
|
||||||
|
Bourne shell a podobné:
|
||||||
|
|
||||||
|
export LANG
|
||||||
|
LANG=pt
|
||||||
|
|
||||||
|
Nakonec musíte restartovat/spustit Window Maker.
|
||||||
|
|
||||||
|
Poznámka: Když máte nastavenou systémovou proměnnou LC_TYPE, tak jí
|
||||||
|
musíte zrušit před spuštěním Window Makeru.
|
||||||
|
|
||||||
|
Window Maker hledá soubory s definicí menu v tomto pořadí (pro
|
||||||
|
brazilskou portugalštinu):
|
||||||
|
|
||||||
|
menu.pt_BR
|
||||||
|
menu.pt
|
||||||
|
menu
|
||||||
|
|
||||||
|
5 - Pokud si vyberete jazyk, který používá multi-byte znaky, tak musíte
|
||||||
|
příslušným způsobem nastavit fonty. Přečtěte si manuálové stránky
|
||||||
|
o XCreateFontSet k získání většího množství informací o daném
|
||||||
|
problému. Musíte změnit v souboru ~/GNUstep/Default/WindowMaker
|
||||||
|
nastavení fontů pro titulky, menu, atd. Fonty pro dialogy nastavíte
|
||||||
|
v souboru ~/GNUstep/Default/WMGLOBAL. Řetězce %d ve jménech fontů
|
||||||
|
nemusí být odstraněné. Také můžete použít skript wsetfont, který
|
||||||
|
toto vše učiní za vás. Pokud se ho rozhodnote použít, tak si k němu
|
||||||
|
přečtěte instrukce tak, že spustíte wsetfont bez argumentů.
|
||||||
|
|
||||||
|
Příklad části souboru ~/GNUstep/Default/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-*";
|
||||||
|
|
||||||
|
a souboru ~/GNUstep/Default/WMGLOBAL:
|
||||||
|
|
||||||
|
SystemFont = "-*-*-medium-r-normal-*-%d-*-*-*-*-*-*-*";
|
||||||
|
BoldSystemFont = "-*-*-medium-r-normal-*-%d-*-*-*-*-*-*-*";
|
||||||
|
|
||||||
|
Tyto dva fonty jsou používány v aplikacích, které používají WINGs (WindowMaker a
|
||||||
|
WPrefs.app).
|
||||||
|
|
||||||
|
Skript wsetfont vám umožní nastavit fonty mnohem jednoduším způsobem. Podívejte
|
||||||
|
se na jeho manuálové stránku k získání bližších informací.
|
||||||
+4
-9
@@ -78,9 +78,9 @@ Lo siguiente se necesita para compilar Window Maker:
|
|||||||
instaladas, asegúrese de tener TODO lo siguiente con estas versiones
|
instaladas, asegúrese de tener TODO lo siguiente con estas versiones
|
||||||
exactas:
|
exactas:
|
||||||
|
|
||||||
autoconf 2.13
|
autoconf 2.54
|
||||||
automake 1.4
|
automake 1.4
|
||||||
libtool 1.3
|
libtool 1.4.2
|
||||||
|
|
||||||
Si tiene una versión distinta, desactívelas temporalemte renombrándolas
|
Si tiene una versión distinta, desactívelas temporalemte renombrándolas
|
||||||
a otras cosa o desinstalándolas desde su sistema. Si no desarrolla
|
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.
|
Para soporte de imagen GIF.
|
||||||
ftp://prtr-13.ucsc.edu/pub/libungif/
|
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
|
- GNU xgettext
|
||||||
Si quiere usar mensajes traducidos, necesitará GNU gettext.
|
Si quiere usar mensajes traducidos, necesitará GNU gettext.
|
||||||
Otras versiones de gettext no son compatibles y no funcionarán.
|
Otras versiones de gettext no son compatibles y no funcionarán.
|
||||||
@@ -235,8 +230,8 @@ Subject: Re: El paquete WindowMaker funciona bien en Alpha?
|
|||||||
> por favor probar esto? Debería el parámetro ser pasado al compilar
|
> por favor probar esto? Debería el parámetro ser pasado al compilar
|
||||||
> en Alpha?
|
> en Alpha?
|
||||||
|
|
||||||
Descargo de responsabilidad: alphas bajo mi mando nunca han ejecutado X y are
|
Descargo de responsabilidad: alphas bajo mi mando nunca han ejecutado X
|
||||||
least likely to suddenly start running it anytime soon.
|
y es poco probable de que las ejecute repentinamente en algún momento.
|
||||||
|
|
||||||
Alpha suele tener alguna ridícula poca cantidad de memoria compartida
|
Alpha suele tener alguna ridícula poca cantidad de memoria compartida
|
||||||
configurada.
|
configurada.
|
||||||
|
|||||||
+2
-8
@@ -77,9 +77,9 @@ Les
|
|||||||
Ces outils ne sont pas indispensables, mais si au moins l'un d'eux
|
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
|
est installé sur votre système, assurez-vous que TOUS le sont, et
|
||||||
que les versions de ces outils sont exactement :
|
que les versions de ces outils sont exactement :
|
||||||
autoconf 2.13
|
autoconf 2.54
|
||||||
automake 1.4
|
automake 1.4
|
||||||
libtool 1.3
|
libtool 1.4.2
|
||||||
Si les versions installées sur votre système différent, désactivez-les
|
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
|
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,
|
de votre système. Si vous ne développez ni de compilez de logiciels,
|
||||||
@@ -120,12 +120,6 @@ fonctionner aussi bien.
|
|||||||
Pour pouvoir utiliser les images au format GIF.
|
Pour pouvoir utiliser les images au format GIF.
|
||||||
ftp://prtr-13.ucsc.edu/pub/libungif/
|
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
|
- GNU xgettext
|
||||||
Si vous voulez disposer des traductions en d'autres langues, GNU gettext
|
Si vous voulez disposer des traductions en d'autres langues, GNU gettext
|
||||||
est nécessaire. Les autres versions de gettext sont incompatibles et ne
|
est nécessaire. Les autres versions de gettext sont incompatibles et ne
|
||||||
|
|||||||
+2
-2
@@ -68,9 +68,9 @@ Para compilar o Window Maker voc
|
|||||||
- autoconf, automake and libtool
|
- autoconf, automake and libtool
|
||||||
Estes pacotes não são necessários, mas se você tiver um ou mais deles instalados,
|
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:
|
verifique se todos eles são das seguintes versões:
|
||||||
autoconf 2.13
|
autoconf 2.54
|
||||||
automake 1.4
|
automake 1.4
|
||||||
libtool 1.3
|
libtool 1.4.2
|
||||||
Se você possui uma versão diferente, desative-os mudando os nomes dos arquivos
|
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
|
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.
|
software você não precisa deles, logo, você pode desinstalá-los com segurança.
|
||||||
|
|||||||
+2
-2
@@ -71,9 +71,9 @@ Nasledovn
|
|||||||
- autoconf, automake a libtool
|
- autoconf, automake a libtool
|
||||||
Tieto nástroje NIE sú potrebné, ale ak máte niektoré z nich nain¹talo-
|
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:
|
vané, uistite sa, ¾e V©ETKY sú presne nasledovné verzie:
|
||||||
autoconf 2.13
|
autoconf 2.54
|
||||||
automake 1.4
|
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 máte odli¹né verzie, odin¹talujte ich alebo ich doèasne premenujte.
|
||||||
Ak neprogramujete, nebudete ich potrebova» a teda ich mô¾ete
|
Ak neprogramujete, nebudete ich potrebova» a teda ich mô¾ete
|
||||||
odin¹talova».
|
odin¹talova».
|
||||||
|
|||||||
@@ -67,10 +67,6 @@ echo "questions. We will IGNORE any questions that are already"
|
|||||||
echo "answered in the documentation."
|
echo "answered in the documentation."
|
||||||
echo
|
echo
|
||||||
perai
|
perai
|
||||||
echo
|
|
||||||
echo "Did you install libPropList? If not, please install it now."
|
|
||||||
echo
|
|
||||||
perai
|
|
||||||
echo "Did you read the INSTALL file?"
|
echo "Did you read the INSTALL file?"
|
||||||
echo -n "<y/n> "
|
echo -n "<y/n> "
|
||||||
read rtfm
|
read rtfm
|
||||||
|
|||||||
+5
-12
@@ -3,11 +3,11 @@
|
|||||||
SUBDIRS = wrlib WINGs src util po WindowMaker wmlib test WPrefs.app doc\
|
SUBDIRS = wrlib WINGs src util po WindowMaker wmlib test WPrefs.app doc\
|
||||||
contrib
|
contrib
|
||||||
|
|
||||||
EXTRA_DIST = TODO BUGS BUGFORM FAQ FAQ.I18N MIRRORS COPYING.WTFPL \
|
EXTRA_DIST = TODO BUGS BUGFORM FAQ FAQ.I18N FAQ.I18N.cs FAQ.I18N.sk \
|
||||||
Install acconfig.h INSTALL.pt README.pt\
|
Install INSTALL.cs INSTALL.fr INSTALL.es INSTALL.pt INSTALL.sk \
|
||||||
mkpatch README.KDE README.GNOME WindowMaker.lsm.in\
|
README.antialiasing README.definable-cursor README.pt \
|
||||||
README.definable-cursor \
|
README.KDE README.GNOME Sample.XftConfig \
|
||||||
FAQ.I18N.sk INSTALL.sk INSTALL.es INSTALL.fr
|
MIRRORS COPYING.WTFPL mkpatch WindowMaker.lsm.in
|
||||||
# libwmfun-0.0.3.tar.gz
|
# libwmfun-0.0.3.tar.gz
|
||||||
|
|
||||||
WindowMaker.lsm: WindowMaker.lsm.in
|
WindowMaker.lsm: WindowMaker.lsm.in
|
||||||
@@ -18,10 +18,3 @@ WindowMaker.lsm: WindowMaker.lsm.in
|
|||||||
-e "s/SIZE/$$size M/"\
|
-e "s/SIZE/$$size M/"\
|
||||||
WindowMaker.lsm.in > WindowMaker-$(VERSION).lsm
|
WindowMaker.lsm.in > WindowMaker-$(VERSION).lsm
|
||||||
|
|
||||||
#dist-hook:
|
|
||||||
# touch `find -name configure.in -print`
|
|
||||||
# touch `find -name aclocal.m4 -print`
|
|
||||||
# touch `find -name Makefile.am -print`
|
|
||||||
# touch `find -name Makefile.in -print`
|
|
||||||
# touch `find -name configure -print`
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,62 @@
|
|||||||
NEWS for veteran Window Maker users
|
NEWS for veteran Window Maker users
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
|
--- 0.81.0
|
||||||
|
|
||||||
|
Antialiased font support
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
With the addition of support for antialiased fonts in the WINGs library, now
|
||||||
|
Window Maker can also support antialiased fonts. However enabling them may
|
||||||
|
prove not to be a trivial task to do. This is because enabling antialiased
|
||||||
|
fonts doesn't depend solely on Window Maker and its configuration files. It
|
||||||
|
also depends on the X server, the X server extension modules and their
|
||||||
|
specific configuration files.
|
||||||
|
|
||||||
|
For a description of all the steps required to get antialiased fonts on
|
||||||
|
screen please check the README.antialiasing file which describes all the
|
||||||
|
things you need to do on a step by step basis. In addition it has extra
|
||||||
|
useful hints and idea to make your antialiased fonts look nice in different
|
||||||
|
contexts.
|
||||||
|
|
||||||
|
After you have done all the steps described there, you can enable antialiased
|
||||||
|
fonts either by adding AntialiasedText = Yes; in ~/GNUstep/Defaults/WindowMaker
|
||||||
|
or by launching WPrefs and checking the "Smooth font edges" in the Expert User
|
||||||
|
Preferences panel.
|
||||||
|
|
||||||
|
As a general note you should always use a True Type font for your fonts if
|
||||||
|
antialiasing is enabled, or alias a normal font to a True Type in the Xft
|
||||||
|
configuration (read the details in README.antialiasing). Else you may get
|
||||||
|
unepleasant results in the look of your screen :P
|
||||||
|
|
||||||
|
|
||||||
|
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)))
|
||||||
|
|
||||||
|
|
||||||
--- 0.80.0
|
--- 0.80.0
|
||||||
|
|
||||||
Shading/Unshading windows using mouse wheel on their titlebar
|
Shading/Unshading windows using mouse wheel on their titlebar
|
||||||
---------------------------------------------------------
|
-------------------------------------------------------------
|
||||||
|
|
||||||
In addition to the known methods of shading/unshading a window, one can now
|
In addition to the known methods of shading/unshading a window, one can now
|
||||||
do this by using the mouse wheel on the window's titlebar. The mouse events
|
do this by using the mouse wheel on the window's titlebar. The mouse events
|
||||||
@@ -92,10 +144,27 @@ that this happened.
|
|||||||
New dock option
|
New dock option
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
Copy/paste launch in dock. For example, put
|
Copy/paste launch in dock.
|
||||||
netscape %s in the Docked icon for Netscape,
|
==========================
|
||||||
select an url somewhere and then middle-click the icon.
|
|
||||||
The command will be launched with the "pasted" string.
|
For example, put netscape %s in the Docked icon for Netscape, select an url
|
||||||
|
somewhere and then middle-click the icon. The command will be launched with
|
||||||
|
the "pasted" string.
|
||||||
|
|
||||||
|
|
||||||
|
Xinerama Support
|
||||||
|
================
|
||||||
|
|
||||||
|
Supported Xinerama features:
|
||||||
|
|
||||||
|
- Normal maximization of windows will maximize to only one of the screens,
|
||||||
|
the one where the cursor pointer is.
|
||||||
|
|
||||||
|
- Full Maximize command in window menu
|
||||||
|
|
||||||
|
- Place dialogs in the middle of the head where the pointer is
|
||||||
|
|
||||||
|
- Try to place windows inside one head in non-manual placement modes
|
||||||
|
|
||||||
|
|
||||||
Less dependancies
|
Less dependancies
|
||||||
|
|||||||
@@ -13,7 +13,6 @@
|
|||||||
|
|
||||||
Dan Pascu
|
Dan Pascu
|
||||||
|
|
||||||
]d
|
|
||||||
|
|
||||||
|
|
||||||
Web/FTP Master
|
Web/FTP Master
|
||||||
@@ -271,7 +270,7 @@ bellow:
|
|||||||
- to reduce memory usage, disable the icon cache, by setting the RIMAGE_CACHE
|
- 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
|
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
|
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
|
Keyboard Mouse Control
|
||||||
|
|||||||
@@ -0,0 +1,154 @@
|
|||||||
|
|
||||||
|
Here is a step by step mini-HOWTO of the things needed to be done to get
|
||||||
|
antialiased fonts in Window Maker quickly:
|
||||||
|
|
||||||
|
1. Make sure you have a recent XFree server (4.x or newer, but 4.2.x or newer
|
||||||
|
is preferable). Also make sure it supports the RENDER extension (you can
|
||||||
|
see this in the output of xdpyinfo) and it has the freetype extension
|
||||||
|
module (you should have a /usr/X11R6/lib/modules/fonts/libfreetype.a file).
|
||||||
|
2. Make sure you have the following lines in your XF86Config file in the
|
||||||
|
"Module" section:
|
||||||
|
Load "type1"
|
||||||
|
Load "freetype"
|
||||||
|
Load "extmod"
|
||||||
|
(Not sure if extmod is really required for antialiased fonts, but it won't
|
||||||
|
hurt).
|
||||||
|
3. Install some True Type fonts say in /usr/X11R6/lib/X11/fonts/TrueType
|
||||||
|
4. To generate the fonts.scale and fonts.dir files in the directory where the
|
||||||
|
True Type fonts were installed you need an utility named ttmkfdir. There is
|
||||||
|
also an utility named mkttfdir but that only supports ISO8859-1 and JIS
|
||||||
|
encodings. From my experience ttmkfdir will recognize more fonts and works
|
||||||
|
better so I recommend using this one. You should issue these commands to
|
||||||
|
generate the fonts.scale and fonts.dir files:
|
||||||
|
cd /usr/X11R6/lib/X11/fonts/TrueType
|
||||||
|
ttmkfdir -o fonts.scale
|
||||||
|
mkfontdir
|
||||||
|
5. Now add /usr/X11R6/lib/X11/fonts/TrueType to your font path in the
|
||||||
|
XF86Config file. It goes in the "Files" section as:
|
||||||
|
FontPath "/usr/X11R6/lib/X11/fonts/TrueType"
|
||||||
|
I recommend to put this at the top of your font path list.
|
||||||
|
6. You can restart the X server at this point, to make all these changes take
|
||||||
|
effect.
|
||||||
|
7. Edit your /etc/X11/XftConfig file (or ~/.xftconfig if you don't have
|
||||||
|
access to edit the global file). Make sure that the True Type font path is
|
||||||
|
_before_ the Type1 font path. You should have something like this:
|
||||||
|
dir "/usr/X11R6/lib/X11/fonts/TrueType"
|
||||||
|
dir "/usr/X11R6/lib/X11/fonts/Type1"
|
||||||
|
If you add extra True type paths, add them before the Type1 path
|
||||||
|
If the Type1 path is first, and the Xft library fails to find/load the font
|
||||||
|
you asked for, it will load some very ugly defaults.
|
||||||
|
A sample XftConfig file is included with the Window Maker source at
|
||||||
|
toplevel as Sample.XftConfig. You can use that as reference and for ideas.
|
||||||
|
8. Compile and install Window Maker. No special switches are needed. However
|
||||||
|
watch the ./configure output and check if it says that Antialiased text
|
||||||
|
support is enabled in WINGs. If not, probably it failed to find libXft.
|
||||||
|
Check that you have the development files for your X server installed.
|
||||||
|
9. Edit ~/GNUstep/Defaults/WMGLOBAL and add entries for the following:
|
||||||
|
AntialiasedSystemFont = "-*-trebuchet ms-medium-r-normal-*-%d-*-*-*-*-*-*-*";
|
||||||
|
AntialiasedBoldSystemFont = "-*-trebuchet ms-bold-r-normal-*-%d-*-*-*-*-*-*-*";
|
||||||
|
AntialiasedText = Yes;
|
||||||
|
Use a font that you have installed on your system (arial and "trebuchet ms"
|
||||||
|
are good choices).
|
||||||
|
If AntialiasedText is enabled in WMGLOBAL, all WINGs based application will
|
||||||
|
use antialiased fonts by default (this includes Window Maker).
|
||||||
|
You can then disable the antialiased fonts on the per application basis by
|
||||||
|
adding an AntialiasedText = No; entry in their specific configuration files
|
||||||
|
The entry in the application's configuration file will always overwrite the
|
||||||
|
global setting from WMGLOBAL.
|
||||||
|
However if you want most of your WINGs applications to use normal fonts,
|
||||||
|
but just a few to use antialiased fonts, then put AntialiasedText = No; in
|
||||||
|
WMGLOBAL, and enable antialiased fonts only in the applications you want,
|
||||||
|
by adding the AntialiasedText = Yes; in their own configuration files
|
||||||
|
|
||||||
|
At this point all WINGs based application should be able to use antialiased
|
||||||
|
fonts. You can check this by enabling antialiasing and starting WPrefs. It
|
||||||
|
should show nice antialiased text everywhere.
|
||||||
|
|
||||||
|
Now to enable antialiased fonts in Window Maker, there are 2 possibilities:
|
||||||
|
|
||||||
|
10a. Add entries for all font options in ~/GNUstep/Defaults/WindowMaker
|
||||||
|
containing True Type fonts ("trebuchet ms", arial or verdana should work
|
||||||
|
fine). Don't use non True Type fonts like Helvetica, because Xft won't
|
||||||
|
load them, instead will load some defaults. Depending on the TrueTupe vs
|
||||||
|
Type1 path order in your XftConfig file and the options declared there,
|
||||||
|
it can range from "Extremely ugly" (if path to Type1 is before the path
|
||||||
|
to True Type fonts), to "Acceptable" (if the True Type path comes first).
|
||||||
|
Also modify all your themes to hold True Type fonts for all the font
|
||||||
|
options
|
||||||
|
|
||||||
|
10b. Leave the fonts as they are (for example leave the default Helvetica) in
|
||||||
|
~/GNUstep/Defaults/WindowMaker, and add an alias (or more) in the
|
||||||
|
XftConfig file. This alias should look something like:
|
||||||
|
match any family == "Helvetica" edit family += "Trebuchet MS";
|
||||||
|
match any family == "Courier" edit family += "Courier New";
|
||||||
|
...
|
||||||
|
Which means that every time the Xft library (which is used the WINGs) gets
|
||||||
|
a request to load a Helvetica font, it will load the "trebuchet ms" font
|
||||||
|
instead, keeping all the other font parameters unchanged.
|
||||||
|
|
||||||
|
Each of these 2 methods have advantages and disadvantages.
|
||||||
|
|
||||||
|
Case 10a:
|
||||||
|
---------
|
||||||
|
With the first method, you do more work and you will not be able to use
|
||||||
|
existing themes by just enabling antialiasing, because it will load default
|
||||||
|
fonts which may not look as you want. You will need to change the fonts in
|
||||||
|
every theme you want to use by replacing them with True Type fonts.
|
||||||
|
|
||||||
|
If you plan to switch antialiasing on/off, this method has a big disadvantage:
|
||||||
|
you need to edit your configuration/themes with every switch (at least if you
|
||||||
|
want Helvetica or other Type1 font for the non-antialiased case). This is
|
||||||
|
because if you have a font set to (say) Arial and want to switch antialiasing
|
||||||
|
off, you will get the normal version of Arial and you need to edit your font
|
||||||
|
options again to see Helvetica.
|
||||||
|
If you are happy with how the non-antialiased version of your True Type fonts
|
||||||
|
looks this disadvantage goes away. In this case you will use the same font
|
||||||
|
(say arial) with both antialiased/normal fonts.
|
||||||
|
|
||||||
|
OTOH this method gives you fine tune over the fonts used in Window Maker and
|
||||||
|
you will be able to set each individual font as you like.
|
||||||
|
|
||||||
|
Case 10b:
|
||||||
|
---------
|
||||||
|
With the second method, you have almost nothing to do. Just define the proper
|
||||||
|
aliases in the XftConfig file, and whenever some of the fonts you aliased is
|
||||||
|
requested it's True Type alias will be loaded.
|
||||||
|
This way you can use all your old themes and all you have to do except adding
|
||||||
|
the aliases to the XftConfig file, is to enable or disable antialiasing the
|
||||||
|
the configuration file.
|
||||||
|
|
||||||
|
For example if Helvetica is aliased to Arial, if you have antialiasing
|
||||||
|
disabled, Helvetica will be used, but if you enable antialiasing Arial will
|
||||||
|
be used instead. This method is very handy if you want to use existing themes
|
||||||
|
you don't want to modify, or if you want to switch antialiasing on/off and
|
||||||
|
don't want to edit your font options with every such switch.
|
||||||
|
|
||||||
|
The downside of this method is that if you don't have some font aliased in
|
||||||
|
the XftConfig file, it will load some default instead.
|
||||||
|
Also another downside is that you cannot fine tune your fonts. They will be
|
||||||
|
translated by the alias rules in XftConfig from whatever they are defined in
|
||||||
|
the theme. Sometimes this is not optimal.
|
||||||
|
|
||||||
|
For example if you aliased Helvetica to "Trebuchet MS" and all your screen
|
||||||
|
fonts are Helvetica (at different sizes). With antialiasing disabled the
|
||||||
|
Helvetica fonts everywhere looks good. However with antialiasing enabled the
|
||||||
|
10pt font used by the miniwindow titles looks better if Arial is used. Also
|
||||||
|
the 10pt font used by the clip looks better with Verdana. Same for the 12pt
|
||||||
|
font used by balloons which is also better if Arial is used. But with this
|
||||||
|
method you cannot do such fine tuning, unless you edit your font options in
|
||||||
|
the Window Maker configuration file, in which case there will be a mix of the
|
||||||
|
2 methods.
|
||||||
|
|
||||||
|
11. At this point if all was properly done, all you have to do is either add
|
||||||
|
an AntialiasedText = Yes; entry to ~/GNUstep/Defaults/WindowMaker, or
|
||||||
|
start WPrefs, goto the Expert Settings panel, and check the
|
||||||
|
"Smooth font edges" option. Currently you need to restart if you switch
|
||||||
|
antialiasing on/off (this may change in the future)
|
||||||
|
|
||||||
|
|
||||||
|
Final note: antialiased text only looks good if a True Type font is
|
||||||
|
used for it. Either by directly specifying it, or providing an alias in
|
||||||
|
the XftConfig file. The idea is that the font Xft loads (after all the
|
||||||
|
aliases have beed resolved) should point to a True Type font. Else
|
||||||
|
unpleasant results may show on your screen :P
|
||||||
|
|
||||||
@@ -0,0 +1,370 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
GNU Window Maker
|
||||||
|
X11 Window Manager
|
||||||
|
|
||||||
|
<http://windowmaker.org>
|
||||||
|
<ftp://ftp.windowmaker.org>
|
||||||
|
|
||||||
|
por
|
||||||
|
|
||||||
|
Alfredo K. Kojima
|
||||||
|
|
||||||
|
Dan Pascu
|
||||||
|
|
||||||
|
]d
|
||||||
|
|
||||||
|
|
||||||
|
Web/FTP Master
|
||||||
|
|
||||||
|
Phillip Smith
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
¡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
|
||||||
|
===========
|
||||||
|
|
||||||
|
Window Maker es el gestor de ventanas GNU para el Sistema de Ventanas X. Fue
|
||||||
|
diseñado para emular la apariencia y funcionalidad de parte del GUI de NEXTSTEP(mr).
|
||||||
|
Procura ser relativamente rápido y pequeño, rico en características, fácil de configurar
|
||||||
|
y usar, con una simple y elegante apariencia sacada desde NEXTSTEP(mr).
|
||||||
|
|
||||||
|
Window Maker fue diseñado teniendo en mente la integración con GNUstep y por eso
|
||||||
|
es el gestor de ventanas "oficial". Es también parte del proyecto GNU (www.gnu.org)
|
||||||
|
. Lea mas sobre GNUstep más adelante en este archivo.
|
||||||
|
|
||||||
|
|
||||||
|
Pistas (información dada por las aplicaciones para integrarse bien con el gestor de
|
||||||
|
ventanas) para Motif(tm), OPEN LOOK(tm), KDE y GNOME también son soportados.
|
||||||
|
Entonces puede reemplazar cualquiera de los gestores de ventana para estos entornos
|
||||||
|
con Window Maker manteniendo la mayoría, si no todo, de la funcionalidad del
|
||||||
|
gestor de ventanas nativo.
|
||||||
|
|
||||||
|
Window Maker antes se llamaba WindowMaker.
|
||||||
|
|
||||||
|
Window Maker no tiene relación con Windowmaker, el software para
|
||||||
|
hacer ventanas y puertas.
|
||||||
|
|
||||||
|
|
||||||
|
Documentación
|
||||||
|
=============
|
||||||
|
|
||||||
|
Lea antes de preguntar.
|
||||||
|
|
||||||
|
* Los archivos README distribuidos por todas partes del árbol de fuentes
|
||||||
|
contienen información relacionada al contenido en los directorios.
|
||||||
|
|
||||||
|
* INSTALL tiene instrucciones de instalación y algunos consejos cuando tenga
|
||||||
|
algún problema. Significa que debería leerlo antes de la instalación.
|
||||||
|
No fue escrito solo para ocupar espacio en el paquete...
|
||||||
|
|
||||||
|
* FAQ: Preguntas Frecuentes. LEALO!!! FAQ.I18N es para
|
||||||
|
preguntas relacionadas con la internacionalización.
|
||||||
|
|
||||||
|
* NEWS: lista los cambios visibles por el usuario desde la versión anterior.
|
||||||
|
Léalo si está actualizando.
|
||||||
|
|
||||||
|
* MIRRORS: algunos lugares alternativos donde puede obtener Window Maker,
|
||||||
|
incluyendo paquetes de Window Maker específicos para ciertas plataformas.
|
||||||
|
|
||||||
|
* BUGFORM: uselo para enviar reportes de errores. Por favor uselo.
|
||||||
|
|
||||||
|
* ChangeLog: ¿que cambió desde la versión anterior?
|
||||||
|
|
||||||
|
* BUGS: lista de errores conocidos.
|
||||||
|
|
||||||
|
*** Tutorial
|
||||||
|
|
||||||
|
Hay un tutorial mantenido por Georges Tarbouriech en:
|
||||||
|
|
||||||
|
http://www.linuxfocus.org/~georges.t/
|
||||||
|
|
||||||
|
*** Guía del Usuario
|
||||||
|
|
||||||
|
La Guía del Usuario de Window Maker puede ser bajada desde el ftp oficial
|
||||||
|
o por sitios web.
|
||||||
|
Puede también ser vista en formato HTML en:
|
||||||
|
|
||||||
|
http://people.delphi.com/crc3419/WMUserGuide/index.htm
|
||||||
|
|
||||||
|
La Guía del Usuario explica como usar Window Maker, los archivos de configuración
|
||||||
|
y opciones.
|
||||||
|
|
||||||
|
*** man pages
|
||||||
|
|
||||||
|
Tipee "man wmaker" en el prompt del shell para obtener ayuda general sobre Window Maker.
|
||||||
|
|
||||||
|
|
||||||
|
Directorios y Archivos en el Árbol de Fuentes
|
||||||
|
=============================================
|
||||||
|
|
||||||
|
* Install es un script para configurar y compilar Window Maker de una forma
|
||||||
|
fácil (no es que la forma normal sea difícil, pero...).
|
||||||
|
|
||||||
|
* AUTORES: los créditos
|
||||||
|
|
||||||
|
* TODO: planes para el futuro.
|
||||||
|
|
||||||
|
* contrib/ tiene algunos parches aportados que no están soportados por Window Maker
|
||||||
|
porque entran en conflicto con la filosofía de diseño de los desarrolladores o por
|
||||||
|
alguna otra razón.
|
||||||
|
|
||||||
|
* util/ tiene varios programas utilitarios.
|
||||||
|
|
||||||
|
* WPrefs.app/ es el programa de configuración.
|
||||||
|
|
||||||
|
* src/wconfig.h posee opciones de compilación que puede cambiar para
|
||||||
|
seleccionar algunas opciones/caracteristicas y otras cosas.
|
||||||
|
|
||||||
|
* WINGs/ biblioteca widget para imitación de NEXTSTEP.
|
||||||
|
|
||||||
|
* wrlib/ biblioteca de procesamiento de imagen.
|
||||||
|
|
||||||
|
* po/ posee catálogos de mensajes que son las versiones traducidas de los mensajes
|
||||||
|
mostrados por Window Maker.
|
||||||
|
|
||||||
|
* docklib-x.x.tar.gz es una biblioteca para escribir dockapps.
|
||||||
|
|
||||||
|
SOCORRO!!!
|
||||||
|
==========
|
||||||
|
|
||||||
|
Hay una lista de correo para discutir sobre Window Maker en
|
||||||
|
wm-user@windowmaker.org. Para suscribirse, envie un mensaje que contenga:
|
||||||
|
|
||||||
|
subscribe
|
||||||
|
en el tema del mensaje a wm-user-request@windowmaker.org
|
||||||
|
|
||||||
|
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
|
||||||
|
que nosotros. Para reportes de errores use el BUGFORM.
|
||||||
|
|
||||||
|
Si tiene un problema con una versión precompilada de Window Maker
|
||||||
|
(rpm, deb etc), primero pregunte a la persona que hizo el paquete.
|
||||||
|
|
||||||
|
NOTA IMPORTANTE: cuando pida ayuda (en la lista de correo o a los desarrolladores,
|
||||||
|
directamente) *siempre* envie información sobre el sistema que está usando. Puede
|
||||||
|
usar la sección de información del sistema al final del BUGFORM como una guía.
|
||||||
|
Otra cosa: por favor no envie correo HTML.
|
||||||
|
|
||||||
|
También hay un canal de IRC #windowmaker en openprojects. Únase aquí,
|
||||||
|
conecte su cliente de irc a irc.openprojects.net, irc.linux.com o algún otro
|
||||||
|
servidor de esa red.
|
||||||
|
|
||||||
|
GNUstep
|
||||||
|
=======
|
||||||
|
|
||||||
|
GNUStep es un completo sistema de desarrollo orientado a objetos, basado en la
|
||||||
|
especificación OpenStep liberada por NeXT(tm) (ahora Apple(tm) y Sun(tm)). Ello
|
||||||
|
proveerá todo lo que se necesita para producir aplicaciones multiplataforma,
|
||||||
|
orientadas a objetos, gráficas (y no gráficas); suministrando dentro de otras cosas,
|
||||||
|
bibliotecas base del sistema, una estructura de alto nivel para aplicaciones GUI que
|
||||||
|
usan un modelo de imagenes de tipo Display PostScript(tm) (DGS), objetos para acceso
|
||||||
|
a bases de datos relacionales, objetos distribuidos y un entorno de desarrollo gráfico,
|
||||||
|
con herramientas como un modelador de interfaces, un sistema para administración del
|
||||||
|
proyecto (central de proyecto) y otras herramientas.
|
||||||
|
|
||||||
|
El sistema de desarrollo de GNUStep será usado para crear un entorno de usuario,
|
||||||
|
con todo lo necesario para una completa interface gráfica de usuario, tal como
|
||||||
|
un visualizador de archivos, editores de texto y otras aplicaciones. Note que el
|
||||||
|
entorno de usuario (o "entorno de escritorio") es solo un pequeña parte de todo
|
||||||
|
el proyecto GNUStep y por lo tanto no "compite" con otros proyectos como KDE o GNOME,
|
||||||
|
simplemente porque son cosas completamente diferentes.
|
||||||
|
|
||||||
|
Para más información sobre el proyecto GNUStep, visite: http://www.gnustep.org y
|
||||||
|
http://gnustep.current.nu
|
||||||
|
|
||||||
|
|
||||||
|
Ejecutando multiples instancias de Window Maker
|
||||||
|
===============================================
|
||||||
|
|
||||||
|
No es una buena idea eejcutar más de una instancia de Window Maker desde
|
||||||
|
el mismo usuario (ya que wmaker usará los mismos archivos de configuración)
|
||||||
|
al mismo tiempo. Podría obtener un comportamiento inesperado cuando Window
|
||||||
|
Maker actualiza sus archivos de configuración.
|
||||||
|
|
||||||
|
Si de verdad desea hacer esto, intente ejecutar Window Maker con la opción
|
||||||
|
de linea de comando --static ya que así no actualizará o cambiará ninguno de los
|
||||||
|
archivos de configuración.
|
||||||
|
|
||||||
|
Soporte para Sonido
|
||||||
|
===================
|
||||||
|
|
||||||
|
El sonido es soportado por los sistemas Linux y FreeBSD con el uso de
|
||||||
|
un módulo distribuido separadamente llamado WSoundServer. Hay también
|
||||||
|
una herramienta de configuracion gráfica para definir sus sonidos llamada
|
||||||
|
WSoundPref.
|
||||||
|
Puede bajar esto en:
|
||||||
|
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.
|
||||||
|
=====================
|
||||||
|
Si quiere disminuir el uso de memoria por parte de Window Maker y mejorar el
|
||||||
|
rendimiento, manteniendo una linda apariencia y buena funcionalidad, siga los
|
||||||
|
items de abajo:
|
||||||
|
|
||||||
|
- use texturas sólidas para todo, principalmente barras de título y menúes.
|
||||||
|
Si quiere un escritorio de aspecto lindo, use el estilo Tradicional.
|
||||||
|
- Apague NewStyle y Superfluous
|
||||||
|
- No una muchos atajos al menú y mantenga solo los items esenciales en el menú.
|
||||||
|
- Active DisableClip
|
||||||
|
- edite wconfig.h y desactive el NUMLOCK_HACK y lo mismo con las características
|
||||||
|
que no use (tenga en mente que algunos de los #defines podrían no funcionar,
|
||||||
|
ya que ellos no están completamente soportados). Asegúrese de mantener siempre
|
||||||
|
Numlock y ScrollLock apagados.
|
||||||
|
- Active DisableAnimations. Puede también #undefine ANIMATIONS en wconfig.h
|
||||||
|
- quite las entradas por defecto IconPath y PixmapPath para contener solo las
|
||||||
|
rutas que en verdad tiene en su sistema.
|
||||||
|
- no use imágenes grandes en el fondo raíz.
|
||||||
|
- quite el soporte para los formatos de imagen que no use.
|
||||||
|
- para reducir el uso de la memoria, desactive el caché de ícono, definiendo
|
||||||
|
la variable de entorno RIMAGE_CACHE a 0. Si quiere aumentar el rendimiento
|
||||||
|
a expensas del uso de la memoria, defina este valor a un valor igual al
|
||||||
|
número de íconos distintos que use.
|
||||||
|
|
||||||
|
Control del Mouse por Teclado
|
||||||
|
=============================
|
||||||
|
|
||||||
|
Muchas personas preguntan sobre agregar control por teclado al mouse, como
|
||||||
|
en fvwm, pero Window Maker no tendrá tal característica. La extensión XKB
|
||||||
|
soporta simulación de mouse desde el teclado, de una manera mucho más poderosa
|
||||||
|
que cualquier otra simulación hecha por un administrador de ventanas.
|
||||||
|
|
||||||
|
Para activarlo, presione la combinación de teclas Control+Shift+NumLock o
|
||||||
|
Shift+NumLock. Debiera escuchar el beep del parlante. Para desactivarlo,
|
||||||
|
haga lo mismo.
|
||||||
|
|
||||||
|
Para controlar el mouse el teclado numérico se usa así:
|
||||||
|
- 4 (flecha izquierda), 7 (Home), 8 (flecha arriba), 9 (PgUP), 6 (flecha derecha),
|
||||||
|
3 (PgDn), 2 (flecha abajo) y 1 (Fin) mueve el mouse a la correspondiente
|
||||||
|
dirección;
|
||||||
|
- sosteniendo una de las teclas de arriba y luego sosteniendo la tecla 5 moverá
|
||||||
|
el puntero más rápido;
|
||||||
|
- / seleccionará el primer botón del mouse (botón izquierdo);
|
||||||
|
- * seleccionará el segundo botón del mouse (botón del medio);
|
||||||
|
- - seleccionará el tercer botón del mouse (botón derecho);
|
||||||
|
- 5 hará un click con el botón actualmente seleccionado del mouse;
|
||||||
|
- + hará un doble click con el botón actualmente seleccionado;
|
||||||
|
- 0 (Ins) cliqueará y mantendrá el botón seleccionado actualmente;
|
||||||
|
- . (Del) liberará el botón seleccionado actualmente que fue anteriormente
|
||||||
|
cliqueado con la tecla 0 (Ins).
|
||||||
|
|
||||||
|
Los valores anteriores de las teclas funcionarán en un servidor X XFree86 3.2
|
||||||
|
(X11R6.1) pero su alcance puede variar.
|
||||||
|
|
||||||
|
Como hacer un gdb backtrace
|
||||||
|
===========================
|
||||||
|
|
||||||
|
Backtraces pueden ayudarnos a arreglar errores que hicieron que Window Maker falle.
|
||||||
|
Si encuentra un bug que hace fallar a Window Maker, por favor envie un backtrace con su
|
||||||
|
reporte de error.
|
||||||
|
|
||||||
|
Para hacer un backtrace útil, necesita un archivo core con información de depuración
|
||||||
|
producida por Window Maker cuando falló. Debería haber sido instalado sin stripping también.
|
||||||
|
|
||||||
|
Para compilar wmaker con información de depuración:
|
||||||
|
|
||||||
|
./configure
|
||||||
|
make CFLAGS=-g
|
||||||
|
|
||||||
|
Si obtiene el cuadro de diálogo que le dice que wmaker falló y le
|
||||||
|
pregunta que hacer, respóndale "Abortar y dejar un archivo core"
|
||||||
|
|
||||||
|
script
|
||||||
|
cd src
|
||||||
|
gdb .libs/wmaker path_to_the_core_file
|
||||||
|
|
||||||
|
Luego, en el prompt gdb escriba "bt". Salga de gdb escribiendo "quit"
|
||||||
|
y luego, en el prompt del shell, scriba "exit"
|
||||||
|
|
||||||
|
El archivo llamado typescript contendrá el backtrace.
|
||||||
|
|
||||||
|
Derechos de Autor y Descargo de Responsabilidad
|
||||||
|
===============================================
|
||||||
|
|
||||||
|
Window Maker está registrado por Alfredo K. Kojima y está licensiado por la
|
||||||
|
Licensia Pública General GNU. Lea el archivo COPYING para leer la licensia
|
||||||
|
completa.
|
||||||
|
|
||||||
|
Los íconos que son distribuidos con este programa y fueron hechos por Marco
|
||||||
|
van Hylckama Vlieg, están licenciados por la Licencia Pública General GNU.
|
||||||
|
Lea el archivo COPYING para leer la licencia completa.
|
||||||
|
|
||||||
|
Los íconos listados en COPYING.WTFPL y son distribuidos en este programa
|
||||||
|
fueron hechos por Banlu Kemiyatorn (]d), están licenciados por la
|
||||||
|
"do What The Fuck you want to Public License". Lea el archivo COPYING.WTFPL
|
||||||
|
para leer la licencia completa.
|
||||||
|
|
||||||
|
NeXT, OpenStep y NEXTSTEP son marcas registradas de NeXT Computer, Inc.
|
||||||
|
Todas las otras marcas registradas son propiedad de sus respectivos dueños.
|
||||||
|
|
||||||
|
Los autores se reservan el derecho de hacer cambios en el software sin previo
|
||||||
|
aviso.
|
||||||
|
|
||||||
|
Autores
|
||||||
|
=======
|
||||||
|
|
||||||
|
Alfredo K. Kojima <kojima@windowmaker.org>
|
||||||
|
Dan Pascu <dan@windowmaker.org>
|
||||||
|
]d <id@windowmaker.org>
|
||||||
|
|
||||||
|
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
|
||||||
|
las capturas de pantalla del escritorio de las personas.
|
||||||
|
|
||||||
|
El archivo AUTHORS contiene una lista de las personas que han contribuido
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
traducido por Efraín Maximiliano Palermo <max_drake2001@yahoo.com.ar>
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
# $XFree86: xc/lib/Xft/XftConfig.cpp,v 1.8 2001/11/21 23:41:12 keithp Exp $
|
||||||
|
|
||||||
|
dir "/usr/share/fonts/truetype"
|
||||||
|
dir "/usr/X11R6/lib/X11/fonts/TrueType"
|
||||||
|
dir "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
|
||||||
|
dir "/usr/X11R6/lib/X11/fonts/Type1"
|
||||||
|
|
||||||
|
#
|
||||||
|
# alias 'fixed' for 'mono'
|
||||||
|
#
|
||||||
|
match any family == "fixed" edit family =+ "mono";
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check users config file
|
||||||
|
#
|
||||||
|
includeif "~/.xftconfig"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Substitute TrueType fonts for Type1 versions
|
||||||
|
#
|
||||||
|
match any family == "Times" edit family += "Times New Roman";
|
||||||
|
#match any family == "Helvetica" edit family += "Verdana";
|
||||||
|
#match any family == "Helvetica" edit family += "Arial";
|
||||||
|
match any family == "Helvetica" edit family += "Trebuchet MS";
|
||||||
|
match any family == "Courier" edit family += "Courier New";
|
||||||
|
|
||||||
|
#
|
||||||
|
# Use TrueType fonts for defaults
|
||||||
|
#
|
||||||
|
match any family == "serif" edit family += "Times New Roman";
|
||||||
|
match any family == "sans" edit family += "Verdana";
|
||||||
|
|
||||||
|
#
|
||||||
|
# Use monotype.com (andale) face where possible
|
||||||
|
#
|
||||||
|
match
|
||||||
|
any family == "mono"
|
||||||
|
all slant == roman
|
||||||
|
all weight < bold
|
||||||
|
edit
|
||||||
|
family += "monotype.com";
|
||||||
|
#
|
||||||
|
# otherwise, use courier
|
||||||
|
#
|
||||||
|
match any family == "mono" edit family += "Courier New";
|
||||||
|
|
||||||
|
#
|
||||||
|
# Alias between XLFD families and font file family name, prefer local fonts
|
||||||
|
#
|
||||||
|
match any family == "charter" edit family += "bitstream charter";
|
||||||
|
match any family == "bitstream charter" edit family =+ "charter";
|
||||||
|
|
||||||
|
match any family == "Charter" edit family += "Bitstream Charter";
|
||||||
|
match any family == "Bitstream Charter" edit family =+ "Charter";
|
||||||
|
|
||||||
|
match any family == "Lucidux Serif" edit family += "LuciduxSerif";
|
||||||
|
match any family == "LuciduxSerif" edit family =+ "Lucidux Serif";
|
||||||
|
|
||||||
|
match any family == "Lucidux Sans" edit family += "LuciduxSans";
|
||||||
|
match any family == "LuciduxSans" edit family =+ "Lucidux Sans";
|
||||||
|
|
||||||
|
match any family == "Lucidux Mono" edit family += "LuciduxMono";
|
||||||
|
match any family == "LuciduxMono" edit family =+ "Lucidux Mono";
|
||||||
|
|
||||||
|
#
|
||||||
|
# TrueType font aliases
|
||||||
|
#
|
||||||
|
match any family == "Comic Sans" edit family += "Comic Sans MS";
|
||||||
|
match any family == "Comic Sans MS" edit family =+ "Comic Sans";
|
||||||
|
match any family == "Trebuchet" edit family += "Trebuchet MS";
|
||||||
|
match any family == "Trebuchet MS" edit family =+ "Trebuchet";
|
||||||
|
match any family == "Monotype" edit family =+ "Monotype.com";
|
||||||
|
match any family == "Andale Mono" edit family += "Monotype.com";
|
||||||
|
match any family == "Monotype.com" edit family =+ "Andale Mono";
|
||||||
|
|
||||||
|
#
|
||||||
|
#
|
||||||
|
match any family == "webdings" edit encoding += "glyphs-fontspecific";
|
||||||
|
match any family == "symbol" edit encoding += "glyphs-fontspecific";
|
||||||
@@ -9,9 +9,13 @@ Do ASAP:
|
|||||||
- finish session stuff
|
- finish session stuff
|
||||||
- add multiline support for balloons
|
- add multiline support for balloons
|
||||||
- remove colors_per_channel stuff from wmaker after?
|
- 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
|
||||||
|
|
||||||
Need to do:
|
Need to do:
|
||||||
===========
|
===========
|
||||||
|
- 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
|
- allow user to select/restore default root menu from wprefs
|
||||||
- support for X11R6.4 extension for getting extra visual info in wrlib's
|
- support for X11R6.4 extension for getting extra visual info in wrlib's
|
||||||
automatic best context guessing
|
automatic best context guessing
|
||||||
|
|||||||
+2
-3
@@ -1,5 +1,4 @@
|
|||||||
Makefile Makefile.in
|
Makefile Makefile.in
|
||||||
get-wings-flags get-wutil-flags
|
get-wings-flags get-wutil-flags
|
||||||
.libs
|
.libs *.pc
|
||||||
.psrc .inslog2 tca.map tca.log
|
.psrc .inslog2 tca.map tca.log pchdir *.rpt
|
||||||
*.rpt
|
|
||||||
|
|||||||
+95
-1
@@ -1,3 +1,96 @@
|
|||||||
|
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 Xft support in WINGs (for drawing antialiased fonts with transparency).
|
||||||
|
- Added a new function: WMCreateAntialiasedFont() to create a font which will
|
||||||
|
be drawn antialiased using Xft (if available, else function returns NULL)
|
||||||
|
- New options in WMGLOBAL: AntialiasedText, AntialiasedSystemFont and
|
||||||
|
AntialiasedBoldSystemFont. 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 WMIsAntialiasedFont(WMFont *font) to check if a font is antialiased.
|
||||||
|
- Added WMGetColorAlpha(WMColor *color)
|
||||||
|
- Better outline when drawing balloons.
|
||||||
|
- Added WMCreateFontWithFlags()
|
||||||
|
- 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 WMCreateAntialiasedFontSet() (like WMCreateAntialiasedFont() but for
|
||||||
|
languages with multibyte text). Note however that these specific font
|
||||||
|
creating functions (as well as WMCreateNormalFont() and WMCreateFontSet())
|
||||||
|
are not meant to be called directly except in very special cases.
|
||||||
|
The more generic WMCreateFont() or WMCreateFontWithFlags() should be used.
|
||||||
|
- Multibyte languages can now render antialiased text too (only tested on
|
||||||
|
russian since this is the only multibyte language I can test).
|
||||||
|
- 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
|
||||||
|
- 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)
|
||||||
|
- 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()
|
||||||
|
|
||||||
|
|
||||||
|
Changes since wmaker 0.80.0:
|
||||||
|
............................
|
||||||
|
|
||||||
|
- fixed a bug in wfindfile() (rewrote wfindfile() with better logic).
|
||||||
|
- separated the font caches for normal fonts and fontsets in WINGs (they can
|
||||||
|
have the same names and collide in the cache giving unwanted results)
|
||||||
|
- fixed labels not to display '\n' as a character if multiple '\n' are passed
|
||||||
|
but just skip to the next line.
|
||||||
|
- better warning when importing non-digit characters in PropList Data.
|
||||||
|
- rewrote WMBox to use a WMArray for subviews. with this change fixed a bug
|
||||||
|
about arranging subviews after removing one and a memleak occuring in the
|
||||||
|
same case.
|
||||||
|
- Fixed WMGetViewScreenPosition() to consider the window decorations.
|
||||||
|
- Added ability to enable/disable individual WMTableViewItems.
|
||||||
|
- Fixed textfields regarding interpretation of special keys with modifiers.
|
||||||
|
- Fixed some functions that accept a boolean flag as a paramater, to set only
|
||||||
|
1 or 0 for the flag value, not the flag passed by the user.
|
||||||
|
- Added 2 functions to retrieve the default system fonts:
|
||||||
|
WMDefaultSystemFont(WMScreen *scr) and WMDefaultBoldSystemFont(WMScreen *scr)
|
||||||
|
- Added WMSetButtonImageDimsWhenDisabled() and WMGetButtonEnabled()
|
||||||
|
- Cleaned-up the header files of functions/vars declared but not implemented
|
||||||
|
- Added WMGetTextFieldDelegate()
|
||||||
|
|
||||||
|
|
||||||
Changes since wmaker 0.70.0:
|
Changes since wmaker 0.70.0:
|
||||||
............................
|
............................
|
||||||
|
|
||||||
@@ -180,7 +273,8 @@ changes since wmaker 0.62.1:
|
|||||||
as a result the shaded windows didn't go away when closed. The non-shaded
|
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
|
windows were unmapped on close but not destroyed either so they only
|
||||||
apparently went away, but continued to use memory).
|
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:
|
changes since wmaker 0.62.0:
|
||||||
|
|||||||
@@ -1,3 +1,2 @@
|
|||||||
Makefile Makefile.in
|
Makefile Makefile.in
|
||||||
.psrc .inslog2 tca.map tca.log
|
.psrc .inslog2 tca.map tca.log pchdir *.rpt
|
||||||
*.rpt
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
Makefile Makefile.in
|
Makefile Makefile.in
|
||||||
connect server fontl puzzle UserTime.plist
|
connect server fontl puzzle UserTime.plist
|
||||||
.libs
|
.libs
|
||||||
.psrc .inslog2 tca.map tca.log
|
.psrc .inslog2 tca.map tca.log pchdir *.rpt
|
||||||
*.rpt
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ noinst_PROGRAMS = connect server fontl puzzle
|
|||||||
|
|
||||||
|
|
||||||
LDADD= $(top_builddir)/WINGs/libWINGs.a $(top_builddir)/wrlib/libwraster.la \
|
LDADD= $(top_builddir)/WINGs/libWINGs.a $(top_builddir)/wrlib/libwraster.la \
|
||||||
@INTLIBS@
|
@XFTLIBS@ @INTLIBS@
|
||||||
|
|
||||||
|
|
||||||
fontl_DEPENDENCIES = $(top_builddir)/WINGs/libWINGs.a
|
fontl_DEPENDENCIES = $(top_builddir)/WINGs/libWINGs.a
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
/*
|
/*
|
||||||
* WINGs connect.c: example how to create a network client using WMConnection
|
* WINGs connect.c: example how to create a network client using WMConnection
|
||||||
*
|
*
|
||||||
* Copyright (c) 1999-2001 Dan Pascu
|
* Copyright (c) 1999-2003 Dan Pascu
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
@@ -28,6 +29,7 @@ static void didInitialize(ConnectionDelegate *self, WMConnection *cPtr);
|
|||||||
|
|
||||||
static ConnectionDelegate socketDelegate = {
|
static ConnectionDelegate socketDelegate = {
|
||||||
NULL, /* data */
|
NULL, /* data */
|
||||||
|
NULL, /* canResumeSending */
|
||||||
NULL, /* didCatchException */
|
NULL, /* didCatchException */
|
||||||
connectionDidDie, /* didDie */
|
connectionDidDie, /* didDie */
|
||||||
didInitialize, /* didInitialize */
|
didInitialize, /* didInitialize */
|
||||||
@@ -38,7 +40,7 @@ static ConnectionDelegate socketDelegate = {
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
wAbort(Bool foo) /*FOLD00*/
|
wAbort(Bool foo)
|
||||||
{
|
{
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
@@ -89,7 +91,7 @@ inputHandler(int fd, int mask, void *clientData)
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
didReceiveInput(ConnectionDelegate *self, WMConnection *cPtr) /*FOLD00*/
|
didReceiveInput(ConnectionDelegate *self, WMConnection *cPtr)
|
||||||
{
|
{
|
||||||
char *buffer;
|
char *buffer;
|
||||||
|
|
||||||
@@ -106,7 +108,7 @@ didReceiveInput(ConnectionDelegate *self, WMConnection *cPtr) /*FOLD00*/
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
connectionDidDie(ConnectionDelegate *self, WMConnection *cPtr) /*FOLD00*/
|
connectionDidDie(ConnectionDelegate *self, WMConnection *cPtr)
|
||||||
{
|
{
|
||||||
WMCloseConnection(cPtr);
|
WMCloseConnection(cPtr);
|
||||||
|
|
||||||
@@ -138,7 +140,7 @@ didInitialize(ConnectionDelegate *self, WMConnection *cPtr)
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char **argv) /*FOLD00*/
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
char *ProgName, *host, *port;
|
char *ProgName, *host, *port;
|
||||||
int i;
|
int i;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* WINGs demo: font lister
|
* WINGs demo: font lister
|
||||||
*
|
*
|
||||||
* Copyright (c) 1998 Alfredo K. Kojima
|
* Copyright (c) 1998-2003 Alfredo K. Kojima
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+17
-15
@@ -1,12 +1,13 @@
|
|||||||
/*
|
/*
|
||||||
* WINGs server.c: example how to create a network server using WMConnection
|
* WINGs server.c: example how to create a network server using WMConnection
|
||||||
*
|
*
|
||||||
* Copyright (c) 2001 Dan Pascu
|
* Copyright (c) 2001-2003 Dan Pascu
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
@@ -42,6 +43,7 @@ static WMConnection *serverPtr = NULL;
|
|||||||
|
|
||||||
static ConnectionDelegate socketDelegate = {
|
static ConnectionDelegate socketDelegate = {
|
||||||
NULL, /* client data */
|
NULL, /* client data */
|
||||||
|
NULL, /* canResumeSending */
|
||||||
NULL, /* didCatchException */
|
NULL, /* didCatchException */
|
||||||
connectionDidDie, /* didDie */
|
connectionDidDie, /* didDie */
|
||||||
NULL, /* didInitialize */
|
NULL, /* didInitialize */
|
||||||
@@ -52,14 +54,14 @@ static ConnectionDelegate socketDelegate = {
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
wAbort(Bool foo) /*FOLD00*/
|
wAbort(Bool foo)
|
||||||
{
|
{
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
printHelp(char *progname) /*FOLD00*/
|
printHelp(char *progname)
|
||||||
{
|
{
|
||||||
printf(_("usage: %s [options]\n\n"), progname);
|
printf(_("usage: %s [options]\n\n"), progname);
|
||||||
puts(_(" --help print this message"));
|
puts(_(" --help print this message"));
|
||||||
@@ -226,7 +228,7 @@ getAvailableMessages(WMConnection *cPtr)
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
complainAboutBadArgs(WMConnection *cPtr, char *cmdName, char *badArgs) /*FOLD00*/
|
complainAboutBadArgs(WMConnection *cPtr, char *cmdName, char *badArgs)
|
||||||
{
|
{
|
||||||
char *buf = wmalloc(strlen(cmdName) + strlen(badArgs) + 100);
|
char *buf = wmalloc(strlen(cmdName) + strlen(badArgs) + 100);
|
||||||
|
|
||||||
@@ -238,7 +240,7 @@ complainAboutBadArgs(WMConnection *cPtr, char *cmdName, char *badArgs) /*FOLD00*
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sendUpdateMessage(WMConnection *cPtr, char *id, int time) /*FOLD00*/
|
sendUpdateMessage(WMConnection *cPtr, char *id, int time)
|
||||||
{
|
{
|
||||||
char *buf = wmalloc(strlen(id) + 100);
|
char *buf = wmalloc(strlen(id) + 100);
|
||||||
|
|
||||||
@@ -256,7 +258,7 @@ showId(WMConnection *cPtr)
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
showHelp(WMConnection *cPtr) /*FOLD00*/
|
showHelp(WMConnection *cPtr)
|
||||||
{
|
{
|
||||||
char *buf = wmalloc(strlen(WMGetApplicationName()) + 16);
|
char *buf = wmalloc(strlen(WMGetApplicationName()) + 16);
|
||||||
|
|
||||||
@@ -307,7 +309,7 @@ listUsers(WMConnection *cPtr)
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
setTimeForUser(WMConnection *cPtr, char *cmdArgs) /*FOLD00*/
|
setTimeForUser(WMConnection *cPtr, char *cmdArgs)
|
||||||
{
|
{
|
||||||
char *id;
|
char *id;
|
||||||
int i, time;
|
int i, time;
|
||||||
@@ -332,7 +334,7 @@ setTimeForUser(WMConnection *cPtr, char *cmdArgs) /*FOLD00*/
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
addTimeToUser(WMConnection *cPtr, char *cmdArgs) /*FOLD00*/
|
addTimeToUser(WMConnection *cPtr, char *cmdArgs)
|
||||||
{
|
{
|
||||||
char *id;
|
char *id;
|
||||||
int i, time, newTime;
|
int i, time, newTime;
|
||||||
@@ -359,7 +361,7 @@ addTimeToUser(WMConnection *cPtr, char *cmdArgs) /*FOLD00*/
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
subTimeFromUser(WMConnection *cPtr, char *cmdArgs) /*FOLD00*/
|
subTimeFromUser(WMConnection *cPtr, char *cmdArgs)
|
||||||
{
|
{
|
||||||
char *id;
|
char *id;
|
||||||
int i, time, newTime;
|
int i, time, newTime;
|
||||||
@@ -386,7 +388,7 @@ subTimeFromUser(WMConnection *cPtr, char *cmdArgs) /*FOLD00*/
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
removeTimeForUser(WMConnection *cPtr, char *cmdArgs) /*FOLD00*/
|
removeTimeForUser(WMConnection *cPtr, char *cmdArgs)
|
||||||
{
|
{
|
||||||
char *ptr;
|
char *ptr;
|
||||||
int i;
|
int i;
|
||||||
@@ -412,7 +414,7 @@ removeTimeForUser(WMConnection *cPtr, char *cmdArgs) /*FOLD00*/
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
getTimeForUser(WMConnection *cPtr, char *cmdArgs) /*FOLD00*/
|
getTimeForUser(WMConnection *cPtr, char *cmdArgs)
|
||||||
{
|
{
|
||||||
char *ptr;
|
char *ptr;
|
||||||
int time;
|
int time;
|
||||||
@@ -525,7 +527,7 @@ isAllowedToConnect(WMConnection *cPtr)
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
didReceiveInput(ConnectionDelegate *self, WMConnection *cPtr) /*FOLD00*/
|
didReceiveInput(ConnectionDelegate *self, WMConnection *cPtr)
|
||||||
{
|
{
|
||||||
if (cPtr == serverPtr) {
|
if (cPtr == serverPtr) {
|
||||||
WMConnection *newPtr = WMAcceptConnection(cPtr);
|
WMConnection *newPtr = WMAcceptConnection(cPtr);
|
||||||
@@ -548,7 +550,7 @@ didReceiveInput(ConnectionDelegate *self, WMConnection *cPtr) /*FOLD00*/
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
connectionDidTimeout(ConnectionDelegate *self, WMConnection *cPtr) /*FOLD00*/
|
connectionDidTimeout(ConnectionDelegate *self, WMConnection *cPtr)
|
||||||
{
|
{
|
||||||
WMHost *hPtr;
|
WMHost *hPtr;
|
||||||
|
|
||||||
@@ -600,7 +602,7 @@ updatedDomain(void *observer, WMNotification *notification)
|
|||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
static Bool
|
static Bool
|
||||||
isDifferent(char *str1, char *str2) /*FOLD00*/
|
isDifferent(char *str1, char *str2)
|
||||||
{
|
{
|
||||||
if ((!str1 && !str2) || (str1 && str2 && strcmp(str1, str2)==0))
|
if ((!str1 && !str2) || (str1 && str2 && strcmp(str1, str2)==0))
|
||||||
return False;
|
return False;
|
||||||
@@ -611,7 +613,7 @@ isDifferent(char *str1, char *str2) /*FOLD00*/
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char **argv) /*FOLD00*/
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
Makefile Makefile.in
|
Makefile Makefile.in
|
||||||
.libs
|
.libs
|
||||||
test
|
test
|
||||||
.psrc .inslog2 tca.map tca.log
|
.psrc .inslog2 tca.map tca.log pchdir *.rpt
|
||||||
*.rpt
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ INCLUDES = -I$(top_srcdir)/wrlib -I$(top_srcdir)/WINGs \
|
|||||||
-DRESOURCE_PATH=\"$(datadir)/WINGs\" @HEADER_SEARCH_PATH@ -DDEBUG
|
-DRESOURCE_PATH=\"$(datadir)/WINGs\" @HEADER_SEARCH_PATH@ -DDEBUG
|
||||||
|
|
||||||
LDADD= $(top_builddir)/WINGs/libWINGs.a $(top_builddir)/wrlib/libwraster.la \
|
LDADD= $(top_builddir)/WINGs/libWINGs.a $(top_builddir)/wrlib/libwraster.la \
|
||||||
@INTLIBS@
|
@XFTLIBS@ @INTLIBS@
|
||||||
|
|
||||||
test_LDADD = wtableview.o wtabledelegates.o $(LDADD)
|
test_LDADD = wtableview.o wtabledelegates.o $(LDADD)
|
||||||
|
|
||||||
|
|||||||
@@ -94,6 +94,7 @@ main(int argc, char **argv)
|
|||||||
WMMapWidget(win);
|
WMMapWidget(win);
|
||||||
|
|
||||||
table = WMCreateTableView(win);
|
table = WMCreateTableView(win);
|
||||||
|
WMSetTableViewHasHorizontalScroller(table, 0);
|
||||||
WMSetViewExpandsToParent(WMWidgetView(table), 10, 10, 10, 10);
|
WMSetViewExpandsToParent(WMWidgetView(table), 10, 10, 10, 10);
|
||||||
WMSetTableViewBackgroundColor(table, WMWhiteColor(scr));
|
WMSetTableViewBackgroundColor(table, WMWhiteColor(scr));
|
||||||
/*WMSetTableViewGridColor(table, WMGrayColor(scr));*/
|
/*WMSetTableViewGridColor(table, WMGrayColor(scr));*/
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ typedef struct {
|
|||||||
WMFont *font;
|
WMFont *font;
|
||||||
GC gc;
|
GC gc;
|
||||||
GC selGC;
|
GC selGC;
|
||||||
GC textGC;
|
WMColor *textColor;
|
||||||
} StringData;
|
} StringData;
|
||||||
|
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ typedef struct {
|
|||||||
WMFont *font;
|
WMFont *font;
|
||||||
GC gc;
|
GC gc;
|
||||||
GC selGC;
|
GC selGC;
|
||||||
GC textGC;
|
WMColor *textColor;
|
||||||
} StringEditorData;
|
} StringEditorData;
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@ typedef struct {
|
|||||||
int count;
|
int count;
|
||||||
GC gc;
|
GC gc;
|
||||||
GC selGC;
|
GC selGC;
|
||||||
GC textGC;
|
WMColor *textColor;
|
||||||
} EnumSelectorData;
|
} EnumSelectorData;
|
||||||
|
|
||||||
|
|
||||||
@@ -57,8 +57,8 @@ static char *SelectionColor = "#bbbbcc";
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void stringDraw(WMScreen *scr, Drawable d, GC gc,
|
static void stringDraw(WMScreen *scr, Drawable d, GC gc, GC sgc,
|
||||||
GC sgc, GC stgc, WMFont *font, void *data,
|
WMColor *textColor, WMFont *font, void *data,
|
||||||
WMRect rect, Bool selected)
|
WMRect rect, Bool selected)
|
||||||
{
|
{
|
||||||
int x, y;
|
int x, y;
|
||||||
@@ -77,12 +77,12 @@ static void stringDraw(WMScreen *scr, Drawable d, GC gc,
|
|||||||
if (!selected) {
|
if (!selected) {
|
||||||
XFillRectangles(dpy, d, gc, rects, 1);
|
XFillRectangles(dpy, d, gc, rects, 1);
|
||||||
|
|
||||||
WMDrawString(scr, d, stgc, font, x, y,
|
WMDrawString(scr, d, textColor, font, x, y,
|
||||||
data, strlen(data));
|
data, strlen(data));
|
||||||
} else {
|
} else {
|
||||||
XFillRectangles(dpy, d, sgc, rects, 1);
|
XFillRectangles(dpy, d, sgc, rects, 1);
|
||||||
|
|
||||||
WMDrawString(scr, d, stgc, font, x, y,
|
WMDrawString(scr, d, textColor, font, x, y,
|
||||||
data, strlen(data));
|
data, strlen(data));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -142,7 +142,7 @@ static void SECellPainter(WMTableColumnDelegate *self,
|
|||||||
WMTableView *table = WMGetTableColumnTableView(column);
|
WMTableView *table = WMGetTableColumnTableView(column);
|
||||||
|
|
||||||
stringDraw(WMWidgetScreen(table), d,
|
stringDraw(WMWidgetScreen(table), d,
|
||||||
strdata->gc, strdata->selGC, strdata->textGC, strdata->font,
|
strdata->gc, strdata->selGC, strdata->textColor, strdata->font,
|
||||||
WMTableViewDataForCell(table, column, row),
|
WMTableViewDataForCell(table, column, row),
|
||||||
WMTableViewRectForCell(table, column, row),
|
WMTableViewRectForCell(table, column, row),
|
||||||
False);
|
False);
|
||||||
@@ -156,7 +156,7 @@ static void selectedSECellPainter(WMTableColumnDelegate *self,
|
|||||||
WMTableView *table = WMGetTableColumnTableView(column);
|
WMTableView *table = WMGetTableColumnTableView(column);
|
||||||
|
|
||||||
stringDraw(WMWidgetScreen(table), d,
|
stringDraw(WMWidgetScreen(table), d,
|
||||||
strdata->gc, strdata->selGC, strdata->textGC, strdata->font,
|
strdata->gc, strdata->selGC, strdata->textColor, strdata->font,
|
||||||
WMTableViewDataForCell(table, column, row),
|
WMTableViewDataForCell(table, column, row),
|
||||||
WMTableViewRectForCell(table, column, row),
|
WMTableViewRectForCell(table, column, row),
|
||||||
True);
|
True);
|
||||||
@@ -203,9 +203,9 @@ WMTableColumnDelegate *WTCreateStringEditorDelegate(WMTableView *parent)
|
|||||||
0, 0);
|
0, 0);
|
||||||
data->table = parent;
|
data->table = parent;
|
||||||
data->font = WMSystemFontOfSize(scr, 12);
|
data->font = WMSystemFontOfSize(scr, 12);
|
||||||
data->selGC = WMColorGC(WMCreateNamedColor(scr, SelectionColor, False));
|
|
||||||
data->textGC = WMColorGC(WMBlackColor(scr));
|
|
||||||
data->gc = WMColorGC(WMWhiteColor(scr));
|
data->gc = WMColorGC(WMWhiteColor(scr));
|
||||||
|
data->selGC = WMColorGC(WMCreateNamedColor(scr, SelectionColor, False));
|
||||||
|
data->textColor = WMBlackColor(scr);
|
||||||
|
|
||||||
delegate->data = data;
|
delegate->data = data;
|
||||||
delegate->drawCell = SECellPainter;
|
delegate->drawCell = SECellPainter;
|
||||||
@@ -229,7 +229,7 @@ static void ESCellPainter(WMTableColumnDelegate *self,
|
|||||||
int i = (int)WMTableViewDataForCell(table, column, row);
|
int i = (int)WMTableViewDataForCell(table, column, row);
|
||||||
|
|
||||||
stringDraw(WMWidgetScreen(table), d,
|
stringDraw(WMWidgetScreen(table), d,
|
||||||
strdata->gc, strdata->selGC, strdata->textGC, strdata->font,
|
strdata->gc, strdata->selGC, strdata->textColor, strdata->font,
|
||||||
strdata->options[i],
|
strdata->options[i],
|
||||||
WMTableViewRectForCell(table, column, row),
|
WMTableViewRectForCell(table, column, row),
|
||||||
False);
|
False);
|
||||||
@@ -244,7 +244,7 @@ static void selectedESCellPainter(WMTableColumnDelegate *self,
|
|||||||
int i = (int)WMTableViewDataForCell(table, column, row);
|
int i = (int)WMTableViewDataForCell(table, column, row);
|
||||||
|
|
||||||
stringDraw(WMWidgetScreen(table), d,
|
stringDraw(WMWidgetScreen(table), d,
|
||||||
strdata->gc, strdata->selGC, strdata->textGC, strdata->font,
|
strdata->gc, strdata->selGC, strdata->textColor, strdata->font,
|
||||||
strdata->options[i],
|
strdata->options[i],
|
||||||
WMTableViewRectForCell(table, column, row),
|
WMTableViewRectForCell(table, column, row),
|
||||||
True);
|
True);
|
||||||
@@ -294,9 +294,9 @@ WMTableColumnDelegate *WTCreateEnumSelectorDelegate(WMTableView *parent)
|
|||||||
0, 0);
|
0, 0);
|
||||||
data->table = parent;
|
data->table = parent;
|
||||||
data->font = WMSystemFontOfSize(scr, 12);
|
data->font = WMSystemFontOfSize(scr, 12);
|
||||||
data->selGC = WMColorGC(WMCreateNamedColor(scr, SelectionColor, False));
|
|
||||||
data->textGC = WMColorGC(WMBlackColor(scr));
|
|
||||||
data->gc = WMColorGC(WMWhiteColor(scr));
|
data->gc = WMColorGC(WMWhiteColor(scr));
|
||||||
|
data->selGC = WMColorGC(WMCreateNamedColor(scr, SelectionColor, False));
|
||||||
|
data->textColor = WMBlackColor(scr);
|
||||||
data->count = 0;
|
data->count = 0;
|
||||||
data->options = NULL;
|
data->options = NULL;
|
||||||
|
|
||||||
@@ -444,7 +444,7 @@ static void SCellPainter(WMTableColumnDelegate *self,
|
|||||||
WMTableView *table = WMGetTableColumnTableView(column);
|
WMTableView *table = WMGetTableColumnTableView(column);
|
||||||
|
|
||||||
stringDraw(WMWidgetScreen(table), d,
|
stringDraw(WMWidgetScreen(table), d,
|
||||||
strdata->gc, strdata->selGC, strdata->textGC, strdata->font,
|
strdata->gc, strdata->selGC, strdata->textColor, strdata->font,
|
||||||
WMTableViewDataForCell(table, column, row),
|
WMTableViewDataForCell(table, column, row),
|
||||||
WMTableViewRectForCell(table, column, row),
|
WMTableViewRectForCell(table, column, row),
|
||||||
False);
|
False);
|
||||||
@@ -458,7 +458,7 @@ static void selectedSCellPainter(WMTableColumnDelegate *self,
|
|||||||
WMTableView *table = WMGetTableColumnTableView(column);
|
WMTableView *table = WMGetTableColumnTableView(column);
|
||||||
|
|
||||||
stringDraw(WMWidgetScreen(table), d,
|
stringDraw(WMWidgetScreen(table), d,
|
||||||
strdata->gc, strdata->selGC, strdata->textGC, strdata->font,
|
strdata->gc, strdata->selGC, strdata->textColor, strdata->font,
|
||||||
WMTableViewDataForCell(table, column, row),
|
WMTableViewDataForCell(table, column, row),
|
||||||
WMTableViewRectForCell(table, column, row),
|
WMTableViewRectForCell(table, column, row),
|
||||||
True);
|
True);
|
||||||
@@ -473,9 +473,9 @@ WMTableColumnDelegate *WTCreateStringDelegate(WMTableView *parent)
|
|||||||
|
|
||||||
data->table = parent;
|
data->table = parent;
|
||||||
data->font = WMSystemFontOfSize(scr, 12);
|
data->font = WMSystemFontOfSize(scr, 12);
|
||||||
data->selGC = WMColorGC(WMCreateNamedColor(scr, SelectionColor, False));
|
|
||||||
data->textGC = WMColorGC(WMBlackColor(scr));
|
|
||||||
data->gc = WMColorGC(WMWhiteColor(scr));
|
data->gc = WMColorGC(WMWhiteColor(scr));
|
||||||
|
data->selGC = WMColorGC(WMCreateNamedColor(scr, SelectionColor, False));
|
||||||
|
data->textColor = WMBlackColor(scr);
|
||||||
|
|
||||||
delegate->data = data;
|
delegate->data = data;
|
||||||
delegate->drawCell = SCellPainter;
|
delegate->drawCell = SCellPainter;
|
||||||
@@ -525,8 +525,8 @@ WMTableColumnDelegate *WTCreatePixmapDelegate(WMTableView *table)
|
|||||||
StringData *data = wmalloc(sizeof(StringData));
|
StringData *data = wmalloc(sizeof(StringData));
|
||||||
|
|
||||||
data->table = table;
|
data->table = table;
|
||||||
data->selGC = WMColorGC(WMCreateNamedColor(scr, SelectionColor, False));
|
|
||||||
data->gc = WMColorGC(WMWhiteColor(scr));
|
data->gc = WMColorGC(WMWhiteColor(scr));
|
||||||
|
data->selGC = WMColorGC(WMCreateNamedColor(scr, SelectionColor, False));
|
||||||
|
|
||||||
delegate->data = data;
|
delegate->data = data;
|
||||||
delegate->drawCell = PCellPainter;
|
delegate->drawCell = PCellPainter;
|
||||||
@@ -574,9 +574,8 @@ static void drawPSCell(WMTableColumnDelegate *self, Drawable d,
|
|||||||
rect.size.width = owidth-size.width+1;
|
rect.size.width = owidth-size.width+1;
|
||||||
}
|
}
|
||||||
|
|
||||||
stringDraw(WMWidgetScreen(table), d,
|
stringDraw(WMWidgetScreen(table), d, strdata->gc, strdata->selGC,
|
||||||
strdata->gc, strdata->selGC, strdata->textGC, strdata->font,
|
strdata->textColor, strdata->font, str, rect, selected);
|
||||||
str, rect, selected);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -602,9 +601,9 @@ WMTableColumnDelegate *WTCreatePixmapStringDelegate(WMTableView *parent)
|
|||||||
|
|
||||||
data->table = parent;
|
data->table = parent;
|
||||||
data->font = WMSystemFontOfSize(scr, 12);
|
data->font = WMSystemFontOfSize(scr, 12);
|
||||||
data->selGC = WMColorGC(WMCreateNamedColor(scr, SelectionColor, False));
|
|
||||||
data->textGC = WMColorGC(WMBlackColor(scr));
|
|
||||||
data->gc = WMColorGC(WMWhiteColor(scr));
|
data->gc = WMColorGC(WMWhiteColor(scr));
|
||||||
|
data->selGC = WMColorGC(WMCreateNamedColor(scr, SelectionColor, False));
|
||||||
|
data->textColor = WMBlackColor(scr);
|
||||||
|
|
||||||
delegate->data = data;
|
delegate->data = data;
|
||||||
delegate->drawCell = PSCellPainter;
|
delegate->drawCell = PSCellPainter;
|
||||||
@@ -614,3 +613,5 @@ WMTableColumnDelegate *WTCreatePixmapStringDelegate(WMTableView *parent)
|
|||||||
|
|
||||||
return delegate;
|
return delegate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+135
-28
@@ -26,7 +26,6 @@ struct W_TableColumn {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void handleResize(W_ViewDelegate *self, WMView *view);
|
static void handleResize(W_ViewDelegate *self, WMView *view);
|
||||||
|
|
||||||
static void rearrangeHeader(WMTableView *table);
|
static void rearrangeHeader(WMTableView *table);
|
||||||
@@ -106,7 +105,7 @@ void WMSetTableColumnConstraints(WMTableColumn *column,
|
|||||||
|
|
||||||
void WMSetTableColumnEditable(WMTableColumn *column, Bool flag)
|
void WMSetTableColumnEditable(WMTableColumn *column, Bool flag)
|
||||||
{
|
{
|
||||||
column->editable = flag;
|
column->editable = ((flag==0) ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -168,6 +167,9 @@ struct W_TableView {
|
|||||||
unsigned canSelectRow:1;
|
unsigned canSelectRow:1;
|
||||||
unsigned canSelectMultiRows:1;
|
unsigned canSelectMultiRows:1;
|
||||||
unsigned canDeselectRow:1;
|
unsigned canDeselectRow:1;
|
||||||
|
|
||||||
|
unsigned int hasVScroller:1;
|
||||||
|
unsigned int hasHScroller:1;
|
||||||
};
|
};
|
||||||
|
|
||||||
static W_Class tableClass = 0;
|
static W_Class tableClass = 0;
|
||||||
@@ -183,6 +185,7 @@ static W_ViewDelegate viewDelegate = {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static void reorganizeInterior(WMTableView *table);
|
||||||
|
|
||||||
|
|
||||||
static void handleEvents(XEvent *event, void *data);
|
static void handleEvents(XEvent *event, void *data);
|
||||||
@@ -216,11 +219,21 @@ static WMRect getVisibleRect(WMTableView *table)
|
|||||||
WMSize size = getTotalSize(table);
|
WMSize size = getTotalSize(table);
|
||||||
WMRect rect;
|
WMRect rect;
|
||||||
|
|
||||||
|
if (table->vscroll) {
|
||||||
rect.size.height = size.height * WMGetScrollerKnobProportion(table->vscroll);
|
rect.size.height = size.height * WMGetScrollerKnobProportion(table->vscroll);
|
||||||
rect.size.width = size.width * WMGetScrollerKnobProportion(table->hscroll);
|
|
||||||
|
|
||||||
rect.pos.x = (size.width - rect.size.width) * WMGetScrollerValue(table->hscroll);
|
|
||||||
rect.pos.y = (size.height - rect.size.height) * WMGetScrollerValue(table->vscroll);
|
rect.pos.y = (size.height - rect.size.height) * WMGetScrollerValue(table->vscroll);
|
||||||
|
} else {
|
||||||
|
rect.size.height = size.height;
|
||||||
|
rect.pos.y = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (table->hscroll) {
|
||||||
|
rect.size.width = size.width * WMGetScrollerKnobProportion(table->hscroll);
|
||||||
|
rect.pos.x = (size.width - rect.size.width) * WMGetScrollerValue(table->hscroll);
|
||||||
|
} else {
|
||||||
|
rect.size.width = size.width;
|
||||||
|
rect.pos.x = 0;
|
||||||
|
}
|
||||||
|
|
||||||
return rect;
|
return rect;
|
||||||
}
|
}
|
||||||
@@ -232,6 +245,7 @@ static void scrollToPoint(WMTableView *table, int x, int y)
|
|||||||
int i;
|
int i;
|
||||||
float value, prop;
|
float value, prop;
|
||||||
|
|
||||||
|
if (table->hscroll) {
|
||||||
if (size.width > W_VIEW_WIDTH(table->tableView)) {
|
if (size.width > W_VIEW_WIDTH(table->tableView)) {
|
||||||
prop = (float)W_VIEW_WIDTH(table->tableView) / (float)size.width;
|
prop = (float)W_VIEW_WIDTH(table->tableView) / (float)size.width;
|
||||||
value = (float)x / (float)(size.width - W_VIEW_WIDTH(table->tableView));
|
value = (float)x / (float)(size.width - W_VIEW_WIDTH(table->tableView));
|
||||||
@@ -240,8 +254,9 @@ static void scrollToPoint(WMTableView *table, int x, int y)
|
|||||||
value = 0.0;
|
value = 0.0;
|
||||||
}
|
}
|
||||||
WMSetScrollerParameters(table->hscroll, value, prop);
|
WMSetScrollerParameters(table->hscroll, value, prop);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (table->vscroll) {
|
||||||
if (size.height > W_VIEW_HEIGHT(table->tableView)) {
|
if (size.height > W_VIEW_HEIGHT(table->tableView)) {
|
||||||
prop = (float)W_VIEW_HEIGHT(table->tableView) / (float)size.height;
|
prop = (float)W_VIEW_HEIGHT(table->tableView) / (float)size.height;
|
||||||
value = (float)y / (float)(size.height - W_VIEW_HEIGHT(table->tableView));
|
value = (float)y / (float)(size.height - W_VIEW_HEIGHT(table->tableView));
|
||||||
@@ -251,7 +266,7 @@ static void scrollToPoint(WMTableView *table, int x, int y)
|
|||||||
}
|
}
|
||||||
|
|
||||||
WMSetScrollerParameters(table->vscroll, value, prop);
|
WMSetScrollerParameters(table->vscroll, value, prop);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (table->editingRow >= 0) {
|
if (table->editingRow >= 0) {
|
||||||
@@ -277,6 +292,7 @@ static void adjustScrollers(WMTableView *table)
|
|||||||
float prop, value;
|
float prop, value;
|
||||||
float oprop, ovalue;
|
float oprop, ovalue;
|
||||||
|
|
||||||
|
if (table->hscroll) {
|
||||||
if (size.width <= vsize.width) {
|
if (size.width <= vsize.width) {
|
||||||
value = 0.0;
|
value = 0.0;
|
||||||
prop = 1.0;
|
prop = 1.0;
|
||||||
@@ -290,13 +306,14 @@ static void adjustScrollers(WMTableView *table)
|
|||||||
value = prop*ovalue / oprop;
|
value = prop*ovalue / oprop;
|
||||||
}
|
}
|
||||||
WMSetScrollerParameters(table->hscroll, value, prop);
|
WMSetScrollerParameters(table->hscroll, value, prop);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (table->vscroll) {
|
||||||
if (size.height <= vsize.height) {
|
if (size.height <= vsize.height) {
|
||||||
value = 0.0;
|
value = 0.0;
|
||||||
prop = 1.0;
|
prop = 1.0;
|
||||||
} else {
|
} else {
|
||||||
oprop = WMGetScrollerKnobProportion(table->vscroll);
|
oprop = WMGetScrollerKnobProportion(table->vscroll);
|
||||||
oprop = WMGetScrollerKnobProportion(table->hscroll);
|
|
||||||
if (oprop == 0.0)
|
if (oprop == 0.0)
|
||||||
oprop = 1.0;
|
oprop = 1.0;
|
||||||
ovalue = WMGetScrollerValue(table->vscroll);
|
ovalue = WMGetScrollerValue(table->vscroll);
|
||||||
@@ -306,6 +323,7 @@ static void adjustScrollers(WMTableView *table)
|
|||||||
}
|
}
|
||||||
WMSetScrollerParameters(table->vscroll, value, prop);
|
WMSetScrollerParameters(table->vscroll, value, prop);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static void doScroll(WMWidget *self, void *data)
|
static void doScroll(WMWidget *self, void *data)
|
||||||
@@ -411,7 +429,8 @@ static void doScroll(WMWidget *self, void *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void splitterHandler(XEvent *event, void *data)
|
static void
|
||||||
|
splitterHandler(XEvent *event, void *data)
|
||||||
{
|
{
|
||||||
WMTableColumn *column = (WMTableColumn*)data;
|
WMTableColumn *column = (WMTableColumn*)data;
|
||||||
WMTableView *table = column->table;
|
WMTableView *table = column->table;
|
||||||
@@ -498,12 +517,15 @@ WMTableView *WMCreateTableView(WMWidget *parent)
|
|||||||
WMMoveWidget(table->hscroll, 1, 2+table->headerHeight);
|
WMMoveWidget(table->hscroll, 1, 2+table->headerHeight);
|
||||||
WMMapWidget(table->hscroll);
|
WMMapWidget(table->hscroll);
|
||||||
|
|
||||||
|
table->hasHScroller = 1;
|
||||||
|
|
||||||
table->vscroll = WMCreateScroller(table);
|
table->vscroll = WMCreateScroller(table);
|
||||||
WMSetScrollerArrowsPosition(table->vscroll, WSAMaxEnd);
|
WMSetScrollerArrowsPosition(table->vscroll, WSAMaxEnd);
|
||||||
WMSetScrollerAction(table->vscroll, doScroll, table);
|
WMSetScrollerAction(table->vscroll, doScroll, table);
|
||||||
WMMoveWidget(table->vscroll, 1, 2+table->headerHeight);
|
WMMoveWidget(table->vscroll, 1, 2+table->headerHeight);
|
||||||
WMMapWidget(table->vscroll);
|
WMMapWidget(table->vscroll);
|
||||||
|
|
||||||
|
table->hasVScroller = 1;
|
||||||
|
|
||||||
table->header = WMCreateFrame(table);
|
table->header = WMCreateFrame(table);
|
||||||
WMMoveWidget(table->header, 22, 2);
|
WMMoveWidget(table->header, 22, 2);
|
||||||
@@ -732,6 +754,76 @@ void *WMGetTableViewDataSource(WMTableView *table)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void WMSetTableViewHasHorizontalScroller(WMTableView *tPtr, Bool flag)
|
||||||
|
{
|
||||||
|
if (flag) {
|
||||||
|
if (tPtr->hasHScroller)
|
||||||
|
return;
|
||||||
|
tPtr->hasHScroller = 1;
|
||||||
|
|
||||||
|
tPtr->hscroll = WMCreateScroller(tPtr);
|
||||||
|
WMSetScrollerAction(tPtr->hscroll, doScroll, tPtr);
|
||||||
|
WMSetScrollerArrowsPosition(tPtr->hscroll, WSAMaxEnd);
|
||||||
|
/* make it a horiz. scroller */
|
||||||
|
WMResizeWidget(tPtr->hscroll, 1, 2);
|
||||||
|
|
||||||
|
if (W_VIEW_REALIZED(tPtr->view)) {
|
||||||
|
WMRealizeWidget(tPtr->hscroll);
|
||||||
|
}
|
||||||
|
|
||||||
|
reorganizeInterior(tPtr);
|
||||||
|
|
||||||
|
WMMapWidget(tPtr->hscroll);
|
||||||
|
} else {
|
||||||
|
if (!tPtr->hasHScroller)
|
||||||
|
return;
|
||||||
|
tPtr->hasHScroller = 0;
|
||||||
|
|
||||||
|
WMUnmapWidget(tPtr->hscroll);
|
||||||
|
WMDestroyWidget(tPtr->hscroll);
|
||||||
|
tPtr->hscroll = NULL;
|
||||||
|
|
||||||
|
reorganizeInterior(tPtr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
/* not supported by now */
|
||||||
|
void WMSetTableViewHasVerticalScroller(WMTableView *tPtr, Bool flag)
|
||||||
|
{
|
||||||
|
if (flag) {
|
||||||
|
if (tPtr->hasVScroller)
|
||||||
|
return;
|
||||||
|
tPtr->hasVScroller = 1;
|
||||||
|
|
||||||
|
tPtr->vscroll = WMCreateScroller(tPtr);
|
||||||
|
WMSetScrollerAction(tPtr->vscroll, doScroll, tPtr);
|
||||||
|
WMSetScrollerArrowsPosition(tPtr->vscroll, WSAMaxEnd);
|
||||||
|
/* make it a vert. scroller */
|
||||||
|
WMResizeWidget(tPtr->vscroll, 1, 2);
|
||||||
|
|
||||||
|
if (W_VIEW_REALIZED(tPtr->view)) {
|
||||||
|
WMRealizeWidget(tPtr->vscroll);
|
||||||
|
}
|
||||||
|
|
||||||
|
reorganizeInterior(tPtr);
|
||||||
|
|
||||||
|
WMMapWidget(tPtr->vscroll);
|
||||||
|
} else {
|
||||||
|
if (!tPtr->hasVScroller)
|
||||||
|
return;
|
||||||
|
tPtr->hasVScroller = 0;
|
||||||
|
|
||||||
|
WMUnmapWidget(tPtr->vscroll);
|
||||||
|
WMDestroyWidget(tPtr->vscroll);
|
||||||
|
tPtr->vscroll = NULL;
|
||||||
|
|
||||||
|
reorganizeInterior(tPtr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void WMSetTableViewBackgroundColor(WMTableView *table, WMColor *color)
|
void WMSetTableViewBackgroundColor(WMTableView *table, WMColor *color)
|
||||||
{
|
{
|
||||||
W_SetViewBackgroundColor(table->tableView, color);
|
W_SetViewBackgroundColor(table->tableView, color);
|
||||||
@@ -845,27 +937,28 @@ static void drawGrid(WMTableView *table, WMRect rect)
|
|||||||
static WMRange columnsInRect(WMTableView *table, WMRect rect)
|
static WMRange columnsInRect(WMTableView *table, WMRect rect)
|
||||||
{
|
{
|
||||||
WMTableColumn *column;
|
WMTableColumn *column;
|
||||||
int width;
|
int pos;
|
||||||
int i , j;
|
int i, found;
|
||||||
int totalColumns = WMGetArrayItemCount(table->columns);
|
int totalColumns = WMGetArrayItemCount(table->columns);
|
||||||
WMRange range;
|
WMRange range;
|
||||||
|
|
||||||
j = 0;
|
pos = 0;
|
||||||
width = 0;
|
found = 0;
|
||||||
for (i = 0; i < totalColumns; i++) {
|
for (i = 0; i < totalColumns; i++) {
|
||||||
column = WMGetFromArray(table->columns, i);
|
column = WMGetFromArray(table->columns, i);
|
||||||
if (j == 0) {
|
if (!found) {
|
||||||
if (width <= rect.pos.x && width + column->width > rect.pos.x) {
|
if (rect.pos.x >= pos && rect.pos.x < pos + column->width) {
|
||||||
range.position = i;
|
range.position = i;
|
||||||
j = 1;
|
range.count = 1;
|
||||||
|
found = 1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
range.count++;
|
if (pos > rect.pos.x + rect.size.width) {
|
||||||
if (width > rect.pos.x + rect.size.width) {
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
range.count++;
|
||||||
}
|
}
|
||||||
width += column->width;
|
pos += column->width;
|
||||||
}
|
}
|
||||||
range.count = WMAX(1, WMIN(range.count, totalColumns - range.position));
|
range.count = WMAX(1, WMIN(range.count, totalColumns - range.position));
|
||||||
return range;
|
return range;
|
||||||
@@ -1065,12 +1158,11 @@ void WMReloadTableView(WMTableView *table)
|
|||||||
WMEmptyArray(table->selectedRows);
|
WMEmptyArray(table->selectedRows);
|
||||||
|
|
||||||
if (table->clickedRow >= 0) {
|
if (table->clickedRow >= 0) {
|
||||||
table->clickedRow = -1;
|
|
||||||
|
|
||||||
if (table->action)
|
if (table->action)
|
||||||
(*table->action)(table, table->clientData);
|
(*table->action)(table, table->clientData);
|
||||||
WMPostNotificationName(WMTableViewSelectionDidChangeNotification,
|
WMPostNotificationName(WMTableViewSelectionDidChangeNotification,
|
||||||
table, NULL);
|
table, NULL);
|
||||||
|
table->clickedRow = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (table->delegate && table->delegate->numberOfRows) {
|
if (table->delegate && table->delegate->numberOfRows) {
|
||||||
@@ -1158,12 +1250,24 @@ static void handleEvents(XEvent *event, void *data)
|
|||||||
|
|
||||||
|
|
||||||
static void handleResize(W_ViewDelegate *self, WMView *view)
|
static void handleResize(W_ViewDelegate *self, WMView *view)
|
||||||
|
{
|
||||||
|
reorganizeInterior(view->self);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void reorganizeInterior(WMTableView *table)
|
||||||
{
|
{
|
||||||
int width;
|
int width;
|
||||||
int height;
|
int height;
|
||||||
WMTableView *table = view->self;
|
|
||||||
WMSize size = getTotalSize(table);
|
WMSize size = getTotalSize(table);
|
||||||
|
WMView *view = table->view;
|
||||||
int vw, vh;
|
int vw, vh;
|
||||||
|
int hsThickness, vsThickness;
|
||||||
|
|
||||||
|
if (table->vscroll)
|
||||||
|
vsThickness = WMWidgetWidth(table->vscroll);
|
||||||
|
if (table->hscroll)
|
||||||
|
hsThickness = WMWidgetHeight(table->hscroll);
|
||||||
|
|
||||||
width = W_VIEW_WIDTH(view) - 2;
|
width = W_VIEW_WIDTH(view) - 2;
|
||||||
height = W_VIEW_HEIGHT(view) - 3;
|
height = W_VIEW_HEIGHT(view) - 3;
|
||||||
@@ -1176,24 +1280,27 @@ static void handleResize(W_ViewDelegate *self, WMView *view)
|
|||||||
WMMoveWidget(table->vscroll, 1, table->headerHeight + 1);
|
WMMoveWidget(table->vscroll, 1, table->headerHeight + 1);
|
||||||
WMResizeWidget(table->vscroll, 20, height + 1);
|
WMResizeWidget(table->vscroll, 20, height + 1);
|
||||||
|
|
||||||
WMMoveWidget(table->hscroll, 20, W_VIEW_HEIGHT(view) - 20 - 1);
|
if (table->hscroll) {
|
||||||
WMResizeWidget(table->hscroll, width-20+1, 20);
|
WMMoveWidget(table->hscroll, vsThickness, W_VIEW_HEIGHT(view) - hsThickness - 1);
|
||||||
|
WMResizeWidget(table->hscroll, width-(vsThickness+1), hsThickness);
|
||||||
|
}
|
||||||
|
|
||||||
if (table->header)
|
if (table->header)
|
||||||
WMResizeWidget(table->header, width - 21, table->headerHeight);
|
WMResizeWidget(table->header, width-(vsThickness+1), table->headerHeight);
|
||||||
|
|
||||||
if (table->viewBuffer) {
|
if (table->viewBuffer) {
|
||||||
WMReleasePixmap(table->viewBuffer);
|
WMReleasePixmap(table->viewBuffer);
|
||||||
table->viewBuffer = NULL;
|
table->viewBuffer = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
width -= 20;
|
width -= vsThickness;
|
||||||
height -= 20;
|
height -= hsThickness;
|
||||||
|
|
||||||
|
|
||||||
vw = WMIN(size.width, width);
|
vw = WMIN(size.width, width);
|
||||||
vh = WMIN(size.height, height);
|
vh = WMIN(size.height, height);
|
||||||
|
|
||||||
W_MoveView(table->tableView, 21, 1+table->headerHeight+1);
|
W_MoveView(table->tableView, vsThickness+1, 1+table->headerHeight+1);
|
||||||
W_ResizeView(table->tableView, WMAX(vw, 1), WMAX(vh, 1)+1);
|
W_ResizeView(table->tableView, WMAX(vw, 1), WMAX(vh, 1)+1);
|
||||||
|
|
||||||
adjustScrollers(table);
|
adjustScrollers(table);
|
||||||
|
|||||||
@@ -109,6 +109,10 @@ void WMReloadTableView(WMTableView *table);
|
|||||||
void WMNoteTableViewNumberOfRowsChanged(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
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+16
-2
@@ -16,7 +16,9 @@ lib_LIBRARIES = libWINGs.a libWUtil.a
|
|||||||
LDADD= libWINGs.a $(top_builddir)/wrlib/libwraster.la @INTLIBS@
|
LDADD= libWINGs.a $(top_builddir)/wrlib/libwraster.la @INTLIBS@
|
||||||
|
|
||||||
|
|
||||||
EXTRA_DIST = BUGS
|
EXTRA_DIST = BUGS python/Makefile python/README python/WINGs.i \
|
||||||
|
python/WINGs.py python/setup.py python/test.py
|
||||||
|
|
||||||
|
|
||||||
# wbutton.c
|
# wbutton.c
|
||||||
libWINGs_a_SOURCES = \
|
libWINGs_a_SOURCES = \
|
||||||
@@ -108,8 +110,20 @@ libWUtil_a_SOURCES = \
|
|||||||
CPPFLAGS = @CPPFLAGS@ -DLOCALEDIR=\"$(NLSDIR)\"
|
CPPFLAGS = @CPPFLAGS@ -DLOCALEDIR=\"$(NLSDIR)\"
|
||||||
|
|
||||||
INCLUDES = -I$(top_srcdir)/WINGs/WINGs -I$(top_srcdir)/wrlib -I$(top_srcdir)/src \
|
INCLUDES = -I$(top_srcdir)/WINGs/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
|
||||||
|
|
||||||
|
|
||||||
wcolorpanel.o: wcolorpanel.c
|
wcolorpanel.o: wcolorpanel.c
|
||||||
$(COMPILE) -c -DRGBTXT="\"@X_LIBRARY_PATH@/X11/rgb.txt\"" $<
|
$(COMPILE) -c -DRGBTXT="\"@X_LIBRARY_PATH@/X11/rgb.txt\"" $<
|
||||||
|
|
||||||
|
DISTCLEANFILES = WINGs.pc
|
||||||
|
|
||||||
|
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
|
||||||
|
|||||||
+252
@@ -1,3 +1,255 @@
|
|||||||
|
*** 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 text. 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.
|
||||||
|
The pixels that constitute the antialias around the text are partially
|
||||||
|
transparent pixels, which let part of the background be visible through them.
|
||||||
|
If antialiased text is drawn over and over again, whithout first erasing the
|
||||||
|
old one, the partially transparent pixels of the antialias will no longer
|
||||||
|
see the background through them, but some of them will see the old pixels of
|
||||||
|
the antialias around the old text that was there before. This for example
|
||||||
|
will make a black antialiased text over a white background get thicker as
|
||||||
|
the pixels of the antialias around it, combine with semitransparent black
|
||||||
|
pixels of the old antialias instead of combining with the white background.
|
||||||
|
The result is that the antialias will get darker (in this case) and the text
|
||||||
|
will be altered.
|
||||||
|
|
||||||
|
Because of this the area where text is drawn needs to be cleared before
|
||||||
|
antialiased text can be drawn again. But between the moment whent he area is
|
||||||
|
cleared and the moment when the text is drawn again there is a small time
|
||||||
|
gap that results in flickering. This doesn't happen with normal text where
|
||||||
|
one doesn't need to clear the area before drawing the text, but instead can
|
||||||
|
simply draw over and over again.
|
||||||
|
|
||||||
|
To avoid this situation, a double buffering tehnique was used. Instead of
|
||||||
|
drawing directly in the wisget's window (which is mapped and will flicker as
|
||||||
|
described above), we draw in a pixmap (unmapped) and after all is done we
|
||||||
|
XCopyArea() from that pixmap to the real window.
|
||||||
|
Since all this takes place off-screen, no flickering will be observed in
|
||||||
|
this case.
|
||||||
|
|
||||||
|
This is a change that that will be automatically available for your
|
||||||
|
applications and will require no change from you.
|
||||||
|
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 your list item drawing code used to contain these to clear the
|
||||||
|
item area before drawing it needs to change, else the application will die
|
||||||
|
when it tires to XClearArea() on a pixmap.
|
||||||
|
|
||||||
|
This means that in your application if you ever used WMSetListUserDrawProc()
|
||||||
|
so set a userspace routine which draws WMList items in a particular fashion,
|
||||||
|
you need to make sure your function will not call XClearArea() or
|
||||||
|
XClearWindow() on the drawable that was passed to draw in.
|
||||||
|
|
||||||
|
Instead you should use XFillRectangle().
|
||||||
|
|
||||||
|
This change also means that you no longer need to do double buffering in
|
||||||
|
your code, if you ever used to do. It is not done by WINGs and you benefit
|
||||||
|
from it automatically.
|
||||||
|
|
||||||
|
|
||||||
|
*** 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 Xft 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
|
||||||
|
|
||||||
|
Xft support in WINGs
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
If Xft is detected when configure it is run, support for drawing antialiased
|
||||||
|
fonts with transparency will be compiled into WINGs.
|
||||||
|
You need at least Xfree86 version 4.0.x for this but at least 4.1.x is
|
||||||
|
recommended.
|
||||||
|
|
||||||
|
For Xft support there are 2 new functions to create a font that will render
|
||||||
|
using antialiasing and transparency: WMCreateAntialiasedFont() and
|
||||||
|
WMCreateAntialiasedFontSet(). Later is for multibyte languages.
|
||||||
|
Passing such a font to WMDrawString() or WMDrawImageString() will result
|
||||||
|
in antialiased text displayed on screen. Modifying the alpha value for the
|
||||||
|
WMColor passed to WMDrawString() or WMDrawImageString() will result in text
|
||||||
|
being displayed with the appropriate transparency.
|
||||||
|
|
||||||
|
To control antialiased font behavior, there are 3 new options that go into
|
||||||
|
WMGLOBAL. Two of them are to set the system font used when an antialiased
|
||||||
|
font is required. They operate in a similar way as SystemFont and
|
||||||
|
BoldSystemFont, just they are used when antialiased fonts are requested.
|
||||||
|
They are named AntialiasedSystemFont respectively AntialiasedBoldSystemFont.
|
||||||
|
They are kept separate from SystemFont and BoldSystemFont because the same
|
||||||
|
fonts don't render well as both normal and antialiased if they are not
|
||||||
|
TrueType fonts. Even though you can specify any font in the XLFD format for
|
||||||
|
these new options, it is recomended to use TrueType fonts for the antialiased
|
||||||
|
case since other fonts (standard X fonts) don't render well and give ugly
|
||||||
|
results.
|
||||||
|
|
||||||
|
The third option is an option that globally controls if WINGs uses or not
|
||||||
|
antialiased fonts. It is named AntialiasedText and it has a boolean Yes/No
|
||||||
|
value. If set to Yes, WINGs will try to use antialiased fonts (if support
|
||||||
|
was compiled in, and antialiased fonts can be found) then revert to normal
|
||||||
|
fonts if not possible. Note that this applies if WMCreateFont(),
|
||||||
|
WMSystemFont(), WMSystemFontOfSize(), WMBoldSystemFont() or
|
||||||
|
WMBoldSystemFontOFize() are used. If any of the direct creation functions
|
||||||
|
are used, such as WMCreateAntialiasedFont() or WMCreateNormalFont(), then
|
||||||
|
that kind of font is returned independently of the value of AntialiasedText.
|
||||||
|
(However note that an antialiased font cannot be created if Xft support was
|
||||||
|
no compiled into WINGs, even if you call WMCreateAntialiasedFont() directly.
|
||||||
|
In this case WMCreateAntialiasedFont() will always return NULL)
|
||||||
|
|
||||||
|
These 3 options from WMGLOBAL (which apply to all WINGs applications) can be
|
||||||
|
overwritten on a per application basis by putting them in the application's
|
||||||
|
specific domain file (usually ~/GNUstep/Defaults/application_name).
|
||||||
|
|
||||||
|
There is also another new font creation function available.
|
||||||
|
WMCreateFontWithFlags(screen, fontName, flags)
|
||||||
|
|
||||||
|
flags will specify what kind of font to create. They are defined in WINGs.h
|
||||||
|
as an enum: WMFontFlags
|
||||||
|
|
||||||
|
If WFDefaultFont is passed then the function will work exactly like
|
||||||
|
WMCreateFont() by creating a font according to the options from the
|
||||||
|
configuration.
|
||||||
|
However if some specific flag is passed than that option will be altered. All
|
||||||
|
the other options will keep their default values.
|
||||||
|
|
||||||
|
There are 2 font options available (at this time):
|
||||||
|
1. Font type (if a normal font or a font set)
|
||||||
|
2. Font antialiasing (if it's an antialiased font or not)
|
||||||
|
|
||||||
|
If flags specifies a value for each of the available options then a specific
|
||||||
|
font which only takes into account those flag values will be created and all
|
||||||
|
the font options specified in the configuration (like MultiByte or Antialiasing)
|
||||||
|
will be ignored.
|
||||||
|
However if only some of the options are specified, then for the missing options
|
||||||
|
the default values from the configuration will be used.
|
||||||
|
|
||||||
|
For example if antialiasing is enabled in the configuration and you pass
|
||||||
|
WFNotAntialiased as the flag, then a font with all the properties defined in
|
||||||
|
the configuration (except antialiasing) will be created. This means that if
|
||||||
|
MultiByte is defined a fontset will be created, else a normal font will be
|
||||||
|
created and you don't have to worry about the rest of the flags you didn't
|
||||||
|
specify.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
*** 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
|
*** Thu Oct 04 06:00:09 EEST 2001 -Dan
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -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
|
from Tk. It has a reasonable set of widgets, sufficient for building
|
||||||
small applications (like a CDPlayer or hacking something like rxvt). It
|
small applications (like a CDPlayer or hacking something like rxvt). It
|
||||||
also has other functions that are usefull for applications, like a
|
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,
|
The library is limited and it's design is a little sloppy,
|
||||||
so it's not intended to build large or complex applications, like
|
so it's not intended to build large or complex applications, like
|
||||||
|
|||||||
@@ -1,3 +1,2 @@
|
|||||||
Makefile Makefile.in
|
Makefile Makefile.in
|
||||||
.psrc .inslog2 tca.map tca.log
|
.psrc .inslog2 tca.map tca.log pchdir *.rpt
|
||||||
*.rpt
|
|
||||||
|
|||||||
@@ -4,6 +4,9 @@
|
|||||||
Or a delegate to be called when the list selection change.
|
Or a delegate to be called when the list selection change.
|
||||||
- add some way to modify speed when scrolling WMList, depending on how
|
- add some way to modify speed when scrolling WMList, depending on how
|
||||||
far the mouse is moved outside of the list.
|
far the mouse is moved outside of the list.
|
||||||
|
- clean up header files of declared but not implemented anywhere functions
|
||||||
|
- implement a generic WMChangeFontAttribute(WMFont *font, enum attributes)
|
||||||
|
function
|
||||||
|
|
||||||
|
|
||||||
- optimize color allocation for repeated colors
|
- optimize color allocation for repeated colors
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
Makefile Makefile.in
|
Makefile Makefile.in
|
||||||
testtext testcolorpanel testmywidget wmfile wmquery wtest
|
testtext testcolorpanel testmywidget wmfile wmquery wtest
|
||||||
.libs
|
.libs
|
||||||
.psrc .inslog2 tca.map tca.log
|
.psrc .inslog2 tca.map tca.log pchdir *.rpt
|
||||||
*.rpt
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ AUTOMAKE_OPTIONS = no-dependencies
|
|||||||
noinst_PROGRAMS = wtest wmquery wmfile testmywidget
|
noinst_PROGRAMS = wtest wmquery wmfile testmywidget
|
||||||
|
|
||||||
LDADD= $(top_builddir)/WINGs/libWINGs.a $(top_builddir)/wrlib/libwraster.la \
|
LDADD= $(top_builddir)/WINGs/libWINGs.a $(top_builddir)/wrlib/libwraster.la \
|
||||||
@INTLIBS@
|
@XFTLIBS@ @INTLIBS@
|
||||||
|
|
||||||
|
|
||||||
testmywidget_SOURCES = testmywidget.c mywidget.c mywidget.h
|
testmywidget_SOURCES = testmywidget.c mywidget.c mywidget.h
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ paintMyWidget(_MyWidget *mPtr)
|
|||||||
color = WMWhiteColor(scr);
|
color = WMWhiteColor(scr);
|
||||||
|
|
||||||
W_PaintText(mPtr->view, mPtr->view->window, scr->normalFont, 0, 0,
|
W_PaintText(mPtr->view, mPtr->view->window, scr->normalFont, 0, 0,
|
||||||
mPtr->view->size.width, WACenter, WMColorGC(color),
|
mPtr->view->size.width, WACenter, color,
|
||||||
False, mPtr->text, strlen(mPtr->text));
|
False, mPtr->text, strlen(mPtr->text));
|
||||||
|
|
||||||
WMReleaseColor(color);
|
WMReleaseColor(color);
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <WINGs/WINGs.h>
|
#include <WINGs/WINGs.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "mywidget.h"
|
#include "mywidget.h"
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "logo.xpm"
|
#include "logo.xpm"
|
||||||
|
|
||||||
@@ -70,14 +71,15 @@ int main(int argc, char **argv)
|
|||||||
extern char *optarg;
|
extern char *optarg;
|
||||||
extern int optind;
|
extern int optind;
|
||||||
|
|
||||||
WMInitializeApplication("WMFile", &argc, argv);
|
|
||||||
|
|
||||||
ProgName = argv[0];
|
|
||||||
|
|
||||||
if (!dpy) {
|
if (!dpy) {
|
||||||
puts("could not open display");
|
puts("could not open display");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WMInitializeApplication("WMFile", &argc, argv);
|
||||||
|
|
||||||
|
ProgName = argv[0];
|
||||||
|
|
||||||
while((ch = getopt(argc, argv, "si:ht:")) != -1)
|
while((ch = getopt(argc, argv, "si:ht:")) != -1)
|
||||||
switch(ch)
|
switch(ch)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "logo.xpm"
|
#include "logo.xpm"
|
||||||
|
|
||||||
|
|||||||
+38
-42
@@ -5,13 +5,14 @@
|
|||||||
#include <WINGs/WINGs.h>
|
#include <WINGs/WINGs.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* You need to define this function to link any program to WINGs.
|
* You need to define this function to link any program to WINGs.
|
||||||
|
* (this is no longer required as there is a default abort handler in WINGs)
|
||||||
* This will be called when the application will be terminated because
|
* This will be called when the application will be terminated because
|
||||||
* on a fatal error.
|
* of a fatal error (only for memory allocation failures ATM).
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
wAbort()
|
wAbort()
|
||||||
@@ -138,17 +139,11 @@ testBox(WMScreen *scr)
|
|||||||
win = WMCreateWindow(scr, "testBox");
|
win = WMCreateWindow(scr, "testBox");
|
||||||
WMSetWindowTitle(win, "Box");
|
WMSetWindowTitle(win, "Box");
|
||||||
WMSetWindowCloseAction(win, closeAction, NULL);
|
WMSetWindowCloseAction(win, closeAction, NULL);
|
||||||
|
WMResizeWidget(win, 400, 300);
|
||||||
WMSetViewNotifySizeChanges(WMWidgetView(win), True);
|
|
||||||
|
|
||||||
box = WMCreateBox(win);
|
box = WMCreateBox(win);
|
||||||
WMSetBoxBorderWidth(box, 5);
|
WMSetBoxBorderWidth(box, 5);
|
||||||
|
WMSetViewExpandsToParent(WMWidgetView(box), 0, 0, 0, 0);
|
||||||
WMAddNotificationObserver(resizedWindow, box,
|
|
||||||
WMViewSizeDidChangeNotification,
|
|
||||||
WMWidgetView(win));
|
|
||||||
WMResizeWidget(win, 400, 300);
|
|
||||||
|
|
||||||
|
|
||||||
/*WMSetBoxHorizontal(box, True);*/
|
/*WMSetBoxHorizontal(box, True);*/
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < 4; i++) {
|
||||||
@@ -246,7 +241,7 @@ testList(WMScreen *scr)
|
|||||||
list = WMCreateList(win);
|
list = WMCreateList(win);
|
||||||
/*WMSetListAllowEmptySelection(list, True);*/
|
/*WMSetListAllowEmptySelection(list, True);*/
|
||||||
WMMoveWidget(list, 10, 40);
|
WMMoveWidget(list, 10, 40);
|
||||||
for (i=0; i<50; i++) {
|
for (i=0; i<105; i++) {
|
||||||
sprintf(text, "Item %i", i);
|
sprintf(text, "Item %i", i);
|
||||||
WMAddListItem(list, text);
|
WMAddListItem(list, text);
|
||||||
}
|
}
|
||||||
@@ -343,6 +338,9 @@ testGradientButtons(WMScreen *scr)
|
|||||||
WMSetWindowTitle(win, "Gradiented Button Demo");
|
WMSetWindowTitle(win, "Gradiented Button Demo");
|
||||||
WMResizeWidget(win, 300, 200);
|
WMResizeWidget(win, 300, 200);
|
||||||
|
|
||||||
|
WMSetWindowCloseAction(win, closeAction, NULL);
|
||||||
|
|
||||||
|
|
||||||
light.red = 0x90;
|
light.red = 0x90;
|
||||||
light.green = 0x85;
|
light.green = 0x85;
|
||||||
light.blue = 0x90;
|
light.blue = 0x90;
|
||||||
@@ -592,7 +590,7 @@ testText(WMScreen *scr)
|
|||||||
{
|
{
|
||||||
WMWindow *win;
|
WMWindow *win;
|
||||||
WMText *text;
|
WMText *text;
|
||||||
FILE *file = fopen("wm.html", "r");
|
FILE *file = fopen("wm.html", "rb");
|
||||||
|
|
||||||
windowCount++;
|
windowCount++;
|
||||||
|
|
||||||
@@ -607,6 +605,20 @@ testText(WMScreen *scr)
|
|||||||
WMSetTextHasVerticalScroller(text, True);
|
WMSetTextHasVerticalScroller(text, True);
|
||||||
WMSetTextEditable(text, False);
|
WMSetTextEditable(text, False);
|
||||||
|
|
||||||
|
{
|
||||||
|
WMFont *font, *ifont;
|
||||||
|
|
||||||
|
font = WMDefaultSystemFont(scr);
|
||||||
|
ifont = WMCopyFontWithChanges(scr, font, WFAEmphasized);
|
||||||
|
if (ifont) {
|
||||||
|
WMSetTextDefaultFont(text, ifont);
|
||||||
|
WMReleaseFont(ifont);
|
||||||
|
} else {
|
||||||
|
WMSetTextDefaultFont(text, font);
|
||||||
|
}
|
||||||
|
WMReleaseFont(font);
|
||||||
|
}
|
||||||
|
|
||||||
if(file) {
|
if(file) {
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
@@ -1267,7 +1279,7 @@ main(int argc, char **argv)
|
|||||||
* Do NOT use it unless when debugging. It will cause a major
|
* Do NOT use it unless when debugging. It will cause a major
|
||||||
* slowdown in your application
|
* slowdown in your application
|
||||||
*/
|
*/
|
||||||
#if 1
|
#if 0
|
||||||
XSynchronize(dpy, True);
|
XSynchronize(dpy, True);
|
||||||
#endif
|
#endif
|
||||||
/*
|
/*
|
||||||
@@ -1292,43 +1304,27 @@ main(int argc, char **argv)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
testDragAndDrop(scr);
|
|
||||||
testText(scr);
|
testText(scr);
|
||||||
#if 0
|
|
||||||
testColorPanel(scr);
|
|
||||||
testScrollView(scr);
|
|
||||||
testTabView(scr);
|
|
||||||
testBox(scr);
|
|
||||||
testText(scr);
|
|
||||||
testList(scr);
|
|
||||||
|
|
||||||
testProgressIndicator(scr);
|
|
||||||
|
|
||||||
testColorWell(scr);
|
|
||||||
|
|
||||||
testTextField(scr);
|
|
||||||
|
|
||||||
testDragAndDrop(scr);
|
|
||||||
testFontPanel(scr);
|
testFontPanel(scr);
|
||||||
|
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
testBox(scr);
|
||||||
testButton(scr);
|
testButton(scr);
|
||||||
|
testColorPanel(scr);
|
||||||
|
testColorWell(scr);
|
||||||
|
testDragAndDrop(scr);
|
||||||
testFrame(scr);
|
testFrame(scr);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
testSplitView(scr);
|
|
||||||
|
|
||||||
testGradientButtons(scr);
|
testGradientButtons(scr);
|
||||||
|
testList(scr);
|
||||||
|
|
||||||
testOpenFilePanel(scr);
|
testOpenFilePanel(scr);
|
||||||
|
testProgressIndicator(scr);
|
||||||
testSlider(scr);
|
|
||||||
testPullDown(scr);
|
testPullDown(scr);
|
||||||
|
testScrollView(scr);
|
||||||
|
testSlider(scr);
|
||||||
|
testSplitView(scr);
|
||||||
|
testTabView(scr);
|
||||||
|
testTextField(scr);
|
||||||
#endif
|
#endif
|
||||||
/*
|
/*
|
||||||
* The main event loop.
|
* The main event loop.
|
||||||
|
|||||||
+105
-27
@@ -7,7 +7,7 @@
|
|||||||
#include <WINGs/WUtil.h>
|
#include <WINGs/WUtil.h>
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
|
|
||||||
#define WINGS_H_VERSION 20010117
|
#define WINGS_H_VERSION 20021124
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
@@ -107,6 +107,22 @@ enum {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/* Font flags */
|
||||||
|
typedef enum {
|
||||||
|
WFDefaultFont = 0,
|
||||||
|
WFNormalFont = (1<<0),
|
||||||
|
WFFontSet = (1<<1),
|
||||||
|
WFAntialiased = (1<<2),
|
||||||
|
WFNotAntialiased = (1<<3)
|
||||||
|
} WMFontFlags;
|
||||||
|
|
||||||
|
|
||||||
|
/* Use default system font size in system font name */
|
||||||
|
enum {
|
||||||
|
WFDefaultSize = -1
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/* frame title positions */
|
/* frame title positions */
|
||||||
typedef enum {
|
typedef enum {
|
||||||
WTPNoTitle,
|
WTPNoTitle,
|
||||||
@@ -416,8 +432,6 @@ typedef struct WMGenericPanel {
|
|||||||
} WMGenericPanel;
|
} WMGenericPanel;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct WMInputPanel {
|
typedef struct WMInputPanel {
|
||||||
WMWindow *win; /* window */
|
WMWindow *win; /* window */
|
||||||
WMButton *defBtn; /* default button */
|
WMButton *defBtn; /* default button */
|
||||||
@@ -429,6 +443,35 @@ typedef struct WMInputPanel {
|
|||||||
} WMInputPanel;
|
} WMInputPanel;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#define WFAUnchanged (NULL)
|
||||||
|
/* Struct for font change operations */
|
||||||
|
typedef struct WMFontAttributes {
|
||||||
|
char *foundry;
|
||||||
|
char *family;
|
||||||
|
char *weight;
|
||||||
|
char *slant;
|
||||||
|
char *setWidth;
|
||||||
|
char *addStyle;
|
||||||
|
char *pixelSize;
|
||||||
|
char *pointSize;
|
||||||
|
char *resolutionX;
|
||||||
|
char *resolutionY;
|
||||||
|
char *spacing;
|
||||||
|
char *averageWidth;
|
||||||
|
char *registry;
|
||||||
|
char *encoding;
|
||||||
|
} WMFontAttributes;
|
||||||
|
|
||||||
|
/* A few useful constant font attributes masks */
|
||||||
|
extern const WMFontAttributes *WFANormal;
|
||||||
|
extern const WMFontAttributes *WFABold;
|
||||||
|
extern const WMFontAttributes *WFANotBold;
|
||||||
|
extern const WMFontAttributes *WFAEmphasized;
|
||||||
|
extern const WMFontAttributes *WFANotEmphasized;
|
||||||
|
extern const WMFontAttributes *WFABoldEmphasized;
|
||||||
|
|
||||||
|
|
||||||
/* WMRuler: */
|
/* WMRuler: */
|
||||||
typedef struct {
|
typedef struct {
|
||||||
WMArray *tabs; /* a growable array of tabstops */
|
WMArray *tabs; /* a growable array of tabstops */
|
||||||
@@ -582,6 +625,8 @@ WMPoint wmkpoint(int x, int y);
|
|||||||
|
|
||||||
WMSize wmksize(unsigned int width, unsigned int height);
|
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
|
#ifdef ANSI_C_DOESNT_LIKE_IT_THIS_WAY
|
||||||
#define wmksize(width, height) (WMSize){(width), (height)}
|
#define wmksize(width, height) (WMSize){(width), (height)}
|
||||||
#define wmkpoint(x, y) (WMPoint){(x), (y)}
|
#define wmkpoint(x, y) (WMPoint){(x), (y)}
|
||||||
@@ -654,13 +699,16 @@ void WMDeleteEventHandler(WMView *view, unsigned long mask,
|
|||||||
|
|
||||||
int WMIsDoubleClick(XEvent *event);
|
int WMIsDoubleClick(XEvent *event);
|
||||||
|
|
||||||
int WMIsTripleClick(XEvent *event);
|
/*int WMIsTripleClick(XEvent *event);*/
|
||||||
|
|
||||||
void WMNextEvent(Display *dpy, XEvent *event);
|
void WMNextEvent(Display *dpy, XEvent *event);
|
||||||
|
|
||||||
void WMMaskEvent(Display *dpy, long mask, XEvent *event);
|
void WMMaskEvent(Display *dpy, long mask, XEvent *event);
|
||||||
|
|
||||||
|
|
||||||
|
/* ....................................................................... */
|
||||||
|
|
||||||
|
|
||||||
Bool WMCreateSelectionHandler(WMView *view, Atom selection, Time timestamp,
|
Bool WMCreateSelectionHandler(WMView *view, Atom selection, Time timestamp,
|
||||||
WMSelectionProcs *procs, void *cdata);
|
WMSelectionProcs *procs, void *cdata);
|
||||||
|
|
||||||
@@ -671,6 +719,8 @@ Bool WMRequestSelection(WMView *view, Atom selection, Atom target,
|
|||||||
void *cdata);
|
void *cdata);
|
||||||
|
|
||||||
|
|
||||||
|
extern char *WMSelectionOwnerDidChangeNotification;
|
||||||
|
|
||||||
/* ....................................................................... */
|
/* ....................................................................... */
|
||||||
|
|
||||||
void WMSetViewDragSourceProcs(WMView *view, WMDragSourceProcs *procs);
|
void WMSetViewDragSourceProcs(WMView *view, WMDragSourceProcs *procs);
|
||||||
@@ -690,18 +740,38 @@ WMPoint WMGetDraggingInfoImageLocation(WMDraggingInfo *info);
|
|||||||
|
|
||||||
/* ....................................................................... */
|
/* ....................................................................... */
|
||||||
|
|
||||||
WMFont* WMCreateFontSet(WMScreen *scrPtr, char *fontName);
|
Bool WMHasAntialiasingSupport(WMScreen *scrPtr);
|
||||||
|
|
||||||
|
Bool WMIsAntialiasingEnabled(WMScreen *scrPtr);
|
||||||
|
|
||||||
|
/* ....................................................................... */
|
||||||
|
|
||||||
WMFont* WMCreateNormalFont(WMScreen *scrPtr, char *fontName);
|
WMFont* WMCreateNormalFont(WMScreen *scrPtr, char *fontName);
|
||||||
|
|
||||||
|
WMFont* WMCreateFontSet(WMScreen *scrPtr, char *fontName);
|
||||||
|
|
||||||
|
WMFont* WMCreateAntialiasedFont(WMScreen *scrPtr, char *fontName);
|
||||||
|
|
||||||
|
WMFont* WMCreateAntialiasedFontSet(WMScreen *scrPtr, char *fontName);
|
||||||
|
|
||||||
WMFont* WMCreateFont(WMScreen *scrPtr, char *fontName);
|
WMFont* WMCreateFont(WMScreen *scrPtr, char *fontName);
|
||||||
|
|
||||||
|
WMFont* WMCreateFontWithFlags(WMScreen *scrPtr, char *fontName,
|
||||||
|
WMFontFlags flags);
|
||||||
|
|
||||||
|
WMFont* WMCopyFontWithChanges(WMScreen *scrPtr, WMFont *font,
|
||||||
|
const WMFontAttributes *changes);
|
||||||
|
|
||||||
WMFont* WMRetainFont(WMFont *font);
|
WMFont* WMRetainFont(WMFont *font);
|
||||||
|
|
||||||
void WMReleaseFont(WMFont *font);
|
void WMReleaseFont(WMFont *font);
|
||||||
|
|
||||||
|
char* WMGetFontName(WMFont *font);
|
||||||
|
|
||||||
unsigned int WMFontHeight(WMFont *font);
|
unsigned int WMFontHeight(WMFont *font);
|
||||||
|
|
||||||
|
Bool WMIsAntialiasedFont(WMFont *font);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
WMFont* WMUserFontOfSize(WMScreen *scrPtr, int size);
|
WMFont* WMUserFontOfSize(WMScreen *scrPtr, int size);
|
||||||
|
|
||||||
@@ -713,24 +783,16 @@ void WMSetWidgetDefaultFont(WMScreen *scr, WMFont *font);
|
|||||||
|
|
||||||
void WMSetWidgetDefaultBoldFont(WMScreen *scr, WMFont *font);
|
void WMSetWidgetDefaultBoldFont(WMScreen *scr, WMFont *font);
|
||||||
|
|
||||||
|
WMFont* WMDefaultSystemFont(WMScreen *scrPtr);
|
||||||
|
|
||||||
|
WMFont* WMDefaultBoldSystemFont(WMScreen *scrPtr);
|
||||||
|
|
||||||
WMFont* WMSystemFontOfSize(WMScreen *scrPtr, int size);
|
WMFont* WMSystemFontOfSize(WMScreen *scrPtr, int size);
|
||||||
|
|
||||||
WMFont* WMBoldSystemFontOfSize(WMScreen *scrPtr, int size);
|
WMFont* WMBoldSystemFontOfSize(WMScreen *scrPtr, int size);
|
||||||
|
|
||||||
XFontSet WMGetFontFontSet(WMFont *font);
|
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);
|
WMPixmap* WMRetainPixmap(WMPixmap *pixmap);
|
||||||
@@ -795,24 +857,33 @@ WMColor* WMCreateRGBColor(WMScreen *scr, unsigned short red,
|
|||||||
unsigned short green, unsigned short blue,
|
unsigned short green, unsigned short blue,
|
||||||
Bool exact);
|
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);
|
WMColor* WMCreateNamedColor(WMScreen *scr, char *name, Bool exact);
|
||||||
|
|
||||||
|
void WMSetColorAlpha(WMColor *color, unsigned short alpha);
|
||||||
|
|
||||||
unsigned short WMRedComponentOfColor(WMColor *color);
|
unsigned short WMRedComponentOfColor(WMColor *color);
|
||||||
|
|
||||||
unsigned short WMGreenComponentOfColor(WMColor *color);
|
unsigned short WMGreenComponentOfColor(WMColor *color);
|
||||||
|
|
||||||
unsigned short WMBlueComponentOfColor(WMColor *color);
|
unsigned short WMBlueComponentOfColor(WMColor *color);
|
||||||
|
|
||||||
|
unsigned short WMGetColorAlpha(WMColor *color);
|
||||||
|
|
||||||
char* WMGetColorRGBDescription(WMColor *color);
|
char* WMGetColorRGBDescription(WMColor *color);
|
||||||
|
|
||||||
/* ....................................................................... */
|
/* ....................................................................... */
|
||||||
|
|
||||||
|
|
||||||
void WMDrawString(WMScreen *scr, Drawable d, GC gc, WMFont *font, int x,
|
void WMDrawString(WMScreen *scr, Drawable d, WMColor *color, WMFont *font,
|
||||||
int y, char *text, int length);
|
int x, int y, char *text, int length);
|
||||||
|
|
||||||
void WMDrawImageString(WMScreen *scr, Drawable d, GC gc, WMFont *font, int x,
|
void WMDrawImageString(WMScreen *scr, Drawable d, WMColor *color,
|
||||||
int y, char *text, int length);
|
WMColor *background, WMFont *font, int x, int y,
|
||||||
|
char *text, int length);
|
||||||
|
|
||||||
int WMWidthOfString(WMFont *font, char *text, int length);
|
int WMWidthOfString(WMFont *font, char *text, int length);
|
||||||
|
|
||||||
@@ -842,6 +913,8 @@ void WMResizeWidget(WMWidget *w, unsigned int width, unsigned int height);
|
|||||||
|
|
||||||
void WMSetWidgetBackgroundColor(WMWidget *w, WMColor *color);
|
void WMSetWidgetBackgroundColor(WMWidget *w, WMColor *color);
|
||||||
|
|
||||||
|
WMColor* WMGetWidgetBackgroundColor(WMWidget *w);
|
||||||
|
|
||||||
void WMMapSubwidgets(WMWidget *w);
|
void WMMapSubwidgets(WMWidget *w);
|
||||||
|
|
||||||
void WMUnmapSubwidgets(WMWidget *w);
|
void WMUnmapSubwidgets(WMWidget *w);
|
||||||
@@ -886,9 +959,9 @@ void WMRelayToNextResponder(WMView *view, XEvent *event);
|
|||||||
/* notifications */
|
/* notifications */
|
||||||
extern char *WMViewSizeDidChangeNotification;
|
extern char *WMViewSizeDidChangeNotification;
|
||||||
|
|
||||||
extern char *WMViewRealizedNotification;
|
extern char *WMViewFocusDidChangeNotification;
|
||||||
|
|
||||||
extern char *WMFontPanelDidChangeNotification;
|
extern char *WMViewRealizedNotification;
|
||||||
|
|
||||||
|
|
||||||
/* ....................................................................... */
|
/* ....................................................................... */
|
||||||
@@ -998,6 +1071,8 @@ void WMSetButtonBordered(WMButton *bPtr, int isBordered);
|
|||||||
|
|
||||||
void WMSetButtonEnabled(WMButton *bPtr, Bool flag);
|
void WMSetButtonEnabled(WMButton *bPtr, Bool flag);
|
||||||
|
|
||||||
|
int WMGetButtonEnabled(WMButton *bPtr);
|
||||||
|
|
||||||
void WMSetButtonImageDimsWhenDisabled(WMButton *bPtr, Bool flag);
|
void WMSetButtonImageDimsWhenDisabled(WMButton *bPtr, Bool flag);
|
||||||
|
|
||||||
void WMSetButtonTag(WMButton *bPtr, int tag);
|
void WMSetButtonTag(WMButton *bPtr, int tag);
|
||||||
@@ -1085,6 +1160,7 @@ void WMSetTextFieldPrevTextField(WMTextField *tPtr, WMTextField *prev);
|
|||||||
|
|
||||||
void WMSetTextFieldDelegate(WMTextField *tPtr, WMTextFieldDelegate *delegate);
|
void WMSetTextFieldDelegate(WMTextField *tPtr, WMTextFieldDelegate *delegate);
|
||||||
|
|
||||||
|
WMTextFieldDelegate* WMGetTextFieldDelegate(WMTextField *tPtr);
|
||||||
|
|
||||||
extern char *WMTextDidChangeNotification;
|
extern char *WMTextDidChangeNotification;
|
||||||
extern char *WMTextDidBeginEditingNotification;
|
extern char *WMTextDidBeginEditingNotification;
|
||||||
@@ -1425,8 +1501,6 @@ void WMSetScrollViewContentView(WMScrollView *sPtr, WMView *view);
|
|||||||
|
|
||||||
void WMSetScrollViewRelief(WMScrollView *sPtr, WMReliefType type);
|
void WMSetScrollViewRelief(WMScrollView *sPtr, WMReliefType type);
|
||||||
|
|
||||||
void WMSetScrollViewContentView(WMScrollView *sPtr, WMView *view);
|
|
||||||
|
|
||||||
WMRect WMGetScrollViewVisibleRect(WMScrollView *sPtr);
|
WMRect WMGetScrollViewVisibleRect(WMScrollView *sPtr);
|
||||||
|
|
||||||
WMScroller* WMGetScrollViewHorizontalScroller(WMScrollView *sPtr);
|
WMScroller* WMGetScrollViewHorizontalScroller(WMScrollView *sPtr);
|
||||||
@@ -1641,11 +1715,11 @@ void WMGetTextBlockProperties(WMText *tPtr, void *vtb, unsigned int *first,
|
|||||||
|
|
||||||
int WMGetTextInsertType(WMText *tPtr);
|
int WMGetTextInsertType(WMText *tPtr);
|
||||||
|
|
||||||
int WMGetTextBlocks(WMText *tPtr);
|
/*int WMGetTextBlocks(WMText *tPtr);
|
||||||
|
|
||||||
void WMSetCurrentTextBlock(WMText *tPtr, int current);
|
void WMSetCurrentTextBlock(WMText *tPtr, int current);
|
||||||
|
|
||||||
int WMGetCurrentTextBlock(WMText *tPtr);
|
int WMGetCurrentTextBlock(WMText *tPtr);*/
|
||||||
|
|
||||||
void WMPrependTextBlock(WMText *tPtr, void *vtb);
|
void WMPrependTextBlock(WMText *tPtr, void *vtb);
|
||||||
|
|
||||||
@@ -1696,6 +1770,8 @@ void WMSetTabViewDelegate(WMTabView *tPtr, WMTabViewDelegate *delegate);
|
|||||||
|
|
||||||
WMTabViewItem* WMCreateTabViewItemWithIdentifier(int identifier);
|
WMTabViewItem* WMCreateTabViewItemWithIdentifier(int identifier);
|
||||||
|
|
||||||
|
void WMSetTabViewItemEnabled(WMTabViewItem *tPtr, Bool flag);
|
||||||
|
|
||||||
int WMGetTabViewItemIdentifier(WMTabViewItem *item);
|
int WMGetTabViewItemIdentifier(WMTabViewItem *item);
|
||||||
|
|
||||||
void WMSetTabViewItemLabel(WMTabViewItem *item, char *label);
|
void WMSetTabViewItemLabel(WMTabViewItem *item, char *label);
|
||||||
@@ -1791,6 +1867,8 @@ void WMShowFontPanel(WMFontPanel *panel);
|
|||||||
|
|
||||||
void WMHideFontPanel(WMFontPanel *panel);
|
void WMHideFontPanel(WMFontPanel *panel);
|
||||||
|
|
||||||
|
void WMSetFontPanelAction(WMFontPanel *panel, WMAction2 *action, void *data);
|
||||||
|
|
||||||
void WMSetFontPanelFont(WMFontPanel *panel, WMFont *font);
|
void WMSetFontPanelFont(WMFontPanel *panel, WMFont *font);
|
||||||
|
|
||||||
/* you can free the returned string */
|
/* you can free the returned string */
|
||||||
|
|||||||
+26
-6
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#include <WINGs/WINGs.h>
|
#include <WINGs/WINGs.h>
|
||||||
|
|
||||||
#if WINGS_H_VERSION < 20010117
|
#if WINGS_H_VERSION < 20021124
|
||||||
#error There_is_an_old_WINGs.h_file_somewhere_in_your_system._Please_remove_it.
|
#error There_is_an_old_WINGs.h_file_somewhere_in_your_system._Please_remove_it.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -51,12 +51,14 @@ typedef struct W_Font {
|
|||||||
union {
|
union {
|
||||||
XFontSet set;
|
XFontSet set;
|
||||||
XFontStruct *normal;
|
XFontStruct *normal;
|
||||||
|
struct _XftFont *xft;
|
||||||
} font;
|
} font;
|
||||||
short height;
|
short height;
|
||||||
short y;
|
short y;
|
||||||
short refCount;
|
short refCount;
|
||||||
char *name;
|
char *name;
|
||||||
unsigned int notFontSet:1;
|
unsigned int notFontSet:1;
|
||||||
|
unsigned int antialiased:1;
|
||||||
} W_Font;
|
} W_Font;
|
||||||
|
|
||||||
|
|
||||||
@@ -75,6 +77,7 @@ typedef struct W_Color {
|
|||||||
struct W_Screen *screen;
|
struct W_Screen *screen;
|
||||||
|
|
||||||
XColor color;
|
XColor color;
|
||||||
|
unsigned short alpha;
|
||||||
short refCount;
|
short refCount;
|
||||||
GC gc;
|
GC gc;
|
||||||
struct {
|
struct {
|
||||||
@@ -134,6 +137,10 @@ typedef struct W_Screen {
|
|||||||
|
|
||||||
struct W_IMContext *imctx;
|
struct W_IMContext *imctx;
|
||||||
|
|
||||||
|
struct _XftDraw *xftdraw; /* shared XftDraw */
|
||||||
|
|
||||||
|
Bool hasXftSupport; /* if it can antialias text */
|
||||||
|
|
||||||
/* application related */
|
/* application related */
|
||||||
|
|
||||||
W_FocusInfo *focusInfo;
|
W_FocusInfo *focusInfo;
|
||||||
@@ -183,7 +190,9 @@ typedef struct W_Screen {
|
|||||||
|
|
||||||
GC ixorGC; /* IncludeInferiors XOR */
|
GC ixorGC; /* IncludeInferiors XOR */
|
||||||
|
|
||||||
GC textFieldGC;
|
GC drawStringGC; /* for WMDrawString() */
|
||||||
|
|
||||||
|
GC drawImStringGC; /* for WMDrawImageString() */
|
||||||
|
|
||||||
W_Font *normalFont;
|
W_Font *normalFont;
|
||||||
|
|
||||||
@@ -191,8 +200,16 @@ typedef struct W_Screen {
|
|||||||
|
|
||||||
WMHashTable *fontCache;
|
WMHashTable *fontCache;
|
||||||
|
|
||||||
|
WMHashTable *xftFontCache;
|
||||||
|
|
||||||
|
WMHashTable *fontSetCache;
|
||||||
|
|
||||||
|
WMHashTable *xftFontSetCache;
|
||||||
|
|
||||||
Bool useMultiByte;
|
Bool useMultiByte;
|
||||||
|
|
||||||
|
Bool antialiasedText;
|
||||||
|
|
||||||
unsigned int ignoredModifierMask; /* modifiers to ignore when typing txt */
|
unsigned int ignoredModifierMask; /* modifiers to ignore when typing txt */
|
||||||
|
|
||||||
struct W_Balloon *balloon;
|
struct W_Balloon *balloon;
|
||||||
@@ -399,7 +416,10 @@ typedef struct W_EventHandler {
|
|||||||
typedef struct _WINGsConfiguration {
|
typedef struct _WINGsConfiguration {
|
||||||
char *systemFont;
|
char *systemFont;
|
||||||
char *boldSystemFont;
|
char *boldSystemFont;
|
||||||
|
char *antialiasedSystemFont;
|
||||||
|
char *antialiasedBoldSystemFont;
|
||||||
int defaultFontSize;
|
int defaultFontSize;
|
||||||
|
Bool antialiasedText;
|
||||||
Bool useMultiByte;
|
Bool useMultiByte;
|
||||||
char *floppyPath;
|
char *floppyPath;
|
||||||
unsigned doubleClickDelay;
|
unsigned doubleClickDelay;
|
||||||
@@ -486,13 +506,13 @@ void W_DrawReliefWithGC(W_Screen *scr, Drawable d, int x, int y,
|
|||||||
|
|
||||||
void W_CallDestroyHandlers(W_View *view);
|
void W_CallDestroyHandlers(W_View *view);
|
||||||
|
|
||||||
void W_PaintTextAndImage(W_View *view, int wrap, GC textGC, W_Font *font,
|
void W_PaintTextAndImage(W_View *view, int wrap, WMColor *textColor,
|
||||||
WMReliefType relief, char *text,
|
W_Font *font, WMReliefType relief, char *text,
|
||||||
WMAlignment alignment, W_Pixmap *image,
|
WMAlignment alignment, W_Pixmap *image,
|
||||||
WMImagePosition position, GC backGC, int ofs);
|
WMImagePosition position, WMColor *backColor, int ofs);
|
||||||
|
|
||||||
void W_PaintText(W_View *view, Drawable d, WMFont *font, int x, int y,
|
void W_PaintText(W_View *view, Drawable d, WMFont *font, int x, int y,
|
||||||
int width, WMAlignment alignment, GC gc,
|
int width, WMAlignment alignment, WMColor *color,
|
||||||
int wrap, char *text, int length);
|
int wrap, char *text, int length);
|
||||||
|
|
||||||
int W_GetTextHeight(WMFont *font, char *text, int width, int wrap);
|
int W_GetTextHeight(WMFont *font, char *text, int width, int wrap);
|
||||||
|
|||||||
+13
-7
@@ -19,12 +19,14 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if (!defined (__GNUC__) || __GNUC__ < 2 || \
|
#ifndef __ASSERT_FUNCTION
|
||||||
__GNUC_MINOR__ < (defined (__cplusplus) ? 6 : 4))
|
# if (!defined (__GNUC__) || (__GNUC__ < 2 && \
|
||||||
|
__GNUC_MINOR__ < (defined (__cplusplus) ? 6 : 4)))
|
||||||
# define __ASSERT_FUNCTION ((char *) 0)
|
# define __ASSERT_FUNCTION ((char *) 0)
|
||||||
# else
|
# else
|
||||||
# define __ASSERT_FUNCTION __PRETTY_FUNCTION__
|
# define __ASSERT_FUNCTION __PRETTY_FUNCTION__
|
||||||
# endif
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef NDEBUG
|
#ifdef NDEBUG
|
||||||
@@ -184,8 +186,9 @@ typedef struct {
|
|||||||
typedef struct ConnectionDelegate {
|
typedef struct ConnectionDelegate {
|
||||||
void *data;
|
void *data;
|
||||||
|
|
||||||
void (*didCatchException)(struct ConnectionDelegate *self,
|
void (*canResumeSending)(struct ConnectionDelegate *self, WMConnection *cPtr);
|
||||||
WMConnection *cPtr);
|
|
||||||
|
void (*didCatchException)(struct ConnectionDelegate *self, WMConnection *cPtr);
|
||||||
|
|
||||||
void (*didDie)(struct ConnectionDelegate *self, WMConnection *cPtr);
|
void (*didDie)(struct ConnectionDelegate *self, WMConnection *cPtr);
|
||||||
|
|
||||||
@@ -205,9 +208,9 @@ typedef void WMNotificationObserverAction(void *observerData,
|
|||||||
|
|
||||||
/*......................................................................*/
|
/*......................................................................*/
|
||||||
|
|
||||||
typedef void (waborthandler)(int);
|
typedef void waborthandler(int);
|
||||||
|
|
||||||
waborthandler* wsetabort(waborthandler*);
|
waborthandler* wsetabort(waborthandler* handler);
|
||||||
|
|
||||||
|
|
||||||
/* don't free the returned string */
|
/* don't free the returned string */
|
||||||
@@ -239,6 +242,7 @@ void wrelease(void *ptr);
|
|||||||
void* wretain(void *ptr);
|
void* wretain(void *ptr);
|
||||||
|
|
||||||
char* wstrdup(char *str);
|
char* wstrdup(char *str);
|
||||||
|
char* wstrndup(char *str, size_t len);
|
||||||
|
|
||||||
/* Concatenate str1 with str2 and return that in a newly malloc'ed string.
|
/* 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.
|
* str1 and str2 can be any strings including static and constant strings.
|
||||||
@@ -680,7 +684,7 @@ void WMSortTree(WMTreeNode *aNode, WMCompareDataProc *comparer);
|
|||||||
WMTreeNode* WMFindInTree(WMTreeNode *aTree, WMMatchDataProc *match, void *cdata);
|
WMTreeNode* WMFindInTree(WMTreeNode *aTree, WMMatchDataProc *match, void *cdata);
|
||||||
|
|
||||||
/* Returns first tree node that has data == cdata */
|
/* Returns first tree node that has data == cdata */
|
||||||
#define WMGetFirstInTree(aTree, cdata) WMFindInTree(atree, NULL, cdata)
|
#define WMGetFirstInTree(aTree, cdata) WMFindInTree(aTree, NULL, cdata)
|
||||||
|
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
@@ -977,6 +981,8 @@ Bool WMSetConnectionNonBlocking(WMConnection *cPtr, Bool flag);
|
|||||||
|
|
||||||
Bool WMSetConnectionCloseOnExec(WMConnection *cPtr, Bool flag);
|
Bool WMSetConnectionCloseOnExec(WMConnection *cPtr, Bool flag);
|
||||||
|
|
||||||
|
void WMSetConnectionShutdownOnClose(WMConnection *cPtr, Bool flag);
|
||||||
|
|
||||||
void* WMGetConnectionClientData(WMConnection *cPtr);
|
void* WMGetConnectionClientData(WMConnection *cPtr);
|
||||||
|
|
||||||
void WMSetConnectionClientData(WMConnection *cPtr, void *data);
|
void WMSetConnectionClientData(WMConnection *cPtr, void *data);
|
||||||
|
|||||||
@@ -274,8 +274,10 @@ WMCountInArray(WMArray *array, void *item)
|
|||||||
void
|
void
|
||||||
WMSortArray(WMArray *array, WMCompareDataProc *comparer)
|
WMSortArray(WMArray *array, WMCompareDataProc *comparer)
|
||||||
{
|
{
|
||||||
|
if (array->itemCount > 1) { /* Don't sort empty or single element arrays */
|
||||||
qsort(array->items, array->itemCount, sizeof(void*), comparer);
|
qsort(array->items, array->itemCount, sizeof(void*), comparer);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
+72
-3
@@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "WINGsP.h"
|
#include "WINGsP.h"
|
||||||
|
#include "wconfig.h"
|
||||||
|
|
||||||
#include <X11/Xlocale.h>
|
#include <X11/Xlocale.h>
|
||||||
|
|
||||||
@@ -13,6 +14,10 @@ _WINGsConfiguration WINGsConfiguration;
|
|||||||
|
|
||||||
#define BOLD_SYSTEM_FONT "-*-helvetica-bold-r-normal-*-%d-*-*-*-*-*-*-*,-*-*-bold-r-*-*-%d-*-*-*-*-*-*-*"
|
#define BOLD_SYSTEM_FONT "-*-helvetica-bold-r-normal-*-%d-*-*-*-*-*-*-*,-*-*-bold-r-*-*-%d-*-*-*-*-*-*-*"
|
||||||
|
|
||||||
|
#define XFTSYSTEM_FONT "-*-arial-medium-r-normal-*-%d-*-*-*-*-*-*-*"
|
||||||
|
|
||||||
|
#define XFTBOLD_SYSTEM_FONT "-*-arial-bold-r-normal-*-%d-*-*-*-*-*-*-*"
|
||||||
|
|
||||||
#define FLOPPY_PATH "/floppy"
|
#define FLOPPY_PATH "/floppy"
|
||||||
|
|
||||||
|
|
||||||
@@ -40,6 +45,51 @@ getButtonWithName(const char *name, unsigned defaultButton)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static Bool
|
||||||
|
missingOrInvalidXLFD(char *xlfd)
|
||||||
|
{
|
||||||
|
char *ptr = xlfd;
|
||||||
|
Bool broken = False;
|
||||||
|
int count = 0;
|
||||||
|
|
||||||
|
if (!xlfd)
|
||||||
|
return True;
|
||||||
|
|
||||||
|
while (*ptr) {
|
||||||
|
if (*ptr=='%') {
|
||||||
|
ptr++;
|
||||||
|
if ((*ptr=='d' || *ptr=='i') && count==0) {
|
||||||
|
count++;
|
||||||
|
} else {
|
||||||
|
broken = True;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else if (*ptr==',') {
|
||||||
|
count = 0;
|
||||||
|
}
|
||||||
|
ptr++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (broken) {
|
||||||
|
if (xlfd == WINGsConfiguration.systemFont) {
|
||||||
|
ptr = "system font";
|
||||||
|
} else if (xlfd == WINGsConfiguration.boldSystemFont) {
|
||||||
|
ptr = "bold system font";
|
||||||
|
} else if (xlfd == WINGsConfiguration.antialiasedSystemFont) {
|
||||||
|
ptr = "antialiased system font";
|
||||||
|
} else if (xlfd == WINGsConfiguration.antialiasedBoldSystemFont) {
|
||||||
|
ptr = "antialiased bold system font";
|
||||||
|
} else {
|
||||||
|
ptr = "Unknown System Font";
|
||||||
|
}
|
||||||
|
wwarning(_("Invalid %s specification: '%s' (only %%d is allowed and "
|
||||||
|
"at most once for each font in a fontset)."), ptr, xlfd);
|
||||||
|
}
|
||||||
|
|
||||||
|
return broken;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
W_ReadConfigurations(void)
|
W_ReadConfigurations(void)
|
||||||
{
|
{
|
||||||
@@ -60,6 +110,19 @@ W_ReadConfigurations(void)
|
|||||||
WINGsConfiguration.boldSystemFont =
|
WINGsConfiguration.boldSystemFont =
|
||||||
WMGetUDStringForKey(defaults, "BoldSystemFont");
|
WMGetUDStringForKey(defaults, "BoldSystemFont");
|
||||||
|
|
||||||
|
WINGsConfiguration.antialiasedSystemFont =
|
||||||
|
WMGetUDStringForKey(defaults, "AntialiasedSystemFont");
|
||||||
|
|
||||||
|
WINGsConfiguration.antialiasedBoldSystemFont =
|
||||||
|
WMGetUDStringForKey(defaults, "AntialiasedBoldSystemFont");
|
||||||
|
|
||||||
|
#ifdef XFT
|
||||||
|
WINGsConfiguration.antialiasedText =
|
||||||
|
WMGetUDBoolForKey(defaults, "AntialiasedText");
|
||||||
|
#else
|
||||||
|
WINGsConfiguration.antialiasedText = False;
|
||||||
|
#endif
|
||||||
|
|
||||||
WINGsConfiguration.useMultiByte = False;
|
WINGsConfiguration.useMultiByte = False;
|
||||||
str = WMGetUDStringForKey(defaults, "MultiByteText");
|
str = WMGetUDStringForKey(defaults, "MultiByteText");
|
||||||
if (str) {
|
if (str) {
|
||||||
@@ -74,6 +137,7 @@ W_ReadConfigurations(void)
|
|||||||
if (locale != NULL
|
if (locale != NULL
|
||||||
&& (strncmp(locale, "ja", 2) == 0
|
&& (strncmp(locale, "ja", 2) == 0
|
||||||
|| strncmp(locale, "zh", 2) == 0
|
|| strncmp(locale, "zh", 2) == 0
|
||||||
|
|| strncmp(locale, "ru", 2) == 0
|
||||||
|| strncmp(locale, "ko", 2) == 0)) {
|
|| strncmp(locale, "ko", 2) == 0)) {
|
||||||
|
|
||||||
WINGsConfiguration.useMultiByte = True;
|
WINGsConfiguration.useMultiByte = True;
|
||||||
@@ -114,13 +178,18 @@ W_ReadConfigurations(void)
|
|||||||
WMGetUDIntegerForKey(defaults, "DefaultFontSize");
|
WMGetUDIntegerForKey(defaults, "DefaultFontSize");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (missingOrInvalidXLFD(WINGsConfiguration.systemFont)) {
|
||||||
if (!WINGsConfiguration.systemFont) {
|
|
||||||
WINGsConfiguration.systemFont = SYSTEM_FONT;
|
WINGsConfiguration.systemFont = SYSTEM_FONT;
|
||||||
}
|
}
|
||||||
if (!WINGsConfiguration.boldSystemFont) {
|
if (missingOrInvalidXLFD(WINGsConfiguration.boldSystemFont)) {
|
||||||
WINGsConfiguration.boldSystemFont = BOLD_SYSTEM_FONT;
|
WINGsConfiguration.boldSystemFont = BOLD_SYSTEM_FONT;
|
||||||
}
|
}
|
||||||
|
if (missingOrInvalidXLFD(WINGsConfiguration.antialiasedSystemFont)) {
|
||||||
|
WINGsConfiguration.antialiasedSystemFont = XFTSYSTEM_FONT;
|
||||||
|
}
|
||||||
|
if (missingOrInvalidXLFD(WINGsConfiguration.antialiasedBoldSystemFont)) {
|
||||||
|
WINGsConfiguration.antialiasedBoldSystemFont = XFTBOLD_SYSTEM_FONT;
|
||||||
|
}
|
||||||
if (!WINGsConfiguration.floppyPath) {
|
if (!WINGsConfiguration.floppyPath) {
|
||||||
WINGsConfiguration.floppyPath = FLOPPY_PATH;
|
WINGsConfiguration.floppyPath = FLOPPY_PATH;
|
||||||
}
|
}
|
||||||
|
|||||||
+75
-46
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* WINGs WMConnection function library
|
* WINGs WMConnection function library
|
||||||
*
|
*
|
||||||
* Copyright (c) 1999-2000 Dan Pascu
|
* Copyright (c) 1999-2003 Dan Pascu
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -121,6 +121,7 @@ typedef struct W_Connection {
|
|||||||
char *protocol;
|
char *protocol;
|
||||||
|
|
||||||
Bool closeOnRelease;
|
Bool closeOnRelease;
|
||||||
|
Bool shutdownOnClose;
|
||||||
Bool wasNonBlocking;
|
Bool wasNonBlocking;
|
||||||
Bool isNonBlocking;
|
Bool isNonBlocking;
|
||||||
|
|
||||||
@@ -129,7 +130,7 @@ typedef struct W_Connection {
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clearOutputQueue(WMConnection *cPtr) /*FOLD00*/
|
clearOutputQueue(WMConnection *cPtr)
|
||||||
{
|
{
|
||||||
cPtr->bufPos = 0;
|
cPtr->bufPos = 0;
|
||||||
WMEmptyArray(cPtr->outputQueue);
|
WMEmptyArray(cPtr->outputQueue);
|
||||||
@@ -137,7 +138,7 @@ clearOutputQueue(WMConnection *cPtr) /*FOLD00*/
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
openTimeout(void *cdata) /*FOLD00*/
|
openTimeout(void *cdata)
|
||||||
{
|
{
|
||||||
WMConnection *cPtr = (WMConnection*) cdata;
|
WMConnection *cPtr = (WMConnection*) cdata;
|
||||||
|
|
||||||
@@ -160,7 +161,7 @@ openTimeout(void *cdata) /*FOLD00*/
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sendTimeout(void *cdata) /*FOLD00*/
|
sendTimeout(void *cdata)
|
||||||
{
|
{
|
||||||
WMConnection *cPtr = (WMConnection*) cdata;
|
WMConnection *cPtr = (WMConnection*) cdata;
|
||||||
|
|
||||||
@@ -184,7 +185,7 @@ sendTimeout(void *cdata) /*FOLD00*/
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
inputHandler(int fd, int mask, void *clientData) /*FOLD00*/
|
inputHandler(int fd, int mask, void *clientData)
|
||||||
{
|
{
|
||||||
WMConnection *cPtr = (WMConnection*)clientData;
|
WMConnection *cPtr = (WMConnection*)clientData;
|
||||||
|
|
||||||
@@ -192,9 +193,10 @@ inputHandler(int fd, int mask, void *clientData) /*FOLD00*/
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if ((mask & WIWriteMask)) {
|
if ((mask & WIWriteMask)) {
|
||||||
|
int result;
|
||||||
|
|
||||||
if (cPtr->state == WCInProgress) {
|
if (cPtr->state == WCInProgress) {
|
||||||
Bool failed;
|
Bool failed;
|
||||||
int result;
|
|
||||||
int len = sizeof(result);
|
int len = sizeof(result);
|
||||||
|
|
||||||
WCErrorCode = 0;
|
WCErrorCode = 0;
|
||||||
@@ -228,7 +230,10 @@ inputHandler(int fd, int mask, void *clientData) /*FOLD00*/
|
|||||||
if (failed)
|
if (failed)
|
||||||
return;
|
return;
|
||||||
} else if (cPtr->state == WCConnected) {
|
} else if (cPtr->state == WCConnected) {
|
||||||
WMFlushConnection(cPtr);
|
result = WMFlushConnection(cPtr);
|
||||||
|
if (result>0 && cPtr->delegate && cPtr->delegate->canResumeSending) {
|
||||||
|
(*cPtr->delegate->canResumeSending)(cPtr->delegate, cPtr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -249,7 +254,7 @@ inputHandler(int fd, int mask, void *clientData) /*FOLD00*/
|
|||||||
|
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
setSocketNonBlocking(int sock, Bool flag) /*FOLD00*/
|
setSocketNonBlocking(int sock, Bool flag)
|
||||||
{
|
{
|
||||||
int state;
|
int state;
|
||||||
Bool isNonBlock;
|
Bool isNonBlock;
|
||||||
@@ -283,7 +288,7 @@ setSocketNonBlocking(int sock, Bool flag) /*FOLD00*/
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
setConnectionAddress(WMConnection *cPtr, struct sockaddr_in *socketaddr) /*FOLD00*/
|
setConnectionAddress(WMConnection *cPtr, struct sockaddr_in *socketaddr)
|
||||||
{
|
{
|
||||||
wassertr(cPtr->address==NULL);
|
wassertr(cPtr->address==NULL);
|
||||||
|
|
||||||
@@ -295,7 +300,7 @@ setConnectionAddress(WMConnection *cPtr, struct sockaddr_in *socketaddr) /*FOLD0
|
|||||||
|
|
||||||
|
|
||||||
static struct sockaddr_in*
|
static struct sockaddr_in*
|
||||||
getSocketAddress(char* name, char* service, char* protocol) /*FOLD00*/
|
getSocketAddress(char* name, char* service, char* protocol)
|
||||||
{
|
{
|
||||||
static struct sockaddr_in socketaddr;
|
static struct sockaddr_in socketaddr;
|
||||||
struct servent *sp;
|
struct servent *sp;
|
||||||
@@ -359,7 +364,7 @@ dummyHandler(int signum)
|
|||||||
|
|
||||||
|
|
||||||
static WMConnection*
|
static WMConnection*
|
||||||
createConnectionWithSocket(int sock, Bool closeOnRelease) /*FOLD00*/
|
createConnectionWithSocket(int sock, Bool closeOnRelease)
|
||||||
{
|
{
|
||||||
WMConnection *cPtr;
|
WMConnection *cPtr;
|
||||||
struct sigaction sig_action;
|
struct sigaction sig_action;
|
||||||
@@ -376,6 +381,7 @@ createConnectionWithSocket(int sock, Bool closeOnRelease) /*FOLD00*/
|
|||||||
cPtr->sendTimeout.timeout = DefaultTimeout;
|
cPtr->sendTimeout.timeout = DefaultTimeout;
|
||||||
cPtr->sendTimeout.handler = NULL;
|
cPtr->sendTimeout.handler = NULL;
|
||||||
cPtr->closeOnRelease = closeOnRelease;
|
cPtr->closeOnRelease = closeOnRelease;
|
||||||
|
cPtr->shutdownOnClose = 1;
|
||||||
cPtr->outputQueue =
|
cPtr->outputQueue =
|
||||||
WMCreateArrayWithDestructor(16, (WMFreeDataProc*)WMReleaseData);
|
WMCreateArrayWithDestructor(16, (WMFreeDataProc*)WMReleaseData);
|
||||||
cPtr->state = WCNotConnected;
|
cPtr->state = WCNotConnected;
|
||||||
@@ -399,7 +405,7 @@ createConnectionWithSocket(int sock, Bool closeOnRelease) /*FOLD00*/
|
|||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
WMConnection*
|
WMConnection*
|
||||||
WMCreateConnectionWithSocket(int sock, Bool closeOnRelease) /*FOLD00*/
|
WMCreateConnectionWithSocket(int sock, Bool closeOnRelease)
|
||||||
{
|
{
|
||||||
WMConnection *cPtr;
|
WMConnection *cPtr;
|
||||||
struct sockaddr_in clientname;
|
struct sockaddr_in clientname;
|
||||||
@@ -448,7 +454,7 @@ WMCreateConnectionWithSocket(int sock, Bool closeOnRelease) /*FOLD00*/
|
|||||||
* currently only "tcp" is supported.
|
* currently only "tcp" is supported.
|
||||||
*/
|
*/
|
||||||
WMConnection*
|
WMConnection*
|
||||||
WMCreateConnectionAsServerAtAddress(char *host, char *service, char *protocol) /*FOLD00*/
|
WMCreateConnectionAsServerAtAddress(char *host, char *service, char *protocol)
|
||||||
{
|
{
|
||||||
WMConnection *cPtr;
|
WMConnection *cPtr;
|
||||||
struct sockaddr_in *socketaddr;
|
struct sockaddr_in *socketaddr;
|
||||||
@@ -509,7 +515,7 @@ WMCreateConnectionAsServerAtAddress(char *host, char *service, char *protocol) /
|
|||||||
|
|
||||||
|
|
||||||
WMConnection*
|
WMConnection*
|
||||||
WMCreateConnectionToAddress(char *host, char *service, char *protocol) /*FOLD00*/
|
WMCreateConnectionToAddress(char *host, char *service, char *protocol)
|
||||||
{
|
{
|
||||||
WMConnection *cPtr;
|
WMConnection *cPtr;
|
||||||
struct sockaddr_in *socketaddr;
|
struct sockaddr_in *socketaddr;
|
||||||
@@ -551,7 +557,7 @@ WMCreateConnectionToAddress(char *host, char *service, char *protocol) /*FOLD00*
|
|||||||
|
|
||||||
|
|
||||||
WMConnection*
|
WMConnection*
|
||||||
WMCreateConnectionToAddressAndNotify(char *host, char *service, char *protocol) /*FOLD00*/
|
WMCreateConnectionToAddressAndNotify(char *host, char *service, char *protocol)
|
||||||
{
|
{
|
||||||
WMConnection *cPtr;
|
WMConnection *cPtr;
|
||||||
struct sockaddr_in *socketaddr;
|
struct sockaddr_in *socketaddr;
|
||||||
@@ -602,7 +608,7 @@ WMCreateConnectionToAddressAndNotify(char *host, char *service, char *protocol)
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
removeAllHandlers(WMConnection *cPtr) /*FOLD00*/
|
removeAllHandlers(WMConnection *cPtr)
|
||||||
{
|
{
|
||||||
if (cPtr->handler.read)
|
if (cPtr->handler.read)
|
||||||
WMDeleteInputHandler(cPtr->handler.read);
|
WMDeleteInputHandler(cPtr->handler.read);
|
||||||
@@ -624,10 +630,12 @@ removeAllHandlers(WMConnection *cPtr) /*FOLD00*/
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WMDestroyConnection(WMConnection *cPtr) /*FOLD00*/
|
WMDestroyConnection(WMConnection *cPtr)
|
||||||
{
|
{
|
||||||
if (cPtr->closeOnRelease && cPtr->sock>=0) {
|
if (cPtr->closeOnRelease && cPtr->sock>=0) {
|
||||||
|
if (cPtr->shutdownOnClose) {
|
||||||
shutdown(cPtr->sock, SHUT_RDWR);
|
shutdown(cPtr->sock, SHUT_RDWR);
|
||||||
|
}
|
||||||
close(cPtr->sock);
|
close(cPtr->sock);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -645,10 +653,12 @@ WMDestroyConnection(WMConnection *cPtr) /*FOLD00*/
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WMCloseConnection(WMConnection *cPtr) /*FOLD00*/
|
WMCloseConnection(WMConnection *cPtr)
|
||||||
{
|
{
|
||||||
if (cPtr->sock>=0) {
|
if (cPtr->sock>=0) {
|
||||||
|
if (cPtr->shutdownOnClose) {
|
||||||
shutdown(cPtr->sock, SHUT_RDWR);
|
shutdown(cPtr->sock, SHUT_RDWR);
|
||||||
|
}
|
||||||
close(cPtr->sock);
|
close(cPtr->sock);
|
||||||
cPtr->sock = -1;
|
cPtr->sock = -1;
|
||||||
}
|
}
|
||||||
@@ -661,7 +671,7 @@ WMCloseConnection(WMConnection *cPtr) /*FOLD00*/
|
|||||||
|
|
||||||
|
|
||||||
WMConnection*
|
WMConnection*
|
||||||
WMAcceptConnection(WMConnection *listener) /*FOLD00*/
|
WMAcceptConnection(WMConnection *listener)
|
||||||
{
|
{
|
||||||
struct sockaddr_in clientname;
|
struct sockaddr_in clientname;
|
||||||
int size;
|
int size;
|
||||||
@@ -688,49 +698,49 @@ WMAcceptConnection(WMConnection *listener) /*FOLD00*/
|
|||||||
|
|
||||||
|
|
||||||
char*
|
char*
|
||||||
WMGetConnectionAddress(WMConnection *cPtr) /*FOLD00*/
|
WMGetConnectionAddress(WMConnection *cPtr)
|
||||||
{
|
{
|
||||||
return cPtr->address;
|
return cPtr->address;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
char*
|
char*
|
||||||
WMGetConnectionService(WMConnection *cPtr) /*FOLD00*/
|
WMGetConnectionService(WMConnection *cPtr)
|
||||||
{
|
{
|
||||||
return cPtr->service;
|
return cPtr->service;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
char*
|
char*
|
||||||
WMGetConnectionProtocol(WMConnection *cPtr) /*FOLD00*/
|
WMGetConnectionProtocol(WMConnection *cPtr)
|
||||||
{
|
{
|
||||||
return cPtr->protocol;
|
return cPtr->protocol;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
WMGetConnectionSocket(WMConnection *cPtr) /*FOLD00*/
|
WMGetConnectionSocket(WMConnection *cPtr)
|
||||||
{
|
{
|
||||||
return cPtr->sock;
|
return cPtr->sock;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
WMConnectionState
|
WMConnectionState
|
||||||
WMGetConnectionState(WMConnection *cPtr) /*FOLD00*/
|
WMGetConnectionState(WMConnection *cPtr)
|
||||||
{
|
{
|
||||||
return cPtr->state;
|
return cPtr->state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
WMConnectionTimeoutState
|
WMConnectionTimeoutState
|
||||||
WMGetConnectionTimeoutState(WMConnection *cPtr) /*FOLD00*/
|
WMGetConnectionTimeoutState(WMConnection *cPtr)
|
||||||
{
|
{
|
||||||
return cPtr->timeoutState;
|
return cPtr->timeoutState;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
WMEnqueueConnectionData(WMConnection *cPtr, WMData *data) /*FOLD00*/
|
WMEnqueueConnectionData(WMConnection *cPtr, WMData *data)
|
||||||
{
|
{
|
||||||
wassertrv(cPtr->state!=WCNotConnected && cPtr->state!=WCListening, False);
|
wassertrv(cPtr->state!=WCNotConnected && cPtr->state!=WCListening, False);
|
||||||
wassertrv(cPtr->state!=WCInProgress && cPtr->state!=WCFailed, False);
|
wassertrv(cPtr->state!=WCInProgress && cPtr->state!=WCFailed, False);
|
||||||
@@ -743,10 +753,18 @@ WMEnqueueConnectionData(WMConnection *cPtr, WMData *data) /*FOLD00*/
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Return value:
|
||||||
|
* -1 - not connected or connection died while sending
|
||||||
|
* 0 - couldn't send the data (or part of it). data is saved in a queue
|
||||||
|
* and will be sent when possible. after it is sent the canResumeSending
|
||||||
|
* callback will be called.
|
||||||
|
* 1 - data was succesfully sent
|
||||||
|
*/
|
||||||
int
|
int
|
||||||
WMSendConnectionData(WMConnection *cPtr, WMData *data) /*FOLD00*/
|
WMSendConnectionData(WMConnection *cPtr, WMData *data)
|
||||||
{
|
{
|
||||||
int bytes, pos, len, totalTransfer;
|
int bytes, pos, len;
|
||||||
TimeoutData *tPtr = &cPtr->sendTimeout;
|
TimeoutData *tPtr = &cPtr->sendTimeout;
|
||||||
const unsigned char *dataBytes;
|
const unsigned char *dataBytes;
|
||||||
|
|
||||||
@@ -767,8 +785,6 @@ WMSendConnectionData(WMConnection *cPtr, WMData *data) /*FOLD00*/
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
totalTransfer = 0;
|
|
||||||
|
|
||||||
while (WMGetArrayItemCount(cPtr->outputQueue) > 0) {
|
while (WMGetArrayItemCount(cPtr->outputQueue) > 0) {
|
||||||
data = WMGetFromArray(cPtr->outputQueue, 0);
|
data = WMGetFromArray(cPtr->outputQueue, 0);
|
||||||
dataBytes = (const unsigned char *)WMDataBytes(data);
|
dataBytes = (const unsigned char *)WMDataBytes(data);
|
||||||
@@ -793,7 +809,7 @@ WMSendConnectionData(WMConnection *cPtr, WMData *data) /*FOLD00*/
|
|||||||
WMAddInputHandler(cPtr->sock, WIWriteMask,
|
WMAddInputHandler(cPtr->sock, WIWriteMask,
|
||||||
inputHandler, cPtr);
|
inputHandler, cPtr);
|
||||||
}
|
}
|
||||||
return totalTransfer;
|
return 0;
|
||||||
default:
|
default:
|
||||||
WCErrorCode = errno;
|
WCErrorCode = errno;
|
||||||
cPtr->state = WCDied;
|
cPtr->state = WCDied;
|
||||||
@@ -804,7 +820,6 @@ WMSendConnectionData(WMConnection *cPtr, WMData *data) /*FOLD00*/
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
pos += bytes;
|
pos += bytes;
|
||||||
totalTransfer += bytes;
|
|
||||||
}
|
}
|
||||||
WMDeleteFromArray(cPtr->outputQueue, 0);
|
WMDeleteFromArray(cPtr->outputQueue, 0);
|
||||||
cPtr->bufPos = 0;
|
cPtr->bufPos = 0;
|
||||||
@@ -812,13 +827,18 @@ WMSendConnectionData(WMConnection *cPtr, WMData *data) /*FOLD00*/
|
|||||||
WMDeleteTimerHandler(tPtr->handler);
|
WMDeleteTimerHandler(tPtr->handler);
|
||||||
tPtr->handler = NULL;
|
tPtr->handler = NULL;
|
||||||
}
|
}
|
||||||
|
/*if (cPtr->handler.write) {
|
||||||
|
WMDeleteInputHandler(cPtr->handler.write);
|
||||||
|
cPtr->handler.write = NULL;
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
|
||||||
if (cPtr->handler.write) {
|
if (cPtr->handler.write) {
|
||||||
WMDeleteInputHandler(cPtr->handler.write);
|
WMDeleteInputHandler(cPtr->handler.write);
|
||||||
cPtr->handler.write = NULL;
|
cPtr->handler.write = NULL;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return totalTransfer;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -835,7 +855,7 @@ WMSendConnectionData(WMConnection *cPtr, WMData *data) /*FOLD00*/
|
|||||||
* considered to be an error condition, and will return NULL.
|
* considered to be an error condition, and will return NULL.
|
||||||
*/
|
*/
|
||||||
WMData*
|
WMData*
|
||||||
WMGetConnectionAvailableData(WMConnection *cPtr) /*FOLD00*/
|
WMGetConnectionAvailableData(WMConnection *cPtr)
|
||||||
{
|
{
|
||||||
char buffer[NETBUF_SIZE];
|
char buffer[NETBUF_SIZE];
|
||||||
int nbytes;
|
int nbytes;
|
||||||
@@ -880,7 +900,7 @@ again:
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WMSetConnectionDelegate(WMConnection *cPtr, ConnectionDelegate *delegate) /*FOLD00*/
|
WMSetConnectionDelegate(WMConnection *cPtr, ConnectionDelegate *delegate)
|
||||||
{
|
{
|
||||||
wassertr(cPtr->sock >= 0);
|
wassertr(cPtr->sock >= 0);
|
||||||
/* Don't try to set the delegate multiple times */
|
/* Don't try to set the delegate multiple times */
|
||||||
@@ -898,7 +918,7 @@ WMSetConnectionDelegate(WMConnection *cPtr, ConnectionDelegate *delegate) /*FOLD
|
|||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
Bool
|
Bool
|
||||||
WMIsConnectionNonBlocking(WMConnection *cPtr) /*FOLD00*/
|
WMIsConnectionNonBlocking(WMConnection *cPtr)
|
||||||
{
|
{
|
||||||
#if 1
|
#if 1
|
||||||
int state;
|
int state;
|
||||||
@@ -921,10 +941,12 @@ WMIsConnectionNonBlocking(WMConnection *cPtr) /*FOLD00*/
|
|||||||
|
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
WMSetConnectionNonBlocking(WMConnection *cPtr, Bool flag) /*FOLD00*/
|
WMSetConnectionNonBlocking(WMConnection *cPtr, Bool flag)
|
||||||
{
|
{
|
||||||
wassertrv(cPtr!=NULL && cPtr->sock>=0, False);
|
wassertrv(cPtr!=NULL && cPtr->sock>=0, False);
|
||||||
|
|
||||||
|
flag = ((flag==0) ? 0 : 1);
|
||||||
|
|
||||||
if (cPtr->isNonBlocking == flag)
|
if (cPtr->isNonBlocking == flag)
|
||||||
return True;
|
return True;
|
||||||
|
|
||||||
@@ -942,7 +964,7 @@ WMSetConnectionCloseOnExec(WMConnection *cPtr, Bool flag)
|
|||||||
{
|
{
|
||||||
wassertrv(cPtr!=NULL && cPtr->sock>=0, False);
|
wassertrv(cPtr!=NULL && cPtr->sock>=0, False);
|
||||||
|
|
||||||
if (fcntl(cPtr->sock, F_SETFD, (flag ? FD_CLOEXEC : 0)) < 0) {
|
if (fcntl(cPtr->sock, F_SETFD, ((flag==0) ? 0 : FD_CLOEXEC)) < 0) {
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -950,29 +972,36 @@ WMSetConnectionCloseOnExec(WMConnection *cPtr, Bool flag)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
WMSetConnectionShutdownOnClose(WMConnection *cPtr, Bool flag)
|
||||||
|
{
|
||||||
|
cPtr->shutdownOnClose = ((flag==0) ? 0 : 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void*
|
void*
|
||||||
WMGetConnectionClientData(WMConnection *cPtr) /*FOLD00*/
|
WMGetConnectionClientData(WMConnection *cPtr)
|
||||||
{
|
{
|
||||||
return cPtr->clientData;
|
return cPtr->clientData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WMSetConnectionClientData(WMConnection *cPtr, void *data) /*FOLD00*/
|
WMSetConnectionClientData(WMConnection *cPtr, void *data)
|
||||||
{
|
{
|
||||||
cPtr->clientData = data;
|
cPtr->clientData = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
unsigned int
|
unsigned int
|
||||||
WMGetConnectionFlags(WMConnection *cPtr) /*FOLD00*/
|
WMGetConnectionFlags(WMConnection *cPtr)
|
||||||
{
|
{
|
||||||
return cPtr->uflags;
|
return cPtr->uflags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WMSetConnectionFlags(WMConnection *cPtr, unsigned int flags) /*FOLD00*/
|
WMSetConnectionFlags(WMConnection *cPtr, unsigned int flags)
|
||||||
{
|
{
|
||||||
cPtr->uflags = flags;
|
cPtr->uflags = flags;
|
||||||
}
|
}
|
||||||
@@ -986,7 +1015,7 @@ WMGetConnectionUnsentData(WMConnection *cPtr)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WMSetConnectionDefaultTimeout(unsigned int timeout) /*FOLD00*/
|
WMSetConnectionDefaultTimeout(unsigned int timeout)
|
||||||
{
|
{
|
||||||
if (timeout == 0) {
|
if (timeout == 0) {
|
||||||
DefaultTimeout = DEF_TIMEOUT;
|
DefaultTimeout = DEF_TIMEOUT;
|
||||||
@@ -997,7 +1026,7 @@ WMSetConnectionDefaultTimeout(unsigned int timeout) /*FOLD00*/
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WMSetConnectionOpenTimeout(unsigned int timeout) /*FOLD00*/
|
WMSetConnectionOpenTimeout(unsigned int timeout)
|
||||||
{
|
{
|
||||||
if (timeout == 0) {
|
if (timeout == 0) {
|
||||||
OpenTimeout = DefaultTimeout;
|
OpenTimeout = DefaultTimeout;
|
||||||
@@ -1008,7 +1037,7 @@ WMSetConnectionOpenTimeout(unsigned int timeout) /*FOLD00*/
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WMSetConnectionSendTimeout(WMConnection *cPtr, unsigned int timeout) /*FOLD00*/
|
WMSetConnectionSendTimeout(WMConnection *cPtr, unsigned int timeout)
|
||||||
{
|
{
|
||||||
if (timeout == 0) {
|
if (timeout == 0) {
|
||||||
cPtr->sendTimeout.timeout = DefaultTimeout;
|
cPtr->sendTimeout.timeout = DefaultTimeout;
|
||||||
|
|||||||
+23
-23
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* WINGs WMData function library
|
* WINGs WMData function library
|
||||||
*
|
*
|
||||||
* Copyright (c) 1999-2000 Dan Pascu
|
* Copyright (c) 1999-2003 Dan Pascu
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -40,7 +40,7 @@ typedef struct W_Data {
|
|||||||
/* Creating and destroying data objects */
|
/* Creating and destroying data objects */
|
||||||
|
|
||||||
WMData*
|
WMData*
|
||||||
WMCreateDataWithCapacity(unsigned capacity) /*FOLD00*/
|
WMCreateDataWithCapacity(unsigned capacity)
|
||||||
{
|
{
|
||||||
WMData *aData;
|
WMData *aData;
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@ WMCreateDataWithCapacity(unsigned capacity) /*FOLD00*/
|
|||||||
|
|
||||||
|
|
||||||
WMData*
|
WMData*
|
||||||
WMCreateDataWithLength(unsigned length) /*FOLD00*/
|
WMCreateDataWithLength(unsigned length)
|
||||||
{
|
{
|
||||||
WMData *aData;
|
WMData *aData;
|
||||||
|
|
||||||
@@ -78,7 +78,7 @@ WMCreateDataWithLength(unsigned length) /*FOLD00*/
|
|||||||
|
|
||||||
|
|
||||||
WMData*
|
WMData*
|
||||||
WMCreateDataWithBytes(void *bytes, unsigned length) /*FOLD00*/
|
WMCreateDataWithBytes(void *bytes, unsigned length)
|
||||||
{
|
{
|
||||||
WMData *aData;
|
WMData *aData;
|
||||||
|
|
||||||
@@ -91,7 +91,7 @@ WMCreateDataWithBytes(void *bytes, unsigned length) /*FOLD00*/
|
|||||||
|
|
||||||
|
|
||||||
WMData*
|
WMData*
|
||||||
WMCreateDataWithBytesNoCopy(void *bytes, unsigned length, /*FOLD00*/
|
WMCreateDataWithBytesNoCopy(void *bytes, unsigned length,
|
||||||
WMFreeDataProc *destructor)
|
WMFreeDataProc *destructor)
|
||||||
{
|
{
|
||||||
WMData *aData;
|
WMData *aData;
|
||||||
@@ -110,7 +110,7 @@ WMCreateDataWithBytesNoCopy(void *bytes, unsigned length, /*FOLD00*/
|
|||||||
|
|
||||||
|
|
||||||
WMData*
|
WMData*
|
||||||
WMCreateDataWithData(WMData *aData) /*FOLD00*/
|
WMCreateDataWithData(WMData *aData)
|
||||||
{
|
{
|
||||||
WMData *newData;
|
WMData *newData;
|
||||||
|
|
||||||
@@ -126,7 +126,7 @@ WMCreateDataWithData(WMData *aData) /*FOLD00*/
|
|||||||
|
|
||||||
|
|
||||||
WMData*
|
WMData*
|
||||||
WMRetainData(WMData *aData) /*FOLD00*/
|
WMRetainData(WMData *aData)
|
||||||
{
|
{
|
||||||
aData->retainCount++;
|
aData->retainCount++;
|
||||||
return aData;
|
return aData;
|
||||||
@@ -134,7 +134,7 @@ WMRetainData(WMData *aData) /*FOLD00*/
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WMReleaseData(WMData *aData) /*FOLD00*/
|
WMReleaseData(WMData *aData)
|
||||||
{
|
{
|
||||||
aData->retainCount--;
|
aData->retainCount--;
|
||||||
if (aData->retainCount > 0)
|
if (aData->retainCount > 0)
|
||||||
@@ -150,7 +150,7 @@ WMReleaseData(WMData *aData) /*FOLD00*/
|
|||||||
/* Adjusting capacity */
|
/* Adjusting capacity */
|
||||||
|
|
||||||
void
|
void
|
||||||
WMSetDataCapacity(WMData *aData, unsigned capacity) /*FOLD00*/
|
WMSetDataCapacity(WMData *aData, unsigned capacity)
|
||||||
{
|
{
|
||||||
if (aData->capacity != capacity) {
|
if (aData->capacity != capacity) {
|
||||||
aData->bytes = wrealloc(aData->bytes, capacity);
|
aData->bytes = wrealloc(aData->bytes, capacity);
|
||||||
@@ -164,7 +164,7 @@ WMSetDataCapacity(WMData *aData, unsigned capacity) /*FOLD00*/
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WMSetDataLength(WMData *aData, unsigned length) /*FOLD00*/
|
WMSetDataLength(WMData *aData, unsigned length)
|
||||||
{
|
{
|
||||||
if (length > aData->capacity) {
|
if (length > aData->capacity) {
|
||||||
WMSetDataCapacity(aData, length);
|
WMSetDataCapacity(aData, length);
|
||||||
@@ -185,7 +185,7 @@ WMSetDataFormat(WMData *aData, unsigned format)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WMIncreaseDataLengthBy(WMData *aData, unsigned extraLength) /*FOLD00*/
|
WMIncreaseDataLengthBy(WMData *aData, unsigned extraLength)
|
||||||
{
|
{
|
||||||
WMSetDataLength(aData, aData->length + extraLength);
|
WMSetDataLength(aData, aData->length + extraLength);
|
||||||
}
|
}
|
||||||
@@ -194,14 +194,14 @@ WMIncreaseDataLengthBy(WMData *aData, unsigned extraLength) /*FOLD00*/
|
|||||||
/* Accessing data */
|
/* Accessing data */
|
||||||
|
|
||||||
const void*
|
const void*
|
||||||
WMDataBytes(WMData *aData) /*FOLD00*/
|
WMDataBytes(WMData *aData)
|
||||||
{
|
{
|
||||||
return aData->bytes;
|
return aData->bytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WMGetDataBytes(WMData *aData, void *buffer) /*FOLD00*/
|
WMGetDataBytes(WMData *aData, void *buffer)
|
||||||
{
|
{
|
||||||
wassertr(aData->length > 0);
|
wassertr(aData->length > 0);
|
||||||
|
|
||||||
@@ -217,7 +217,7 @@ WMGetDataFormat(WMData *aData)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WMGetDataBytesWithLength(WMData *aData, void *buffer, unsigned length) /*FOLD00*/
|
WMGetDataBytesWithLength(WMData *aData, void *buffer, unsigned length)
|
||||||
{
|
{
|
||||||
wassertr(aData->length > 0);
|
wassertr(aData->length > 0);
|
||||||
wassertr(length <= aData->length);
|
wassertr(length <= aData->length);
|
||||||
@@ -227,7 +227,7 @@ WMGetDataBytesWithLength(WMData *aData, void *buffer, unsigned length) /*FOLD00*
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WMGetDataBytesWithRange(WMData *aData, void *buffer, WMRange aRange) /*FOLD00*/
|
WMGetDataBytesWithRange(WMData *aData, void *buffer, WMRange aRange)
|
||||||
{
|
{
|
||||||
wassertr(aRange.position < aData->length);
|
wassertr(aRange.position < aData->length);
|
||||||
wassertr(aRange.count <= aData->length-aRange.position);
|
wassertr(aRange.count <= aData->length-aRange.position);
|
||||||
@@ -238,7 +238,7 @@ WMGetDataBytesWithRange(WMData *aData, void *buffer, WMRange aRange) /*FOLD00*/
|
|||||||
|
|
||||||
|
|
||||||
WMData*
|
WMData*
|
||||||
WMGetSubdataWithRange(WMData *aData, WMRange aRange) /*FOLD00*/
|
WMGetSubdataWithRange(WMData *aData, WMRange aRange)
|
||||||
{
|
{
|
||||||
void *buffer;
|
void *buffer;
|
||||||
WMData *newData;
|
WMData *newData;
|
||||||
@@ -258,7 +258,7 @@ WMGetSubdataWithRange(WMData *aData, WMRange aRange) /*FOLD00*/
|
|||||||
/* Testing data */
|
/* Testing data */
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
WMIsDataEqualToData(WMData *aData, WMData *anotherData) /*FOLD00*/
|
WMIsDataEqualToData(WMData *aData, WMData *anotherData)
|
||||||
{
|
{
|
||||||
if (aData->length != anotherData->length)
|
if (aData->length != anotherData->length)
|
||||||
return False;
|
return False;
|
||||||
@@ -271,7 +271,7 @@ WMIsDataEqualToData(WMData *aData, WMData *anotherData) /*FOLD00*/
|
|||||||
|
|
||||||
|
|
||||||
unsigned
|
unsigned
|
||||||
WMGetDataLength(WMData *aData) /*FOLD00*/
|
WMGetDataLength(WMData *aData)
|
||||||
{
|
{
|
||||||
return aData->length;
|
return aData->length;
|
||||||
}
|
}
|
||||||
@@ -279,7 +279,7 @@ WMGetDataLength(WMData *aData) /*FOLD00*/
|
|||||||
|
|
||||||
/* Adding data */
|
/* Adding data */
|
||||||
void
|
void
|
||||||
WMAppendDataBytes(WMData *aData, void *bytes, unsigned length) /*FOLD00*/
|
WMAppendDataBytes(WMData *aData, void *bytes, unsigned length)
|
||||||
{
|
{
|
||||||
unsigned oldLength = aData->length;
|
unsigned oldLength = aData->length;
|
||||||
unsigned newLength = oldLength + length;
|
unsigned newLength = oldLength + length;
|
||||||
@@ -303,7 +303,7 @@ WMAppendDataBytes(WMData *aData, void *bytes, unsigned length) /*FOLD00*/
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WMAppendData(WMData *aData, WMData *anotherData) /*FOLD00*/
|
WMAppendData(WMData *aData, WMData *anotherData)
|
||||||
{
|
{
|
||||||
if (anotherData->length > 0)
|
if (anotherData->length > 0)
|
||||||
WMAppendDataBytes(aData, anotherData->bytes, anotherData->length);
|
WMAppendDataBytes(aData, anotherData->bytes, anotherData->length);
|
||||||
@@ -314,7 +314,7 @@ WMAppendData(WMData *aData, WMData *anotherData) /*FOLD00*/
|
|||||||
/* Modifying data */
|
/* Modifying data */
|
||||||
|
|
||||||
void
|
void
|
||||||
WMReplaceDataBytesInRange(WMData *aData, WMRange aRange, void *bytes) /*FOLD00*/
|
WMReplaceDataBytesInRange(WMData *aData, WMRange aRange, void *bytes)
|
||||||
{
|
{
|
||||||
wassertr(aRange.position < aData->length);
|
wassertr(aRange.position < aData->length);
|
||||||
wassertr(aRange.count <= aData->length-aRange.position);
|
wassertr(aRange.count <= aData->length-aRange.position);
|
||||||
@@ -324,7 +324,7 @@ WMReplaceDataBytesInRange(WMData *aData, WMRange aRange, void *bytes) /*FOLD00*/
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WMResetDataBytesInRange(WMData *aData, WMRange aRange) /*FOLD00*/
|
WMResetDataBytesInRange(WMData *aData, WMRange aRange)
|
||||||
{
|
{
|
||||||
wassertr(aRange.position < aData->length);
|
wassertr(aRange.position < aData->length);
|
||||||
wassertr(aRange.count <= aData->length-aRange.position);
|
wassertr(aRange.count <= aData->length-aRange.position);
|
||||||
@@ -334,7 +334,7 @@ WMResetDataBytesInRange(WMData *aData, WMRange aRange) /*FOLD00*/
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WMSetData(WMData *aData, WMData *anotherData) /*FOLD00*/
|
WMSetData(WMData *aData, WMData *anotherData)
|
||||||
{
|
{
|
||||||
unsigned length = anotherData->length;
|
unsigned length = anotherData->length;
|
||||||
|
|
||||||
|
|||||||
+20
-16
@@ -94,38 +94,44 @@ WMUnregisterViewDraggedTypes(WMView *view)
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
|
|
||||||
|
|
||||||
static unsigned defDraggingEntered(WMView *self, WMDraggingInfo *info)
|
static unsigned
|
||||||
|
defDraggingEntered(WMView *self, WMDraggingInfo *info)
|
||||||
{
|
{
|
||||||
printf("%x drag entered\n", W_VIEW_DRAWABLE(self));
|
printf("%x drag entered\n", W_VIEW_DRAWABLE(self));
|
||||||
return WDOperationNone;
|
return WDOperationNone;
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned defDraggingUpdated(WMView *self, WMDraggingInfo *info)
|
static unsigned
|
||||||
|
defDraggingUpdated(WMView *self, WMDraggingInfo *info)
|
||||||
{
|
{
|
||||||
printf("%x drag updat\n", W_VIEW_DRAWABLE(self));
|
printf("%x drag update\n", W_VIEW_DRAWABLE(self));
|
||||||
return WDOperationNone;
|
return WDOperationNone;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void defDraggingExited(WMView *self, WMDraggingInfo *info)
|
static void
|
||||||
|
defDraggingExited(WMView *self, WMDraggingInfo *info)
|
||||||
{
|
{
|
||||||
printf("%x drag exit\n", W_VIEW_DRAWABLE(self));
|
printf("%x drag exit\n", W_VIEW_DRAWABLE(self));
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool defPrepareForDragOperation(WMView *self, WMDraggingInfo *info)
|
static Bool
|
||||||
|
defPrepareForDragOperation(WMView *self, WMDraggingInfo *info)
|
||||||
{
|
{
|
||||||
printf("%x drag prep\n", W_VIEW_DRAWABLE(self));
|
printf("%x drag prepare\n", W_VIEW_DRAWABLE(self));
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool defPerformDragOperation(WMView *self, WMDraggingInfo *info)
|
static Bool
|
||||||
|
defPerformDragOperation(WMView *self, WMDraggingInfo *info)
|
||||||
{
|
{
|
||||||
printf("%x drag perf\n", W_VIEW_DRAWABLE(self));
|
printf("%x drag perform\n", W_VIEW_DRAWABLE(self));
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void defConcludeDragOperation(WMView *self, WMDraggingInfo *info)
|
static void
|
||||||
|
defConcludeDragOperation(WMView *self, WMDraggingInfo *info)
|
||||||
{
|
{
|
||||||
printf("%x drag concl\n", W_VIEW_DRAWABLE(self));
|
printf("%x drag conclude\n", W_VIEW_DRAWABLE(self));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -166,11 +172,8 @@ WMSetViewDragDestinationProcs(WMView *view, WMDragDestinationProcs *procs)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
WMPoint
|
||||||
|
WMGetDraggingInfoImageLocation(WMDraggingInfo *info)
|
||||||
|
|
||||||
|
|
||||||
WMPoint WMGetDraggingInfoImageLocation(WMDraggingInfo *info)
|
|
||||||
{
|
{
|
||||||
return info->imageLocation;
|
return info->imageLocation;
|
||||||
}
|
}
|
||||||
@@ -186,7 +189,8 @@ receivedData(WMView *view, Atom selection, Atom target, Time timestamp,
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Bool WMRequestDroppedData(WMView *view, WMDraggingInfo *info, char *type,
|
Bool
|
||||||
|
WMRequestDroppedData(WMView *view, WMDraggingInfo *info, char *type,
|
||||||
WMDropDataCallback *callback)
|
WMDropDataCallback *callback)
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
|
|||||||
+9
-5
@@ -31,23 +31,27 @@ static Bool _XErrorOccured = False;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
static unsigned defDraggingSourceOperation(WMView *self, Bool local)
|
static unsigned
|
||||||
|
defDraggingSourceOperation(WMView *self, Bool local)
|
||||||
{
|
{
|
||||||
return WDOperationCopy;
|
return WDOperationCopy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void defBeganDragImage(WMView *self, WMPixmap *image, WMPoint point)
|
static void
|
||||||
|
defBeganDragImage(WMView *self, WMPixmap *image, WMPoint point)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void defEndedDragImage(WMView *self, WMPixmap *image, WMPoint point,
|
static void
|
||||||
Bool deposited)
|
defEndedDragImage(WMView *self, WMPixmap *image, WMPoint point, Bool deposited)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static WMData* defFetchDragData(WMView *self, char *type)
|
|
||||||
|
static WMData*
|
||||||
|
defFetchDragData(WMView *self, char *type)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Window Maker miscelaneous function library
|
* Window Maker miscelaneous function library
|
||||||
*
|
*
|
||||||
* Copyright (c) 1997 Alfredo K. Kojima
|
* Copyright (c) 1997-2003 Alfredo K. Kojima
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+33
-10
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Window Maker miscelaneous function library
|
* Window Maker miscelaneous function library
|
||||||
*
|
*
|
||||||
* Copyright (c) 1997 Alfredo K. Kojima
|
* Copyright (c) 1997-2003 Alfredo K. Kojima
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -160,6 +160,27 @@ wexpandpath(char *path)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* return address of next char != tok or end of string whichever comes first */
|
||||||
|
static char*
|
||||||
|
skipchar(char *string, char tok)
|
||||||
|
{
|
||||||
|
while(*string!=0 && *string==tok)
|
||||||
|
string++;
|
||||||
|
|
||||||
|
return string;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* return address of next char == tok or end of string whichever comes first */
|
||||||
|
static char*
|
||||||
|
nextchar(char *string, char tok)
|
||||||
|
{
|
||||||
|
while(*string!=0 && *string!=tok)
|
||||||
|
string++;
|
||||||
|
|
||||||
|
return string;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*----------------------------------------------------------------------
|
*----------------------------------------------------------------------
|
||||||
@@ -180,15 +201,14 @@ char*
|
|||||||
wfindfile(char *paths, char *file)
|
wfindfile(char *paths, char *file)
|
||||||
{
|
{
|
||||||
char *path;
|
char *path;
|
||||||
char *tmp;
|
char *tmp, *tmp2;
|
||||||
int done;
|
|
||||||
int len, flen;
|
int len, flen;
|
||||||
char *fullpath;
|
char *fullpath;
|
||||||
|
|
||||||
if (!file)
|
if (!file)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (*file=='/' || *file=='~' || *file=='$' || !paths) {
|
if (*file=='/' || *file=='~' || *file=='$' || !paths || *paths==0) {
|
||||||
if (access(file, F_OK)<0) {
|
if (access(file, F_OK)<0) {
|
||||||
fullpath = wexpandpath(file);
|
fullpath = wexpandpath(file);
|
||||||
if (!fullpath)
|
if (!fullpath)
|
||||||
@@ -207,13 +227,16 @@ wfindfile(char *paths, char *file)
|
|||||||
|
|
||||||
flen = strlen(file);
|
flen = strlen(file);
|
||||||
tmp = paths;
|
tmp = paths;
|
||||||
done = 0;
|
while (*tmp) {
|
||||||
while (!done) {
|
tmp = skipchar(tmp, ':');
|
||||||
len = strcspn(tmp, ":");
|
if (*tmp==0)
|
||||||
if (len==0) done=1;
|
break;
|
||||||
|
tmp2 = nextchar(tmp, ':');
|
||||||
|
len = tmp2 - tmp;
|
||||||
path = wmalloc(len+flen+2);
|
path = wmalloc(len+flen+2);
|
||||||
path = memcpy(path, tmp, len);
|
path = memcpy(path, tmp, len);
|
||||||
path[len]=0;
|
path[len]=0;
|
||||||
|
if (path[len-1] != '/')
|
||||||
strcat(path, "/");
|
strcat(path, "/");
|
||||||
strcat(path, file);
|
strcat(path, file);
|
||||||
fullpath = wexpandpath(path);
|
fullpath = wexpandpath(path);
|
||||||
@@ -224,9 +247,9 @@ wfindfile(char *paths, char *file)
|
|||||||
}
|
}
|
||||||
wfree(fullpath);
|
wfree(fullpath);
|
||||||
}
|
}
|
||||||
tmp=&(tmp[len+1]);
|
tmp = tmp2;
|
||||||
if (*tmp==0) break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -603,7 +603,6 @@ W_HandleInputEvents(Bool waitForInput, int inputfd)
|
|||||||
|
|
||||||
W_FlushASAPNotificationQueue();
|
W_FlushASAPNotificationQueue();
|
||||||
|
|
||||||
/* --oldway-- return ((inputfd < 0) ? (count > 0) : FD_ISSET(inputfd, &rset));*/
|
|
||||||
return (count > 0);
|
return (count > 0);
|
||||||
#else /* not HAVE_SELECT, not HAVE_POLL */
|
#else /* not HAVE_SELECT, not HAVE_POLL */
|
||||||
Neither select nor poll. You lose.
|
Neither select nor poll. You lose.
|
||||||
|
|||||||
+1
-1
@@ -148,7 +148,7 @@ WMResetHashTable(WMHashTable *table)
|
|||||||
item = table->table[i];
|
item = table->table[i];
|
||||||
while (item) {
|
while (item) {
|
||||||
tmp = item->next;
|
tmp = item->next;
|
||||||
RELKEY(table, item);
|
RELKEY(table, item->key);
|
||||||
wfree(item);
|
wfree(item);
|
||||||
item = tmp;
|
item = tmp;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* WINGs WMHost function library
|
* WINGs WMHost function library
|
||||||
*
|
*
|
||||||
* Copyright (c) 1999-2001 Dan Pascu
|
* Copyright (c) 1999-2003 Dan Pascu
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -213,7 +213,7 @@ WMReleaseHost(WMHost *hPtr)
|
|||||||
void
|
void
|
||||||
WMSetHostCacheEnabled(Bool flag)
|
WMSetHostCacheEnabled(Bool flag)
|
||||||
{
|
{
|
||||||
hostCacheEnabled = flag;
|
hostCacheEnabled = ((flag==0) ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Window Maker miscelaneous function library
|
* Window Maker miscelaneous function library
|
||||||
*
|
*
|
||||||
* Copyright (c) 1997 Alfredo K. Kojima
|
* Copyright (c) 1997-2003 Alfredo K. Kojima
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
+3
-2
@@ -1,3 +1,4 @@
|
|||||||
Makefile Makefile.in
|
Makefile Makefile.in
|
||||||
.psrc .inslog2 tca.map tca.log
|
.psrc .inslog2 tca.map tca.log pchdir *.rpt
|
||||||
*.rpt
|
*.pot
|
||||||
|
*.mo
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ CATALOGS = @WINGSMOFILES@
|
|||||||
|
|
||||||
CLEANFILES = $(CATALOGS) WINGs.pot
|
CLEANFILES = $(CATALOGS) WINGs.pot
|
||||||
|
|
||||||
EXTRA_DIST = cs.po sk.po
|
EXTRA_DIST = bg.po ca.po cs.po de.po fr.po sk.po
|
||||||
|
|
||||||
POTFILES = \
|
POTFILES = \
|
||||||
$(top_builddir)/WINGs/connection.c \
|
$(top_builddir)/WINGs/connection.c \
|
||||||
@@ -27,6 +27,8 @@ SUFFIXES = .po .mo
|
|||||||
msgfmt -o $@ $<
|
msgfmt -o $@ $<
|
||||||
|
|
||||||
|
|
||||||
|
all-local: $(CATALOGS)
|
||||||
|
|
||||||
WINGs.pot: $(POTFILES)
|
WINGs.pot: $(POTFILES)
|
||||||
xgettext --default-domain=WINGs \
|
xgettext --default-domain=WINGs \
|
||||||
--add-comments --keyword=_ $(POTFILES)
|
--add-comments --keyword=_ $(POTFILES)
|
||||||
|
|||||||
+5
-1
@@ -4,9 +4,13 @@ in the top of the WindowMaker source tree.
|
|||||||
|
|
||||||
File Language Note Current Maintainer
|
File Language Note Current Maintainer
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
ca.po Catalan Ernest Adrogué <eadrogue@gmx.net>
|
||||||
cs.po Czech 1 Jiri Hnidek <Jiri.Hnidek@vslib.cz
|
cs.po Czech 1 Jiri Hnidek <Jiri.Hnidek@vslib.cz
|
||||||
|
de.po German 1 Guido Scholz <guido.scholz@bayernline.de>
|
||||||
|
fr.po French Emmanuel Benoit <tseeker@neptune.fr>
|
||||||
|
Antoine Hulin <antoine@origan.fdn.org>
|
||||||
sk.po Slovak 1 Jan 'judas' Tomka <judas@linux.sk>
|
sk.po Slovak 1 Jan 'judas' Tomka <judas@linux.sk>
|
||||||
|
bg.po Bulgarian Anton Zinoviev <zinoviev@debian.org>
|
||||||
|
|
||||||
Notes
|
Notes
|
||||||
-----
|
-----
|
||||||
|
|||||||
+660
@@ -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=CP1251\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 öîëà"
|
||||||
+675
@@ -0,0 +1,675 @@
|
|||||||
|
# Catalan messages for WINGs.
|
||||||
|
# Copyright (C) 2003 Free Software Foundation, Inc.
|
||||||
|
# This file is distributed under the same license as GNU Window Maker.
|
||||||
|
# Ernest Adrogué <eadrogue@gmx.net>, 2003.
|
||||||
|
#
|
||||||
|
# Version history:
|
||||||
|
# WM-ver author email date
|
||||||
|
# 0.80.2 Ernest Adrogué eadrogue@gmx.net 23 Feb 2003
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: WINGs 0.80.2\n"
|
||||||
|
"POT-Creation-Date: 2003-02-23 16:54+0100\n"
|
||||||
|
"PO-Revision-Date: 2002-12-06 14:15+0100\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=iso-8859-1\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 "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ó d'usuari per 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ó d'usuari per l'usuari %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/host.c:114
|
||||||
|
msgid "Cannot get current host name"
|
||||||
|
msgstr "No s'ha pogut obtenir el nom de host actual"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:91
|
||||||
|
#, c-format
|
||||||
|
msgid "syntax error in %s %s, line %i: %s"
|
||||||
|
msgstr "error de sintaxi en %s %s, línia %i: %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:150
|
||||||
|
msgid "Only string or data is supported for a proplist dictionary key"
|
||||||
|
msgstr ""
|
||||||
|
"Les entrades de diccionari PropList només poden 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 analitzant l'entrada PropList de diccionari"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:811
|
||||||
|
msgid "missing = in PropList dictionary entry"
|
||||||
|
msgstr "falta un \"=\" a l'entrada de diccionari PropList"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:819
|
||||||
|
msgid "error parsing PropList dictionary entry value"
|
||||||
|
msgstr "error analitzant el valor de l'entrada de diccionari PropList"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:827
|
||||||
|
msgid "missing ; in PropList dictionary entry"
|
||||||
|
msgstr "falta un \";\" en l'entrada de diccionari PropList"
|
||||||
|
|
||||||
|
#: ../../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 Window Maker."
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1563 ../../WINGs/proplist.c:1628
|
||||||
|
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:1618
|
||||||
|
#, c-format
|
||||||
|
msgid "error reading from file '%s'"
|
||||||
|
msgstr "error llegint el fitxer \"%s\""
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1669
|
||||||
|
#, c-format
|
||||||
|
msgid "mkstemp (%s) failed"
|
||||||
|
msgstr "la rutina mkstemp (%s) ha fallat"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1680
|
||||||
|
#, c-format
|
||||||
|
msgid "mktemp (%s) failed"
|
||||||
|
msgstr "la rutina mktemp (%s) ha fallat"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1691
|
||||||
|
#, c-format
|
||||||
|
msgid "open (%s) failed"
|
||||||
|
msgstr "la rutina open (%s) ha fallat"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1698
|
||||||
|
#, c-format
|
||||||
|
msgid "writing to file: %s failed"
|
||||||
|
msgstr "l'escriptura del fitxer \"%s\" ha fallat"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1706
|
||||||
|
#, c-format
|
||||||
|
msgid "fclose (%s) failed"
|
||||||
|
msgstr "la rutina fclose (%s) ha fallat"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1715
|
||||||
|
#, 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:192 ../../WINGs/userdefaults.c:208
|
||||||
|
#, 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:198 ../../WINGs/wcolor.c:211 ../../WINGs/wcolor.c:250
|
||||||
|
#: ../../WINGs/wcolor.c:291
|
||||||
|
#, c-format
|
||||||
|
msgid "could not allocate %s color"
|
||||||
|
msgstr "no s'ha pogut assignar espai pel color \"%s\""
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolor.c:198
|
||||||
|
msgid "white"
|
||||||
|
msgstr "blanc"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolor.c:211
|
||||||
|
msgid "black"
|
||||||
|
msgstr "negre"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolor.c:250
|
||||||
|
msgid "gray"
|
||||||
|
msgstr "gris"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolor.c:291
|
||||||
|
msgid "dark gray"
|
||||||
|
msgstr "gris fosc"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:415
|
||||||
|
msgid "Colors"
|
||||||
|
msgstr "Colors"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:605 ../../WINGs/wcolorpanel.c:2824
|
||||||
|
msgid "Brightness"
|
||||||
|
msgstr "Claror"
|
||||||
|
|
||||||
|
#: ../../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 "Panell de color: No s'ha pogut assignar memòria"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:680 ../../WINGs/wcolorpanel.c:681
|
||||||
|
msgid "Red"
|
||||||
|
msgstr "Roig"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:713 ../../WINGs/wcolorpanel.c:714
|
||||||
|
msgid "Green"
|
||||||
|
msgstr "Verd"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:747 ../../WINGs/wcolorpanel.c:748
|
||||||
|
msgid "Blue"
|
||||||
|
msgstr "Blau"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:807 ../../WINGs/wcolorpanel.c:808
|
||||||
|
msgid "Cyan"
|
||||||
|
msgstr "Cian"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:841 ../../WINGs/wcolorpanel.c:842
|
||||||
|
msgid "Magenta"
|
||||||
|
msgstr "Magenta"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:875 ../../WINGs/wcolorpanel.c:876
|
||||||
|
msgid "Yellow"
|
||||||
|
msgstr "Groc"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:910 ../../WINGs/wcolorpanel.c:911
|
||||||
|
msgid "Black"
|
||||||
|
msgstr "Negre"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:991
|
||||||
|
msgid "Spectrum"
|
||||||
|
msgstr "Espectre"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1021
|
||||||
|
msgid "Palette"
|
||||||
|
msgstr "Paleta"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1027
|
||||||
|
msgid "New from File..."
|
||||||
|
msgstr "Obté d'un fitxer..."
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1028 ../../WINGs/wcolorpanel.c:1076
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1093
|
||||||
|
msgid "Rename..."
|
||||||
|
msgstr "Reanomena..."
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1029 ../../WINGs/wcolorpanel.c:1077
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1094 ../../WINGs/wcolorpanel.c:3321
|
||||||
|
msgid "Remove"
|
||||||
|
msgstr "Elimina"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1030
|
||||||
|
msgid "Copy"
|
||||||
|
msgstr "Copia"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1031
|
||||||
|
msgid "New from Clipboard"
|
||||||
|
msgstr "Obté del porta-retalls..."
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1052
|
||||||
|
msgid "X11-Colors"
|
||||||
|
msgstr "Colors-X11"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1069
|
||||||
|
msgid "Color"
|
||||||
|
msgstr "Color"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1075
|
||||||
|
msgid "Add..."
|
||||||
|
msgstr "Afegeix..."
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1085
|
||||||
|
msgid "List"
|
||||||
|
msgstr "Llista"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1092
|
||||||
|
msgid "New..."
|
||||||
|
msgstr "Nou..."
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1231
|
||||||
|
#, 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:1237 ../../WINGs/wcolorpanel.c:3207
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3211
|
||||||
|
msgid "File Error"
|
||||||
|
msgstr "Error de fitxer"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1238
|
||||||
|
msgid "Could not create ColorPanel configuration directory"
|
||||||
|
msgstr "No s'ha pogut crear el directori de configuració del Panell de color"
|
||||||
|
|
||||||
|
#: ../../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 "D'acord"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1245 ../../WINGs/wcolorpanel.c:1281
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1299
|
||||||
|
msgid "Color Panel: Could not find file"
|
||||||
|
msgstr "Panell de color: No s'ha trobat el fitxer"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1486 ../../WINGs/wcolorpanel.c:1551
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1615
|
||||||
|
msgid "Color Panel: X failed request"
|
||||||
|
msgstr "Panell de color: petició X fallida"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:2860
|
||||||
|
msgid "Saturation"
|
||||||
|
msgstr "Saturació"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:2896
|
||||||
|
msgid "Hue"
|
||||||
|
msgstr "Matís"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3146
|
||||||
|
msgid "Open Palette"
|
||||||
|
msgstr "Obrir paleta"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3208
|
||||||
|
msgid "Invalid file format !"
|
||||||
|
msgstr "El format del fitxer no és vàlid !"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3210
|
||||||
|
#, c-format
|
||||||
|
msgid "can't remove file %s"
|
||||||
|
msgstr "no s'ha pogut eliminar el fitxer \"%s\""
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3212
|
||||||
|
msgid "Couldn't remove file from Configuration Directory !"
|
||||||
|
msgstr "No s'ha pogut eliminar el fitxer del directori de configuració !"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3239
|
||||||
|
msgid "Rename"
|
||||||
|
msgstr "Reanomena"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3239
|
||||||
|
msgid "Rename palette to:"
|
||||||
|
msgstr "Reanomenar la paleta a:"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3240 ../../WINGs/wfilepanel.c:259
|
||||||
|
#: ../../WINGs/wfilepanel.c:659 ../../WINGs/wfilepanel.c:760
|
||||||
|
msgid "Cancel"
|
||||||
|
msgstr "Cancel·la"
|
||||||
|
|
||||||
|
#. Careful, this palette exists already
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3256 ../../WINGs/wfilepanel.c:760
|
||||||
|
msgid "Warning"
|
||||||
|
msgstr "Atenció"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3257
|
||||||
|
msgid ""
|
||||||
|
"Palette already exists !\n"
|
||||||
|
"\n"
|
||||||
|
"Overwrite ?"
|
||||||
|
msgstr ""
|
||||||
|
"La paleta existeix!\n"
|
||||||
|
"\n"
|
||||||
|
"La voleu sobreescriure?"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3257 ../../WINGs/wcolorpanel.c:3321
|
||||||
|
msgid "No"
|
||||||
|
msgstr "No"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3257 ../../WINGs/wcolorpanel.c:3321
|
||||||
|
msgid "Yes"
|
||||||
|
msgstr "Sí"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3289
|
||||||
|
#, c-format
|
||||||
|
msgid "Couldn't rename palette %s to %s\n"
|
||||||
|
msgstr "No s'ha pogut reanomenar la paleta %s a %s\n"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3315
|
||||||
|
msgid "This will permanently remove the palette "
|
||||||
|
msgstr "Això eliminarà la paleta per sempre "
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3318
|
||||||
|
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:3343
|
||||||
|
#, c-format
|
||||||
|
msgid "Couldn't remove palette %s\n"
|
||||||
|
msgstr "No s'ha pogut eliminar la paleta %s\n"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3648
|
||||||
|
#, c-format
|
||||||
|
msgid "Could not open %s"
|
||||||
|
msgstr "No s'ha pogut obrir %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3655
|
||||||
|
#, c-format
|
||||||
|
msgid "Could not create %s"
|
||||||
|
msgstr "No s'ha pogut crear %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3666
|
||||||
|
#, c-format
|
||||||
|
msgid "Write error on file %s"
|
||||||
|
msgstr "Error d'escriptura en el fitxer %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3711
|
||||||
|
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:562
|
||||||
|
#, c-format
|
||||||
|
msgid "WINGs: could not open directory %s\n"
|
||||||
|
msgstr "WINGs: no s'ha pogut obrir el directori %s\n"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:580
|
||||||
|
#, c-format
|
||||||
|
msgid "WINGs: could not stat %s\n"
|
||||||
|
msgstr "WINGs: no s'ha pogut determinar l'estat de %s\n"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:647 ../../WINGs/wfilepanel.c:970
|
||||||
|
#: ../../WINGs/wfontpanel.c:708
|
||||||
|
msgid "Error"
|
||||||
|
msgstr "Error"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:658
|
||||||
|
msgid "Create Directory"
|
||||||
|
msgstr "Crear directori"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:659
|
||||||
|
msgid "Enter directory name"
|
||||||
|
msgstr "Entreu el nom del directori"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:695 ../../WINGs/wfilepanel.c:734
|
||||||
|
#: ../../WINGs/wfilepanel.c:765 ../../WINGs/wfilepanel.c:793
|
||||||
|
msgid "Permission denied."
|
||||||
|
msgstr "Permís denegat."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:698
|
||||||
|
#, c-format
|
||||||
|
msgid "'%s' already exists."
|
||||||
|
msgstr "\"%s\" existia prèviament."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:701
|
||||||
|
msgid "Path does not exist."
|
||||||
|
msgstr "El camí no existeix."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:731 ../../WINGs/wfilepanel.c:790
|
||||||
|
#, c-format
|
||||||
|
msgid "'%s' does not exist."
|
||||||
|
msgstr "\"%s\" no existeix."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:738 ../../WINGs/wfilepanel.c:797
|
||||||
|
msgid "Insufficient memory available."
|
||||||
|
msgstr "No hi ha prou memòria disponible."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:742 ../../WINGs/wfilepanel.c:801
|
||||||
|
#, 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:745 ../../WINGs/wfilepanel.c:777
|
||||||
|
#: ../../WINGs/wfilepanel.c:804
|
||||||
|
#, c-format
|
||||||
|
msgid "Can not delete '%s'."
|
||||||
|
msgstr "No s'ha pogut eliminar \"%s\"."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:752
|
||||||
|
#, c-format
|
||||||
|
msgid "Delete directory %s ?"
|
||||||
|
msgstr "Eliminar el directori %s ?"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:756
|
||||||
|
#, c-format
|
||||||
|
msgid "Delete file %s ?"
|
||||||
|
msgstr "Eliminar el fitxer %s ?"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:768
|
||||||
|
#, c-format
|
||||||
|
msgid "Directory '%s' does not exist."
|
||||||
|
msgstr "El directori \"%s\" no existeix."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:771
|
||||||
|
#, c-format
|
||||||
|
msgid "Directory '%s' is not empty."
|
||||||
|
msgstr "El directori \"%s\" no està buit."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:774
|
||||||
|
#, c-format
|
||||||
|
msgid "Directory '%s' is busy."
|
||||||
|
msgstr "El directori \"%s\" es troba ocupat."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:787
|
||||||
|
#, c-format
|
||||||
|
msgid "'%s' is a directory."
|
||||||
|
msgstr "\"%s\" és un directori."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:829
|
||||||
|
#, c-format
|
||||||
|
msgid "An error occured browsing '%s'."
|
||||||
|
msgstr "S'ha produït un error mentre s'explorava \"%s\"."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:833
|
||||||
|
#, c-format
|
||||||
|
msgid "'%s' is not a directory."
|
||||||
|
msgstr "\"%s\" no és un directori."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:970
|
||||||
|
msgid "File does not exist."
|
||||||
|
msgstr "El fitxer no existeix."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfont.c:129
|
||||||
|
#, 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:136
|
||||||
|
#, 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."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfont.c:300 ../../WINGs/wfont.c:336
|
||||||
|
#, c-format
|
||||||
|
msgid "could not load font set %s. Trying fixed."
|
||||||
|
msgstr "no s'ha pogut carregar el tipus de lletra %s. Provant amb \"fixed\"."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfont.c:306 ../../WINGs/wfont.c:342
|
||||||
|
#, c-format
|
||||||
|
msgid "could not load font %s. Trying fixed."
|
||||||
|
msgstr "no s'ha pogut carregar el tipus de lletra %s. Provant amb \"fixed\"."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfont.c:310 ../../WINGs/wfont.c:346
|
||||||
|
msgid "could not load fixed font!"
|
||||||
|
msgstr "no s'ha pogut carregar el tipus de lletra \"fixed\" !"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfont.c:441
|
||||||
|
#, c-format
|
||||||
|
msgid "font description %s is too large."
|
||||||
|
msgstr "la descripció de tipus de lletra %s és massa gran."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:205
|
||||||
|
msgid "Test!!!"
|
||||||
|
msgstr "Prova!!!"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:211
|
||||||
|
msgid "Family"
|
||||||
|
msgstr "Familia"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:222
|
||||||
|
msgid "Typeface"
|
||||||
|
msgstr "Fosa"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:233
|
||||||
|
msgid "Size"
|
||||||
|
msgstr "Mida"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:252
|
||||||
|
msgid "Set"
|
||||||
|
msgstr "Conjunt"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:257
|
||||||
|
msgid "Revert"
|
||||||
|
msgstr "Torna"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:709
|
||||||
|
msgid "Could not retrieve font list"
|
||||||
|
msgstr "No s'ha pogut obtenir la llista de tipus de lletra"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:721
|
||||||
|
#, 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:868
|
||||||
|
msgid "Roman"
|
||||||
|
msgstr "Romana"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:871
|
||||||
|
msgid "Italic"
|
||||||
|
msgstr "Itàlica"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:873
|
||||||
|
msgid "Oblique"
|
||||||
|
msgstr "Obliqua"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:875
|
||||||
|
msgid "Rev Italic"
|
||||||
|
msgstr "Itàlica rev"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:877
|
||||||
|
msgid "Rev Oblique"
|
||||||
|
msgstr "Obliqua rev"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:883
|
||||||
|
msgid "Normal"
|
||||||
|
msgstr "Normal"
|
||||||
|
|
||||||
|
#: ../../WINGs/widgets.c:415
|
||||||
|
#, c-format
|
||||||
|
msgid "WINGs: could not load widget images file: %s"
|
||||||
|
msgstr "WINGs: no s'ha pogut carregar el fitxer d'imatges dels elements: %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/widgets.c:763
|
||||||
|
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 l'instal·lació dels tipus "
|
||||||
|
"de lletra i la configuració del local és adquada."
|
||||||
|
|
||||||
|
#: ../../WINGs/wruler.c:189
|
||||||
|
msgid "0 inches"
|
||||||
|
msgstr "0 polzades"
|
||||||
+664
@@ -0,0 +1,664 @@
|
|||||||
|
# KTranslator Generated File
|
||||||
|
# SOME DESCRIPTIVE TITLE.
|
||||||
|
# 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"
|
||||||
|
"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"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=ISO-8859-1\n"
|
||||||
|
"Content-Transfer-Encoding: unknown\n"
|
||||||
|
|
||||||
|
#: ../../WINGs/connection.c:461 ../../WINGs/connection.c:526
|
||||||
|
#: ../../WINGs/connection.c:569
|
||||||
|
msgid "Bad address-service-protocol combination"
|
||||||
|
msgstr "Ungültige Adress-Dienst-Protokoll Kombination"
|
||||||
|
|
||||||
|
#: ../../WINGs/error.c:54
|
||||||
|
#, c-format
|
||||||
|
msgid "Unknown error %d"
|
||||||
|
msgstr "Unbekannter Fehler %d"
|
||||||
|
|
||||||
|
#: ../../WINGs/error.c:59
|
||||||
|
#, c-format
|
||||||
|
msgid "Error %d"
|
||||||
|
msgstr "Fehler %d"
|
||||||
|
|
||||||
|
#: ../../WINGs/error.c:110
|
||||||
|
msgid " warning: "
|
||||||
|
msgstr " Warnung: "
|
||||||
|
|
||||||
|
#: ../../WINGs/error.c:137
|
||||||
|
msgid " fatal error: "
|
||||||
|
msgstr " fataler Fehler: "
|
||||||
|
|
||||||
|
#: ../../WINGs/error.c:163 ../../WINGs/error.c:192
|
||||||
|
msgid " error: "
|
||||||
|
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"
|
||||||
|
|
||||||
|
#: ../../WINGs/findfile.c:66
|
||||||
|
#, c-format
|
||||||
|
msgid "could not get password entry for user %s"
|
||||||
|
msgstr "konnte Passwort nicht ermitteln für Benutzer %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/host.c:114
|
||||||
|
msgid "Cannot get current host name"
|
||||||
|
msgstr "Kann aktuellen Hostnamen nicht ermitteln"
|
||||||
|
|
||||||
|
#: ../../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"
|
||||||
|
|
||||||
|
#: ../../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
|
||||||
|
msgid "Used proplist functions on non-WMPropLists objects"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:630
|
||||||
|
msgid "unterminated PropList string"
|
||||||
|
msgstr "nicht terminierter PropList string"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:670
|
||||||
|
msgid "unterminated PropList data"
|
||||||
|
msgstr "nicht terminiertes PropList data"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:678
|
||||||
|
msgid "unterminated PropList data (missing hexdigit)"
|
||||||
|
msgstr "nicht terminiertes PropList data (fehlendes hex-Zeichen)"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:690
|
||||||
|
msgid "non hexdigit character in PropList data"
|
||||||
|
msgstr "falsches hex-Zeichen in PropList data"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:725
|
||||||
|
msgid "unterminated PropList array"
|
||||||
|
msgstr "nicht terminiertes PropList array"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:733
|
||||||
|
msgid "missing or unterminated PropList array"
|
||||||
|
msgstr "fehlendes oder nicht terminiertes PropList array"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:743
|
||||||
|
msgid "could not get PropList array element"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:772
|
||||||
|
msgid "unterminated PropList dictionary"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:789
|
||||||
|
msgid "missing PropList dictionary key"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:791
|
||||||
|
msgid "missing PropList dictionary entry key or unterminated dictionary"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:799
|
||||||
|
msgid "error parsing PropList dictionary key"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:807
|
||||||
|
msgid "missing = in PropList dictionary entry"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:815
|
||||||
|
msgid "error parsing PropList dictionary entry value"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:823
|
||||||
|
msgid "missing ; in PropList dictionary entry"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:884
|
||||||
|
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 \" "
|
||||||
|
"einklammern."
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:888
|
||||||
|
msgid "Comments are not allowed inside WindowMaker owned domain files."
|
||||||
|
msgstr "Kommentare sind in Domaindaten von WindowMaker nicht erlaubt."
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1559 ../../WINGs/proplist.c:1624
|
||||||
|
msgid "extra data after end of property list"
|
||||||
|
msgstr "zusätzliche Daten hinter dem Ende der Propertyliste"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1602
|
||||||
|
#, c-format
|
||||||
|
msgid "could not get size for file '%s'"
|
||||||
|
msgstr "konnte Dateigrösse von '%s' nicht ermitteln"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1614
|
||||||
|
#, c-format
|
||||||
|
msgid "error reading from file '%s'"
|
||||||
|
msgstr "Fehler beim Lesen der Datei '%s'"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1665
|
||||||
|
#, c-format
|
||||||
|
msgid "mkstemp (%s) failed"
|
||||||
|
msgstr "mkstemp (%s) schlug fehl"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1676
|
||||||
|
#, c-format
|
||||||
|
msgid "mktemp (%s) failed"
|
||||||
|
msgstr "mktemp (%s) schlug fehl"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1687
|
||||||
|
#, c-format
|
||||||
|
msgid "open (%s) failed"
|
||||||
|
msgstr "open (%s) schlug fehl"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1694
|
||||||
|
#, c-format
|
||||||
|
msgid "writing to file: %s failed"
|
||||||
|
msgstr "Schreiben in Datei: %s schlug fehl"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1702
|
||||||
|
#, c-format
|
||||||
|
msgid "fclose (%s) failed"
|
||||||
|
msgstr "fclose (%s) schlug fehl"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1711
|
||||||
|
#, c-format
|
||||||
|
msgid "rename ('%s' to '%s') failed"
|
||||||
|
msgstr "rename ('%s' to '%s') schlug fehl"
|
||||||
|
|
||||||
|
#. 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 "Kannn bei der Synchronisation nicht aus Datei '%s' lesen"
|
||||||
|
|
||||||
|
#: ../../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 "konnte die Farbe %s nicht erzeugen"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolor.c:198
|
||||||
|
msgid "white"
|
||||||
|
msgstr "weiß"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolor.c:211
|
||||||
|
msgid "black"
|
||||||
|
msgstr "schwarz"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolor.c:250
|
||||||
|
msgid "gray"
|
||||||
|
msgstr "grau"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolor.c:291
|
||||||
|
msgid "dark gray"
|
||||||
|
msgstr "dunkelgrau"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:415
|
||||||
|
msgid "Colors"
|
||||||
|
msgstr "Farben"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:605 ../../WINGs/wcolorpanel.c:2824
|
||||||
|
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
|
||||||
|
msgid "Color Panel: Could not allocate memory"
|
||||||
|
msgstr "Color Panel: Konnte keinen Speicher reservieren"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:680 ../../WINGs/wcolorpanel.c:681
|
||||||
|
msgid "Red"
|
||||||
|
msgstr "Rot"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:713 ../../WINGs/wcolorpanel.c:714
|
||||||
|
msgid "Green"
|
||||||
|
msgstr "Grün"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:747 ../../WINGs/wcolorpanel.c:748
|
||||||
|
msgid "Blue"
|
||||||
|
msgstr "Blau"
|
||||||
|
|
||||||
|
#: ../../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 "Gelb"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:910 ../../WINGs/wcolorpanel.c:911
|
||||||
|
msgid "Black"
|
||||||
|
msgstr "Schwarz"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:991
|
||||||
|
msgid "Spectrum"
|
||||||
|
msgstr "Spektrum"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1021
|
||||||
|
msgid "Palette"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1027
|
||||||
|
msgid "New from File..."
|
||||||
|
msgstr "Neu aus Datei..."
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1028 ../../WINGs/wcolorpanel.c:1076
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1093
|
||||||
|
msgid "Rename..."
|
||||||
|
msgstr "Umbenennen..."
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1029 ../../WINGs/wcolorpanel.c:1077
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1094 ../../WINGs/wcolorpanel.c:3321
|
||||||
|
msgid "Remove"
|
||||||
|
msgstr "Entfernen"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1030
|
||||||
|
msgid "Copy"
|
||||||
|
msgstr "Kopieren"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1031
|
||||||
|
msgid "New from Clipboard"
|
||||||
|
msgstr "Neu aus Zwischenablage"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1052
|
||||||
|
msgid "X11-Colors"
|
||||||
|
msgstr "X11-Farben"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1069
|
||||||
|
msgid "Color"
|
||||||
|
msgstr "Farbe"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1075
|
||||||
|
msgid "Add..."
|
||||||
|
msgstr "Hinzufügen..."
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1085
|
||||||
|
msgid "List"
|
||||||
|
msgstr "Liste"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1092
|
||||||
|
msgid "New..."
|
||||||
|
msgstr "Neu..."
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1231
|
||||||
|
#, 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"
|
||||||
|
|
||||||
|
#. Delete the file, it doesn't belong here
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1237 ../../WINGs/wcolorpanel.c:3207
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3211
|
||||||
|
msgid "File Error"
|
||||||
|
msgstr "Dateifehler"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1238
|
||||||
|
msgid "Could not create ColorPanel configuration directory"
|
||||||
|
msgstr "Konnte Konfigurationsverzeichnis für Farbdialog nicht erzeugen"
|
||||||
|
|
||||||
|
#: ../../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 "OK"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1245 ../../WINGs/wcolorpanel.c:1281
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1299
|
||||||
|
msgid "Color Panel: Could not find file"
|
||||||
|
msgstr "Color Panel: Konnte Datei nicht finden"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1486 ../../WINGs/wcolorpanel.c:1551
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1615
|
||||||
|
msgid "Color Panel: X failed request"
|
||||||
|
msgstr "Color Panel: X Anfrage schlug fehl"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:2860
|
||||||
|
msgid "Saturation"
|
||||||
|
msgstr "Sättigung"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:2896
|
||||||
|
msgid "Hue"
|
||||||
|
msgstr "Farbton"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3146
|
||||||
|
msgid "Open Palette"
|
||||||
|
msgstr "Palette öffnen"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3208
|
||||||
|
msgid "Invalid file format !"
|
||||||
|
msgstr "Ungültiges Dateiformat!"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3210
|
||||||
|
#, c-format
|
||||||
|
msgid "can't remove file %s"
|
||||||
|
msgstr "kann Datei %s nicht entfernen"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3212
|
||||||
|
msgid "Couldn't remove file from Configuration Directory !"
|
||||||
|
msgstr "Konnte Datei nicht aus Konfigurationsverzeichnis entfernen!"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3239
|
||||||
|
msgid "Rename"
|
||||||
|
msgstr "Umbenennen"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3239
|
||||||
|
msgid "Rename palette to:"
|
||||||
|
msgstr "Palette umbenennen in:"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3240 ../../WINGs/wfilepanel.c:259
|
||||||
|
#: ../../WINGs/wfilepanel.c:659 ../../WINGs/wfilepanel.c:760
|
||||||
|
msgid "Cancel"
|
||||||
|
msgstr "Abbrechen"
|
||||||
|
|
||||||
|
#. Careful, this palette exists already
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3256 ../../WINGs/wfilepanel.c:760
|
||||||
|
msgid "Warning"
|
||||||
|
msgstr "Warnung"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3257
|
||||||
|
msgid ""
|
||||||
|
"Palette already exists !\n"
|
||||||
|
"\n"
|
||||||
|
"Overwrite ?"
|
||||||
|
msgstr ""
|
||||||
|
"Palette existiert bereits!\n"
|
||||||
|
"\n"
|
||||||
|
"Überschreiben?"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3257 ../../WINGs/wcolorpanel.c:3321
|
||||||
|
msgid "No"
|
||||||
|
msgstr "Nein"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3257 ../../WINGs/wcolorpanel.c:3321
|
||||||
|
msgid "Yes"
|
||||||
|
msgstr "Ja"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3289
|
||||||
|
#, c-format
|
||||||
|
msgid "Couldn't rename palette %s to %s\n"
|
||||||
|
msgstr "Konnte Palette %s nicht in %s umbenennen\n"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3315
|
||||||
|
msgid "This will permanently remove the palette "
|
||||||
|
msgstr "Das wird die Palette unwiderruflich löschen "
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3318
|
||||||
|
msgid ""
|
||||||
|
".\n"
|
||||||
|
"\n"
|
||||||
|
"Are you sure you want to remove this palette ?"
|
||||||
|
msgstr ""
|
||||||
|
".\n"
|
||||||
|
"\n"
|
||||||
|
"Sind Sie sicher, dass Sie die Palette löschen wollen?"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3343
|
||||||
|
#, c-format
|
||||||
|
msgid "Couldn't remove palette %s\n"
|
||||||
|
msgstr "Konnte Palette %s nicht löschen\n"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3648
|
||||||
|
#, c-format
|
||||||
|
msgid "Could not open %s"
|
||||||
|
msgstr "Konnte %s nicht öffnen"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3655
|
||||||
|
#, c-format
|
||||||
|
msgid "Could not create %s"
|
||||||
|
msgstr "Konnte %s nicht erzeugen"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3666
|
||||||
|
#, c-format
|
||||||
|
msgid "Write error on file %s"
|
||||||
|
msgstr "Schreibfehler bei Datei %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3711
|
||||||
|
msgid "Color Panel: Color unspecified"
|
||||||
|
msgstr "Color Panel: Farbe nicht spezifiziert"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:235
|
||||||
|
msgid "Name:"
|
||||||
|
msgstr "Name:"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:332 ../../WINGs/wfilepanel.c:396
|
||||||
|
msgid "Open"
|
||||||
|
msgstr "Öffnen"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:350 ../../WINGs/wfilepanel.c:402
|
||||||
|
msgid "Save"
|
||||||
|
msgstr "Speichern"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:562
|
||||||
|
#, c-format
|
||||||
|
msgid "WINGs: could not open directory %s\n"
|
||||||
|
msgstr "WINGs: Konnte Verzeichnis %s nicht öffen\n"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:580
|
||||||
|
#, c-format
|
||||||
|
msgid "WINGs: could not stat %s\n"
|
||||||
|
msgstr "WINGs: Dateistatus von %s nicht bestimmbar\n"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:647 ../../WINGs/wfilepanel.c:970
|
||||||
|
#: ../../WINGs/wfontpanel.c:708
|
||||||
|
msgid "Error"
|
||||||
|
msgstr "Fehler"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:658
|
||||||
|
msgid "Create Directory"
|
||||||
|
msgstr "Verzeichnis anlegen"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:659
|
||||||
|
msgid "Enter directory name"
|
||||||
|
msgstr "Verzeichnisname eingeben"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:695 ../../WINGs/wfilepanel.c:734
|
||||||
|
#: ../../WINGs/wfilepanel.c:765 ../../WINGs/wfilepanel.c:793
|
||||||
|
msgid "Permission denied."
|
||||||
|
msgstr "Zugriff verweigert."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:698
|
||||||
|
#, c-format
|
||||||
|
msgid "'%s' already exists."
|
||||||
|
msgstr "'%s' existiert bereits."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:701
|
||||||
|
msgid "Path does not exist."
|
||||||
|
msgstr "Pfad existiert nicht."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:731 ../../WINGs/wfilepanel.c:790
|
||||||
|
#, c-format
|
||||||
|
msgid "'%s' does not exist."
|
||||||
|
msgstr "'%s' existiert nicht."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:738 ../../WINGs/wfilepanel.c:797
|
||||||
|
msgid "Insufficient memory available."
|
||||||
|
msgstr "Nicht genügend Speicher verfügbar."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:742 ../../WINGs/wfilepanel.c:801
|
||||||
|
#, c-format
|
||||||
|
msgid "'%s' is on a read-only filesystem."
|
||||||
|
msgstr "'%s' liegt auf einem read-only Dateisystem."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:745 ../../WINGs/wfilepanel.c:777
|
||||||
|
#: ../../WINGs/wfilepanel.c:804
|
||||||
|
#, c-format
|
||||||
|
msgid "Can not delete '%s'."
|
||||||
|
msgstr "Kann %s nicht löschen."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:752
|
||||||
|
#, c-format
|
||||||
|
msgid "Delete directory %s ?"
|
||||||
|
msgstr "Verzeichnis % s löschen?"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:756
|
||||||
|
#, c-format
|
||||||
|
msgid "Delete file %s ?"
|
||||||
|
msgstr "Datei %s löschen?"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:768
|
||||||
|
#, c-format
|
||||||
|
msgid "Directory '%s' does not exist."
|
||||||
|
msgstr "Verzeichnis '%s' existiert nicht."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:771
|
||||||
|
#, c-format
|
||||||
|
msgid "Directory '%s' is not empty."
|
||||||
|
msgstr "Verzeichnis '%s' ist nicht leer."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:774
|
||||||
|
#, c-format
|
||||||
|
msgid "Directory '%s' is busy."
|
||||||
|
msgstr "Verzeichnis '%s' ist belegt."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:787
|
||||||
|
#, c-format
|
||||||
|
msgid "'%s' is a directory."
|
||||||
|
msgstr "'%s' ist ein Verzeichnis."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:829
|
||||||
|
#, c-format
|
||||||
|
msgid "An error occured browsing '%s'."
|
||||||
|
msgstr "Fehler beim Lesen von '%s'."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:833
|
||||||
|
#, c-format
|
||||||
|
msgid "'%s' is not a directory."
|
||||||
|
msgstr "'%s' ist kein Verzeichnis."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:970
|
||||||
|
msgid "File does not exist."
|
||||||
|
msgstr "Datei existiert nicht."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfont.c:129
|
||||||
|
#, c-format
|
||||||
|
msgid "the following character sets are missing in %s:"
|
||||||
|
msgstr "die folgenden Zeichensätze fehlen in %s:"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfont.c:136
|
||||||
|
#, c-format
|
||||||
|
msgid ""
|
||||||
|
"the string \"%s\" will be used in place of any characters from those sets."
|
||||||
|
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
|
||||||
|
msgid "Family"
|
||||||
|
msgstr "Familie"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:222
|
||||||
|
msgid "Typeface"
|
||||||
|
msgstr "Schriftart"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:233
|
||||||
|
msgid "Size"
|
||||||
|
msgstr "Größe"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:252
|
||||||
|
msgid "Set"
|
||||||
|
msgstr "Setzen"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:257
|
||||||
|
msgid "Revert"
|
||||||
|
msgstr "Zurückn."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:709
|
||||||
|
msgid "Could not retrieve font list"
|
||||||
|
msgstr "Konnte Fontliste nicht wiederherstellen"
|
||||||
|
|
||||||
|
#: ../../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
|
||||||
|
#, c-format
|
||||||
|
msgid "WINGs: could not load widget images file: %s"
|
||||||
|
msgstr "WINGs: Konnte Widget-Bildatei %s nicht laden."
|
||||||
|
|
||||||
|
#: ../../WINGs/widgets.c:763
|
||||||
|
msgid ""
|
||||||
|
"could not load any fonts. Make sure your font installationand locale "
|
||||||
|
"settings are correct."
|
||||||
|
msgstr ""
|
||||||
|
"Konnte keine Fonts laden. Überprüfen Sie, ob Ihre Fontinstallation und "
|
||||||
|
"-einstellungen korrekt sind."
|
||||||
|
|
||||||
|
#: ../../WINGs/wruler.c:189
|
||||||
|
msgid "0 inches"
|
||||||
|
msgstr "0 Inch"
|
||||||
+739
@@ -0,0 +1,739 @@
|
|||||||
|
# KTranslator Generated File
|
||||||
|
# SOME DESCRIPTIVE TITLE.
|
||||||
|
# Copyright (C) YEAR Free Software Foundation, Inc.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: WINGs 0.80.0\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"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=ISO-8859-1\n"
|
||||||
|
"Content-Transfer-Encoding: unknown\n"
|
||||||
|
|
||||||
|
#: ../../WINGs/connection.c:467 ../../WINGs/connection.c:532
|
||||||
|
#: ../../WINGs/connection.c:575
|
||||||
|
msgid "Bad address-service-protocol combination"
|
||||||
|
msgstr "Mauvaise combinaison adresse-service-protocole"
|
||||||
|
|
||||||
|
#: ../../WINGs/error.c:54
|
||||||
|
#, c-format
|
||||||
|
msgid "Unknown error %d"
|
||||||
|
msgstr "Erreur inconnue %d"
|
||||||
|
|
||||||
|
#: ../../WINGs/error.c:59
|
||||||
|
#, c-format
|
||||||
|
msgid "Error %d"
|
||||||
|
msgstr "Erreur %d"
|
||||||
|
|
||||||
|
#: ../../WINGs/error.c:110
|
||||||
|
msgid " warning: "
|
||||||
|
msgstr " Avertissement : "
|
||||||
|
|
||||||
|
#: ../../WINGs/error.c:137
|
||||||
|
msgid " fatal error: "
|
||||||
|
msgstr " erreur fatale : "
|
||||||
|
|
||||||
|
#: ../../WINGs/error.c:163 ../../WINGs/error.c:192
|
||||||
|
msgid " error: "
|
||||||
|
msgstr " erreur : "
|
||||||
|
|
||||||
|
#: ../../WINGs/findfile.c:48
|
||||||
|
#, c-format
|
||||||
|
msgid "could not get password entry for 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 le mot de passe de l'utilisateur %i"
|
||||||
|
|
||||||
|
#: ../../WINGs/host.c:114
|
||||||
|
msgid "Cannot get current host name"
|
||||||
|
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 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: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"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:630
|
||||||
|
msgid "unterminated PropList string"
|
||||||
|
msgstr "chaîne PropList sans fin"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:670
|
||||||
|
msgid "unterminated PropList data"
|
||||||
|
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)"
|
||||||
|
|
||||||
|
#: ../../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"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:729
|
||||||
|
msgid "unterminated PropList array"
|
||||||
|
msgstr "tableau PropList sans fin"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:737
|
||||||
|
msgid "missing or unterminated PropList array"
|
||||||
|
msgstr "tableau PropList manquant ou sans fin"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:747
|
||||||
|
msgid "could not get PropList array element"
|
||||||
|
msgstr "impossible de lire l'élément du tableau PropList"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:776
|
||||||
|
msgid "unterminated PropList dictionary"
|
||||||
|
msgstr "dictionnaire PropList sans fin"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:793
|
||||||
|
msgid "missing PropList dictionary key"
|
||||||
|
msgstr "clef du dictionnaire PropList manquante"
|
||||||
|
|
||||||
|
#: ../../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:803
|
||||||
|
msgid "error parsing PropList dictionary key"
|
||||||
|
msgstr "erreur lors de l'analyse de la clef de dictionnaire PropList"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:811
|
||||||
|
msgid "missing = in PropList dictionary entry"
|
||||||
|
msgstr "signe '=' manquant dans l'entrée du dictionnaire PropList"
|
||||||
|
|
||||||
|
#: ../../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"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:827
|
||||||
|
msgid "missing ; in PropList dictionary entry"
|
||||||
|
msgstr "signe ';' manquant dans l'entrée du dictionnaire PropList"
|
||||||
|
|
||||||
|
#: ../../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 à '\"'."
|
||||||
|
|
||||||
|
#: ../../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 Window Maker."
|
||||||
|
|
||||||
|
#: ../../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"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1606
|
||||||
|
#, c-format
|
||||||
|
msgid "could not get size for file '%s'"
|
||||||
|
msgstr "impossible de déterminer la taille du fichier '%s'"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1618
|
||||||
|
#, c-format
|
||||||
|
msgid "error reading from file '%s'"
|
||||||
|
msgstr "erreur pendant la lecture du fichier '%s'"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1669
|
||||||
|
#, c-format
|
||||||
|
msgid "mkstemp (%s) failed"
|
||||||
|
msgstr "mkstemp (%s) a échoué"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1680
|
||||||
|
#, c-format
|
||||||
|
msgid "mktemp (%s) failed"
|
||||||
|
msgstr "mktemp (%s) a échoué"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1691
|
||||||
|
#, c-format
|
||||||
|
msgid "open (%s) failed"
|
||||||
|
msgstr "open (%s) a échoué"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1698
|
||||||
|
#, c-format
|
||||||
|
msgid "writing to file: %s failed"
|
||||||
|
msgstr "erreur pendant l'écriture dans le fichier '%s'"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1706
|
||||||
|
#, c-format
|
||||||
|
msgid "fclose (%s) failed"
|
||||||
|
msgstr "erreur lors de la fermeture du fichier '%s'"
|
||||||
|
|
||||||
|
#: ../../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: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: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:224
|
||||||
|
msgid "white"
|
||||||
|
msgstr "blanc"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolor.c:236
|
||||||
|
msgid "black"
|
||||||
|
msgstr "noir"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolor.c:275
|
||||||
|
msgid "gray"
|
||||||
|
msgstr "gris"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolor.c:316
|
||||||
|
msgid "dark gray"
|
||||||
|
msgstr "gris sombre"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:420
|
||||||
|
msgid "Colors"
|
||||||
|
msgstr "Couleurs"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:610 ../../WINGs/wcolorpanel.c:2829
|
||||||
|
msgid "Brightness"
|
||||||
|
msgstr "Luminosité"
|
||||||
|
|
||||||
|
#: ../../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"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:685 ../../WINGs/wcolorpanel.c:686
|
||||||
|
msgid "Red"
|
||||||
|
msgstr "Rouge"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:718 ../../WINGs/wcolorpanel.c:719
|
||||||
|
msgid "Green"
|
||||||
|
msgstr "Vert"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:752 ../../WINGs/wcolorpanel.c:753
|
||||||
|
msgid "Blue"
|
||||||
|
msgstr "Bleu"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:812 ../../WINGs/wcolorpanel.c:813
|
||||||
|
msgid "Cyan"
|
||||||
|
msgstr "Cyan"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:846 ../../WINGs/wcolorpanel.c:847
|
||||||
|
msgid "Magenta"
|
||||||
|
msgstr "Magenta"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:880 ../../WINGs/wcolorpanel.c:881
|
||||||
|
msgid "Yellow"
|
||||||
|
msgstr "Jaune"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:915 ../../WINGs/wcolorpanel.c:916
|
||||||
|
msgid "Black"
|
||||||
|
msgstr "Noir"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:996
|
||||||
|
msgid "Spectrum"
|
||||||
|
msgstr "Spectre"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1026
|
||||||
|
msgid "Palette"
|
||||||
|
msgstr "Palette"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1032
|
||||||
|
msgid "New from File..."
|
||||||
|
msgstr "Nouveau d'après le fichier..."
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1033 ../../WINGs/wcolorpanel.c:1081
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1098
|
||||||
|
msgid "Rename..."
|
||||||
|
msgstr "Renommer..."
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1034 ../../WINGs/wcolorpanel.c:1082
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1099 ../../WINGs/wcolorpanel.c:3326
|
||||||
|
msgid "Remove"
|
||||||
|
msgstr "Supprimer"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1035
|
||||||
|
msgid "Copy"
|
||||||
|
msgstr "Copier"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1036
|
||||||
|
msgid "New from Clipboard"
|
||||||
|
msgstr "Nouveau d'après le presse-papier"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1057
|
||||||
|
msgid "X11-Colors"
|
||||||
|
msgstr "Couleurs X11"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1074
|
||||||
|
msgid "Color"
|
||||||
|
msgstr "Couleur"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1080
|
||||||
|
msgid "Add..."
|
||||||
|
msgstr "Ajouter..."
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1090
|
||||||
|
msgid "List"
|
||||||
|
msgstr "Liste"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1097
|
||||||
|
msgid "New..."
|
||||||
|
msgstr "Nouveau..."
|
||||||
|
|
||||||
|
#: ../../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."
|
||||||
|
|
||||||
|
#. Delete the file, it doesn't belong here
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1242 ../../WINGs/wcolorpanel.c:3212
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3216
|
||||||
|
msgid "File Error"
|
||||||
|
msgstr "Erreur de fichier"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1243
|
||||||
|
msgid "Could not create ColorPanel configuration directory"
|
||||||
|
msgstr ""
|
||||||
|
"Impossible de créer le répertoire pour la configuration du panneau de "
|
||||||
|
"sélection des couleurs."
|
||||||
|
|
||||||
|
#: ../../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: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."
|
||||||
|
|
||||||
|
#: ../../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"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:2865
|
||||||
|
msgid "Saturation"
|
||||||
|
msgstr "Saturation"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:2901
|
||||||
|
msgid "Hue"
|
||||||
|
msgstr "Teinte"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3151
|
||||||
|
msgid "Open Palette"
|
||||||
|
msgstr "Ouvrir une palette"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3213
|
||||||
|
msgid "Invalid file format !"
|
||||||
|
msgstr "Format de fichier invalide !"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3215
|
||||||
|
#, c-format
|
||||||
|
msgid "can't remove file %s"
|
||||||
|
msgstr "Impossible de supprimer le fichier %s."
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3217
|
||||||
|
msgid "Couldn't remove file from Configuration Directory !"
|
||||||
|
msgstr "Impossible de supprimer le fichier du répertoire de configuration !"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3244
|
||||||
|
msgid "Rename"
|
||||||
|
msgstr "Renommer"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3244
|
||||||
|
msgid "Rename palette to:"
|
||||||
|
msgstr "Renommer la palette en :"
|
||||||
|
|
||||||
|
#: ../../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:3261 ../../WINGs/wfilepanel.c:763
|
||||||
|
msgid "Warning"
|
||||||
|
msgstr "Avertissement"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3262
|
||||||
|
msgid ""
|
||||||
|
"Palette already exists !\n"
|
||||||
|
"\n"
|
||||||
|
"Overwrite ?"
|
||||||
|
msgstr ""
|
||||||
|
"La palette existe déjà !\n"
|
||||||
|
"\n"
|
||||||
|
"Écraser ?"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3262 ../../WINGs/wcolorpanel.c:3326
|
||||||
|
msgid "No"
|
||||||
|
msgstr "Non"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3262 ../../WINGs/wcolorpanel.c:3326
|
||||||
|
msgid "Yes"
|
||||||
|
msgstr "Oui"
|
||||||
|
|
||||||
|
#: ../../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"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3320
|
||||||
|
msgid "This will permanently remove the palette "
|
||||||
|
msgstr "Ceci détruira définitivement la palette "
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3323
|
||||||
|
msgid ""
|
||||||
|
".\n"
|
||||||
|
"\n"
|
||||||
|
"Are you sure you want to remove this palette ?"
|
||||||
|
msgstr ""
|
||||||
|
".\n"
|
||||||
|
"\n"
|
||||||
|
"Êtes-vous sûr de vouloir supprimer cette palette ?"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3348
|
||||||
|
#, c-format
|
||||||
|
msgid "Couldn't remove palette %s\n"
|
||||||
|
msgstr "Impossible de détruire la palette %s.\n"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3647
|
||||||
|
#, c-format
|
||||||
|
msgid "Could not open %s"
|
||||||
|
msgstr "Impossible d'ouvrir %s."
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3654
|
||||||
|
#, c-format
|
||||||
|
msgid "Could not create %s"
|
||||||
|
msgstr "Impossible de créer %s."
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3665
|
||||||
|
#, c-format
|
||||||
|
msgid "Write error on file %s"
|
||||||
|
msgstr "Erreur d'écriture dans le fichier %s."
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3710
|
||||||
|
msgid "Color Panel: Color unspecified"
|
||||||
|
msgstr "Panneau de sélection des couleurs: couleur non spécifiée."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:235
|
||||||
|
msgid "Name:"
|
||||||
|
msgstr "Nom :"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:332 ../../WINGs/wfilepanel.c:396
|
||||||
|
msgid "Open"
|
||||||
|
msgstr "Ouvrir"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:350 ../../WINGs/wfilepanel.c:402
|
||||||
|
msgid "Save"
|
||||||
|
msgstr "Enregistrer"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:565
|
||||||
|
#, c-format
|
||||||
|
msgid "WINGs: could not open directory %s\n"
|
||||||
|
msgstr "WINGs : Impossible d'ouvrir le répertoire %s.\n"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:583
|
||||||
|
#, c-format
|
||||||
|
msgid "WINGs: could not stat %s\n"
|
||||||
|
msgstr "WINGs : impossible de lire l'état du fichier %s.\n"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:650 ../../WINGs/wfilepanel.c:973
|
||||||
|
#: ../../WINGs/wfontpanel.c:750
|
||||||
|
msgid "Error"
|
||||||
|
msgstr "Erreur"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:661
|
||||||
|
msgid "Create Directory"
|
||||||
|
msgstr "Créer un répertoire"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:662
|
||||||
|
msgid "Enter directory name"
|
||||||
|
msgstr "Saisissez le nom du répertoire"
|
||||||
|
|
||||||
|
#: ../../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: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:734 ../../WINGs/wfilepanel.c:793
|
||||||
|
#, c-format
|
||||||
|
msgid "'%s' does not exist."
|
||||||
|
msgstr "'%s' n'existe pas."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:741 ../../WINGs/wfilepanel.c:800
|
||||||
|
msgid "Insufficient memory available."
|
||||||
|
msgstr "Mémoire disponible insuffisante."
|
||||||
|
|
||||||
|
#: ../../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."
|
||||||
|
|
||||||
|
#: ../../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:755
|
||||||
|
#, c-format
|
||||||
|
msgid "Delete directory %s ?"
|
||||||
|
msgstr "Supprimer le répertoire %s ?"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:759
|
||||||
|
#, c-format
|
||||||
|
msgid "Delete file %s ?"
|
||||||
|
msgstr "Supprimer le fichier %s ?"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:771
|
||||||
|
#, c-format
|
||||||
|
msgid "Directory '%s' does not exist."
|
||||||
|
msgstr "Le répertoire '%s' n'existe pas."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:774
|
||||||
|
#, c-format
|
||||||
|
msgid "Directory '%s' is not empty."
|
||||||
|
msgstr "Le répertoire '%s' n'est pas vide."
|
||||||
|
|
||||||
|
#: ../../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."
|
||||||
|
|
||||||
|
#: ../../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:836
|
||||||
|
#, c-format
|
||||||
|
msgid "'%s' is not a directory."
|
||||||
|
msgstr "'%s' n'est pas un répertoire."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:973
|
||||||
|
msgid "File does not exist."
|
||||||
|
msgstr "Le fichier n'existe pas."
|
||||||
|
|
||||||
|
#: ../../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 :"
|
||||||
|
|
||||||
|
#: ../../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."
|
||||||
|
|
||||||
|
#. is arial a good fallback for multibyte?
|
||||||
|
#: ../../WINGs/wfont.c:599 ../../WINGs/wfont.c:614
|
||||||
|
#, c-format
|
||||||
|
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: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 police de caractères %s, essai de la police "
|
||||||
|
"« fixed »."
|
||||||
|
|
||||||
|
#: ../../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 police de caractères « fixed » !"
|
||||||
|
|
||||||
|
#: ../../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 "La description de la police de caractères %s est trop volumineuse."
|
||||||
|
|
||||||
|
#. // 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 "Test !"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:241
|
||||||
|
msgid "Family"
|
||||||
|
msgstr "Famille"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:252
|
||||||
|
msgid "Typeface"
|
||||||
|
msgstr "Caractère"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:263
|
||||||
|
msgid "Size"
|
||||||
|
msgstr "Taille"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:282
|
||||||
|
msgid "Set"
|
||||||
|
msgstr "Famille"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:288
|
||||||
|
msgid "Revert"
|
||||||
|
msgstr "Revenir"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:751
|
||||||
|
msgid "Could not retrieve font list"
|
||||||
|
msgstr "Impossible de lire la liste des polices de caractères."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:765
|
||||||
|
#, c-format
|
||||||
|
msgid "font name %s is longer than 256, which is invalid."
|
||||||
|
msgstr ""
|
||||||
|
"Le nom de police %s a plus de 256 caractères et est par conséquent invalide."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:913
|
||||||
|
msgid "Roman"
|
||||||
|
msgstr "Roman"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:916
|
||||||
|
msgid "Italic"
|
||||||
|
msgstr "Italique"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:918
|
||||||
|
msgid "Oblique"
|
||||||
|
msgstr "Penché"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:920
|
||||||
|
msgid "Rev Italic"
|
||||||
|
msgstr "Italique inverse"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:922
|
||||||
|
msgid "Rev Oblique"
|
||||||
|
msgstr "Penché inverse"
|
||||||
|
|
||||||
|
#: ../../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 : impossible de charger le fichier d'images de widget '%s'."
|
||||||
|
|
||||||
|
#: ../../WINGs/widgets.c:770
|
||||||
|
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 ""
|
||||||
|
"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 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:192
|
||||||
|
msgid "0 inches"
|
||||||
|
msgstr "0 pouces"
|
||||||
+8
-2
@@ -691,6 +691,10 @@ getPLData(PLData *pldata)
|
|||||||
ok = 0;
|
ok = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
COMPLAIN(pldata, _("non hexdigit character in PropList data"));
|
||||||
|
ok = 0;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1589,7 +1593,7 @@ WMReadPropListFromFile(char *file)
|
|||||||
struct stat stbuf;
|
struct stat stbuf;
|
||||||
size_t length;
|
size_t length;
|
||||||
|
|
||||||
f = fopen(file, "r");
|
f = fopen(file, "rb");
|
||||||
if (!f) {
|
if (!f) {
|
||||||
/* let the user print the error message if he really needs to */
|
/* let the user print the error message if he really needs to */
|
||||||
/*wsyserror(_("could not open domain file '%s' for reading"), file);*/
|
/*wsyserror(_("could not open domain file '%s' for reading"), file);*/
|
||||||
@@ -1611,7 +1615,9 @@ WMReadPropListFromFile(char *file)
|
|||||||
pldata->lineNumber = 1;
|
pldata->lineNumber = 1;
|
||||||
|
|
||||||
if (fread(pldata->ptr, length, 1, f) != 1) {
|
if (fread(pldata->ptr, length, 1, f) != 1) {
|
||||||
|
if (ferror(f)) {
|
||||||
wsyserror(_("error reading from file '%s'"), file);
|
wsyserror(_("error reading from file '%s'"), file);
|
||||||
|
}
|
||||||
plist = NULL;
|
plist = NULL;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@@ -1668,7 +1674,7 @@ WMWritePropListToFile(WMPropList *plist, char *path, Bool atomically)
|
|||||||
mask = umask(0);
|
mask = umask(0);
|
||||||
umask(mask);
|
umask(mask);
|
||||||
fchmod(fd, 0644 & ~mask);
|
fchmod(fd, 0644 & ~mask);
|
||||||
if ((theFile = fdopen(fd, "w")) == NULL) {
|
if ((theFile = fdopen(fd, "wb")) == NULL) {
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
build
|
||||||
|
WINGs.c
|
||||||
|
wings.so
|
||||||
|
*.pyc
|
||||||
|
*.pyo
|
||||||
@@ -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
|
||||||
|
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
|
||||||
|
This is a python wrapper for the WINGs library. With it you can write python
|
||||||
|
based programs which will have 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 even WINGs.py for an example.
|
||||||
|
|
||||||
|
the code is not yet finished and probably won't do everything you expect it
|
||||||
|
to do.
|
||||||
|
|
||||||
|
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 nstall the newly built WINGs, else the python module will
|
||||||
|
be built against the old version
|
||||||
|
|
||||||
@@ -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);
|
||||||
|
}
|
||||||
|
%}
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,631 @@
|
|||||||
|
#!/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))
|
||||||
|
|
||||||
|
def __del__(self):
|
||||||
|
wings.pyWMDeleteTimerHandler(self._o)
|
||||||
|
#delete = __del__
|
||||||
|
|
||||||
|
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 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):
|
||||||
|
self._o = None
|
||||||
|
if self.__class__ == WMWidget:
|
||||||
|
raise Error, "a WMWidget can't be instantiated directly"
|
||||||
|
|
||||||
|
def __del__(self):
|
||||||
|
if (self._o != None):
|
||||||
|
wings.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()
|
||||||
|
|
||||||
Executable
+74
@@ -0,0 +1,74 @@
|
|||||||
|
#!/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")
|
||||||
|
lines = [x.strip() for x in wings.readlines()]
|
||||||
|
flags = reduce(lambda x,y: x+y, [x.split() for x in lines if x])
|
||||||
|
include_dirs = [x[2:] for x in flags]
|
||||||
|
#include_dirs += [".."]
|
||||||
|
wings.close()
|
||||||
|
|
||||||
|
## Get the library dirs
|
||||||
|
wings = os.popen("get-wings-flags --ldflags", "r")
|
||||||
|
lines = [x.strip() for x in wings.readlines()]
|
||||||
|
flags = reduce(lambda x,y: x+y, [x.split() for x in lines if x])
|
||||||
|
library_dirs = [x[2:] for x in flags]
|
||||||
|
#library_dirs += [".."]
|
||||||
|
wings.close()
|
||||||
|
|
||||||
|
## Get the libraries
|
||||||
|
wings = os.popen("get-wings-flags --libs", "r")
|
||||||
|
lines = [x.strip() for x in wings.readlines()]
|
||||||
|
flags = reduce(lambda x,y: x+y, [x.split() for x in lines if x])
|
||||||
|
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.org",
|
||||||
|
license = "GPL",
|
||||||
|
platforms = "ALL",
|
||||||
|
url = "http://windowmaker.org/",
|
||||||
|
|
||||||
|
# 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,
|
||||||
|
)],
|
||||||
|
)
|
||||||
Executable
+159
@@ -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()
|
||||||
|
|
||||||
+78
-63
@@ -9,6 +9,9 @@
|
|||||||
#define MAX_PROPERTY_SIZE 8*1024
|
#define MAX_PROPERTY_SIZE 8*1024
|
||||||
|
|
||||||
|
|
||||||
|
char *WMSelectionOwnerDidChangeNotification = "WMSelectionOwnerDidChange";
|
||||||
|
|
||||||
|
|
||||||
typedef struct SelectionHandler {
|
typedef struct SelectionHandler {
|
||||||
WMView *view;
|
WMView *view;
|
||||||
Atom selection;
|
Atom selection;
|
||||||
@@ -38,9 +41,14 @@ typedef struct SelectionCallback {
|
|||||||
} SelectionCallback;
|
} SelectionCallback;
|
||||||
|
|
||||||
|
|
||||||
WMArray *selCallbacks = NULL;
|
|
||||||
|
|
||||||
WMArray *selHandlers = NULL;
|
static WMArray *selCallbacks = NULL;
|
||||||
|
|
||||||
|
static WMArray *selHandlers = NULL;
|
||||||
|
|
||||||
|
static Bool gotXError = False;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -54,6 +62,7 @@ WMDeleteSelectionHandler(WMView *view, Atom selection, Time timestamp)
|
|||||||
if (!selHandlers)
|
if (!selHandlers)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
/*//printf("deleting selection handler for %d", win);*/
|
||||||
|
|
||||||
WM_ITERATE_ARRAY(selHandlers, handler, iter) {
|
WM_ITERATE_ARRAY(selHandlers, handler, iter) {
|
||||||
if (handler->view == view
|
if (handler->view == view
|
||||||
@@ -62,13 +71,17 @@ WMDeleteSelectionHandler(WMView *view, Atom selection, Time timestamp)
|
|||||||
|
|
||||||
if (handler->flags.done_pending) {
|
if (handler->flags.done_pending) {
|
||||||
handler->flags.delete_pending = 1;
|
handler->flags.delete_pending = 1;
|
||||||
|
/*//puts(": postponed because still pending");*/
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
/*//printf(": found & removed");*/
|
||||||
WMRemoveFromArray(selHandlers, handler);
|
WMRemoveFromArray(selHandlers, handler);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*//printf("\n");*/
|
||||||
|
|
||||||
XGrabServer(dpy);
|
XGrabServer(dpy);
|
||||||
if (XGetSelectionOwner(dpy, selection) == win) {
|
if (XGetSelectionOwner(dpy, selection) == win) {
|
||||||
XSetSelectionOwner(dpy, selection, None, timestamp);
|
XSetSelectionOwner(dpy, selection, None, timestamp);
|
||||||
@@ -89,7 +102,7 @@ WMDeleteSelectionCallback(WMView *view, Atom selection, Time timestamp)
|
|||||||
|
|
||||||
WM_ITERATE_ARRAY(selCallbacks, handler, iter) {
|
WM_ITERATE_ARRAY(selCallbacks, handler, iter) {
|
||||||
if (handler->view == view
|
if (handler->view == view
|
||||||
&& (handler->selection == selection || selection == 0)
|
&& (handler->selection == selection || selection == None)
|
||||||
&& (handler->timestamp == timestamp || timestamp == CurrentTime)) {
|
&& (handler->timestamp == timestamp || timestamp == CurrentTime)) {
|
||||||
|
|
||||||
if (handler->flags.done_pending) {
|
if (handler->flags.done_pending) {
|
||||||
@@ -103,45 +116,42 @@ WMDeleteSelectionCallback(WMView *view, Atom selection, Time timestamp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static Bool gotError = 0;
|
|
||||||
/*
|
|
||||||
static int
|
static int
|
||||||
errorHandler(XErrorEvent *error)
|
handleXError(Display *dpy, XErrorEvent *ev)
|
||||||
{
|
{
|
||||||
return 0;
|
gotXError = True;
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
writeSelection(Display *dpy, Window requestor, Atom property, Atom type,
|
writeSelection(Display *dpy, Window requestor, Atom property, Atom type,
|
||||||
WMData *data)
|
WMData *data)
|
||||||
{
|
{
|
||||||
int format;
|
static void *oldHandler;
|
||||||
|
int format, bpi;
|
||||||
|
|
||||||
format = WMGetDataFormat(data);
|
format = WMGetDataFormat(data);
|
||||||
if (format == 0)
|
if (format == 0)
|
||||||
format = 8;
|
format = 8;
|
||||||
|
|
||||||
/*
|
bpi = format/8;
|
||||||
printf("write to %x: %s\n", requestor, XGetAtomName(dpy, property));
|
|
||||||
*/
|
|
||||||
gotError = False;
|
|
||||||
|
|
||||||
#ifndef __sgi
|
/* printf("write to %x: %s\n", requestor, XGetAtomName(dpy, property)); */
|
||||||
if (!XChangeProperty(dpy, requestor, property, type, format,
|
|
||||||
PropModeReplace, WMDataBytes(data),
|
oldHandler = XSetErrorHandler(handleXError);
|
||||||
WMGetDataLength(data)))
|
|
||||||
return False;
|
gotXError = False;
|
||||||
#else
|
|
||||||
/* in sgi seems this seems to return void */
|
XChangeProperty(dpy, requestor, property, type, format, PropModeReplace,
|
||||||
XChangeProperty(dpy, requestor, property, type, format,
|
WMDataBytes(data), WMGetDataLength(data)/bpi);
|
||||||
PropModeReplace, WMDataBytes(data), WMGetDataLength(data));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
XFlush(dpy);
|
XFlush(dpy);
|
||||||
|
|
||||||
return !gotError;
|
XSetErrorHandler(oldHandler);
|
||||||
|
|
||||||
|
return !gotXError;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -149,9 +159,9 @@ static void
|
|||||||
notifySelection(XEvent *event, Atom prop)
|
notifySelection(XEvent *event, Atom prop)
|
||||||
{
|
{
|
||||||
XEvent ev;
|
XEvent ev;
|
||||||
/*
|
|
||||||
printf("envent to %x\n", event->xselectionrequest.requestor);
|
/* printf("event to %x\n", event->xselectionrequest.requestor); */
|
||||||
*/
|
|
||||||
ev.xselection.type = SelectionNotify;
|
ev.xselection.type = SelectionNotify;
|
||||||
ev.xselection.serial = 0;
|
ev.xselection.serial = 0;
|
||||||
ev.xselection.send_event = True;
|
ev.xselection.send_event = True;
|
||||||
@@ -174,7 +184,7 @@ handleRequestEvent(XEvent *event)
|
|||||||
SelectionHandler *handler;
|
SelectionHandler *handler;
|
||||||
WMArrayIterator iter;
|
WMArrayIterator iter;
|
||||||
WMArray *copy;
|
WMArray *copy;
|
||||||
Bool handledRequest = False;
|
Bool handledRequest;
|
||||||
|
|
||||||
WM_ITERATE_ARRAY(selHandlers, handler, iter) {
|
WM_ITERATE_ARRAY(selHandlers, handler, iter) {
|
||||||
|
|
||||||
@@ -195,8 +205,7 @@ handleRequestEvent(XEvent *event)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case SelectionRequest:
|
case SelectionRequest:
|
||||||
if (W_VIEW_DRAWABLE(handler->view)
|
if (W_VIEW_DRAWABLE(handler->view)!=event->xselectionrequest.owner) {
|
||||||
!= event->xselectionrequest.owner) {
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -213,6 +222,8 @@ handleRequestEvent(XEvent *event)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handledRequest = False;
|
||||||
|
|
||||||
handler->flags.done_pending = 1;
|
handler->flags.done_pending = 1;
|
||||||
|
|
||||||
data = handler->procs.convertSelection(handler->view,
|
data = handler->procs.convertSelection(handler->view,
|
||||||
@@ -220,28 +231,22 @@ handleRequestEvent(XEvent *event)
|
|||||||
event->xselectionrequest.target,
|
event->xselectionrequest.target,
|
||||||
handler->data,
|
handler->data,
|
||||||
&atom);
|
&atom);
|
||||||
if (data == NULL) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
handledRequest = True;
|
|
||||||
|
|
||||||
|
|
||||||
prop = event->xselectionrequest.property;
|
prop = event->xselectionrequest.property;
|
||||||
/* obsolete clients that don't set the property field */
|
/* obsolete clients that don't set the property field */
|
||||||
if (prop == None)
|
if (prop == None)
|
||||||
prop = event->xselectionrequest.target;
|
prop = event->xselectionrequest.target;
|
||||||
|
|
||||||
if (!writeSelection(event->xselectionrequest.display,
|
if (data) {
|
||||||
|
if (writeSelection(event->xselectionrequest.display,
|
||||||
event->xselectionrequest.requestor,
|
event->xselectionrequest.requestor,
|
||||||
prop, atom, data)) {
|
prop, atom, data)) {
|
||||||
WMReleaseData(data);
|
handledRequest = True;
|
||||||
notifySelection(event, None);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
WMReleaseData(data);
|
WMReleaseData(data);
|
||||||
|
}
|
||||||
|
|
||||||
notifySelection(event, prop);
|
notifySelection(event, (handledRequest==True ? prop : None));
|
||||||
|
|
||||||
if (handler->procs.selectionDone != NULL) {
|
if (handler->procs.selectionDone != NULL) {
|
||||||
handler->procs.selectionDone(handler->view,
|
handler->procs.selectionDone(handler->view,
|
||||||
@@ -251,10 +256,6 @@ handleRequestEvent(XEvent *event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
handler->flags.done_pending = 0;
|
handler->flags.done_pending = 0;
|
||||||
|
|
||||||
if (!handledRequest) {
|
|
||||||
notifySelection(event, None);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -278,7 +279,7 @@ getSelectionData(Display *dpy, Window win, Atom where)
|
|||||||
WMData *wdata;
|
WMData *wdata;
|
||||||
unsigned char *data;
|
unsigned char *data;
|
||||||
Atom rtype;
|
Atom rtype;
|
||||||
unsigned bits;
|
unsigned bits, bpi;
|
||||||
unsigned long len, bytes;
|
unsigned long len, bytes;
|
||||||
|
|
||||||
|
|
||||||
@@ -288,10 +289,9 @@ getSelectionData(Display *dpy, Window win, Atom where)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
wdata = WMCreateDataWithBytesNoCopy(data, len, (WMFreeDataProc*)XFree);
|
bpi = bits/8;
|
||||||
if (wdata == NULL) {
|
|
||||||
return NULL;
|
wdata = WMCreateDataWithBytesNoCopy(data, len*bpi, (WMFreeDataProc*)XFree);
|
||||||
}
|
|
||||||
WMSetDataFormat(wdata, bits);
|
WMSetDataFormat(wdata, bits);
|
||||||
|
|
||||||
return wdata;
|
return wdata;
|
||||||
@@ -309,7 +309,7 @@ handleNotifyEvent(XEvent *event)
|
|||||||
WM_ITERATE_ARRAY(selCallbacks, handler, iter) {
|
WM_ITERATE_ARRAY(selCallbacks, handler, iter) {
|
||||||
|
|
||||||
if (W_VIEW_DRAWABLE(handler->view) != event->xselection.requestor
|
if (W_VIEW_DRAWABLE(handler->view) != event->xselection.requestor
|
||||||
&& handler->selection == event->xselection.selection) {
|
|| handler->selection != event->xselection.selection) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
handler->flags.done_pending = 1;
|
handler->flags.done_pending = 1;
|
||||||
@@ -349,6 +349,18 @@ handleNotifyEvent(XEvent *event)
|
|||||||
void
|
void
|
||||||
W_HandleSelectionEvent(XEvent *event)
|
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) {
|
if (event->type == SelectionNotify) {
|
||||||
handleNotifyEvent(event);
|
handleNotifyEvent(event);
|
||||||
} else {
|
} else {
|
||||||
@@ -358,7 +370,6 @@ W_HandleSelectionEvent(XEvent *event)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
WMCreateSelectionHandler(WMView *view, Atom selection, Time timestamp,
|
WMCreateSelectionHandler(WMView *view, Atom selection, Time timestamp,
|
||||||
WMSelectionProcs *procs, void *cdata)
|
WMSelectionProcs *procs, void *cdata)
|
||||||
@@ -367,12 +378,16 @@ WMCreateSelectionHandler(WMView *view, Atom selection, Time timestamp,
|
|||||||
Display *dpy = W_VIEW_SCREEN(view)->display;
|
Display *dpy = W_VIEW_SCREEN(view)->display;
|
||||||
|
|
||||||
XSetSelectionOwner(dpy, selection, W_VIEW_DRAWABLE(view), timestamp);
|
XSetSelectionOwner(dpy, selection, W_VIEW_DRAWABLE(view), timestamp);
|
||||||
if (XGetSelectionOwner(dpy, selection) != W_VIEW_DRAWABLE(view))
|
if (XGetSelectionOwner(dpy, selection) != W_VIEW_DRAWABLE(view)) {
|
||||||
return False;
|
return False;
|
||||||
|
}
|
||||||
|
|
||||||
handler = malloc(sizeof(SelectionHandler));
|
WMPostNotificationName(WMSelectionOwnerDidChangeNotification,
|
||||||
if (handler == NULL)
|
(void*)selection, (void*)view);
|
||||||
return False;
|
|
||||||
|
/*//printf("created selection handler for %d\n", W_VIEW_DRAWABLE(view));*/
|
||||||
|
|
||||||
|
handler = wmalloc(sizeof(SelectionHandler));
|
||||||
|
|
||||||
handler->view = view;
|
handler->view = view;
|
||||||
handler->selection = selection;
|
handler->selection = selection;
|
||||||
@@ -401,6 +416,12 @@ WMRequestSelection(WMView *view, Atom selection, Atom target, Time timestamp,
|
|||||||
if (XGetSelectionOwner(W_VIEW_SCREEN(view)->display, selection) == None)
|
if (XGetSelectionOwner(W_VIEW_SCREEN(view)->display, selection) == None)
|
||||||
return False;
|
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 = wmalloc(sizeof(SelectionCallback));
|
||||||
|
|
||||||
handler->view = view;
|
handler->view = view;
|
||||||
@@ -417,12 +438,6 @@ WMRequestSelection(WMView *view, Atom selection, Atom target, Time timestamp,
|
|||||||
|
|
||||||
WMAddToArray(selCallbacks, handler);
|
WMAddToArray(selCallbacks, handler);
|
||||||
|
|
||||||
if (!XConvertSelection(W_VIEW_SCREEN(view)->display, selection, target,
|
|
||||||
W_VIEW_SCREEN(view)->clipboardAtom,
|
|
||||||
W_VIEW_DRAWABLE(view), timestamp)) {
|
|
||||||
return False;
|
|
||||||
}
|
|
||||||
|
|
||||||
return True;
|
return True;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -186,6 +186,21 @@ wstrdup(char *str)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
char*
|
||||||
|
wstrndup(char *str, size_t len)
|
||||||
|
{
|
||||||
|
char *copy;
|
||||||
|
|
||||||
|
assert(str!=NULL);
|
||||||
|
|
||||||
|
len = WMIN(len, strlen(str));
|
||||||
|
copy = strncpy(wmalloc(len+1), str, len);
|
||||||
|
copy[len] = 0;
|
||||||
|
|
||||||
|
return copy;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
char*
|
char*
|
||||||
wstrconcat(char *str1, char *str2)
|
wstrconcat(char *str1, char *str2)
|
||||||
{
|
{
|
||||||
|
|||||||
+16
-20
@@ -39,6 +39,7 @@ static UserDefaults *sharedUserDefaults = NULL;
|
|||||||
char *WMUserDefaultsDidChangeNotification = "WMUserDefaultsDidChangeNotification";
|
char *WMUserDefaultsDidChangeNotification = "WMUserDefaultsDidChangeNotification";
|
||||||
|
|
||||||
|
|
||||||
|
static void synchronizeUserDefaults(void *foo);
|
||||||
|
|
||||||
extern char *WMGetApplicationName();
|
extern char *WMGetApplicationName();
|
||||||
|
|
||||||
@@ -93,19 +94,14 @@ wdefaultspathfordomain(char *domain)
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
#ifndef HAVE_ATEXIT
|
#ifdef HAVE_ATEXIT
|
||||||
saveDefaultsChanges(int foo, void *bar)
|
|
||||||
#else
|
|
||||||
saveDefaultsChanges(void)
|
saveDefaultsChanges(void)
|
||||||
|
#else
|
||||||
|
saveDefaultsChanges(int foo, void *bar)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
/* save the user defaults databases */
|
/* save the user defaults databases */
|
||||||
UserDefaults *tmp = sharedUserDefaults;
|
synchronizeUserDefaults(NULL);
|
||||||
|
|
||||||
while (tmp) {
|
|
||||||
WMSynchronizeUserDefaults(tmp);
|
|
||||||
tmp = tmp->next;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -116,10 +112,10 @@ registerSaveOnExit(void)
|
|||||||
static Bool registeredSaveOnExit = False;
|
static Bool registeredSaveOnExit = False;
|
||||||
|
|
||||||
if (!registeredSaveOnExit) {
|
if (!registeredSaveOnExit) {
|
||||||
#ifndef HAVE_ATEXIT
|
#ifdef HAVE_ATEXIT
|
||||||
on_exit(saveDefaultsChanges, (void*)NULL);
|
|
||||||
#else
|
|
||||||
atexit(saveDefaultsChanges);
|
atexit(saveDefaultsChanges);
|
||||||
|
#else
|
||||||
|
on_exit(saveDefaultsChanges, (void*)NULL);
|
||||||
#endif
|
#endif
|
||||||
registeredSaveOnExit = True;
|
registeredSaveOnExit = True;
|
||||||
}
|
}
|
||||||
@@ -136,7 +132,6 @@ synchronizeUserDefaults(void *foo)
|
|||||||
WMSynchronizeUserDefaults(database);
|
WMSynchronizeUserDefaults(database);
|
||||||
database = database->next;
|
database = database->next;
|
||||||
}
|
}
|
||||||
WMAddTimerHandler(UD_SYNC_INTERVAL, synchronizeUserDefaults, NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -146,7 +141,8 @@ addSynchronizeTimerHandler(void)
|
|||||||
static Bool initialized = False;
|
static Bool initialized = False;
|
||||||
|
|
||||||
if (!initialized) {
|
if (!initialized) {
|
||||||
WMAddTimerHandler(UD_SYNC_INTERVAL, synchronizeUserDefaults, NULL);
|
WMAddPersistentTimerHandler(UD_SYNC_INTERVAL, synchronizeUserDefaults,
|
||||||
|
NULL);
|
||||||
initialized = True;
|
initialized = True;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -265,7 +261,7 @@ WMGetStandardUserDefaults(void)
|
|||||||
if (sharedUserDefaults) {
|
if (sharedUserDefaults) {
|
||||||
defaults = sharedUserDefaults;
|
defaults = sharedUserDefaults;
|
||||||
while (defaults) {
|
while (defaults) {
|
||||||
/* Trick, path == NULL only for StandardUserDefaults db */
|
/* path == NULL only for StandardUserDefaults db */
|
||||||
if (defaults->path == NULL)
|
if (defaults->path == NULL)
|
||||||
return defaults;
|
return defaults;
|
||||||
defaults = defaults->next;
|
defaults = defaults->next;
|
||||||
@@ -284,18 +280,17 @@ WMGetStandardUserDefaults(void)
|
|||||||
key = WMCreatePLString(WMGetApplicationName());
|
key = WMCreatePLString(WMGetApplicationName());
|
||||||
defaults->searchList[0] = key;
|
defaults->searchList[0] = key;
|
||||||
|
|
||||||
/* temporary kluge */
|
/* temporary kluge. wmaker handles synchronization itself */
|
||||||
if (strcmp(WMGetApplicationName(), "WindowMaker")==0) {
|
if (strcmp(WMGetApplicationName(), "WindowMaker")==0) {
|
||||||
domain = NULL;
|
defaults->dontSync = 1;
|
||||||
path = NULL;
|
}
|
||||||
} else {
|
|
||||||
path = wdefaultspathfordomain(WMGetFromPLString(key));
|
path = wdefaultspathfordomain(WMGetFromPLString(key));
|
||||||
|
|
||||||
if (stat(path, &stbuf) >= 0)
|
if (stat(path, &stbuf) >= 0)
|
||||||
defaults->timestamp = stbuf.st_mtime;
|
defaults->timestamp = stbuf.st_mtime;
|
||||||
|
|
||||||
domain = WMReadPropListFromFile(path);
|
domain = WMReadPropListFromFile(path);
|
||||||
}
|
|
||||||
|
|
||||||
if (!domain)
|
if (!domain)
|
||||||
domain = WMCreatePLDictionary(NULL, NULL, NULL);
|
domain = WMCreatePLDictionary(NULL, NULL, NULL);
|
||||||
@@ -669,6 +664,7 @@ WMSetUDSearchList(WMUserDefaults *database, WMPropList *list)
|
|||||||
for (i=0; i<c; i++) {
|
for (i=0; i<c; i++) {
|
||||||
database->searchList[i] = WMGetFromPLArray(list, i);
|
database->searchList[i] = WMGetFromPLArray(list, i);
|
||||||
}
|
}
|
||||||
|
database->searchList[c] = NULL;
|
||||||
|
|
||||||
database->searchListArray = WMDeepCopyPropList(list);
|
database->searchListArray = WMDeepCopyPropList(list);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ WMInitializeApplication(char *applicationName, int *argc, char **argv)
|
|||||||
assert(argv!=NULL);
|
assert(argv!=NULL);
|
||||||
assert(applicationName!=NULL);
|
assert(applicationName!=NULL);
|
||||||
|
|
||||||
|
/* // TODO: check if to move inside #ifdef I18N */
|
||||||
setlocale(LC_ALL, "");
|
setlocale(LC_ALL, "");
|
||||||
|
|
||||||
#ifdef I18N
|
#ifdef I18N
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ WMCreateApplicationIconBlendedPixmap(WMScreen *scr, RColor *color)
|
|||||||
gray.red = 0xae;
|
gray.red = 0xae;
|
||||||
gray.green = 0xaa;
|
gray.green = 0xaa;
|
||||||
gray.blue = 0xae;
|
gray.blue = 0xae;
|
||||||
gray.alpha = 0;
|
gray.alpha = 0xff;
|
||||||
|
|
||||||
if (!color)
|
if (!color)
|
||||||
color = &gray;
|
color = &gray;
|
||||||
@@ -120,7 +120,7 @@ WMCreateApplicationIconBlendedPixmap(WMScreen *scr, RColor *color)
|
|||||||
void
|
void
|
||||||
WMSetApplicationHasAppIcon(WMScreen *scr, Bool flag)
|
WMSetApplicationHasAppIcon(WMScreen *scr, Bool flag)
|
||||||
{
|
{
|
||||||
scr->aflags.hasAppIcon = flag;
|
scr->aflags.hasAppIcon = ((flag==0) ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+79
-27
@@ -151,7 +151,7 @@ WMSetBalloonDelay(WMScreen *scr, int delay)
|
|||||||
void
|
void
|
||||||
WMSetBalloonEnabled(WMScreen *scr, Bool flag)
|
WMSetBalloonEnabled(WMScreen *scr, Bool flag)
|
||||||
{
|
{
|
||||||
scr->balloon->flags.enabled = flag;
|
scr->balloon->flags.enabled = ((flag==0) ? 0 : 1);
|
||||||
|
|
||||||
W_UnmapView(scr->balloon->view);
|
W_UnmapView(scr->balloon->view);
|
||||||
}
|
}
|
||||||
@@ -275,40 +275,97 @@ W_BalloonHandleEnterView(WMView *view)
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
drawBalloon(Display *dpy, Pixmap pix, GC gc, int x, int y, int w, int h,
|
drawBalloon(WMScreen *scr, Pixmap bitmap, Pixmap pix, int x, int y, int w,
|
||||||
int side)
|
int h, int side)
|
||||||
{
|
{
|
||||||
|
Display *dpy = scr->display;
|
||||||
|
WMColor *white = WMWhiteColor(scr);
|
||||||
|
WMColor *black = WMBlackColor(scr);
|
||||||
|
GC bgc = scr->monoGC;
|
||||||
|
GC gc = WMColorGC(white);
|
||||||
int rad = h*3/10;
|
int rad = h*3/10;
|
||||||
XPoint pt[3];
|
XPoint pt[3], ipt[3];
|
||||||
|
int w1;
|
||||||
|
|
||||||
XFillArc(dpy, pix, gc, x, y, rad, rad, 90*64, 90*64);
|
/* outline */
|
||||||
XFillArc(dpy, pix, gc, x, y+h-1-rad, rad, rad, 180*64, 90*64);
|
XSetForeground(dpy, bgc, 1);
|
||||||
|
|
||||||
XFillArc(dpy, pix, gc, x+w-1-rad, y, rad, rad, 0*64, 90*64);
|
XFillArc(dpy, bitmap, bgc, x, y, rad, rad, 90*64, 90*64);
|
||||||
XFillArc(dpy, pix, gc, x+w-1-rad, y+h-1-rad, rad, rad, 270*64, 90*64);
|
XFillArc(dpy, bitmap, bgc, x, y+h-1-rad, rad, rad, 180*64, 90*64);
|
||||||
|
|
||||||
XFillRectangle(dpy, pix, gc, x, y+rad/2, w, h-rad);
|
XFillArc(dpy, bitmap, bgc, x+w-1-rad, y, rad, rad, 0*64, 90*64);
|
||||||
XFillRectangle(dpy, pix, gc, x+rad/2, y, w-rad, h);
|
XFillArc(dpy, bitmap, bgc, x+w-1-rad, y+h-1-rad, rad, rad, 270*64, 90*64);
|
||||||
|
|
||||||
|
XFillRectangle(dpy, bitmap, bgc, x, y+rad/2, w, h-rad);
|
||||||
|
XFillRectangle(dpy, bitmap, bgc, x+rad/2, y, w-rad, h);
|
||||||
|
|
||||||
|
/* interior */
|
||||||
|
XFillArc(dpy, pix, gc, x+1, y+1, rad, rad, 90*64, 90*64);
|
||||||
|
XFillArc(dpy, pix, gc, x+1, y+h-2-rad, rad, rad, 180*64, 90*64);
|
||||||
|
|
||||||
|
XFillArc(dpy, pix, gc, x+w-2-rad, y+1, rad, rad, 0*64, 90*64);
|
||||||
|
XFillArc(dpy, pix, gc, x+w-2-rad, y+h-2-rad, rad, rad, 270*64, 90*64);
|
||||||
|
|
||||||
|
XFillRectangle(dpy, pix, gc, x+1, y+1+rad/2, w-2, h-2-rad);
|
||||||
|
XFillRectangle(dpy, pix, gc, x+1+rad/2, y+1, w-2-rad, h-2);
|
||||||
|
|
||||||
if (side & BOTTOM) {
|
if (side & BOTTOM) {
|
||||||
pt[0].y = y+h-1;
|
pt[0].y = y+h-1;
|
||||||
pt[1].y = y+h-1+SPACE;
|
pt[1].y = y+h-1+SPACE;
|
||||||
pt[2].y = y+h-1;
|
pt[2].y = y+h-1;
|
||||||
|
ipt[0].y = pt[0].y-1;
|
||||||
|
ipt[1].y = pt[1].y-1;
|
||||||
|
ipt[2].y = pt[2].y-1;
|
||||||
} else {
|
} else {
|
||||||
pt[0].y = y;
|
pt[0].y = y;
|
||||||
pt[1].y = y-SPACE;
|
pt[1].y = y-SPACE;
|
||||||
pt[2].y = y;
|
pt[2].y = y;
|
||||||
|
ipt[0].y = pt[0].y+1;
|
||||||
|
ipt[1].y = pt[1].y+1;
|
||||||
|
ipt[2].y = pt[2].y+1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*w1 = WMAX(h, 24);*/
|
||||||
|
w1 = WMAX(h, 21);
|
||||||
|
|
||||||
if (side & RIGHT) {
|
if (side & RIGHT) {
|
||||||
pt[0].x = x+w-h+2*h/16;
|
pt[0].x = x+w-w1+2*w1/16;
|
||||||
pt[1].x = x+w-h+11*h/16;
|
pt[1].x = x+w-w1+11*w1/16;
|
||||||
pt[2].x = x+w-h+7*h/16;
|
pt[2].x = x+w-w1+7*w1/16;
|
||||||
|
ipt[0].x = x+1+w-w1+2*(w1-1)/16;
|
||||||
|
ipt[1].x = x+1+w-w1+11*(w1-1)/16;
|
||||||
|
ipt[2].x = x+1+w-w1+7*(w1-1)/16;
|
||||||
|
/*ipt[0].x = pt[0].x+1;
|
||||||
|
ipt[1].x = pt[1].x;
|
||||||
|
ipt[2].x = pt[2].x;*/
|
||||||
} else {
|
} else {
|
||||||
pt[0].x = x+h-2*h/16;
|
pt[0].x = x+w1-2*w1/16;
|
||||||
pt[1].x = x+h-11*h/16;
|
pt[1].x = x+w1-11*w1/16;
|
||||||
pt[2].x = x+h-7*h/16;
|
pt[2].x = x+w1-7*w1/16;
|
||||||
|
ipt[0].x = x-1+w1-2*(w1-1)/16;
|
||||||
|
ipt[1].x = x-1+w1-11*(w1-1)/16;
|
||||||
|
ipt[2].x = x-1+w1-7*(w1-1)/16;
|
||||||
|
/*ipt[0].x = pt[0].x-1;
|
||||||
|
ipt[1].x = pt[1].x;
|
||||||
|
ipt[2].x = pt[2].x;*/
|
||||||
}
|
}
|
||||||
XFillPolygon(dpy, pix, gc, pt, 3, Convex, CoordModeOrigin);
|
|
||||||
|
XFillPolygon(dpy, bitmap, bgc, pt, 3, Convex, CoordModeOrigin);
|
||||||
|
XFillPolygon(dpy, pix, gc, ipt, 3, Convex, CoordModeOrigin);
|
||||||
|
|
||||||
|
/* fix outline */
|
||||||
|
XDrawLines(dpy, pix, WMColorGC(black), pt, 3, CoordModeOrigin);
|
||||||
|
if (side & RIGHT) {
|
||||||
|
pt[0].x++;
|
||||||
|
pt[2].x--;
|
||||||
|
} else {
|
||||||
|
pt[0].x--;
|
||||||
|
pt[2].x++;
|
||||||
|
}
|
||||||
|
XDrawLines(dpy, pix, WMColorGC(black), pt, 3, CoordModeOrigin);
|
||||||
|
|
||||||
|
WMReleaseColor(white);
|
||||||
|
WMReleaseColor(black);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -320,7 +377,6 @@ makePixmap(WMScreen *scr, int width, int height, int side, Pixmap *mask)
|
|||||||
Pixmap pixmap;
|
Pixmap pixmap;
|
||||||
int x, y;
|
int x, y;
|
||||||
WMColor *black = WMBlackColor(scr);
|
WMColor *black = WMBlackColor(scr);
|
||||||
WMColor *white = WMWhiteColor(scr);
|
|
||||||
|
|
||||||
bitmap = XCreatePixmap(dpy, scr->rootWin, width+SPACE, height+SPACE, 1);
|
bitmap = XCreatePixmap(dpy, scr->rootWin, width+SPACE, height+SPACE, 1);
|
||||||
|
|
||||||
@@ -330,8 +386,8 @@ makePixmap(WMScreen *scr, int width, int height, int side, Pixmap *mask)
|
|||||||
pixmap = XCreatePixmap(dpy, scr->rootWin, width+SPACE, height+SPACE,
|
pixmap = XCreatePixmap(dpy, scr->rootWin, width+SPACE, height+SPACE,
|
||||||
scr->depth);
|
scr->depth);
|
||||||
|
|
||||||
XFillRectangle(dpy, pixmap, WMColorGC(black), 0, 0,
|
XFillRectangle(dpy, pixmap, WMColorGC(black), 0, 0, width+SPACE,
|
||||||
width+SPACE, height+SPACE);
|
height+SPACE);
|
||||||
|
|
||||||
if (side & BOTTOM) {
|
if (side & BOTTOM) {
|
||||||
y = 0;
|
y = 0;
|
||||||
@@ -340,22 +396,18 @@ makePixmap(WMScreen *scr, int width, int height, int side, Pixmap *mask)
|
|||||||
}
|
}
|
||||||
x = 0;
|
x = 0;
|
||||||
|
|
||||||
XSetForeground(dpy, scr->monoGC, 1);
|
drawBalloon(scr, bitmap, pixmap, x, y, width, height, side);
|
||||||
drawBalloon(dpy, bitmap, scr->monoGC, x, y, width, height, side);
|
|
||||||
drawBalloon(dpy, pixmap, WMColorGC(white), x+1, y+1, width-2, height-2,
|
|
||||||
side);
|
|
||||||
|
|
||||||
*mask = bitmap;
|
*mask = bitmap;
|
||||||
|
|
||||||
WMReleaseColor(black);
|
WMReleaseColor(black);
|
||||||
WMReleaseColor(white);
|
|
||||||
|
|
||||||
return pixmap;
|
return pixmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
showText(Balloon *bPtr, int x, int y, int h, int w, char *text)
|
showText(Balloon *bPtr, int x, int y, int w, int h, char *text)
|
||||||
{
|
{
|
||||||
WMScreen *scr = bPtr->view->screen;
|
WMScreen *scr = bPtr->view->screen;
|
||||||
Display *dpy = WMScreenDisplay(scr);
|
Display *dpy = WMScreenDisplay(scr);
|
||||||
@@ -424,7 +476,7 @@ showText(Balloon *bPtr, int x, int y, int h, int w, char *text)
|
|||||||
|
|
||||||
W_PaintText(bPtr->view, pixmap, font, 8, ty + (height - textHeight)/2,
|
W_PaintText(bPtr->view, pixmap, font, 8, ty + (height - textHeight)/2,
|
||||||
width, bPtr->flags.alignment,
|
width, bPtr->flags.alignment,
|
||||||
WMColorGC(bPtr->textColor ? bPtr->textColor : scr->black),
|
bPtr->textColor ? bPtr->textColor : scr->black,
|
||||||
False, text, strlen(text));
|
False, text, strlen(text));
|
||||||
|
|
||||||
XSetWindowBackgroundPixmap(dpy, bPtr->view->window, pixmap);
|
XSetWindowBackgroundPixmap(dpy, bPtr->view->window, pixmap);
|
||||||
|
|||||||
+112
-98
@@ -18,8 +18,7 @@ typedef struct W_Box {
|
|||||||
W_Class widgetClass;
|
W_Class widgetClass;
|
||||||
W_View *view;
|
W_View *view;
|
||||||
|
|
||||||
SubviewItem *subviews;
|
WMArray *subviews;
|
||||||
int subviewCount;
|
|
||||||
|
|
||||||
short borderWidth;
|
short borderWidth;
|
||||||
|
|
||||||
@@ -68,84 +67,105 @@ WMCreateBox(WMWidget *parent)
|
|||||||
|
|
||||||
bPtr->view->delegate = &delegate;
|
bPtr->view->delegate = &delegate;
|
||||||
|
|
||||||
|
bPtr->subviews = WMCreateArrayWithDestructor(2, wfree);
|
||||||
|
|
||||||
WMCreateEventHandler(bPtr->view, StructureNotifyMask,
|
WMCreateEventHandler(bPtr->view, StructureNotifyMask,
|
||||||
handleEvents, bPtr);
|
handleEvents, bPtr);
|
||||||
|
|
||||||
WMResizeWidget(bPtr, DEFAULT_WIDTH, DEFAULT_HEIGHT);
|
WMResizeWidget(bPtr, DEFAULT_WIDTH, DEFAULT_HEIGHT);
|
||||||
|
|
||||||
bPtr->subviews = NULL;
|
|
||||||
bPtr->subviewCount = 0;
|
|
||||||
|
|
||||||
return bPtr;
|
return bPtr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
WMBox *box;
|
||||||
|
int total;
|
||||||
|
int expands;
|
||||||
|
int x, y;
|
||||||
|
int xe, ye;
|
||||||
|
int w, h;
|
||||||
|
} BoxData;
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
computeExpansion(void *object, void *cdata)
|
||||||
|
{
|
||||||
|
SubviewItem *item = (SubviewItem*)object;
|
||||||
|
BoxData *eData = (BoxData*)cdata;
|
||||||
|
|
||||||
|
eData->total -= item->minSize;
|
||||||
|
eData->total -= item->space;
|
||||||
|
if (item->expand) {
|
||||||
|
eData->expands++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
doRearrange(void *object, void *cdata)
|
||||||
|
{
|
||||||
|
SubviewItem *item = (SubviewItem*)object;
|
||||||
|
BoxData *eData = (BoxData*)cdata;
|
||||||
|
|
||||||
|
if (eData->box->horizontal) {
|
||||||
|
eData->w = item->minSize;
|
||||||
|
if (item->expand)
|
||||||
|
eData->w += eData->total/eData->expands;
|
||||||
|
} else {
|
||||||
|
eData->h = item->minSize;
|
||||||
|
if (item->expand)
|
||||||
|
eData->h += eData->total/eData->expands;
|
||||||
|
}
|
||||||
|
if (!item->end) {
|
||||||
|
W_MoveView(item->view, eData->x, eData->y);
|
||||||
|
}
|
||||||
|
W_ResizeView(item->view, eData->w, eData->h);
|
||||||
|
if (eData->box->horizontal) {
|
||||||
|
if (item->end)
|
||||||
|
eData->xe -= eData->w + item->space;
|
||||||
|
else
|
||||||
|
eData->x += eData->w + item->space;
|
||||||
|
} else {
|
||||||
|
if (item->end)
|
||||||
|
eData->ye -= eData->h + item->space;
|
||||||
|
else
|
||||||
|
eData->y += eData->h + item->space;
|
||||||
|
}
|
||||||
|
if (item->end) {
|
||||||
|
W_MoveView(item->view, eData->xe, eData->ye);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
rearrange(WMBox *box)
|
rearrange(WMBox *box)
|
||||||
{
|
{
|
||||||
int i;
|
BoxData eData;
|
||||||
int x, y;
|
|
||||||
int xe, ye;
|
|
||||||
int w = 1, h = 1;
|
|
||||||
int total;
|
|
||||||
int expands = 0;
|
|
||||||
|
|
||||||
x = box->borderWidth;
|
eData.box = box;
|
||||||
y = box->borderWidth;
|
eData.x = eData.y = box->borderWidth;
|
||||||
|
eData.w = eData.h = 1;
|
||||||
|
eData.expands = 0;
|
||||||
|
|
||||||
if (box->horizontal) {
|
if (box->horizontal) {
|
||||||
ye = box->borderWidth;
|
eData.ye = box->borderWidth;
|
||||||
xe = WMWidgetWidth(box) - box->borderWidth;
|
eData.xe = WMWidgetWidth(box) - box->borderWidth;
|
||||||
h = WMWidgetHeight(box) - 2 * box->borderWidth;
|
eData.h = WMWidgetHeight(box) - 2 * box->borderWidth;
|
||||||
total = WMWidgetWidth(box) - 2 * box->borderWidth;
|
eData.total = WMWidgetWidth(box) - 2 * box->borderWidth;
|
||||||
} else {
|
} else {
|
||||||
xe = box->borderWidth;
|
eData.xe = box->borderWidth;
|
||||||
ye = WMWidgetHeight(box) - box->borderWidth;
|
eData.ye = WMWidgetHeight(box) - box->borderWidth;
|
||||||
w = WMWidgetWidth(box) - 2 * box->borderWidth;
|
eData.w = WMWidgetWidth(box) - 2 * box->borderWidth;
|
||||||
total = WMWidgetHeight(box) - 2 * box->borderWidth;
|
eData.total = WMWidgetHeight(box) - 2 * box->borderWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (w <= 0 || h <= 0 || total <= 0) {
|
if (eData.w <= 0 || eData.h <= 0 || eData.total <= 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < box->subviewCount; i++) {
|
WMMapArray(box->subviews, computeExpansion, &eData);
|
||||||
total -= box->subviews[i].minSize;
|
WMMapArray(box->subviews, doRearrange, &eData);
|
||||||
total -= box->subviews[i].space;
|
|
||||||
if (box->subviews[i].expand) {
|
|
||||||
expands++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < box->subviewCount; i++) {
|
|
||||||
if (box->horizontal) {
|
|
||||||
w = box->subviews[i].minSize;
|
|
||||||
if (box->subviews[i].expand)
|
|
||||||
w += total/expands;
|
|
||||||
} else {
|
|
||||||
h = box->subviews[i].minSize;
|
|
||||||
if (box->subviews[i].expand)
|
|
||||||
h += total/expands;
|
|
||||||
}
|
|
||||||
if (!box->subviews[i].end) {
|
|
||||||
W_MoveView(box->subviews[i].view, x, y);
|
|
||||||
}
|
|
||||||
W_ResizeView(box->subviews[i].view, w, h);
|
|
||||||
if (box->horizontal) {
|
|
||||||
if (box->subviews[i].end)
|
|
||||||
xe -= w + box->subviews[i].space;
|
|
||||||
else
|
|
||||||
x += w + box->subviews[i].space;
|
|
||||||
} else {
|
|
||||||
if (box->subviews[i].end)
|
|
||||||
ye -= h + box->subviews[i].space;
|
|
||||||
else
|
|
||||||
y += h + box->subviews[i].space;
|
|
||||||
}
|
|
||||||
if (box->subviews[i].end) {
|
|
||||||
W_MoveView(box->subviews[i].view, xe, ye);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -163,21 +183,18 @@ void
|
|||||||
WMAddBoxSubview(WMBox *bPtr, WMView *view, Bool expand, Bool fill,
|
WMAddBoxSubview(WMBox *bPtr, WMView *view, Bool expand, Bool fill,
|
||||||
int minSize, int maxSize, int space)
|
int minSize, int maxSize, int space)
|
||||||
{
|
{
|
||||||
int i = bPtr->subviewCount;
|
SubviewItem *subView;
|
||||||
|
|
||||||
bPtr->subviewCount++;
|
subView = wmalloc(sizeof(SubviewItem));
|
||||||
if (!bPtr->subviews)
|
subView->view = view;
|
||||||
bPtr->subviews = wmalloc(sizeof(SubviewItem));
|
subView->minSize = minSize;
|
||||||
else
|
subView->maxSize = maxSize;
|
||||||
bPtr->subviews = wrealloc(bPtr->subviews,
|
subView->expand = expand;
|
||||||
bPtr->subviewCount*sizeof(SubviewItem));
|
subView->fill = fill;
|
||||||
bPtr->subviews[i].view = view;
|
subView->space = space;
|
||||||
bPtr->subviews[i].minSize = minSize;
|
subView->end = 0;
|
||||||
bPtr->subviews[i].maxSize = maxSize;
|
|
||||||
bPtr->subviews[i].expand = expand;
|
WMAddToArray(bPtr->subviews, subView);
|
||||||
bPtr->subviews[i].fill = fill;
|
|
||||||
bPtr->subviews[i].space = space;
|
|
||||||
bPtr->subviews[i].end = 0;
|
|
||||||
|
|
||||||
rearrange(bPtr);
|
rearrange(bPtr);
|
||||||
}
|
}
|
||||||
@@ -188,41 +205,37 @@ void
|
|||||||
WMAddBoxSubviewAtEnd(WMBox *bPtr, WMView *view, Bool expand, Bool fill,
|
WMAddBoxSubviewAtEnd(WMBox *bPtr, WMView *view, Bool expand, Bool fill,
|
||||||
int minSize, int maxSize, int space)
|
int minSize, int maxSize, int space)
|
||||||
{
|
{
|
||||||
int i = bPtr->subviewCount;
|
SubviewItem *subView;
|
||||||
|
|
||||||
bPtr->subviewCount++;
|
subView = wmalloc(sizeof(SubviewItem));
|
||||||
if (!bPtr->subviews)
|
subView->view = view;
|
||||||
bPtr->subviews = wmalloc(sizeof(SubviewItem));
|
subView->minSize = minSize;
|
||||||
else
|
subView->maxSize = maxSize;
|
||||||
bPtr->subviews = wrealloc(bPtr->subviews,
|
subView->expand = expand;
|
||||||
bPtr->subviewCount*sizeof(SubviewItem));
|
subView->fill = fill;
|
||||||
bPtr->subviews[i].view = view;
|
subView->space = space;
|
||||||
bPtr->subviews[i].minSize = minSize;
|
subView->end = 1;
|
||||||
bPtr->subviews[i].maxSize = maxSize;
|
|
||||||
bPtr->subviews[i].expand = expand;
|
WMAddToArray(bPtr->subviews, subView);
|
||||||
bPtr->subviews[i].fill = fill;
|
|
||||||
bPtr->subviews[i].space = space;
|
|
||||||
bPtr->subviews[i].end = 1;
|
|
||||||
|
|
||||||
rearrange(bPtr);
|
rearrange(bPtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int
|
||||||
|
matchView(void *item, void *cdata)
|
||||||
|
{
|
||||||
|
return (((SubviewItem*)item)->view == (WMView*)cdata);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WMRemoveBoxSubview(WMBox *bPtr, WMView *view)
|
WMRemoveBoxSubview(WMBox *bPtr, WMView *view)
|
||||||
{
|
{
|
||||||
int i;
|
if (WMRemoveFromArrayMatching(bPtr->subviews, matchView, view)) {
|
||||||
|
|
||||||
for (i = 0; i < bPtr->subviewCount; i++) {
|
|
||||||
if (bPtr->subviews[i].view == view) {
|
|
||||||
memmove(&bPtr->subviews[i], &bPtr->subviews[i+1],
|
|
||||||
(bPtr->subviewCount - i - 1) * sizeof(void*));
|
|
||||||
bPtr->subviewCount--;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
rearrange(bPtr);
|
rearrange(bPtr);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -240,7 +253,7 @@ WMSetBoxHorizontal(WMBox *box, Bool flag)
|
|||||||
static void
|
static void
|
||||||
destroyBox(Box *bPtr)
|
destroyBox(Box *bPtr)
|
||||||
{
|
{
|
||||||
WMRemoveNotificationObserver(bPtr);
|
WMFreeArray(bPtr->subviews);
|
||||||
wfree(bPtr);
|
wfree(bPtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -270,3 +283,4 @@ handleEvents(XEvent *event, void *data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+20
-23
@@ -156,7 +156,7 @@ WMSetBrowserAllowMultipleSelection(WMBrowser *bPtr, Bool flag)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
bPtr->flags.allowMultipleSelection = flag ? 1 : 0;
|
bPtr->flags.allowMultipleSelection = ((flag==0) ? 0 : 1);
|
||||||
for (i=0; i<bPtr->columnCount; i++) {
|
for (i=0; i<bPtr->columnCount; i++) {
|
||||||
WMSetListAllowMultipleSelection(bPtr->columns[i], flag);
|
WMSetListAllowMultipleSelection(bPtr->columns[i], flag);
|
||||||
}
|
}
|
||||||
@@ -168,7 +168,7 @@ WMSetBrowserAllowEmptySelection(WMBrowser *bPtr, Bool flag)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
bPtr->flags.allowEmptySelection = flag ? 1 : 0;
|
bPtr->flags.allowEmptySelection = ((flag==0) ? 0 : 1);
|
||||||
for (i=0; i<bPtr->columnCount; i++) {
|
for (i=0; i<bPtr->columnCount; i++) {
|
||||||
WMSetListAllowEmptySelection(bPtr->columns[i], flag);
|
WMSetListAllowEmptySelection(bPtr->columns[i], flag);
|
||||||
}
|
}
|
||||||
@@ -280,13 +280,13 @@ drawTitleOfColumn(WMBrowser *bPtr, int column)
|
|||||||
&titleLen, widthC);
|
&titleLen, widthC);
|
||||||
W_PaintText(bPtr->view, bPtr->view->window, scr->boldFont, x,
|
W_PaintText(bPtr->view, bPtr->view->window, scr->boldFont, x,
|
||||||
(bPtr->titleHeight-WMFontHeight(scr->boldFont))/2,
|
(bPtr->titleHeight-WMFontHeight(scr->boldFont))/2,
|
||||||
bPtr->columnSize.width, WACenter, WMColorGC(scr->white),
|
bPtr->columnSize.width, WACenter, scr->white,
|
||||||
False, titleBuf, titleLen);
|
False, titleBuf, titleLen);
|
||||||
wfree (titleBuf);
|
wfree (titleBuf);
|
||||||
} else {
|
} else {
|
||||||
W_PaintText(bPtr->view, bPtr->view->window, scr->boldFont, x,
|
W_PaintText(bPtr->view, bPtr->view->window, scr->boldFont, x,
|
||||||
(bPtr->titleHeight-WMFontHeight(scr->boldFont))/2,
|
(bPtr->titleHeight-WMFontHeight(scr->boldFont))/2,
|
||||||
bPtr->columnSize.width, WACenter, WMColorGC(scr->white),
|
bPtr->columnSize.width, WACenter, scr->white,
|
||||||
False, bPtr->titles[column], titleLen);
|
False, bPtr->titles[column], titleLen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -423,6 +423,8 @@ WMSetBrowserTitled(WMBrowser *bPtr, Bool flag)
|
|||||||
int i;
|
int i;
|
||||||
int columnX, columnY;
|
int columnX, columnY;
|
||||||
|
|
||||||
|
flag = ((flag==0) ? 0 : 1);
|
||||||
|
|
||||||
if (bPtr->flags.isTitled == flag)
|
if (bPtr->flags.isTitled == flag)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -538,50 +540,45 @@ willResizeBrowser(W_ViewDelegate *self, WMView *view,
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
paintItem(WMList *lPtr, int index, Drawable d, char *text, int state,
|
paintItem(WMList *lPtr, int index, Drawable d, char *text, int state, WMRect *rect)
|
||||||
WMRect *rect)
|
|
||||||
{
|
{
|
||||||
WMView *view = W_VIEW(lPtr);
|
WMView *view = W_VIEW(lPtr);
|
||||||
W_Screen *scr = view->screen;
|
W_Screen *scr = view->screen;
|
||||||
int width, height, x, y;
|
Display *display = scr->display;
|
||||||
|
WMFont *font = ((state & WLDSIsBranch) ? scr->boldFont : scr->normalFont);
|
||||||
|
WMColor *backColor = ((state & WLDSSelected) ? scr->white : view->backColor);
|
||||||
|
int width, height, x, y, textLen;
|
||||||
|
|
||||||
width = rect->size.width;
|
width = rect->size.width;
|
||||||
height = rect->size.height;
|
height = rect->size.height;
|
||||||
x = rect->pos.x;
|
x = rect->pos.x;
|
||||||
y = rect->pos.y;
|
y = rect->pos.y;
|
||||||
|
textLen = strlen(text);
|
||||||
|
|
||||||
if (state & WLDSSelected)
|
XFillRectangle(display, d, WMColorGC(backColor), x, y, width, height);
|
||||||
XFillRectangle(scr->display, d, WMColorGC(scr->white), x, y,
|
|
||||||
width, height);
|
|
||||||
else
|
|
||||||
XClearArea(scr->display, d, x, y, width, height, False);
|
|
||||||
|
|
||||||
if (text) {
|
if (text) {
|
||||||
/* Avoid overlaping... */
|
/* Avoid overlaping... */
|
||||||
WMFont *font = (state & WLDSIsBranch) ? scr->boldFont : scr->normalFont;
|
|
||||||
int textLen = strlen(text);
|
|
||||||
int widthC = (state & WLDSIsBranch) ? width-20 : width-8;
|
int widthC = (state & WLDSIsBranch) ? width-20 : width-8;
|
||||||
if (WMWidthOfString(font, text, textLen) > widthC) {
|
if (WMWidthOfString(font, text, textLen) > widthC) {
|
||||||
char *textBuf = createTruncatedString(font, text, &textLen, widthC);
|
char *textBuf = createTruncatedString(font, text, &textLen, widthC);
|
||||||
W_PaintText(view, d, font, x+4, y, widthC,
|
W_PaintText(view, d, font, x+4, y, widthC,
|
||||||
WALeft, WMColorGC(scr->black), False, textBuf, textLen);
|
WALeft, scr->black, False, textBuf, textLen);
|
||||||
wfree(textBuf);
|
wfree(textBuf);
|
||||||
} else {
|
} else {
|
||||||
W_PaintText(view, d, font, x+4, y, widthC,
|
W_PaintText(view, d, font, x+4, y, widthC,
|
||||||
WALeft, WMColorGC(scr->black), False, text, textLen);
|
WALeft, scr->black, False, text, textLen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state & WLDSIsBranch) {
|
if (state & WLDSIsBranch) {
|
||||||
XDrawLine(scr->display, d, WMColorGC(scr->darkGray), x+width-11, y+3,
|
WMColor *lineColor = ((state & WLDSSelected) ? scr->gray : scr->white);
|
||||||
|
|
||||||
|
XDrawLine(display, d, WMColorGC(scr->darkGray), x+width-11, y+3,
|
||||||
x+width-6, y+height/2);
|
x+width-6, y+height/2);
|
||||||
if (state & WLDSSelected)
|
XDrawLine(display, d, WMColorGC(lineColor), x+width-11, y+height-5,
|
||||||
XDrawLine(scr->display, d,WMColorGC(scr->gray), x+width-11, y+height-5,
|
|
||||||
x+width-6, y+height/2);
|
x+width-6, y+height/2);
|
||||||
else
|
XDrawLine(display, d, WMColorGC(scr->black), x+width-12, y+3,
|
||||||
XDrawLine(scr->display, d,WMColorGC(scr->white), x+width-11, y+height-5,
|
|
||||||
x+width-6, y+height/2);
|
|
||||||
XDrawLine(scr->display, d, WMColorGC(scr->black), x+width-12, y+3,
|
|
||||||
x+width-12, y+height-5);
|
x+width-12, y+height-5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+38
-12
@@ -44,6 +44,8 @@ typedef struct W_Button {
|
|||||||
|
|
||||||
unsigned int enabled:1;
|
unsigned int enabled:1;
|
||||||
|
|
||||||
|
unsigned int dimsWhenDisabled:1;
|
||||||
|
|
||||||
unsigned int bordered:1;
|
unsigned int bordered:1;
|
||||||
|
|
||||||
unsigned int springLoaded:1;
|
unsigned int springLoaded:1;
|
||||||
@@ -61,7 +63,7 @@ typedef struct W_Button {
|
|||||||
unsigned int statePush:1; /* state indicated by relief */
|
unsigned int statePush:1; /* state indicated by relief */
|
||||||
|
|
||||||
unsigned int continuous:1; /* continually perform action */
|
unsigned int continuous:1; /* continually perform action */
|
||||||
/* */
|
|
||||||
unsigned int prevSelected:1;
|
unsigned int prevSelected:1;
|
||||||
|
|
||||||
unsigned int pushed:1;
|
unsigned int pushed:1;
|
||||||
@@ -141,7 +143,7 @@ WMCreateCustomButton(WMWidget *parent, int behaviourMask)
|
|||||||
bPtr->flags.bordered = DEFAULT_BUTTON_IS_BORDERED;
|
bPtr->flags.bordered = DEFAULT_BUTTON_IS_BORDERED;
|
||||||
|
|
||||||
bPtr->flags.enabled = 1;
|
bPtr->flags.enabled = 1;
|
||||||
|
bPtr->flags.dimsWhenDisabled = 1;
|
||||||
|
|
||||||
WMCreateEventHandler(bPtr->view, ExposureMask|StructureNotifyMask,
|
WMCreateEventHandler(bPtr->view, ExposureMask|StructureNotifyMask,
|
||||||
handleEvents, bPtr);
|
handleEvents, bPtr);
|
||||||
@@ -239,6 +241,12 @@ updateDisabledMask(WMButton *bPtr)
|
|||||||
if (bPtr->image) {
|
if (bPtr->image) {
|
||||||
XGCValues gcv;
|
XGCValues gcv;
|
||||||
|
|
||||||
|
if (bPtr->dimage->mask) {
|
||||||
|
XFreePixmap(dpy, bPtr->dimage->mask);
|
||||||
|
bPtr->dimage->mask = None;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bPtr->flags.dimsWhenDisabled) {
|
||||||
bPtr->dimage->mask = XCreatePixmap(dpy, scr->stipple,
|
bPtr->dimage->mask = XCreatePixmap(dpy, scr->stipple,
|
||||||
bPtr->dimage->width,
|
bPtr->dimage->width,
|
||||||
bPtr->dimage->height, 1);
|
bPtr->dimage->height, 1);
|
||||||
@@ -266,6 +274,7 @@ updateDisabledMask(WMButton *bPtr)
|
|||||||
XChangeGC(dpy, scr->monoGC, GCFillStyle|GCClipMask, &gcv);
|
XChangeGC(dpy, scr->monoGC, GCFillStyle|GCClipMask, &gcv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
WMSetButtonImageDefault(WMButton *bPtr)
|
WMSetButtonImageDefault(WMButton *bPtr)
|
||||||
@@ -410,7 +419,7 @@ WMSetButtonDisabledTextColor(WMButton *bPtr, WMColor *color)
|
|||||||
void
|
void
|
||||||
WMSetButtonSelected(WMButton *bPtr, int isSelected)
|
WMSetButtonSelected(WMButton *bPtr, int isSelected)
|
||||||
{
|
{
|
||||||
bPtr->flags.selected = isSelected;
|
bPtr->flags.selected = isSelected ? 1 : 0;
|
||||||
|
|
||||||
if (bPtr->view->flags.realized) {
|
if (bPtr->view->flags.realized) {
|
||||||
paintButton(bPtr);
|
paintButton(bPtr);
|
||||||
@@ -453,7 +462,7 @@ WMSetButtonFont(WMButton *bPtr, WMFont *font)
|
|||||||
void
|
void
|
||||||
WMSetButtonEnabled(WMButton *bPtr, Bool flag)
|
WMSetButtonEnabled(WMButton *bPtr, Bool flag)
|
||||||
{
|
{
|
||||||
bPtr->flags.enabled = flag;
|
bPtr->flags.enabled = ((flag==0) ? 0 : 1);
|
||||||
|
|
||||||
if (bPtr->view->flags.mapped) {
|
if (bPtr->view->flags.mapped) {
|
||||||
paintButton(bPtr);
|
paintButton(bPtr);
|
||||||
@@ -461,6 +470,24 @@ WMSetButtonEnabled(WMButton *bPtr, Bool flag)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
WMGetButtonEnabled(WMButton *bPtr)
|
||||||
|
{
|
||||||
|
CHECK_CLASS(bPtr, WC_Button);
|
||||||
|
|
||||||
|
return bPtr->flags.enabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
WMSetButtonImageDimsWhenDisabled(WMButton *bPtr, Bool flag)
|
||||||
|
{
|
||||||
|
bPtr->flags.dimsWhenDisabled = ((flag==0) ? 0 : 1);
|
||||||
|
|
||||||
|
updateDisabledMask(bPtr);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WMSetButtonTag(WMButton *bPtr, int tag)
|
WMSetButtonTag(WMButton *bPtr, int tag)
|
||||||
{
|
{
|
||||||
@@ -468,7 +495,6 @@ WMSetButtonTag(WMButton *bPtr, int tag)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WMPerformButtonClick(WMButton *bPtr)
|
WMPerformButtonClick(WMButton *bPtr)
|
||||||
{
|
{
|
||||||
@@ -560,7 +586,7 @@ WMGroupButtons(WMButton *bPtr, WMButton *newMember)
|
|||||||
void
|
void
|
||||||
WMSetButtonContinuous(WMButton *bPtr, Bool flag)
|
WMSetButtonContinuous(WMButton *bPtr, Bool flag)
|
||||||
{
|
{
|
||||||
bPtr->flags.continuous = flag;
|
bPtr->flags.continuous = ((flag==0) ? 0 : 1);
|
||||||
if (bPtr->timer) {
|
if (bPtr->timer) {
|
||||||
WMDeleteTimerHandler(bPtr->timer);
|
WMDeleteTimerHandler(bPtr->timer);
|
||||||
bPtr->timer = NULL;
|
bPtr->timer = NULL;
|
||||||
@@ -586,9 +612,9 @@ paintButton(Button *bPtr)
|
|||||||
char *caption;
|
char *caption;
|
||||||
WMPixmap *image;
|
WMPixmap *image;
|
||||||
WMColor *textColor;
|
WMColor *textColor;
|
||||||
GC gc;
|
WMColor *backColor;
|
||||||
|
|
||||||
gc = NULL;
|
backColor = NULL;
|
||||||
caption = bPtr->caption;
|
caption = bPtr->caption;
|
||||||
|
|
||||||
if (bPtr->flags.enabled) {
|
if (bPtr->flags.enabled) {
|
||||||
@@ -611,7 +637,7 @@ paintButton(Button *bPtr)
|
|||||||
|
|
||||||
if (bPtr->flags.selected) {
|
if (bPtr->flags.selected) {
|
||||||
if (bPtr->flags.stateLight) {
|
if (bPtr->flags.stateLight) {
|
||||||
gc = WMColorGC(scrPtr->white);
|
backColor = scrPtr->white;
|
||||||
textColor = scrPtr->black;
|
textColor = scrPtr->black;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -636,7 +662,7 @@ paintButton(Button *bPtr)
|
|||||||
offset = 1;
|
offset = 1;
|
||||||
}
|
}
|
||||||
if (bPtr->flags.pushLight) {
|
if (bPtr->flags.pushLight) {
|
||||||
gc = WMColorGC(scrPtr->white);
|
backColor = scrPtr->white;
|
||||||
textColor = scrPtr->black;
|
textColor = scrPtr->black;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -650,10 +676,10 @@ paintButton(Button *bPtr)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
W_PaintTextAndImage(bPtr->view, True, WMColorGC(textColor),
|
W_PaintTextAndImage(bPtr->view, True, textColor,
|
||||||
(bPtr->font!=NULL ? bPtr->font : scrPtr->normalFont),
|
(bPtr->font!=NULL ? bPtr->font : scrPtr->normalFont),
|
||||||
relief, caption, bPtr->flags.alignment, image,
|
relief, caption, bPtr->flags.alignment, image,
|
||||||
bPtr->flags.imagePosition, gc, offset);
|
bPtr->flags.imagePosition, backColor, offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+48
-14
@@ -16,8 +16,9 @@ static unsigned char DARK_STIPPLE_BITS[] = {
|
|||||||
0x0a, 0x04, 0x0a, 0x01};
|
0x0a, 0x04, 0x0a, 0x01};
|
||||||
|
|
||||||
|
|
||||||
static WMColor *createRGBColor(WMScreen *scr, unsigned short red,
|
static WMColor *createRGBAColor(WMScreen *scr, unsigned short red,
|
||||||
unsigned short green, unsigned short blue);
|
unsigned short green, unsigned short blue,
|
||||||
|
unsigned short alpha);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* TODO: make the color creation code return the same WMColor for the
|
* TODO: make the color creation code return the same WMColor for the
|
||||||
@@ -28,7 +29,7 @@ static WMColor *createRGBColor(WMScreen *scr, unsigned short red,
|
|||||||
|
|
||||||
static WMColor*
|
static WMColor*
|
||||||
findCloseColor(WMScreen *scr, unsigned short red, unsigned short green,
|
findCloseColor(WMScreen *scr, unsigned short red, unsigned short green,
|
||||||
unsigned short blue)
|
unsigned short blue, unsigned short alpha)
|
||||||
{
|
{
|
||||||
WMColor *color;
|
WMColor *color;
|
||||||
XColor xcolor;
|
XColor xcolor;
|
||||||
@@ -37,6 +38,7 @@ findCloseColor(WMScreen *scr, unsigned short red, unsigned short green,
|
|||||||
rcolor.red = red>>8;
|
rcolor.red = red>>8;
|
||||||
rcolor.green = green>>8;
|
rcolor.green = green>>8;
|
||||||
rcolor.blue = blue>>8;
|
rcolor.blue = blue>>8;
|
||||||
|
rcolor.alpha = alpha>>8;
|
||||||
|
|
||||||
if (!RGetClosestXColor(scr->rcontext, &rcolor, &xcolor))
|
if (!RGetClosestXColor(scr->rcontext, &rcolor, &xcolor))
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -49,6 +51,7 @@ findCloseColor(WMScreen *scr, unsigned short red, unsigned short green,
|
|||||||
color->screen = scr;
|
color->screen = scr;
|
||||||
color->refCount = 1;
|
color->refCount = 1;
|
||||||
color->color = xcolor;
|
color->color = xcolor;
|
||||||
|
color->alpha = alpha;
|
||||||
color->flags.exact = 1;
|
color->flags.exact = 1;
|
||||||
color->gc = NULL;
|
color->gc = NULL;
|
||||||
|
|
||||||
@@ -58,8 +61,8 @@ findCloseColor(WMScreen *scr, unsigned short red, unsigned short green,
|
|||||||
|
|
||||||
|
|
||||||
static WMColor*
|
static WMColor*
|
||||||
createRGBColor(WMScreen *scr, unsigned short red, unsigned short green,
|
createRGBAColor(WMScreen *scr, unsigned short red, unsigned short green,
|
||||||
unsigned short blue)
|
unsigned short blue, unsigned short alpha)
|
||||||
{
|
{
|
||||||
WMColor *color;
|
WMColor *color;
|
||||||
XColor xcolor;
|
XColor xcolor;
|
||||||
@@ -76,6 +79,7 @@ createRGBColor(WMScreen *scr, unsigned short red, unsigned short green,
|
|||||||
color->screen = scr;
|
color->screen = scr;
|
||||||
color->refCount = 1;
|
color->refCount = 1;
|
||||||
color->color = xcolor;
|
color->color = xcolor;
|
||||||
|
color->alpha = alpha;
|
||||||
color->flags.exact = 1;
|
color->flags.exact = 1;
|
||||||
color->gc = NULL;
|
color->gc = NULL;
|
||||||
|
|
||||||
@@ -83,15 +87,30 @@ createRGBColor(WMScreen *scr, unsigned short red, unsigned short green,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
WMColor*
|
WMColor*
|
||||||
WMCreateRGBColor(WMScreen *scr, unsigned short red, unsigned short green,
|
WMCreateRGBColor(WMScreen *scr, unsigned short red, unsigned short green,
|
||||||
unsigned short blue, Bool exact)
|
unsigned short blue, Bool exact)
|
||||||
{
|
{
|
||||||
WMColor *color = NULL;
|
WMColor *color = NULL;
|
||||||
|
|
||||||
if (!exact || !(color=createRGBColor(scr, red, green, blue))) {
|
if (!exact || !(color=createRGBAColor(scr, red, green, blue, 0xffff))) {
|
||||||
color = findCloseColor(scr, red, green, blue);
|
color = findCloseColor(scr, red, green, blue, 0xffff);
|
||||||
|
}
|
||||||
|
if (!color)
|
||||||
|
color = WMBlackColor(scr);
|
||||||
|
|
||||||
|
return color;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
WMColor*
|
||||||
|
WMCreateRGBAColor(WMScreen *scr, unsigned short red, unsigned short green,
|
||||||
|
unsigned short blue, unsigned short alpha, Bool exact)
|
||||||
|
{
|
||||||
|
WMColor *color = NULL;
|
||||||
|
|
||||||
|
if (!exact || !(color=createRGBAColor(scr, red, green, blue, alpha))) {
|
||||||
|
color = findCloseColor(scr, red, green, blue, alpha);
|
||||||
}
|
}
|
||||||
if (!color)
|
if (!color)
|
||||||
color = WMBlackColor(scr);
|
color = WMBlackColor(scr);
|
||||||
@@ -112,9 +131,9 @@ WMCreateNamedColor(WMScreen *scr, char *name, Bool exact)
|
|||||||
if (scr->visual->class == TrueColor)
|
if (scr->visual->class == TrueColor)
|
||||||
exact = True;
|
exact = True;
|
||||||
|
|
||||||
if (!exact || !(color=createRGBColor(scr, xcolor.red, xcolor.green,
|
if (!exact || !(color=createRGBAColor(scr, xcolor.red, xcolor.green,
|
||||||
xcolor.blue))) {
|
xcolor.blue, 0xffff))) {
|
||||||
color = findCloseColor(scr, xcolor.red, xcolor.green, xcolor.blue);
|
color = findCloseColor(scr, xcolor.red, xcolor.green, xcolor.blue, 0xffff);
|
||||||
}
|
}
|
||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
@@ -147,6 +166,13 @@ WMReleaseColor(WMColor *color)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
WMSetColorAlpha(WMColor *color, unsigned short alpha)
|
||||||
|
{
|
||||||
|
color->alpha = alpha;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WMPaintColorSwatch(WMColor *color, Drawable d, int x, int y,
|
WMPaintColorSwatch(WMColor *color, Drawable d, int x, int y,
|
||||||
unsigned int width, unsigned int height)
|
unsigned int width, unsigned int height)
|
||||||
@@ -201,7 +227,6 @@ WMWhiteColor(WMScreen *scr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
WMColor*
|
WMColor*
|
||||||
WMBlackColor(WMScreen *scr)
|
WMBlackColor(WMScreen *scr)
|
||||||
{
|
{
|
||||||
@@ -231,7 +256,7 @@ WMGrayColor(WMScreen *scr)
|
|||||||
LIGHT_STIPPLE_BITS, LIGHT_STIPPLE_WIDTH,
|
LIGHT_STIPPLE_BITS, LIGHT_STIPPLE_WIDTH,
|
||||||
LIGHT_STIPPLE_HEIGHT);
|
LIGHT_STIPPLE_HEIGHT);
|
||||||
|
|
||||||
color = createRGBColor(scr, 0xffff, 0xffff, 0xffff);
|
color = createRGBAColor(scr, 0xffff, 0xffff, 0xffff, 0xffff);
|
||||||
|
|
||||||
gcv.foreground = white->color.pixel;
|
gcv.foreground = white->color.pixel;
|
||||||
gcv.background = black->color.pixel;
|
gcv.background = black->color.pixel;
|
||||||
@@ -272,7 +297,7 @@ WMDarkGrayColor(WMScreen *scr)
|
|||||||
DARK_STIPPLE_BITS, DARK_STIPPLE_WIDTH,
|
DARK_STIPPLE_BITS, DARK_STIPPLE_WIDTH,
|
||||||
DARK_STIPPLE_HEIGHT);
|
DARK_STIPPLE_HEIGHT);
|
||||||
|
|
||||||
color = createRGBColor(scr, 0, 0, 0);
|
color = createRGBAColor(scr, 0, 0, 0, 0xffff);
|
||||||
|
|
||||||
gcv.foreground = white->color.pixel;
|
gcv.foreground = white->color.pixel;
|
||||||
gcv.background = black->color.pixel;
|
gcv.background = black->color.pixel;
|
||||||
@@ -317,6 +342,13 @@ WMBlueComponentOfColor(WMColor *color)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
unsigned short
|
||||||
|
WMGetColorAlpha(WMColor *color)
|
||||||
|
{
|
||||||
|
return color->alpha;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
char*
|
char*
|
||||||
WMGetColorRGBDescription(WMColor *color)
|
WMGetColorRGBDescription(WMColor *color)
|
||||||
{
|
{
|
||||||
@@ -327,3 +359,5 @@ WMGetColorRGBDescription(WMColor *color)
|
|||||||
|
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+29
-30
@@ -36,7 +36,8 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
/* BUG There's something fishy with shaped windows */
|
/* BUG There's something fishy with shaped windows */
|
||||||
#if 1
|
/* Whithout shape extension the magnified image is completely broken -Dan */
|
||||||
|
#if 0
|
||||||
#ifdef SHAPE
|
#ifdef SHAPE
|
||||||
#define SHAPE_WAS_DEFINED
|
#define SHAPE_WAS_DEFINED
|
||||||
#undef SHAPE
|
#undef SHAPE
|
||||||
@@ -282,6 +283,10 @@ enum {
|
|||||||
#define M_PI 3.14159265358979323846
|
#define M_PI 3.14159265358979323846
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Silly hack for Windows systems with cygwin */
|
||||||
|
#ifndef O_BINARY
|
||||||
|
# define O_BINARY 0
|
||||||
|
#endif
|
||||||
|
|
||||||
static int fetchFile(char* toPath, char *imageSrcFile,
|
static int fetchFile(char* toPath, char *imageSrcFile,
|
||||||
char *imageDestFileName);
|
char *imageDestFileName);
|
||||||
@@ -601,7 +606,7 @@ makeColorPanel(WMScreen *scrPtr, char *name)
|
|||||||
|
|
||||||
if (pixmap)
|
if (pixmap)
|
||||||
W_PaintText(W_VIEW(panel->grayBrightnessS), pixmap->pixmap,
|
W_PaintText(W_VIEW(panel->grayBrightnessS), pixmap->pixmap,
|
||||||
panel->font12, 2, 0, 100, WALeft, WMColorGC(scrPtr->white),
|
panel->font12, 2, 0, 100, WALeft, scrPtr->white,
|
||||||
False, _("Brightness"), strlen(_("Brightness")));
|
False, _("Brightness"), strlen(_("Brightness")));
|
||||||
else
|
else
|
||||||
wwarning(_("Color Panel: Could not allocate memory"));
|
wwarning(_("Color Panel: Could not allocate memory"));
|
||||||
@@ -677,7 +682,7 @@ makeColorPanel(WMScreen *scrPtr, char *name)
|
|||||||
|
|
||||||
if (pixmap)
|
if (pixmap)
|
||||||
W_PaintText(W_VIEW(panel->rgbRedS), pixmap->pixmap, panel->font12,
|
W_PaintText(W_VIEW(panel->rgbRedS), pixmap->pixmap, panel->font12,
|
||||||
2, 0, 100, WALeft, WMColorGC(scrPtr->white), False, _("Red"),
|
2, 0, 100, WALeft, scrPtr->white, False, _("Red"),
|
||||||
strlen(_("Red")));
|
strlen(_("Red")));
|
||||||
else
|
else
|
||||||
wwarning(_("Color Panel: Could not allocate memory"));
|
wwarning(_("Color Panel: Could not allocate memory"));
|
||||||
@@ -710,7 +715,7 @@ makeColorPanel(WMScreen *scrPtr, char *name)
|
|||||||
|
|
||||||
if (pixmap)
|
if (pixmap)
|
||||||
W_PaintText(W_VIEW(panel->rgbGreenS), pixmap->pixmap, panel->font12,
|
W_PaintText(W_VIEW(panel->rgbGreenS), pixmap->pixmap, panel->font12,
|
||||||
2, 0, 100, WALeft, WMColorGC(scrPtr->white), False, _("Green"),
|
2, 0, 100, WALeft, scrPtr->white, False, _("Green"),
|
||||||
strlen(_("Green")));
|
strlen(_("Green")));
|
||||||
else
|
else
|
||||||
wwarning(_("Color Panel: Could not allocate memory"));
|
wwarning(_("Color Panel: Could not allocate memory"));
|
||||||
@@ -744,7 +749,7 @@ makeColorPanel(WMScreen *scrPtr, char *name)
|
|||||||
|
|
||||||
if (pixmap)
|
if (pixmap)
|
||||||
W_PaintText(W_VIEW(panel->rgbBlueS), pixmap->pixmap, panel->font12,
|
W_PaintText(W_VIEW(panel->rgbBlueS), pixmap->pixmap, panel->font12,
|
||||||
2, 0, 100, WALeft, WMColorGC(scrPtr->white), False, _("Blue"),
|
2, 0, 100, WALeft, scrPtr->white, False, _("Blue"),
|
||||||
strlen(_("Blue")));
|
strlen(_("Blue")));
|
||||||
else
|
else
|
||||||
wwarning(_("Color Panel: Could not allocate memory"));
|
wwarning(_("Color Panel: Could not allocate memory"));
|
||||||
@@ -804,7 +809,7 @@ makeColorPanel(WMScreen *scrPtr, char *name)
|
|||||||
|
|
||||||
if (pixmap)
|
if (pixmap)
|
||||||
W_PaintText(W_VIEW(panel->cmykCyanS), pixmap->pixmap, panel->font12,
|
W_PaintText(W_VIEW(panel->cmykCyanS), pixmap->pixmap, panel->font12,
|
||||||
2, 0, 100, WALeft, WMColorGC(scrPtr->black), False, _("Cyan"),
|
2, 0, 100, WALeft, scrPtr->black, False, _("Cyan"),
|
||||||
strlen(_("Cyan")));
|
strlen(_("Cyan")));
|
||||||
else
|
else
|
||||||
wwarning(_("Color Panel: Could not allocate memory"));
|
wwarning(_("Color Panel: Could not allocate memory"));
|
||||||
@@ -838,7 +843,7 @@ makeColorPanel(WMScreen *scrPtr, char *name)
|
|||||||
|
|
||||||
if (pixmap)
|
if (pixmap)
|
||||||
W_PaintText(W_VIEW(panel->cmykMagentaS), pixmap->pixmap, panel->font12,
|
W_PaintText(W_VIEW(panel->cmykMagentaS), pixmap->pixmap, panel->font12,
|
||||||
2, 0, 100, WALeft, WMColorGC(scrPtr->black), False, _("Magenta"),
|
2, 0, 100, WALeft, scrPtr->black, False, _("Magenta"),
|
||||||
strlen(_("Magenta")));
|
strlen(_("Magenta")));
|
||||||
else
|
else
|
||||||
wwarning(_("Color Panel: Could not allocate memory"));
|
wwarning(_("Color Panel: Could not allocate memory"));
|
||||||
@@ -872,7 +877,7 @@ makeColorPanel(WMScreen *scrPtr, char *name)
|
|||||||
|
|
||||||
if (pixmap)
|
if (pixmap)
|
||||||
W_PaintText(W_VIEW(panel->cmykYellowS), pixmap->pixmap, panel->font12,
|
W_PaintText(W_VIEW(panel->cmykYellowS), pixmap->pixmap, panel->font12,
|
||||||
2, 0, 100, WALeft, WMColorGC(scrPtr->black), False, _("Yellow"),
|
2, 0, 100, WALeft, scrPtr->black, False, _("Yellow"),
|
||||||
strlen(_("Yellow")));
|
strlen(_("Yellow")));
|
||||||
else
|
else
|
||||||
wwarning(_("Color Panel: Could not allocate memory"));
|
wwarning(_("Color Panel: Could not allocate memory"));
|
||||||
@@ -907,7 +912,7 @@ makeColorPanel(WMScreen *scrPtr, char *name)
|
|||||||
|
|
||||||
if (pixmap)
|
if (pixmap)
|
||||||
W_PaintText(W_VIEW(panel->cmykBlackS), pixmap->pixmap, panel->font12,
|
W_PaintText(W_VIEW(panel->cmykBlackS), pixmap->pixmap, panel->font12,
|
||||||
2, 0, 100, WALeft, WMColorGC(scrPtr->black), False, _("Black"),
|
2, 0, 100, WALeft, scrPtr->black, False, _("Black"),
|
||||||
strlen(_("Black")));
|
strlen(_("Black")));
|
||||||
else
|
else
|
||||||
wwarning(_("Color Panel: Could not allocate memory"));
|
wwarning(_("Color Panel: Could not allocate memory"));
|
||||||
@@ -1282,7 +1287,7 @@ readXColors(W_ColorPanel *panel)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ((rgbtxt = fopen(RGBTXT, "r"))) {
|
if ((rgbtxt = fopen(RGBTXT, "rb"))) {
|
||||||
while (fgets(line, MAX_LENGTH, rgbtxt)) {
|
while (fgets(line, MAX_LENGTH, rgbtxt)) {
|
||||||
if (sscanf(line, "%d%d%d %[^\n]", &red, &green, &blue, name)) {
|
if (sscanf(line, "%d%d%d %[^\n]", &red, &green, &blue, name)) {
|
||||||
color = wmalloc(sizeof(RColor));
|
color = wmalloc(sizeof(RColor));
|
||||||
@@ -2820,7 +2825,7 @@ hsbUpdateBrightnessGradient(W_ColorPanel *panel)
|
|||||||
|
|
||||||
if (sliderPxmp)
|
if (sliderPxmp)
|
||||||
W_PaintText(W_VIEW(panel->hsbBrightnessS), sliderPxmp->pixmap,
|
W_PaintText(W_VIEW(panel->hsbBrightnessS), sliderPxmp->pixmap,
|
||||||
panel->font12, 2, 0, 100, WALeft, WMColorGC(scr->white),
|
panel->font12, 2, 0, 100, WALeft, scr->white,
|
||||||
False, _("Brightness"), strlen(_("Brightness")));
|
False, _("Brightness"), strlen(_("Brightness")));
|
||||||
else
|
else
|
||||||
wwarning(_("Color Panel: Could not allocate memory"));
|
wwarning(_("Color Panel: Could not allocate memory"));
|
||||||
@@ -2856,7 +2861,7 @@ hsbUpdateSaturationGradient(W_ColorPanel *panel)
|
|||||||
if (sliderPxmp)
|
if (sliderPxmp)
|
||||||
W_PaintText(W_VIEW(panel->hsbSaturationS), sliderPxmp->pixmap,
|
W_PaintText(W_VIEW(panel->hsbSaturationS), sliderPxmp->pixmap,
|
||||||
panel->font12, 2, 0, 100, WALeft,
|
panel->font12, 2, 0, 100, WALeft,
|
||||||
WMColorGC(from.hsv.value < 128 ? scr->white : scr->black), False,
|
from.hsv.value < 128 ? scr->white : scr->black, False,
|
||||||
_("Saturation"), strlen(_("Saturation")));
|
_("Saturation"), strlen(_("Saturation")));
|
||||||
else
|
else
|
||||||
wwarning(_("Color Panel: Could not allocate memory"));
|
wwarning(_("Color Panel: Could not allocate memory"));
|
||||||
@@ -2892,7 +2897,7 @@ hsbUpdateHueGradient(W_ColorPanel *panel)
|
|||||||
if (sliderPxmp)
|
if (sliderPxmp)
|
||||||
W_PaintText(W_VIEW(panel->hsbHueS), sliderPxmp->pixmap,
|
W_PaintText(W_VIEW(panel->hsbHueS), sliderPxmp->pixmap,
|
||||||
panel->font12, 2, 0, 100, WALeft,
|
panel->font12, 2, 0, 100, WALeft,
|
||||||
WMColorGC(hsvcolor.value < 128 ? scr->white : scr->black), False,
|
hsvcolor.value < 128 ? scr->white : scr->black, False,
|
||||||
_("Hue"), strlen(_("Hue")));
|
_("Hue"), strlen(_("Hue")));
|
||||||
else
|
else
|
||||||
wwarning(_("Color Panel: Could not allocate memory"));
|
wwarning(_("Color Panel: Could not allocate memory"));
|
||||||
@@ -3418,13 +3423,12 @@ static void
|
|||||||
colorListPaintItem(WMList *lPtr, int index, Drawable d, char *text,
|
colorListPaintItem(WMList *lPtr, int index, Drawable d, char *text,
|
||||||
int state, WMRect *rect)
|
int state, WMRect *rect)
|
||||||
{
|
{
|
||||||
int width, height, x, y;
|
|
||||||
RColor color = *((RColor *)WMGetListItem(lPtr, index)->clientData);
|
|
||||||
WMScreen *scr = WMWidgetScreen(lPtr);
|
WMScreen *scr = WMWidgetScreen(lPtr);
|
||||||
Display *dpy = WMScreenDisplay(scr);
|
Display *dpy = WMScreenDisplay(scr);
|
||||||
|
WMView *view = W_VIEW(lPtr);
|
||||||
|
RColor color = *((RColor *)WMGetListItem(lPtr, index)->clientData);
|
||||||
W_ColorPanel *panel = WMGetHangedData(lPtr);
|
W_ColorPanel *panel = WMGetHangedData(lPtr);
|
||||||
WMColor *white = WMWhiteColor(scr);
|
int width, height, x, y;
|
||||||
WMColor *black = WMBlackColor(scr);
|
|
||||||
WMColor *fillColor;
|
WMColor *fillColor;
|
||||||
|
|
||||||
width = rect->size.width;
|
width = rect->size.width;
|
||||||
@@ -3433,22 +3437,17 @@ colorListPaintItem(WMList *lPtr, int index, Drawable d, char *text,
|
|||||||
y = rect->pos.y;
|
y = rect->pos.y;
|
||||||
|
|
||||||
if (state & WLDSSelected)
|
if (state & WLDSSelected)
|
||||||
WMPaintColorSwatch(white, d, x +15, y, width -15, height);
|
XFillRectangle(dpy, d, WMColorGC(scr->white), x, y, width, height);
|
||||||
else
|
else
|
||||||
XClearArea(dpy, d, x +15, y, width -15, height, False);
|
XFillRectangle(dpy, d, WMColorGC(view->backColor), x, y, width, height);
|
||||||
|
|
||||||
fillColor = WMCreateRGBColor(scr, color.red*256, color.green*256,
|
fillColor = WMCreateRGBColor(scr, color.red<<8, color.green<<8,
|
||||||
color.blue*256, False);
|
color.blue<<8, True);
|
||||||
|
|
||||||
WMSetColorInGC(fillColor, WMColorGC(fillColor));
|
XFillRectangle(dpy, d, WMColorGC(fillColor), x, y, 15, height);
|
||||||
WMPaintColorSwatch(fillColor, d, x, y, 15, 15);
|
|
||||||
WMReleaseColor(fillColor);
|
WMReleaseColor(fillColor);
|
||||||
|
|
||||||
WMDrawString(scr, d, WMColorGC(black), panel->font12, x+18, y, text,
|
WMDrawString(scr, d, scr->black, panel->font12, x+18, y, text, strlen(text));
|
||||||
strlen(text));
|
|
||||||
|
|
||||||
WMReleaseColor(white);
|
|
||||||
WMReleaseColor(black);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -3644,13 +3643,13 @@ fetchFile(char *toPath, char *srcFile, char *destFile)
|
|||||||
char *tmp;
|
char *tmp;
|
||||||
char buf[BUFSIZE];
|
char buf[BUFSIZE];
|
||||||
|
|
||||||
if ((src = open(srcFile, O_RDONLY)) == 0) {
|
if ((src = open(srcFile, O_RDONLY|O_BINARY)) == 0) {
|
||||||
wsyserror(_("Could not open %s"), srcFile);
|
wsyserror(_("Could not open %s"), srcFile);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp = wstrconcat(toPath, destFile);
|
tmp = wstrconcat(toPath, destFile);
|
||||||
if ((dest = open( tmp, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH))
|
if ((dest = open( tmp, O_RDWR|O_CREAT|O_BINARY, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH))
|
||||||
== 0) {
|
== 0) {
|
||||||
wsyserror(_("Could not create %s"), tmp);
|
wsyserror(_("Could not create %s"), tmp);
|
||||||
wfree(tmp);
|
wfree(tmp);
|
||||||
|
|||||||
+5
-5
@@ -193,13 +193,13 @@ WMCreateColorWell(WMWidget *parent)
|
|||||||
WMAddNotificationObserver(colorChangedObserver, cPtr,
|
WMAddNotificationObserver(colorChangedObserver, cPtr,
|
||||||
WMColorPanelColorChangedNotification, NULL);
|
WMColorPanelColorChangedNotification, NULL);
|
||||||
|
|
||||||
WMSetViewDragSourceProcs(cPtr->view, &_DragSourceProcs);
|
WMSetViewDragSourceProcs(cPtr->colorView, &_DragSourceProcs);
|
||||||
WMSetViewDragDestinationProcs(cPtr->view, &_DragDestinationProcs);
|
WMSetViewDragDestinationProcs(cPtr->colorView, &_DragDestinationProcs);
|
||||||
|
|
||||||
{
|
{
|
||||||
char *types[2] = {"application/X-color", NULL};
|
char *types[2] = {"application/X-color", NULL};
|
||||||
|
|
||||||
WMRegisterViewForDraggedTypes(cPtr->view, types);
|
WMRegisterViewForDraggedTypes(cPtr->colorView, types);
|
||||||
}
|
}
|
||||||
|
|
||||||
return cPtr;
|
return cPtr;
|
||||||
@@ -229,6 +229,7 @@ WMGetColorWellColor(WMColorWell *cPtr)
|
|||||||
void
|
void
|
||||||
WSetColorWellBordered(WMColorWell *cPtr, Bool flag)
|
WSetColorWellBordered(WMColorWell *cPtr, Bool flag)
|
||||||
{
|
{
|
||||||
|
flag = ((flag==0) ? 0 : 1);
|
||||||
if (cPtr->flags.bordered != flag) {
|
if (cPtr->flags.bordered != flag) {
|
||||||
cPtr->flags.bordered = flag;
|
cPtr->flags.bordered = flag;
|
||||||
W_ResizeView(cPtr->view, cPtr->view->size.width, cPtr->view->size.height);
|
W_ResizeView(cPtr->view, cPtr->view->size.width, cPtr->view->size.height);
|
||||||
@@ -369,12 +370,11 @@ handleDragEvents(XEvent *event, void *data)
|
|||||||
offs.height = 2;
|
offs.height = 2;
|
||||||
pixmap = makeDragPixmap(cPtr);
|
pixmap = makeDragPixmap(cPtr);
|
||||||
|
|
||||||
WMDragImageFromView(cPtr->view, pixmap, types,
|
WMDragImageFromView(cPtr->colorView, pixmap, types,
|
||||||
wmkpoint(event->xmotion.x_root,
|
wmkpoint(event->xmotion.x_root,
|
||||||
event->xmotion.y_root),
|
event->xmotion.y_root),
|
||||||
offs, event, True);
|
offs, event, True);
|
||||||
|
|
||||||
|
|
||||||
WMReleasePixmap(pixmap);
|
WMReleasePixmap(pixmap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+13
-18
@@ -62,36 +62,31 @@ static WMEventHook *extraEventHandler=NULL;
|
|||||||
* WMCreateEventHandler--
|
* WMCreateEventHandler--
|
||||||
* Create an event handler and put it in the event handler list for the
|
* Create an event handler and put it in the event handler list for the
|
||||||
* view. If the same callback and clientdata are already used in another
|
* view. If the same callback and clientdata are already used in another
|
||||||
* handler, the masks are swapped.
|
* handler, the masks are OR'ed.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
WMCreateEventHandler(WMView *view, unsigned long mask, WMEventProc *eventProc,
|
WMCreateEventHandler(WMView *view, unsigned long mask, WMEventProc *eventProc,
|
||||||
void *clientData)
|
void *clientData)
|
||||||
{
|
{
|
||||||
W_EventHandler *handler, *ptr;
|
W_EventHandler *hPtr;
|
||||||
unsigned long eventMask;
|
|
||||||
WMArrayIterator iter;
|
WMArrayIterator iter;
|
||||||
|
|
||||||
|
WM_ITERATE_ARRAY(view->eventHandlers, hPtr, iter) {
|
||||||
handler = NULL;
|
if (hPtr->clientData==clientData && hPtr->proc==eventProc) {
|
||||||
eventMask = mask;
|
hPtr->eventMask |= mask;
|
||||||
|
return;
|
||||||
WM_ITERATE_ARRAY(view->eventHandlers, ptr, iter) {
|
|
||||||
if (ptr->clientData == clientData && ptr->proc == eventProc) {
|
|
||||||
handler = ptr;
|
|
||||||
eventMask |= ptr->eventMask;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!handler) {
|
|
||||||
handler = wmalloc(sizeof(W_EventHandler));
|
|
||||||
|
|
||||||
WMAddToArray(view->eventHandlers, handler);
|
hPtr = wmalloc(sizeof(W_EventHandler));
|
||||||
}
|
|
||||||
/* select events for window */
|
/* select events for window */
|
||||||
handler->eventMask = eventMask;
|
hPtr->eventMask = mask;
|
||||||
handler->proc = eventProc;
|
hPtr->proc = eventProc;
|
||||||
handler->clientData = clientData;
|
hPtr->clientData = clientData;
|
||||||
|
|
||||||
|
WMAddToArray(view->eventHandlers, hPtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+7
-4
@@ -451,20 +451,20 @@ WMSetFilePanelDirectory(WMFilePanel *panel, char *path)
|
|||||||
void
|
void
|
||||||
WMSetFilePanelCanChooseDirectories(WMFilePanel *panel, Bool flag)
|
WMSetFilePanelCanChooseDirectories(WMFilePanel *panel, Bool flag)
|
||||||
{
|
{
|
||||||
panel->flags.canChooseDirectories = flag;
|
panel->flags.canChooseDirectories = ((flag==0) ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
WMSetFilePanelCanChooseFiles(WMFilePanel *panel, Bool flag)
|
WMSetFilePanelCanChooseFiles(WMFilePanel *panel, Bool flag)
|
||||||
{
|
{
|
||||||
panel->flags.canChooseFiles = flag;
|
panel->flags.canChooseFiles = ((flag==0) ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WMSetFilePanelAutoCompletion(WMFilePanel *panel, Bool flag)
|
WMSetFilePanelAutoCompletion(WMFilePanel *panel, Bool flag)
|
||||||
{
|
{
|
||||||
panel->flags.autoCompletion = flag;
|
panel->flags.autoCompletion = ((flag==0) ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -548,12 +548,15 @@ listDirectoryOnColumn(WMFilePanel *panel, int column, char *path)
|
|||||||
DIR *dir;
|
DIR *dir;
|
||||||
struct stat stat_buf;
|
struct stat stat_buf;
|
||||||
char pbuf[PATH_MAX+16];
|
char pbuf[PATH_MAX+16];
|
||||||
|
char *name;
|
||||||
|
|
||||||
assert(column >= 0);
|
assert(column >= 0);
|
||||||
assert(path != NULL);
|
assert(path != NULL);
|
||||||
|
|
||||||
/* put directory name in the title */
|
/* put directory name in the title */
|
||||||
WMSetBrowserColumnTitle(bPtr, column, get_name_from_path(path));
|
name = get_name_from_path(path);
|
||||||
|
WMSetBrowserColumnTitle(bPtr, column, name);
|
||||||
|
wfree(name);
|
||||||
|
|
||||||
dir = opendir(path);
|
dir = opendir(path);
|
||||||
|
|
||||||
|
|||||||
+738
-194
File diff suppressed because it is too large
Load Diff
+50
-5
@@ -10,6 +10,13 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* XXX TODO */
|
||||||
|
char *WMFontPanelFontChangedNotification = "WMFontPanelFontChangedNotification";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct W_FontPanel {
|
typedef struct W_FontPanel {
|
||||||
WMWindow *win;
|
WMWindow *win;
|
||||||
|
|
||||||
@@ -27,6 +34,9 @@ typedef struct W_FontPanel {
|
|||||||
WMTextField *sizT;
|
WMTextField *sizT;
|
||||||
WMList *sizLs;
|
WMList *sizLs;
|
||||||
|
|
||||||
|
WMAction2 *action;
|
||||||
|
void *data;
|
||||||
|
|
||||||
WMButton *revertB;
|
WMButton *revertB;
|
||||||
WMButton *setB;
|
WMButton *setB;
|
||||||
|
|
||||||
@@ -150,6 +160,26 @@ closeWindow(WMWidget *w, void *data)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
setClickedAction(WMWidget *w, void *data)
|
||||||
|
{
|
||||||
|
FontPanel *panel = (FontPanel*)data;
|
||||||
|
|
||||||
|
if (panel->action)
|
||||||
|
(*panel->action)(panel, panel->data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
revertClickedAction(WMWidget *w, void *data)
|
||||||
|
{
|
||||||
|
FontPanel *panel = (FontPanel*)data;
|
||||||
|
/* XXX TODO */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
WMFontPanel*
|
WMFontPanel*
|
||||||
WMGetFontPanel(WMScreen *scr)
|
WMGetFontPanel(WMScreen *scr)
|
||||||
{
|
{
|
||||||
@@ -250,11 +280,14 @@ WMGetFontPanel(WMScreen *scr)
|
|||||||
WMResizeWidget(panel->setB, 70, 24);
|
WMResizeWidget(panel->setB, 70, 24);
|
||||||
WMMoveWidget(panel->setB, 240, DEF_HEIGHT - (BUTTON_SPACE_HEIGHT-5));
|
WMMoveWidget(panel->setB, 240, DEF_HEIGHT - (BUTTON_SPACE_HEIGHT-5));
|
||||||
WMSetButtonText(panel->setB, _("Set"));
|
WMSetButtonText(panel->setB, _("Set"));
|
||||||
|
WMSetButtonAction(panel->setB, setClickedAction, panel);
|
||||||
|
|
||||||
panel->revertB = WMCreateCommandButton(panel->win);
|
panel->revertB = WMCreateCommandButton(panel->win);
|
||||||
WMResizeWidget(panel->revertB, 70, 24);
|
WMResizeWidget(panel->revertB, 70, 24);
|
||||||
WMMoveWidget(panel->revertB, 80, DEF_HEIGHT - (BUTTON_SPACE_HEIGHT-5));
|
WMMoveWidget(panel->revertB, 80, DEF_HEIGHT - (BUTTON_SPACE_HEIGHT-5));
|
||||||
WMSetButtonText(panel->revertB, _("Revert"));
|
WMSetButtonText(panel->revertB, _("Revert"));
|
||||||
|
WMSetButtonAction(panel->revertB, revertClickedAction, panel);
|
||||||
|
|
||||||
|
|
||||||
WMRealizeWidget(panel->win);
|
WMRealizeWidget(panel->win);
|
||||||
|
|
||||||
@@ -350,6 +383,17 @@ WMGetFontPanelFontName(WMFontPanel *panel)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
WMSetFontPanelAction(WMFontPanel *panel, WMAction2 *action, void *data)
|
||||||
|
{
|
||||||
|
panel->action = action;
|
||||||
|
panel->data = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
arrangeLowerFrame(FontPanel *panel)
|
arrangeLowerFrame(FontPanel *panel)
|
||||||
{
|
{
|
||||||
@@ -573,7 +617,6 @@ addTypefaceToFamily(Family *family, char fontFields[NUM_FIELDS][256])
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* families (same family name) (Hashtable of family -> array)
|
* families (same family name) (Hashtable of family -> array)
|
||||||
* registries (same family but different registries)
|
* registries (same family but different registries)
|
||||||
@@ -695,12 +738,11 @@ static void
|
|||||||
listFamilies(WMScreen *scr, WMFontPanel *panel)
|
listFamilies(WMScreen *scr, WMFontPanel *panel)
|
||||||
{
|
{
|
||||||
char **fontList;
|
char **fontList;
|
||||||
int count;
|
WMHashTable *families;
|
||||||
int i;
|
|
||||||
WMHashTable *families = WMCreateHashTable(WMStringPointerHashCallbacks);
|
|
||||||
char fields[NUM_FIELDS][256];
|
char fields[NUM_FIELDS][256];
|
||||||
WMHashEnumerator enumer;
|
WMHashEnumerator enumer;
|
||||||
WMArray *array;
|
WMArray *array;
|
||||||
|
int i, count;
|
||||||
|
|
||||||
fontList = XListFonts(scr->display, ALL_FONTS_MASK, MAX_FONTS_TO_RETRIEVE,
|
fontList = XListFonts(scr->display, ALL_FONTS_MASK, MAX_FONTS_TO_RETRIEVE,
|
||||||
&count);
|
&count);
|
||||||
@@ -710,6 +752,8 @@ listFamilies(WMScreen *scr, WMFontPanel *panel)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
families = WMCreateHashTable(WMStringPointerHashCallbacks);
|
||||||
|
|
||||||
for (i = 0; i < count; i++) {
|
for (i = 0; i < count; i++) {
|
||||||
int fname_len;
|
int fname_len;
|
||||||
|
|
||||||
@@ -757,7 +801,6 @@ listFamilies(WMScreen *scr, WMFontPanel *panel)
|
|||||||
|
|
||||||
item->clientData = fam;
|
item->clientData = fam;
|
||||||
}
|
}
|
||||||
/* Isn't this going to memleak since items weren't released? --Dan */
|
|
||||||
WMFreeArray(array);
|
WMFreeArray(array);
|
||||||
}
|
}
|
||||||
WMSortListItems(panel->famLs);
|
WMSortListItems(panel->famLs);
|
||||||
@@ -797,6 +840,8 @@ getSelectedFont(FontPanel *panel, char buffer[], int bufsize)
|
|||||||
size,
|
size,
|
||||||
family->registry,
|
family->registry,
|
||||||
family->encoding);
|
family->encoding);
|
||||||
|
|
||||||
|
wfree(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+28
-13
@@ -8,7 +8,6 @@ typedef struct W_Frame {
|
|||||||
|
|
||||||
char *caption;
|
char *caption;
|
||||||
|
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
WMReliefType relief:4;
|
WMReliefType relief:4;
|
||||||
WMTitlePosition titlePosition:4;
|
WMTitlePosition titlePosition:4;
|
||||||
@@ -55,6 +54,7 @@ WMSetFrameTitle(WMFrame *fPtr, char *title)
|
|||||||
{
|
{
|
||||||
if (fPtr->caption)
|
if (fPtr->caption)
|
||||||
wfree(fPtr->caption);
|
wfree(fPtr->caption);
|
||||||
|
|
||||||
if (title)
|
if (title)
|
||||||
fPtr->caption = wstrdup(title);
|
fPtr->caption = wstrdup(title);
|
||||||
else
|
else
|
||||||
@@ -82,14 +82,18 @@ paintFrame(Frame *fPtr)
|
|||||||
{
|
{
|
||||||
W_View *view = fPtr->view;
|
W_View *view = fPtr->view;
|
||||||
W_Screen *scrPtr = view->screen;
|
W_Screen *scrPtr = view->screen;
|
||||||
int tx, ty, tw, th;
|
WMFont *font = scrPtr->normalFont;
|
||||||
|
Display *display = scrPtr->display;
|
||||||
|
int tx, ty, tw, th, tlen;
|
||||||
int fy, fh;
|
int fy, fh;
|
||||||
Bool drawTitle;
|
Bool drawTitle;
|
||||||
|
|
||||||
if (fPtr->caption!=NULL)
|
if (fPtr->caption!=NULL) {
|
||||||
th = WMFontHeight(scrPtr->normalFont);
|
th = WMFontHeight(font);
|
||||||
else {
|
tlen = strlen(fPtr->caption);
|
||||||
|
} else {
|
||||||
th = 0;
|
th = 0;
|
||||||
|
tlen = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
fh = view->size.height;
|
fh = view->size.height;
|
||||||
@@ -138,9 +142,8 @@ paintFrame(Frame *fPtr)
|
|||||||
fh = view->size.height;
|
fh = view->size.height;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fPtr->caption!=NULL && fPtr->flags.titlePosition!=WTPNoTitle) {
|
if (tlen>0 && fPtr->flags.titlePosition!=WTPNoTitle) {
|
||||||
tw = WMWidthOfString(scrPtr->normalFont, fPtr->caption,
|
tw = WMWidthOfString(font, fPtr->caption, tlen);
|
||||||
strlen(fPtr->caption));
|
|
||||||
|
|
||||||
tx = (view->size.width - tw) / 2;
|
tx = (view->size.width - tw) / 2;
|
||||||
|
|
||||||
@@ -180,7 +183,7 @@ paintFrame(Frame *fPtr)
|
|||||||
gc[3] = WMColorGC(scrPtr->white);
|
gc[3] = WMColorGC(scrPtr->white);
|
||||||
|
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < 4; i++) {
|
||||||
XSetRegion(scrPtr->display, gc[i], region);
|
XSetRegion(display, gc[i], region);
|
||||||
}
|
}
|
||||||
XDestroyRegion(region);
|
XDestroyRegion(region);
|
||||||
|
|
||||||
@@ -188,14 +191,26 @@ paintFrame(Frame *fPtr)
|
|||||||
fPtr->flags.relief, gc[0], gc[1], gc[2], gc[3]);
|
fPtr->flags.relief, gc[0], gc[1], gc[2], gc[3]);
|
||||||
|
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < 4; i++) {
|
||||||
XSetClipMask(scrPtr->display, gc[i], None);
|
XSetClipMask(display, gc[i], None);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (drawTitle) {
|
if (drawTitle) {
|
||||||
WMDrawString(scrPtr, view->window, WMColorGC(scrPtr->black),
|
/* can't draw AA text over and over again because it gets messed */
|
||||||
scrPtr->normalFont, tx, ty, fPtr->caption,
|
/* // TODO create the dbl buffer pixmap when create/set frame title */
|
||||||
strlen(fPtr->caption));
|
if (font->antialiased) {
|
||||||
|
Drawable d;
|
||||||
|
|
||||||
|
d = XCreatePixmap(display, view->window, tw, th, scrPtr->depth);
|
||||||
|
XFillRectangle(display, d, WMColorGC(view->backColor), 0, 0, tw, th);
|
||||||
|
|
||||||
|
WMDrawString(scrPtr, d, scrPtr->black, font, 0, 0, fPtr->caption, tlen);
|
||||||
|
XCopyArea(display, d, view->window, scrPtr->copyGC, 0, 0, tw, th, tx, ty);
|
||||||
|
XFreePixmap(display, d);
|
||||||
|
} else {
|
||||||
|
WMDrawString(scrPtr, view->window, scrPtr->black, font, tx, ty,
|
||||||
|
fPtr->caption, tlen);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+45
-7
@@ -3,6 +3,10 @@
|
|||||||
#include "WINGsP.h"
|
#include "WINGsP.h"
|
||||||
#include "wconfig.h"
|
#include "wconfig.h"
|
||||||
|
|
||||||
|
#ifdef XFT
|
||||||
|
# include <X11/Xft/Xft.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
#include <X11/keysym.h>
|
#include <X11/keysym.h>
|
||||||
@@ -302,7 +306,7 @@ static char *CHECK_MARK[] = {
|
|||||||
#define STIPPLE_WIDTH 8
|
#define STIPPLE_WIDTH 8
|
||||||
#define STIPPLE_HEIGHT 8
|
#define STIPPLE_HEIGHT 8
|
||||||
static unsigned char STIPPLE_BITS[] = {
|
static unsigned char STIPPLE_BITS[] = {
|
||||||
0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa
|
0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -618,6 +622,23 @@ WMCreateScreenWithRContext(Display *display, int screen, RContext *context)
|
|||||||
|
|
||||||
scrPtr->fontCache = WMCreateHashTable(WMStringPointerHashCallbacks);
|
scrPtr->fontCache = WMCreateHashTable(WMStringPointerHashCallbacks);
|
||||||
|
|
||||||
|
scrPtr->xftFontCache = WMCreateHashTable(WMStringPointerHashCallbacks);
|
||||||
|
|
||||||
|
scrPtr->fontSetCache = WMCreateHashTable(WMStringPointerHashCallbacks);
|
||||||
|
|
||||||
|
scrPtr->xftFontSetCache = WMCreateHashTable(WMStringPointerHashCallbacks);
|
||||||
|
|
||||||
|
#ifdef XFT
|
||||||
|
|
||||||
|
# ifdef XFT2
|
||||||
|
scrPtr->hasXftSupport = 1;
|
||||||
|
# else
|
||||||
|
scrPtr->hasXftSupport = XftDefaultHasRender(scrPtr->display);
|
||||||
|
# endif
|
||||||
|
|
||||||
|
scrPtr->xftdraw = XftDrawCreate(scrPtr->display, W_DRAWABLE(scrPtr),
|
||||||
|
scrPtr->visual, scrPtr->colormap);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* create input method stuff */
|
/* create input method stuff */
|
||||||
W_InitIMStuff(scrPtr);
|
W_InitIMStuff(scrPtr);
|
||||||
@@ -670,7 +691,7 @@ WMCreateScreenWithRContext(Display *display, int screen, RContext *context)
|
|||||||
ShiftMask,LockMask,ControlMask,Mod1Mask,
|
ShiftMask,LockMask,ControlMask,Mod1Mask,
|
||||||
Mod2Mask, Mod3Mask, Mod4Mask, Mod5Mask
|
Mod2Mask, Mod3Mask, Mod4Mask, Mod5Mask
|
||||||
};
|
};
|
||||||
unsigned int numLockMask, scrollLockMask;
|
unsigned int numLockMask=0, scrollLockMask=0;
|
||||||
|
|
||||||
nlock = XKeysymToKeycode(display, XK_Num_Lock);
|
nlock = XKeysymToKeycode(display, XK_Num_Lock);
|
||||||
slock = XKeysymToKeycode(display, XK_Scroll_Lock);
|
slock = XKeysymToKeycode(display, XK_Scroll_Lock);
|
||||||
@@ -725,7 +746,6 @@ WMCreateScreenWithRContext(Display *display, int screen, RContext *context)
|
|||||||
scrPtr->clipGC = XCreateGC(display, W_DRAWABLE(scrPtr), GCFunction
|
scrPtr->clipGC = XCreateGC(display, W_DRAWABLE(scrPtr), GCFunction
|
||||||
|GCGraphicsExposures, &gcv);
|
|GCGraphicsExposures, &gcv);
|
||||||
|
|
||||||
|
|
||||||
stipple = XCreateBitmapFromData(display, W_DRAWABLE(scrPtr),
|
stipple = XCreateBitmapFromData(display, W_DRAWABLE(scrPtr),
|
||||||
STIPPLE_BITS, STIPPLE_WIDTH, STIPPLE_HEIGHT);
|
STIPPLE_BITS, STIPPLE_WIDTH, STIPPLE_HEIGHT);
|
||||||
gcv.foreground = W_PIXEL(scrPtr->darkGray);
|
gcv.foreground = W_PIXEL(scrPtr->darkGray);
|
||||||
@@ -736,10 +756,10 @@ WMCreateScreenWithRContext(Display *display, int screen, RContext *context)
|
|||||||
GCForeground|GCBackground|GCStipple
|
GCForeground|GCBackground|GCStipple
|
||||||
|GCFillStyle|GCGraphicsExposures, &gcv);
|
|GCFillStyle|GCGraphicsExposures, &gcv);
|
||||||
|
|
||||||
gcv.foreground = W_PIXEL(scrPtr->black);
|
scrPtr->drawStringGC = XCreateGC(display, W_DRAWABLE(scrPtr),
|
||||||
gcv.background = W_PIXEL(scrPtr->white);
|
GCGraphicsExposures, &gcv);
|
||||||
scrPtr->textFieldGC = XCreateGC(display, W_DRAWABLE(scrPtr),
|
scrPtr->drawImStringGC = XCreateGC(display, W_DRAWABLE(scrPtr),
|
||||||
GCForeground|GCBackground, &gcv);
|
GCGraphicsExposures, &gcv);
|
||||||
|
|
||||||
/* we need a 1bpp drawable for the monoGC, so borrow this one */
|
/* we need a 1bpp drawable for the monoGC, so borrow this one */
|
||||||
scrPtr->monoGC = XCreateGC(display, stipple, 0, NULL);
|
scrPtr->monoGC = XCreateGC(display, stipple, 0, NULL);
|
||||||
@@ -748,6 +768,17 @@ WMCreateScreenWithRContext(Display *display, int screen, RContext *context)
|
|||||||
|
|
||||||
scrPtr->useMultiByte = WINGsConfiguration.useMultiByte;
|
scrPtr->useMultiByte = WINGsConfiguration.useMultiByte;
|
||||||
|
|
||||||
|
if (scrPtr->hasXftSupport) {
|
||||||
|
scrPtr->antialiasedText = WINGsConfiguration.antialiasedText;
|
||||||
|
} else {
|
||||||
|
if (WINGsConfiguration.antialiasedText) {
|
||||||
|
wwarning(_("Text antialiasing is enabled in the configuration but"
|
||||||
|
" the X server doesn't have the required capabilities "
|
||||||
|
"(missing RENDER extension). Disabling text antialiasing."));
|
||||||
|
}
|
||||||
|
scrPtr->antialiasedText = False;
|
||||||
|
}
|
||||||
|
|
||||||
scrPtr->normalFont = WMSystemFontOfSize(scrPtr,
|
scrPtr->normalFont = WMSystemFontOfSize(scrPtr,
|
||||||
WINGsConfiguration.defaultFontSize);
|
WINGsConfiguration.defaultFontSize);
|
||||||
|
|
||||||
@@ -1041,6 +1072,13 @@ WMSetWidgetBackgroundColor(WMWidget *w, WMColor *color)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
WMColor*
|
||||||
|
WMGetWidgetBackgroundColor(WMWidget *w)
|
||||||
|
{
|
||||||
|
return W_VIEW(w)->backColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WMRaiseWidget(WMWidget *w)
|
WMRaiseWidget(WMWidget *w)
|
||||||
{
|
{
|
||||||
|
|||||||
+3
-7
@@ -192,6 +192,7 @@ WMSetLabelTextColor(WMLabel *lPtr, WMColor *color)
|
|||||||
void
|
void
|
||||||
WMSetLabelWraps(WMLabel *lPtr, Bool flag)
|
WMSetLabelWraps(WMLabel *lPtr, Bool flag)
|
||||||
{
|
{
|
||||||
|
flag = ((flag==0) ? 0 : 1);
|
||||||
if (lPtr->flags.noWrap != !flag) {
|
if (lPtr->flags.noWrap != !flag) {
|
||||||
lPtr->flags.noWrap = !flag;
|
lPtr->flags.noWrap = !flag;
|
||||||
if (lPtr->view->flags.realized)
|
if (lPtr->view->flags.realized)
|
||||||
@@ -204,14 +205,9 @@ static void
|
|||||||
paintLabel(Label *lPtr)
|
paintLabel(Label *lPtr)
|
||||||
{
|
{
|
||||||
W_Screen *scrPtr = lPtr->view->screen;
|
W_Screen *scrPtr = lPtr->view->screen;
|
||||||
GC gc;
|
|
||||||
|
|
||||||
if (lPtr->textColor)
|
W_PaintTextAndImage(lPtr->view, !lPtr->flags.noWrap,
|
||||||
gc = WMColorGC(lPtr->textColor);
|
lPtr->textColor ? lPtr->textColor : scrPtr->black,
|
||||||
else
|
|
||||||
gc = WMColorGC(scrPtr->black);
|
|
||||||
|
|
||||||
W_PaintTextAndImage(lPtr->view, !lPtr->flags.noWrap, gc,
|
|
||||||
(lPtr->font!=NULL ? lPtr->font : scrPtr->normalFont),
|
(lPtr->font!=NULL ? lPtr->font : scrPtr->normalFont),
|
||||||
lPtr->flags.relief, lPtr->caption,
|
lPtr->flags.relief, lPtr->caption,
|
||||||
lPtr->flags.alignment, lPtr->image,
|
lPtr->flags.alignment, lPtr->image,
|
||||||
|
|||||||
+57
-17
@@ -33,6 +33,8 @@ typedef struct W_List {
|
|||||||
|
|
||||||
WMScroller *vScroller;
|
WMScroller *vScroller;
|
||||||
|
|
||||||
|
Pixmap doubleBuffer;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
unsigned int allowMultipleSelection:1;
|
unsigned int allowMultipleSelection:1;
|
||||||
unsigned int allowEmptySelection:1;
|
unsigned int allowEmptySelection:1;
|
||||||
@@ -83,6 +85,30 @@ W_ViewDelegate _ListViewDelegate = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
updateDoubleBufferPixmap(WMList *lPtr)
|
||||||
|
{
|
||||||
|
WMView *view = lPtr->view;
|
||||||
|
WMScreen *scr = view->screen;
|
||||||
|
|
||||||
|
if (!view->flags.realized)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (lPtr->doubleBuffer)
|
||||||
|
XFreePixmap(scr->display, lPtr->doubleBuffer);
|
||||||
|
lPtr->doubleBuffer =
|
||||||
|
XCreatePixmap(scr->display, view->window, view->size.width,
|
||||||
|
lPtr->itemHeight, scr->depth);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
realizeObserver(void *self, WMNotification *not)
|
||||||
|
{
|
||||||
|
updateDoubleBufferPixmap(self);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
releaseItem(void *data)
|
releaseItem(void *data)
|
||||||
{
|
{
|
||||||
@@ -138,6 +164,9 @@ WMCreateList(WMWidget *parent)
|
|||||||
|
|
||||||
W_ResizeView(lPtr->view, DEFAULT_WIDTH, DEFAULT_HEIGHT);
|
W_ResizeView(lPtr->view, DEFAULT_WIDTH, DEFAULT_HEIGHT);
|
||||||
|
|
||||||
|
WMAddNotificationObserver(realizeObserver, lPtr,
|
||||||
|
WMViewRealizedNotification, lPtr->view);
|
||||||
|
|
||||||
return lPtr;
|
return lPtr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -145,14 +174,14 @@ WMCreateList(WMWidget *parent)
|
|||||||
void
|
void
|
||||||
WMSetListAllowMultipleSelection(WMList *lPtr, Bool flag)
|
WMSetListAllowMultipleSelection(WMList *lPtr, Bool flag)
|
||||||
{
|
{
|
||||||
lPtr->flags.allowMultipleSelection = flag ? 1 : 0;
|
lPtr->flags.allowMultipleSelection = ((flag==0) ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WMSetListAllowEmptySelection(WMList *lPtr, Bool flag)
|
WMSetListAllowEmptySelection(WMList *lPtr, Bool flag)
|
||||||
{
|
{
|
||||||
lPtr->flags.allowEmptySelection = flag ? 1 : 0;
|
lPtr->flags.allowEmptySelection = ((flag==0) ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -279,6 +308,8 @@ WMSetListUserDrawItemHeight(WMList *lPtr, unsigned short height)
|
|||||||
lPtr->flags.userItemHeight = 1;
|
lPtr->flags.userItemHeight = 1;
|
||||||
lPtr->itemHeight = height;
|
lPtr->itemHeight = height;
|
||||||
|
|
||||||
|
updateDoubleBufferPixmap(lPtr);
|
||||||
|
|
||||||
updateGeometry(lPtr);
|
updateGeometry(lPtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -491,8 +522,10 @@ paintItem(List *lPtr, int index)
|
|||||||
{
|
{
|
||||||
WMView *view = lPtr->view;
|
WMView *view = lPtr->view;
|
||||||
W_Screen *scr = view->screen;
|
W_Screen *scr = view->screen;
|
||||||
int width, height, x, y;
|
Display *display = scr->display;
|
||||||
|
int width, height, x, y, tlen;
|
||||||
WMListItem *itemPtr;
|
WMListItem *itemPtr;
|
||||||
|
Drawable d = lPtr->doubleBuffer;
|
||||||
|
|
||||||
itemPtr = WMGetFromArray(lPtr->items, index);
|
itemPtr = WMGetFromArray(lPtr->items, index);
|
||||||
|
|
||||||
@@ -500,15 +533,17 @@ paintItem(List *lPtr, int index)
|
|||||||
height = lPtr->itemHeight;
|
height = lPtr->itemHeight;
|
||||||
x = 19;
|
x = 19;
|
||||||
y = 2 + (index-lPtr->topItem) * lPtr->itemHeight + 1;
|
y = 2 + (index-lPtr->topItem) * lPtr->itemHeight + 1;
|
||||||
|
tlen = strlen(itemPtr->text);
|
||||||
|
|
||||||
if (lPtr->flags.userDrawn) {
|
if (lPtr->flags.userDrawn) {
|
||||||
WMRect rect;
|
WMRect rect;
|
||||||
int flags;
|
int flags;
|
||||||
|
|
||||||
|
|
||||||
rect.size.width = width;
|
rect.size.width = width;
|
||||||
rect.size.height = height;
|
rect.size.height = height;
|
||||||
rect.pos.x = x;
|
rect.pos.x = 0;
|
||||||
rect.pos.y = y;
|
rect.pos.y = 0;
|
||||||
|
|
||||||
flags = itemPtr->uflags;
|
flags = itemPtr->uflags;
|
||||||
if (itemPtr->disabled)
|
if (itemPtr->disabled)
|
||||||
@@ -519,19 +554,17 @@ paintItem(List *lPtr, int index)
|
|||||||
flags |= WLDSIsBranch;
|
flags |= WLDSIsBranch;
|
||||||
|
|
||||||
if (lPtr->draw)
|
if (lPtr->draw)
|
||||||
(*lPtr->draw)(lPtr, index, view->window, itemPtr->text, flags,
|
(*lPtr->draw)(lPtr, index, d, itemPtr->text, flags, &rect);
|
||||||
&rect);
|
|
||||||
} else {
|
|
||||||
if (itemPtr->selected) {
|
|
||||||
XFillRectangle(scr->display, view->window, WMColorGC(scr->white),
|
|
||||||
x, y, width, height);
|
|
||||||
} else {
|
|
||||||
XClearArea(scr->display, view->window, x, y, width, height, False);
|
|
||||||
}
|
|
||||||
|
|
||||||
W_PaintText(view, view->window, scr->normalFont, x+4, y, width,
|
XCopyArea(display, d, view->window, scr->copyGC, 0, 0, width, height, x, y);
|
||||||
WALeft, WMColorGC(scr->black), False,
|
} else {
|
||||||
itemPtr->text, strlen(itemPtr->text));
|
WMColor *back = (itemPtr->selected ? scr->white : view->backColor);
|
||||||
|
|
||||||
|
XFillRectangle(display, d, WMColorGC(back), 0, 0, width, height);
|
||||||
|
|
||||||
|
W_PaintText(view, d, scr->normalFont, 4, 0, width, WALeft, scr->black,
|
||||||
|
False, itemPtr->text, tlen);
|
||||||
|
XCopyArea(display, d, view->window, scr->copyGC, 0, 0, width, height, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((index-lPtr->topItem+lPtr->fullFitLines)*lPtr->itemHeight >
|
if ((index-lPtr->topItem+lPtr->fullFitLines)*lPtr->itemHeight >
|
||||||
@@ -1202,6 +1235,8 @@ didResizeList(W_ViewDelegate *self, WMView *view)
|
|||||||
|
|
||||||
WMResizeWidget(lPtr->vScroller, 1, view->size.height-2);
|
WMResizeWidget(lPtr->vScroller, 1, view->size.height-2);
|
||||||
|
|
||||||
|
updateDoubleBufferPixmap(lPtr);
|
||||||
|
|
||||||
updateGeometry(lPtr);
|
updateGeometry(lPtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1223,6 +1258,11 @@ destroyList(List *lPtr)
|
|||||||
if (lPtr->items)
|
if (lPtr->items)
|
||||||
WMFreeArray(lPtr->items);
|
WMFreeArray(lPtr->items);
|
||||||
|
|
||||||
|
if (lPtr->doubleBuffer)
|
||||||
|
XFreePixmap(lPtr->view->screen->display, lPtr->doubleBuffer);
|
||||||
|
|
||||||
|
WMRemoveNotificationObserver(lPtr);
|
||||||
|
|
||||||
wfree(lPtr);
|
wfree(lPtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -96,7 +96,7 @@ WMGetMenuItemEnabled(WMMenuItem *item)
|
|||||||
void
|
void
|
||||||
WMSetMenuItemEnabled(WMMenuItem *item, Bool flag)
|
WMSetMenuItemEnabled(WMMenuItem *item, Bool flag)
|
||||||
{
|
{
|
||||||
item->flags.enabled = flag;
|
item->flags.enabled = ((flag==0) ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+26
-17
@@ -101,7 +101,7 @@ fitText(char *text, WMFont *font, int width, int wrap)
|
|||||||
i = 0;
|
i = 0;
|
||||||
if (wrap) {
|
if (wrap) {
|
||||||
if (text[0]=='\n')
|
if (text[0]=='\n')
|
||||||
return 1;
|
return 0;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
i++;
|
i++;
|
||||||
@@ -154,7 +154,7 @@ W_GetTextHeight(WMFont *font, char *text, int width, int wrap)
|
|||||||
|
|
||||||
void
|
void
|
||||||
W_PaintText(W_View *view, Drawable d, WMFont *font, int x, int y,
|
W_PaintText(W_View *view, Drawable d, WMFont *font, int x, int y,
|
||||||
int width, WMAlignment alignment, GC gc,
|
int width, WMAlignment alignment, WMColor *color,
|
||||||
int wrap, char *text, int length)
|
int wrap, char *text, int length)
|
||||||
{
|
{
|
||||||
char *ptr = text;
|
char *ptr = text;
|
||||||
@@ -174,12 +174,15 @@ W_PaintText(W_View *view, Drawable d, WMFont *font, int x, int y,
|
|||||||
else
|
else
|
||||||
line_x = x + (width - line_width) / 2;
|
line_x = x + (width - line_width) / 2;
|
||||||
|
|
||||||
WMDrawString(view->screen, d, gc, font, line_x, y, ptr, count);
|
WMDrawString(view->screen, d, color, font, line_x, y, ptr, count);
|
||||||
|
|
||||||
|
if (wrap && ptr[count]!='\n')
|
||||||
y += fheight;
|
y += fheight;
|
||||||
|
|
||||||
if (isspace(ptr[count]))
|
while (ptr[count] && ptr[count]=='\n') {
|
||||||
|
y += fheight;
|
||||||
count++;
|
count++;
|
||||||
|
}
|
||||||
|
|
||||||
ptr += count;
|
ptr += count;
|
||||||
length -= count;
|
length -= count;
|
||||||
@@ -188,10 +191,10 @@ W_PaintText(W_View *view, Drawable d, WMFont *font, int x, int y,
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
W_PaintTextAndImage(W_View *view, int wrap, GC textGC, W_Font *font,
|
W_PaintTextAndImage(W_View *view, int wrap, WMColor *textColor, W_Font *font,
|
||||||
WMReliefType relief, char *text,
|
WMReliefType relief, char *text,
|
||||||
WMAlignment alignment, W_Pixmap *image,
|
WMAlignment alignment, W_Pixmap *image,
|
||||||
WMImagePosition position, GC backGC, int ofs)
|
WMImagePosition position, WMColor *backColor, int ofs)
|
||||||
{
|
{
|
||||||
W_Screen *screen = view->screen;
|
W_Screen *screen = view->screen;
|
||||||
int ix, iy;
|
int ix, iy;
|
||||||
@@ -205,24 +208,19 @@ W_PaintTextAndImage(W_View *view, int wrap, GC textGC, W_Font *font,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* background */
|
/* background */
|
||||||
#ifndef DOUBLE_BUFFER
|
if (backColor) {
|
||||||
if (backGC) {
|
XFillRectangle(screen->display, d, WMColorGC(backColor),
|
||||||
XFillRectangle(screen->display, d, backGC,
|
|
||||||
0, 0, view->size.width, view->size.height);
|
0, 0, view->size.width, view->size.height);
|
||||||
} else {
|
} else {
|
||||||
|
#ifndef DOUBLE_BUFFER
|
||||||
XClearWindow(screen->display, d);
|
XClearWindow(screen->display, d);
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
if (backGC)
|
|
||||||
XFillRectangle(screen->display, d, backGC, 0, 0,
|
|
||||||
view->size.width, view->size.height);
|
|
||||||
else {
|
|
||||||
XSetForeground(screen->display, screen->copyGC,
|
XSetForeground(screen->display, screen->copyGC,
|
||||||
view->attribs.background_pixel);
|
view->attribs.background_pixel);
|
||||||
XFillRectangle(screen->display, d, screen->copyGC, 0, 0,
|
XFillRectangle(screen->display, d, screen->copyGC, 0, 0,
|
||||||
view->size.width, view->size.height);
|
view->size.width, view->size.height);
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (relief == WRFlat) {
|
if (relief == WRFlat) {
|
||||||
@@ -300,7 +298,7 @@ W_PaintTextAndImage(W_View *view, int wrap, GC textGC, W_Font *font,
|
|||||||
|
|
||||||
textHeight = W_GetTextHeight(font, text, w-8, wrap);
|
textHeight = W_GetTextHeight(font, text, w-8, wrap);
|
||||||
W_PaintText(view, d, font, x+ofs+4, y+ofs + (h-textHeight)/2, w-8,
|
W_PaintText(view, d, font, x+ofs+4, y+ofs + (h-textHeight)/2, w-8,
|
||||||
alignment, textGC, wrap, text, strlen(text));
|
alignment, textColor, wrap, text, strlen(text));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -340,7 +338,18 @@ wmksize(unsigned int width, unsigned int height)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
WMRect
|
||||||
|
wmkrect(int x, int y, unsigned int width, unsigned int height)
|
||||||
|
{
|
||||||
|
WMRect rect;
|
||||||
|
|
||||||
|
rect.pos.x = x;
|
||||||
|
rect.pos.y = y;
|
||||||
|
rect.size.width = width;
|
||||||
|
rect.size.height = height;
|
||||||
|
|
||||||
|
return rect;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ WMRemovePopUpButtonItem(WMPopUpButton *bPtr, int index)
|
|||||||
void
|
void
|
||||||
WMSetPopUpButtonEnabled(WMPopUpButton *bPtr, Bool flag)
|
WMSetPopUpButtonEnabled(WMPopUpButton *bPtr, Bool flag)
|
||||||
{
|
{
|
||||||
bPtr->flags.enabled = flag;
|
bPtr->flags.enabled = ((flag==0) ? 0 : 1);
|
||||||
if (bPtr->view->flags.mapped)
|
if (bPtr->view->flags.mapped)
|
||||||
paintPopUpButton(bPtr);
|
paintPopUpButton(bPtr);
|
||||||
}
|
}
|
||||||
@@ -252,7 +252,7 @@ WMSetPopUpButtonText(WMPopUpButton *bPtr, char *text)
|
|||||||
void
|
void
|
||||||
WMSetPopUpButtonItemEnabled(WMPopUpButton *bPtr, int index, Bool flag)
|
WMSetPopUpButtonItemEnabled(WMPopUpButton *bPtr, int index, Bool flag)
|
||||||
{
|
{
|
||||||
WMSetMenuItemEnabled(WMGetFromArray(bPtr->items, index), flag);
|
WMSetMenuItemEnabled(WMGetFromArray(bPtr->items, index), (flag ? 1 : 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -266,7 +266,7 @@ WMGetPopUpButtonItemEnabled(WMPopUpButton *bPtr, int index)
|
|||||||
void
|
void
|
||||||
WMSetPopUpButtonPullsDown(WMPopUpButton *bPtr, Bool flag)
|
WMSetPopUpButtonPullsDown(WMPopUpButton *bPtr, Bool flag)
|
||||||
{
|
{
|
||||||
bPtr->flags.pullsDown = flag;
|
bPtr->flags.pullsDown = ((flag==0) ? 0 : 1);
|
||||||
if (flag) {
|
if (flag) {
|
||||||
bPtr->selectedItemIndex = -1;
|
bPtr->selectedItemIndex = -1;
|
||||||
}
|
}
|
||||||
@@ -333,7 +333,7 @@ paintPopUpButton(PopUpButton *bPtr)
|
|||||||
W_PaintText(bPtr->view, pixmap, scr->normalFont, 6,
|
W_PaintText(bPtr->view, pixmap, scr->normalFont, 6,
|
||||||
(bPtr->view->size.height-WMFontHeight(scr->normalFont))/2,
|
(bPtr->view->size.height-WMFontHeight(scr->normalFont))/2,
|
||||||
bPtr->view->size.width, WALeft,
|
bPtr->view->size.width, WALeft,
|
||||||
bPtr->flags.enabled ? WMColorGC(scr->black) : WMColorGC(scr->darkGray),
|
bPtr->flags.enabled ? scr->black : scr->darkGray,
|
||||||
False, caption, strlen(caption));
|
False, caption, strlen(caption));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -421,7 +421,7 @@ paintMenuEntry(PopUpButton *bPtr, int index, int highlight)
|
|||||||
width, itemHeight, WRRaised);
|
width, itemHeight, WRRaised);
|
||||||
|
|
||||||
W_PaintText(bPtr->menuView, bPtr->menuView->window, scr->normalFont, 6,
|
W_PaintText(bPtr->menuView, bPtr->menuView->window, scr->normalFont, 6,
|
||||||
index*itemHeight + yo, width, WALeft, WMColorGC(scr->black),
|
index*itemHeight + yo, width, WALeft, scr->black,
|
||||||
False, title, strlen(title));
|
False, title, strlen(title));
|
||||||
|
|
||||||
if (!bPtr->flags.pullsDown && index == bPtr->selectedItemIndex) {
|
if (!bPtr->flags.pullsDown && index == bPtr->selectedItemIndex) {
|
||||||
@@ -457,7 +457,7 @@ makeMenuPixmap(PopUpButton *bPtr)
|
|||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
WM_ITERATE_ARRAY(bPtr->items, item, iter) {
|
WM_ITERATE_ARRAY(bPtr->items, item, iter) {
|
||||||
GC gc;
|
WMColor *color;
|
||||||
char *text;
|
char *text;
|
||||||
|
|
||||||
text = WMGetMenuItemTitle(item);
|
text = WMGetMenuItemTitle(item);
|
||||||
@@ -466,12 +466,12 @@ makeMenuPixmap(PopUpButton *bPtr)
|
|||||||
WRRaised);
|
WRRaised);
|
||||||
|
|
||||||
if (!WMGetMenuItemEnabled(item))
|
if (!WMGetMenuItemEnabled(item))
|
||||||
gc = WMColorGC(scr->darkGray);
|
color = scr->darkGray;
|
||||||
else
|
else
|
||||||
gc = WMColorGC(scr->black);
|
color = scr->black;
|
||||||
|
|
||||||
W_PaintText(bPtr->menuView, pixmap, scr->normalFont, 6,
|
W_PaintText(bPtr->menuView, pixmap, scr->normalFont, 6,
|
||||||
i*itemHeight + yo, width, WALeft, gc, False,
|
i*itemHeight + yo, width, WALeft, color, False,
|
||||||
text, strlen(text));
|
text, strlen(text));
|
||||||
|
|
||||||
if (!bPtr->flags.pullsDown && i == bPtr->selectedItemIndex) {
|
if (!bPtr->flags.pullsDown && i == bPtr->selectedItemIndex) {
|
||||||
|
|||||||
@@ -40,14 +40,8 @@ W_ViewDelegate _ProgressIndicatorDelegate = {
|
|||||||
|
|
||||||
static void destroyProgressIndicator(ProgressIndicator *pPtr);
|
static void destroyProgressIndicator(ProgressIndicator *pPtr);
|
||||||
static void paintProgressIndicator(ProgressIndicator *pPtr);
|
static void paintProgressIndicator(ProgressIndicator *pPtr);
|
||||||
static void realizeProgressIndicator(ProgressIndicator *pPtr);
|
|
||||||
static void handleEvents(XEvent *event, void *data);
|
static void handleEvents(XEvent *event, void *data);
|
||||||
|
|
||||||
static void realizeObserver(void *self, WMNotification *not) {
|
|
||||||
|
|
||||||
realizeProgressIndicator(self);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
WMProgressIndicator*
|
WMProgressIndicator*
|
||||||
@@ -82,9 +76,6 @@ WMProgressIndicator*
|
|||||||
pPtr->minValue = 0;
|
pPtr->minValue = 0;
|
||||||
pPtr->maxValue = 100;
|
pPtr->maxValue = 100;
|
||||||
|
|
||||||
WMAddNotificationObserver(realizeObserver, pPtr,
|
|
||||||
WMViewRealizedNotification, pPtr->view);
|
|
||||||
|
|
||||||
return pPtr;
|
return pPtr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -167,13 +158,6 @@ WMGetProgressIndicatorValue(WMProgressIndicator *progressindicator)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
realizeProgressIndicator(ProgressIndicator *pPtr)
|
|
||||||
{
|
|
||||||
W_RealizeView(pPtr->view);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
didResizeProgressIndicator(W_ViewDelegate *self, WMView *view)
|
didResizeProgressIndicator(W_ViewDelegate *self, WMView *view)
|
||||||
{
|
{
|
||||||
@@ -268,6 +252,7 @@ paintProgressIndicator(ProgressIndicator *pPtr)
|
|||||||
XFreePixmap(scr->display, buffer);
|
XFreePixmap(scr->display, buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
handleEvents(XEvent *event, void *data)
|
handleEvents(XEvent *event, void *data)
|
||||||
{
|
{
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user