1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-03-12 04:25:47 +01:00

1530 Commits

Author SHA1 Message Date
Carlos R. Mafra
d0a48d9914 WindowMaker 0.95.0-crm 2011-10-11 14:32:55 +01:00
Rodolfo García Peñas (kix)
625e762f9a debian: problem with spaces and forget autogenerated files 2011-10-09 17:59:24 +01:00
Martin Dietze
8bc9a1dd19 debian: Version bump in nightly build script. 2011-10-07 19:54:11 +01:00
Rodolfo García Peñas (kix)
93687024ce debian: add back wmlib folder 2011-10-07 10:01:57 +01:00
Rodolfo García Peñas (kix)
9fa427bc7f Debian full patch migration
* New maintainer [Closes: #632875]
  * New upstream version, now from git. [Closes: #556677]
  * New package wmaker-common (arch independent files)
  * removed the asclock diversions from the wmaker scripts
  * new package wmaker-common with the arch independent files
  * debian/patches are now DEP-3
  * debian/copyright is now DEP-5
  * Standard-Version is now 3.9.2
  * manpages moved to upstream
  * solved some problems with .la files (lintian clean)
2011-10-05 19:24:01 +01:00
Carlos R. Mafra
d435ea7468 WINGs: Add back wprogressindicator.c
The examples inside WINGs/Tests fail to compile otherwise.
2011-08-25 00:06:58 +02:00
Carlos R. Mafra
f43aa47d68 Revert "WINGs: Remove wruler and wtext"
This reverts commit f4890b17e6.

It turns out that I needed some functions from wtext.c to develop
a WINGs front-end to my comic book collection MySQL database.

Conflicts:

	WINGs/Makefile.am
	WINGs/WINGs/WINGs.h
2011-08-24 19:18:06 +02:00
Rodolfo García Peñas (kix)
b949a1c464 debian: lots of updates 2011-08-24 18:27:32 +02:00
Rodolfo García Peñas (kix)
c2975ab510 doc: Fix error in Russian wmaker.1x manpage (lintian error) 2011-08-16 13:46:43 +02:00
Carlos R. Mafra
9777b14fb7 Increase height of 'Attributes' window
With the addition of an extra button to the 'Advanced Options' window,
the vertical space of the widget no longer suffices. Increase it from
350 to 360 and adjust other parameters accordingly.

And let's write the button positions as 'PHEIGHT - 40' instead of using
a hardcoded value, avoiding the need to change it everytime PHEIGHT is
changed.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2011-08-13 15:03:27 +02:00
Carlos R. Mafra
8ba6118c2e Make 'no miniaturizable' window property user-configurable
The flag to not let windows be minimized was already defined in
WM (it's called 'no_miniaturizable') and the minimize functions
respect it. However this flag can not currently be set manually.

As can be read in the NEWS file

  "NotMiniaturizable option changed to NoMiniaturizeButton"

it seems that the "non miniaturizable" property was a first-class citizen
in ancient times and probably configurable (those changes do not appear in
the old CVS history).

Let's make this property be user-configurable through the "Advanced Options"
panel.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2011-08-11 13:30:44 +02:00
Carlos R. Mafra
25c67fc7cc Increase width of 'Attributes' window
Before this change some lines in the "Advanced Options" window would not
fit into one line and would screw up the others. This depends on the fonts
used, but increasing the width of the panel a bit does not hurt.
2011-08-11 12:26:49 +02:00
Brad Jorsch
a06b0673d8 Fix some "'var' may be used uninitialized" warnings
The one in WPrefs.app/Appearance.c is indirect: the function might
be inlined and might return an uninitialized value, which causes gcc to
complain that the caller might use that uninitialized return value.
2011-08-09 23:45:34 +02:00
Brad Jorsch
d9296ff9a4 Remove warning in wmagnify.c (correctly)
The problem with f65b99e615 was that it removed the call to
newWindow() along with the unused variable, without considering that
newWindow() has side effects that need to happen even if the return
value is ignored. So as long as we keep the newWindow() call, we can
safely remove the (unused) variable.
2011-08-09 23:45:34 +02:00
Christophe CURIS
e01d14abe4 Fix possible missing NUL at end of string
There are were a few uses of 'strncpy' that could lead to a missing NUL,
resulting in possible garbage being displayed. As suggested by Tamas,
use 'wstrlcpy' instead
2011-08-08 19:11:22 +02:00
Carlos R. Mafra
e499f31a4e Remove Netscape icon 2011-08-08 19:11:22 +02:00
Carlos R. Mafra
8fe18de926 Use wmgenmenu to create WMRootMenu during installation
Instead of using _old_ and hard-coded predefined menus as the
source for the user's WMRootMenu during installation, generate
the menu automatically using wmgenmenu.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2011-08-08 19:11:22 +02:00
Carlos R. Mafra
e95f886e06 util: Fix wmagnify
wmagnify stopped working after f65b99e615 ("Remove warnings").
So revert that change in util/wmagnify.c, as it turns out that the
gcc warning was bogus there.
2011-08-01 22:40:55 +02:00
Christophe CURIS
6c2a5f19f1 Added mailing list address in the parfect-patch file
This may ease Carlos' work slightly when dealing with people like me that could not find it and thus submitting the patch directly to him, the only address found
2011-07-20 10:42:19 +02:00
Carlos R. Mafra
c126f1d08f Fix make-gzip 2011-06-29 18:35:40 +02:00
Tamas TEVESZ
dce16306bc Plug some (possible) memleaks
PropGetWMClass()

- XAllocClassHint()s a struct for class hint data
- This is filled by XGetClassHint(), which in turn uses Xlib to allocate
  some more space for XClassHint members
- Upon XGetClassHint() failure, "default" is libc malloc'd (via strdup),
  and is returned to the caller
- Upon XGetClassHint() success, XClassHint members are returned raw --
  these members must be freed with XFree() (see XAllocClassHint(3))
- Thus it's up to PropGetWMClass() callers to decide (based upon the return
  value) which method (libc free() or XFree()) to use to free res_name
  and res_class. This was done nowhere, thus leaking some memory
  on every failed PropGetWMClass() call.
- So just strdup the successful res_name/res_class members, XFree() them
  while still in PropGetWMClass(), and allow callers to unconditionally
  libc free() whatever PropGetWMClass() returns.
2011-04-18 13:25:44 -07:00
Tamas TEVESZ
f6fefbd9b6 Partial fix for focus stealing
By turning M'bert's d6c134 around a bit and adapting the surroundings,
allow _NET_ACTIVE_WINDOW only if fulfilling it doesn't cause annoying
unwanted changes in the workspace. This is now the default behaviour;
unconditional focus stealing can be enabled on a per-client basis in the
Advanced Options window menu ("Focus across workspaces").
2011-04-18 13:23:22 -07:00
Tamas TEVESZ
5fa8b979b9 Amend recent wmgenmenu changes
Raise MAX_NR_APPS to account for the more menu entries
2011-04-10 22:13:29 -07:00
Tamas TEVESZ
af857e8b95 Fix app behaviour on Xinerama displays
With Xinerama, on heads other than the primary, certain parts (menus,
scrollbars) of certain types of clients (Qt) are incorrectly or not at
all drawn.

The fix follows other window managers in completely ignoring the
_NET_WORKAREA property.

Problem originally poked at by Ambrus Szabo, correct keyword and the
eventually implemented solution suggested by Lucius Windschuh, typed
up by me.
2011-04-10 22:10:13 -07:00
Christoph Soehngen
cbbc1fc9ac wmgenmenu: Update German translation 2011-04-09 14:47:58 -07:00
Christoph Soehngen
18de6b8c96 wmgenmenu: Add more apps 2011-04-09 14:40:03 -07:00
Ambrus Szabo
7490b14bf0 Bugfix: java menu problem after resize, maximize
From the original report by Tamas Teves:

   "i'm having (and have, for a long time) problems with openoffice and
   java-based (perhaps only netbeans-based?) apps.

   for openoffice, any menu opens in the far right edge (with xinerama,
   on the far right edge of the rightmost display) of the display. it
   then can be clicked and operated corretly where it appears.

   as for netbeans (and jswat, which also uses netbeans platform as a
   base), it's a bit more complicated, but let me try to describe. start
   netbeans so that it is not maximized and not in the upper left of the
   display. it works fine. move it around, still works fine, resize,
   still works fine. now if i maximize it (not by moving to the upper
   left corner and resizing, but by the maximize shortcut), then the
   menus start acting weird. it seems that the actual position of the
   mouse pointer and the hot spot of the mouse pointer get "out of sync"
   so to speak, as if the hot spot stayed where the window was before
   maximization.

   i've made a capture which hopefully better shows what i'm trying to
   say. this is a netbeans window maximized, while i'm trying to click
   tools->options. the left mouse button must always be held down, or
   else it instantly loses any interaction with the menus (in the capture
   i released it once when i completely lost track of where i might be).

   the capture is available at http://dawn.dev.hu/~ice/tmp/wmjava.avi

   i'm not sure whether java stuff other than those based on netbeans
   platform exhibit this behaviour. i've seen this with at least one
   other nb platform stuff as well."

The fix is to call wWindowSynthConfigureNotify() after wWindowConfigure()
2011-04-09 10:32:12 -07:00
Ambrus Szabo
a750fe03f4 opaque resize
WPrefs:
 WindowHandling page: Mouse opaque resize
 Expert page: Opaque move and resize with keyboard
2011-03-30 23:32:37 +02:00
Ambrus Szabo
8fd4821155 Fix makefiles bug.
FreeBSD make vs gmake
in FreeBSD: $(dir $<@) => ''
in gmake: $(dir $<@) => './'
2011-03-27 10:47:40 +02:00
Tamas TEVESZ
f65b99e615 Remove warnings
* Remove assigned but not used variables (GCC 4.6)
* Bump _XOPEN_SOURCE to 600, ridding of FreeBSD warnings (this probably need
  to be tweaked on a per-implementation basis as problems arise)
2011-03-24 16:19:52 +01:00
Tamas TEVESZ
43c7abe79f Adapt for libpng changes 2011-03-24 16:19:37 +01:00
Szabó Ambrus
7feb59251e Fix compilation in FreeBSD
In FreeBSD make doesn`t work, only gmake.
2011-03-15 00:27:01 +01:00
Haroldo Santos
c82138eab9 switchpanel: Add skip_switchpanel advanced option
Some applications running in my machine are only background
windows, e.g.: screenlets showing CPU usage.

In current wmaker version all these applications pollute my
switchpanel, so I wrote this patch (thanks Carlos for the helping me).

It includes an additional advanced option for windows "Do not
include in switchpanel" which, if set, allows applications to
not appear in the switchpanel.

Signed-off-by: Haroldo Santos <haroldo.santos@gmail.com>
2011-02-17 19:29:15 +01:00
Camille d'Alméras
077a2eaa71 wmgenmenu: Add French and Spanish translations
[crm: edits in configure.ac and Makefile.am]
Signed-off-by: Camille d'Alméras <camilledalmeras@yahoo.com>
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2011-02-13 18:08:46 +01:00
Carlos R. Mafra
751b6e7938 WPrefs: Update ballon text for "Window Focus Preferences"
Thanks to Camille d'Alméras for pointing it out.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2011-01-31 12:25:20 +01:00
Carlos R. Mafra
bbaa42240f WPrefs: Update po/Makefile.am to reflect file deletion
Otherwise 'make WPrefs.pot' inside WPrefs.app/po fails.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2011-01-31 12:10:24 +01:00
Carlos R. Mafra
7036890288 wmgenmenu: Add more apps
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2011-01-31 10:52:07 +01:00
Andrea Gelmini
7c14c0b14a Remove duplicated #includes 2010-11-29 11:59:22 +01:00
Brad Jorsch
85f31104cd Display modifiers in window menu
The window menu displays the shortcut key for operations with a
shortcut, but does not display the modifiers. This reduces the utility
of the display as it's hard to know whether "h" means "Mod4+h" or
"Ctrl+Mod4+h" or something else.

This patch prefixes those shortcut displays with the modifier names,
e.g. Ctrl+Mod4+h, and adds a preference ModifierKeyLabels to allow
overriding this, e.g. to "⌃◇h". It doesn't add this preference to
WPrefs, if someone else wants to do that feel free.

Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-11-17 02:53:04 +01:00
Andreas Metzler
1b2745fad8 Update documentation of ABI/API changes again.
Update documentation of ABI/API changes in NEWS files (up to date GIT
next as of 2010-10-30).
2010-11-01 09:35:29 +01:00
Brad Jorsch
5ff0272508 Fix pkgdatadir
The previous patch "Fix path substitutions" accidentally caused autoconf
to overwrite automake's pkgdatadir. Since configure.ac does absolutely
nothing interesting with pkgdatadir anyway, just remove it completely.

Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-10-18 10:26:16 +02:00
Andreas Metzler
1060f49366 pkgconfig - minimize direct linking
Use Libs.private to avoid unnecesary direct linking.

Signed-off-by: Andreas Metzler <ametzler@downhill.at.eu.org>
2010-10-18 10:25:49 +02:00
Andreas Metzler
614eb4c9e8 Simplify/fix pkgconfig installation
Patch "Fix path substitutions" moved generation of pkgconfig files from
./configure to Makefiles. However the generation is not triggered since
the pkgconfig files are not listed as dependency. Fix by conversion to a
straightforward automake rule.

Acked-by: Brad Jorsch <anomie@users.sourceforge.net>
Signed-off-by: Andreas Metzler <ametzler@downhill.at.eu.org>
2010-10-18 10:24:45 +02:00
Brad Jorsch
76eab97209 Don't save app settings proplist when nothing changed
Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-10-12 23:34:28 +02:00
Tamas TEVESZ
b5ed9841bc WINGs: Add wshellquote()
Transforms its argument so that the result is safe to pass to the shell
as an argument.

With very heavy inspirations from NetBSD's shquote(3),
http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/gen/shquote.c?annotate
http://man.netbsd.org/cgi-bin/man-cgi?shquote

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-12 23:24:45 +02:00
Brad Jorsch
3f8bba8064 Reset bouncing app icon position when bounce ends
If the app is destroyed before the bounce finishes, the icon may be left
out of position. Fix that by explicitly resetting the position when the
bounce is complete for whatever reason, not just when the bounce ends
normally.

Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-10-12 15:46:42 +02:00
Tamas TEVESZ
4f853ce3b6 wmmenugen: Finish the XDG parser
Recognize the freedesktop.org-mandated Main Categories in .desktop files
and put menu entries in the appropriate categories.

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-10 19:38:14 +02:00
Tamas TEVESZ
a23b72c32a wmmenugen: Add file name validator function
Add optional interface parsers may choose to implement that, when
a directory is being scanned for files to parse, may, based on
the file name, decide whether or not said file should be parsed.

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-10 19:36:34 +02:00
Tamas TEVESZ
5377ec8fba wmmenugen: Add executable detection, make Wmconfig use it
Add fileInPath, which determines whether or not a given file exists
in $PATH (some heuristics apply).

Make the Wconfig parser use it.

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-10 19:34:45 +02:00
Tamas TEVESZ
0451160f7d wmmenugen: Finish Wmconfig parser, touch up PropList writer
As far as i can tell this finishes the Wmconfig parser (all bits we are
interested in/can use are parsed and converted).

The PropList writer gained ability to properly react to and handle various
flags passed by parsers.

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-10 10:04:32 +02:00
Brad Jorsch
a396f3bd66 Only cache pixmaps for docked icons
There is little point caching a pixmap for an app that isn't in the
dock. This patch creates a function wAppIconSave that saves only if the
app icon is docked, and adds calls to that function in all the places
where an appicon can transition from undocked to docked.

It also "adds" a function wApplicationSaveIconPathFor that saves an icon
path to the configuration plist; the function already existed, it was
just static before.

Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-10-08 22:03:31 +02:00
Brad Jorsch
125cba8f82 Paint app icons when updated
Add calls to wAppIconPaint when wIconUpdate is called on the app icon.

Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-10-08 22:03:31 +02:00
Brad Jorsch
ee1f13da45 Fix wIconUpdate logic
This patch changes the logic for choosing the icon, and gets rid of
wIconChangeImage in favor of wIconChangeImageFile.

Old logic:
* On create, load either NET_WM_ICON or the file from disk.
* On update, choose (in order):
  1. WM_HINTS icon_window
  2. WM_HINTS icon_pixmap
  3. Whatever was loaded on creation, unless wIconChangeImage or
	 wIconChangeImageFile was called.
  4. Default icon.

New logic:
* On update, choose (in order):
  1. WM_HINTS icon_window
  2. NET_WM_ICON
  3. WM_HINTS icon_pixmap
  4. Icon file from disk.
  5. Default icon.

Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-10-08 22:00:24 +02:00
Brad Jorsch
7aff3b6e44 Fix handling of NET_WM_ICON
NET_WM_ICON is a property change, not a message.

updateIconImage doesn't use scr, remove it.

updateIconImage should clear out the net_icon_image if there isn't one
anymore (i.e. XGetWindowProperty fails or the icon cannot be extracted).

When the icon is changed, we need to call wIconUpdate.

Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-10-08 22:00:23 +02:00
Brad Jorsch
5eebb8bc3c Fix some warnings
Non-obvious fixes:

WINGs/wfilepanel.c: Cast to void to avoid an unused calculated value
warning.

WINGs/wtabview.c: Test tab<0 to avoid a warning from the next condition
about signed overflow in an inlined invocation of the function.

Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-10-08 22:00:23 +02:00
Alexey I. Froloff
51134d2438 wmaker.inst: quote shell variables
Signed-off-by: Alexey I. Froloff <raorn@altlinux.org>
2010-10-08 18:13:56 +02:00
Alexey I. Froloff
ba5fceb21c wmaker.inst: better locale check
Signed-off-by: Alexey I. Froloff <raorn@altlinux.org>
2010-10-08 18:13:56 +02:00
Tamas TEVESZ
3c408fa179 Update local copy of GPLv2 and FSF address in copyrights
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-08 18:13:56 +02:00
Tamas TEVESZ
8b68042b30 Add wmmenugen, an extensible PropList-format menu generator
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-08 18:13:56 +02:00
Tamas TEVESZ
210bcec4de WINGs: tree enhancements
- add WMFindInTreeWithDepthLimit, which is like WMFindInTree, but
  does not descend down more than a set limit.

- add WMTreeWalk, which will walk a WMTreeNode, running a callback
  function on each node.

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-08 00:11:44 +02:00
Tamas TEVESZ
9a2732a4c3 Add back WINGs/tree.c that was removed in c9d0c7c
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-08 00:11:36 +02:00
Brad Jorsch
668cac00f6 Cleanup .gitignore
Remove some obsolete entries, add some needed new ones, and sort the
thing.

Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-10-07 12:04:31 +02:00
Adam Hoka
7cc64627cc WINGs: fts() -> nftw() in wrmdirhier()
Plus reorganize headers a bit.

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:31 +02:00
Brad Jorsch
b16181143c Fix stuck appicon from embedded apps
When applications are embedded in firefox via mozplugger, e.g. ooffice
for viewing .doc files or xpdf for viewing pdfs, and the embedded
application opens a popup window, we end up with a shared appicon for
the embedded app that remains until Window Maker is restarted.

The underlying cause is that mozplugger winds up reparenting the
embedded app's original leader window to a subwindow of itself, so
wmaker's SubstructureNotifyMask on the root window no longer picks up
the DestroyNotify when that original leader is destroyed.

It seems easy to fix once you track down the problem: when fixing
several other properties in fixLeaderProperties(), add
StructureNotifyMask so we get DestroyNotify no matter where the leader
gets reparented to. A more targeted fix would only add
StructureNotifyMask when the fake group's origLeader is set, but I don't
think a few extra structure notifications are going to cause us any real
problems.

Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-10-07 12:04:31 +02:00
Tamas TEVESZ
4b894021d9 Missed a piece in tree.c removal
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:31 +02:00
Andreas Metzler
cdf457d2d5 Document ABI/API changes
Document ABI/API changes in NEWS files (up to date GIT next as of
2010-10-02)
2010-10-07 12:04:31 +02:00
Brad Jorsch
3490c8bd30 Minor fixes to appicon highlighting
When an app hides its window but doesn't exit (e.g. apps that "minimize"
to the system tray), the highlighting was not being removed.

When alt-tabbing, the tabbed-to app's icon was not getting highlighted.

Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-10-07 12:04:31 +02:00
Tamas TEVESZ
70abda81d0 Make OPEN_MENU be able to include PropList menus
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:31 +02:00
Brad Jorsch
c37046e6a9 Fix wusleep
struct timespec's tm_nsec is in nanoseconds, not microseconds.

Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-10-07 12:04:31 +02:00
Carlos R. Mafra
09e6fd1526 Remove translations of INSTALL-WMAKER, README and FAQ.I18N
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2010-10-07 12:04:31 +02:00
Brad Jorsch
060ba6a9cd Fix path substitutions
Autoconf uses multiple levels of variables when defining paths. For
example, ${datadir} by default is ${datarootdir}, which by default is
${prefix}/share, which by default is /usr/local. Substituting from
./configure, as is done by AC_DEFINE or AC_DEFINE_UNQUOTED, does not
expand all these variables. This was causing some of our defines to have
garbage like "${prefix}/share/pixmaps" rather than the intended
"/usr/local/share/pixmaps".

The solution is to generate the files needing these paths from the
Makefile rather than from ./configure, because make does fully expand
all those levels.

Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-10-07 12:04:31 +02:00
Brad Jorsch
f6080ffd56 Fix "make dist"
Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-10-07 12:04:31 +02:00
Tamas TEVESZ
ffda48bd61 Add LCOV support to generate coverage information
How to use:

- Install LCOV (http://ltp.sourceforge.net/coverage/lcov.php)
- AFAICT, compiler must be GCC.
- ./configure --prefix=/some/path --enable-lcov=/var/www

  This will configure the sources so that generated coverage information
  (HTML pages) will end up in /var/www/coverage-report. Choose a directory
  you have write access to.

- make

  No installation necessary (although it probably doesn't hurt to have
  WM installed in ${prefix} so it can find resources and stuff, but the
  build tree must be kept intact anyway).

- Put ${srcroot}/src, ${srcroot}/WPrefs.app and ${srcroot}/util first in
  your path.
- Arrange for your .xinitrc or DM to start ${srcroot}/src/wmaker as your
  window manager.
- Use it as you normally would, possibly for an extended period of time.
- make coverage.

  This will create a tree of web pages under /var/www/coverage-report

- Further `make coverage's (after some more use) will re-generate the
  report (deleting the directory first).

- `make coverage-reset' will reset execution counts to zero (see lcov(1)).

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:31 +02:00
Tamas TEVESZ
7859e2d59f Silence a few warnings
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:31 +02:00
Tamas TEVESZ
14863cd3b1 WINGs: Bounded string ops
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:31 +02:00
Tamas TEVESZ
300d02bf54 WINGs: Remove #ifdef OLD_CODE
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:31 +02:00
Tamas TEVESZ
1420e44bb1 WINGs: Modernize wusleep()
- Change the wusleep abomination to be a simple wrapper around
  nanosleep (man says it's been POSIX for almost a decade)
- Remove autoconf tests that became unnecessary along the way

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:31 +02:00
Tamas TEVESZ
de9fcef214 WPrefs: Remove dead code
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:30 +02:00
Tamas TEVESZ
843dc889f4 WINGs: Reorg headers to mark items' locations in source files
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:30 +02:00
Tamas TEVESZ
b4cb488241 WINGs: Remove wprogressindicator and tree
Neither of them used (not by wdm either)

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:30 +02:00
Tamas TEVESZ
d8eea6a155 WINGs: Dead code removal
- on_exit is nowhere to be found in recent written history
- so there haven't for long been a system with !HAVE_ATEXIT
- so there is no need for either #ifdef HAVE_ATEXITs or configure
  checks for atexit

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:30 +02:00
Brad Jorsch
b305eb84fb Ignore shared_appicon if an appicon already exists
An appicon is created for each group of windows, as specified by the
WM_HINTS window_group or the WM_CLIENT_LEADER. The "shared_appicon"
feature ignores the group leader specified by the application, replacing
it with a dummy leader matching the window's WM_CLASS. This causes
issues for dockapps, since each instance of a dockapp needs its own
appicon to display the different icon_windows, so shared_appicon is
automatically disabled for dockapp windows.

If the application creates some dockapp windows (no shared_appicon) and
some regular windows (with shared_appicon) with the same leader, it can
unexpectedly end up with two different appicons: one for the real group
leader it set and one for the fake leader created for shared_appicons.
Both of these appicons will try to use the same icon_window, which may
cause the dockapp window to suddenly lose its contents as they are moved
to the fake leader's appicon.

There is a simple fix: if a WApplication already exists (and has an
appicon) for the app-specified group leader window, disable
shared_appicon.

Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-10-07 12:04:30 +02:00
Andreas Metzler
88c6a51547 Rename libwutil1 to libwutil2
Rename debian packages following libwutil soname bump.
2010-10-07 12:04:30 +02:00
Tamas TEVESZ
d59dacbccd Repair wgethomedir(), broken a little while back
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:30 +02:00
Tamas TEVESZ
f4890b17e6 WINGs: Remove wruler and wtext
Apparently not used (not by wdm either).

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:30 +02:00
Tamas TEVESZ
660b61a182 WINGs: Do not look static information up every time
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:30 +02:00
Tamas TEVESZ
752d084609 WINGs: Plug potential segfault
...following up on d65cb5a ("Preparing to do exactly as FIXME says").

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:30 +02:00
Tamas TEVESZ
94a0c7b42f Fix some double newlines
Just a couple that woud now print double (or several more) newlines.

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:30 +02:00
Tamas TEVESZ
8594c39a0b WINGs: Make w*() print message origins
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:30 +02:00
Tamas TEVESZ
34293e072a Preparing to do exactly as FIXME says
However, knowing about those functions is quite a prerequisite.

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:30 +02:00
Tamas TEVESZ
1f21919809 Remove wsyserrorwithcode, rename wsyserror to werror
wsyserrorwithcode - Not used, no point either.
wsyserror->werror - qualifying "error" with a "type" hardly makes
sense if there are not at least two "type"s. There are not. Safe trip.

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:30 +02:00
Tamas TEVESZ
c5f5e0b9c0 More precise information on unknown systems
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:30 +02:00
Andreas Metzler
24d7457ec6 Document ABI and API changes
List ABI and API changes in the respective NEWS files.
2010-10-07 12:04:30 +02:00
Andreas Metzler
4de3d69934 Fix typo enviroment
s/enviroment/environment/ both in the .c file and in all .po files that
already contain a translation for the string. The latter prevents
wrongly marking the translation as fuzzy.
2010-10-07 12:04:30 +02:00
Andreas Metzler
be8a5d4a45 Do not mark product names as translatable
There is no point in trying to translate trademarks/product names like
Window Maker or OpenSUSE, stop marking these strings as translatable.
2010-10-07 12:04:29 +02:00
Andreas Metzler
ff6a6ebbaa Build-Depend on automake 1.11 or later.
Reflect versioned automake build requirement in Debian's Build-Depends.
2010-10-07 12:04:29 +02:00
Andreas Metzler
219e7fcafa Add function declaration for wIconSetHighlited
The expansion of the macro wApplication{Dea,A}ctivate triggers an
implicit declaration warning for wIconSetHighlited. Add function
declararion to fix this.
2010-10-07 12:04:29 +02:00
Brad Jorsch
f38aa69e40 Clean up library linking
On the one hand, libWINGs wasn't linking against -lX11 when it should
have been. And on the other, only libWINGs needs Xft, only wmaker needs
Xrandr, only wmaker and wmsetbg need Xinerama, only libwraster needs
Xmu, and -lpng may not need -lz.

Cleaning this up can help distributions get their dependencies correct,
and might even avoid loading the unused libraries at runtime, so we may
as well do it.

Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-10-07 12:04:29 +02:00
Brad Jorsch
8ca05fd4be Use -lbsd for strlcat/strlcpy, if needed and available
On BSD systems, strlcat and strlcpy are included in the C library and
nothing special is needed. On Linux systems they are not, but libbsd may
be available to provide them. Use it if so.

This also adds wstrlcat and wstrlcpy instead of trying to maybe-provide
strlcat and strlcpy themselves, as that way there is no risk of symbol
conflicts. Not bumping the library version at this time, that should be
done (if necessary) before release.

Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-10-07 12:04:29 +02:00
Tamas TEVESZ
f206c15fea Repair defaults for new titlebar button style
Originally missed in 17cc7c3c

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:29 +02:00
Tamas TEVESZ
4478f21b7f WINGs: Less ad-hoc approach for __wmessage()
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:29 +02:00
Tamas TEVESZ
d2853c8584 WINGs: Add detection and local copy for strlcat()/strlcpy()
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:29 +02:00
Tamas TEVESZ
51236308d2 WINGs: Small assorted formatting changes
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:29 +02:00
Tamas TEVESZ
02de600ecd WINGs: Simplify and rationalize createDir() and deleteFile()
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:29 +02:00
Tamas TEVESZ
a8813b2eae WINGs: Add normalizePath()
Removes multiple consecutive and any trailing slashes from
a path-looking string

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:29 +02:00
Tamas TEVESZ
0d32a6d3b7 WINGs: Simplify WMPathForResourceOfType()
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:29 +02:00
Tamas TEVESZ
553464d965 WINGs: Return NULL on NULL input in checkFile()
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:29 +02:00
Tamas TEVESZ
a71a604ab1 WINGs: Make wmalloc() intialize allocated memory to 0
- Accordingly remove individual memsets, for now from WINGs only.

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:29 +02:00
Carlos R. Mafra
cf2301a048 Remove assembly/optimized code
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2010-10-07 12:04:29 +02:00
Carlos R. Mafra
ce9b375b8d configure: Do not warn about unused parameters
Now my 'make V=0' compilation can be used to spot
new/relevant warnings.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2010-10-07 12:04:29 +02:00
Tamas TEVESZ
b8f118e9a5 Remove obsolete --with-xft from debian/rules
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:29 +02:00
Tamas TEVESZ
ae8937e152 Fix some off-by-ones
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:29 +02:00
Tamas TEVESZ
091c9c366d Reduce noise in WUtil
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:29 +02:00
Tamas TEVESZ
3c847aa52b Kill wstrerror
As far as i can tell, all current targets have strerror().

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:29 +02:00
Tamas TEVESZ
758f4c80d1 Ungeneralize wrlib DEBUG
Plus debug messages belong on stderr.

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:28 +02:00
Tamas TEVESZ
b4b07c2cac Kill BENCH
Nice idea, x86 assembly is so 1980s.

tests/testgrad.c could probably have been saved, but seriously, who's
going to miss it?

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:28 +02:00
Tamas TEVESZ
4a9d561ce4 Repair TEST_WITH_GC
The comment in WINGs/memory.c:wfree() pretty much explains the current
situation. There's an incredible amount of mixing the wmalloc/wfree
wrappers with native mallocs/frees on the other side, and a good several
cases of misusing external libraries' APIs. Until this is thoroughly
cleaned, WM with --enable-boehm-gc will hardly even start.

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:28 +02:00
Tamas TEVESZ
2bc0c1124a Pretty-print for string2index
Turns unhelpful
wmaker: warning: wrong option value for key "NewStyle". Should be one of new, old, next
into helpful
wmaker: warning: wrong option value for key "NewStyle". Got "YES", should be one of "new", "old", "next"

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:28 +02:00
Brad Jorsch
6483b198d3 Documentation cleanups for --with-gnustepdir
Quite a bit of documentation still mentioned --with-appspath. Fix that.

Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-10-07 12:04:28 +02:00
Brad Jorsch
b042d2be8e Fix --with-gnustepdir
Commit acc868d91d tried to change
--with-appspath to --with-gnustepdir, but either it wasn't done
correctly (and no one noticed) or old versions of AC_ARG_WITH worked
completely differently (and in an extremely odd way) because the option
remained --with-appspath and just the help text was changed. Then commit
bde572f673, which claims to have been
fixing some sort of issue with path assignment, broke it completely (i
guess) because the author there trusted the help text.

This completes the change from commit
acc868d91d that makes the option really be
--with-gnustepdir.

Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-10-07 12:04:28 +02:00
Carlos R. Mafra
80814b7dba XRandR temporary amendments
If we Restart() directly, the windows with titlebars come back N pixels
below their original positions before the xrandr-induced restart, where
N is the titlebar height.

To avoid this issue, let's do the proper restart preparation before
actually calling Restart().

Let's also grab ConfigureNotify in the event loop as in the patch
here: http://lists.kde.org/?l=kwin&m=116429907520188&w=2
(thanks to Tamas for pointing it out).

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2010-10-07 12:04:28 +02:00
Tamas TEVESZ
e7f3e62d69 Fix typo in wApplicationExtractDirPackIcon()
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:28 +02:00
Carlos R. Mafra
e10e7d08fa WPrefs: Replace Netscape and Acrobat Reader menu entries
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2010-10-07 12:04:28 +02:00
Brad Jorsch
844bf1b4e3 Fix compilation with LDFLAGS=-Wl,--no-add-needed
If you link against a library A that itself links against a library B,
it may or may not work to use symbols from library B in your executable;
this is known as "indirect linking". GNU ld does indirect linking by
default (but it can be disabled using --no-add-needed), but the new
experimental GNU gold linker does not do this. It's an easy fix for us,
as the tests are all already done in ./configure, we just need to tell
the Makefile.ams to use the results.

This should fix Debian bug #556677, if they ever start using this
branch.

[crmafra: Folded Andreas Metzler patch to update debian/changelog]

Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-10-07 12:04:28 +02:00
Tamas TEVESZ
7374fe5984 Remove local strcasecmp implementation
Remove local strcasecmp implementation; whatever system doesn't have it
is off the table for now.

memcmp is used by WINGs; add autoconf check

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:28 +02:00
Tamas TEVESZ
e18eba6ae7 CommitStackingForWindow prototype
add CommitStackingForWindow() prototype to superfluous.c
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:28 +02:00
Tamas TEVESZ
35ed80648b Prevent a WPrefs segfault
Prevent WPrefs (menu panel) segfaulting upon coming by an invalid command in
the root menu.

Reported and first patch version by Bento Loewenstein.

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:28 +02:00
Carlos R. Mafra
09c56140a2 configure: Disable XRandR by default
Some people using nvidia and/or playing some games (e.g. Einstein)
are reporting some issues with the restart induced by the
resolution changing. Let's disable it by default.
People without nvidia cards etc can still enable it with
--enable-xrandr.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2010-10-07 11:54:15 +02:00
Brad Jorsch
ece6d213aa Option to raise bouncing appicons
If the appicon is not in the dock/clip, or the dock/clip is not set to
"Keep on Top", there's a good chance you won't actually see the bouncing
because some other window is covering the appicon.

Besides adding the option to raise bouncing windows, this patch adds a
utility method to move a window back into its correct stacking position
after it has been messed with using XRaiseWindow.

Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-09-17 22:40:42 +02:00
Brad Jorsch
5b24997446 Add a preference for XUrgencyHint bouncing
Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-09-17 22:40:42 +02:00
Brad Jorsch
8f63bdafcd Periodic bouncing for XUrgencyHint
When a window has XUrgencyHint set, bounce the app icon periodically.
2010-09-17 11:05:51 +02:00
Alexey I. Froloff
8e0ef4766d Drop BOUNCE_APP #ifdef's
Since bouncing respects DisableAnimations option, there's no need
in #ifdef's.

Acked-by: Carlos R. Mafra <crmafra@gmail.com>
Signed-off-by: Alexey I. Froloff <raorn@altlinux.org>
2010-09-17 10:18:35 +02:00
Brad Jorsch
1194889c95 Fix bounce direction of docked appicons
I have my dock on the right edge of the screen, and my clip right next
to it. So the first icon underneath the clip is 64 pixels from the top
and 64 from the right. It seems silly for it to bounce downwards instead
of sideways like every other icon under the clip.

So make the choice of vertical or horizontal for docked icons be
relative to the dock or clip rather than absolute screen position.
Left/right or up/down is still chosen by screen position, as are
situations where the icon is a chess bishop's move from the clip.
2010-09-17 10:16:19 +02:00
Brad Jorsch
ee69b6207a Make bouncing respect DisableAnimations 2010-09-17 10:16:19 +02:00
Brad Jorsch
5afe745c01 Automake dependency tracking
I just spent an hour trying to find out why the latest wmaker-crm was
ignoring a number of the preferences in my configuration file. It turns
out the problem was that commit f41db5 added a value into the middle of
the enum in src/keybind.h, and the setting of
AUTOMAKE_OPTIONS = no-dependencies in all the Makefile.ams meant that
make wasn't smart enough to rebuild the files depending on it.

Would anyone mind if we just remove no-dependencies from
AUTOMAKE_OPTIONS? People can still run ./configure with
--disable-dependency-tracking to disable it at configure time.
2010-09-15 20:37:48 +02:00
Brad Jorsch
9318a7f428 Improve dockapp recognition
On Wed, Sep 15, 2010 at 04:40:52PM +0200, Gilbert wrote:
>
> "." = {NoAppIcon = Yes;};
>   "*" = {NoAppIcon = Yes;};

Oh, I see. It lets you override NoAppIcon generically instead of for
each app.

> Exactly, having 'DockApp' as the class name makes them behave more
> consistently internally. This might be fixed in some other way
> internally, but I couldn't figure it out...

Except it doesn't, the only thing it changes inside wmaker is that it
avoids displaying the name as "DockApp" on the settings window.

A "dockapp" is just an application that sets icon_window in WM_HINTS
(which causes a window to be displayed as the app icon) and
initial_state to WithdrawnState (which causes the main window to not
actually appear when the window is mapped). The class has nothing to do
with it.

The problems I mentioned stem from gtk+ not allowing you to set
initial_state to WithdrawnState. Openbox and fluxbox (and maybe others)
don't take the icon_window into their "slit" unless initial_state is
WithdrawnState, so the whole thing completely fails. Wmaker always uses
the icon_window for the app icon, so that part works fine, but the
"main" app window still flashes onscreen for a split second before the
app can call gdk_window_withdraw(), and wmaker applies SharedAppIcon to
it which winds up screwing up the "Kill" menu option.

That said, I've attached a patch to have wmaker treat any window with
class DockApp as if it had initial_state = WithdrawnState, and hopefully
openbox, fluxbox, and the like will pick up the idea too so gtk+
hacks[1] will no longer be needed. If this patch is accpeted, I'll poke
fluxbox and openbox to suggest the idea to them.

[1] E.g. http://wmudmount.svn.sourceforge.net/viewvc/wmudmount/dock.c?r1=8&r2=7

Subject: [PATCH] Improve dockapp recognition

Dockapps are traditionally recognized by having initial_state =
WithdrawnState in WM_HINTS. But some toolkits (e.g. gtk+) will not allow
setting initial_state in this way. So we offer an alternative: any
window with the res_class portion of WM_CLASS set as "DockApp" will be
treated as if it had initial_state = WithdrawnState.
2010-09-15 20:36:46 +02:00
Carlos R. Mafra
2ba8d2eec9 WPrefs: Add ShowClipTitle config option
To "document" the new configuration option, let's make
it possible to configure it in the "Expert Panel" of
WPrefs.
2010-09-12 22:59:55 +02:00
Alexey I. Froloff
790917a8e7 Option to disable clip title
Completely disable clip caption.

Original-patch-by: Alexey Voinov <voins@altlinux.ru>
Signed-off-by: Alexey I. Froloff <raorn@altlinux.org>
2010-09-12 15:21:05 +02:00
Carlos R. Mafra
8d4819c7ea wconfig: Define BOUNCE_APP and NEWAPPICON 2010-09-11 17:58:18 +02:00
Alexey I. Froloff
392ab2607d Highlite current window's appicon
This patch highlites appicon of a currently focused window.

Original-patch-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Alexey I. Froloff <raorn@altlinux.org>
2010-09-11 17:56:40 +02:00
Alexey I. Froloff
a257e16593 Bouncing appicon effect
When starting application (or opening transient dialog) bounce
its appicon.

Original-patch-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Alexey I. Froloff <raorn@altlinux.org>
2010-09-11 17:53:32 +02:00
Alexey I. Froloff
17cc7c3c77 New titlebar button style
This patch adds new titlebar button style.

Original-patch-by: Carlos Torres <vlaadbrain@operamail.com>
Signed-off-by: Alexey I. Froloff <raorn@altlinux.org>
2010-09-11 17:32:57 +02:00
Alexey I. Froloff
cc629f342c Open window menu on right-click in window list menu
When doing right-click in a window list menu open window menu.
Can be useful for sending here window from another workspace.

Original-patch-by: Pavel S. Khmelinsky <hmepas@yauza.ru>
Signed-off-by: Alexey I. Froloff <raorn@altlinux.org>
2010-09-11 17:32:57 +02:00
Carlos R. Mafra
afebdb50fa WPrefs: Add MinimizeAllKey shortcut configuration 2010-09-11 17:32:57 +02:00
Alexey I. Froloff
f41db5b5be Add key binding to minimize all windows
MinimizeAllKey - minimize all windows on current workspace.

Original-patch-by: Pavel S. Khmelinsky <hmepas@yauza.ru>
Signed-off-by: Alexey I. Froloff <raorn@altlinux.org>

[crmafra: AllMinimizeKey --> MinimizeAllKey]
2010-09-11 15:46:24 +02:00
Alexey I. Froloff
ca1c29cd98 Menu translation support
When generating menus, lookup translations for menu entries in
specified textdomain.  Often used by linux distributions.

Original-patch-by: Alexey Voinov <voins@altlinux.ru>
Signed-off-by: Alexey I. Froloff <raorn@altlinux.org>
2010-09-11 15:28:01 +02:00
Alexey I. Froloff
e9d42e5121 Luxi Sans doesn't have cyrillic
Replace "Luxi Sans" with "sans serif".

Original-patch-by: Alexey Voinov <voins@altlinux.ru>
Signed-off-by: Alexey I. Froloff <raorn@altlinux.org>
2010-09-11 15:18:07 +02:00
Alexey I. Froloff
aeb4cb8a79 Raise shaded window frame when unhiding
When unhiding window by clicking its appicon, unconditionaly
raise its frame.

Original-patch-by: Artem Delendik <u2u@nm.ru>
Signed-off-by: Alexey I. Froloff <raorn@altlinux.org>
2010-09-11 15:15:43 +02:00
Andreas Metzler
bfd1abd32b Move debugging symbols to new wmaker-dbg package
Debian packaging change. Strip binaries (as required by policy) and
provide detached debugging symbols in newly added wmaker-dbg package.
2010-09-05 02:27:52 +02:00
Andreas Metzler
7e5b8e412f Add version script versioning for libwraster
Enable symbol-versioning for libwraster and stop exporting public
symbols.
2010-08-29 18:38:21 +02:00
Andreas Metzler
44edeea804 Import ld-version-script.m4 from gnulib
ld-version-script.m4 provides a test to check whether binutils support
symbol versioning.
2010-08-29 18:38:21 +02:00
Andreas Metzler
d872b73881 Set library version in configure.ac
Keep libtool's -version-info arguments for the three libraries
(libwraster, libWINGs and libWUtil) centralized in configure.ac
instead of in the specific Makefile.am.
2010-08-29 18:38:21 +02:00
Andreas Metzler
27dcdd3798 Pass tarname argument to AC_INIT
If AC_INIT is invoked without tarname argument PACKAGE_TARNAME and
PACKAGE will be sanitized (lowercased, and all characters other than
alphanumerics and underscores are changed to ‘-’.)

For windowmaker this has the sideeffect of changing install directories,
util/wmaker.inst installs stuff to #pkgdatadir# which suddenly is
/usr/share/windowmaker instead of /usr/share/WindowMaker.

Supplement AC_INIT invokation with tarname (and while we are at it url)
argument to fix this.
2010-08-29 14:55:14 +02:00
Andreas Metzler
ce04eabec6 Build Debian packages with RandR support
Add libxrandr-dev to build-depends.
2010-08-29 14:55:14 +02:00
Carlos R. Mafra
368e7e3e8f WINGs: Remove private snprintf() implementation
The code was added in 2001 in commit acdc0e3d6b for
"backwards compat". This motivation no longer exists in 2010,
so there is no reason to keep a private implementation of
a standard function from the C library.
2010-08-29 14:55:14 +02:00
Carlos R. Mafra
5c8eb580b3 configure: Remove --disable-verbose-compile hack
Instead of using the --disable-verbose-compile hack, let's
use the standard option --enable-silent-rules (or 'make V=0' directly)
available with autoconf 1.11 and higher.

This is enabled in autoconf by using 'silent-rules' in AM_INIT_AUTOMAKE.
The verbosity of compilation is reduced in a similar manner as using
the --disable-verbose-compile option, so we can remove all that ugly
hackery.
2010-08-29 14:55:14 +02:00
Carlos R. Mafra
48044feb29 configure: Remove gcc warning about signed x unsigned 2010-08-29 14:55:14 +02:00
Carlos R. Mafra
2031a25869 configure: Replace obsolete macros 2010-08-29 14:55:14 +02:00
Carlos R. Mafra
be05b0f01e configure: Use AS_HELP_STRING macro to print messages
According to the autoconf manual, using AS_HELP_STRING is recommended
to avoid having to manually adjust the alignment of help text
in ./configure --help
2010-08-29 14:55:14 +02:00
Carlos R. Mafra
b17077ede0 Avoid more gcc warnings
WUtil.h:212: warning: function declaration isn’t a prototype
WUtil.h:259: warning: function declaration isn’t a prototype
WUtil.h:300: warning: function declaration isn’t a prototype
WINGsP.h:593: warning: function declaration isn’t a prototype
WINGsP.h:599: warning: function declaration isn’t a prototype
WINGs.h:616: warning: function declaration isn’t a prototype

raster.c:295: warning: no previous prototype for ‘calculateCombineArea’
2010-08-29 14:55:14 +02:00
Carlos R. Mafra
be065e3bf4 Add /usr/local/share/WindowMaker dir to wmgenmenu 2010-08-29 14:55:14 +02:00
Andreas Metzler
894bf4e292 Fix build failure on missing randr
When building without xrandr support do not try to modify undefined
variable has_randr.
2010-08-29 14:55:13 +02:00
Carlos R. Mafra
c201e1612c Make wmaker XRandR aware
This patch makes wmaker automatically Restart() to take into account
resolution changes done by xrandr.

The motivation to write this patch is that when I start my laptop connected
to an external monitor (VGA1), the resolution in the monitor is initially
wrong (perhaps this is a bug in XOrg or OpenSuse, but anyway), so I always
do this after starting wmaker:

xrandr --output VGA1 --preferred

The resolution in the external monitor gets fixed, but wmaker does not
recognize the change automatically and I have to manually restart it.

So this patch avoids the last step by making wmaker be XRandR-aware.
Wmaker now restarts automatically when it receives a RRChangeScreenNotify
event and I don't have to do the last part of the silly procedure described
above.

I am not sure if restarting wmaker is the most elegant solution, but
it at least solves part of my issue with wmaker + xrandr.
2010-08-22 22:13:45 +02:00
Andreas Metzler
f6b7178542 Correct .TH header
The space in "Window Maker" needs to be escaped in the .TH header,
otherwise parsing fails. (The section would be set to MAKER instead of
1x.)
2010-08-21 12:21:56 +02:00
NIR Ginko
ce32e2b5e0 Add Russian manpages
[includes build fixes by Andreas Metzler]
2010-08-21 12:21:56 +02:00
Martin Dietze
6269d3a66f Made Debian autobuild work again 2010-08-19 16:59:56 +02:00
Andreas Metzler
3289b6c772 SelectWindowsMouseButton -> MouseLeftButtonAction
Implement the switch from SelectWindowsMouseButton et al. to
MouseLeftButtonAction = SelectWindows from WindowMaker 0.65 in Debian's
customized defaults. Closes: #116963
2010-08-18 15:26:17 +02:00
Andreas Metzler
0baac21e95 Add some bug closers
List debian bugs fixed in wmaker-crm in debian/changelog.
2010-08-18 15:26:17 +02:00
Andreas Metzler
5423e8318e Use automake instead of automake1.4.
Use latest automake (instead of automake1.4) for building.
Closes: #549157
2010-08-18 15:24:58 +02:00
Andreas Metzler
c68597b6e8 update debian/changelog. 2010-08-17 10:27:59 +02:00
Andreas Metzler
a78cff4e7f Typo fixes 2010-08-17 10:27:59 +02:00
Andreas Metzler
3b289c4a8c Escape minus sign ("-") in manpages.
man will render - as a hyphen (U+2010) instead of as a minus sign
(U+002D). Fix this by escaping the dash, using \-.
2010-08-17 10:27:59 +02:00
Andreas Metzler
eae99ee833 invoke dh_installdeb after dh_makeshlibs
lintian says

W: wmaker source: debian-rules-calls-debhelper-in-odd-order
dh_makeshlibs

and indeed invoking dh_installdeb (which install the maintainerscripts)
before dh_makeshlibs can add the ldconfig call to them causes these
errors:
E: libwutil1: postinst-must-call-ldconfig usr/lib/libWUtil.so.1.0.2
E: libwings2: postinst-must-call-ldconfig usr/lib/libWINGs.so.2.0.1
2010-08-17 10:27:58 +02:00
Andreas Metzler
baef1646ac Ship libWUtils and libWINGs in dedicated packages
Shared libraries need to be shipped in separate packages with shlibs
information. Add libwutil1 and libwings2 packages and let libwings-dev
depend on them.
2010-08-17 10:27:58 +02:00
Andreas Metzler
df8649cf54 Drop dead code from debian rules 2010-08-17 10:26:53 +02:00
Andreas Metzler
492206fe6c Remove unneeded directory creation
There is no need to generate $mandir manually, dh_installman will do
this if necessary.
2010-08-17 10:26:53 +02:00
Andreas Metzler
8dc7c5f554 Generate symlink with dh_link instead of ln -s 2010-08-17 10:26:53 +02:00
Andreas Metzler
15f74cfb10 Invoke dh_link only once.
Instead of calling dh_link multiple times (once for each symlink) just
call it once, listing the requested links in debian/package.links.
2010-08-17 10:26:53 +02:00
Andreas Metzler
3751b587eb Invoke dh_installman only once.
Instead of calling dh_installman multiple times just call it once. List
the manpages that should be installed in package specific
debian/package.manpages.
2010-08-17 10:26:53 +02:00
Andreas Metzler
a1867f2473 Use dh_lintian.
Simplify debian/rules by making use of dh_lintian.
2010-08-17 10:26:53 +02:00
Andreas Metzler
014ced4794 Drop code for generating debian/conffiles
Starting with debhelper v3 mode every file in etc is flagged as a
conffile by dh_installdeb. - Drop (commented) code for doing this
manually from debian/rules.
2010-08-17 10:26:53 +02:00
Andreas Metzler
d7fd103528 stop removing debian/files manually
There is no need to delete debian/files, dh_clean automatically takes
care of this.
2010-08-17 10:26:53 +02:00
Andreas Metzler
493a263a7d Use static debian/libwraster*.files.
debian/*files (or debian/*.install) is usually not generate
dynamically. Implement this for debian/libwraster3-dev.files and
debian/libwraster3.files.
2010-08-17 10:26:53 +02:00
Andreas Metzler
7f59c4dfa3 Use static debian/libwings-dev.files.
debian/*files (or debian/*.install) is usually not generated
dynamically. Implement this for libwings-dev.files.
2010-08-17 10:26:53 +02:00
Andreas Metzler
ac8da4a8f0 remove dead outdated code from debian/rules
-isp is default behaviour of dpkg-gencontrol since 1.13.16 (18 Feb
2006)

The code for generating debian/shlibs.local is not used, remove it.

dpkg-shlibdeps already searches in debian/libwraster3/usr/lib/ by
default.
2010-08-17 10:26:53 +02:00
Andreas Metzler
1150f741ec do not run complete debian build under fakeroot
Use dpkg-buildpackage -rfakeroot option to only run the parts of the
package generation process which require (fake)root privileges under
fakeroot. (e.g. debian/rules build should not be run as root.)
2010-08-17 10:26:53 +02:00
Andreas Metzler
fef3ee5742 patch management with dpkg-source v3
Simplify debian/rules by using dpkg-source v3 (quilt) instead of the
home-grown patch system in debian/rules.

Change debian/nightly_build.sh to build a non-native package.
2010-08-17 10:26:53 +02:00
Andreas Metzler
dcbfb467de remove cruft from debian/rules 2010-08-17 10:26:53 +02:00
Andreas Metzler
c8c613074e Remove ./libtool on clean
... otherwise it is not possible to build twice from the
same unpacked sourcetree.
2010-08-07 14:53:12 +02:00
Andreas Metzler
c20bfe9737 Use ${binary:Version} instead of ${Source-Version}
Use ${binary:Version} instead of deprecated ${Source-Version}
(Lintian: substvar-source-version-is-deprecated).
2010-08-07 14:53:11 +02:00
Andreas Metzler
7b74111259 Use dh_prep instead of "dh_clean -k"
Use dh_prep instead of "dh_clean -k" (dh-clean-k-is-deprecated). However
do not replace instances of dh_clean without -k option. (Debian
bug590244). Build-Depend on debhelper 7.
2010-08-07 14:53:11 +02:00
Andreas Metzler
de48a9b1f5 Invoke ./configure with correct --build argument.
Invoke ./configure with correct --build argument, as per
/usr/share/doc/autotools-dev/README.Debian.gz.
2010-08-07 14:52:49 +02:00
Andreas Metzler
dadb78b835 Move homepage from description text to homepage field. 2010-08-07 14:50:58 +02:00
Andreas Metzler
ef2349bc69 Add ${misc:Depends} to all package dependencies. 2010-08-07 14:50:58 +02:00
Andreas Metzler
930a3922d5 Add libxmu-dev to build-depends. 2010-08-07 14:50:58 +02:00
Andreas Metzler
6300d3462b line wrap build-depends for enhanced readability.
line-wrapping has been allowed in debian/control since 3.7.0.0, released
April 2006.
2010-08-07 14:50:58 +02:00
Andreas Metzler
9215d2d9dd Fix duplicate entry in manpage.
/usr/share/WindowMaker/Pixmaps/ is listed twice, delete second line.
[Pulled from WindowMaker Debian packaging.]
2010-08-01 18:13:09 +02:00
Andreas Metzler
879d84d883 floppy mountpoint is /media/floppy
Correct floppy mountpoint location to match FHS.

Quoting FHS <http://www.pathname.com/fhs/pub/fhs-2.3.html>:
/media : Mount point for removeable media
Purpose

This directory contains subdirectories which are used as mount points for removeable media such as floppy disks, cdroms and zip disks.
[...]
The following directories, or symbolic links to directories, must be in /media, if the corresponding subsystem is installed:

Directory	Description
floppy	Floppy drive (optional)
[...]
2010-08-01 18:13:09 +02:00
Andreas Metzler
c238d8417f link libWINGs against libm if necessary
libWINGs is using mathematical functions (atan, sqrt, etc.). Check
whether we need to lik against libm to use these and link libWINGs
against it if necessary.
2010-08-01 18:13:09 +02:00
Andreas Metzler
3f27b998a7 link libWINGs against libfontconfig
libWINGs is using libfontconfig function (not just via libXft, e.g.
FcPatternDel). Search for library in ./configure and link libWINGs
against it.
2010-08-01 18:13:09 +02:00
Andreas Metzler
abb8c62fe0 link libWINGs against libXft
libWINGs is using libXft functions (e.g. XftFontClose). Link libWINGs
against libXft.

ametzler@argenau:/tmp/WMAKER/wmaker-crm$ LD_LIBRARY_PATH=debian/wmaker/usr/lib ldd -r debian/wmaker/usr/lib/libWINGs.so.2.0.1 2>&1 | grep XftFontClose
undefined symbol: XftFontClose (debian/wmaker/usr/lib/libWINGs.so.2.0.1)
2010-08-01 18:13:09 +02:00
Andreas Metzler
c396e8ca4f link libWINGs against libwraster
libWINGs is using libwraster functions (e.g. RScaleImage) and therefore
needs to be linked against it.

ametzler@argenau:/tmp/WMAKER/wmaker-crm$ env LD_LIBRARY_PATH=debian/wmaker/usr/lib ldd -r debian/wmaker/usr/lib/libWINGs.so.2.0.1 2>&1 | grep RScaleIma
undefined symbol: RScaleImage   (debian/wmaker/usr/lib/libWINGs.so.2.0.1)
2010-08-01 18:13:09 +02:00
Andreas Metzler
ffb803a0ba link libWINGs against libWUtil
libWINGs is using libWUtil functions (e.g. WMAddIdleHandler). Reorder
lib_LTLIBRARIES to build libWUtil before libWINGs. Link libWINGs against
libWUtil.
2010-08-01 18:13:09 +02:00
Tamas TEVESZ
e75b1b6d70 wrlib: Use snprintf() instead of sprintf() 2010-05-11 09:18:12 +02:00
Brad Jorsch
68bd644b0d Fix wheel resizing with resize increments
In C, dividing two integers automatically rounds towards zero, so ceil(a
/ b) is useless as the result is truncated before ceil ever sees it. The
correct result for positive integers is obtained by (a + b - 1) / b.
2010-04-26 23:23:56 +02:00
Brad Jorsch
4ddc2a5a0a Don't grab Ctrl+Wheel if ResizeIncrement is 0
I personally cannot stand stealing Ctrl+Wheel for resizing windows, so I
turned it off. But wmaker is still preventing Ctrl+Wheel from reaching
apps, which is certainly not the behavior I desire.
2010-04-26 23:23:56 +02:00
Brad Jorsch
12d16d92e7 Fix mouse button grab swallowing
We grab Mod+Button events for our own purposes, and swallow them using
XAllowEvents(AsyncPointer) to prevent the client window from seeing
them. But if events are coming in fast enough (e.g. via fast wheel
scrolling) so that multiple grabbed events are in the queue, the second
queued event would be allowed to leak through to the client by the
unconditional XAllowEvents(ReplayPointer) a few lines later.
2010-04-26 23:23:56 +02:00
Carlos R. Mafra
b575955263 Remove NEWSTUFF #ifdef's
...as they are never defined and there is no code associated to it.
2010-04-16 12:47:29 +02:00
Carlos R. Mafra
f7dc986ed1 Add include guards 2010-04-14 18:42:11 +02:00
Carlos R. Mafra
0350b8445a Remove unneeded extern's in .c files
They were not being used in those files, so let's remove them.
2010-04-14 18:39:28 +02:00
Carlos R. Mafra
4041278f48 Address some sparse warnings
Plain integer as NULL pointer, non-ANSI function declaration etc.
2010-04-14 18:39:17 +02:00
Tamas TEVESZ
62f4eff7ae Add missing initializers 2010-04-12 11:56:00 +02:00
Tamas TEVESZ
4247ac9f82 Add i18n labels to wmgenmenu 2010-04-12 09:58:37 +02:00
Carlos R. Mafra
6002ce0cbc Add more pretty names for wmgenmenu apps 2010-04-12 09:58:37 +02:00
Tamas TEVESZ
22978af5a6 Add nice labels to wmgenmenu 2010-04-12 09:58:37 +02:00
Brad Jorsch
37829a7c60 Fix loading saved states on 64-bit systems
One misuse of CARD32 was missed back when someone fixed the 64-bit
issues (background: X has 8-bit, 16-bit, and "32-bit stored in a long"
data formats; on a 64-bit system, long is 64 bits). This was causing
minimized windows to be restored as shaded, and possibly occasional
crashes, when wmaker was restarted.

Also, throw in a safety check that 10 items really were returned before
trying to access them.
2010-04-12 09:58:37 +02:00
Carlos R. Mafra
518b3b4480 Fix 'make install' from silent compilation 2010-04-12 09:58:37 +02:00
Brad Jorsch
554f9dea25 Remove apparently-unused files
WPrefs.app/Font.c - unused since 2004
wrlib/configure.in - not used and not really edited since 1998, so it's
    probably very out of date
2010-04-12 09:58:37 +02:00
Brad Jorsch
7a38ea85b9 Ignore build files
Ignore various files created by autotools, so they don't clutter the
"git status" output.
2010-04-12 09:58:37 +02:00
Brad Jorsch
bbe55ba242 Fix "make dist"
The "make dist" command can be used to generate the release tarball, but
only if the Makefile.am correctly specifies EXTRA_DIST, specifies
headers in foo_SOURCES, and so on.
2010-04-12 09:58:37 +02:00
Brad Jorsch
39426bde35 Rename INSTALL.pt
All the other INSTALL files were renamed INSTALL-WMAKER, but this one
was forgotten.
2010-04-12 09:58:36 +02:00
Tamas TEVESZ
c960ae622e Kill contribs
- Patches don't apply
- RPM spec refers to stuff long dead, distros probably have better
  ones anyway
2010-04-12 09:58:36 +02:00
Tamas TEVESZ
607beee479 Fix CRLF files 2010-04-12 09:58:36 +02:00
Tamas TEVESZ
abda319c16 Fix Debian builds 2010-04-12 09:58:36 +02:00
Brad Jorsch
65aa3ae9c8 Fix enable-modelock warnings
Fix warnings that only show up when --enable-modelock is passed to
./configure.
2010-04-12 09:58:36 +02:00
Tamas TEVESZ
ec7506e5e5 Plug leak 2010-04-12 09:58:36 +02:00
Brad Jorsch
12de2f319e Fix uninitialized vars
Initialized variables that are conditionally set. In particular, this
construct is dangerous:
  void *p;
  if (something) p = couldReturnNull();
  if (!p) p = fallbackFunction();
2010-04-12 09:58:36 +02:00
Brad Jorsch
bbf3635590 XShapeEvent strict aliasing violation
C99 defines new strict aliasing rules to allow compilers to make certain
optimizations. These rules prohibit converting an XEvent to an event
struct (e.g. XShapeEvent) that is not already in the XEvent union using
pointer type punning (e.g. "(XShapeEvent *)&ev"), and vice versa. The
canonical fix seems to be to create a union between XEvent and the
extension event struct to make the aliasing explicit, so do that.
2010-04-12 09:58:36 +02:00
Tamas TEVESZ
3be81b0243 Fix PO files breaking build 2010-04-12 09:58:36 +02:00
Brad Jorsch
35bcfa6a02 Fix internationalized format string warnings
A few internationalized format strings have only one %s in the default
while two strings are being passed. Change those defaults to have two
%s's, which means we also have to update the .po files to match. May as
well throw in the extra %s in the translated version while we're at it.
2010-04-09 15:16:31 +02:00
Brad Jorsch
6082f2d243 Fix trivial warnings
* Format string integer size warnings
 * Missing or non-value returns in non-void functions
 * A missing #include in WPrefs.app/MouseSettings.c
2010-04-09 15:16:31 +02:00
Tamas TEVESZ
6b5cfc887a Fix out-of-tree builds
- The throwing out of autogen.sh in favor of autoreconf comes from
  http://www.gnu.org/software/automake/manual/autoconf/autoreconf-Invocation.html#autoreconf-Invocation
- 'think that instead of the exit, some better way should be put in
  to control whether or not to automatically run configure. Or maybe
  just don't even run it.
2010-04-09 15:16:31 +02:00
Carlos R. Mafra
e4fedca2bb Remove install-sh, missing and mkinstalldirs from the repo
..as they get overwritten by the configure stuff.
2010-04-09 15:12:02 +02:00
Carlos R. Mafra
c183d9107e Rename wmaker INSTALL file
..so that it does not get overwritten by the configure stuff.
2010-04-09 15:07:40 +02:00
Carlos R. Mafra
fb91e5d67a Do not skip windows in the switchpanel
If a window has the skip_window_list flag set wmaker currently not only skips
this window from the window list (F11) but also from the switchpanel (TAB).

This patch makes skip_window_list-windows appear in the switchpanel and be
skipped only in the window list, strictly honoring what the name of the flag
is supposed to mean.

The motivation for this is that I have lots of workspaces and almost all of
them has a xterm, so that I set the skip_window_list for the xterms not to
overcrowd the window list. But I still want to alt+TAB to xterms on the current
workspace.

In addition to that, now the "internal window" flag is not checked before
appearing in the switchpanel.
2010-04-08 18:38:37 +02:00
Carlos R. Mafra
08f990a946 Use int instead of size_t to silence warning
gcc-4.4.1 was complaining:

fontconv.c: In function ‘mapWeightToName’:
fontconv.c:114: warning: field precision should have type ‘int’, but argument 4 has type ‘size_t’
fontconv.c:114: warning: field precision should have type ‘int’, but argument 4 has type ‘size_t’
fontconv.c: In function ‘xlfdToFc’:
fontconv.c:157: warning: field precision should have type ‘int’, but argument 4 has type ‘size_t’
fontconv.c:157: warning: field precision should have type ‘int’, but argument 4 has type ‘size_t’
2010-04-08 17:11:41 +02:00
Tamas TEVESZ
241e66ff0a Tidy
- Kill unused vars in wrlib
- Add missing initializers to defaults.c:staticOptionList
- Re-format it slightly
- Kill some dead code
- Kill stupid "if (const op var)"
2010-04-08 15:53:50 +02:00
Brad Jorsch
79e1bb53d3 Menu positioning bug
I noticed a bug today in menu workspace positioning (in the next tree):
if I right-click and hold the button down at the left edge of the
screen, the menu appears (correctly) half off the edge but will *not*
slide back onto the screen. Compare the behavior to right-clicking at
the right edge of the screen: the menu appears half off the edge, but
sliding the mouse to the edge causes the menu to slide until it is fully
visible.

Also, opening a submenu in this state positions the submenu as if the
menu were fully on the screen, leaving a gap between the menu and the
submenu.

If the menu happens to also go off the bottom of the screen, moving the
mouse to the bottom edge causes the issue to be magically fixed as soon
as the sliding upwards begins.

I also note inconsistent behavior when simply right-clicking (without
holding) to bring up the menu: at the right or bottom edge the menu
appears in the correct partially off the edge position, but at the left
edge it immediately jumps to be fully on-screen, almost as if
WrapMenus = YES were set for the left edge only.

I bisected it to d316260395. As far as I
can tell the "fix" there was to position the menu at the correct
negative X position but then lie to wmaker so it thought the menu was at
X=0. Presumably the "WrapMenus" behavior was the intended result.

Since (AFAIK) the window menu is the only one with this problem, why
don't we just check if x is too negative in OpenWindowMenu()?
2010-04-08 15:53:50 +02:00
Tamas TEVESZ
c90484324c Fix spacing on WPrefs Misc panel
- w/o XKB_MODELOCK it looks like shit anyway, so let's at least
  make the w/ XKB_MODELOCK case readable.
2010-04-08 15:53:50 +02:00
Tamas TEVESZ
1b666f53e4 Make WPrefs' Expert panel scrollable 2010-04-08 15:53:50 +02:00
Tamas TEVESZ
b59575e709 Add new cycling option
When using Xinerama, make it possible only to cycle between those
windows that are on the currently active head - AFAICT this means
windows that have the majority of their area on the same head as
the pointer.

Patch complete with WPrefs integration, alas this being quite
unusable - for a lack of a better idea, I tucked the option on the
expert panel, making the item list too tall - making it scrollable
would be a nice addition.

The default for the new option (CycleActiveHeadOnly) should be NO,
that is, no change in default behaviour.
2010-04-08 15:53:50 +02:00
Carlos R. Mafra
3f8248f534 wmgenmenu: Change the app order in terminals list
Because the terminal detection stuff by Tamas was choosing 'mrxvt' for
me, but I want it to be 'xterm'.
2010-04-08 15:53:50 +02:00
Tamas TEVESZ
68a55be998 Poke wmgenmenu some more
- change some variable names to better reflect their purpose, do a little
  write-up how a menu is built
- auto-detect what terminal to use for apps in need of a terminal
- fix the chunk that adds the terminal-based apps
2010-04-08 15:53:50 +02:00
Carlos R. Mafra
68f70da310 Regenerate wmgenmenu German translation 2010-04-08 15:53:50 +02:00
Tamas TEVESZ
c165beeb4b Poke wmgenmenu, part 2
- Convert to using WINGs PropList functions
- Add mwm to other_wm, remove ee from Graphics while here
2010-04-02 10:15:58 +02:00
Tamas TEVESZ
daad5ed828 Poke wmgenmenu
- add help and usage, to bring it in line with other tools
- if no item in any particular group was found, don't write an
  empty group
2010-04-02 10:13:15 +02:00
Tamas TEVESZ
2e91634921 Kill leftovers 2010-04-02 08:41:31 +02:00
Tamas TEVESZ
81aaed2bf8 Tidy comms between external apps and wm a bit
- one instance of this left in setstyle, it will follow later
2010-04-02 08:41:11 +02:00
Tamas TEVESZ
e7a46d5cdf Attach utils versions to WM version 2010-04-02 08:38:39 +02:00
Tamas TEVESZ
7dc767ae78 Convert to getopt, continued
plus some assorted fixes:
 - sort headers, remove some unneeded ones
 - small bits of formatting and the like
2010-04-02 08:38:23 +02:00
Tamas TEVESZ
859338fd83 Spice up setstyle
- convert to getopt
- tidy xsendevent
- modify hackPathInTexture() so that:
  - it properly figures where the style file is
  - if it's under the user's home directory, that part of the path
    is changed to `~' - this makes your wm configuration usable on
    systems with a network home, used on systems where home is /home,
    or /u, or /export/home, or whatever.

XXX: there's a note WINGs/findfile.c:wexpandpath() stating that
`too many functions handle a return value of NULL incorrectly'. this is
so true. so if anyone is looking for a small project to sink their
teeth in...
2010-04-02 08:37:16 +02:00
Tamas TEVESZ
1bc042c172 Autoconf mods
- according to the automake manual, `acinclude.m4' is the old style
  of doing stuff, putting local macros in their own directory is the
  way to go, so move acincluce.m4 to m4/windowmaker.m4
- reflect this in autogen.sh and Makefile.am
- while there, add a `conditionally set cflags' macro from the
  autoconf macro archive
- use this to slightly pump warning levels up if we are on gcc
2010-04-01 11:40:08 +02:00
Tamas TEVESZ
6bf7994520 Style stuff up
- convert hand-rolled arg parsers to getopt_long
- sort headers, get rid of some duplicates in the process
- in fontconv, replace magic numbers with constants (there's
  little practical value to this here, but it's much nicer)
- slightly redo fontconv.c:strToInt()
2010-04-01 11:24:46 +02:00
Tamas TEVESZ
444de5e6b6 Make asm code readable 2010-04-01 11:24:25 +02:00
Tamas TEVESZ
4078af654b An XLFD has exactly 15 fields, not "at least" 15 fields. 2010-03-29 21:18:37 +02:00
Tamas TEVESZ
7b9b7de172 Fix png 1.4+ builds
- png_check_sig was removed from png 1.4, use replacement fun, which is
  already present in 1.2.0 (cca. 2001)
2010-03-29 21:18:37 +02:00
Carlos R. Mafra
0c2d2c69b9 Use 'long' instead of 'CARD32' in wClientSetState() and wWindowSaveState()
The rationale is the same as in commit c7f2a189c4
("Fix the call to XChangeProperty() in 64-bit mode"), because we are
calling XChangeProperty() with format 32, which requires the type of
'data' to be 'long'.
2010-03-29 00:17:02 +02:00
Carlos R. Mafra
13ba5d5f5b Remove uncompiled code from src/window.c 2010-03-29 00:17:02 +02:00
Carlos R. Mafra
828cb7a147 Remove GRADIENT_CLIP_ARROWS from wconfig.h.in
...as it appears nowhere else in the source code.
2010-03-28 14:34:11 +02:00
Tamas TEVESZ
71aa4f2884 Switch file ops to stdio
- Does away with the O_BINARY abomination
- as a byproduct, plugs an fd leak in wcolorpanel.c:fetchFile()
- sprinkle some fsync()s to files that have been written to (this
  needs to be done everywhere)

+ fix brown paper bag thinko in configure.ac
2010-03-27 10:31:13 +01:00
Tamas TEVESZ
ea4645bc09 Add Cygwin to GCFB() (it is just like linux)
+ make stub give some clue
2010-03-26 21:08:17 +01:00
Tamas TEVESZ
28cbda550a Remove dead code from wrlib 2010-03-26 21:08:17 +01:00
Tamas TEVESZ
7d905787d2 Remove old unused Red Hat-specific configure checks 2010-03-26 21:08:17 +01:00
Tamas TEVESZ
0e12a076aa Remove looking for libxpg4 on FreeBSD 2010-03-26 21:08:17 +01:00
Renato Botelho
0f5c36a67e Fix non-I18N build
* Remove directly include of <libintl.h> and include src/wconfig.h, that
already include libintl.h and declare _() function
* Replace some gettext() calls to _()

These changes fixes build with LINGUAS is unset, and removes I18N
support in this case.
2010-03-26 21:08:17 +01:00
Tamas TEVESZ
1f2b9999b9 Remove network support from WINGs
- nobody used it

Amend network stuff removal

still more wings network removals

[crmafra: squashed together three patches]
2010-03-26 21:08:17 +01:00
Tamas TEVESZ
55959b4f7e Half-assed fix to make autoconf bend
- this should make platform detection automagic
- also fixes debian builds that broke in the meantime
- fix osdep_darwin.c
2010-03-26 21:08:17 +01:00
Tamas TEVESZ
67a8a82670 Remove wmlib
was this ever used for anything? i checked a couple hundred dockapps,
no joy; there's nothing in debian (afaict) that build-depends on it,
so let's try doing away with it.
2010-03-26 21:08:17 +01:00
Tamas TEVESZ
83774951b7 Remove some dead weight from configure.ac and debian/rules 2010-03-26 21:08:17 +01:00
Tamas TEVESZ
298338c111 GetCommandForPid() for darwin/osx 2010-03-26 21:08:17 +01:00
Tamas TEVESZ
ab9c85a11d Add the BSD version of GetCommandForPid()
- tested on Net, Free, Open and DragonFly

- fix up the linux version (terminate argv with a null ptr)
- add error handling to file ops in the linux version
- add a stub version for platforms not supported
2010-03-26 21:08:17 +01:00
Tamas TEVESZ
294ea56d84 Introduce OS-dependent stuff
- move GetCommandForPid() into a separate file
- slightly rewrite it to be more readable along the way
2010-03-26 21:08:17 +01:00
Carlos R. Mafra
eee6551aff Remove python support from WINGs
As the README used to say, it was a unfinished work. If someone
wants to finish it after all these years it can be recovered
from the logs. But meanwhile let's not carry dead code around.
2010-03-26 21:08:17 +01:00
Tamas TEVESZ
1a0c8afa80 Remove texture plugins
- leave a note for the unlikely case of such configuration being found,
  the user is notified properly
2010-03-26 21:08:16 +01:00
Tamas TEVESZ
61a96e79c4 Trivial format string fixes 2010-03-26 21:08:16 +01:00
Martin Dietze
ef7c45df53 rebase in git pull for nightly build 2010-03-26 21:08:16 +01:00
Tamas TEVESZ
c7868fa405 Make inotify optional
This time keeping the ability to fall back to the old polling method.
2010-03-23 21:50:17 +01:00
Tamas TEVESZ
118a93808a Idle fixes
- add new wglobaldefaultspathfordomain() to wings (replaces several
  hand-rolled individual implementations in utils/)
- make all of 'em handle -h|--help, -v|--version
- try making them not to nothing silently
- change various ways of knowing thyselves to using __progname
- generally try to make them feel similar (NOT right, similar --
  right is a completely different matter)
2010-03-23 21:50:17 +01:00
Tamas TEVESZ
9dadfe7a68 Sensible defaults
In the wmaker-dev list, Iain noted that:

  "I can see the benefit of this.  I know of at least two
   applications[1] which don't bother to set a class and instance.  Early
   versions of my OS X cycling patch for Window Maker caused a crash when
   faced with such windows because I forgot to check that these
   properties existed.  Nowadays it just refuses to do the cycling.

   Also Window Maker won't let you save attributes on such windows from
   the Inspector.

   [1] Interestingly they are competiting commercial applications: No
   Machine and Exceed onDemand."

[crmafra: edit commit log]
2010-03-23 21:50:17 +01:00
Tamas TEVESZ
d51bbe6626 Collect low-hanging fruits 2010-03-23 21:50:17 +01:00
Tamas TEVESZ
5f02b1b5f4 Feet protector for getstyle
Since getstyle now saves the theme pack in $GUR instead of
the cwd, there's a slight possibility you can specify a theme
pack name that will do Bad Things to your existing stuff.

To that end, specified theme pack name is "sanitised" a bit, as in
forward slashes in it are replaced by an underscore.

Oh yes, i forgot to mention. getstyle now saves the theme pack
in $GNUSTEP_USER_ROOT, not in cwd.
2010-03-23 21:50:17 +01:00
Tamas TEVESZ
9f7aaa8aed Some rework on getstyle
- make it use wings functions, remove duplicated code from getstyle
- de-static necessary functions in wings
- add new wrmdirhier to wings
- rename WMMkDirHier to wmkdirhier (fits better)
- remove calling shell from getstyle (what were they thinking?)

i couldn't quite test getstyle (no idea about themes), but it still
basically works.

do back your ~/G dir up... wrmdirhier might eat it!

definitely needs testing, especially by people who have any idea
how themes work.

Some more getstyle

- missed a shell invocation
- maybe copyFile should be in wutils too...?

[crmafra: Folded second patch into the first]
2010-03-23 21:50:17 +01:00
Martin Dietze
66bd06b5d5 Nightly build script with more robust handling of debian patches. 2010-03-23 14:32:25 +01:00
Tamas TEVESZ
43b1914f37 Remove long-dead plugins. 2010-03-20 18:42:56 +01:00
Tamas TEVESZ
2a52ce3544 Remove unneeded files
WINGs/puzzle.c is an example, and is actually also in WINGs/Examples/

wmsetup was actually equivalent to a slightly braindead true(1)
2010-03-20 18:42:56 +01:00
Carlos R. Mafra
2ad40e0734 Maximus: Cleanup the code
By defining a struct containing the coordinates of the
windows (top, bottom, left, right, width, height) and
using a helper function to set up these coordinates, the
whole function becomes much cleaner and easier to read.
2010-03-20 18:42:56 +01:00
Carlos R. Mafra
5178465bb6 Remove DEBUG statements, #if 0 etc
...and some other cleanups.
2010-03-20 18:42:56 +01:00
Tamas TEVESZ
cef4fbb422 Remove unreferenced files 2010-03-17 16:48:24 +01:00
Tamas TEVESZ
9911ecd985 make wtrimspace() use internal api
make wtrimspace() use wings' own function for a task

semantics change: it used to segfault given null, now it returns null.
this doesn't affect any current use (there's exactly one..), and i see
no harm in this behaviour, and perceive this to be more natural.
2010-03-17 16:39:53 +01:00
Tamas TEVESZ
109e504262 Fold many functions into one
The result is not much more convoluted than the original was, but much shorter.
Several vararg macros were added -- no idea what !gcc compilers make of this.

The messages sent to these functions are inconsistent across the source tree.
I have now decided that the logging function will add the final newline -
messages will need to be modified accordingly.

I have no idea why the original implementation was as complicated and ugly as
it was. My guess is that it was anticipated that these are be called from
sighandlers, but why no snprintf when they are all stuffed up with vsnprintf...

Still, the result is not worse in this regard either.
2010-03-17 13:34:24 +01:00
Tamas TEVESZ
63e4338284 Remove unused WINGs/international.c 2010-03-17 13:34:24 +01:00
Carlos R. Mafra
8018da8149 Constify WMMatchDataProc and fix fallout
It addresses this warning

dialog.c: In function ‘LoadHistory’:
dialog.c:209: warning: passing argument 2 of ‘WMFindInArray’ from incompatible pointer type
../WINGs/WINGs/WUtil.h:455: note: expected ‘int (*)(void *, void *)’ but argument is of type ‘int (*)(const void *, const void *)’

but induces others in other places. One of them was this one

window.c: In function ‘wManageWindow’:
window.c:782: warning: passing argument 2 of ‘WMFindInArray’ from incompatible pointer type
../WINGs/WINGs/WUtil.h:455: note: expected ‘int (*)(const void *, const void *)’ but argument is of type ‘int (*)(void *, void *)’

which is fixed by constifying the arguments of matchIdentifier(). The other warnings are
fixed similarly.
2010-03-17 13:34:24 +01:00
Carlos R. Mafra
034339320f Constify the argument of wstrdup() 2010-03-17 11:12:54 +01:00
Tamas TEVESZ
de881d9c03 Kill redundant function 2010-03-17 11:12:53 +01:00
Carlos R. Mafra
e1d5ce7a51 Cleanup includes of wcore.h, defaults.h and pixmap.h
Several files were including others for no reason, and this slows
down the build time (but probably not measurable on a fast machine).
2010-03-17 11:12:53 +01:00
Carlos R. Mafra
b4b25fdf6a Remove redundant 'if defined' check
WindowMaker.h already #includes wconfig.h, which checks exactly
the same thing. So remove it from WindowMaker.h.

However, it would be better if WindowMaker.h didn't include
wconfig.h at all. The only reason I see for the inclusion is
the check for KEEP_XKB_LOCK_STATUS, defined in wconfig.h.
But that can be probably cleaned up too (I guess modern X's
enable XKB stuff that by default, by I haven't checked)

But anyway.
2010-03-17 11:12:53 +01:00
Tamas TEVESZ
badecc244b simplify WMWritePropListToFile()
remove the choice of atomic/non-atomic writes. firstly, the only users
of non-atomic writes were getstyle and geticonset; secondly, who in their
right minds would ever want non-atomic writes; thirdly, the file system
will screw you anyway *G*.
2010-03-17 11:12:53 +01:00
Tamas TEVESZ
833128385f Add a new helper function, WMMkDirHier()
...which creates directory hierarchies under $GNUSTEP_USER_ROOT

- make WMWritePropListToFile() use this

readily solves the "run dialog history vs nonexistent state dir" case.

if other consumers are found for this, just de-static and move the
prototype to WUtil.h or some other appropriate place.
2010-03-17 11:12:53 +01:00
Carlos R. Mafra
9a2dbc5a5f Fix typos, remove commented out code etc 2010-03-15 19:55:52 +01:00
Carlos R. Mafra
939f46b870 Maximus: Simplify the +/- border width madness
Taking the border width into account was making it hard to follow the
algorithm, and complicating things usually lead to mistakes.

In fact, in trying to account for this +/- 1 pixel issue the maximus
geometry for the requested window would sometimes overlap another window
by one or two pixels (depending if it was on the right or left). Therefore,
applying the maximus geometry to this other window in sequence would
maximize it completely instead of finding the correct tiled geometry.

So that always bugged me. Now I got tired of it and decided to kill the
whole consideration of the border width, and simply put some "+ 1"
inconditionally to be on the safe side.

Now it can happen that the windows will stay away one or two pixels,
but trying to be 'good enough' is better than trying to be 'perfect'
and getting it wrong for corner cases.

And the matter is worse because the size of xterms are 'quantized', so
changing the position of the other windows by a few pixels result sometimes
in a overlap of +1 pixel, or a distance of 1 or 2 pixels. Furthermore,
the bottom of xcalc behaves differently from the bottom of a xterm or
xjed (for xcalc the ad hoc correction for bottom_0 must be -8 in total).

But now my tests show that things are OK, and I can use maximus
for all the windows in the screen and no overlap will occur (except
if one of the windows is a xcalc, I don't know why).
2010-03-15 19:49:32 +01:00
Carlos R. Mafra
ee569220df Remove NEWAPPICON #ifdefs
It wasn't defined anywhere and when I defined it, the compilation
did not finish:

appicon.c: In function drawCorner:
appicon.c:206: error: WScreen has no member named focused_texture
appicon.c:208: error: WScreen has no member named unfocused_texture
appicon.c: At top level:
appicon.c:214: error: conflicting types for drawCorner
appicon.c:193: note: previous definition of drawCorner was here
make[2]: *** [appicon.o] Fehler 1
make[1]: *** [all] Fehler 2
make: *** [all-recursive] Fehler 1

So let's simply remove those #ifdefs.
2010-03-15 17:50:17 +01:00
Tamas TEVESZ
baac5ead1e wmgenmenu: Add 'mc' to file managers list
i'd say it's rather unfair to leave grandpa out ;))
2010-03-15 16:56:06 +01:00
Tamas TEVESZ
8d0020cf9a Unused wsmap, begone!
- held only reference to wnew0, which was the only consumer
of wmalloc0, safe trip both of them.
2010-03-15 16:56:06 +01:00
Carlos R. Mafra
4688e1b568 Add more info to the NEWS file etc
...and remove MIRRORS file, update INSTALL and README.
2010-03-15 16:55:19 +01:00
Johann Haarhoff
484b19ba89 Add info about Resize, Maximus and LR Maximize to NEWS
Added information about new functionality added to wmaker between
0.92 and 0.94-crm.
2010-03-14 22:24:46 +01:00
Johann Haarhoff
0db4d7885b Make CTRL+Wheel less intrusive
This patch only calls XGrabButton for CTRL+Button4 and CTRL+Button5.
This leaves CTRL+Button1-3 to the application.

This then removes the functionality of moving a window between
workspaces with CTRL+Button1 and CTRL+Button3
2010-03-14 22:19:08 +01:00
Johann Haarhoff
744ccb85d2 CTRL+Wheel Horizontal Resize + extras
This patch constrains MOD+Wheel to vertical resize, and adds
CTRL+Wheel horizontal resize. Two resize in both directions, you
have to use CTRL+MOD+Wheel.

To enable this functionality I have to grab all CTRL+Mousebutton
events in wmaker, which stops them from reaching the application.
This definitely hurts application functionality in some apps, for
example the "VT Fonts" (CTRL+Button3) menu in xterm is no longer
accessible. To stop this from happening use the "Do not bind mouse
clicks" window attribute for the apps in which you want to disable
this.

Because wmaker now controls all CTRL+Mousebutton events, I also
added CTRL+Button1 and CTRL+Button3 shortcuts that will move a
window back and forth through your workspaces without changing its
position or size.
2010-03-14 22:10:24 +01:00
Carlos R. Mafra
e37db24efe Remove reference to sound support from README.* 2010-03-12 10:44:24 +01:00
Carlos R. Mafra
3473a11787 Remove COPYING.OPL
The only (old) reference to it was from Marco's artwork in
WPrefs, but that was later changed to the GPL.
2010-03-12 10:35:03 +01:00
Carlos R. Mafra
6d6d53a350 Delete reference to non-gpl license in README.pt
The icons from Marco are licensed under the GPL (see
Changelog in commit f65c549814)
2010-03-12 10:34:54 +01:00
Carlos R. Mafra
51885365a6 Convert README.pt to UTF-8 2010-03-12 10:34:54 +01:00
Carlos R. Mafra
0049b5bc8c Remove references to non-gpl artwork license
The non-gpl warnings in WPrefs.app/tiff/README
and WPrefs.app/README were misleading, because
they were refering to Marco van Hylckama Vlieg's
work which was licensed with OpenContent License.

But as Alfredo Kojima wrote in the Changelog in
commit f65c549814 from 30.03.2010,
Marco's icons were licensed with the GPL.

Furthermore, in an email to wmaker-dev on 10.03.2010,
Marco confirmed:

  "Anyway, I have no problem with the artwork being
  licensed under GPL or whatsoever."
2010-03-12 10:33:01 +01:00
Carlos R. Mafra
2901a153ce Remove ancient 'DBase 3' data file
Pointed out by Tamas TEVESZ.
2010-03-09 22:50:52 +01:00
Johann Haarhoff
6b791d8a89 Add a trailing "/" to dirs in dialog autocomplete
The autocomplete feature in the "Run" dialog now adds a trailing "/"
when autocompleting directory names. This does three things:

1) shows you that you are completing a directory and not a filename,
2) saves one character of typing, and
3) makes it behave more consistent with shell (bash) autocompletion
2010-03-09 10:24:33 +01:00
Martin Frydl
1f3adb0ea5 Patch for WINGs buffer overflow
I've found a buffer overflow problem in RSmoothScaleImage. There are
some scaling calculations involving floats which are finally converted
to integers. Since such conversion does not round the number, just
truncates the decimal part, sometimes the number is smaller than it
should be. As a result, smaller buffer is allocated for picture
scaling and thus buffer overflow occurs.

Strange thing is that this bug has not appeared earlier so it probably
has something to do with newer gcc or glibc (I switch from
"prehistoric" Fedora Core 5 to Fedora 12).

<What about the symptoms?>

There were several ones, probably depending on application version and
compilation flags. First, it just stopped responding. Looking at the
process with strace I saw it locked in some FUTEX wait (unfortunately
I don't have the logs). Second, it just crashed. And last I got
complaint from glibc about double free or corrupted heap before
malloc. I've found the bug through wmweather+ dockapp, versions 2.9
and 2.11 (http://sourceforge.net/projects/wmweatherplus/), I've never
encountered it in WindowMaker itself.
2010-02-26 13:15:18 +01:00
Nicolas Bonifas
ad853b386e Removed unused version of RScaleImage() in wrlib/scale.c
... as the "broken_code" preprocessor symbol appears nowhere else.
2010-02-26 13:08:42 +01:00
Carlos R. Mafra
1861880239 wmgenmenu: A Window Maker menu generator
The inspiration comes from Geir T. Kristiansen's 'genmenu' shell script
(http://gtk.no/genmenu) which I have been hapilly using for
the last 9 years or so.

That script generates the Window Maker menu by asking a few questions
and checks whether the applications in a predefined list exist in
the user's $PATH, so that the menu contains only the applications
which are guaranteed to exist and which the user cares about.

However I always thought it was a bit slow to finish, even
when having a file containing the answers to the questions to
be piped in.

And as Kristiansen states in his webpage, his script does not
support internationalization:

   "If you want internationalization I really suggest you rewrite
    genmenu from scratch anyway in a more sensible language and remove
    other limitations while you are at it."

so I decided to rewrite in C and make it support internationalization
(only English and German so far). While I am not sure yet if I removed
"other limitations while you are at it" I definitely made it finish faster.
This C program does not make you questions though.

But in the same spirit as the author of 'genmenu', who says:

    "Genmenu is a hack, deal with it, it just happens to serve my needs."

I present you 'wmgenmenu', which you can use like this:

wmgenmenu > /home/mafra/GNUstep/Defaults/WMRootMenu

and the menu is automatically generated from the list of
predefined apps which are contained in the C sources (wmgenmenu.h).

And when you generate the WMRootMenu as above, wmaker will automatically
load the new menu for you (due to the 'inotify' mechanism in wmaker-crm).

As for 'wmgenmenu' being faster than 'genmenu':

[mafra@Pilar:~]$ time ./genmenu.sh < answers.txt &> /dev/null

real    0m3.626s
user    0m0.968s
sys     0m1.830s

[mafra@Pilar:~]$ time wmgenmenu &> /dev/null

real    0m0.020s
user    0m0.006s
sys     0m0.013s
2010-02-21 11:51:00 +01:00
Carlos R. Mafra
6367bf5234 Remove HEARTBEAT #ifdef's 2010-02-11 10:29:26 +01:00
Carlos R. Mafra
708cf2d2a2 Remove unused stuff from src/defaults.c 2010-02-11 10:29:14 +01:00
Carlos R. Mafra
6723aa55aa Remove old backward compatibility code
Once upon a time (< 2005) the CachedPixmaps directory was located
at ~/GNUstep/.AppInfo/ and that was later moved to
~/GNUstep/Library/WindowMaker. So Dan Pascu introduced this function
in 24519b6292 to make the convertion
automatically to users back then.

As it is highly unlikely that there is an old-timer wmaker user still
running a pre-2005 wmaker which suddenly decides to switch to wmaker-crm
and runs into trouble with his CachedPixmaps folder, let's simply remove it
to make defaults.o 1.8% smaller (596 bytes).
2010-02-11 10:29:14 +01:00
Martin Dietze
e54f763f14 Changed runtime dependency libjpeg62-dev to libjpeg-dev
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=569245
2010-02-11 10:29:05 +01:00
Carlos R. Mafra
914d984422 Add new WPrefs German strings
With thanks to Martin Dietze!
2010-02-02 11:05:46 +01:00
Carlos R. Mafra
ba4c4bd61a Regenerate WPrefs German translation file
No new translations were added. The .po file was recreated with

make WPrefs.pot
msgmerge de.po WPrefs.pot > de.po.new
(remove old strings from it)
mv de.po.new de.po
2010-02-02 10:56:01 +01:00
Carlos R. Mafra
585307ba39 Add new German translated strings
It was fun trying to translate them, but even after several
minutes of deep thoughts about the different cases etc I managed
to translate them wrongly.

So I thank Martin Dietze for kindly fixing them!
2010-01-22 19:24:04 +01:00
Carlos R. Mafra
f1980ce1f1 Re-create German translation file
I wanted to learn some German and got curious to read the Window Maker
translations. After noticing that some strings with translations
were already removed from the main source I decided to recreate the
German .po file to get rid of those messages.
2010-01-22 19:21:51 +01:00
Carlos R. Mafra
23a790da1d Add new style 2010-01-22 18:22:53 +01:00
Alexey I. Froloff
7793bb9d67 Turn anti-aliasing on by default. 2010-01-22 01:51:24 +01:00
Carlos R. Mafra
366cb8367b Add a few instructions to the WPrefs.app/po/README
Just in case someone wants to help.
2010-01-21 19:32:15 +01:00
Carlos R. Mafra
422fedbc4b Remove mkpatch script
I don't need it, git should handle everything.
2010-01-16 17:09:34 +01:00
Martin Dietze
c89cb142ba Small fix for wmaker nightly build script 2 2010-01-12 14:59:35 +01:00
Carlos R. Mafra
72dfe4aa89 Remove VIRTUAL_DESKTOP code
Even the option to enable "virtual desktop" in configure.ac was
commented out...and I would never intend to use it anyway.

So let's just remove the ~800 lines of #ifdef'ed code to have a
cleaner code base to read when bored.
2010-01-09 13:48:06 +01:00
Martin Dietze
4e90a87b14 Small fix for wmaker nightly build script 2010-01-09 13:48:06 +01:00
Carlos R. Mafra
f55eef413f wmaker-0.94.0-crm
I am calling it -crm so that people won't confuse its non-official status.
2010-01-09 13:48:06 +01:00
Carlos R. Mafra
643e49f190 Remove [raise,lower]clip shortcut keys
The raising and lowering of the clip is already taken care of
by the "ClipRaiseLowerKey" shortcut.

wmaker gets a bit smaller for free:
   text    data     bss     dec     hex filename
 449483   17384    8208  475075   73fc3 src/.libs/wmaker.old
 449307   17256    8192  474755   73e83 src/.libs/wmaker.new
2010-01-09 13:47:57 +01:00
Carlos R. Mafra
8a2a0b6adc Remove ICON_KABOOM_EXTRA
I don't want it in the sources, and the "normal" icon kaboom
is good enough. And it was #undef'ined by default.
2010-01-07 15:38:41 +01:00
Carlos R. Mafra
0deb198b10 Remove a few unneeded includes 2010-01-07 15:33:41 +01:00
Brad Jorsch
b6689a0108 Keyboard shortcut to raise the dock
This patch adds the DockRaiseLowerKey shortcut, which raises/lowers
the dock depending on whether the dock is lowered/raised.

[crmafra: Reformatted Brad's patch against git repo and removed the
 DockRaiseKey and DockLowerKey shortcuts ]
2010-01-07 12:16:17 +01:00
Carlos R. Mafra
7ef8178d2a Undefine WINDOW_BIRTH_ZOOM
I don't want the (small) overhead of the window birth zoom special effects
because I like apps popping up instantly when I open them (specially now
with the SSD).

Another way to not get the birth animation is to unset "animations" in
WPrefs, but that makes the other animations which I care (ie they don't have
the effect of making my computer seem slower than it really is) go away.
2010-01-06 11:34:24 +01:00
Carlos R. Mafra
b3e817305d Do not compile extra stuff under wrlib/tests etc
Let's avoid compiling these "tests" and extra stuff every time,
saving us some time.
2010-01-06 11:34:24 +01:00
Carlos R. Mafra
a2133e8e2f Do not change workspace during deiconify animation
Paul Harris reported that using the mouse wheel over a miniwindow
would deiconify it to a different workspace than the original one
where it was iconified.

This happens because after the window begins to be deiconified the
"residual" mouse wheel scrolling hits the workspace background, and
Window Maker changes workspace with wWorkspaceRelativeChange().

But if it all happens fast enough (so the deiconification animation
did not finish yet) the workspace will have changed before the
window reaches its final deiconified destination, leading to
the situation that Paul described in the link below.

So to avoid this, let's set a 'ignore_wks_change' variable
from wDeiconifyWindow() and make wWorkspaceRelativeChange() respect it.

Original report: http://lists.windowmaker.info/dev/msg00821.html
2009-12-26 21:09:10 +01:00
Carlos R. Mafra
efa31f30b2 Remove unused function raiseMenus()
GCC warns:

rootmenu.c:350: warning: 'raiseMenus' defined but not used
2009-12-21 23:00:33 +01:00
Carlos R. Mafra
024e2f5299 Remove XSMP_ENABLED constructs
The code was never used and the !XSMP_ENABLED code seems to
work well enough for all these years.
2009-12-21 22:40:28 +01:00
Ralf Hoffmann
629b118767 fixed problem with default visual ID for multi-screen setups by using multiple IDs for each screen
Since a single default visual ID cannot be used for multiple screens, thus
Window Maker refused to start. There is now a global function for getting the
default visual ID. The command line argument --visual-id can be a comma
separated list of visual IDs for each screen. A default value is only set for
the first screen.
2009-12-11 16:36:25 +01:00
Nicolas Bonifas
d8ef209c9a Add menu path to Debian build system
Part of the menu on Debian systems is stored in
/etc/X11/Windowmaker/menu.hook. This patch will add this path to
src/wconfig.h.in when building the Debian wmaker package. This is
what is done in the Debian version of wmaker 0.92.0.
2009-12-10 13:51:26 +01:00
Carlos R. Mafra
2ba803ad98 Remove unused arguments from a few functions
gcc 4.4.1 was warning (among others):

switchpanel.c: In Funktion »getTile«:
switchpanel.c:321: Warnung: unbenutzter Parameter »panel«
switchpanel.c: In Funktion »makeWindowListArray«:
switchpanel.c:377: Warnung: unbenutzter Parameter »scr«
switchpanel.c:377: Warnung: unbenutzter Parameter »workspace«
2009-12-09 21:04:29 +01:00
Carlos R. Mafra
33c9e87692 Remove static function declaration from header file 2009-12-09 20:48:44 +01:00
Carlos R. Mafra
0a5febcada Remove unused function argument from randomPlaceWindow() 2009-12-09 20:35:13 +01:00
Nicolas Bonifas
41fdb79e28 Maximus: Take border into account
This patch fixes a minor bug in Maximus: the new window size didn't take the
 border into account. This bug was particularly visible with the
 "do not cover dock" option turned on.
2009-12-08 16:14:29 +01:00
Ralf Hoffmann
d74a90d1bf changed behavior when focusing new windows with autofocus enabled
New windows will only get focused if the mouse is on the same screen.
The code doesn't handle multiple heads but since it's just one screen
the function works as usual. Checking the head and assign the focus only
if the window is on the same head might be a good idea. Making the whole
stuff optional might be even better.
2009-12-08 16:14:29 +01:00
Ralf Hoffmann
fe8ab024af fixed wrong env setup when setting background
This patch fixes a problem with restarting Window Maker in multi-screen
environments. The code for setting the background by calling wmsetbg
changes the environment. In multi-screen setups the DISPLAY variable
becomes :0.0 instead of :0 (for example). The restarted Window Maker
process therefore only manages one screen.
2009-12-08 16:14:29 +01:00
Ralf Hoffmann
6c6e832c52 activate XGrabServer again
This patch fixes a small problem which only rarely occurs. If a
window is opened only for a very short time and closed right away, in
some circumstances the frame around it stays opened. It looks like
Window Maker doesn't get the destroy message. The XGrabServer call was
commented in the code so I activated it again which seems to prevent this
from happening. I think it actually make sense since the ungrab calls are
used anyway in the following code.
2009-12-08 16:14:29 +01:00
Carlos R. Mafra
13c2d523e2 Remove DRAWSTRING_PLUGIN reference from wconfig.h.in
DRAWSTRING_PLUGIN never appears anywhere else in the sources.
2009-12-08 16:14:29 +01:00
Carlos R. Mafra
e7cc15df71 Remove unused function getRImages()
Pointed out by Nicolas Bonifas.
2009-12-06 15:35:26 +01:00
Carlos R. Mafra
3db3f179d1 Remove unused src/menureader.c file 2009-12-06 15:35:26 +01:00
Carlos R. Mafra
5fa41941fe Remove unused wHackedUngrabButton()
Pointed out by Nicolas Bonifas.
2009-12-06 15:35:25 +01:00
Carlos R. Mafra
4c4d50c813 Remove unused function wIconSetHighlited()
There is no point in carrying unused functions for so long.

Pointed out by Nicolas Bonifas.
2009-12-06 15:35:25 +01:00
Carlos R. Mafra
8c5a7b287a Remove unused functions from src/pixmap.c
In case someone needs them in the future for some reason,
they can be restored from the git logs.

Pointed out by Nicolas Bonifas.
2009-12-06 15:35:25 +01:00
Carlos R. Mafra
347fbcc87a Remove unused function wWindowCheckAttributeSanity()
As pointed out by Nicolas Bonifas, wWindowCheckAttributeSanity() is
currently unused. Removing it saves 200 bytes:

  text    data     bss     dec     hex filename
  23476       0       8   23484    5bbc src/window.o.new
  23676       0       8   23684    5c84 src/window.o.old
2009-12-06 15:35:25 +01:00
Nicolas Bonifas
a2cb317f11 Remove useless NULL test
If menu is NULL we would have a null pointer dereference when initializing scr.

> Ie, why not move the assignment of 'src' to after the test?

I thought about this, but I checked the 3 different calls to
updateWorkspaceMenu (all in winmenu.c). They must all call
updateWorkspaceMenu with non-NULL pointers, so if we have a NULL
'menu' pointer then we obviously have a major problem and it is
probably better to crash here than to silently return and fail a
little latter.

[crmafra: edit changelog]
2009-12-06 15:32:30 +01:00
Nicolas Bonifas
391d5de79e 2 open() statements were not matched with close() statements in function fetchFile 2009-12-06 13:58:24 +01:00
Carlos R. Mafra
ad4358c605 Update German translation
Based on a patch from OpenSUSE whose author is unknown.
2009-12-01 14:17:50 +01:00
Nicolas Bonifas
2203b229b0 Fix the empty button in titlebar after going fullscreen bug (Debian bug #298873) 2009-11-17 01:42:15 +01:00
Carlos R. Mafra
4932433b95 Remove DEMATERIALIZE_ICON code
This animation is not as cool as the NORMAL_ICON_KABOON, so I don't
think having a choice here is justified. Let's remove this option
(it was not defined in wconfig.h.in by default) and keep using
the nicer NORMAL_ICON_KABOON.
2009-10-17 01:56:28 +02:00
Carlos R. Mafra
f9792a042a Remove SILLYNESS
This code makes wmaker a little bit bigger for no gain at all. I could
undefine SILLYNESS and forget it, but I actually also want a clean
source code to read. And the less code the better.

So now I won't get a different Info dialog on Christmas, but
my wmaker will also not carry around that code in the other 364 days
of the year.

As a result, wmaker gets ~1.7 % smaller

   text	   data	    bss	    dec	    hex	filename
 448043	  17424	   8200	 473667	  73a43	wmaker.new
 455340	  18360	   8328	 482028	  75aec	wmaker.old
2009-10-17 01:38:53 +02:00
Carlos R. Mafra
96b9b22cb2 Remove #ifdef SYS_SIGLIST_DECLARED constructs
SYS_SIGLIST_DECLARED was defined nowhere and it was
clearly some dead code.
2009-10-17 01:05:28 +02:00
Johann Haarhoff
1f1eb393f8 Mod+Wheel resize increment now respects size hints
Thanks to Iains patch which showed me how to access the window hints, I
now propose the following: The resize increment is set to the closest
multiple of the size hints larger than wPreferences.resize_increment.

This should fix Carlos' complaint about fixed-increment windows resizing
too "slowly", and it also fixes my complaint about the blank space below
the last line of an xterm.

Thanks to:
    Iain Patterson <wm@iain.cx>
2009-10-13 12:17:57 +02:00
Iain Patterson
bf88570a5f Respect size hints when resizing with wheel.
Use height and width increment when wheel resizing if size hints are
set on a window and meaningful height and width increments are
specified.
Windows which don't care about their resize increments will have height
and width increments set to 1.  For these windows - and windows without
resize hints at all - use the setting configured with ResizeIncrement.
2009-10-12 15:24:13 +02:00
Carlos R. Mafra
a3246cfe3b Remove remaining sound stuff from WPrefs etc
Let's remove the configuration options about "sound" from
WPrefs (as it was never fully functionall anyway) and from
configuration files.

Remove also the xpm and tiff icons.
2009-10-12 03:02:24 +02:00
Carlos R. Mafra
c5f027d811 WPrefs: trivial coding style fixes 2009-10-12 02:41:27 +02:00
Carlos R. Mafra
af8cec15e3 Remove repeated functions enclosed by #if 0
There are already working versions of these functions,
so let's remove these copies.
2009-10-12 01:02:19 +02:00
Carlos R. Mafra
15e37ff942 Remove #ifdef NETWM_HINTS constructs
NETWM_HINT is always defined in src/wconfig.h.in, so
let's remove it from there too.
2009-10-12 01:00:19 +02:00
Carlos R. Mafra
347e804bb6 A few trivial code style cleanups 2009-10-11 23:30:41 +02:00
Johann Haarhoff
a063338175 Mod+Wheel Window Resize
This patch adds the ability to resize windows with the mouse wheel
while holding the Mod key. This currently ignores wWindowConstrainSize
until I can figure out a way to repeatably resize windows with
fixed size increments (like xterm) using this method.

This also adds a slider to WPrefs to choose the increment with which
the wheel will resize a window.
2009-10-11 22:17:54 +02:00
Carlos R. Mafra
781b663341 HOWTO: The perfect Window Maker patch
This document is a very brief description about how you can
create a patch "the git way", so that it can be applied
easily with 'git am'.
2009-10-11 17:37:18 +02:00
Carlos R. Mafra
09140a82b9 Increase granularity of 'shrink/zoom' animation
Now it is a bit easier to actually enjoy the animation :-)
2009-10-10 19:55:57 +02:00
Carlos R. Mafra
87161c5e0c Remove MINIATURIZE_ANIMATION_DELAY_{Z,F,T} tests
We know that they are non-zero because we set their
values explicitly in wconfig.h.in, so there is no
point in checking them.
2009-10-10 19:30:04 +02:00
Carlos R. Mafra
cda27758bc Add function prototypes in action.h and include it in superfluous.c 2009-10-10 19:29:56 +02:00
Carlos R. Mafra
b014ef2770 Remove 'hiding' parameter from animateResize()
It was a bit pointless.
2009-10-10 19:03:12 +02:00
Carlos R. Mafra
e9309e1e39 Delete WINDOW_BIRTH_ZOOM and default to WINDOW_BIRTH_ZOOM2
WINDOW_BIRTH_ZOOM was a bit lame and it makes sense to not have
it at all. So remove the trailing "2" of WINDOW_BIRTH_ZOOM2 and
make it the only choice (you can #define it in src/wconfig.h.in).

Note that it uses the same algorithm as the animation to resize,
ie zoom, twist or flip. You can choose them in WPrefs.
2009-10-10 18:27:52 +02:00
Carlos R. Mafra
06d3360224 Remove 'ghost window move' code
GHOST_WINDOW_MOVE was not defined anywhere. Let's remove that
code.
2009-10-10 00:05:58 +02:00
Carlos R. Mafra
9d6728d3e7 Remove SPEAKER_SOUND dead code
SPEAKER_SOUND is defined nowhere, so this code was not being used
and I don't want its functionality anyway.
2009-10-09 23:59:37 +02:00
Carlos R. Mafra
2765bec3e4 Remove sound support
Two reasons for removing it:

    1) I won't ever want to hear useless sounds

    2) The sound support is a bit of a joke. The code is there but you have
       to hunt it somewhere else (not in any repository that I know of).
       In my 10 years of using wmaker, I never used it for this reason.
       Now I consider having no sound in Window Maker a feature, and I like
       it that way. So there is no point in carrying useless code around.

PS: There is still the code in WPrefs to be removed.
2009-10-09 20:04:47 +02:00
Carlos R. Mafra
7df49cce14 Clean up contrib/ folder
Let's remove the "single click" patch from there.
2009-09-24 23:53:03 +02:00
John H. Robinson, IV
21eb8456ba Updated documentation
Updated URIs
Removed stale/outdated information
Reformatted for 80 columns
2009-09-24 23:41:36 +02:00
Iain Patterson
bc3995bf6b Fix msgfmt error with Armenian translation.
msgfmt said:

hy.po:685: `msgid' and `msgstr' entries do not both end with '\n'

Fixed by adding newline as in original text.
2009-09-24 23:41:10 +02:00
Norayr Chilignaryan
7f457fa275 Window Maker armenian translation 2009-09-24 23:40:46 +02:00
Carlos R. Mafra
484bdbe7d4 Ansify function declarations
I've just noticed them en passant.
2009-09-24 23:40:39 +02:00
Martin Dietze
ef2f5a6f29 Fix automatic Debian builds 2009-09-24 10:13:44 +02:00
Carlos R. Mafra
12b6be768e swpanel: Fix focus issue when alt-tabbing
The problem was the following. While alt-tabbing from one
window to a xterm, wait for the xterm to be raised but
keep the alt key pressed. Now move the mouse cursor
over the xterm and release the alt key.

The result is a xterm in a zoombie focused state; its titlebar
has the focused color but xterm itself is not focused and does
not accept any input.

Fix this by reinstating the check for a NULL pointer from
wSwitchPanelHandleEvent() before changing focus. That function
detects if the mouse cursor moved over to the same window which
is currently being pointed out by the switchpanel, and returns
NULL in this case (the check for panel->current != focus fails).

Thanks to Paul Harris for reporting it!
2009-09-19 16:07:47 +02:00
Carlos R. Mafra
6a0120f014 Maximus: Some cleanups and bug fixes
Let's ignore hidden windows and also adjust the coordinates
a bit, to avoid ~2 pixels of overlap.

I thank Paul Harris for pointing out these bugs.
2009-09-19 16:07:03 +02:00
Carlos R. Mafra
0a0c2391de Maximus: Avoid a window list order issue
If we compute the maximus geometry in only one pass through
the window list, the order in which the windows appear in
the list can affect the outcome.

That is because before computing the intersections in the
y-projections we update the y coordinates from whatever window
which happened to change the new_y coordinate during the
previous x-intersection computations, but that may not be _the_
blocking window which decides the final positions in the y axis.
Therefore we may find that this "intermediate window state"
has a non-vanishing y-intersection with another one -- and
be blocked by it -- even though that should not be the case for
the final outcome.

So to avoid that we first scan through all the windows to decide
the final maximumized coordinates in the y axis. Only after that we
compute the x-coordinates.
2009-09-19 16:06:48 +02:00
Carlos R. Mafra
7a86f48f73 Fix --disable-verbose-compile
Remove an extra $(QUIET), as that was causing a few annoying
messages during the compilation of libraries.
2009-09-19 16:06:18 +02:00
Alexey Voinov
3953f53680 WINGs shared library generation
This patch modifies the linking of the WINGs libraries
to create a shared library. wmaker used to do this, but
it was dropped around wmaker-0.90/0.91.
The shared .so library is needed when compiling and running
the wdm display manager and any other programs which link
to libWINGs.

Submitted by: Gilbert Ashley
Origin: ALT/Sisyphus Linux
2009-09-19 16:06:05 +02:00
Carlos R. Mafra
92eff967a7 Maximus: Consider the full_maximize window attribute
When maximumizing a window which has the full_maximize attribute
set we have to consider two possibilities:

    1. If the new y coordinate is zero it means that no other
       window blocked its maximumization up to the top of the
       screen, so we want to put the titlebar outside.

    2. If the new y coordinate is not zero it means that another
       window in the current workspace blocked its way to y = 0.
       In this case we do nothing with the titlebar.

Note that there is another possible fine tunning which is not
addressed in this patch, which is to consider the resize bar.
2009-09-17 00:46:14 +02:00
Carlos R. Mafra
eaca92db50 Simplify wMaximizeWindow() a little bit
Let's avoid checking the existence of a border every time
we want to adjust the widths. So we'll always subtract the correction
factor, which is zero in case the window has no border.
2009-09-17 00:46:14 +02:00
Carlos R. Mafra
1a85719971 Increase the readability of SlideWindow()
It is easier to read the computations if the variables
have shorter names. At the same time it avoids reading
the struct array elements repeatedly, so as a bonus
misc.o gets 64 bytes (0.5%) smaller

[mafra@Pilar:wmaker.git]$ size src/misc.o.*
   text    data     bss     dec     hex filename
  11125       0    4104   15229    3b7d src/misc.o.new
  11189       0    4104   15293    3bbd src/misc.o.old
2009-09-17 00:44:36 +02:00
Alexey I. Froloff
5979162878 Fix race condition during workspace changes
When changing workspaces, after focusing new window, wmaker handles all
pending events.  If it receives another change-workspace combination,
you may end up with a workspace without any focused window.

Ctrf-F1 and Ctrl-F2 used to switch to 1st and 2nd workspaces.
Hold Ctrl and press F1 and F2 almost at the same time.

This patch ignores all change-workspace commands while workspace
change is in progress.

See also https://bugzilla.altlinux.org/show_bug.cgi?id=7230

[crmafra: Thanks to Alexey I. Froloff for the above explanation]
2009-09-15 20:14:55 +02:00
Carlos R. Mafra
306165775e Yet another trivial coding style cleanup 2009-09-15 20:06:04 +02:00
Carlos R. Mafra
c7f2a189c4 Fix the call to XChangeProperty() in 64-bit mode
The man page of XChangeProperty() says:

  "If the specified format is 32, the property data must be a
   long array."

And as we call it with format 32, the type of 'data' must
be 'long'. It happens to work nowadays in 32-bit architectures
because sizeof(CARD32) = sizeof(long), but that is no longer
true in 64-bit mode.

This patch was downloaded from
www.openbsd.org/cgi-bin/cvsweb/ports/x11/windowmaker/patches/patch-WINGs_wwindow_c
and I thank Alexey I. Frolov and Vladimir Nadvornik for helping me
to understand it on a wmaker-dev thread.
2009-09-15 12:52:14 +02:00
Carlos R. Mafra
ca2c1f900d Trivial coding style fix 2009-09-15 01:52:35 +02:00
Iain Patterson
18408fff93 Mac OS X-style window cycling.
For those not familiar with the way Macs cycle windows, the Command-Tab
sequence (Alt-Tab elsewhere) switches between DIFFERENT application windows
and Command-Grave (key above tab) switches between windows owned by the
SAME application as is currently focused.  So if you had three Safari and
two Finder windows open, and Safari had focus, Command-Tab would switch to
Finder; Command-Tab would switch back to Safari; Command-Grave would switch
to a different Safari window etc.

This patch implements "something like" the above by only populating the
switchpanel with windows matching the currently-focused WWindow's wm_class
when the new cycling mode is activated.  In practice this means you can
switch to The Next XTerm or The Next Firefox Window using this method.

The configuration names for these new shortcuts are GroupNext and
GroupPrev.  The patch tells WPrefs.app about them.  Of course switching to
The Next Window is still possible with the (unchanged) FocusNext and
FocusPrev keys.
2009-09-14 16:51:26 +02:00
Iain Patterson
5c46f48898 Support Xinerama in wmsetbg.
Allow wmsetbg to revert to pre-0.90.0 behaviour when choosing a
background image that is large enough to span several heads in a
Xinerama setup.  If the -X flag is passed to wmsetbg, the background
image will be stretched to fill the logical screen (as it would be by
default in older versions of wmsetbg) instead of being tiled across
screens.
2009-09-14 16:51:26 +02:00
Iain Patterson
567279b962 Pad workspace name display.
Shift the workspace name, shown when switching workspaces, by 32
pixels.  This is purely for aesthetic reasons.  It just looks better
(IMO) than having the name flush against the screen edge.
2009-09-14 16:51:26 +02:00
Iain Patterson
1a27b34160 Constrain switching workspace name to one head.
When switching workspaces, force the name to be shown entirely within
one head of a Xinerama display. Previously the name would span heads if
set to TOP, CENTER or BOTTOM alignment, and was hence hard to read when
the display comprised an even number of heads.
2009-09-14 16:51:26 +02:00
Carlos R. Mafra
9789cf3154 Add Maximus key back in WPrefs.app
Somehow I had forgotten to include this change in version 2
of the patch.
2009-09-14 16:51:26 +02:00
Carlos R. Mafra
513a509096 Fix the use of uinptr_t
Remove the additional cast to (int), as that makes no sense.
2009-09-14 16:51:26 +02:00
Alexey Voinov
f6645ac564 x86_64 mmx fixes
This patch combines two small patches which fix issues with x86_64 and mmx in
the configure script.

Submitted by: Gilbert Ashley
Author: unknown?
Origin: ALT/Sisyphus Linux, Alexey Voinov <voins@altlinux.ru>
2009-09-14 02:09:35 +02:00
Nicolas Bonifas
cf0f7d68d5 Un-maximize window inside current head
If the old_geometry coordinates were saved while the window
was in another xinerama head, use current coordinates as
the old ones to avoid making the window jump heads when
un-maximizing it.
2009-09-13 23:33:39 +02:00
Nicolas Bonifas
3106292f4b Maximus: Use unsigned int for width/height variables
And move its prototype to actions.h (and also that of
save_old_geometry()).
2009-09-13 23:32:15 +02:00
Nicolas Bonifas
e42586c712 Remove commented code in xinerama.c 2009-09-13 23:32:09 +02:00
Tamas TEVESZ
0a47a19b3e Remove bundled wrlib stuff
This patch removes bits and pieces of xmu that for some reason
have been bundled with wmaker. I can very well imagine that at the time
they were bundled, xmu was not, was not available everywhere, or
whatever.

I couldn't come across a system that doesn't have these things in its
system-supplied x libs, though i've been carrying this since january,
and my memory is quite flakey at times.

certainly nothing xorg is at danger, nor xfree86 dating back to at
least 3.3. i believe this stuff should be everywhere that calls itself
to be on par with x11r6.3 at the very least.

it would be incredibly useful if people having access to commercial
unixes could check this on things released in the past, say, 15 years.
i believe back then i had solaris 8+and sco openserver 5+ covered.
2009-09-13 21:40:47 +02:00
Nicolas Bonifas
e4fcd515fe Maximizing a resized window
When a maximized window is resized (either using wmaker or because the
application changed the window size), and you want to maximize it again,
you first have to unmaximize it (because wmaker thinks the window is still
maximized), and only then you can maximize it. The following patch
corrects this behaviour.
2009-09-13 19:17:59 +02:00
Carlos R. Mafra
4bce3e3805 Make left/right maximization work again
The patch "Clean up maximization and un-maximization logic" introduced
a regression wrt to the left/half maximization feature, due to a C
operator order precedence issue.
2009-09-13 18:32:43 +02:00
Carlos R. Mafra
cbd13dd95f Ansify function declaration 2009-09-13 16:07:54 +02:00
Carlos R. Mafra
18c7a20136 Delete stale .cvsignore files 2009-09-13 12:59:25 +02:00
BERTRAND Joel
816fee1b68 Fix miniwindows auto-arranging bug
With this patch, minimized windows do not reshuffle anymore.

See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=361241
where Martin Hinsch reported:

"The behaviour of icons (minimized applications) is severely broken when
 automatic placement is switched on.
  * When switching the workspace icons often stick thereby covering (and
    hiding) icons on the workspace one is switching to.
  * After minimizing an application, clicking (singly or doubly) on one of
    the icons causes all of them to reshuffle, usually in a way that the
    icon in question changes its place (which is extremely annoying).
  * Icon placement ignores the dock so that icons disappear behind
    it/cover it.

 All of these suddenly appeared about a year ago (I think with 91.0). The
 problems are not architecture-specific since they occur in exactly the
 same way on my pentium machine. Wiping the complete configuration (rm -r
 ~/GNUstep) did not make a change either."
2009-09-11 10:24:54 +02:00
Andreas Tscharner
5b93254d0f Fix compilation failure
This fixes a compilation failure with gcc-4.3.4, where it complains

nxpm.c: In function RGetImageFromXPMData:
nxpm.c:99: error: expected expression before ] token
...
2009-09-09 22:18:34 +02:00
Alexey Voinov
62bf6d17b5 Fix session saving for apps with shared appicons
This patch comes from
http://git.altlinux.org/people/raorn/packages/WindowMaker.git
2009-09-06 17:12:24 +02:00
Carlos R. Mafra
8efc490361 Reduce the number of simultaneous inotify events
There is no point in having a buffer capable of 512 simultaneous events,
as it will typically be only 1. But increase the value for the length
of the path + filename to 64 (which is a reasonable size for a
typical /home/something/GNUstep/Defaults/WMRootmenu filename).
2009-09-04 15:02:00 +02:00
Alexey Voinov
5f5b1df7d2 Christmas does not last forever
From https://bugzilla.altlinux.org/show_bug.cgi?id=3480

  "If you open "Info Panel" on 25 dec (Christmas), the
   "Christmas tree" is shown. And after that on all days
    Christmas tree is shown. (Until you restart WM, i think)"

Taken from http://git.altlinux.org/people/raorn/packages/WindowMaker.git
2009-09-03 23:56:33 +02:00
Carlos R. Mafra
88ab8b74b4 wmrlib: Avoid code duplication
We can put common repeated code into a helper function, and
increase readability a bit.
2009-09-03 23:56:33 +02:00
Alexey I. Froloff
2ccc8e4a79 Remove alloca(3)
And use malloc() instead.

See "Dropped useless use of alloca(3)" from
http://git.altlinux.org/people/raorn/packages/WindowMaker.git
2009-09-03 21:10:48 +02:00
Alexey I. Froloff
8490e31fde Atomic save for session
This patch is part of "Atomic saves for history and session" from
http://git.altlinux.org/people/raorn/packages/WindowMaker.git
2009-09-03 20:20:12 +02:00
Alexey Voinov
05720d9707 Add history to some dialog boxes
This patch adds history to some dialog boxes. To use it replace %a with
%A in menu file (like in "Run..." menu item). You can specify third
parameter to %A to use different histories for differen dialogs.

All history files is kept in ~/GNUstep/.AppInfo/WindowMaker/ and the number of
history lines controlled by DialogHistoryLines parameter (one for
all dialogs) defaults to 500 lines.

It also adds Tab completion.

Origin: ALT/Sisyphus Linux, Alexey Voinov <voins@altlinux.ru>
2009-09-03 15:44:11 +02:00
Sebastien Bauer
f8dd3dc49e Add option to allow starting DockApps with a single click
This patch is from the contrib directory. It adds an option to allow starting
DockApps with a single click. It's a handy option that adds only a few lines to
the code.

It is a good feature patch example because it includes modifications
to the WPrefs application so that the feature can be easily enabled or
disabled. The one-click ability allows wmaker to integrate more seemlessly with
programs like ROX-Filer which can be configured to use single or double click
actions.

The README in the contrib/ directory says,

author:
Sebastien Bauer <seb_bauer@bigfoot.com>
John Morrissey <jwm@horde.net>

updated for Window Maker 0.65.0 by:
Daniel Richard G. <skunk@graphics.lcs.mit.edu>

updated for Window Maker 0.80.2 by:
Martial Daumas <martial@nasgaia.org>

update for 0.80.2+ by:
steve lion <steve.lion@verizon.net> and vlaad
2009-09-03 15:19:10 +02:00
Carlos R. Mafra
c04a2caeab Clean up maximization and un-maximization logic
We should not try to un-maximize the windows from inside
the function wMaximizeWindow(), as that makes no sense.

If the window is already maximized then we don't call
wMaximizeWindow() anymore and call wUnmaximizeWindow()
instead, which will use the old geometry regardless
of which maximization is active (horizontal, vertical,
maximus, etc). And the old geometry now is also saved
when we enter wMaximizeWindow().

So when we call wMaximizeWindow() or wUnmaximizeWindow()
we really mean "maximize to the specified state" or
"go back to whatever old geometry coordinates we had before".
2009-09-02 04:42:19 +02:00
Carlos R. Mafra
cf62d1591f Maximus: Tiled Maximization
This patch introduces the "tiled maximization" feature, a.k.a. Maximus.

By pressing the keyboard shortcut associated with Maximus, the focused
window will be maximized to the greatest area satisfying the constraint
of not overlapping existing windows.
2009-09-02 04:42:05 +02:00
Daniel Déchelotte
7857f297ea Fix for omnipresent AppIcon bug at startup
Bug overview: right after start up, omnipresent AppIcons (living in the Clip)
    are displayed but non-functionnal.

    How to reproduce it: place two AppIcons in the Clip, make the first one (A)
    omnipresent and leave the second one (B) as is. Make the Clip "autocollapse".
    Switch to the second workspace and restart wmaker. Wmaker starts in the first
    workspace; the Clip is closed (its text color corresponds to the closed state,
    AppIcon B is not shown). However, AppIcon A is displayed.  Moreover, A does
    not react when the Clip expands or collapses.  Finally, a click on A makes it
    disappear. Fortunately, changing to another workspace fixes the problem
    definitively.

    Explanation and correction: internally, wmaker maintains as many clips as
    workspaces. When the user switches to another workspace, the omnipresent
    AppIcons are moved to the new "current" clip. In the situation above (trying
    to reproduce the bug), when wmaker restarts, the omnipresent AppIcons are
    restored in the second workspace, whereas the first workspace is active. In
    the previous code, a "hack" (calling XMapWindow()) unconditionally displayed
    the omnipresent AppIcons. The proposed patch makes sure the omnipresent
    AppIcons are moved to the first workspace on wmaker startup.
2009-09-02 00:17:27 +02:00
Tamas TEVESZ
b37e065252 Clean up #ifdef mess
Use enum instead of #ifdef maze for enumerating keybindings
2009-09-01 14:31:08 +02:00
Daniel Déchelotte
d7183d33b4 Gobble "spurious" EnterNotify events when moving an appIcon or a dock
This is a bug fix. Bug overview: if an AppIcon is moved rapidly over a Clip
    set to auto-expand, the latter may erroneously auto-expand afterwards.

    How to reproduce it: set a Clip to auto-collapse, and make sure it contains a
    (random) AppIcon, so as to easily visualise its open/close state. Now move
    rapidly an AppIcon over the Clip. Try to move it so fast that the cursor
    sometimes is out of the AppIcon's tile. Then, replace the AppIcon out of the
    Clip.

    Explanation and correction: if, while the AppIcon was being moved, the mouse
    cursor entered at least once in the Clip's tile, the latter is going to
    receive an EnterNotify event (after the AppIcon is replaced) and thus expand
    automatically after the relevant delay. The solution is to simply "gobble"
    (i.e., ignore) all EnterNotify events when moving an AppIcon.
2009-09-01 14:12:55 +02:00
klaasvakie
2ed9c12ee5 Fix half_scr_width calculation
Moved the half_scr_width calculation to after the

usableArea = wGetUsableAreaForHead(scr, head, &totalArea, True);

call. This fixes the problem where windows that get "half screen
maximized" cover the dock or clip.
2009-09-01 13:57:58 +02:00
Carlos R. Mafra
229b6984de Use half_scr_width instead of computing it each time
Let's use

    half_scr_width = (usableArea.x2 - usableArea.x1)/2;

to shorten the expressions in the left/right half maximize
code.
2009-08-30 16:28:23 +02:00
Carlos R. Mafra
a1f35d7f5b Increase the readability of wUnshadeWindow() and wShadeWindow() a little bit
Instead of open coding the animation routines in the function bodies,
put them in a helper function called shade_animate(wwin, what), whose
second argument can be SHADE or UNSHADE.
2009-08-30 00:58:18 +02:00
Carlos R. Mafra
34be9d7816 Trivial coding style changes
Some trivial style changes I made while reading src/placement.c
2009-08-30 00:51:27 +02:00
Tamas TEVESZ
9af6316d1d k&r->ansi some stuff
ansify and "fix" function pointer declarations
2009-08-29 21:49:22 +02:00
Johann Haarhoff
6924454836 Left Half / Right Half Maximize
This adds Left Half / Right Half Maximize capability to WindowMaker.
It allows you to maximize a window to only the left or right half
of your screen.

It is useful on widescreen displays where one might to bring up
two different windows side-by-side.
2009-08-29 21:49:16 +02:00
Carlos R. Mafra
328251c68a Define TITLEBAR_HEIGHT in default configuration file
...and use it in src/placement.c

And while we are at it, clean up a bit the visual of wconfig.h.in
2009-08-28 21:21:03 +02:00
Carlos R. Mafra
2f87d01a41 Make wmaker 0.11% smaller by avoiding code duplication
This patch cleans up an obvious code duplication case in the
different "placement" algorithms.

Avoid this needless repetition by using a helper function,
which in turn lets those functions a bit easier to read and
also makes wmaker 0.11% smaller :-)

[mafra@Pilar:wmaker.git]$ size src/.libs/wmaker.*
   text    data     bss     dec     hex filename
 619824   19160    8544  647528   9e168 src/.libs/wmaker.new
 620552   19160    8544  648256   9e440 src/.libs/wmaker.old
2009-08-28 20:18:18 +02:00
Martin Dietze
22730876e4 Nightly Build script can now deal with testing and unstable branches. 2009-08-28 19:04:29 +02:00
Gilbert Ashley
be08535ab4 Show app name in Kill Application dialog
The "Kill Application" dialog window doesn't always show the
application name when killing DockApps. It shows its wm_class
instead, which is not always the same as the app name.

This patch allows the Kill Application dialog window to show
the application name in the window -- as expressed by using the
basename of the path to the application.

[crmafra: Added wtokensplit() to get only the app name]
2009-08-27 16:35:42 +02:00
Vladimir Nadvornik
108127f0b5 Miscellaneous fixes from OpenSuse
These are some of the fixes sent to the wmaker-dev list by
Vladimir Nadvornik, with minor modifications to address Dan
Pascu's concerns.

Original-post: http://lists.windowmaker.info/dev/msg00293.html
2009-08-27 16:34:44 +02:00
Carlos R. Mafra
6d75291e1d Add config option to supress focus requests across workspaces
In commit d6c134f420 ("Do not switch
workspace to follow new windows in others") the default behavior
was changed, and workspace switching to follow focus requests was
strictly forbidden.

Although that seems to be a sane thing to do by default, that raises
concerns about whether Window Maker could be more flexible in that
respect -- allowing the user to choose which applications are or
are not allowed to do that.

This patch adds such configuration, located in the "Advanced Options"
submenu of the top-level "Attributes" menu.
2009-08-26 17:53:08 +02:00
Martin Dietze
ca60620f50 Adapted nightly build script to coexist with new 'next' branch. 2009-08-26 15:51:13 +02:00
Martin Dietze
a9aeefbe70 Fix NULL pointer dereference
Some weird applications like Safari for Windows running on CXOffice
or some applications running on Wine were causing wmaker to crash.
So let's not rely on a window's `frame' property to be not NULL in
src/wmspec.c.

Original-post: http://lists.windowmaker.info/dev/msg00161.html
See-also: http://lists.windowmaker.info/dev/msg00222.html
2009-08-25 01:10:00 +02:00
Martin Dietze
d6c134f420 Do not switch workspace to follow new windows in others
New windows should only be focused if they are in the current workspace.
Not performing this check can lead to WM switching workspaces if a
window is opened which:

   (a) is configured to appear in a particular workspace

and

   (b) sends a _NET_ACTIVE_WINDOW message to give focus to
       something, e.g. a sub window.

This behaviour was observed with firefox if a session with more
than one tab open was restored at startup because:

 "If a Client wants to activate another window, it MUST send a
   _NET_ACTIVE_WINDOW client message to the root window:"

Original-post: http://lists.windowmaker.info/dev/msg00442.html

[crmafra: Added comment]
2009-08-25 00:47:37 +02:00
Martin Dietze
442e3876c6 Add debianisation code and automatic build script 2009-08-24 11:55:20 +02:00
Martin Dietze
19f110d26e Add two menu files from the Debian package 2009-08-24 11:55:20 +02:00
Martin Dietze
3f6ae395ce Add GLOBAL_DEFAULTS_SUBDIR and fix a syntax error in wmlib/Makefile.am 2009-08-24 11:55:20 +02:00
Martin Dietze
ba027149bd Up the version number for the GIT version to 0.93.0-pre 2009-08-24 11:55:20 +02:00
Tamas TEVESZ
f893728d2d Fix format strings 2009-08-23 21:10:02 +02:00
Alexey Voinov
01dddf00c8 swpanel: Consider also the release of FOCUSPREV
The switch panel was not being destroyed with the realease of
FOCUSPREV, only with FOCUSNEXT. Fix this.

One can reproduce this bug as follows.

In the "Keyboard Shortcut Preferences" of WPrefs set "Focus next window"
to e.g. "Alt+Tab" and "Focus previous window" to "Ctrl+Tab".
The switchpanel is not destroyed if we release "Ctrl+Tab" but it
is upon releasing of "Alt+Tab".

Retrieved-from: http://git.altlinux.org/people/voins/packages/?p=WindowMaker.git;a=commit;h=51c95a55c9310f499b1fdeca138106ca7bf74423

[crmafra: Commit log]
2009-08-23 20:03:21 +02:00
Carlos R. Mafra
fe736e849c Remove LITE config option
Why?

     1. The reason for its existence is to "Disable some stuff that are
        duplicated in kde", and I don't think I will ever need that.
        Furthermore, even the description in the configure script reads
        "disable some stuff (dont use it)".

     2. It makes the code uglier at some places, e.g.,

         #ifdef LITE
                {
         #if 0
                }
         #endif
         #else

                if (!wRootMenuPerformShortcut(event)) {
         #endif

        which by the way is the ugliness which motivated this patch.

     3. Does not even compile anymore. It fails with

          CC dockedapp.o
          CC event.o
       event.c: In function 'executeButtonAction:
       event.c:711: error: WScreen has no member named root_menu
       event.c:712: error: WScreen has no member named root_menu
       event.c:713: error: WScreen has no member named root_menu
       event.c:715: error: WScreen has no member named root_menu
       event.c:720: error: WScreen has no member named switch_menu
       event.c:721: error: WScreen has no member named switch_menu
       event.c:722: error: WScreen has no member named switch_menu
       event.c:724: error: WScreen has no member named switch_menu
       make[2]: *** [event.o] Error 1
       make[1]: *** [all] Error 2
       make: *** [all-recursive] Error 1

       But instead of fixing this (it would be trivial), let's get
       rid of the whole ugliness altogether.
2009-08-23 18:45:30 +02:00
Carlos R. Mafra
874b0fadf5 Add spaces to gcc 'case' range extension
According to the gcc manual, that is safer.
2009-08-23 17:28:04 +02:00
Carlos R. Mafra
31f16389f6 Fix function prototype declaration
It is safer if the functions are declared with proper
prototype specifications.

This patch addresses some of the warnings with -Wstrict-prototype,
like this:

event.c:105: warning: function declaration isn't a prototype
2009-08-23 15:15:29 +02:00
Pedro Martelletto
2706f7217c WPrefs: Fix crash due to wtokenfree() memory leak fix
After the fix to avoid a memory leak in wtokenfree(), WPrefs crashes
when opening the 'Applications Menu Definition' dialogue.

The problem is that WPrefs code relied on the fact that the first token
in the array would not be free'd by wtokenfree(), a misbehaviour which
is correctly addressed with this patch.

Retrieved-from: http://www.mail-archive.com/ports@openbsd.org/msg12731.html

[crmafra: small changes in the commit log from the webpage]
2009-08-22 20:51:47 +02:00
Tobias Stoeckmann
e522ca734d WINGs: Fix memory leak in wtokenfree()
wtokenfree() does not free the first entry of an array.
If count is 1 then

   while (--count)

will be

   while (0)

and the inner body of that while-loop will not be entered.
Therefore a memory leak happens every time wtokenfree() is called.

Retrieved-from: http://paldium.homeunix.org/tobias/wmaker/patches/

[crmafra: This patch, altough correct, breaks WPrefs.app, which will be
fixed by the next patch. ]
2009-08-22 20:40:27 +02:00
Nicolas Bonifas
3a0eb643d9 swpanel: Start with the first window when all are minimized
When all windows are minimized, the switch panel cursor is
initially on the second window in the list. With this patch
it will be on the first window.
2009-08-22 13:03:56 +02:00
Carlos R. Mafra
f79379c090 swpanel: Fix stacking issue with swpanel escape handling
Daniel Déchelotte reported one problem with the escape handling in
the switchpanel:

   "Start with two windows: a fullscreen one, and a smaller window
    that appears above the fullscreen one. With the mouse, focus the
    bigger window. Start alt-tabbing, then press Escape. The bigger
    window will then be focused (good) *and raised* (small problem)."

Fix this by adding a test for the escape key before calling
raiseWindow().
2009-08-22 03:08:05 +02:00
Carlos R. Mafra
001bc28037 swpanel: Factor out if (swpanel) test
We can remove redundand tests in each "case:" inside the
switch if we do it in the beginning.
2009-08-22 03:08:05 +02:00
Carlos R. Mafra
203eba8937 swpanel: Clean up "case ButtonRelease"
Get rid of 2 tabs indentation by removing a
not-strictly-necessary temporary variable.
2009-08-22 03:08:05 +02:00
Carlos R. Mafra
d27e43e6b5 swpanel: Clean up StartWindozeCycle() a bit more
We can put the test for 'newFocused' inside change_focus_and_raise()
to clean up the code a little bit.
2009-08-22 03:07:34 +02:00
Tobias Stoeckmann
1db15a3543 Fix multiple errors in findfile.c
Problems:

1.

  During expansion of path, the resulting path can overflow the supplied
  area of PATH_MAX+2 (buffer as well as buffer2). A tampered environment
  variable can be used to modify program flow.

Proof:
      [note: wmaker has been compiled with propolice]
      $ export A="[tested with 4096x A]"
      $ GNUSTEP_USER_ROOT="\$A\$A/\$A/\$A/" wmaker --for-real
      *** stack smashing detected ***: wmaker terminated
      Aborted

2.

  Way too many functions handle a return value of NULL for wexpandpath
  improperly, resulting in segfaults (and maybe other problems). To
  prove the existance of these issues:

Proof:
      $ GNUSTEP_USER_ROOT=~nouser wmaker --for-real
      wmaker error: could not get password entry for user nouser: Success
      Segmentation fault

Solution:

     hard exit with error message about what is going on.

3.

  The improper parsing of environment variables can lead to expansion
  of path names that were not intended to be expanded.

     (a) If a string like "$(var" is found, Window Maker tries to expand "var"
     	 (environment variable) although the syntax is wrong.

Proof:

      $ export PROOF=foo
      $ GNUSTEP_USER_ROOT=/\$\(PROOF wmaker --for-real
      wmaker warning: could not find user GNUstep directory (/foo/Defaults/WindowMaker).

      (b) If the variable out of a) cannot be resolved, a closing bracket will be
      	  added.

Proof:

      $ unset PROOF
      $ GNUSTEP_USER_ROOT=/\$\(PROOF wmaker --for-real
      ./wmaker warning: could not find user GNUstep directory ($(PROOF)/Defaults/WindowMaker).

Author: Tobias Stoeckmann
Retrieved-from: http://paldium.homeunix.org/tobias/wmaker/
Submitted-by: Gilbert Ashley <amigo@ibiblio.org>
2009-08-21 12:13:12 +02:00
Daniel Déchelotte
c970c94f82 Remove useless tests
There is no point in checking

      if (dock_state)

if the function would have already returned with
the check if(!dock_state) right above.

Retrived from http://yo.dan.free.fr/wmaker.phtml.en

[crmafra: wrote the commit message]
2009-08-21 04:57:08 +02:00
Carlos R. Mafra
570df8316d Fix use of uninitialized variable
Gcc-4.3.2 warns:

texture.c: In function 'wTextureMakeFunction':
texture.c:393: warning: 'fallbackColor.pixel' is used uninitialized in this function

Based on a patch by Vladimir Nadvornik.
2009-08-21 02:20:27 +02:00
Vladimir Nadvornik
21b5df494b Less strict font requirements
Fixes bug:

  https://bugzilla.novell.com/show_bug.cgi?id=154758
2009-08-21 02:10:50 +02:00
Vladimir Nadvornik
e113ec10c9 Fix findBestIcon()
This patch fixes the issue described here:

https://bugzilla.novell.com/show_bug.cgi?id=371974
2009-08-21 01:54:26 +02:00
Daniel Déchelotte
95a576bd62 Fix "smart" placement bug when there are shaded windows in other workspaces
Bug overview:
    New windows are sometimes mis-placed when the "smart" algorithm is used.

How to reproduce it:
    be sure (with WPrefs.app, for instance) to use the so-called "smart"
    window placement algorithm. In an empty workspace, open a first window
    (for instance, an xterm). The window should appear at the upper left corner.
    Shade it (hide its contents below its title bar by double-clicking on it)
    and select another empty workspace. Open another window. Instead of placing
    it at the exact same place as the first window, wmaker places the new
    window a little bit lower, or frankly to the right.

Explanation and correction:
    when placing a new window, wmaker avoided all shaded windows, instead of
    only avoiding the shaded windows on the active workspace.
2009-08-20 23:59:41 +02:00
Daniel Déchelotte
3f7110b120 Fix focus issues with the switch panel and auto-focus
1. Setup two windows in a workspace, one at the center and the
   other at a corner. Move the mouse to the center of the screen, so
   that the focus goes to the center window. Now, with the help of the
   keyboard (with Alt-tab, typically), try and switch the focus to the
   other window. In doing so, the switch panel shows up, gives the
   focus to the other window and then disappears. However, its
   disappearance make it seem to wmaker that the mouse has just
   entered the center window, so wmaker gives the focus to that
   window again.

   2. It is a lit bit more involved. "Raise window when switching
   focus with keyboard" needs to be set. In a given workspace, maximize
   a first window A, then setup "above" window A two windows B and C
   (one in the upper left corner and the other one in the lower right
   corner, for example). Move the mouse so as to give the focus to
   window B. Press the Alt key, hit the key tab once (window A moves
   up to the "top"), then another time (window C is then selected).
   Eventually relase the Alt key: window B is given the focus again.

Correction: it is a matter of ignoring some (EnterNotify) events
when the switch panel is active or has just been used.
2009-08-20 22:07:10 +02:00
Carlos R. Mafra
f9bb2a428a Escape key handling in switchpanel
Pressing the escape key (ESC) while the switchpanel is active
cancels it and gives the focus back to the window which had it
before the switchpanel was invoked.

If all windows are minimized before the switchpanel was called,
they will continue to be if ESC is pressed.

In other words, pressing ESC is like going to the parallel universe
where you never entered the switchpanel in the first place.

Based on a patch by Nicolas Bonifas from 17.08.2009.
2009-08-20 16:00:26 +02:00
Carlos R. Mafra
333dbf5418 Use helper function in StartWindozeCycle()
This way we avoid code duplication in 6 places.

This changes the previous behavior of the first
instance because the helper function has an extra

       CommitStacking(scr);

 compared to the original code. But it should not
 hurt to have it.
2009-08-20 15:46:45 +02:00
Carlos R. Mafra
a9238c99b9 Clean up coding style in StartWindozeCycle()
No functional changes were made apart from
setting the various KeyCode variables at the
same time as defining them.
2009-08-20 15:09:07 +02:00
Carlos R. Mafra
4a041b6f0a Clean up StartWindozeCycle()
We can get rid of one overall tab by moving the

   if(swpanel)

test -- which was done everytime in each individual case --
to the beginning, therefore encompassing all cases.
2009-08-20 04:07:15 +02:00
Carlos R. Mafra
688a56e8ab Change to the linux kernel coding style
for arq in `git ls-files *.c`; do
    echo $arq;
    indent -linux -l115 $arq;
    done

The different line break at 115 columns is because
I use a widescreen monitor :-)
2009-08-20 00:59:40 +02:00
Carlos R. Mafra
59fc927dc9 Make drawIconProc() static
It is used only inside src/dialog.c
2009-08-20 00:57:03 +02:00
Carlos R. Mafra
066af13b5c Clean up case switching in handleKeyPress()
GCC has an extension to deal with ranges within case statements.
Let's use it to make the code more readable and ~5% smaller,

[mafra@Pilar:wmaker.git]$ size src/event.o.*
   text    data     bss     dec     hex filename
  13087       0    1056   14143    373f src/event.o.new
  13711       0    1056   14767    39af src/event.o.old
2009-08-19 22:11:15 +02:00
Carlos R. Mafra
e2d8cbe238 Remove unsigned type from 'mask'
gcc-4.3.2 warns:

    defaults.c: In function 'getModMask':
    defaults.c:2586: warning: comparison of unsigned expression < 0 is always false

    The line in question is

        if (mask < 0)

    and 'mask' is the return of wXModifierFromKey() which is an 'int' and can
    indeed return a negative value (see src/xmodifier.c), so let 'mask' be
    an 'int' too.
2009-08-18 16:28:43 +02:00
Carlos R. Mafra
cb31fd374c Sanitize calling sites of wDefaultsCheckDomains()
There is no point in having parameter in wDefaultsCheckDomains() and
not using it, so let's simply remove the parameter altogether and
avoid silly-looking things like

    wDefaultsCheckDomains("bla");
2009-08-18 16:20:18 +02:00
Carlos R. Mafra
f4fd88b8a9 Make loop variable be unsigned int
gcc was complaining in a few places things like:

defaults.c:890: warning: comparison between signed and unsigned

so let's just make the loop counting variables be unsigned, as
the never get negative anyway.

I also spotted other two variables which can be unsigned too.
2009-08-18 16:19:48 +02:00
Carlos R. Mafra
f36ab39680 Fix variable shadowing
gcc-4.3.2 warns:
defaults.c:3136: warning: declaration of 'index' shadows a global declaration
/usr/include/string.h:309: warning: shadowed declaration is here

and in a few other places too. Fix this by renaming 'index' to 'widx'.
2009-08-18 16:17:28 +02:00
Carlos R. Mafra
0a32ecf1fe WMCreateFont: Add missing wfree()'s
I removed (forgot) them when in commit ee28b0257a ("Avoid returning
font=NULL in WMCreateFont()"). Add them back.
2009-08-18 04:33:39 +02:00
Carlos R. Mafra
9baff1363c handleKeyPress: Fix shadowing of global 'index' variable
GCC warns:

event.c: In function 'handleDestroyNotify':
event.c:676: warning: declaration of 'index' shadows a global declaration
/usr/include/string.h:309: warning: shadowed declaration is here
event.c: In function 'handleKeyPress':
event.c:1435: warning: declaration of 'index' shadows a global declaration
/usr/include/string.h:309: warning: shadowed declaration is here

So let's rename "index" to "widx".

Note that there is a more serious shadowing in this same function,

event.c:1686: warning: declaration of 'wwin' shadows a previous local

but this is more complicated to solve.
2009-08-18 00:56:09 +02:00
Carlos R. Mafra
f18567db9a inotifyHandleEvents: Reduce buffer size to avoid huge memory consumption
inotifyHandleEvents() was allocating a buffer of size

 (sizeof(struct inotify_event) + FILENAME_MAX)*1024

where FILENAME_MAX is #defined to be 4096 in stdio_lim.h, therefore
it was more than 4 MB!

Reduce it by using 16 instead of FILENAME_MAX and 512 instead of 1024.

Now valgrind does not complain about things like

Invalid write of size 8
 at 0x42002F: inotifyHandleEvents (event.c:323)
 by 0x7FF00020F: ???
 Address 0x7febfc148 is on thread 1's stack

I also made some small coding style changes.
2009-08-18 00:39:45 +02:00
Carlos R. Mafra
be0d694dc2 real_main: Use setenv() instead of putenv() in remaining places
It simplifies the code a bit.
2009-08-17 22:42:38 +02:00
Carlos R. Mafra
6310e40d47 real_main: Use setenv() instead of putenv()
When investigating possible memory leaks with 'valgrind' I noticed
this leak report:

 602 bytes in 13 blocks are definitely lost in loss record 77 of 128
    at 0x4C2362E: malloc (vg_replace_malloc.c:207)
    by 0x4576ED: wmalloc (memory.c:88)
    by 0x45B4F7: wstrconcat (string.c:214)
    by 0x426FC2: main (main.c:608)

which happens here,

    str = wstrconcat("WMAKER_BIN_NAME=", argv[0]);
    putenv(str);

There is a comment further below (in another context)

/* return of wstrconcat should not be free-ed! read putenv man page */

so this leak report is probably a false positive anyway. However,
https://www.securecoding.cert.org/confluence/display/seccode/POS34-C.+Do+not+call+putenv%28%29+with+a+pointer+to+an+automatic+variable+as+the+argument
has some nice discussion about putenv() and after reading it I decided to
use setenv() instead, making 'valgrind' happy along the way. It also
makes the code a bit simpler, avoiding a call to wstrconcat().

I also changed the name of another variable called 'str' to 'pos', just
in case.
2009-08-17 22:19:58 +02:00
Carlos R. Mafra
7a84127a27 Fix improper use of function sentinel
This patch addresses this warning of gcc:

wfontpanel.c: In function 'listFamilies':
wfontpanel.c:588: warning: missing sentinel in function call

Fix it by using the 'NULL' pointer instead of 0 (zero) as the
sentinel.

For more information, see
http://www.linuxonly.nl/docs/2/2_GCC_4_warnings_about_sentinels.html
in particular,

   "On most systems, there is no difference between 0 and (char *)0.
    On 64 bit systems, however, the integer 0 is 32 bits and the
    pointer 0 is 64 bits. The compiler does not know whether it is
    an integer or a pointer, and defaults for the integer. This will
    not clear the upper 32 bits and the function will not stop
    scanning its parameters."

Note that here in my 64-bit Mandriva I don't need to cast (char *)NULL.
2009-08-17 18:13:58 +02:00
Carlos R. Mafra
288853e44f WPrefs: Remove unused function updateThemeList() 2009-08-17 17:44:00 +02:00
Carlos R. Mafra
09a8911b6f Remove unused variables
GCC -Wall complains about them.
2009-08-17 17:35:48 +02:00
Carlos R. Mafra
ceeca912cd Make compilation even less verbose
Add "-s" flag to MAKEFLAGS if --disable-verbose-compile
is enabled.
2009-08-17 16:49:22 +02:00
Carlos R. Mafra
7a3b139dcb Remove prototype of unused function StartLogShell 2009-08-16 11:14:40 +02:00
Tamas TEVESZ
e2b6a85e80 Fix buffer overflow in SendHelperMessage()
The following fixes a buffer overflow in SendHelperMessage() which i
started seeing recently on x64.
2009-08-16 01:05:23 +02:00
John H. Robinson, IV
38074e7bd5 Remove unused StartLogShell function.
Based upon a patch by Tobias Stoeckmann

Small code size reduction,

   text    data     bss     dec     hex filename
 620412   19144    8544  648100   9e3a4 src/.libs/wmaker
 621347   19152    8544  649043   9e753 src/.libs/wmaker.old
2009-08-16 00:35:54 +02:00
Tobias Stoeckmann
f516213bf3 Check for argc==0 when calling wtokensplit()
The WINGs-function wtokensplit does not set argv to NULL if no string has been
split - instead argc is set to 0.

You can only observe this issue if you compile Window Maker without any
optimization:

compile Window Maker with CFLAGS=""
run Window Maker and save a session
change session-file and replace a 'command xyz' line with 'command " "'
restart Window Maker
watch "Fatal error"-message

Retrieved-from: http://paldium.homeunix.org/tobias/wmaker/
Submitted-by: Gilbert Ashley <amigo@ibiblio.org>
2009-08-16 00:16:58 +02:00
Iain Patterson
bbc52564d0 xinerama switchpanel corruption fix
This is a small patch to fix an issue with the switchpanel and a large number
of windows which happens only on a Xinerama setup.

When the number of open windows is so large that displaying all of them would
cause the switchpanel to be too wide for the screen, the panel is supposed to
shrink and scroll to accomodate them all.

In Window Maker 0.92.0 this works for single head displays but not for
Xinerama. The panel extends to the next head and gets garbled. This patch fixes
the issue by correctly constraining the panel to the head with the cursor.

Submitted-by: Gilbert Ashley <amigo@ibiblio.org>
2009-08-16 00:06:31 +02:00
David Benbennick
3e9aae7a91 Fix mixing pixels when maximizing borderless windows
A minor bug has been bothering me for a long time. When you maximize a
borderless window in Window Maker, the window ends up too narrow and too short
by two pixels.

Submitted-by: Gilbert Ashley  <amigo@ibiblio.org>
2009-08-15 23:59:45 +02:00
Samir SAADA
9fa4fbef91 Fix workspace limit segfault
wmaker keeps the names of all workspaces together in
the string 'buf' with fixed length of 1024, therefore
allowing buffer overflows if the number of workspaces
is big enough.

For the default names "Workspace X" (from 1 to 9)
and "Workspace XX" (from 10 to 99) etc, the approximate
number of workspaces necessary to make the buffer
overflow occur is 80, because

(11*9) + (71*12) + 80 = 1031

The fix is to set the size of 'buf' as
the maximum number of workspaces times their maximum
name length.

The problem was reported by John H. Robinson in the wmaker-dev
list ( http://lists.windowmaker.info/dev/msg00214.html ):

 "http://www.youtube.com/watch?v=fkNJZvKwmhE

  Michael reported a problem with Window Maker where it crashes with a
  SIGSGV when trying to create an 82nd workspace.

  /usr/local/WindowMaker-0.92.1pre/bin/wmaker warning: Window Maker exited
  due to a crash (signal 11) and will be restarted.

  I was able to reproduce it by making 81 workspaces, then creating an 82nd."

[ crmafra: Wrote the changelog ]
2009-08-09 02:34:21 +02:00
Tamas TEVESZ
f21ce5768b avoid integer overflow
Actually, the whole thing is so chock full of signed vs unsigned
mixups and the assumption of all the world is 32-bit that i'm not sure
anymore that correcting them one by one is a good idea.

what would probably work best is that if someone deeply familiar with
the code (*looks in dan's general direction*) cleaned the data types
up, then legions of grunts like myself could start cleaning the rest
with relative confidence...
2009-08-09 01:53:12 +02:00
Tamas TEVESZ
b487d56452 Sync comment with reality
Or rather, remove possibility for comment to diverge from reality
2009-08-09 01:51:25 +02:00
Samir SAADA
d316260395 Fix menu positioning bug
Here I tried to prevent the menu of windows to be displayed in the
other side of the screen if the window is half present in the screen
horizontally (ie x < 0)

a worse problem with menu is that it disappears when
the window is half present in the window vertically
ie y < 0, that makes it not usable.
2009-08-09 00:32:32 +02:00
Carlos R. Mafra
6b08fc9e78 Trivial cleanup 2009-08-08 23:38:26 +02:00
Carlos R. Mafra
0c469de04f Fix gcc warnings
This patch fixes the following warnings (with gcc 4.2.3)

    defaults.c:980: warning: unused variable 'replace'
    main.c:504: warning: 'watchPath' may be used uninitialized in this function
    main.c:504: note: 'watchPath' was declared here
    startup.c:616: warning: implicit declaration of function 'XrmUniqueQuark'
2008-11-10 01:42:50 +01:00
Carlos R. Mafra
d680e6e580 Compilation: Add a few spaces in the output
It is even better to have the messages displayed a few spaces
off from the left screen border.

The inspiration comes from the Git compilation output.
2008-11-10 00:14:07 +01:00
Carlos R. Mafra
3c323e1e9a Fix buffer overflows in shortcut and workspace name handling
The handling of user defined shortcuts was not checking the length
of the shortcut before copying it to a fixed-length temporary buffer,

char buf[128];

     strcpy(buf, shortcutDefinition);

and strcpy() is well known for not checking if overflows will occur.

In particular, wmaker was crashing here if a big 'shortcut' was defined
either through WPrefs or by directly editing the configuration files.

This is now avoided by using strncpy() instead.

And this patch also fixes a similar buffer overflow for big workspace
names too.

Furthermore, use MAX_SHORTCUT_LENGTH instead of raw number and define
it to be 32 instead of 128.
2008-11-09 20:18:05 +01:00
Carlos R. Mafra
06f59b9928 wmaker: Fix compiler warnings about pointer <--> integer conversion
There may be issues with running applications in 64-bit mode when
they were written with tacit assumptions about 32-bit platforms.
For example,

    * Assuming that a pointer can be cast back and forth to an integer

The reason is that the size of the integer and pointer may be different.
See the description of "[PATCH] Warn when casting a pointer (constant)
to an integer of different size." in the gcc mailing list

http://gcc.gnu.org/ml/gcc-patches/2005-12/msg01881.html

where it was also suggested the use of casts to uintptr_t. This is
what this patch does.

As a result the following warnings are fixed, leaving us with an
almost warning-free compilation in 64-bit platforms:

defaults.c:1446: warning: cast to pointer from integer of different size
defaults.c:1457: warning: cast to pointer from integer of different size
defaults.c:1471: warning: cast to pointer from integer of different size
defaults.c:1486: warning: cast to pointer from integer of different size
icon.c:67: warning: cast from pointer to integer of different size
menu.c:112: warning: cast from pointer to integer of different size
switchmenu.c:452: warning: cast from pointer to integer of different size
window.c:140: warning: cast from pointer to integer of different size
window.c:2217: warning: cast to pointer from integer of different size
workspace.c:135: warning: cast to pointer from integer of different size
workspace.c:214: warning: cast to pointer from integer of different size
workspace.c:634: warning: cast to pointer from integer of different size
workspace.c:1330: warning: cast to pointer from integer of different size
workspace.c:1514: warning: cast to pointer from integer of different size
wfilepanel.c:135: warning: cast from pointer to integer of different size
wfilepanel.c:171: warning: cast from pointer to integer of different size
wfontpanel.c:499: warning: cast to pointer from integer of different size
wfontpanel.c:500: warning: cast to pointer from integer of different size
wfontpanel.c:505: warning: cast to pointer from integer of different size
wfontpanel.c:506: warning: cast to pointer from integer of different size
wfontpanel.c:776: warning: cast from pointer to integer of different size
wfontpanel.c:777: warning: cast from pointer to integer of different size
wfontpanel.c:877: warning: cast from pointer to integer of different size
wfontpanel.c:878: warning: cast from pointer to integer of different size
wpanel.c:363: warning: cast from pointer to integer of different size
fontl.c:42: warning: cast from pointer to integer of different size
fontl.c:42: warning: cast from pointer to integer of different size
fontl.c:42: warning: cast from pointer to integer of different size
fontl.c:90: warning: cast to pointer from integer of different size
puzzle.c:138: warning: cast from pointer to integer of different size
puzzle.c:225: warning: cast to pointer from integer of different size
wtableview.c:1031: warning: cast to pointer from integer of different size
wtableview.c:1067: warning: cast to pointer from integer of different size
wtableview.c:1069: warning: cast to pointer from integer of different size
wtableview.c:1074: warning: cast to pointer from integer of different size
wtabledelegates.c:234: warning: cast from pointer to integer of different size
wtabledelegates.c:250: warning: cast from pointer to integer of different size
wtabledelegates.c:265: warning: cast from pointer to integer of different size
wtabledelegates.c:287: warning: cast to pointer from integer of different size
wtabledelegates.c:351: warning: cast from pointer to integer of different size
wtabledelegates.c:372: warning: cast from pointer to integer of different size
wtabledelegates.c:393: warning: cast from pointer to integer of different size
wtabledelegates.c:410: warning: cast to pointer from integer of different size
test.c:44: warning: cast from pointer to integer of different size
test.c:47: warning: cast to pointer from integer of different size
test.c:55: warning: cast from pointer to integer of different size
test.c:58: warning: cast from pointer to integer of different size
2008-11-06 09:07:50 +01:00
Carlos R. Mafra
4339e446e4 automake: Fix warnings about underquoted calls to AC_DEFUN
This patch fixes warnings from automake versions >=1.8 about
underquoted calls to AC_DEFUN.

I followed the recommended modifications of
http://sources.redhat.com/automake/automake.html#Extending-aclocal
2008-11-05 18:17:55 +01:00
Carlos R. Mafra
72689513a3 Makefile: Beautify compilation messages
This patch adds the --disable-verbose-compile switch to the
configure script.

When this option is used it reduces the verbosity of compilation
messages to the essential. However compiler warnings are not affected
and thus gain visibility by not standing in the middle of a storm
of other messages.

In summary, the compilation messages are reduced to a stream of

CC array.o
CC bagtree.o
CC configuration.o
CC connection.o
CC data.o
[...]

instead of a mind-boggling flux of

gcc -DHAVE_CONFIG_H -I. -I../src -I../WINGs/WINGs -I../wrlib -I../src
-I/usr/include/freetype2   -I/usr/local/include
-DLOCALEDIR=\"/usr/local/lib/loca\"/usr/local/share/WINGs\"
-DDEBUG  -fno-strict-aliasing -g -O2 -c array.c
gcc -DHAVE_CONFIG_H -I. -I../src -I../WINGs/WINGs
-I../wrlib -I../src -I/usr/include/freetype2   -I/usr/local/include
-DLOCALEDIR=\"/usr/local/lib/loca\"/usr/local/share/WINGs\"
-DDEBUG  -fno-strict-aliasing -g -O2 -c bagtree.c
[...]
2008-11-05 18:03:07 +01:00
Rodney Padgett
56d8568787 Use inotify to check for changes to the defaults database. Workaround for
event handler timer.

After upgrading my kernel recently I noticed that dnotify has been
depreciated, so I decided to try and implement the new inotify code in
Window Maker instead.

During testing, I also found that one of the timers which was removed
(the one causing the most wake-ups), calling delayedAction, was
responsible for handling signals. Basically with this timer removed,
signals were only handled after an X event occurs.

After looking at the delayedAction function, I couldn't see the purpose of it.
It certainly wouldn't cause any delay as it was called by the timer every
500ms, so there is no time correlation with when a signal was received.
Also, it appeared to count the signals and call DispatchEvent for each
one, but it appears DispatchEvent would just handle the most recent signal
and take action on that. The signals handled by delayedAction are the
various exit and reset signals, so only one need to be handled. I
therefore have commented out delayedAction (it wasn't called by any other
procedure) and added a call to DispatchEvent imediately after the signal
is registered, in handleExitSig.

I'm not sure what problems this may cause with dead children - these are
only cleaned up after an Xevent now that the timer is removed- but I
haven't observed any problems since a few months ago.
2008-08-09 13:14:39 -05:00
Pedro Gimeno
c91bb1ba13 Fix periodic focus bug
Pedro Gimeno explains:

"As you most likely already know, every X Window event comes with a
timestamp. You can see it using e.g. xev.

I don't know if this is Debian-specific and I'm no X Window expert, but
the fact is that in my machine this timestamp, according to my
/usr/include/X11/X.h, is a 32-bit unsigned integer and it holds the
event time in milliseconds according to my tests.

This timestamp appears to be in milliseconds from the start of the Unix
epoch, modulo 2^32. The problem is that 32 bits are too little for this
purpose: 2^32 milliseconds are exactly 49 days, 17 hours, 2 minutes and
47.296 seconds.

Now, the WindowMaker code rejects any focus event whose timestamp is
less than the last one seen, using code similar to this:

 if (timestamp < LastTimeStamp) return;
 LastTimeStamp = timestamp;

This is a disaster when timestamp wraps around because of the 32-bit
limit. Say LastTimeStamp equals 2^32-1 and a focus event comes two
milliseconds after. Its timestamp will equal 1 because of the
wraparound. Obviously, 1 < 2^32-1 so the event will be rejected even if
it comes from the future (relative to LastTimeStamp) and not from the
past. Focus events are no longer accepted because nothing can be greater
than 2^32-1 (unless you click on that exact millisecond, 49 days after).

If you look in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=102314
you'll see two people confirming the periodicity and predictability of
the bug. Arnaud Giersch was who noted that the period was 2^32
milliseconds (and not 2^31 as I thought it could be because of a signed
int involved) and who noted the coincidence with the Unix epoch.

My fix works by subtracting one timestamp from the other (an operation
which is done modulo 2^32) and rejecting the focus event only if the new
timestamp is within 1 minute (60000 milliseconds) in the past. Given the
periodicity of the timestamp, actually after 49.7 days there will be
another minute in the future during which focus events will not be
accepted; again after 99.4 days, etc., but thanks to the subtraction,
they will now be relative to the *last* focus change and not to the Unix
epoch.

The patch could be simplified to get rid of the compareTimes function.
It's written like that because it comes from the previous patch (which
you can see in the same bug report).

So the date comparison line could end up looking like this:

   if (scr->flags.ignore_focus_events || LastFocusChange - timestamp <
60000)

so you can get rid of the compareTimes function. However please respect
the other change of 'int' to 'Time'.

As for why you aren't experiencing this problem, perhaps the event
timestamp does not come from the Unix epoch in your X Window system, but
rather starts counting when you start it or your computer, I don't know.
Or maybe your X Window server's timestamps are 64 bits wide instead of
32 bits, which I don't think because I doubt the X11 protocol specifies
a 64-bit record for the transmission of the timestamp. In either case,
the output of xev will probably help understanding the cause.

Or maybe even it's a click-to-focus only bug and you're not using that
mode. I haven't checked who calls wSetFocusTo.

Note that I can reproduce it just by manipulating the system clock,
which seems to be tied to the event timestamps."

For more information see:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=102314

Reported-by: Joey Hess <joeyh@debian.org>
Signed-off-by: Pedro Gimeno <parigalo@formauri.es>
2008-06-26 15:03:38 -03:00
Paulo Cesar Pereira de Andrade
e4800e84d0 Workaround for Composite problems when default depth is not 24.
This is really a workaround patch, the proper fix would be to have
WindowMaker know about Composite, and take advantage of it's features.
2008-05-03 20:02:31 -03:00
Carlos R. Mafra
ee28b0257a WINGs/wfont.c: Avoid returning font=NULL in WMCreateFont()
WPrefs tries to use the fonts listed in the WMCreateFont() call (from WPrefs.c),

font = WMCreateFont(scr, "Lucida Sans,URW Gothic L,Times New Roman,serif"
                         ":bold:pixelsize=26:antialias=true");

and 'font' is later used without accounting the possibility of it being NULL in

WMSetLabelFont(WPrefs.nameL, font);
WMReleaseFont(font);

In particular, WMReleaseFont(font) will kill WPrefs ungracefully with the
following message if font=NULL

WPrefs: wfont.c:193: WMReleaseFont: Assertion `font!=((void *)0)' failed.
Aborted

That happens because the return value of WMCreateFont() can be NULL, so this
patch makes WMCreateFont() never return NULL. If the font creation fails for
some reason (see below), we try to use the emergency DEFAULT_FONT and print
debugging information telling what's going on. If the use of DEFAULT_FONT
also fails, then we terminate WPrefs with exit(1) and let the user know
why exactly if failed.

This bug happened because the font "Lucida Sans" (the first possibility
in the initial call to WMCreateFont()) "exists" in my system as a stale
symbolic link to a location which no longer exists after an upgrade from
java from 1.5.0.14 to 1.5.0.15

    /etc/alternatives/LucidaSansDemiBold.ttf ->
    /usr/lib/jvm/java-1.5.0-sun-1.5.0.14/jre/lib/fonts/LucidaSansDemiBold.ttf

So the call to XftFontOpenName(display, scrPtr->screen, fname) with
"Lucida Sans" being the first possibility for Xft to try out ended up in 'font'
being NULL because, as far as the Xft library was concerned, "Lucida Sans"
produced a positive match (due to it existing as a symbolic link) but in the end
a NULL result was produced due to the missing symbolic link destination. This later
exposed the bug of WMCreateFont() returning font=NULL and WPrefs.c not checking
whether font=NULL before using it. Bang!

If "Lucida Sans" was the _second_ entry to try and the first one had suceeded,
this bug would not have surfaced.

This solves https://qa.mandriva.com/show_bug.cgi?id=39677

Signed-off-by: Carlos R. Mafra <crmafra@ift.unesp.br>
2008-05-02 20:23:00 -03:00
Carlos R. Mafra
722c82c8ab wmaker: Reduce wakeups to zero
This patch removes wmaker from PowerTop's shame list, where
it appeared with ~3-4 wakeups/second.

It adds the linux kernel's dnotify mechanism (adapted from
the example in Documentation/dnotify.txt in the kernel source),
to detect when a configuration file in ~/GNUStep/Defaults has
changed to load it again on-the-fly. For me it usually means that
modifications to ~/GNUStep/Defaults/WMRootMenu via the 'genmenu'
script are automatically detected and loaded.

The use of dnotify makes the ancient behaviour of polling unecessary
and cuts down the wakeups count.

Other 'apparently' useless timers are also deleted and it's been almost
one year now that I use this patched exclusively without problems, so
I am pretty sure that it doesn't hurt to remove them.

The end result of all this is that wmaker generates 0 (zero) wakeups
when idle in a Linux system.

Signed-off-by: Carlos R. Mafra <crmafra@ift.unesp.br>
2008-05-02 20:01:50 -03:00
Carlos R. Mafra
2061c30758 Add .gitignore to git repository 2008-05-02 01:01:24 -03:00
dan
4e8423d18a Fixed segfault when unhiding an application in certain conditions (seen
with KDE applications with transient windows)
2006-04-27 19:16:58 +00:00
dan
a5aa8573c9 updated todo with ideas for post 1.0 2006-04-27 02:57:57 +00:00
dan
ecd5217633 Enhanced the cursor positioning/selecting text using the mouse in a textfield.
This also fixed an endless loop that could be entered by the previous code
in certain situations, after the patch to fix navigation/selection in a
textfiled with UTF8 chars was applied.
2006-04-27 02:48:18 +00:00
dan
577b3ee949 Removed WINGs' dependency on rgb.txt (from X11).
This fixes issues with locating the file which is being stored on different
locations depending on the X server release/version
2006-04-26 20:28:24 +00:00
dan
bc4de88d8b Applied patches from Stanislav Maslovski <stanislav.maslovski@gmail.com> to
fix the 2 problems mentioend below:

- Fixed buggy handling of UTF8 characters in textfields in WINGs.
- Fixed segfault in WPrefs when some font description is missing from the
  configuration file.
2006-04-25 23:52:43 +00:00
dan
4688c9839b more fixes for missing linking flags in some cases 2006-04-25 20:01:51 +00:00
dan
90c0e656f1 replaced windowmaker.org with windowmaker.info everywhere 2006-04-25 19:35:14 +00:00
dan
42191340fd - Improved Info panel display.
- Fixed missing library paths when linking some binaries on certain
  platforms with a recent pkg-config
2006-04-25 18:59:24 +00:00
dan
d873d09fa5 yet another cvs commit notification test 2006-04-25 18:50:42 +00:00
dan
2e114bcc1e another cvs commit notification test 2006-04-25 18:46:14 +00:00
dan
1a73c71d56 cvs commit notification test 2006-04-25 18:23:19 +00:00
dan
240586edc5 cvs commit notification test 2006-04-25 17:58:33 +00:00
dan
eae4c45cf5 test cvs commit notifications 2006-03-28 19:50:04 +00:00
dan
c2c58734b8 test cvs commit notifications 2006-01-23 06:47:27 +00:00
dan
085e9d6254 - updated the XDND code in WINGs to work with GDK based applications.
WINGs based applications should now work with both KDE and GNOME
  applications (Sylvain Reynal <sreynal@nerim.net>)
- better check for the XDND protocol version when interoperating with other
  applications. As it seems xdnd version 3 (which WINGs supports) and newer
  are not backward compatible with xdnd version 1 and 2. This is why WINGs
  applications cannot interoperate with GNUstep applications (which uses
  xdnd version 2). Xdnd version 4 and 5 are backwards compatible with
  version 3 though. (Sylvain Reynal <sreynal@nerim.net>)
2006-01-22 20:33:19 +00:00
dan
f683b99405 updated estonian translation 2006-01-22 19:20:57 +00:00
dan
bacf8229b0 - release colors to avoid issues with the reference count overflowing a
small integer and causing unexpected color releases that can crash
  Window Maker (Martin Frydl <martin.frydl@systinet.com>)
- fixed a small memory leak in WINGs/wview.c caused by not releasing the
  background color of a view (Martin Frydl <martin.frydl@systinet.com>)
2006-01-22 18:19:09 +00:00
dan
fa7a5db4bd - fixed issue with invisible modal windows from Qt and Gtk applications
on 64bit platforms (Max Loparyev <max@city.veganet.ru>)
- fixed issue with icon colors on big endian platforms
  (Max Loparyev <max@city.veganet.ru>)

patch based on a previous patch by Vladimir Nadvornik <nadvornik@suse.cz>
2006-01-22 18:05:00 +00:00
dan
e534138417 test 2006-01-22 16:29:39 +00:00
dan
73d94f7bdc test 2006-01-22 16:03:31 +00:00
dan
054f954390 Applied some patches from Balaton Zoltan <balaton@eik.bme.hu>
- small fix for compilation in a different directory than the source
- fixed some warnings on 64bit platforms
2006-01-22 15:53:44 +00:00
dan
c0317ddae5 eliminated gcc-4 compilation warnings 2005-08-22 23:58:19 +00:00
dan
91f5abc955 - fixed gcc-4 compilation issues (Vladimir Nadvornik <nadvornik@suse.cz>)
- fixed amd64 compilation issues (Vladimir Nadvornik <nadvornik@suse.cz>)
2005-08-22 19:07:57 +00:00
dan
d26f18505a Fixed WPrefs.app to find its icons when not installed under GNUstep paths 2005-07-17 19:16:46 +00:00
dan
f3a960d9d8 updated german translations 2005-07-05 19:41:06 +00:00
dan
5f0a357b1f try to work around some user's IQ level 2005-07-05 08:44:00 +00:00
dan
20d5925d08 updated news file (part 2) 2005-07-03 18:08:46 +00:00
dan
b655a5fa5f updated news file 2005-07-03 18:01:46 +00:00
dan
ad0ae4887f - new algorithm for placing miniwindows after unhiding the application they
belong to, that works without auto-arranging the icons, while still avoiding
  multiple icons in the same spot by moving the miniwindows to a new slot if
  their old slot was occupied in the meantime.
- double clicking an appicon will also raise the miniwindows that belong to
  that application to the front (along with the normal windows).
2005-07-03 17:37:03 +00:00
dan
eca635cb5d - try fixed font for the technical drawing font if helvetica-12 is not
available to avoid crashing (Timo Juhani Lindfors <timo.lindfors@iki.fi>)
- german WINgs po file fix
2005-07-03 00:49:06 +00:00
dan
ad641c1992 Fixed issue with GNUstep applications losing focus when all their windows
are closed and there remains only their menu (Matt Rice <ratmice@yahoo.com>)
2005-07-02 19:23:41 +00:00
dan
69730273b1 - fixed bug with windows shrinking to very small sizes when Unmaximize was
used on them, after they were closed in a maximized state.
- fixed bug with restoring maximized state from NetWM atoms.
2005-05-15 16:45:02 +00:00
dan
f8b3a774be removed obsolete file 2005-05-09 00:27:33 +00:00
dan
2ea40ff2c5 Improved hide/unhide animation for applications with multiple windows
(only animate the active window hiding/unhiding, which makes Window Maker
faster and more responsive for such applications).
2005-05-08 00:51:56 +00:00
dan
33f7b63d11 - Fixed switch panel default value in defaults.c
- Fixed WPrefs path in the installed WMState (changed after recent WPrefs
  installation path changes)
- Fixed wmaker.inst (apparently some very noisy individual was unable to get
  right his 10 line patch to rename a path)
2005-04-08 11:51:06 +00:00
dan
880880162b Fixed bug that caused wmaker to crash when kplayer was switched back from
fullscreen mode to windowed mode.
2005-03-22 23:15:11 +00:00
dan
2f56373cc2 fixed issue with window being moved by 1 pixel up and left when the window
move was initiated by the client
2005-03-13 00:15:13 +00:00
dan
24519b6292 Added code to automatically convert Icon paths in WMWindowAttributes from
the old .AppInfo/... to the new Library/WindowMaker/... on the fly when
Window Maker starts.
This should allow a transparent transition without any need for users to do
anything.
2005-03-12 01:16:04 +00:00
dan
24e349afe7 Changes (especially the ones that may affect backward compatibility like
this path change) should go at the top of the NEWS file. None digs 1200
lines in the NEWS to read about some path change.
2005-03-11 23:05:43 +00:00
dan
5cfc565bbd Fixed paths, because mr Alex "Big Mouth" Perez was unable to get them right
in the first place in his trivial 10 line patch which only attempted to
replace one path with another.
He must be a big time user of his own patch, to not have noticed where the
paths pointed after his change.
2005-03-11 22:57:40 +00:00
dan
c8406b640c fixed cvs to compile again 2005-03-11 21:59:06 +00:00
kojima
53db5fc4a5 eq 2005-03-11 21:51:49 +00:00
dan
9bd4abb288 updated changelog 2005-03-11 21:40:51 +00:00
kojima
25c37b7637 applied patch to rename .AppInfo directory 2005-03-11 01:58:55 +00:00
kojima
3301b57d4b applied patch to use more gnustepish paths for some internal data files 2005-03-11 01:56:06 +00:00
dan
fe381eca77 - Fixed a few typos
- Added new italian translation (Marco Colombo <m.colombo@ed.ac.uk>)
2005-03-04 23:47:09 +00:00
dan
e3df52ca51 - Fixed compilation include path issue in wrlib/tests
- Removed unnecessary included headers (we don't use Xt)
2005-03-02 10:59:40 +00:00
dan
b2e87b76f9 Fixed crash when removing submenus in WPrefs' menu editor.
The submenu widget was free'd twice (once by destroyEditMenuItem() and a
second time by destroyEditMenu())
2005-02-20 04:36:57 +00:00
dan
5811c3d89c updated chinese translations 2005-01-21 04:05:48 +00:00
dan
140c48f1cc - better checks if the icon sizes are valid and there is enough data to
build the image from _NET_WM_ICON
- properly read the icon's pixels from _NET_WM_ICON, so they won't depend
  on machine endianess.
2005-01-08 22:53:39 +00:00
dan
b62e379299 fix for broken 'make install' introduced by previous commit 2005-01-06 15:55:46 +00:00
dan
71f1d7f101 fix to allow parallel builds on SMP systems using make -j 2005-01-06 15:48:42 +00:00
dan
bde572f673 fixed issue with path assignment 2004-11-14 00:11:20 +00:00
dan
684621ecd4 - fixed possible crash bug because a variable allocated on stack was
returned by a function
- removed obsolete macro
2004-11-11 14:14:52 +00:00
dan
9f89695c48 fixed bug with infinite loop in some circumstances in fitText() in WINGs 2004-11-06 20:20:05 +00:00
kojima
acc868d91d Removed --with-appsdir option and replaced it with --with-gnustepdir. Also,
default installation path (for non GNUstep users) is now $(prefix)/bin
2004-11-01 00:50:19 +00:00
dan
d7d3003e06 Detect if gcc is able to compile x86 asm and if it supports passing more
than 10 parameters in inline asm, else disable asm code.
This should enable it to work on any x86 platform (not just linux as before)
given that a recent enough gcc is available (no more need to guess by looking
at $host)

This should also fix the issues of compiling wrlib with gcc-2.95
2004-10-31 05:33:39 +00:00
dan
d292143af1 better text alignment 2004-10-31 01:47:43 +00:00
dan
3b46cf38cd fixed some compilation issues with gcc-2.9x 2004-10-31 00:57:25 +00:00
dan
e53ddd046f fixed another spot where compiling on solaris with openwin generated errors 2004-10-30 07:17:49 +00:00
dan
e9e1186f1d attempt to fix compilation on solaris with openwin 2004-10-30 06:39:27 +00:00
dan
558615a853 Changed the order some header files are loaded, as it seems to cause havoc
on some platforms
2004-10-30 05:46:37 +00:00
dan
ca61675597 added preliminary X Input Methods support 2004-10-28 04:17:18 +00:00
kojima
79864ba94c oops 2004-10-27 03:09:19 +00:00
kojima
d63a0b4859 added option to disable switchpanel
fixed some bugs
2004-10-27 02:54:32 +00:00
kojima
ac87ca5596 updated japanese translations (Takeo Hashimoto <HashimotoTakeo@mac.com>) 2004-10-26 20:03:06 +00:00
kojima
2ea68b8d2b changed alt-tab behaviour 2004-10-26 17:55:34 +00:00
dan
9234fb72b2 small fix for older fontconfig 2004-10-26 12:04:18 +00:00
kojima
92a84fe050 fixed crash bug with alt-tab + run-dialog (or internal windows in general) 2004-10-26 08:00:19 +00:00
kojima
c95b464680 increased libwraster version 2004-10-26 04:06:37 +00:00
kojima
59609280a2 0.91.0, disable unfinished vdesk 2004-10-26 03:56:04 +00:00
kojima
bb0c0dafae 0.90.1 2004-10-26 03:51:49 +00:00
kojima
5f3c54af13 fixed several po files 2004-10-26 03:44:08 +00:00
dan
d8862b0bdf fixed some bugs 2004-10-26 03:40:44 +00:00
kojima
bbd1e5dada fixed some bugs 2004-10-26 03:03:02 +00:00
kojima
087a16400f updated Makefiles files for po dirs 2004-10-26 01:11:15 +00:00
dan
b89f3e6df5 fixed animation speed issues with 2.6.x linux kernels 2004-10-25 22:15:57 +00:00
dan
4bc0bcfbc2 bad name choice... 2004-10-25 02:32:11 +00:00
dan
9ff9fcda48 icon with smoother corners 2004-10-25 02:27:52 +00:00
dan
ac6b5afd32 forgot this 2004-10-25 02:24:00 +00:00
dan
0d9b73cd74 - Fixed issues with crashing dialog not working
- Keep menu and title text at 12px since there is not constrained by width
- Removed some obsoleted options from wconfig.h
- Added a lighter image for the switch panel
2004-10-25 02:23:41 +00:00
kojima
12b8b8ba58 bug fix 2004-10-25 00:42:25 +00:00
kojima
f274afdd1d added themable, pixmap background switch panel 2004-10-25 00:07:51 +00:00
dan
e3c67d55de - replaced VirtualEdgeThickness option with EnableVirtualDesktop (boolean)
- some code cleanups in the virtual desktop.
2004-10-24 22:45:06 +00:00
dan
8bf6071c48 limit VirtualEdgeThickness values to the 0..10 range 2004-10-24 21:39:56 +00:00
dan
897e75d554 - Fix that enables that the virtual desktop code be disabled on the fly
when VirtualEdgeThickness is set to 0
- Fixed virtual edge to resize the edge on the fly if thickness changes
2004-10-24 20:24:23 +00:00
kojima
363b6032f5 added RCopyArea 2004-10-24 05:01:55 +00:00
dan
4638216209 missed this small update 2004-10-24 03:56:46 +00:00
dan
67a9ea74a3 - Fixed wrong call to XChangeProperty() when setting _NET_WM_ICON
- Changed the WPrefs icons with Largo's version
- Replaced Apps with Application in the docs
2004-10-24 03:20:29 +00:00
dan
f89cf06299 workaround for older fontconfig versions that do not define some constants 2004-10-23 21:59:28 +00:00
dan
cb7f34e237 Updated the single click patch to work with latest version.
(thanks to "Daniel Richard G." <skunk@iskunk.org>)
2004-10-23 21:40:59 +00:00
kojima
7401a1329f free 2004-10-23 21:09:56 +00:00
kojima
df1228f387 added some netwm support in WINGs 2004-10-23 21:07:13 +00:00
dan
9ead135f51 - Replaced Apps with Applications in WPrefs installation path
- Added missing switchpanel.h to compile file list
2004-10-23 03:53:25 +00:00
dan
193a63511d - Fixed all // comments
- Final cleanups
2004-10-23 03:30:03 +00:00
dan
b00076b32a updated TODO 2004-10-23 02:28:50 +00:00
dan
51c2edf868 Cleaned up some documentation 2004-10-23 02:26:13 +00:00
kojima
11b464a002 fix flicker 2004-10-23 01:56:24 +00:00
dan
c3cff33f99 - Sort font styles in this order: Normal, Normal Italic, Bold, Bold Italic
in the font selection panel
- Added code to get the closest match font between the font in the WindowMaker
  domain and the one in the font list of the font panel in WPrefs.app.
  This fixes issues with not selecting the correct font because the weight
  or slant names are slightly different.
2004-10-23 01:47:36 +00:00
kojima
663df7b4cb enhacnced mouse alt-tabbing 2004-10-23 01:02:16 +00:00
dan
b79524ce6f some more cleanup after removal 2004-10-23 00:25:52 +00:00
dan
65a113f9a3 some more removals 2004-10-23 00:09:41 +00:00
kojima
45c55a3e76 cleanup 2004-10-23 00:00:58 +00:00
dan
e93e16de06 removed some more obsoleted scripts and their manual pages 2004-10-23 00:00:02 +00:00
kojima
620a280d64 code review 2004-10-22 23:39:11 +00:00
dan
4bda625076 - Simplified font conversion a bit, as fontconfig does the job of getting
the closest match for us
- Removed wsetfont. No longer needed.
2004-10-22 23:19:37 +00:00
kojima
b034bb077f added mouse seelction of window to focus 2004-10-22 22:57:14 +00:00
dan
d08691d5a5 - Changed fallback font to 'sans serif:pixelsize=12'
- Fixed convertfonts to account for $LANG
- Fixed convertfonts logic a bit and no longer output slant and weight if
  they are the default ones (medium and roman)
- Applied Pascal's fix for GNUstep menus (modified to also include submenus)
  Still this is not the proper fix, as it can't differentiate between
  submenus and other windows at the floating window level. Correct fix needs
  some extra hints to be set by GNUstep on menus.
2004-10-22 22:27:11 +00:00
dan
08e811aae7 - If fonts are specified as xlfd, convert to fc names before creating them.
This was we internally only deal with fc names and properties. It will
  incur a small performance hit as the font needs to be parsed/unparsed,
  but this is only for backward-compatibility to support old xlfd names.
  People are encouraged to swtich to fontconfig names.
- WINGs no longer adds sans as a fallback for internal fonts. It is
  automatically done by fontconfig (if it can't find the requested font
  it will use the closest match which is the default font: sans-serif)
- Added code to honor the AntialiasesText global option
- Fixed style names for WMCopyFontWithStyle()
- Added fonts in style files where they were missing. Also changed some
  fonts to better defaults.
2004-10-22 00:21:51 +00:00
kojima
6de693a24d fixed flickering when switching windows 2004-10-21 00:59:52 +00:00
kojima
3a7749b0fc allow omnipresent iconized windows to be focused on empty workspaces 2004-10-20 06:11:30 +00:00
dan
f555ccb9b9 fixed font panel in wprefs to have the same height for all WMLists 2004-10-20 06:05:20 +00:00
kojima
f6682a9ade fixed bugs, re-enabled circulate raise 2004-10-20 03:31:14 +00:00
dan
1166a58ec7 Fixed the layout (WMLists to have the same height for all columns) 2004-10-19 04:28:26 +00:00
dan
59d2a5cbe5 - Use Applications instead of Apps for the application's path 2004-10-19 03:50:41 +00:00
kojima
85f72d6576 change layout 2004-10-19 03:29:52 +00:00
dan
435aee107e - Added framing to the font panel icon (to be consistent with the others)
- Bigger title and a bigger spacing between WPrefs' title and version
2004-10-19 03:24:07 +00:00
kojima
6cd91272a6 fixed a bug with workspace switching 2004-10-19 02:37:58 +00:00
kojima
7908c9a66b more bug fixes.. 2004-10-19 01:53:11 +00:00
kojima
f6fb9fbb3e include minimized windows in switch panel 2004-10-19 01:29:34 +00:00
dan
9de3560d9f removed some debugging print from the code 2004-10-18 14:45:59 +00:00
kojima
88e207f9e0 converted fonts 2004-10-18 03:09:42 +00:00
kojima
66ec682107 fixed a crash 2004-10-18 02:36:32 +00:00
kojima
1076645853 changed default fonts
improved font selection in wprefs
2004-10-18 02:30:22 +00:00
kojima
30247c5886 dont bring up root menu when fullscreen window is focused 2004-10-18 01:43:13 +00:00
kojima
1e3a40370d some documentation updates 2004-10-18 01:37:17 +00:00
dan
27b9e27ae0 - Moved fullscreen level back above menus
- Small changes to the info panel messages
- Different geomview
- Fixed problem with waitpid returning <0 in monitor
2004-10-18 01:30:02 +00:00
kojima
28050dab72 fixed a restart bug when child processes exit 2004-10-18 00:22:22 +00:00
kojima
bc6aeab722 fixed a bug with switch panel
added updated de.po
2004-10-18 00:09:54 +00:00
dan
737328566f Tell gettext that we want to have the messages in the UTF-8 encoding, to
avoid the extra conversion that gettext would otherwise perform (from the
message encoding which is UTF-8 to the current locale encoding).
2004-10-17 07:17:03 +00:00
dan
6cfad0b10f - Removed obsoleted options from WMGLOBAL and from the WINGs internal
structures (no longer needed with xft)
- Fixed default system font names (converted from xlfd to fontconfig names)
- A bit of code cleanups related to xft
- Replaced harcoded xlfd font names in wmaker and WPrefs with fontconfig
  names.
2004-10-17 06:27:51 +00:00
kojima
19c7a99197 only scale down icons (not up) 2004-10-17 05:22:24 +00:00
kojima
7929d55f3f set charset to utf-8 2004-10-17 05:05:57 +00:00
kojima
1f12617065 converted menu and po files to utf-8 2004-10-17 04:32:25 +00:00
kojima
944737dde7 converted po files to utf-8 2004-10-17 03:31:22 +00:00
dan
a91a34732c converted fr.po to UTF-8 2004-10-16 22:54:27 +00:00
dan
744c0726a1 fixed fullscreen level 2004-10-16 22:16:11 +00:00
kojima
7055530895 - Added support for NET_WM_NAME/NET_WM_ICON_NAME
- moved out font name conversion code from getstyle/setstyle/convertfonts and made it support fontsets
2004-10-16 22:05:04 +00:00
kojima
9402724e40 fixed crash in empty workspaces 2004-10-15 01:00:36 +00:00
kojima
cd36d73886 fix 2004-10-15 00:27:36 +00:00
dan
0c09179f01 - Removed support for legacy systems: OpenLook, KDE-2.x, Gnome-1.x
- Removed #define and #ifdef XFT constructs, as XFT is on all the time
2004-10-14 23:05:20 +00:00
kojima
884a3f1647 fixed cycling 2004-10-14 21:24:21 +00:00
dan
2e572717c5 fixed bug with zombies after wmaker crashed 2004-10-14 20:24:00 +00:00
kojima
8502709884 fixed cmdline option duplication bug 2004-10-14 19:53:31 +00:00
kojima
5f4a3f6777 enhanced icon highlighting in window switcher 2004-10-14 19:12:26 +00:00
dan
067fc41354 updated buglist with recent additions 2004-10-14 18:21:15 +00:00
dan
36b55dc1e6 - removed some obsoleted function definitions
- made font name comparison case insensitive
2004-10-14 18:04:18 +00:00
kojima
3a97c33072 bug.. 2004-10-14 15:54:35 +00:00
kojima
62590be0db fixed bug in window switching 2004-10-14 15:53:17 +00:00
kojima
440f2abe6f missing header 2004-10-14 14:41:05 +00:00
kojima
f54f0856c1 - MacOS X style window switching panel (navigate through windows with Alt-Tab or
arrow keys)
2004-10-14 05:02:24 +00:00
kojima
62994167c5 fixed layout 2004-10-14 02:25:28 +00:00
kojima
00e709cec4 fixed bug 2004-10-14 01:00:43 +00:00
kojima
2b51c21ee5 use macros for property names 2004-10-13 23:48:58 +00:00
kojima
3ed1d3e25c added Font Configuration
updated some outdated default config files
2004-10-13 23:39:29 +00:00
kojima
3088277b1e fixed unclosed file bug 2004-10-13 06:10:36 +00:00
kojima
879b00a57b - Removed legacy OFFIX_DND support code
- Fixed the signal handler for crashes (ie, removed it) and made wmaker
  restarting be made automatically by a monitoring process.
- Made NetWM support be enabled by default
- Removed old code to store/restore workspace state (now relies on netwm)
2004-10-13 05:09:08 +00:00
dan
6830b05716 changed indentation to use spaces only 2004-10-12 21:28:27 +00:00
dan
5912898b06 some other todo items I remembered 2004-10-12 12:46:16 +00:00
dan
f614cb8341 updated todo 2004-10-12 02:34:33 +00:00
dan
9ff85407b7 todo before next release 2004-10-12 02:25:24 +00:00
kojima
d211420261 moved -fno-strict-aliasing flag to configure, so it only adds that for gcc
s/__asm__/asm/ (we don't care about being ansi for the asm code)
2004-10-12 02:13:15 +00:00
dan
1ef52e0aec ignore some binary 2004-10-12 01:35:41 +00:00
dan
9aca0d5f6e - Check whether libXft is at least version 2.1.2 else refuse to compile.
- Fixed bug in icon chooser dialog that could cause a segmentation fault
  in some cases (Pascal Hofstee <caelian@gmail.com>)
- Fixed crash in asm code in wrlib, with new versions of gcc.
- Fixed bug in the x86_PseudoColor_32_to_8() function which incorrectly
  used the r, g, b fields in the conversion.
- Fixed x86 ASM code in wrlib to work on 64 bit architectures.
- Fixed the focus flicker seen with some apps (notably gtk2)
  (Alexey Spiridonov <snarkmaster@gmail.com>)
- Fixed all crashing bugs that were generated by wmaker starting with the
  WMState file missing.
- Added NetWM support (a modified version of the patch originaly written
  by Peter Zijlstra <a.p.zijlstra@chello.nl>)
- Applied patch to enhance the Virtual Desktop behaviour, and to integrate
  it with the NetWM code (Peter Zijlstra <a.p.zijlstra@chello.nl>)
- Applied a few xinerama and placement fixes (Peter Zijlstra
    <a.p.zijlstra@chello.nl>)
- Fixed memory leak in dock code.
- Fixed and enhanced the text wrapping in WINGs.
- Fixed the layout of some elements in WPrefs.app
- Added workaround for aplications that don't set the required hints on the
  client leader window, but they set them on normal windows (observer with
  KDE 3.3.0 mainly). This will allow these apps to get an appicon again.
  (they should be fixed still)
- Added workaround for applications that do not set a command with
  XSetCommand(), but instead they set the _NET_WM_PID property. This works
  with operating systems that offer a /proc interface similar to what linux
  has. (This also is to fix problems with KDE 3.3.0 apps, but not only them).
- Fixed bug with autostart and exit scripts not being executed if user
  GNUstep path was different from ~/GNUstep (when setting GNUSTEP_USER_ROOT)
- Added utf8 support in WINGs (removed old X core font code)
- Added utility to convert old font names to new font names in style files
2004-10-12 01:34:32 +00:00
dan
c7c68c6fe7 Added bosnian translations 2004-10-12 01:23:15 +00:00
kojima
95897acc30 added a quick&dirty standalone colorpicker utility 2004-08-24 19:27:45 +00:00
kojima
57869b667b minor dumb bug.. 2004-08-22 03:55:59 +00:00
kojima
2c8a70b743 updated default menus a little bit 2004-08-22 03:07:32 +00:00
kojima
0445dd5c18 changed encoding of (c) thing in about panel to utf-8
changed techdraw style size display to use X core fonts
2004-08-21 21:29:44 +00:00
dan
b6e06d4beb testing notifications 6 2004-08-06 16:49:17 +00:00
dan
b75b7cbc01 testing notifications 5 2004-08-06 16:39:31 +00:00
dan
eb646a6682 testing notifications 4 2004-08-06 16:30:52 +00:00
dan
7b88cd8afd testing notifications 3 2004-08-06 16:13:34 +00:00
dan
f5a6724142 testing notifications 2 2004-08-06 16:10:05 +00:00
dan
afbab71401 testing notifications 2004-08-06 16:05:41 +00:00
dan
20fe42df2b testing notifications 2004-08-06 15:05:08 +00:00
dan
d0c5bedab6 testing notifications 2004-08-06 14:49:49 +00:00
dan
ef31cd1323 test notifications 2004-08-06 14:41:42 +00:00
dan
427a42ab58 test notifications 2004-08-06 14:40:50 +00:00
dan
474c4caf94 reverted the last test commit (duh) 2004-07-16 18:50:58 +00:00
dan
109bb540ec another test for cvs notifications 2004-07-16 18:18:36 +00:00
dan
9b7b9f6815 testing cvs notifications 2004-07-14 21:10:40 +00:00
dan
32973f6e15 testing new commit email notification script 2004-07-12 03:16:34 +00:00
dan
5b26a68910 testing new commit email notification script2 2004-07-12 03:15:58 +00:00
dan
59014546aa testing new commit email notification script 2004-07-12 03:15:00 +00:00
dan
e4483de406 test log scripts 2004-07-11 19:59:39 +00:00
dan
90d830837a test cvs over ssh 2004-07-11 03:13:13 +00:00
dan
752163dfc6 test cvs over ssh 2004-07-11 02:45:17 +00:00
dan
6d02fe98f2 - rewrote the font conversion routines to avoid the need to allocate memory
for font options while parsing the xlfd. now all processing is done using
  the original xlfd string only.
- removed memleaks introduced by previous commit.
2004-04-13 03:49:38 +00:00
vlaad
500d569c79 style property is supposed to override weight and slant, unfortunately it doesn't do it cleanly, and you might end up with italic fonts. this fixes the issue by not making the assumption. 2004-04-10 19:27:54 +00:00
vlaad
f54b0de7b4 To ease transition from XLFD fontnames to fontconfig fontnames setstyle
now converts all *Font keys in the style files before merging them with
G/D/WindowMaker and (vice-versa) getstyle converts the keys from G/D/WindowMaker
before it does anything else whether its stdout printing or themepacks.
enabling quick theme conversions to new font system.
2004-04-10 14:55:55 +00:00
dan
b8193865f6 Added forgotten dragcommon.c to the cvs tree 2004-04-07 10:15:52 +00:00
dan
e7d0c5d9e9 - Added xdnd v3 support in WINGs (Sylvain Reynal <sreynal@nerim.net>)
- CVS should compile again
2004-04-07 02:50:52 +00:00
dan
791bb6a444 replaced CPPFLAGS with AM_CPPFLAGS in some Makefile.am's to avoid overwriting the user's CPPFLAGS environment variable 2004-02-25 21:26:49 +00:00
dan
a018eff89d updated slovak translation 2004-02-02 02:30:12 +00:00
dan
1096cfa991 - Updated INSTALL.fr (wwp <subscript@free.fr>)
- WINGs python update
2004-01-15 20:36:48 +00:00
dan
5d9354f362 better explanation of what changed 2004-01-13 04:55:12 +00:00
dan
0b42849a3e Workaround to avoid creating a second appicon when a KDE3 application opens
a config panel.
2003-12-13 14:08:32 +00:00
dan
df75c86ef0 Fixed a bug that made the crash panel to be shown again and again when the
'Restart Window Maker' option was selected, under some circumstances.
(bug reported by Roberto Sanchez <rcsanchez97@yahoo.es>)
2003-11-13 06:10:33 +00:00
dan
20975c4918 Fixed 2 focus switching related bugs (Allan Peramaki <aperamak@cc.hut.fi>) 2003-10-14 00:25:46 +00:00
dan
1dfaec332e Fixed synchronization problem between hair cursor and mouse cursor in
wmagnify with mouse cursor at the screen edge.
2003-09-29 23:44:51 +00:00
kojima
3d6d775f08 updated spanish translation of wprefs 2003-09-19 23:47:31 +00:00
kojima
1f393ac4f7 updated catalan translations (Ernest Adrogue <eadrogue@gmx.net>) 2003-09-16 23:31:24 +00:00
dan
847479b886 Fixed bug with incorrect un-escaping if there is a dot in wm_class. 2003-09-03 19:09:20 +00:00
dan
6aed0cd713 small 'remember todo' comment 2003-08-19 21:44:08 +00:00
dan
39b9edfdcd - Converted functions in wfont.c to use xft semantics in place of old X core
fonts and X font sets.
- New code operates on new fontnames like Arial-8:bold:italic in place of xlfd
  (WMCreateFont can still read an xlfd for back compat)
2003-08-15 02:58:04 +00:00
dan
090cc27f00 fixed a test condition 2003-08-14 01:43:07 +00:00
dan
08225948bc wide char support 2003-08-14 01:39:27 +00:00
dan
18d07e04a6 small fix 2003-08-07 00:53:48 +00:00
dan
74ba4f8eef Started to move towards using xft2 only, for a unified font/locale handling
in WINGs
2003-08-07 00:26:21 +00:00
dan
0852957ea1 update before moving to xft2 2003-08-06 23:58:54 +00:00
dan
7efcf57c18 fixed the 'focus flicker' problem, seen with GTK2 applications 2003-08-03 00:00:11 +00:00
dan
44f636e91e doc update; don't use clip's inactive collors for arrows when collapsed 2003-08-02 21:36:45 +00:00
dan
8457611316 fixes to comply to ANSI C 2003-07-16 20:58:49 +00:00
dan
bd7943d9a7 - 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
2003-07-05 02:39:37 +00:00
dan
b0d72a3db2 - 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
2003-07-01 23:00:25 +00:00
dan
396b011610 Fixed bug with focusing a deminiaturized window with sloppy focus mode 2003-06-14 21:13:34 +00:00
dan
c131f14d3e - Fixed bug with wrong text wrapping (Alexey Voinov <voins@voins.program.ru>) 2003-06-12 23:19:00 +00:00
dan
a4c986fa1b _ fixed bug in resizing a scrollview
- read both XLFDs and XFT style font names from config files (xft case only)
2003-06-12 21:21:57 +00:00
dan
64468fcf63 support for compiling with xft2 2003-06-10 01:56:26 +00:00
kojima
8904783aee show whether aa text is enabled in info panel 2003-06-09 05:37:38 +00:00
kojima
40c89b3399 Fix by vlaad to the tableview click callback that was getting bad row info 2003-06-08 21:53:00 +00:00
dan
27a396d7ed - Fixed sloppy focus bug
- Made maximizing behaves 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>)
2003-06-06 04:11:00 +00:00
kojima
2cf5931890 fixed silly typo in workspace.c
added system wide menu configuration
2003-06-06 02:51:47 +00:00
kojima
d159da8671 fixed little prob with header define 2003-06-06 02:47:46 +00:00
kojima
ed0d234d7f solaris xinerama fixes, wmsetbg updated for xinerama 2003-06-04 20:40:00 +00:00
kojima
4d701d8306 small fix in description 2003-06-04 19:02:10 +00:00
kojima
5dbb770aa4 xinerama stuff for solaris 2003-06-04 18:57:03 +00:00
kojima
479ccbda82 updated french translations 2003-05-23 21:47:48 +00:00
kojima
001cb65271 updated single click patch 2003-05-20 04:43:19 +00:00
kojima
bc3ab27364 patch from Vitaly Ovtchinnikov <ov@rbcmail.ru> for
double/triple-click selection in textfield
2003-05-06 03:36:21 +00:00
dan
669d542408 - added imporved wsetfonr from (Mike FABIAN <mfabian@suse.de>)
- added small language fix from ("Marcelo E. Magallon" <mmagallo@debian.org>)
2003-04-23 21:21:38 +00:00
dan
3dcab96180 - Support for multiline balloons (Vitaly Ovtchinnikov <ov@rbcmail.ru>) 2003-04-21 03:34:43 +00:00
dan
7f1d621f43 updated cvs-ignored-files list 2003-04-18 01:16:50 +00:00
dan
b0063c83c7 added support fo generating pkgconfig files for WINGs, wrlib and wmlib ("Marcelo E. Magallon" <mmagallo@debian.org>) 2003-04-18 01:15:07 +00:00
dan
f06c9a1953 - 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
2003-04-15 22:04:49 +00:00
dan
e1958b22c5 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)
2003-04-11 21:22:59 +00:00
dan
528243bb98 Added bulgarian translations 2003-04-06 23:18:07 +00:00
dan
f058fdf72c - Fixed small memory leak in the WINGs' font panel code.
- Fixed call to qsort in WMSortArray.
- Fixed a memleak in the WINGs' file panel.
2003-04-02 11:37:04 +00:00
dan
5f79f1bcde - Fixed bug that could cause SIGSEGV by accessing beyond the end of text in
a WINGs textfield widget.
2003-03-20 13:11:13 +00:00
kojima
18ed046356 - Added WMSetTableViewHasHorizontalScroller() 2003-03-13 21:36:34 +00:00
dan
277d0055fd Fixed bug with scrolling menus (introduced by xinerama patch) 2003-03-04 13:14:55 +00:00
dan
e727cbadb6 - 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>)
2003-02-28 12:42:16 +00:00
dan
fdeb749da7 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
2003-02-27 07:42:46 +00:00
dan
dee8c6e770 - Also 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
2003-02-24 04:08:21 +00:00
dan
fe4cd695af - Fixed a bug with deminiaturizing windows when the application is hidden and
the miniaturized window is selected from the window list menu
2003-02-24 04:06:20 +00:00
dan
1902325087 Reverted German translations 2003-02-24 01:44:59 +00:00
kojima
5b28616212 ops 2003-02-24 01:43:16 +00:00
kojima
ad05cc3b44 updated german translation
added catalan translation
2003-02-23 22:12:20 +00:00
dan
56f73aa4b9 - a few simplifications and cleanups in the WINGs python code 2003-02-20 23:02:28 +00:00
dan
40111188ec - Fixed bug with cursor locked in drag mode after Alt-dragging a window 2003-02-19 23:26:41 +00:00
dan
80c09f1075 - Fixed wrong display position for the move/resize widgets
patch (Peter Zijlstra <a.p.zijlstra@chello.nl>)
2003-02-18 00:35:54 +00:00
dan
b5ef388711 - Fixed edge resistance and move/resize frame drawing for borderless windows 2003-02-16 01:47:58 +00:00
kojima
7a8bde44fa fixed bug in tpixmap after xinerama patch 2003-02-13 16:27:45 +00:00
dan
b381674375 - 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)
- misc fixes
2003-02-11 00:32:17 +00:00
dan
e54a0954e6 added fixed german translations 2003-02-05 01:42:02 +00:00
dan
c0965cd48b - Fixed a problem in the stacking code which could lead to segmentation faults
(Jeff Teunissen <deek@d2dc.net>)
2003-01-17 01:10:51 +00:00
dan
4153e2fde4 - Fixed crashing bug in menu.c
- Updated year from 2002 to 2003
2003-01-16 23:30:45 +00:00
dan
f3487c1ea2 new german translations 2003-01-16 01:47:35 +00:00
dan
0898a3d475 added python wrapper files to dist tarball 2002-12-20 22:41:30 +00:00
dan
064f79ebae - Fixed focus handling for windows that set WM_HINTS.take_focus = False.
- Misc fixes.
- Improved a bit the python wrapper.
- Build po files before 'make install'
2002-12-20 17:47:31 +00:00
kojima
55d37178a0 added cback for set button in fontpanel 2002-12-04 15:40:32 +00:00
dan
90e8cfc5b8 - Properly fixed the color change in the Appearance panel preview box
in WPrefs.app. Also uses less resources.
2002-12-03 04:49:37 +00:00
dan
ab511aca5e small update to display if xinerama is supported in the configure summary. nicer display for the summary too. 2002-12-02 04:42:13 +00:00
dan
39d250888e - Fixed Window Maker to compile with xinerama disabled.
- Replaced --disable-xinerama with --enable-xinerama in configure
  (xinerama needs to be enabled when Window Maker is build because
   it's no longer enabled by default)
2002-12-02 03:44:10 +00:00
dan
00638fa5d3 - Fixed a problem with image artifacts in the Appearance preview box
when color is changed and antialiased fonts are used.
2002-12-02 01:22:14 +00:00
dan
ca43aba088 - Added wstrndup() and WMGetFontName() 2002-12-02 00:01:05 +00:00
dan
96c64e15ef - Added a python wrapper module for WINGs 2002-12-01 06:01:08 +00:00
dan
dd1ccd2fd6 - enabled the use of SHAPE extension in the color panel. without it the
magnifying glass captured image was shifted and unusable
- removed some comments left in the code for later reviewal
2002-12-01 05:49:13 +00:00
dan
c0442b1c59 - WMGetTextDefaultColor() won't retain the returned color anymore, and you
shouldn't release it. It is just a reference to the internal WMText color.
  This should make all the functions returning colors from widgets behave
  consistently
2002-11-30 03:00:34 +00:00
dan
bde9b8a21a forgot to add these in cvs 2002-11-30 02:19:46 +00:00
dan
83d3625e1a - 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 README.antialiasing describing the steps needed to get antialiased
  fonts working with WINGs/Window Maker.
- Added Sample.XftConfig
2002-11-30 02:13:36 +00:00
dan
5ad557c6c8 fixed a memleak in the font panel in WINGs 2002-11-29 02:47:33 +00:00
dan
1fa3937001 fixed wmaker failing to compile with gnome support enabled after the xinerama add 2002-11-29 02:37:40 +00:00
kojima
a10214a502 - Fixed sloppy focus bug (Pawel S. Veselov <pv76716@druid.SFBay.Sun.COM>)
- Applied Xinerama patch (after fixes) from (Peter Zijlstra
  <a.p.zijlstra@chello.nl>)
2002-11-28 22:04:07 +00:00
dan
0fe70d2b4e - Fixed a bug with empty frame titles (Alexey Voinov <voins@voins.program.ru>)
- Added WMGetWidgetBackgroundColor()
- Code cleanup in wtext.c
- Renamed WFANonBold and WFANonEmphasized to WFANotBold and WFANotEmphasized
2002-11-25 04:46:00 +00:00
dan
18b3753227 - added WMCopyFontWithChanges() a more generic and powerful function, meant
to replace WMNormalizeFont(), WMEmphasizeFont(), WMStrenghtenFont(),
  WMUnemphasizeFont() and WMUnstrenghtenFont() which are now obsolete and
  were removed.
2002-11-22 04:49:05 +00:00
kojima
0bfa12a1fc fixed crash caused by resizebars that appear after reloading configs 2002-11-22 00:11:17 +00:00
dan
4d6cd7f326 added .mo files to cvs ignore list 2002-11-21 05:26:53 +00:00
dan
2fe1b0e3f8 - Added support for antialiased text with multibyte languages too.
(only tested on russian, since that's the only multibyte language
  I can test).
2002-11-21 05:21:42 +00:00
dan
3929660f39 - downgraded zh_TW.Big5 po files to previous versions. Latest failed to
compile
- fixed some charsets in a couple of po files
- remove libPropList question from Install script
2002-11-20 12:04:42 +00:00
dan
c2ec1cfe8a - Fixed userdefaults in WINGs not to synchronize on exit a domain that is
marked not to be synchronized.
- WMGLOBAL options can now be set in the WindowMaker configuration files
  to overwrite values in WMGLOBAL.
- 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.
- Replaced AA with Anitialiased in WINGs font creation function names
- Added WMCreateFontWithFlags(), WMHasAntialiasingSupport() and
  WMIsAntialiasingEnabled()
- Created a separate font cacahe for antialiased fonts
- Added test at startup if Xft supports rendering antialiased fonts (in case
  the application was compiled with Xft support, but is run on an X server
  without support for xft rendering (RENDER extension missing). If no Xft
  support antialiasing will be disabled even if it is enabled in the
  configuration file.
- Finished the Info Panel to work with antialiased fonts.
- Code cleanup in dialog.c. Remade part of Info Panel drawing the Window Maker
  logo.
- Fixed technical style drawing of window resizing.
2002-11-13 15:13:48 +00:00
kojima
d597c61cb7 final fix 2002-11-09 14:56:33 +00:00
dan
5e18eadf22 - Fixed wrong colors for text and tile with selected menu items 2002-11-08 21:07:45 +00:00
kojima
19f7fbc949 bleh this one should work 2002-11-08 19:30:53 +00:00
kojima
55f3cb9577 argh! buffer overflow fix, try 3 :P 2002-11-08 18:00:56 +00:00
kojima
811e508c84 fix overflow bug, try2 2002-11-08 17:05:35 +00:00
kojima
60ee69979f fixed buffer overrun bug in wrlib when creating or loading images 2002-11-07 17:18:41 +00:00
dan
4f80ec9178 - removed unnecessary include of WINGsP.h in some places
- smaller space between rows of text in WMText
2002-11-04 20:29:47 +00:00
dan
5e37991b6c Added (forgotten) release for notifications when destroying a WMList. 2002-11-04 06:07:00 +00:00
dan
a4bc7f6a07 Better outline when drawing balloons 2002-11-01 13:28:59 +00:00
dan
6724ec5a6d - It seems some versions of automake carry broken missing scripts, so I
put back the missing script to make sure we don't generate packages
  with bad missing scripts
2002-10-28 22:52:18 +00:00
dan
879d13ef45 - Fixed an issue with drawing AA fonts in titlebars
- Removed 'missing' from cvs, since it is copied from automake when autogen.sh
  is run. You need to run autogen.sh after this update to put it back.
2002-10-28 21:56:13 +00:00
dan
a1d78d102a fixed broken loading gif images 2002-10-28 05:36:42 +00:00
dan
3af4aa7846 - fix for 0 sized gif images too
- fixed wrong test for 0 size in nxpm.c
2002-10-25 04:21:09 +00:00
kojima
0f0afc48ab fix for 0 sized images 2002-10-25 03:43:57 +00:00
dan
55efa1f268 - Eliminated the double no-position-display gap when switching position
display types with the Shift key while moving windows
- Added be.po to configure.ac
- Changed the default resize window display type to 'Center'
2002-10-25 03:37:51 +00:00
kojima
ffa1a610c0 - 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 to not try to load braindead images with 0x0 size
2002-10-25 02:42:56 +00:00
dan
0bb76c0a76 made titlebars display titles with double buffering to avoid flickering. needed because aa fonts need clearing area before redrawing to avoid artefacts and clearing area before redraw gives flicker 2002-10-18 22:17:20 +00:00
dan
7be0a97998 - More cleanups for obsoleted xxx_gc's and xxx_pixel's in WScreen 2002-10-18 04:04:41 +00:00
dan
5230a57599 - Added WMCreateNonAAFont() to WINGs 2002-10-18 02:56:59 +00:00
dan
3bed15d673 - fixes for AA fonts
- fixed the workspace name display problem.
- replaced most of scr->xxx_pixel with scr->xxx_color
- removed some obsoleted GC's in the WScreen structure
2002-10-17 20:26:30 +00:00
dan
1e92274495 - Updated WINGs/NEWS with info about hw the API changed how how things
are affected. Fixes for old code too.
- Double buffering in WMList. All widgets or apps using WMList and
  having user drawing porcedures in place will inherit this double
  buffering automatically too.
- New functions in WINGs: WMGetColorAlpha(), WMIsAAFont()
- Misc code cleanups in WINGs and src/dialog.c
2002-10-16 04:05:45 +00:00
dan
2b2fecac12 - Added double buffering when drawing a WMFrame title with an AA font to avoid
flickering.
- Added double buffering when drawing WMList items to avoid flickering
- Shared xft drawable
- Renamed AASystemFont and AABoldSystemFont to AntialiasedSystemFont
  respectively AntialiasedBoldSystemFont in WMGLOBAL
- WMCreateFont falls back to normal fonts if antialiased fonts cannot be
  created (even if enabled)
2002-10-13 18:25:36 +00:00
dan
17f26077b0 Added Xft support in WINGs (for drawing antialiased fonts with transparency)
Details in WINGs/ChangeLog and WINGs/NEWS
2002-10-09 05:14:28 +00:00
dan
a2b404b5b3 - API change in WINGs for WMDraw*String().
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
- Added alpha channel to WMColor. 2 new functions also:
  WMCreateRGBAColor() and WMSetColorAlpha()
- Miscelaneous code cleanups in wtext.c
- 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
2002-10-08 08:26:06 +00:00
dan
e98da5a628 updated russian locales 2002-10-04 19:42:30 +00:00
dan
b9e7a1d3ca removed obsoleted header file 2002-09-30 12:42:22 +00:00
dan
1941aaf34a - removed hermeslib dependancy
- added back old asm/mmx code
2002-09-30 12:39:22 +00:00
dan
11c466ec26 small fix in wtest 2002-09-29 01:37:10 +00:00
dan
feaa80addc Updated French translations 2002-09-18 00:28:17 +00:00
dan
92b012e800 patch to add binary mode on opening files (for Windows+Cygwin compatibility). 2002-09-15 20:37:41 +00:00
dan
3fc803c0d8 - 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.
2002-09-12 03:43:08 +00:00
dan
a07b262a87 small annoyance with new autoconf generated directories 2002-09-11 15:04:26 +00:00
dan
851835c7a5 - Fixed empty window list menu, if the window list menu was launched through
the root menu ("Marc-Christian Petersen" <m.c.p@wolk-project.de>)
- A small fix for wmtableview when computing visible columns.
2002-09-11 15:02:43 +00:00
dan
d4de3d0a45 - new function in WINGs: WMSetConnectionShutdownOnClose()
- new callback in the ConnectionDelegate structure: canResumeSending
- replaced setpgid() with setsid() when starting kids, to allow them to
  survive if wmaker (the parent) dies.
- a few cleanups.
2002-09-09 04:25:51 +00:00
dan
048b43aea4 - fixed a frame size in WPrefs menu editor
- removed // comments
- commented out printfs in unfinished selection code
2002-07-01 23:52:22 +00:00
kojima
579eb01c6c applied patch from Ryosuke Nanba <rna@cyber.email.ne.jp>
WindowMaker 0.80 crashes (SIGSEGV) on deiconifying the miniwindow of
Mozilla 0.98, under following condition.   - running ATOK X for Linux *
  - create new Mozilla Window
  - using ATOK on Mozilla (make "mozilla-im-status" window visible)
2002-05-25 03:01:32 +00:00
kojima
ca212985df fixed typo in menus... 2002-05-11 00:44:03 +00:00
dan
c32806ae14 updated some .cvsignore files 2002-04-11 20:41:00 +00:00
dan
ee5b28b0af fixed a buffer overflow 2002-04-11 20:38:05 +00:00
dan
750917986e - Added WMGetTextFieldDelegate()
- Fixed a problem with drawing the return arrow on buttons when disabled
2002-04-03 00:51:36 +00:00
dan
6e72c20248 - Added WMSetButtonImageDimsWhenDisabled() and WMGetButtonEnabled()
- Cleaned-up the header files of functions/vars declared but not implemented
2002-03-29 01:24:12 +00:00
dan
ad0ad5af22 Added 2 functions to retrieve the default system fonts:
WMDefaultSystemFont(WMScreen *scr) and WMDefaultBoldSystemFont(WMScreen *scr)
2002-03-28 16:22:53 +00:00
dan
e4a53ba71e fixed some Bool flags passed to WINgs functions to always set 1 or 0 values internally 2002-03-28 04:20:30 +00:00
kojima
208ee16849 updated spanish po 2002-03-24 22:00:24 +00:00
dan
f9acc9313e commented out some declared but never defined functions and global vars 2002-03-24 21:57:21 +00:00
kojima
92fb96eb69 - Fixed bug with windows that have WM_HINTS.take_focus = False. These windows
will not receive focus at all.
2002-03-24 03:18:09 +00:00
dan
18d347ecd5 removed update-autoconf. use autogen.sh 2002-03-20 01:29:17 +00:00
dan
97e20d94de fixed textfields regarding interpretation of special keys with modifiers 2002-03-14 22:20:25 +00:00
dan
65e65c4e9d added ability to enable/disable individual WMTabViewItems 2002-03-14 12:28:52 +00:00
dan
84fa789cd6 - Fixed WMGetViewScreenPosition() to consider the window decorations. 2002-03-04 08:52:49 +00:00
dan
efcf27f854 fixed autogen.sh to include deps in Makefile.in 2002-03-04 06:28:14 +00:00
dan
5fe90167a3 fixed autoconf warning 2002-03-03 20:33:44 +00:00
dan
f857012f7a gah! the putenv() stuff was not causing memleaks. Only 2 memleaks after all (1 serious, 1 minor). Both did sum up in time 2002-03-01 10:33:14 +00:00
dan
efb0090f8c fixed some memleaks (1 serious, 5 minor) 2002-03-01 10:03:35 +00:00
dan
1cd1f16c3c fixed bug in WMSetButtonEnabled and WMSetButtonSelected 2002-02-28 11:01:39 +00:00
kojima
0c1881e224 added french po 2002-02-26 14:57:24 +00:00
dan
5bb35d94a5 fixed a bug in wdread 2002-02-23 00:02:17 +00:00
kojima
321bb04586 little change on menus 2002-02-20 23:38:25 +00:00
dan
77b8fe05ac - removed configure.in. use only autoconf 2.5x fom now
- fixed a bug and memleak in WMBox code.
- updated some translations
- fixed some bug in the menu code about drawing disabled entries.
- fixed Clip menu not to allow selecting of "Autoraise" if "Keep On Top"
  is active.
- Added a "Browse" button to the menu editor in WPrefs where a program to run
  is specified (not finished).
2002-02-20 22:22:40 +00:00
kojima
9466c00f2b update danish translations 2002-02-20 21:35:46 +00:00
kojima
a8950af8ac fixed segfault with incomplete WM_CLASS 2002-02-20 15:01:44 +00:00
kojima
58e719654f added czech translations 2002-02-18 13:50:30 +00:00
dan
ad58481487 reverted latest german update. 2002-02-17 22:33:22 +00:00
kojima
5402fccd1e cleanup oops 2002-02-16 04:56:45 +00:00
kojima
cf7859d145 some incomplete xinerama stuff 2002-02-16 04:53:33 +00:00
kojima
5db8b5660f cleaning the house today 2002-02-15 21:34:46 +00:00
kojima
5873385d32 fix for soemthing wrong with piped menus 2002-02-15 21:30:42 +00:00
kojima
a26b723c5a something i dont remember 2002-02-15 21:27:41 +00:00
kojima
bc3d012e7c updated german pots 2002-02-15 21:24:41 +00:00
kojima
c08b3c5f32 fixed icon scaling 2002-02-15 21:22:46 +00:00
dan
f37b4cf5d0 - 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.
2002-02-01 01:20:15 +00:00
id
06f1bf91a9 fix my mail, maliwan is dead 2002-01-31 10:30:06 +00:00
id
8b5f31ad8b fix an icon 2002-01-27 05:59:29 +00:00
id
2cc90e649a add an icon 2002-01-27 05:54:17 +00:00
id
9d41f432b9 add and fix icons 2002-01-26 15:52:22 +00:00
id
b4f540ddd6 add and fix icons 2002-01-26 15:52:22 +00:00
id
03f534c0bf add an icon 2002-01-26 04:24:12 +00:00
dan
9078b1a5a7 forgot this 2002-01-25 14:40:09 +00:00
dan
da02e76051 added better proplist warnings when reading non-digit proplist data and fixed screwed Changelog after last commit. 2002-01-25 14:39:37 +00:00
kojima
9c19d14d1a added greek flag pixmap 2002-01-25 14:10:30 +00:00
kojima
bc88390918 added contrib patch for resizing/moving windows with yubn keys 2002-01-25 13:51:54 +00:00
kojima
a1b9bf23a9 fixed non-transparent bug of xrender transparent windows 2002-01-23 19:36:43 +00:00
dan
511a06628b - fixed crash when saving window attributes
- updated german translation
- small fix for the selection code in WINGs (possible memleak)
- added support for the ukrainian language in wsetfont
  (Bohdan Vlasyuk <bohdan@bodq.vstu.vinnica.ua>)
2002-01-17 03:07:28 +00:00
dan
8a25fdc672 updated german wprefs translation 2002-01-11 21:57:20 +00:00
dan
a1a7ba7689 Fixed problem with not saving all windows in a session when the shared
application icon is enabled (only one instance/shared application was
saved)
2002-01-11 05:08:44 +00:00
dan
4f84c48ccb updated de.po and fixed a typo 2002-01-10 06:03:06 +00:00
dan
9b63a77d6a a few changes in the selection code 2002-01-07 06:11:34 +00:00
dan
89a32e3663 Fixed some focus related problems when switching workspaces, including the
infamous problem with losing focus when switching to an empty workspace and
back
2002-01-05 06:16:10 +00:00
dan
501c3f48b8 - Fixed labels not to display '\n' as a character if multiple '\n' are passed
- Fixed Legal Panel not to display rectangles in place of new lines.
- Removed some obsoleted/unused files from cvs
- Fixed a bug with Sloppy focus when changing workspaces (from a debian user
  bug report/patch)
2002-01-05 01:35:30 +00:00
dan
cab71ba6a1 - 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)
- Updated the years in the copyright notices
2002-01-04 07:32:37 +00:00
dan
96f8ab167f Added "Hide Others" to the window menu 2002-01-04 05:44:20 +00:00
dan
a8c7375623 Fixed problem with kcalc not having a miniaturize button 2002-01-04 00:30:11 +00:00
dan
365556b676 misc selection and textfield fixes 2002-01-02 17:45:40 +00:00
kojima
7b00d9ec12 added malay translation 2002-01-02 14:09:50 +00:00
dan
89cb6559cc - german po file for WINGs (Guido Scholz <guido.scholz@bayernline.de>)
- misc fixes in selection code in WINGs
- fix for a crash if WMState is missing on startup
2002-01-01 18:40:24 +00:00
id
372da5ca39 ok 2001-12-31 12:39:17 +00:00
id
514258fd35 fix again, perfect. 2001-12-31 12:34:51 +00:00
id
0b0002f75a fix an icon 2001-12-31 12:27:34 +00:00
dan
cf2322ee03 code cleanup 2001-12-30 05:07:12 +00:00
dan
c9dfd7f3a4 updated makefile for new icons. 2001-12-30 01:58:30 +00:00
dan
7eb705472f - Really fixed problem with keyboard shortcuts executed an every screen for
multihead systems.
- Fixed a wrong test in the selection code.
2001-12-30 01:50:46 +00:00
id
d35dd84ae5 change an icon 2001-12-29 21:31:29 +00:00
id
0613a758f4 add a jabber icon 2001-12-29 08:32:46 +00:00
dan
9e615bcff9 - 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.
2001-12-28 03:29:50 +00:00
kojima
9031641ba6 updated chinese translation 2001-12-26 11:32:41 +00:00
id
9bfa0b6efb Sorry, my heart was broken real bad. I am going to resign from my
job and I don't think I can still be able to be a part of project.
Thank you guys for everything.
2001-12-26 06:06:45 +00:00
dan
60409e290d small update 2001-12-22 21:18:15 +00:00
dan
03befcf729 - removed kbd shortcuts active during mouse window drag (enabled by a
recent commit), because it causes nasty problems. It needs fixing
  before reenabling (if they are possible at all)
2001-12-21 23:46:54 +00:00
dan
beb83f52fe updated NEWS 2001-12-21 23:30:39 +00:00
dan
99a5f0da0f few updates 2001-12-21 21:39:52 +00:00
dan
520a6cd0e4 a fix for the definable cursor code 2001-12-21 11:00:45 +00:00
dan
f968d88070 - Fixed problem with shared appicon on clients having an appmenu that
is created after the application has mapped its window(s).

This means that if you use wterm without an appmenu it will be able to
use shared appicons, but as soon as you start one with an appmenu they
will get separated appicons.
2001-12-21 00:48:41 +00:00
dan
e1ed96951b fixed bug with improper setting of root/titlebar cursor (definable cursors) 2001-12-20 22:31:13 +00:00
dan
41996df786 - 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
  settings from the global domain file were merged in the user domain file
  and further changes in the global domain file for those merged values was
  ignored making a system admin unable to set global defaults for all users
  using the global domains.
- Fixed bug with not extracting the icon from the client when using
  shared appicons.
- Added WMSubtractPLDictionaries() to WINGs (opposite for merging, it will
  remove all entries from dest if they are present in source and are exactly
  the same. Unique entries in dest and entries with different values from
  those present in source will be preserved).
2001-12-20 22:16:01 +00:00
kojima
932fcd1f37 kbd shortcuts active during mouse window drag 2001-12-20 19:12:19 +00:00
dan
cefdc204ba updated slovak locale files 2001-12-20 16:16:09 +00:00
dan
6f28d987a8 - Fixed problem with unhiding taht mapped windows from other workspaces
on the current workspace.
- Made apps with an application menu not to use a shared appicon.
2001-12-18 16:10:07 +00:00
dan
c8b3933c19 - Fixed xmms problem with shared appicons
- Fixed a problem with saving user defaults for windows after the shared
  appicon changes.
- Fixed GNUstep apps not to show 2 appicons.
2001-12-18 05:18:35 +00:00
dan
4140e6051f updated estonian translation 2001-12-17 22:28:47 +00:00
dan
f0664d1344 small update 2001-12-17 21:25:29 +00:00
dan
f4ef34b814 - Made dock/clip steal appicons of applications that were started from a
shell/xterm or from the main menu, if there is a docked appicon of that
  class that is not running at the time the app is launched.
- Added animation to show that the appicon was stolen by the dock (the way
  NEXTSTEP did - map an appicon as it normally would have been, then slide it
  to the position the docked appicon is).
- Updated the animation constants for scrolling/sliding/shading to better
  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.
2001-12-17 21:21:59 +00:00
dan
90c77b1a45 - improved behaviour for the shared appicon thing.
- added a 'Bool recursive' flag to WMMergePLDictionaries() in WINGs
2001-12-17 14:46:31 +00:00
dan
672c42cc48 - removed the collapse appicons thing
- added real appicon sharing (apps of the same kind will have a single
  shared appicon).
2001-12-17 04:02:33 +00:00
kojima
739fd1a567 added || pipe menu for non-cached generated menus 2001-12-04 12:05:45 +00:00
dan
363290d919 updated po file list in configure.ac 2001-11-30 23:07:22 +00:00
kojima
235b4c6d25 added estonian translation 2001-11-30 13:25:46 +00:00
dan
bbc87bded6 fixed a bug introduced by the previous commit 2001-11-25 09:45:27 +00:00
dan
81a1f98ca5 - Mapping a new window that belongs to a running application that is hidden,
will unhide the application.
- removed a wsyserror() message when reading a property list from file
  (the programmer should decide if to give that message or just ignore).
2001-11-24 05:10:38 +00:00
dan
06b48596f5 - made the definable cursors feature available by default (removed the
compile time option)
2001-11-23 05:39:13 +00:00
dan
0c4dc1c24a - Deminiaturizing a window that is also shaded, will perform an unshade too.
(Note that this only applies to deminiaturizing shaded windows.
   Unhiding an application will keep the shaded/unshaded state of windows.)
2001-11-20 13:48:23 +00:00
dan
af287fb8eb - added strcasecmp() to WINGs (only on systems that don't have it)
- removed some redundant includes of ../src/config.h where wconfig.h
  is also included
2001-11-17 04:26:08 +00:00
dan
7688a9f626 - SIGTERM is now handled and saves the internal state before exiting (like
SIGHUP and SIGINT already do). Now a "kill wmaker_pid" will exit cleanly
  saving dock/clip/session information on exit.
2001-11-16 07:45:33 +00:00
dan
9f62c660d7 - Changelog update about latest fixes.
- Applied patch to fix gnome problems.
2001-11-15 02:52:51 +00:00
kojima
cc9abd6e7e fixed crash bug with empty menus 2001-11-14 13:18:26 +00:00
dan
72150b1da7 - Slovak .po file updates from (Jan Tomka <judas@linux.sk>)
- "Save Workspace state" confirmation switch on the exit dialog panels
  (based on a patch from Jan Tomka <judas@linux.sk>)
2001-11-05 23:19:46 +00:00
dan
b1565d01c4 misc fixes 2001-10-26 22:06:28 +00:00
dan
3b1961d40d New Czech locales from Jiri Hnidek <Jiri.Hnidek@vslib.cz> 2001-10-19 20:13:00 +00:00
dan
d7ffd46d89 updated Makefiles for locale generation to accomodate the latest changes in source structure that were introduced by adding property list handling code to WINGs 2001-10-11 08:19:58 +00:00
dan
8cb297a671 small cleanup 2001-10-10 18:52:14 +00:00
dan
4be9abcdbc - fixed compilation problem for systems that require -lintl for building WINGs
- removed redundant include/lib paths from the get-*-flags scripts
2001-10-10 01:02:34 +00:00
dan
75f790160b - Added ability to shade/unshade a window using the mouse wheel on the
window titlebar.
- Disabled the window birth zoom effect by default.
2001-10-09 03:35:45 +00:00
dan
4350cf540c Added french INSTALL file (wwp <subscript@free.fr>) 2001-10-08 19:21:14 +00:00
dan
dc9b99fe47 put back AM_PROG_LIBTOOL macro. some older automake/autoconf don't like the AC_PROG_LIBTOOL name, even they're aliases 2001-10-05 02:03:55 +00:00
dan
1dcb477fde replace old AM_PROG_LIBTOOL macro with AC_PROG_LIBTOOL 2001-10-05 01:55:51 +00:00
dan
7213271249 small update 2001-10-05 00:45:10 +00:00
dan
727f3e0529 added 2 missing files from distrib 2001-10-05 00:34:13 +00:00
dan
0321fad531 updated NEWS and ChangeLogs about new proplist code in WINGs before a new release 2001-10-04 23:59:44 +00:00
dan
33cc542e85 - Finished moving to the new proplist handling code in WINGs.
- Also tested the backward compatibility ability of the WINGs proplist code
  which seems to work quite well.

Starting with this moment, Window Maker no longer needs libPropList and is
now using the better and much more robust proplist code from WINGs. Also the
WINGs based proplist code is actively maintained while the old libPropList
code is practically dead and flawed by the fact that it borrowed concepts
from the UserDefaults which conflicted with the retain/release mechanism,
making some problems that libPropList had, practically unsolvable without a
complete redesign (which can be found in the more robust WINGs code).
2001-10-04 03:07:34 +00:00
dan
8bb50a6320 Added old libPropList compatibility through proplist-compat.h 2001-10-03 02:05:53 +00:00
dan
558d0fbd14 renamed proplist functions with better names 2001-10-02 00:45:25 +00:00
dan
2d6f757114 Fixed HAVE_STDLIB_H conflict in jpeglib.h 2001-09-18 11:48:15 +00:00
dan
0bf92703da Japanese language files update from Takeo Hashimoto <HashimotoTakeo@mac.com> 2001-09-17 21:10:48 +00:00
dan
0c365cfb9b Finished the proplist code. It's working now, but function names will change
for better naming.
2001-09-17 01:55:23 +00:00
dan
aedbe70f63 more updates to the proplist code 2001-09-14 00:24:15 +00:00
dan
e0f7284142 Fixed cvs code to compile 2001-09-12 23:32:58 +00:00
kojima
abc09951e1 begin wmspec stuff 2001-09-12 21:43:42 +00:00
dan
e9ce423d8c Added wcopy man page to cvs 2001-09-12 14:12:12 +00:00
dan
aae7c8b73a fixed configure check for c99 vsnprintf 2001-09-10 22:15:05 +00:00
kojima
1cd42480bf added test for C99 vsnprintf 2001-09-10 20:55:06 +00:00
kojima
e848fb0d74 fixed artifact pattern left in TrueColor dithering code (visible with
tiled gradients as wallpaper)
2001-09-10 17:23:14 +00:00
dan
680b9d7731 added snprintf.c to be linked in WINGs 2001-09-10 04:21:12 +00:00
dan
49e59ab367 more code for proplist handling (almost finished) 2001-09-10 03:56:00 +00:00
kojima
5ef342d905 fixed bug in positioning of window list menu when opened by kbd
internal code clean-up with notifications for window state change and other
stuff, also cleaned kde and gnome support in preparation for wm-spec support..
2001-09-06 21:42:28 +00:00
dan
86f3e2fdb1 more code for proplist handling 2001-09-06 14:16:11 +00:00
dan
e44cc81a03 definable cursor code updates from Jim Knoble <jmknoble@pobox.com> 2001-09-06 09:42:51 +00:00
dan
2d5a062064 preliminary code for property list manipulation 2001-09-06 00:55:18 +00:00
dan
44363ce805 new estonian po file 2001-09-05 12:33:05 +00:00
kojima
acdc0e3d6b added snprintf for backwards compat 2001-09-04 20:38:20 +00:00
kojima
dd9e7d6816 fallback wmaker.inst.in
added wcopy/wpaste scripts
2001-09-04 20:03:58 +00:00
kojima
5e6b9009a0 removed bogus patch 2001-09-04 20:02:17 +00:00
kojima
761f193b0a chinese plmenu 2001-09-04 20:00:42 +00:00
kojima
80fefd29e4 fixed crash bug on startup
added paste-launch on dock
2001-09-03 22:31:30 +00:00
dan
eecf75029f updated some .cvsignore files 2001-09-03 21:42:32 +00:00
kojima
f3e53e8a67 updated po file 2001-09-03 20:24:03 +00:00
kojima
9bfdc31051 update po files 2001-09-03 20:03:52 +00:00
dan
554f2a6842 Added spanish INSTALL file 2001-09-02 20:30:22 +00:00
dan
4a2ed2f09f new version of the 'single click' patch 2001-09-01 14:51:58 +00:00
dan
0ee6312164 A few bugfixes from users 2001-09-01 14:48:24 +00:00
dan
717392246a Small cleanup of the sigpipe handling code 2001-09-01 13:30:55 +00:00
dan
6b75506e52 small bugfixes. 2001-08-30 21:55:18 +00:00
kojima
92232f3a78 added input method stuff 2001-08-23 22:40:46 +00:00
kojima
64b168083f fixed menu editor crash when saving incomplete menus 2001-08-23 16:49:18 +00:00
kojima
fa994f627e fixed crash bug with WM_CLASS==NULL
etc
2001-08-20 18:11:40 +00:00
kojima
0e2ac9dd16 fixed crash when saving empty menu items in wprefs 2001-08-13 21:00:57 +00:00
kojima
0ee684f718 estonian translation 2001-08-06 14:19:37 +00:00
dan
e825f57f20 wrong change. reversing. =) 2001-08-02 15:09:47 +00:00
dan
a5f92da05c small change in the email notification script. checking how it works. 2001-08-02 15:07:07 +00:00
dan
41d939e32f *** empty log message *** 2001-07-30 21:47:24 +00:00
dan
c1f19bc9f7 support for the newer autoconf 2.5x 2001-07-30 21:44:15 +00:00
dan
d052b5a90c another missing file 2001-07-30 20:57:59 +00:00
dan
5908962cac added some missing files in cvs 2001-07-30 20:53:34 +00:00
dan
a1a6e2531d Patch to fix wsetfont for multibyte languages
sent by (Masahide -mac- NODA <mac@clave.gr.jp>)
2001-07-30 02:34:50 +00:00
dan
86c059db3b Update ja.po files (Takeo Hashimoto <HashimotoTakeo@mac.com>) 2001-07-26 20:15:08 +00:00
dan
46e12bffb6 Applied patch from Marcelo E. Magallon <marcelo.magallon@bigfoot.com>
to fix some more bash specific constructs in wsetfont.
2001-07-24 20:18:19 +00:00
dan
6c494f1a2e Added missing WINGs/po and doc/sk dirs/files from the released 0.65.1
tree, and updated Makefile.am and configure.in to build them too.
2001-07-24 12:05:09 +00:00
dan
c28d3d3ff9 Made cvs compilable (it was missing the following directories: WINGs/po
and doc/sk). They were disabled until added to cvs.
2001-07-23 23:57:12 +00:00
kojima
882b9a8e1c - s/sprintf/snprintf
- updated some po's
- fixed crash bug when removing WINDOWS_MENU or WORKSPACE_MENU from rootmenu
- some other stuff i forgot
2001-07-23 20:31:32 +00:00
dan
0931e14a5a Forgot to update Changelog with latest fixes. 2001-07-22 15:09:27 +00:00
dan
c687b42960 - Fixed some non-portable shell constructs used in installed scripts
(Johnny C. Lam <lamj@stat.cmu.edu>)
- Fixed crash with long titles in the window list menu
  (Alban Hertroys <dalroi@wit401310.student.utwente.nl>)
2001-07-21 20:42:04 +00:00
kojima
d4097e11c9 updated pot files 2001-07-12 22:04:12 +00:00
dan
8a6afcdcf6 Fixed a bug with the new compile time option for window numbers 2001-06-07 23:51:27 +00:00
kojima
3b00e8acaa added option to disable window enumeration 2001-06-07 14:48:34 +00:00
dan
271de3c9de Fixed a bug with the application number showing up even with the first
instance of the application.
2001-06-06 22:22:45 +00:00
kojima
d6feaa1c75 added None option to MoveDisplay and ResizeDisplay
fixed window instance enumeration bug
2001-06-06 19:48:31 +00:00
kojima
eb0e33e0f5 added None option to MoveDisplay and ResizeDisplay 2001-06-06 19:47:36 +00:00
kojima
7e1f0e1e48 fixed [joeyh@debian.org: Bug#99311: full screen maximization cuts off bottom 6 pixels] 2001-06-06 18:20:23 +00:00
dan
adfe32ea1f Changed the character-coding of plmenu.ja from ISO-2022-JP to EUC-JP - Seiichi SATO \<sato@cvs-net.co.jp\> 2001-05-31 18:08:06 +00:00
dan
058079bb19 updated estonian locale file 2001-05-30 22:37:07 +00:00
dan
0156c6f92e new italian po files. 2001-05-28 22:38:21 +00:00
dan
3ab16b3e40 Moved some string related functions from memory.c to string.c 2001-05-27 15:58:28 +00:00
dan
f955b4b61d updated the single click patch to conform with Window Maker 0.65.0's source
code

sent by: Daniel Richard G. <skunk@graphics.lcs.mit.edu>
2001-05-21 22:06:40 +00:00
dan
3fcfc9bc16 better wording for an option in the Expert panel. 2001-05-21 21:12:30 +00:00
dan
128403b487 - fixed problem with WINGs based apps exiting with a "X_RotateProperties"
related error when text was selected in a textfiled (this included
  WPrefs.app and Window Maker itself).
- replaced some malloc's with wmalloc's
2001-05-19 23:07:10 +00:00
kojima
60611fbd47 fixed bug in ScrollTableViewRowToVisible 2001-05-18 17:07:18 +00:00
kojima
7d64e19f5a fixed bug on previous bug fix for tableview overflow bug..
(yeh, i also think cvs should send only 1 mail/day to the list..)
2001-05-17 23:34:47 +00:00
dan
a4486f0cd9 Fixed compilation warning caused by wrong parameter passed to function. 2001-05-17 23:15:19 +00:00
kojima
22ae4f5a3c fixed tableview overflow bug 2001-05-17 22:30:38 +00:00
dan
bcf7358072 Fixed problem with alpha images showing a blue tint on big endian machines 2001-05-15 11:26:12 +00:00
kojima
b444894d88 finished removing focusfollowmouse from wprefs 2001-05-14 15:18:30 +00:00
kojima
205b3f35b9 removed FocusFollowMouse 2001-05-14 14:58:55 +00:00
dan
ab61c599f9 a small update 2001-05-13 23:22:21 +00:00
dan
430c12e2b2 - A few additions and enhancements to the Install script.
- Removed the --disable-sound option to the configure script.
2001-05-13 00:28:55 +00:00
dan
3208e193d7 chinese po files updates 2001-05-11 23:56:51 +00:00
dan
7848a2d03f updated estonian translation 2001-05-11 23:37:46 +00:00
dan
962d9407c1 added missing plmenu.ja to Makefile.am 2001-05-11 23:35:03 +00:00
dan
cf9975125d added notes about hermes library support for Window Maker 2001-05-10 22:45:27 +00:00
dan
28793346ab removed some C++ style comments 2001-05-10 22:24:35 +00:00
dan
19b49b3fc1 - Fixed not working Grayscale visual (was crashing)
- Fixed wrong display of images with alpha in StaticGray and GrayScale visuals
- Hermes lib is used now only to convert if the visual is TrueColor and no
  dithering is necesarry. This is because currently hermeslib doesn't
  support to convert to an indexed destination image (so it can't convert to
  PseudoColor, StaticGray and GreyScale visuals). It can convert to
  StaticColor since this visual uses masks as the TrueColor visual, but
  without dithering. Also hermeslib only supports dithering for just 2
  combinations of source/destination bits/masks, none of which are useful
  for wrlib, so no conversion that needs dithering is currently done
  through hermeslib.
2001-05-10 21:31:13 +00:00
dan
ff5680d010 Fixed displaying of images with alpha (broken by the previous commit).
The fix still doesn't look right (hermes seems to do weird things internally,
and there is no documentation for it)

People with big endian machines please test if it works for you
(install hermes lib first).
Then try to start wmaker in different screen depths (15, 16, 24, 32)
and check if there are depths that do not work (either crash, or
display other colors than you expect).

Little endian machines seem ok.
2001-05-10 15:39:02 +00:00
dan
309a9163bd Fixed calls to hermes lib to work correctly with all depths 2001-05-10 14:28:50 +00:00
dan
ddde229665 - fixed speckles (white dots) on dithered images (bug still present on the
PowerPC architecture, because on LinuxPPC char is unsigned by default, not
  signed like on the other platforms).
  Bug fixed by Philip Derrin <philipd@student.unsw.edu.au>
- miscelaneous bug fixes

We would like people with cvs access experimenting the white 'speckles' on
images to test if they still have the problem.
2001-05-10 00:16:28 +00:00
dan
19ad865f49 Fixed scrolling direction with mouse wheel for horizontal scrollers 2001-05-09 00:37:07 +00:00
dan
41c0e64eac better wording for an option 2001-05-04 02:04:13 +00:00
dan
e826a4122e - client supplied icons that were saved by Window Maker in the directory
~/GNUstep/.AppInfo/WindowMaker/ will be recreated if missing when the
  application starts.
- fixed a small memleak when the client supplied icon was extracted and saved.

Check NEWS on how to fix your old broken XPM's saved to
~/GNUstep/.AppInfo/WindowMaker
2001-04-29 21:21:39 +00:00
dan
0616167b0f - fixed a bug that made the scroller knob jump backwards when dragged (this
bug had no relation with the behavior that #define STRICT_NEXT_BEHAVIOUR
  attempts to accomplish).
2001-04-29 03:24:17 +00:00
dan
3bde6495a3 - Removed the following 3 options from configuration: SelectWindowsMouseButton,
WindowListMouseButton and ApplicationMenuMouseButton.
- Added 4 options to the configuration file for binding workspace actions to
  mouse buttons: MouseLeftButtonAction, MouseMiddleButtonAction,
  MouseRightButtonAction and MouseWheelAction. They replace the above 3
  removed options, but use a different semantic.
- mouse wheel action is runtime configurable now.

Read details about this in NEWS.
2001-04-27 23:41:17 +00:00
dan
649a7ac82c - fixed a bug in the icon chooser dialog that made the selected icon look
wrong if it had alpha blending.
- fixed a bug in WMReparentWidget()
- added WMReparentWidget() to WINGs.h
2001-04-26 02:45:28 +00:00
dan
86154ba01d A few miscelaneous fixes 2001-04-25 02:03:08 +00:00
dan
2eb1f26644 Renamed WMGetApplicationIconBlendedPixmap() to
WMCreateApplicationIconBlendedPixmap() to avoid confusion.
This is because this function does generate a new WMPixmap from the
available icon image by combining it with the specified color and you
need to call WMReleasePixmap() on the generated pixmap after you're
done with it.
This is unlike the case of WMGetApplicationIconPixmap() where it just
returns a pointer to the existing application icon pixmap that was set
before and where you don't need to release it after you're done working
with it.
To avoid this confusion about when you need to release and when not,
one is using Get (get existing, no release needed), while the other is
now using Create (generate a new pixmap, release required) in their
name.

Since this change was made to a function that was just added to the API
in the previous commit, no modification is needed to the existing
applications that use WINGs.
2001-04-24 03:35:02 +00:00
dan
4fb6cd1b1e Removed the last commit comment (a very lenghty one) that was added by
cvs to this file, probably because of the presence of a RCS $Id entry
2001-04-22 02:15:23 +00:00
dan
36e46831e0 For libwraster:
---------------

- Added retain/release mechanism to RImage by adding RRetainImage() and
  RReleaseImage(). RDestroyImage() is an alias to RReleaseImage() now, but
  will be removed in a future release because it no longer fits with the
  semantics. Will be kept for a while to allow a smoother transition.
  More about in wrlib/NEWS


For WINGs:
----------

- Small API change:
  1. Renamed WMSetApplicationIconImage(), WMGetApplicationIconImage() and
     WMSetWindowMiniwindowImage() to respectively WMSetApplicationIconPixmap(),
     WMGetApplicationIconPixmap() and WMSetWindowMiniwindowPixmap()
     They operate on a WMPixmap which is practically an X Pixmap with no alpha
     channel information and the new name is more suggestive and also leaves
     room for the new functions added for operating on images with alpha info.
  2. Added WMSetApplicationIconImage() and WMGetApplicationIconImage() which
     operate on an RImage and store alpha information too.
  3. Added WMGetApplicationIconBlendedPixmap() which will take the image with
     alpha set by WMSetApplicationIconImage() and will blend it with a color.
     If color is NULL it will blend using the default panel color (#aeaaae)
  All these changes will allow WINGs to handle images with alpha blending
  correctly in panels and wherever else needed. More about in WINGs/NEWS.
- updated panels to use the newly available RImages if present and fallback
  to old WMPixmaps if not, to properly show alpha blended images.
- replaced some still left malloc's with wmalloc's.


For Window Maker:
-----------------
- Fixed wrong mapping position of the "Docked Applications Panel" for some
  icons.
- Smoother animation for the smiley =)
- Made images with alpha blending be shown correctly in the panels and the
  icon chooser.
- The icon image set to be shown in panels ("Logo.WMPanel") will be
  automatically updated if its entry in WMWindowAttributes changes (without
  a need to restart as until now).


*** Note!!! ***

If you are developing applications with one of libwraster or libWINGs
then you should look to wrlib/NEWS and WINGs/NEWS to see what changed
and how should you update your code.
2001-04-21 07:12:21 +00:00
dan
eb11184ef0 Made the menus be mapped on the center of the screen when invoked with the
keyboard shortcuts.
2001-04-20 01:22:41 +00:00
dan
656a1c17e4 Forgot to add misc.c to the cvs tree 2001-04-19 21:12:08 +00:00
dan
b061bf9832 Put back int instead of socklen_t, because in libc5 socklen_t is not
defined making the compilation process to fail.
2001-04-19 21:09:52 +00:00
dan
ee49804d93 Setup a new cvs commit notification script that does log accumulation
and sends only one email message per cvs log message.

The email address where to send notification is no longer set in this
file (.cvsnotify), but this file can still be used to set extra email
addresses (one per line) where email should be also sent on cvs commit.
2001-04-19 20:38:56 +00:00
dan
6a1c354d3f testing new cvs notify script that does log accumulation 2001-04-19 20:27:02 +00:00
dan
1ca5543ecb testing new cvs notify script that does log accumulation 2001-04-19 20:15:51 +00:00
dan
79def3b196 new cvs notify script that does log accumulation 2001-04-19 20:10:01 +00:00
dan
1e5ca9ae9f testing new cvs notify script that does log accumulation 2001-04-19 20:08:25 +00:00
dan
c03f50530d testing new cvs notify script that does log accumulation 2001-04-19 20:06:06 +00:00
dan
010ce93e92 testing new cvs notify script that does log accumulation 2001-04-19 20:04:44 +00:00
dan
6df4a38a50 testing new cvs notify script that does log accumulation 2001-04-19 19:59:22 +00:00
dan
fd4937cd97 test for a new mail notification script 2001-04-19 19:52:50 +00:00
dan
648d75c299 - put back wmksize(), wmkrange() and wmkpoint() as functions instead of macros
- fixed some compilation warnings with -Wall
- some code cleanup
2001-04-19 01:04:48 +00:00
id
03824d5324 allow to scroll the virtual desktop further than the desktop geometry. 2001-04-18 22:12:20 +00:00
id
829e9d30fe add an option to virtual desktop 2001-04-18 22:08:34 +00:00
dan
4341224f6e Fixed label in crash panel to wrap. 2001-04-18 14:44:57 +00:00
dan
c3d2a890d7 - Fixed crashing bug when name and class were empty for a docked app.
- Removed MIN() and MAX() macros and replaced them with WMIN() and WMAX() from
  WINGs.
- Added a hint that Window Maker crashed, to allow windows to be placed
  in their correct previous positions after a crash situation and also to
  preserve their state before the crash (minimized, shaded, hidden, ...)
2001-04-18 00:25:58 +00:00
dan
10e7985961 - Made the Gnome tasklist skip the windows with the "Skip window list" flag
enabled. (patch from Bastien Nocera <hadess@hadess.net>)
- Small code cleanup in src/workspace.c
2001-04-17 01:02:21 +00:00
id
9d1306bf01 disable scrolling menu when it is in virtual desktop mode.
you have to click and drag to scroll the menu.
2001-04-16 13:33:50 +00:00
dan
5c37df521e Moved color panel testing to wtest.c and removed testcolorpanel.c 2001-04-16 00:37:34 +00:00
dan
79b17caa73 Added WMCreateBlendedPixmapFromRImage() 2001-04-16 00:10:58 +00:00
dan
3300f79501 Small update of clip colors for some style files. 2001-04-16 00:09:46 +00:00
dan
046403dbbb - added WMRemoveFromArrayMatching(array, match, cdata), which will remove the
first element in the array that is matched by match(item, cdata)==True.
- added WMArrayFirst(), WMArrayLast(), WMArrayNext() and WMArrayPrevious()
  functions and also WM_ITERATE_ARRAY() and WM_ETARETI_ARRAY() macros, to make
  interfaces to WMBag and WMArray similar and to make life a little simpler
  when iterating through all elements of an array.
- replaced bags with arrays wherever appropriate. This will improve
  performance a bit.
- replaced some recursive code with iterative code in WINGs/selection.c
- some code cleanup is src/
2001-04-15 01:22:56 +00:00
dan
a41b8993e5 Better organized the window inspector panel. 2001-04-12 00:00:06 +00:00
dan
09f4b0d409 Fixed the info panel to work well with icons different in size than the
default GNUstep.xpm
2001-04-11 21:04:31 +00:00
dan
81ccbdc743 - Fixed problem with GNOME apps that have windows which need to stay on the
desktop level.
- Fixed incorrect parsing of display and screen number from $DISPLAY.
2001-04-11 00:14:41 +00:00
dan
e0235bb61b - made "Keep on Top" in the dock/clip menu a checked menu entry. It's _much_
easier to work with it this way.
- better naming of options in the clip options menu.
- better detection of whether to use EXEC or SHEXEC in WPrefs menu editor.
2001-04-10 22:00:41 +00:00
dan
9035122c5f - Now when Window Maker calls wmsetbg to set the background, it will pass the
correct switch to it, depending on the value of the DisableDithering option.
- Replaced some functions with macros in WINGs (wmkpoint(), wmksize() and
  wmkrange()). They're less expensive to call this way.
- Fixed a memleak in the info panel.
2001-04-09 23:43:09 +00:00
id
6bbe6f2b9d fix virtual desk a bit. 2001-04-05 07:43:13 +00:00
dan
7e8bff904f Fixed secure textfields not to allow text selection, to avoid
compromising sensitive information by pasting it to a terminal.
2001-03-23 02:26:15 +00:00
dan
1a3fd2f795 - better and more robust handling of events (timer, idle, input, X) in
WMMaskEvent()
- fixed a bug where input and timer events were not treated for undefined
  periods of time under some circumstances.
2001-03-22 00:56:09 +00:00
dan
80fb289fc9 testing the notification thing 2001-03-21 05:02:17 +00:00
dan
5045cdbe60 updated Changelog about the recent move from WINGs.h to WUtil.h for handler definitions 2001-03-21 04:40:34 +00:00
dan
726ba653cf - Moved the timer, idle and input handler definitions from WINGs.h to
WUtil.h among with their callbacks and prototypes, because they're not
  GUI related
2001-03-21 04:34:24 +00:00
dan
1cdc0e4c06 added cvs notification by email on commits 2001-03-21 03:45:15 +00:00
dan
8564f5e409 testing cvs notification stuff 2001-03-21 03:41:06 +00:00
dan
a719eb98f1 added cvs notify file, with email addresses where to send email on commits 2001-03-21 03:39:27 +00:00
dan
a8da38c431 testing cvs notification 2001-03-21 03:38:01 +00:00
dan
bc3b44acaa - simpler and more straightforward event handling for timer, idle, input
and X events (also fixed some problems the old handling logic had)
2001-03-21 01:29:22 +00:00
dan
f5dcab0663 - moved WINGs's internal handlers (timer, idle and input) to handlers.c
to avoid code duplication.
- simplified wevent.c and wutil.c
- renamed WMAddEternalTimerHandler() to WMAddPersistentTimerHandler()
2001-03-20 23:46:57 +00:00
kojima
dd9fd9f12a added japanese menu 2001-03-15 22:33:22 +00:00
kojima
f91e2693f9 fixed mem leak 2001-03-15 21:13:54 +00:00
kojima
7f8d51555b fixed timerhandler cpu eater 2001-03-14 04:19:06 +00:00
kojima
c1840e943d *** empty log message *** 2001-03-14 03:58:55 +00:00
kojima
3b7b2ef6b7 *** empty log message *** 2001-03-14 03:18:16 +00:00
kojima
eab5ea31ea paranoid signal stuff 2001-03-14 03:00:34 +00:00
kojima
51b1bf34b9 fixed some signal handling bugs 2001-03-14 02:54:54 +00:00
dan
b85df20ba2 applied small fix patch from Marcelo E. Magallon <marcelo.magallon@bigfoot.com> 2001-03-12 01:56:26 +00:00
kojima
ab641e7320 removed MOUSE_WS_bla
added back easter egg
2001-03-11 18:33:19 +00:00
kojima
e3decb34cb removed useless files 2001-03-11 18:25:47 +00:00
nwanua
f8e94406df restoring copy of wtext.c to cvs (wif ssh) 2001-03-10 04:58:18 +00:00
dan
77e1b7038b testing new loginfo script 2001-03-09 02:48:32 +00:00
dan
6dafb928fe testing new loginfo script 2001-03-09 02:47:16 +00:00
dan
34c2bb0f0e testing new loginfo script 2001-03-09 02:41:29 +00:00
dan
a00fb1b2cf test for loginfo 2001-03-09 00:47:58 +00:00
dan
607bbb7e3a Fixed splitviews regarding index access (first element was never accesible) 2001-03-08 00:49:21 +00:00
dan
012d995ab1 Fixed uninitialized pointer in wtext.c 2001-02-28 05:40:45 +00:00
dan
99defe80a5 added WMGetLabelFont() 2001-02-26 14:53:30 +00:00
dan
1a1775bae0 - Made scrolling of text in dialog panel smoother
- Added WMGetPanelFont()
2001-02-26 14:51:17 +00:00
dan
c720860ed3 Fixed crashes in 24 and 32bpp after introduction of hermeslib support 2001-02-26 00:43:44 +00:00
kojima
64defd4d22 fixed scroller bug when displaying scroller before
setting initial values
2001-02-25 20:47:04 +00:00
dan
054d7cc006 wrong pointers, but code was not used so problem didn't show up anyway 2001-02-25 03:13:32 +00:00
kojima
c7f5318a41 er.. fixed some typo 2001-02-24 00:35:15 +00:00
dan
fc38d1ca16 fixed a typo 2001-02-23 01:49:06 +00:00
nwanua
9451aae632 now when a button click "links" to another page, instead of it
being destroyed right away, a timer handler queues it for 10 seconds
later (hopefully enough time for the buttons callback to have returned).
... 10 seconds may not be enough for ALL widget callbacks...
2001-02-22 07:48:28 +00:00
nwanua
ae9e955f10 added a #define for WMClearText 2001-02-22 07:32:36 +00:00
dan
f6a889910a removed no longer needed done members in panel structures. 2001-02-22 04:13:35 +00:00
dan
ae52b2a437 Fixed incorrect color retrieval 2001-02-21 04:39:04 +00:00
dan
d5ebb27e2d spelling typo fixed 2001-02-21 03:59:29 +00:00
kojima
10972f2666 adapted for SetViewExpands... 2001-02-20 23:39:06 +00:00
kojima
affcc3babd various fixes, scrollview scrollers, text painting 2001-02-20 23:38:36 +00:00
dan
4521852297 Added call to Hermes_Init() 2001-02-20 09:31:57 +00:00
kojima
58ed9abf8d new wsetfont stuff 2001-02-20 01:28:11 +00:00
nwanua
6684492033 more cursor motion and text entry fixes, esp. for graphic blocks...
also added stipple overlay for selected graphics
2001-02-19 07:22:38 +00:00
kojima
26799953c9 missing header 2001-02-18 01:01:36 +00:00
kojima
36ebcf1949 fixed wrlib version # 2001-02-18 00:46:05 +00:00
kojima
8d988e5eae Hermes support 2001-02-18 00:41:22 +00:00
kojima
e926227b3e ble 2001-02-17 22:57:04 +00:00
kojima
315136991d bla 2001-02-17 22:55:50 +00:00
kojima
57bc9c54f3 kbd shortcuts for icon dialog 2001-02-17 22:46:29 +00:00
kojima
b04c4ea500 added WINDOWS_MENU to rootmenu 2001-02-17 21:44:22 +00:00
kojima
50e85f57f2 fixed vertical scrolling bug 2001-02-16 01:34:21 +00:00
dan
d9249dd99a Removed all references to REDUCE_APPICON 2001-02-14 04:12:06 +00:00
kojima
870252297a *** empty log message *** 2001-02-14 03:23:46 +00:00
kojima
07c9bb7d8d programmatic scroller changes send notifications
fixed bug with tableview resize
made tableview column resizing
2001-02-13 23:00:14 +00:00
kojima
2172a4478e temporary removal of font changer until it's fixed 2001-02-12 19:36:00 +00:00
dan
8f0d2f9e4b Added estonian locale from Ivar Smolin <okul@trenet.ee> 2001-02-12 13:59:59 +00:00
nwanua
bc7d29d46e fixed arrow navigation quirks and color mem leaks 2001-02-12 06:09:08 +00:00
kojima
d06532cb3e added collapsing option 2001-02-11 04:29:30 +00:00
kojima
61933ceaa4 added stack cycling 2001-02-11 03:13:45 +00:00
kojima
7a491db6c1 new appicon grouping stuff 2001-02-11 02:18:26 +00:00
dan
0fae7d3e77 . 2001-02-11 01:07:10 +00:00
kojima
0667b39554 hadess gnome fix 2001-02-11 00:10:30 +00:00
kojima
de7f00d474 fixed some stuffs 2001-02-10 22:27:50 +00:00
richard
14f2db1eb2 bracket enum declarations with preprocessor defines to avoid
redefinition of the same enums.
2001-02-10 18:13:32 +00:00
nwanua
e4ce88e7f1 fixed reqBlockSize... sometimes X%Y was zero... very bad 2001-02-09 17:06:15 +00:00
nwanua
21ab029532 tiny updates 2001-02-09 17:01:51 +00:00
kojima
543a46659b aded new stuffs 2001-02-09 16:05:49 +00:00
kojima
05f2a74ef5 fixed modifier bug in textfield again 2001-02-09 16:03:09 +00:00
richard
4d8e691608 Make window stacking level changes to match GNUstep. 2001-02-09 15:56:52 +00:00
dan
40386e1d40 . 2001-02-09 03:20:54 +00:00
dan
a1fb870fe8 - Added example of using WMCOnnection for a server like program.
- Added README with a short description of what each example does.
2001-02-09 03:12:16 +00:00
kojima
9d88b14f59 tomka's i18n fixes 2001-02-08 22:43:00 +00:00
kojima
f91f2eb173 changed top widget of panels from frame to box 2001-02-08 21:54:12 +00:00
dan
15b720046b fixed a label to wrap. 2001-02-04 03:47:25 +00:00
dan
0502a80dc7 new wsetfont script updated for bulgarian from
Anton Zinoviev <zinoviev@debian.org>
2001-02-04 03:27:45 +00:00
dan
17ae285f37 Fixed a bug causing sigsegv for a WMList with more than 32767 items 2001-01-30 21:04:52 +00:00
dan
4637c09d19 - Added Jim Knoble's 'no polling' patch. 2001-01-30 03:04:02 +00:00
dan
8b7930f6c9 Removed carriage returns added by error to this file. 2001-01-26 23:27:10 +00:00
kojima
25b82b5b8c slovak stuff 2001-01-26 19:31:11 +00:00
kojima
2cf8c125a5 misc. fixes 2001-01-26 19:30:53 +00:00
dan
ff5afa20f2 . 2001-01-25 01:58:59 +00:00
dan
617525a573 New wkdemenu.pl from Malcolm Cowe 2001-01-25 00:22:07 +00:00
dan
c4f147ef01 . 2001-01-25 00:00:58 +00:00
dan
14e5cc8357 Renamed se.po to sv.po 2001-01-24 23:56:38 +00:00
dan
b21ad7ad2d Fixed non-responding panels in wmaker. 2001-01-23 03:51:46 +00:00
dan
8493be9734 Added a missing function declaration 2001-01-23 02:52:14 +00:00
kojima
070645e329 *** empty log message *** 2001-01-21 15:43:07 +00:00
richard
0bbbdcb92f Remove code disabling focus handling for GNUstep apps 2001-01-21 10:44:13 +00:00
dan
714db5cb3a Updated header file for latest changes in the function prototypes 2001-01-21 03:00:00 +00:00
kojima
e0fbdaa15e changed stuff in WMSetBoxExpandsToParent 2001-01-21 00:19:02 +00:00
dan
f9778df784 Fixed a mem leak in WMList 2001-01-19 01:45:29 +00:00
dan
a20aebdef2 - Made all changes for moving WINGs headers in the WINGs subdirectory.
- Updated get-{wings|wutil}-flags accordingly
2001-01-18 19:21:56 +00:00
dan
6a3b06e609 Finished the generic tree node data type 2001-01-18 16:59:15 +00:00
kojima
bb886be82e added responder chain alike stuff for relaying kbd events from widget to widget 2001-01-18 02:00:56 +00:00
dan
1b587b01ee Applied patch from Largo to update sound related stuff and documentation 2001-01-18 01:33:44 +00:00
kojima
b4851afbb7 *** empty log message *** 2001-01-16 16:08:40 +00:00
dan
fea4c4c84e Reverted the gnustep commented code. it seems better with the patch, but still buggy 2001-01-12 13:24:21 +00:00
kojima
5c62197542 fixed autoexpand to parent 2001-01-11 16:31:23 +00:00
dan
017f3e5e4f fixed an truncated word in a label (not enough width) 2001-01-11 03:02:31 +00:00
dan
7d88519c75 updates to the tree code 2001-01-11 02:59:32 +00:00
dan
a7ec9dab95 - Preliminary tree code
- added a key enumerator to hashtables (similar to value enumerator,
  just that it enumerates all keys in the hash)
2001-01-11 02:35:21 +00:00
dan
9a43af3d83 Fixed wrong size of the alert panel buttons 2001-01-11 01:41:14 +00:00
kojima
b6f543df77 fixed various bugs 2001-01-10 21:10:39 +00:00
dan
61675a7e19 Fixed a couple of crashing bugs generated by dereferencing of 0x0
pointers (added by the new modal loop code)
2001-01-10 04:54:22 +00:00
dan
1b41d56ad0 - updated code to use the new runmodal loop where necessary.
- made the WMRunModalLoop() reentrant (a modal panel can have its own
  modal panel and so on) by saving the modal related information when
  entering the modal loop and restoring it after.
2001-01-10 04:24:11 +00:00
dan
bc25a31733 Fix?? for the gnustep focus problem 2001-01-10 03:05:39 +00:00
kojima
22eb14c9d5 changed panel to use boxes 2001-01-09 16:45:14 +00:00
kojima
35c5908565 fixed bug in wmaker.inst 2001-01-09 15:51:20 +00:00
kojima
8ed773a437 fixed stupid bug in get-wings-flags 2001-01-07 03:53:56 +00:00
id
efb4aa5b74 remove stuffs 2001-01-07 02:59:11 +00:00
id
85e601eabc heh 2001-01-07 02:30:35 +00:00
id
2b9ffb0bdb add plugins dir to Makefile.am 2001-01-07 02:05:45 +00:00
kojima
2a67a96d86 updated timestamps.. 2001-01-07 01:34:07 +00:00
kojima
7ab70f692f fixed typo bug in WPrefs/WindozeCycling
commented out unfinished background stuff in WPrefs
added updated potfiles
fixed circulate raise
2001-01-06 23:52:00 +00:00
kojima
c6199adc29 updated galician translation 2001-01-06 22:48:11 +00:00
kojima
e314838447 fixed bug in builtin xpm loader
fixed crash bug in menu editor
2001-01-06 22:38:07 +00:00
id
bb7314ddac remove plugin 2001-01-06 18:59:12 +00:00
id
ddf5fe3abe remove plugins 2001-01-06 18:58:29 +00:00
id
8fb5a4c7fe remove drawstring plugins 2001-01-06 18:54:15 +00:00
id
142db0ae2a remove drawstring plugin 2001-01-06 18:42:42 +00:00
id
2954c53d67 add plugins in SUBDIR 2001-01-06 18:41:41 +00:00
kojima
5475530205 added updated pot files for pt/es from conectiva 2001-01-06 17:50:06 +00:00
kojima
a7d22c48b4 added item copying to menu editor in wprefs 2001-01-06 17:43:18 +00:00
kojima
c6c0954767 *** empty log message *** 2001-01-06 17:20:46 +00:00
kojima
8f1781cd4e renamed tabledelegates files 2001-01-06 17:20:04 +00:00
kojima
0b9cfd7c8e applied hadess patch for gnome panel 2001-01-06 17:05:50 +00:00
kojima
1ac8c2a6ce fixed missed sgi cc compat bug 2001-01-06 16:42:16 +00:00
kojima
3874f848c1 fixed compilation probs with SGI cc 2001-01-06 01:52:27 +00:00
kojima
d9540f37bf fixed bugs in configure.in, removed 2001-01-05 23:32:10 +00:00
kojima
f8c8382b1e put back mmx stuff 2001-01-05 22:57:12 +00:00
kojima
068c5a94b1 fixed some bugs
made click on windows that are unfocused windows focus them on sloppy/evil focus mode
2001-01-05 22:39:01 +00:00
kojima
83979b5f4c *** empty log message *** 2001-01-05 21:29:26 +00:00
kojima
b08e5b1006 new style 2001-01-05 21:28:58 +00:00
kojima
f1e5fdcf69 removed some unused compiletime option 2001-01-04 23:09:45 +00:00
kojima
0d7b4d633b some option summary text fixes 2001-01-04 23:08:40 +00:00
kojima
e99511b08c various table widget updates
and fixed in misc other ones
2001-01-02 14:17:26 +00:00
dan
e3577222a7 libwmfun is no longer a tar ball so make dist failed because of this. 2001-01-01 08:50:41 +00:00
dan
abc1ef4ed9 Latest changes 2001-01-01 08:42:25 +00:00
dan
9093cde817 Fixed the no-go-away problem with closing shaded windows. This also
fixes a memory leak (the window didn't go away because its destroy
function was not actually called. Also non-shaded windows were
unmapped, but not destroyed either, so they just apparently went away).
2001-01-01 08:39:26 +00:00
dan
a8ab51747d Added the new images to the Makefile.am too. 2000-12-31 01:33:10 +00:00
kojima
1876b4683a moved test stuff to proper location 2000-12-30 17:13:48 +00:00
id
e78741ee4c add more icons. 2000-12-30 10:06:36 +00:00
dan
c8da381337 . 2000-12-28 00:30:28 +00:00
dan
f81d0f30de Fixed a bug in scroller code related to mouse wheels 2000-12-28 00:30:09 +00:00
id
45869c37e0 fix xthing data 2000-12-25 01:25:02 +00:00
id
ad4fd02247 fix xthing 2000-12-25 01:24:43 +00:00
kojima
4c60cd5ba4 changed stringselector for enumeration selector 2000-12-21 21:06:00 +00:00
kojima
f912d9f38d tableview field editor delegates 2000-12-21 04:46:20 +00:00
kojima
5e1e94efd6 *** empty log message *** 2000-12-21 03:38:12 +00:00
id
37f811de3e ok 2000-12-17 16:23:43 +00:00
id
210ff264b9 I was trying to optimize this w/o using this, hope the change is right. 2000-12-17 14:43:08 +00:00
id
163e70bdae fix from Pascal and Alban 2000-12-17 13:56:14 +00:00
id
e541b9433b fix 2000-12-17 10:57:41 +00:00
id
bc494d2c7b fix problem on solid 2000-12-17 04:43:42 +00:00
id
ecefdc6171 fix tiny thing 2000-12-17 04:26:53 +00:00
dan
c11653f438 small fixes. 2000-12-17 03:34:15 +00:00
nwanua
327d58346f WINGs.h: missing void WMSetBrowserHasScroller(WMBrowser *bPtr, int hasScroller) 2000-12-12 23:08:52 +00:00
id
14f471815d fix 2000-12-12 07:28:20 +00:00
id
8ca4a67a24 changes related to plugin system & drawstring 2000-12-11 03:10:26 +00:00
id
2d063d279e fix fix 2000-12-09 12:16:35 +00:00
id
57d9e81c2d fix solid color for framewin with plugin 2000-12-09 08:34:07 +00:00
id
0e34a7ae28 fix solid color when using plugin. 2000-12-09 01:23:18 +00:00
id
6ff939eb6e fix 2000-12-09 01:21:52 +00:00
id
2574e2e56a fix another drawstring bug, looks like final one, indeed :) 2000-12-07 01:40:54 +00:00
dan
f47f148f10 . 2000-12-07 00:15:58 +00:00
dan
4e4f6f44e1 more administrative stuff 2000-12-07 00:15:00 +00:00
dan
e186e99789 misc management stuff 2000-12-07 00:12:57 +00:00
dan
d8d9cc4b0f These files shouldn't live in the cvs tree 2000-12-07 00:10:05 +00:00
dan
518fcb7cb9 Set library version in Makefile.am 2000-12-07 00:04:37 +00:00
id
aa280f3925 fix drawstring plugin support 2000-12-06 22:49:11 +00:00
id
756ab2c019 pass texture to plugin so it doesn't have to grab from title bar.
add experiment plugin support to menu entry, performance need to
be improved. I'm thinking of making a compressed expose event geometry.
2000-12-06 16:34:58 +00:00
id
83824dbcc3 RCombineArea* will detect the intersec geometry. 2000-12-06 03:07:51 +00:00
id
5d0157cf7b pass pixmap to the plugin. 2000-12-05 00:53:11 +00:00
id
762d37f1fb fix 2000-12-05 00:51:23 +00:00
id
eac0eff3ba wrong assert? 2000-12-05 00:43:22 +00:00
id
3a52326385 fix a big 2000-12-04 07:36:57 +00:00
id
3fdb6a6f27 fix 2000-12-04 03:14:52 +00:00
id
edcfd4a321 fix bugs 2000-12-04 02:24:54 +00:00
id
5e5730389f initiate 2000-12-03 22:27:42 +00:00
id
fa5af19285 initiate 2000-12-03 22:18:20 +00:00
id
d361ee2cc0 remove libwmfun package. 2000-12-03 20:05:28 +00:00
id
7aadc1ef00 initiate plugins branch 2000-12-03 18:58:41 +00:00
id
932cfc1bd4 drawstring plugin and a small change in vdesk 2000-12-03 14:04:08 +00:00
id
9b2ca26ce8 using unsigned for height and width cause a lot of confusion. I grab
X's header and see that XImage use int for its width and height so
I change RImage to follow that.
2000-12-03 13:37:30 +00:00
id
de969c0b5e extendable drawstring function, hopefully last change to the function. 2000-11-30 15:37:27 +00:00
id
1752587a4a Make draw string plugin more extendable in future. 2000-11-30 15:32:19 +00:00
id
867ed95485 destroy func must has the arguments to consider the right destroy sub-func. 2000-11-30 01:53:43 +00:00
id
331e85fd85 destroyDrawString 2000-11-30 00:26:59 +00:00
dan
211ccf79f4 . 2000-11-29 05:23:46 +00:00
dan
bb6182f4f7 Fixed the buryChild thingie about the zombies problem. 2000-11-29 05:15:59 +00:00
id
1a754844bb gnome panel patch code and pass full text to the plugin 2000-11-28 01:20:52 +00:00
id
4ec9827c4e oops again 2000-11-25 21:22:12 +00:00
id
1f22c07051 Add delay to send configure notify in virtual edge and
fix a bug in move window with keyboard.
2000-11-25 21:06:31 +00:00
dan
4eb26a0bd3 Some changes that try to address the zombie proccesses some people seem
to have.
2000-11-25 04:13:39 +00:00
dan
ad95610321 - removed calls to wsyserror() and wwarning() inside the WMHost and
WMConnection code. do call by yourself wsyserrorwithcode() passing
  WCErrorCode, whenever a call don't return the expected value, and
  WCErrorCode > 0. If WCErrorCode==0 that is not an system error,
  condition, so don't call wsyserrorwithcode() in that case.
- added some assertions where appropriate
2000-11-24 10:31:10 +00:00
id
a9b75e03e2 cleaning 2000-11-23 10:15:21 +00:00
dan
80d5d196c1 Added check for strcasecmp 2000-11-23 02:13:00 +00:00
id
9d44d6c177 I changed unsigned int to just int for window width because it
confused some comparitions and while other widths use int.. hope
that won't cause bugs.
2000-11-22 07:36:48 +00:00
dan
527bbcf271 - some small fixes to make it compile on werider systems. 2000-11-22 07:34:03 +00:00
nwanua
9a4037ebf1 misc. oversight fixes 2000-11-22 04:48:40 +00:00
id
6aafaaa63c auto shrink & expand vdesk 2000-11-21 19:30:16 +00:00
id
8055698df0 forget something in v edge 2000-11-20 01:57:17 +00:00
dan
9d98d884ae - Added WMSetConnectionCloseOnExec() to specify if the socket of a
connection survives or not an exec* family call. By default all
  connections created by WINGs, set the socket to be closed on an exec*
  call. Use the function if you need the reverse.
2000-11-19 23:50:38 +00:00
dan
972620c7cd - replaced WMBag with WMArray in connection.c and host.c
- added WMGetConnectionUnsentData() (WMGetConnectionQueuedData() is an
  alias too)
2000-11-19 20:08:14 +00:00
id
b0506c3737 Changes relate to virtual edge. 2000-11-19 10:33:41 +00:00
dan
9bd00e5cd2 - Added readme about handling ConnectionDidDie or ConnectionDidTimeout
notifications.
2000-11-19 00:16:37 +00:00
id
816ce22875 Changes relate to virtual edge. 2000-11-17 02:10:32 +00:00
dan
899226207d - Fixed a flickering problem with the scrollview.
- Use of uppercase letters when getting keysyms
2000-11-16 18:07:12 +00:00
nwanua
2d20abd00e WMReplaceTextSelection is now implemented 2000-11-16 01:43:32 +00:00
kojima
e4dbd1fe0d fixed tab view clicking 2000-11-13 13:22:22 +00:00
kojima
d7f924c5e7 added new style 2000-11-12 15:06:27 +00:00
dan
2c5809c383 . 2000-11-12 04:40:09 +00:00
dan
fad7c5d3ec missing function declaration 2000-11-12 04:34:03 +00:00
kojima
b74fad4bd6 fixed msg texts 2000-11-12 04:03:30 +00:00
kojima
dc67e81437 added table widget 2000-11-12 03:29:53 +00:00
kojima
29ceeb870d *** empty log message *** 2000-11-12 03:28:56 +00:00
kojima
52308a0abc fixed bugs of resized widgets 2000-11-11 18:08:10 +00:00
id
4d41658e1a fix a typo. 2000-11-11 17:58:16 +00:00
nwanua
bb9a2e7445 FindInTextStream completed for forward, backward, case (in)sensitive searches 2000-11-11 01:03:56 +00:00
dan
cd57646835 Put back check for root menu. 2000-11-10 18:20:34 +00:00
nwanua
7d463ca48d added support for Getting and Setting Selection Fonts/Colors/Underline... 2000-11-10 07:24:49 +00:00
dan
b0dbbb3536 - fixed uncompilable tree.
- wrong parameter passed in some tabview function.
2000-11-09 21:22:47 +00:00
kojima
336e2c3678 added ScreenSwitchKey 2000-11-09 17:43:03 +00:00
kojima
d9d5a52200 added shortcut to switch screens 2000-11-09 17:42:20 +00:00
kojima
1863d60e3a added WMAddTabViewItemWithVie() 2000-11-09 14:07:48 +00:00
kojima
6bb9c58de1 removed default autowrap from button and label 2000-11-09 13:19:42 +00:00
kojima
47e4e31ba0 *** empty log message *** 2000-11-09 05:02:37 +00:00
kojima
19160e8dfd added box widget 2000-11-09 05:01:58 +00:00
dan
366bf50d3c forgot to update the changelog about wmessage() 2000-11-06 23:15:21 +00:00
dan
debd7ef5e8 Added wmessage() for printing a variable formatted message to stderr
with the program name prepended to it.
2000-11-06 23:13:14 +00:00
dan
77670119a1 Optimized some of the previous changes related to order of evaluation. 2000-11-06 14:36:22 +00:00
dan
e7ce6468fc - fixed code in wrlib dependant on the order of evaluation.
code like
    *ptr++ = *ptr++ = *ptr++ = color;
  is wrong, because there is no guarantee that ptr will be incremented
  _between_ the assignment operations. it can be incremented after all
  assignment operations as well. Because of this both of these are valid
  implementations for a compiler:
    a. assign, increment, assign, increment, assign, increment
    b. assign, assign, assign, increment by 3
  In case b. only the first memory location of the 3 will be modified, being
  assigned 3 times the same value, while the other 2 remain unchanged.
  For example egcs-2.91.66 (and possibly gcc-2.95.x too) implement this in
  the second way (like in case b.)
  Also the order in which the assignement is made is undefined (left to right
  or right to left).

this fixed the problem we had with greyscale jpegs showing up in red,
and possibly other problems related to pseudocolor and greyscale displays.
2000-11-06 04:21:25 +00:00
dan
f7b4e85525 - added the wraster lib dependancies at link time, so they will be
written in the libwraster.la file allowing automatic linking against
  all the libs libwraster depends upon without specifing them again when
  linking programs that use libwraster. -lwraster will be enough.
2000-11-06 03:24:30 +00:00
nwanua
d2decce5e7 Fixed those // comments 2000-11-04 04:06:35 +00:00
dan
a1dc24bab1 Another // comment 2000-11-04 03:53:19 +00:00
nwanua
d00e72bc45 - Changed ConvertFont et al. to WMEmphasizeFont, and added WMNormalizeFont() 2000-11-04 03:47:39 +00:00
nwanua
731656cbed nwanua tests logging 2000-11-04 03:27:26 +00:00
dan
857b56c502 Fixed some // style comments 2000-11-04 03:24:34 +00:00
nwanua
902e985a53 - Test of log 2000-11-04 03:16:25 +00:00
nwanua
fae5a42f65 - Made changes to reflect API changes in wtext.c 2000-11-04 03:10:49 +00:00
nwanua
3ad4bf5ad8 *** empty log message *** 2000-11-04 02:45:23 +00:00
nwanua
54a46fa513 *** empty log message *** 2000-11-04 00:58:42 +00:00
nwanua
decf2571a8 *** empty log message *** 2000-11-03 07:44:59 +00:00
nwanua
5f746a3efa *** empty log message *** 2000-11-03 02:33:29 +00:00
dan
a81a0685ef - added a new version of wstrappend() with different behavior from the
old one (the one renamed to wstrconcat). The new wstrappend(dst, src)
  will modify and return dst, without creating a new string to hold the
  result, except if dst==NULL, in which case its equivalent to calling
  wstrdup(src)
2000-11-02 02:51:53 +00:00
dan
2bd2b72af9 - renamed wstrappend() to wstrconcat().
be sure to replace wstrappend() with wstrconcat() anywhere in your code
because a new wstrappend() function will be implemented that will have
different semantics and if your code will use the new one instead of
the old will break.
2000-11-01 15:40:15 +00:00
nwanua
1a8c578a1c *** empty log message *** 2000-11-01 03:41:49 +00:00
dan
d40425c388 Fixed mem leak in browser code. 2000-11-01 03:40:36 +00:00
nwanua
84ba62ba6b *** empty log message *** 2000-11-01 02:54:50 +00:00
nwanua
a20c49b80f *** empty log message *** 2000-11-01 00:51:37 +00:00
dan
497e34b6b8 - Replaced all free() with wfree() where appropriate
- Fixed some memory leaks
2000-10-31 14:57:22 +00:00
dan
581ab58f70 . 2000-10-28 01:45:29 +00:00
nwanua
9903bf9ca8 *** empty log message *** 2000-10-27 00:10:55 +00:00
dan
af5e3da105 Fixed scrolling directions for mice wheels. 2000-10-26 23:52:07 +00:00
nwanua
b1baf21532 *** empty log message *** 2000-10-26 23:08:18 +00:00
dan
99ce8b2d85 Fixed wtrimspace() whih had wrong behavior. 2000-10-25 22:41:03 +00:00
nwanua
e215328d81 lotsa new features 2000-10-16 15:38:41 +00:00
dan
172da48a60 Gah!. New incompatible change in wtext.c broke the compilation of code
using WMText widget
2000-10-15 00:11:41 +00:00
nwanua
9b0e0c6c54 lot's a cleavage... 2000-10-14 01:45:16 +00:00
dan
2bc40c47eb Fixed compilation problem 2000-10-12 19:21:30 +00:00
kojima
275a2a3782 added scrolled notifcation to scroller
added GetVisibleRect function to scrollview
2000-10-11 16:21:50 +00:00
dan
bdaacb6daa Fixed bug with WPrefs not selecting the menu appearance options after startup 2000-10-08 23:29:11 +00:00
dan
88ed406e08 . 2000-10-03 22:29:25 +00:00
dan
6fd8101b73 small update 2000-10-03 22:22:40 +00:00
dan
bba6dd1670 - WMDestroyWidget() now first calls WMUnmapWidget()
- decided behavior of list selection while scrolling
2000-10-03 22:20:00 +00:00
dan
ed39c92de0 Code to allow multiple selection in WMBrowser 2000-10-03 20:52:15 +00:00
dan
b24b51b514 Small fix 2000-10-03 12:44:05 +00:00
dan
eeda795db1 Added select while scrolling the list, when the mouse pointer leaves
the list area, at either top or bottom having the mouse button pressed.
2000-10-03 12:38:23 +00:00
dan
c7a0cd924e Added a function alias WMDuplicateArray() -> WMCreateArrayWithArray() 2000-10-02 12:37:55 +00:00
dan
399439d338 Better behavior for the multiple selection in lists. 2000-10-02 11:43:28 +00:00
dan
7cf93ae49d *** empty log message *** 2000-10-02 07:01:27 +00:00
dan
de99155948 - Fixed some issues with WMBrowser and the file panel that were
introduced by the latest changes in the WMList code (multiple and empty
  selection).
- added WMSetBrowserAllowMultipleSelection(), WMSetBrowserAllowEmptySelection()
  WMBrowserAllowsMultipleSelection() and WMBrowserAllowsEmptySelection().
2000-10-02 06:59:18 +00:00
dan
b2478b634f - the list multiple selection code is working now. it still needs some
minor work and cleanup.
- made some bag and array functions to return void instead of int.
- a few new array functions.
- better handling of mouse wheel.

!!! make clean after this update before you rebuild. some enums changed.
2000-10-01 23:26:03 +00:00
nwanua
6de1c41865 FindTextInStream completed 2000-10-01 07:38:57 +00:00
dan
e4d59476c7 *** empty log message *** 2000-10-01 04:29:55 +00:00
nwanua
56ff625a5c *** empty log message *** 2000-10-01 04:29:28 +00:00
nwanua
dae28629bb *** empty log message *** 2000-10-01 03:49:00 +00:00
dan
8ae0b5cc1d fixed some buffer overflow bugs 2000-10-01 03:20:08 +00:00
dan
7350f7826d Fixed buffer overflow problems 2000-10-01 03:05:25 +00:00
dan
d892cd0ea1 Fixed a duplicate PLRelease() call. 2000-10-01 02:43:31 +00:00
nwanua
1d0a374bd4 i 2000-10-01 01:49:47 +00:00
dan
dde0b00fe5 *** empty log message *** 2000-09-30 03:54:46 +00:00
dan
4fd5e0cad1 Window placement fix 2000-09-30 03:47:49 +00:00
dan
cd6639ccc7 Fix for incorrect automatic palcement of windows if there were shaded
windows on the other workspaces.
2000-09-30 03:46:07 +00:00
dan
e3fa161340 small update to list selection code. 2000-09-29 08:19:20 +00:00
dan
12c26a1cc5 Fixed some paths after the WINGs directory reorganization 2000-09-29 07:48:43 +00:00
nwanua
94b17e2d15 *** empty log message *** 2000-09-29 07:39:56 +00:00
nwanua
81f5124cec *** empty log message *** 2000-09-29 04:50:56 +00:00
nwanua
770c3507ed removed testtext.c 2000-09-29 04:50:32 +00:00
dan
67642b7c20 Better behavior of mouse wheel actions (Control and SHift are now
accepted as modifiers to select how much it will actually scroll on
each mouse wheel event).
2000-09-29 02:30:55 +00:00
dan
358e3346c3 update changes 2000-09-29 02:20:35 +00:00
dan
aee58cbd36 WMList compiles now, single selection seems to be ok (as it used to be) but
multiple selection is not yet complete.
2000-09-29 02:12:40 +00:00
dan
539fb32795 Small fix for an enum 2000-09-28 22:32:36 +00:00
dan
60a01b0f58 - More code for multiple selection in WMList.
- Better handling of mouse wheels (Shift and Control modifiers are used to
  select how muct to scroll on mouse wheel movement).
2000-09-28 14:06:50 +00:00
dan
bb8065ebc9 ... 2000-09-28 12:08:46 +00:00
dan
44fd05f1c3 Fixed bug related to incorrect reading of ppm files. 2000-09-28 12:07:38 +00:00
dan
8382063736 Fixed some typos. 2000-09-28 03:11:36 +00:00
dan
6973f07f30 Remake of the WMList code to allow multiple selection. Not complete yet.
It will not even compile. I Will finish it later today.
2000-09-28 03:09:57 +00:00
dan
df357ae1de New patch against 0.62.1 2000-09-27 22:20:21 +00:00
kojima
3de3009cee added wtokennext() 2000-09-26 22:44:38 +00:00
dan
ce8b816c5d Sorting functions return void now instead of int. 2000-09-26 10:54:37 +00:00
dan
4193d2265d - Added WMSetWindowUserPosition()
- Replaced FlattenStringList() and TokenizeString() with wtokenjoin()
  respective wtokensplit() from WINGs
2000-09-26 00:35:33 +00:00
dan
7b3c10b07d Replaced malloc by wmalloc 2000-09-25 23:31:08 +00:00
kojima
edc57cf7a1 added some new functions 2000-09-25 19:21:45 +00:00
dan
8cbe55ade1 Removed duplicate function definition 2000-09-25 19:07:55 +00:00
kojima
4acd090c54 added hungarian translation 2000-09-25 18:41:13 +00:00
kojima
9c9f7e6c0c new hide/unhide functions 2000-09-25 18:40:56 +00:00
dan
53a65d5bf8 Use wfree instead of free. 2000-09-25 17:46:59 +00:00
kojima
82168fcc3b fixed bug fix for WM_COMMAND 2000-09-25 17:36:57 +00:00
kojima
065d86f9c5 update 2000-09-25 17:33:53 +00:00
dan
7f74ea8081 Small bugfix, and more updates to typedef'ed functions. 2000-09-25 02:00:55 +00:00
dan
23ac6cc088 Added some typedef'ed functions for readability. 2000-09-25 01:42:06 +00:00
dan
3b9b020c5c Fixed a pointer deallocation problem 2000-09-25 00:51:51 +00:00
dan
ccbb6e8e15 Fixed some bugs, and compilation warnings. 2000-09-24 02:31:58 +00:00
dan
41ff127444 - Fixed WMArray.
- Changed WMList to use WMArray instead of WMBag
- Fixed compilation problems in WPrefs.app
2000-09-23 03:49:58 +00:00
dan
18b7dcc2b0 Fixed a problem related to the order in which the header files are included. 2000-09-22 18:14:20 +00:00
kojima
6760c39881 menu commands that have a = in it, executed with SHEXEC 2000-09-21 14:22:59 +00:00
dan
7e3f885aa4 Removed broken testtext from compilation. nwanua plese fix it before enabling 2000-09-21 12:01:49 +00:00
dan
40e67dfce0 Removed some redundant code. 2000-09-21 01:25:47 +00:00
nwanua
ac4997e739 including parser in wtext.c 2000-09-20 04:26:31 +00:00
dan
a3cd52ba05 Compress expose events 2000-09-20 01:14:03 +00:00
dan
c1a77f233f Finished the WMArray class 2000-09-20 00:30:45 +00:00
dan
468f578345 WMArray class is almost ready. 2000-09-19 02:05:45 +00:00
dan
85702115f3 Some more functions for the array class 2000-09-17 21:52:24 +00:00
kojima
3be86a5778 fixed bug in RCOmbineAreaWithOpaq 2000-09-15 14:44:19 +00:00
dan
9f98db6791 Some more code to the WMArray class 2000-09-15 09:42:22 +00:00
dan
e01ef57d4b Removed some unused code from the treebag 2000-09-15 05:02:01 +00:00
dan
595d2b060b Removed array bag, and restructured the tree bag to be WMBag 2000-09-15 04:57:31 +00:00
dan
446e260186 Bulgarian po and menu files 2000-09-14 22:10:30 +00:00
dan
275aacc237 Updated .cvsignore files 2000-09-13 20:21:57 +00:00
dan
7832b2a4cf Rearranged the structure of the WINGs subdirectory.
Created Documentation, Examples and Tests subdirectories.

Run update-autoconf after this update.
2000-09-13 20:19:05 +00:00
nwanua
4ad4480c55 misc. changes 2000-09-13 14:45:50 +00:00
nwanua
01332a48c6 now using 0xFA + size to mark graphic in the bag. 2000-09-13 02:04:22 +00:00
nwanua
d412240200 all new stuff 2000-09-12 02:10:08 +00:00
nwanua
cc3bbcaf4c Text Selection 99% complete, replaceSelection added 2000-09-01 17:58:29 +00:00
kojima
f813ff12d4 updated supported platforms info 2000-08-22 13:42:12 +00:00
kojima
d157320dfb workaround for 8bpp problem with std colormap creation 2000-08-16 23:05:19 +00:00
kojima
8c35d57144 updated credits for icon 2000-07-30 14:12:07 +00:00
kojima
5652f7b7cd added romanian menus 2000-07-25 00:07:44 +00:00
dan
07a7632a96 *** empty log message *** 2000-07-21 18:08:27 +00:00
nwanua
c79c8aa74d commiting WINGs.h 2000-07-21 15:29:51 +00:00
nwanua
70f8f029b1 just adding testtext changes 2000-07-21 01:06:54 +00:00
nwanua
ab7c77b07d nice additions 2000-07-21 01:06:20 +00:00
nwanua
dbbddf95e2 removed compile warnings in wmtext :-) 2000-07-20 16:51:54 +00:00
nwanua
ec6dce9c42 WMSetTextSeelctionFont/Color 2000-07-17 00:12:29 +00:00
kojima
6ec980095a fixed some bugs in menu editor 2000-07-16 06:29:12 +00:00
kojima
1a7c397d57 "finished" new menu editor 2000-07-16 04:05:49 +00:00
dan
ca837d793f Replaced USPosition with PPosition because is a programmatically
requested position.
2000-07-16 02:35:49 +00:00
dan
c08d8df66e Fixed USPosition mapping problem. 2000-07-16 02:26:56 +00:00
kojima
ce7db48e25 fixed problem with motion event compression 2000-07-16 01:08:13 +00:00
nwanua
ee0fa6ec7d added testtext 2000-07-15 23:18:59 +00:00
nwanua
802493b7e6 just some new changes... 2000-07-15 23:08:33 +00:00
kojima
2f68b51290 *** empty log message *** 2000-07-15 22:53:53 +00:00
kojima
6f0d835bdb new menu editor code 2000-07-15 22:48:31 +00:00
kojima
9a89e6cc18 added string utils 2000-07-15 22:08:25 +00:00
kojima
dcd44b17b1 more updates to editable menu 2000-07-15 22:00:41 +00:00
kojima
2dd7218dfa WMRootMenu is now plmenu instead of a text menu 2000-07-15 08:14:12 +00:00
kojima
b3dee733bb default WMRootMenu is now a proplist menu instead of text 2000-07-15 08:12:33 +00:00
kojima
bb6acdad3c added close button to editable menu 2000-07-14 15:16:46 +00:00
kojima
6d5f1817d3 new menu editor updates 2000-07-14 05:48:35 +00:00
nwanua
12f03e5ac4 added fontmanager.c 2000-07-13 23:54:20 +00:00
nwanua
d3d0304107 changes to wmtext 2000-07-13 23:48:54 +00:00
nwanua
1027573bd7 added testtext - Nwanua 2000-07-13 23:48:02 +00:00
kojima
e958044d00 updated editable menu widget 2000-07-10 22:49:07 +00:00
kojima
e29fce43b1 - added WMGetLabelText()
- added WMReparentWidget()
- added WMCreateTabViewItem()
- added W_CreateUnmanagedTopView()
- fixed deletion from tree bag
2000-07-10 22:37:39 +00:00
dan
4cb5649545 Gaaah!
This thing is completely broken! There are functions that take a
completely different set of arguments than the ones currently used to call
them. There are even functions that are not defined anywhere but
called from wtext.c

Please fix it before re-enabling it in Makefile.am
2000-07-06 01:28:13 +00:00
kojima
fcab535c38 fixed lots of compile bugs in wtext.c and made a few api changes to it 2000-07-05 04:16:53 +00:00
dan
b50d6e566c Small fix. 2000-06-24 22:43:07 +00:00
dan
19a92de3e6 *** empty log message *** 2000-06-22 23:22:54 +00:00
dan
72538ed380 testtext.c doesn't compile. And it seems to require WINGsP.h which is
bad, bad, bad
2000-06-22 23:20:51 +00:00
dan
f0921472a8 I have nothing more to say about this. 2000-06-22 23:18:30 +00:00
dan
165b96f30f Gah, never say never. 2000-06-22 23:17:12 +00:00
dan
9d4dae947b Guess what? Yep, another wmtext update. Now this was all, please go to
your homes.
2000-06-22 23:01:27 +00:00
dan
c87c53fbe5 Yet another fix for the wmtext class. Thank you, thank you, thank you. 2000-06-22 22:55:36 +00:00
dan
4f3c453c12 Fix for compilation of ruler 2000-06-22 22:52:57 +00:00
dan
6de30498da Modified ruler stuff 2000-06-22 22:49:50 +00:00
dan
6f912eded3 Added new wruler.{c,h} files from nwanua 2000-06-22 22:26:43 +00:00
dan
738c72324b Added a missing enum that made compilation fail 2000-06-22 22:06:33 +00:00
kojima
ab801f3141 new rootmenu header 2000-06-21 22:26:15 +00:00
kojima
4905ab1986 renamed ParseCommand() to TokenizeString()
added rootmenu reader rewrite start
2000-06-21 22:25:10 +00:00
kojima
c49ad9cac8 added text widget from nwanua 2000-06-20 23:27:37 +00:00
kojima
e410e1862b fontset name guess when using multibyte 2000-06-17 19:07:57 +00:00
dan
4b2b2bcac3 Added spanish plmenu 2000-06-16 00:16:35 +00:00
dan
61b169f497 Added runtime option that lets one to set a small border around the
workspace that will not be covered by windows when maximizing, and thus
allowing easy access to the clip or menus using the mouse in this
border area, even when the screen is covered by windows maximized in
both horizontal and vertical directions.

A make clean is needed in src/ because new members were added to the
WPreferences structure in WindowMaker.h
2000-06-15 18:39:06 +00:00
kojima
ebf002b8d5 fixed redraw problem when frame title changes 2000-06-09 02:15:38 +00:00
dan
983e154118 - Fixed a bug with #define DEBUG (code didn't compile in that case) 2000-06-05 23:41:26 +00:00
kojima
15f9713a84 fixed crash bug when a texture cant be rendered 2000-06-04 02:09:10 +00:00
kojima
d869445950 - changed behaviour of control/shift double click on titlebar for maximize 2000-05-24 23:51:59 +00:00
dan
9e7242abe5 *** empty log message *** 2000-05-24 22:48:55 +00:00
dan
56cacb9336 Fixed the mdgradient code.
P.S. Please, that piece of code is perfectly valid, there's no need to
break it every month. There is nothing wrong with it, still it was
changed (and simultaneously broken) 4 or 5 times already.
That code use a smart trick to draw the multi diagonal gradient using
integer operations, that is perfectly valid and moreover is much faster
than the classical floating point calculation algorithm that was used
before, so there is no need to randomly 'fix' it every now and then.
If you don't understand how it works please ask.
2000-05-24 22:47:54 +00:00
kojima
3e0c6920a9 added it 2000-05-23 21:22:38 +00:00
kojima
d4c23fba79 added image browser start 2000-05-23 21:18:49 +00:00
kojima
05339d0d63 added start of gui wmaker.inst 2000-05-23 21:14:57 +00:00
kojima
e44130b51a few changes to WPrefs/appearance to accomote igradient 2000-05-22 03:24:40 +00:00
kojima
58b36ec1b3 added wmagnify 2000-05-22 03:09:20 +00:00
kojima
79ae37a35c added options to change default fonts 2000-05-21 23:56:33 +00:00
kojima
6947fd7b64 added new style 2000-05-21 16:35:13 +00:00
kojima
1e351cb59b added igradient texture
fixed some bugs
2000-05-21 16:34:23 +00:00
kojima
71f735069a *** empty log message *** 2000-05-21 16:15:56 +00:00
kojima
e7771be157 added interwoven gradient 2000-05-21 15:33:27 +00:00
dan
16949246ee *** empty log message *** 2000-05-16 12:11:29 +00:00
kojima
cdb148df48 added new style 2000-05-15 10:57:34 +00:00
dan
0ae1ecc05f Made the floppy path in the file panel be configurable via the FloppyPath
key in the WMGLOBAL file, instead of the '/floppy' hardcoded value.
2000-05-10 12:30:34 +00:00
dan
139b34c7af Mouse wheel code enhancement (need to check if its correctly implemented) 2000-05-08 22:15:05 +00:00
dan
27838589a5 Added connection opening timeout handling 2000-04-27 04:26:15 +00:00
dan
886e65f83e *** empty log message *** 2000-04-19 20:29:52 +00:00
dan
1e519308d3 *** empty log message *** 2000-04-19 19:57:20 +00:00
dan
5852c7506f fix for a possible crash in some circumstances, caused by an illegal mem
acccess.
2000-04-19 14:54:34 +00:00
dan
f3ed042f0c Small cleanup 2000-04-18 18:09:35 +00:00
kojima
3b28027dce repaint label after color change 2000-04-18 03:31:36 +00:00
dan
badfd68aef networking code fixes 2000-04-17 21:52:14 +00:00
dan
cf3bb1fd0e Bug fix in the networking code 2000-04-17 21:24:58 +00:00
dan
74bbc24da2 Fixed a really stupid crasing bug caused by those (unsigned char*) pointers
to data.
2000-04-14 06:18:38 +00:00
dan
a6e19eed31 *** empty log message *** 2000-04-14 03:55:26 +00:00
dan
fbc2c75c8a Small fix to the mouse wheel code 2000-04-13 21:40:57 +00:00
dan
5c76167098 Initial mouse wheel code. 2000-04-13 21:24:28 +00:00
dan
b188d55bbe Removed include of nana.h 2000-04-12 10:43:43 +00:00
dan
e222ba21bc Listed keys in wrong proplist 2000-04-12 02:16:01 +00:00
dan
c5f05b2815 *** empty log message *** 2000-04-12 01:46:43 +00:00
dan
51a638e821 Added a function to get all keys in a user defaults database (for databases
with dynamic contents, where the keys are not known in advance, like a
user = password; type UD database).
2000-04-12 01:45:42 +00:00
kojima
ccd419500f removed #include <nana.h> 2000-04-12 01:11:35 +00:00
kojima
5d855a167a updated portuguese po 2000-04-10 15:11:59 +00:00
dan
b5c565d21b removed again Makefile.in 2000-04-10 14:26:55 +00:00
kojima
9aa1d138a6 memory stats in info panel 2000-04-09 23:55:46 +00:00
kojima
c08022a088 updated upzzle, removed SetWindowInitialSize added SetWindowAspectRatio 2000-04-09 23:06:55 +00:00
kojima
779cdb0dd4 added quick&dirty game 2000-04-09 21:46:54 +00:00
dan
27e161cea4 Removed un-needed member in the data structure. 2000-04-09 02:57:39 +00:00
dan
b37b0fd9f1 small correction to previous patch 2000-04-09 02:42:32 +00:00
kojima
0fd531df43 fixed restart crash bug
updated kwm hint
made kwm&gnome hints mutually exclusive (for read)
2000-04-09 02:36:48 +00:00
dan
b8ca9e2b64 Fixed behaviour of WMData objects regarding the destructor.
Merged WMCreateDataWithBytesNoCopy with WMCreateDataWithBytesAndDestructor.
2000-04-09 02:32:17 +00:00
kojima
0b87b7fab9 fixed crash on restart bug 2000-04-08 23:53:22 +00:00
kojima
bdd5d5342b fixed crash on restart 2000-04-08 23:13:25 +00:00
dan
3e7eb14a22 *** empty log message *** 2000-04-08 03:48:59 +00:00
kojima
fa9bfc9794 updated get/setstyle for new options 2000-04-07 23:20:41 +00:00
kojima
caa86529a9 more dnd changes
window cycling stuff
finnish pot files
2000-04-07 22:47:04 +00:00
kojima
6b93946309 added option for std cmap creation in wrlib 2000-04-07 22:43:26 +00:00
kojima
af3f33ecb9 fixed prob with window shortcut state saving 2000-04-05 17:35:33 +00:00
kojima
11bf9c8038 dnd changes 2000-04-05 00:29:10 +00:00
kojima
8ccb875468 fixed user whining bug 2000-04-04 03:10:40 +00:00
kojima
760c552584 dnd changes 2000-04-04 02:27:45 +00:00
kojima
2c0fdba09e added extension for mouseoffset in dnd 2000-04-03 15:23:32 +00:00
kojima
2905590520 updated selection stuff 2000-04-03 14:53:00 +00:00
kojima
d912ddd743 dnd test fix 2000-04-03 14:14:14 +00:00
kojima
567e53c67c added drag and drop 2000-04-03 06:08:31 +00:00
kojima
60a247f271 drag and drop!
selection code rewrite!
textfield with new selection code!
etc etc
2000-04-03 03:10:20 +00:00
dan
a5f7e65111 Use a var for libPropList version in configure.in (easier to update). 2000-04-02 21:15:32 +00:00
kojima
cc22ef1f20 removed stale makefile.in
added finnish menus
2000-04-02 20:47:28 +00:00
kojima
97afbce72e updated finnish translation
made make install only install icons of suported format
2000-04-02 20:41:48 +00:00
kojima
47e33ab485 little change in 8bpp code 2000-04-02 20:30:57 +00:00
kojima
2c16005643 check for libproplist 0.10.1 2000-04-02 20:27:07 +00:00
kojima
ee21c5bea6 changed iface of WMFindInBag 2000-04-02 20:16:30 +00:00
dan
fc2a87c645 *** empty log message *** 2000-04-02 18:06:15 +00:00
kojima
379df781b2 temporary fix to windw cycle bug 2000-04-02 00:10:20 +00:00
kojima
449a5fde76 fixed misc bugs 2000-04-02 00:04:06 +00:00
kojima
ead4f5d3e1 *** empty log message *** 2000-04-02 00:02:44 +00:00
kojima
8c69765725 bla 2000-04-02 00:01:30 +00:00
kojima
0c010ba778 fixed insert 2000-04-01 23:56:37 +00:00
kojima
32160ff66f added code to store lowered state of menus
compat code for XInternAtoms
2000-04-01 02:16:14 +00:00
kojima
e7f7030e1b fixed #includes 2000-04-01 02:14:12 +00:00
kojima
5b05c9607c added compatib. code for XInternAtoms 2000-04-01 02:12:25 +00:00
kojima
036086daa4 added check for XInternAtoms 2000-04-01 02:11:33 +00:00
kojima
7ab059a165 removed // comments 2000-03-31 14:38:53 +00:00
kojima
e3b9e3917a removed // commenst 2000-03-31 14:35:33 +00:00
dan
58e0b92fe2 Added a small script to help in generating the autoconf/automake/libtool
files quickly
2000-03-31 00:49:20 +00:00
dan
cf65d791ab 0.62.0 release preparation 2000-03-30 23:32:36 +00:00
738 changed files with 202367 additions and 144041 deletions

View File

@@ -1,6 +0,0 @@
Makefile Makefile.in
aclocal.m4
configure config.log config.cache config.guess config.status config.sub
libtool ltconfig ltmain.sh
.psrc .inslog2 tca.map tca.log
*.rpt

77
.gitignore vendored Normal file
View File

@@ -0,0 +1,77 @@
*.lo
*.o
*Makefile
*Makefile.in
.deps/
.libs/
INSTALL
aclocal.m4
autom4te.cache*
config-paths.h
config.guess
config.h
config.h.in
config.h.in~
config.log
config.status
config.sub
configure
depcomp
install-sh
libtool
ltmain.sh
missing
mkinstalldirs
stamp-h1
contrib/WindowMaker.spec
m4/
src/wconfig.h
src/wmaker
test/wtest
util/convertfonts
util/geticonset
util/getstyle
util/seticons
util/setstyle
util/wdread
util/wdwrite
util/wmagnify
util/wmaker.inst
util/wmgenmenu
util/wmmenugen
util/wmsetbg
util/wmsetup
util/wxcopy
util/wxpaste
wrlib/get-wraster-flags
wrlib/libwraster.la
wrlib/tests/testdraw
wrlib/tests/testgrad
wrlib/tests/testrot
wrlib/tests/view
wrlib/wrlib.pc
WINGs/Examples/colorpick
WINGs/Examples/connect
WINGs/Examples/fontl
WINGs/Examples/puzzle
WINGs/Examples/server
WINGs/Extras/libExtraWINGs.a
WINGs/Extras/libExtraWINGs.la
WINGs/Extras/test
WINGs/Tests/testmywidget
WINGs/Tests/wmfile
WINGs/Tests/wmquery
WINGs/Tests/wtest
WINGs/WINGs.pc
WINGs/get-wings-flags
WINGs/get-wutil-flags
WINGs/libWINGs.a
WINGs/libWINGs.la
WINGs/libWUtil.a
WINGs/libWUtil.la
WPrefs.app/WPrefs
WindowMaker/Defaults/WMRootMenu
WindowMaker/Defaults/WMState
WindowMaker/Defaults/WMWindowAttributes
WindowMaker/Defaults/WindowMaker
WindowMaker/IconSets/Default.iconset

14
AUTHORS
View File

@@ -68,6 +68,9 @@ Various bugfixes
Ullrich Hafner <hafner@bigfoot.de>
Better detection of gfx libraries, added IconTitleColor/IconTitleBack
Matthew Hawkins <matt@mh.dropbear.id.au>
former temporary project maintainer
Greg Hayes <sdc@choice.net>
Twisted miniaturization animation
@@ -102,11 +105,14 @@ EMACS/keypad like cursor movement for WINGs textfield
Jim Knoble <jmknoble@pobox.com>
made autoarrange icons a runtime option, SHADOW_RESIZEBAR c-time option,
no workspace switch to the same workspace, dashed icon selection,
misclellaneous bug fixes, definable cursors..
misclellaneous bug fixes, definable cursors, --no-polling command line option.
Alfredo K. Kojima <kojima@windowmaker.org>
The JED Text Editor <xjed@windowmaker.info>
Project maintainer
Alfredo K. Kojima <kojima@windowmaker.info>
The guy who types random keys to feed JED with the necessary entropy
Jay Kominek <jkominek@xtn.net>
smart and random placement
@@ -143,7 +149,7 @@ Fix for unassociated alpha tiff
Craig Nellist <crn@ozemail.com.au>
selection in textfield
Dan Pascu <dan@windowmaker.org>
Dan Pascu <dan@windowmaker.info>
dock ghost (superfluous mode) fix, enhancement for scrollable menus,
clip, numerous other stuff, project maintainer
@@ -211,7 +217,7 @@ FRBall <frb@umr.edu>
dgradient fix
"]d" <id@maliwan.org>
"]d" <id@windowmaker.info>
Window list menu miniaturized/hidden hints, XDE support, XKB lock
language status, WINGs enhancements, bug fixes, window commands menu
enhancement, window move/resize by keyboard. GNUstepGlow.tiff icon,

View File

@@ -4,11 +4,11 @@
If you find a bug please fill this form and send it to
developers@windowmaker.org Please, USE THIS FORM!!!
wmaker-dev@lists.windowmaker.org Please, USE THIS FORM!!!
You can also report a bug in the WWW bug tracker at
http://windowmaker.org/cgi-bin/bugs or by sending this report
to bugs@windowmaker.org
http://bugs.windowmaker.org/projects/wmaker/issues or by sending this report to
bugs@windowmaker.org
0. Before reporting this bug I already:
@@ -35,9 +35,6 @@ to bugs@windowmaker.org
[ ] --enable-kanji
[ ] --disable-shape
[ ] --enable-single-icon
[ ] --enable-kde
[ ] --enable-gnome
[ ] --enable-openlook
[ ] --enable-modelock
[ ] Others: .......................

8
BUGS
View File

@@ -1,8 +1,12 @@
Newly added
- after a crash, wmaker will forget the hidden state of the apps and just
show their windows minimized. normal restart is unaffected
- after a crash, wmaker will completely mess the window's saved geometries
and maximizing will have weird results. restart is unaffected
- wmaker will not stop managing a screen even if another window manager
requests that, through the ICCCM 2.0 manager selection stuff
- stacking code is buggy (or XFree is buggy)
- after restart focus is losed or switched to another window. May be related
to the one above.
- save session doesnt work on some platforms (Alpha and Sparc)
- texture pixmaps are being incorrectly freed somewhere. Either
fix bug (to support broken MetroX servers) or remove all useless references

31
COPYING
View File

@@ -1,9 +1,8 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -16,7 +15,7 @@ software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
@@ -56,7 +55,7 @@ patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
@@ -111,7 +110,7 @@ above, provided that you also meet all of these conditions:
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
@@ -169,7 +168,7 @@ access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
@@ -226,7 +225,7 @@ impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
@@ -279,8 +278,8 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
@@ -292,7 +291,7 @@ convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
Copyright (C) <year> <name of author>
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
@@ -304,16 +303,16 @@ the "copyright" line and a pointer to where the full notice is found.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
@@ -336,5 +335,5 @@ necessary. Here is a sample; alter the names:
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

View File

@@ -1,91 +0,0 @@
OpenContent License (OPL)
Version 1.0, July 14, 1998.
This document outlines the principles underlying the OpenContent
(OC) movement and may be redistributed provided it remains
unaltered. For legal purposes, this document is the license under
which OpenContent is made available for use.
The original version of this document may be found at
http://www.opencontent.org/opl.shtml
LICENSE
Terms and Conditions for Copying, Distributing, and Modifying
Items other than copying, distributing, and modifying the Content
with which this license was distributed (such as using, etc.) are
outside the scope of this license.
1. You may copy and distribute exact replicas of the OpenContent
(OC) as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any
warranty; and give any other recipients of the OC a copy of this
License along with the OC. You may at your option charge a fee for
the media and/or handling involved in creating a unique copy of the
OC for use offline, you may at your option offer instructional
support for the OC in exchange for a fee, or you may at your option
offer warranty in exchange for a fee. You may not charge a fee for
the OC itself. You may not charge a fee for the sole service of
providing access to and/or use of the OC via a network (e.g. the
Internet), whether it be via the world wide web, FTP, or any other
method.
2. You may modify your copy or copies of the OpenContent or any
portion of it, thus forming works based on the Content, and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified content to carry prominent notices
stating that you changed it, the exact nature and content of the
changes, and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the OC or any part
thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License, unless otherwise permitted
under applicable Fair Use law.
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the OC, and
can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work
based on the OC, the distribution of the whole must be on the terms
of this License, whose permissions for other licensees extend to
the entire whole, and thus to each and every part regardless of who
wrote it. Exceptions are made to this requirement to release
modified works free of charge under this license only in compliance
with Fair Use law where applicable.
3. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to copy,
distribute or modify the OC. These actions are prohibited by law if
you do not accept this License. Therefore, by distributing or
translating the OC, or by deriving works herefrom, you indicate
your acceptance of this License to do so, and all its terms and
conditions for copying, distributing or translating the OC.
NO WARRANTY
4. BECAUSE THE OPENCONTENT (OC) IS LICENSED FREE OF CHARGE, THERE
IS NO WARRANTY FOR THE OC, TO THE EXTENT PERMITTED BY APPLICABLE
LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS
AND/OR OTHER PARTIES PROVIDE THE OC "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE. THE ENTIRE RISK OF USE OF THE OC IS WITH YOU.
SHOULD THE OC PROVE FAULTY, INACCURATE, OR OTHERWISE UNACCEPTABLE
YOU ASSUME THE COST OF ALL NECESSARY REPAIR OR CORRECTION.
5. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
MIRROR AND/OR REDISTRIBUTE THE OC AS PERMITTED ABOVE, BE LIABLE TO
YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
THE OC, EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

View File

@@ -29,7 +29,16 @@ xpm/textr.xpm
xpm/tnew.xpm
inside Resources/Images.tiff "the little house", "the trash can",
"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

607
ChangeLog
View File

@@ -1,3 +1,600 @@
Changes since version 0.92.0:
.............................
- added check for --with-gnustepdir option to configure to verify that its
argument is an absolute path
- updated german translations (Torsten Marek <shlomme@gmx.net>)
- fixed WPrefs.app to find its icons when not installed under GNUstep paths
- fixed gcc-4 compilation issues (Vladimir Nadvornik <nadvornik@suse.cz>)
- fixed amd64 compilation issues (Vladimir Nadvornik <nadvornik@suse.cz>)
- eliminated gcc-4 compilation warnings
- small fix for compilation in a different directory than the source
(Balaton Zoltan <balaton@eik.bme.hu>)
- fixed some warnings on 64bit platforms (Balaton Zoltan <balaton@eik.bme.hu>)
- fixed issue with invisible modal windows from Qt and Gtk applications
on 64bit platforms (Max Loparyev <max@city.veganet.ru>)
- fixed issue with icon colors on big endian platforms
(Max Loparyev <max@city.veganet.ru>)
- release colors to avoid issues with the reference count overflowing a
small integer and causing unexpected color releases that can crash
Window Maker (Martin Frydl <martin.frydl@systinet.com>)
- fixed a small memory leak in WINGs/wview.c caused by not releasing the
background color of a view (Martin Frydl <martin.frydl@systinet.com>)
- updated estonian translation (Ivar Smolin <okul@linux.ee>)
- updated the XDND code in WINGs to work with GDK based applications.
WINGs based applications should now work with both KDE and GNOME
applications (Sylvain Reynal <sreynal@nerim.net>)
- better check for the XDND protocol version when interoperating with other
applications. As it seems xdnd version 3 (which WINGs supports) and newer
are not backward compatible with xdnd version 1 and 2. This is why WINGs
applications cannot interoperate with GNUstep applications (which uses
xdnd version 2). Xdnd version 4 and 5 are backwards compatible with
version 3 though. (Sylvain Reynal <sreynal@nerim.net>)
- Improved Info panel layout and fonts.
- Fixed missing library paths when linking some binaries on certain
platforms with a recent pkg-config (debian unstable/sid for one)
- Fixed buggy handling of UTF8 characters in textfields in WINGs.
(Stanislav Maslovski <stanislav.maslovski@gmail.com>)
- Fixed segfault in WPrefs when some font description is missing from the
configuration file (Stanislav Maslovski <stanislav.maslovski@gmail.com>)
- Removed WINGs' dependency on rgb.txt (from X11) and issues with locating it
on the filesystem for different systems/distributions.
- Fixed segfault when unhiding an application in certain conditions (seen
with KDE applications with transient windows)
Changes since version 0.91.0:
.............................
- fixed crash with info panel and alt-tabbing
- updated Japanese translations (Takeo Hashimoto <HashimotoTakeo@mac.com>)
- allow disable of switch panel when SwitchPanelImages=None
- added X Input Methods support in WINGs
- fixed issues with compiling on Solaris with openwin
- reduced minimum required version number for the Xft library to 2.1.0
- fixed some compilation issues with gcc-2.9x
- removed --with-appsdir option and replaced it with --with-gnustepdir. Also,
default installation path (for non GNUstep users) is now $(prefix)/bin
- fixed bug with infinite loop in some circumstances in fitText() in WINGs
- fixed to allow parallel builds on SMP systems using make -j
- updated Italian translation (Marco Colombo <m.colombo@ed.ac.uk>)
- applied .AppInfo --> Library path rename patch (Alex Perez <aperez@student.santarosa.edu>)
- added code to automatically update the icon paths from the old .AppInfo
style to the new Library/WindowMaker style in WMWindowAttributes when
Window Maker starts to make transition transparent for users.
- fixed issue with window being moved by 1 pixel up and left when the window
move was initiated by the client
- improved hide/unhide animation for applications with multiple windows
(only animate the active window hiding/unhiding, which makes Window Maker
faster and more responsive for such applications). This also makes the
restart operation much faster.
- fixed bug with windows shrinking to very small sizes when Unmaximize was
used on them, after they were closed in a maximized state.
- fixed bug with restoring maximized state from NetWM atoms.
- fixed issue with GNUstep applications losing focus when all their windows
are closed and there remains only their menu (Matt Rice <ratmice@yahoo.com>)
- try fixed font for the technical drawing font if helvetica-12 is not
available to avoid crashing (Timo Juhani Lindfors <timo.lindfors@iki.fi>)
- new algorithm for placing miniwindows after unhiding the application they
belong to, that works without auto-arranging the icons, while still avoiding
multiple icons in the same spot by moving the miniwindows to a new slot if
their old slot was occupied in the meantime.
- double clicking an appicon will also raise the miniwindows that belong to
that application to the front (along with the normal windows).
Changes since version 0.90.0:
.............................
- added _NET_WM_NAME, _NET_WM_ICON_NAME and _NET_WM_ICON to WINGs
- new WPrefs icon (thanks to Largo)
- replaced VirtualEdgeThickness option, with EnableVirtualDesktop (boolean)
- enhanced alt-tab panel, added theming ability
- fixed issues with broken crash dialog
- removed obsoleted options from wconfig.h
- changed animation delay constants to fix issues with 2.6.x linux kernels
(patch provided by Eric Piel <Eric.Piel@lifl.fr>)
- fixed several broken po files
- increased libwraster version number to 3.1.0 (added a RCopyArea function)
Changes since version 0.80.2:
.............................
- Some updates to WINGs WMConnection. See WINGs/ChangeLog for details.
- Fixed empty window list menu, if the window list menu was launched through
the root menu (sent by "Marc-Christian Petersen" <m.c.p@wolk-project.de>)
- Fixed dock's menu mapping position when dock is on the right side.
- Map clip's menu so that it never gets out of screen on the left or the right.
- Patch to add binary mode on opening files (needed for Windows with Cygwin)
(sent by luke <luke@posh.optushome.com.au>)
- Updated French translations (Antoine Hulin <antoine@origan.fdn.org>)
- Removed Hermes lib dependency in wrlib
- Put back asm/MMX code in wrlib
- Updated Russian locale files ("Andrew W. Nosenko" <awn@bcs.zp.ua>)
- API change in WINGs for WMDraw*String(). Details in WINGs/Changelog
- Removed obsoleted acconfig.h and implemented its functionality using
AC_DEFINE and AC_DEFINE_UNQUOTED as autoconf 2.5x recommends.
This will definitely enforce the need to use autoconf 2.5x
- Added Xft2 support to WINGs, for rendering antialiased fonts with
transparency. Details in WINGs/ChangeLog.
- Fixed problem with long, preset workspace names (Wanderlei Antonio Cavassin
<cavassin@conectiva.com.br>)
- Added kinput2 bug workaround to stock WMWindowAttributes (Seiichi SATO
<sato@cvs-net.co.jp>)
- Added Belarusian translation (Ihar Viarheichyk <iverg@mail.ru>)
- Fixed wrlib not to load braindead images with 0 sized width or height
- Removed double no-position-display when cycling position display types
with Shift key while moving windows.
- Changed the default position display while moving a window to 'Center'.
- Better outline when drawing balloons.
- Fixed wrlib to not accept too large images (fixes buffer overflow)
- Patched FAQ (David Coe <davidc@debian.org>)
- Fixed bug with resizebars appearing out of nothing when reloading configs
- Fixed sloppy focus bug (Pawel S. Veselov <Pawel.Veselov@Sun.COM>)
- Applied Xinerama patch (after fixes) from (Peter Zijlstra
<a.p.zijlstra@chello.nl>)
- Added switch to enable/disable antialiased fonts in WPrefs's Expert Settings
panel. (Temporary until the Font Settings panel in WPrefs is finished).
- Added a check that only %d is used in a font specification in WMGLOBAL and at
most once for each font in a fontset (eliminates a possible security exploit)
- Added fontpanel callback
- Fixed focus handling for windows that set WM_HINTS.take_focus = False.
- Fixed a problem in the stacking code which could lead to segmentation faults
(Jeff Teunissen <deek@d2dc.net>)
- Fixed a crashing bug in the menu code with modal panels involved.
- Fixed incorrect focusing of application's windows after an unhide (sometimes
the incorrect window got focus instead of the apps's last focused window)
- Unshade application's shaded windows when Dbl-MiddleClick-ing its appicon.
(this is to be consistent with deminiaturizing application's miniwindows
which also happens in this case, since shading is a form of miniaturization)
- Fixed bug with tpixmap from previous xinerama patch (reported by g0sh)
- Fixed edge resistance and move/resize frame drawing for borderless windows
- Fixed wrong display position for the move/resize widgets after xinerama
patch (Peter Zijlstra <a.p.zijlstra@chello.nl>)
- Fixed bug with cursor locked in drag mode after Alt-dragging a window
- Added Catalan translation (Ernest Adrogué <eadrogue@gmx.net>)
- Fixed a bug with deminiaturizing windows when the application is hidden and
the miniaturized window is selected from the window list menu
- Fixed a bug with not showing shaded window frames when the application is
hidden and another window belonging to the app is selected in the window
list menu
- Autoarrange icons after unhiding an application that has miniaturized
windows, else they may cover other icons which are now in the positions
they have occupied before hiding
- Fixed Clip's workspace menu mapping to be consistent with the others
- Fixed bug in wmsetbg that caused scale and maxscale to both do maxscale
(Alexey Voinov <voins@voins.program.ru>)
- Fixed bug with scrolling menus introduced by the xinerama patch.
- Fixed bug that could cause SIGSEGV by accessing beyond the end of text in
a WINGs textfield widget.
- Fixed small memory leak in WINGs' font panel code.
- Fixed memory leak in WINGs' file panel code.
- Updated Bulgarian translations (Anton Zinoviev <zinoviev@debian.org>)
- Fixed a bug in WINGs' hashtable which free'd the wrong memory in the
WMResetHashTable() function (possible source of SIGSEGVs)
- Fixed 2 syntax errors in plmenu.zh_TW.Big5 (Mike FABIAN <mfabian@suse.de>)
- Some .po file fixes (Mike FABIAN <mfabian@suse.de>)
- Fixed the problem with the root menu code changing the locale setting as
a side effect of loading a localized menu
- Fixed e memory leak in the code that reads a localized root menu
- Added support for generating pkgconfig files for WINGS, wmlib and wrlib.
("Marcelo E. Magallon" <mmagallo@debian.org>)
- Support for multiline balloons (Vitaly Ovtchinnikov <ov@rbcmail.ru>)
- Improved wsetfont (Mike FABIAN <mfabian@suse.de>)
- Updated single-click contrib patch (steve lion <steve.lion@verizon.net>
and vlaad)
- Updated French translations (Antoine Hulin <antoine@origan.fdn.org>)
- Xinerama support for Solaris
- Added global menu support (see NEWS)
- Fixed sloppy focus bug
- Made maximize behave differently with keyboard/mouse for xinerama
(Peter Zijlstra <a.p.zijlstra@chello.nl>)
- A few leftover xinerama fixes (Peter Zijlstra <a.p.zijlstra@chello.nl>)
- Extended the 'strut' to multiple heads
(Peter Zijlstra <a.p.zijlstra@chello.nl>)
- Icon placement now takes into account the new xinerama extended 'strut'
(Peter Zijlstra <a.p.zijlstra@chello.nl>)
- Icon arrangement that takes the new extended xinerama 'strut' into account
(Peter Zijlstra <a.p.zijlstra@chello.nl>)
- Fixed the 'KDE omnipresent' bug.
- Fixed bug with focusing a deminiaturized window with sloppy focus mode
- Fixed aspect of window list menu (window name was too close to workspace
indicator)
- Fixed menu panel in WPrefs.app. Explanatory text did not fit into the label
- Implemented a better logic to preserve the window's old geometry when
maximizing to support succesive maximizations in different directions
without the need to do an intermediary un-maximize step (eliminates flicker)
- Made keyboard/mouse maximization behavior consinstent relative to each other
- Enhanced wmsetbg's man page with description for -b | --back-color
(Marcelo E. Magallon <marcelo.magallon@bigfoot.com>)
- Do not use the disabled clip color for the clip's workspace navigation arrows
when the clip is collapsed (it made them look like disabled)
- Fixed bug with incorrect un-escaping if there is a dot in wm_class.
- Updated Catalan translations (Ernest Adrogue <eadrogue@gmx.net>)
- Updated Spanish translation of WPrefs (Alberto Gimenez <algibe@teleline.es>)
- Fixed synchronization problem between hair cursor and mouse cursor in
wmagnify with mouse cursor at the screen edge (Jon Diercks <jon@diercks.net>)
- Fixed 2 focus switching related bugs (Allan Peramaki <aperamak@cc.hut.fi>)
- Fixed a bug that made the crash panel to be shown again and again when the
'Restart Window Maker' option was selected, under some circumstances.
- Added workaround in global WMWindowAttributes, to avoid creating a second
appicon when a KDE3 application opens a config panel.
- Updated slovak translation (Jan Tomka <judas@linux.sk>)
- Added xdnd v3 support in WINGs (Sylvain Reynal <sreynal@nerim.net>)
- Check whether libXft is at least version 2.1.2 else refuse to compile.
- Fixed bug in icon chooser dialog that could cause a segmentation fault
in some cases (Pascal Hofstee <caelian@gmail.com>)
- Fixed crash in asm code in wrlib, with new versions of gcc.
- Fixed bug in the x86_PseudoColor_32_to_8() function which incorrectly
used the r, g, b fields in the conversion.
- Fixed x86 ASM code in wrlib to work on 64 bit architectures.
- Fixed the focus flicker seen with some apps (notably gtk2)
(Alexey Spiridonov <snarkmaster@gmail.com>)
- Fixed all crashing bugs that were generated by wmaker starting with the
WMState file missing.
- Added NetWM support (a modified version of the patch originaly written
by Peter Zijlstra <a.p.zijlstra@chello.nl>)
- Applied patch to enhance the Virtual Desktop behaviour, and to integrate
it with the NetWM code (Peter Zijlstra <a.p.zijlstra@chello.nl>)
- Applied a few xinerama and placement fixes (Peter Zijlstra
<a.p.zijlstra@chello.nl>)
- Fixed memory leak in dock code.
- Fixed and enhanced the text wrapping in WINGs.
- Fixed the layout of some elements in WPrefs.app
- Added workaround for aplications that don't set the required hints on the
client leader window, but they set them on normal windows (observer with
KDE 3.3.0 mainly). This will allow these apps to get an appicon again.
(they should be fixed still)
- Added workaround for applications that do not set a command with
XSetCommand(), but instead they set the _NET_WM_PID property. This works
with operating systems that offer a /proc interface similar to what linux
has. (This also is to fix problems with KDE 3.3.0 apps, but not only them).
- Fixed bug with autostart and exit scripts not being executed if user
GNUstep path was different from ~/GNUstep (when setting GNUSTEP_USER_ROOT)
- Removed legacy OFFIX_DND support code
- Fixed the signal handler for crashes (ie, removed it) and made wmaker
restarting be made automatically by a monitoring process.
- Made NetWM support be enabled by default
- Removed old code to store/restore workspace state (now relies on netwm)
- Added a (simple) Font Configuration for fontconfig fonts
- MacOS X style window switching panel (navigate through windows with Alt-Tab
or arrow keys)
- Added support for NET_WM_NAME/NET_WM_ICON_NAME
- Moved out font name conversion code from getstyle/setstyle/convertfonts and
made it support fontsets
- Converted all menu and po files to UTF-8
- Updated de.po (Thomas Otto <3.1415926535897932384626433832@gmx.net>)
- Fixed a crash bug when switching workspaces
- Removed obsoleted scripts from util: wsetfont, wmchlocale, wcopy, wpaste
Changes since version 0.80.1:
.............................
- Fixed a buffer overflow when allocating a RImage struct.
Changes since version 0.80.0:
.............................
- 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:
.............................
- Disabled window birth animation by default (while it was ok with normal
windows, it was very annoying with menus editing in WPrefs.app)
- Added ability to shade/unshade a window using the mouse wheel.
- Fixed compilation for systems that required -lintl for WINGs
(Jim Knoble <jmknoble@pobox.com>)
- Removed redundant include/lib paths from the get-*-flags scripts
- Updated slovak .po files (Jan Tomka <judas@linux.sk>)
- Added "Save workspace state" switch button on the exit confirmation panel
(based on a patch sent by Jan Tomka <judas@linux.sk>)
- Fixed WPrefs crash when clicking on the menu editor to keep the current menu
(Alexey Voinov <voins@voins.program.ru>)
- Added patch to fix some gnome issues (Les Schaffer <schaffer@optonline.net>)
- SIGTERM is now handled and saves the internal state before exiting (like
SIGHUP and SIGINT already do). Now a "kill wmaker_pid" will exit cleanly
saving dock/clip/session information on exit.
- Added an internal strcasecmp() to WINGs (only on systems where's not present)
- Deminiaturizing a window that is also shaded, will perform an unshade too.
(Note that this only applies to deminiaturizing shaded windows. Unhiding
an application will keep the shaded/unshaded state of windows.)
- Removed compile time option for definable cursors and made them available by
default.
- Mapping a new window that belongs to a running application that is hidden,
will unhide the application.
- Added || pipe menu for generating non-cached menus
- Removed the collapse appicons thing.
- Added real appicon sharing (apps of the same kind will have a single shared
appicon).
- Fixed user and global defaults domain merging to preserve values present in
global but not in user, in sub-dictionaries.
- Made dock/clip steal appicons of applications that were started from a
shell/xterm or from the main menu, if there is a docked appicon of that
class that is not running at the time the app is launched.
- Added animation to show that the appicon was stolen by the dock (the way
NEXTSTEP did - map an appicon as it normally would have been, then slide it
to the position the docked appicon is).
- Updated the animation constants for scrolling/sliding/shading to better
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.
- 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
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
and further changes in the global domain file for those merged values was
ignored making a system admin unable to set global defaults for all users
using the global domains.
- Fixed bug with improper setting of root/titlebar cursor (definable cursors).
Changes since version 0.65.1:
.............................
- fixed crash when saving empty menu item in WPrefs
- Fixed some more bash specific constructs in wsetfont.
(Marcelo E. Magallon <marcelo.magallon@bigfoot.com>)
- fixed crash with broken apps that set null WM_CLASS
- fixed crash when with gnome panel and multi-screens, some menu
updates and applied various other patches from
(Crutcher Dunnavant <crutcher@redhat.com>)
- po file fixes (Crutcher Dunnavant <crutcher@redhat.com>)
- replaced I18N_MB with I18N in one place in src/wconfig.h.in
- fixed default clip title font in WindowMaker.in
- fixed some locale related problems (Yukihiro Nakai <ynakai@redhat.com>)
- fixed a bug in RCombineAreaWithOpaqueness() (Brad <lists@anomie.yi.org>)
- added spanish INSTALL file (Efrain Maximiliano Palermo <max_drake2001@yahoo.com.ar>)
- updated Finnish pots (Tomi Kajala <tomi@iki.fi>)
- 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
- internal code clean-up with notifications for window state change and other
stuff
- removed the libPropList dependancy by adding property list handling
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
compatibility header file is provided which maps old libPropList
function names to the new WINGs based proplist names allowing old code
to be linked to WINGs with minimal changes. For details on how to use
the compat mode, read the comments on top of WINGs/WINGs/proplist-compat.h
More details about this can be found in WINGs/ChangeLog and WINGs/NEWS.
Say bye, bye libPropList =)
- rewrote all Window Maker code to use the new WINGs based proplist functions.
- fixed a few compilation warnings and a problem caused by an uninitialized
variable.
Changes since version 0.65.0:
.............................
- removed FocusFollowMouse from wmaker and WPrefs
- fixed problem with alpha images showing a blue tint on big endian machines
- fixed problem with WINGs based apps exiting with a "X_RotateProperties"
related error when text was selected in a textfiled (including WPrefs.app
and Window Maker itself).
- fixed bug with maximization of windows with fixed resize increments
- added None geometry display type
- fixed window enumeration bug
- removed GNUisms from wsetfont (Marcelo E. Magallon <marcelo.magallon@bigfoot.com>, Masahide -mac- NODA <mac@clave.gr.jp>)
- added slovakian translations from (tomka@oalevice.sk)
- added WINGs i18n patch from tomka@oalevice.sk
- fixed wmsetbg.c to work in servers capable of multiple depths (overlay)
- added HMaximizeKey (Ruda Moura <ruda@conectiva.com.br>)
- fixed bad SIGPIPE handling setup across forks (Philippe Troin <phil@fifi.org>)
- added workaround for bug in locale handling on font set creation (Seiichi SATO <sato@cvs-net.co.jp>)
- Fixed some non-portable shell constructs used in installed scripts
(Johnny C. Lam <lamj@stat.cmu.edu>)
- Fixed crash with long titles in the window list menu (buffer overflow)
(Alban Hertroys <dalroi@wit401310.student.utwente.nl>, reported by
Robert Marshall <robert@chezmarshall.freeserve.co.uk>)
- Replaced almost all sprintf() calls with snprintf()
- fixed crash when removing menu entry for Window List or Workspace submenu
- added WINDOW_BIRTH_ZOOM2 (Éric Tremblay <delt@razorback.yi.org>)
Changes since version 0.64.0:
.............................
- fix with gnome hints stuff, related to tasklist/bar
- ripped off single appicon stuff
- added better appicon handling of apps of the same type
- applied patch for wkdemenu (Malcolm Cowe <malk@bruhaha.co.uk>)
- added WINDOWS_MENU submenu type for root menu (Bastien Nocera <hadess@hadess.net>)
- added kbd shortcuts for icon chooser
- use Hermes in wrlib
- removed MOUSE_WS_WHEEL #defines
- fixed bug with multibyte text on libc5 systems (Osamu Ajiki <osam-a@astroarts.co.jp>)
- fixed race conditions on signal handlers
- SIGINT will gently exit, SIGTERM will not be handled
- When Window Maker calls wmsetbg to set the background, it will consider the
value of the DisableDithering option and pass the right switch to wmsetbg.
- fixed a memleak in the dialog panels.
- made "Keep on Top" in the dock/clip menu a checked menu entry. It's _much_
easier to work with it this way.
- Fixed problem with GNOME apps that have windows which need to stay on the
desktop level.
- Fixed incorrect parsing of display and screen number from $DISPLAY.
- Organized the inspector panel a bit better.
- Replaced bags with arrays wherever appropriate. This will improve
performance a bit.
- Made the Gnome tasklist skip the windows with the "Skip window list" flag
enabled. (Bastien Nocera <hadess@hadess.net>)
- Fixed crashing bug when name and class were empty for a docked app.
- Removed MIN() and MAX() macros and replaced them with WMIN() and WMAX() from
WINGs.
- Added a hint that Window Maker crashed, to allow windows to be placed
correctly after a crash situation.
- Added a hint that Window Maker crashed, to allow windows to be placed
in their correct previous positions after a crash situation and also to
preserve their state before the crash (minimized, shaded, hidden, ...)
- Fixed wrong mapping position of the "Docked Applications Panel" for some
icons.
- Smoother animation for the smiley =)
- Added retain/release mechanism for RImages. RDestroyImage() has become
obsolete. More about this can be found in wrlib/Changelog and wrlib/NEWS.
- Small API change in WINGs to allow images with alpha blending set as the
application icons be shown correctly. More about this in WINGs/Changelog
and WINGs/NEWS.
- Made images with alpha blending be shown correctly in the panels and the
icon chooser.
- The icon image set to be shown in panels ("Logo.WMPanel") will be
automatically updated if its entry in WMWindowAttributes changes (without
a need to restart as until now).
- Fixed a bug in the icon chooser dialog that made the selected icon look
wrong if it had alpha blending.
- Removed the following 3 options from configuration: SelectWindowsMouseButton,
WindowListMouseButton and ApplicationMenuMouseButton.
- Added 4 options to the configuration file for binding workspace actions to
mouse buttons: MouseLeftButtonAction, MouseMiddleButtonAction,
MouseRightButtonAction and MouseWheelAction. They replace the above 3
removed options, but use a different semantic. More in NEWS.
- client supplied icons that were saved by Window Maker in the directory
~/GNUstep/.AppInfo/WindowMaker/ will be recreated if missing when the
application starts.
- fixed a small memleak when the client supplied icon was extracted and saved.
Changes since version 0.63.1:
.............................
- fixed messup in get-{wings,wutil,wraster}-flags
- fixed #wmdatadir# substitution in wmaker.inst
(Seiichi SATO <sato@cvs-net.co.jp>)
- Removed spurious focus disabling for GNUstep applications - but retain
code that lets GNUstep apps control their window titlebar.
(Richard Frith-Macdonald <rfm@gnu.org>)
- Fixed broken panels.
- Renamed se.po to sv.po
- New version of wkdemenu.pl (from Malcolm Cowe <malk@bruhaha.co.uk>)
- new updated Slovak translations (Jan Tomka/judas@hell <tomka@oalevice.sk>)
- integrated the 'no polling' patch from Jim Knoble <jmknoble@jmknoble.cx>.
- new wsetfont script (Anton Zinoviev <zinoviev@debian.org>)
- lots of i18n fixes (Jan Tomka/judas@hell <tomka@oalevice.sk>)
- window levels changed to match GNUstep <rfm@gnu.org> ... src/GNUstep.h
src/WindowMaker.h src/window.c wmlib/WMaker.h WINGs/WINGs/WINGs.h
Changes since version 0.63.0:
.............................
- fixed compile prob with SGI compiler
- decreased nice() value in wmsetbg
- applied gnome panel not-covering patch from (Bastien Nocera <hadess@hadess.net>)
- added item copy to WPrefs menu editor
- added locale selection code for menu in wmaker.inst (Eliphas Levy Theodoro <eliphas@conectiva.com.br>)
- fixed bug in built-in xpm support (Alessandro Strada <a.strada@libero.it>)
- removed plugin support
- fixed a crash bug in WPrefs menu editor
- added es and pt potfiles from conectiva/eliphas
- added updated galician potfile (Jesus Bravo Alvarez <jba@pobox.com>)
- added update hungarian potfiles (HORVATH Szabolcs <horvaths@inf.elte.hu>)
- added updated single-click patch from John Morrissey <jwm@horde.net>
- added updated danish translations (Birger Langkjer <birger.langkjer@image.dk>)
- fixed WindozeCycling config in WPrefs
- fixed circulate raise withour WindozeCycling
Changes since version 0.62.1:
.............................
- added blackbox style igradient (interwoven)
- added wmagnify utility
- changed behaviour of control/shift double click on titlebar for maximize
- updated getstyle to account for extendspace options
- fixed weird color bug in jpeg loader
(Alban Hertroys <dalroi@wit401310.student.utwente.nl>)
- improved and simplified fonts configuration for multibyte languages
(Tomohiro KUBOTA <kubota@debian.or.jp>)
- cleaned ParseCommand() and renamed to TokenizeString()
- rewrote menu editor in WPrefs
- added definable workspace border (0..5 pixels). See NEWS.
- fixed circulateraise on non-windoze cycling mode
- fixed bug in RCombineAreaWithOpaqueness (Tim Malone <tmalone3@uswest.net>)
- fixed bug with hangling of WM_COMMAND update in client.c (Andrew M. Langmead <aml@world.std.com>)
- fixed bug with incorrect reading of ppm files (Adam Fedor <fedor@gnu.org>)
- fixed bug with incorrect window placement using automatic placement, while
there were shaded windows on other workspaces
- fixed some buffer overflow issues in WINGs
- fixed bug with WPrefs.app not selecting the menu appearance options after
startup.
- replaced free() with wfree() wherever appropriate
- fixed some memory leaks generated by wstrappend()
- fixed code that was dependant on the order of evaluation in wrlib. This
fixed a number of problems, like greyscale jpegs that showed up in red
and possibly the problems with pseudocolor displays.
- made clicks on unfocused windows be effective on focus follow mouse/sloppy
Changes since version 0.62.0:
.............................
- made shortcuts available during alt+tab
- save lowered state of menus
- fixed portability bugs for old X servers
- added check for XInternAtoms in configure and replacement code
- fixed window cycling with single key shortcut
- fixed WPrefs crash on menu editor
- install only needed icons for WPrefs.app
- updated Finnish translations
- fixed user-whining-windoze-cycling bug
- added option for f'n windoze cycling..
- added --create-stdcmap and made std colormap creation off by default
- updated get/setstyle to account for new options
- fixed crash on restart bug
- made GNOME wm hints take precedence over KDE.. KDE hint will only be read
if GNOME hints dont exist
- updated kwm hint support (maximize hint)
- added memory usage in info panel
- fixed sticky hint handling in GNOME
- fixed saving of maximized state for restart
Changes since version 0.61.1:
.............................
@@ -233,9 +830,9 @@ Changes since version 0.51.2:
- fixed focus problem with unfocusable windows
- fixed bug in WPrefs that changed EXIT to SHUTDOWN
- fixed menu title messup bug in WPrefs
- added a dot to mark hidden applications (compile time) (id@windowmaker.org)
- enhancements to the modelock patch (id@windowmaker.org)
- show kbd mode for modelock (id@windowmaker.org)
- added a dot to mark hidden applications (compile time) (id@windowmaker.info)
- enhancements to the modelock patch (id@windowmaker.info)
- show kbd mode for modelock (id@windowmaker.info)
- enhanced positioning of transient windows
- added dynamically loadable texture renderer code
from Tobias Gloth <gloth@online.de>
@@ -1076,7 +1673,7 @@ Changes since version 0.14.1:
They are icons for dock, clip, defaultAppIcon, sound server and for xterm.
All the rest needed for apps that can be started from menu, and have entries
in WMWindowAttributes, are in WindowMaker-data.tar.gz which can be found on
http://windowmaker.org/ or ftp://ftp.windowmaker.org/pub/contrib/icons
http://windowmaker.info/ or ftp://ftp.windowmaker.info/pub/contrib/icons
- Changed the SlideWindow() function to better adapt to slow machines. Also
the animation constants are now run time. They are IconSlideDelay = 0;
IconSlideStep = 5; and IconSlideSlowDown = 50; See NEWS for a more in depth
@@ -1144,7 +1741,7 @@ Changes since version 0.14.0:
or exiting, while an Attribute Editor panel is open.
- Put clip.tif, clip.png, clip.xpm, clip2.tif, clip2.xpm, Cone.xpm and
Penguin.xpm in WindowMaker-data_tar.gz. These are icons intended for fiend.
It can be found on ftp://ftp.windowmaker.org/pub/wmaker/contrib/icons
It can be found on ftp://ftp.windowmaker.info/pub/wmaker/contrib/icons

128
FAQ
View File

@@ -143,10 +143,9 @@ here for example screenshots.
1.2 Where can I get Window Maker?
----------------------------------
The official site to get new developmental versions from is
ftp://ftp.windowmaker.org/pub/beta/srcs/.
http://windowmaker.org/pub/source/beta/
NOTE: Also see http://wm.current.nu/downloads.html for the latest
Stable and Development versions.
The mercurial repository is available at https://hg.windowmaker.org/wmaker
The development versions are usually very stable themselves, so if you
want to have all the newest features, you can rather safetly go with the
@@ -158,23 +157,15 @@ crash.
1.3 Where are the mailing list archives?
----------------------------------------
Phillip Smith from Netplex, our wonderful provider of windowmaker.org, has set
up some new lists from the domain. Please read the information on the web
pages at http://www.windowmaker.org/lists.html for information on how to
subscribe, the posting guidelines, and how to access the web archives.
Many thanks to Ed Orcutt who hosted the original lists from his own machine
for many years and Caldera who graciously allowed Ed to continue hosting
from them when he moved to his new position with them. Ed provided a very
valuable service for many years and we are sad to see him go.
Please read the information on the web pages at http://lists.windowmaker.org/
for information on how to subscribe, the posting guidelines, and how to access
the web archives.
1.4 Where is more documentation on configuring Window Maker?
----------------------------------
Besides the mailing list archives, there are nice documents in
ftp://ftp.windowmaker.org/pub/docs/, at
http://wm.current.nu/downloads.html on my download page and at
http://wm.current.nu/user-guide/index.htm in the online user-guide.
http://windowmaker.org/documentation.php
1.5 What is an appicon?
@@ -182,51 +173,33 @@ http://wm.current.nu/user-guide/index.htm in the online user-guide.
An appicon is the icon (without the tiny titlebar a minimized application icon
has) produced by most applications that initially is in the bottom left corner
of the screen while an application is running. For an example, run xterm and
notice the icon in the corner. (Make sure that you use xterm and not a
default older rxvt because older versions of rxvt do not properly set their
window attributes.)
notice the icon in the corner.
1.6. How can I get a question added to the FAQ?
----------------------------------
Right now, the only method is to mail Chris Green <sprout@dok.org> or
myself <largo@current.nu> the question or post it on the Window Maker
Mailing list, and see if enough people have the same problem.
Ask on the mailing list, or send your request to faqs@windowmaker.org
If you are a developer and would like to be able to edit the official FAQ on
Chris's site, let him know at <sprout@dok.org>
He is currently pondering writing a front end that allows everyone to add
entries and only require a moderator approval before being posted.
Other avenues are the Window Maker wiki
http://bugs.windowmaker.org/projects/wmaker/wiki
and the forums
http://bugs.windowmaker.org/projects/wmaker/boards
1.7. How do I report bugs?
----------------------------------
You can look at the BUGFORM file in your tarball of Window Maker.
Alternatively, you can use the Window Maker Bugtracker at
http://windowmaker.org/cgi-bin/bugs.
http://bugs.windowmaker.org/projects/wmaker/issues
1.8. Is there an anomymous cvs server?
1.8. Is there a public source code repository?
----------------------------------
Yes there is. To check out from cvs, first
export CVSROOT=":pserver:anoncvs@cvs.net-community.com:/gnustep"
cvs login
'anoncvs' is the password.
Then issue the command. "wm" is the name of the module.
cvs -z3 checkout -d WindowMaker wm
To update your source tree, cd to the WindowMaker directory and type
cvs -z3 update
inside the WindowMaker directory.
Yes there is. To check out from mercurial use:
hg clone http://hg.windowmaker.org/wmaker wmaker
To update your source tree, cd to the wmaker directory and type
hg pull
@@ -234,14 +207,11 @@ inside the WindowMaker directory.
Installation:
-=-=-=-=-=-=-
2.1 Where can I get proplist.h?
-------------------------------
You didn't read the INSTALL file, did you? Please read that now.
libPropList is downloaded seperately and you need to install it _before_
attempting to configure Window Maker.
2.1 Where can I get libPropList/proplist.h?
-------------------------------------------
starting with Window Maker 0.70.0, libPropList is no longer needed.
It was obsoleted by adding property list handling code to the WINGs library.
You can find a gzipped tar archive of libPropList at
ftp://ftp.windowmaker.org/pub/libs/
2.2 Why do no icons show up after installing Window Maker >= 0.15.x
@@ -368,8 +338,8 @@ for your convenience.
2.8 Can I use WindowMaker with KDE or GNOME or CDE?
----------------------------------
Contrary to a lot of people thinks, KDE is NOT a window manager. KDE is
---------------------------------------------------
Contrary to what a lot of people think, KDE is NOT a window manager. KDE is
a suite of various applications that includes a custom window manager (kwm).
The same is true for CDE.
@@ -389,7 +359,7 @@ mouse.
2.9 How do I get Window Maker working with xdm in Redhat 5.[01]?
----------------------------------
----------------------------------------------------------------
After running wmaker.inst and letting it write to .xinitrc,
cp .xinitrc .xsession
and make sure that /usr/local/bin is in your $PATH for the Xserver. You can
@@ -1077,22 +1047,35 @@ to force the modification time into the future.
4.16 How can I set dock/clip to use single click to launch
applications, instead of double click?
----------------------------------
You cannot do this. This is because single click is used to select app-icons,
or to raise/lower the app-icon or the dock/clip.
If this is impelmented then you will be unable to select or raise/lower
dock/clip or app-icons, without also launching the application it represents.
This question was officially answered as follows:
So don't ask for this to be implemented, because it will not be. Double
click is used for a reason, is not just some weird idea we got in a morning
when we wake up too early.
You cannot do this. This is because single click is used to select
app-icons, or to raise/lower the app-icon or the dock/clip. If
this is impelmented then you will be unable to select or
raise/lower dock/clip or app-icons, without also launching the
application it represents.
So don't ask for this to be implemented, because it will not
be. Double click is used for a reason, is not just some weird idea
we got in a morning when we wake up too early.
Regardless of that, there is now an option in WPrefs, under "Expert
User Preferences," which allows you to set "Launch applications and
restore windows with a single click." (See the files contrib/README
and contrib/single_click.diff in the source package for details.)
If you set that option, a left button single click will launch or
restore, rather than select, the app-icon. You can use other methods
(or temporarily turn the option off again) to select app-icons or
raise/lower the dock/clip. You can toggle the selected state of any
app-icon via its right button menu, and there are auto-raise and
keep-on-top options for the dock and clip.
4.18 How do I restore the configuration app to the dock?
----------------------------------]
You should start it from a terminal using its full path name, which is
/usr/local/GNUstep/Apps/WPrefs.app/WPrefs
/usr/local/GNUstep/Applications/WPrefs.app/WPrefs
by default.
@@ -1182,10 +1165,10 @@ Several Nice applications are available:
http://www.geocities.com/SiliconValley/Vista/2471/linux.htm#xapps
ascd,WMRack,asmixer,asmodem, and others
ftp://ftp.windowmaker.org/pub/wmaker/contrib/srcs/apps/
ftp://ftp.windowmaker.info/pub/wmaker/contrib/srcs/apps/
wmavgload, wmmount, and wmload
ftp://ftp.windowmaker.org/pub/wmaker/contrib/srcs/utils/
ftp://ftp.windowmaker.info/pub/wmaker/contrib/srcs/utils/
wmppp-wmifs, wmtime, wmmon and other nifty apps
http://windowmaker.mezaway.org/
@@ -1301,14 +1284,8 @@ in routines/xsci/jpc_SGraph.c
5.12 Netscape shows black and white icons
----------------------------------
This is because Netscape uses monochrome icons when running under olwm
and you are using the OPEN LOOK emulation option. If you do not use any XView
apps anyway, recompile Window Maker without the --enable-openlook option.
If you need OPEN LOOK emulation, you will have to get used to the monochrome
icons or change then manually in the Attributes panel for each window.
I have also seen this happen on some systems if you run Netscape in a high
colour depth (32bpp) regardless of whether you're using openlook or not.
That is a Netscape bug. Therefore, bug Netscape.
I have seen this happen on some systems if you run Netscape in a high
colour depth (32bpp). That is a Netscape bug. Therefore, bug Netscape.
5.13 Snow flakes from xsnow don't acumulate on titlebars!
@@ -1460,11 +1437,14 @@ the files manually. Or download the whole distribution.
7.5 Will you add GNOME or KDE support?
----------------------------------
--------------------------------------
Support for GNOME (and KDE) hints is included since 0.50.0. You have to
enable them at compile-time using the appropriate arguments to ./configure.
Please read the INSTALL file for more details.
Note: starting with version 0.90.0, support for legacy Gnome-1.x and KDE-2.x
was dropped in favor of NETWM support (used by both Gnome-2.x and KDE-3.x)
-=-=-=-=-
Themes:

View File

@@ -32,24 +32,35 @@ If I18N support does not work for you, check these:
here:
ftp://ftp.linux.or.jp/pub/RPM/glibc
- if you'd like to display multibyte characters, set the
MultiByteText option to YES in ~/GNUstep/Defaults/WindowMaker
and ~/GNUstep/Defaults/WMGLOBAL
- the fonts you're using support your locale. if your font
setting on $HOME/GNUstep/Defaults/WindowMaker is like..
WindowTitleFont = "-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-*-*";
MenuTitleFont = "-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-*-*";
WindowTitleFont = "Trebuchet MS:bold:pixelsize=12";
MenuTitleFont = "Trebuchet MS:bold:pixelsize=12";
......................................................
then you can't display non iso8859-x charcters by helvetica.
so quick way to display various languages' font is to change
all the font settings into:
then you can't display asian language (ja,ko,ch) characters using
Trebuchet MS. A font that is guaranteed to work for any language is
sans (or sans-serif). sans is not a font itself, but an alias which
points to multiple fonts and will load the first in that list that
has the ability to show glyphs in your language. If you don't know
a font that is suited for you language you can always set all your
fonts to something like:
"-*-*-medium-r-normal-*-14-*-*-*-*-*-*-*"
"sans:pixelsize=12"
and also you need to change font settings in style files in
However, please note that if your font is something like:
"Trebuchet MS,sans serif:pixelsize=12"
this will not be able to display asian languages if any of the
previous fonts before sans are installed. This is because unlike
the proper font pickup that sans guarantees for your language,
this construct only allows a font fallback mechanism, which tries
all the fonts in the list in order, until it finds one that is
available, even if it doesn't support your language.
Also you need to change font settings in style files in
the "$HOME/Library/WindowMaker/Style" directory.
- the LC_CTYPE environment variable is unset or it has the correct

View File

@@ -1,45 +1,19 @@
Installation Instructions for Window Maker
The latest version of Window Maker (-crm) can be found in the
git repository at
http://repo.or.cz/w/wmaker-crm.git
SUPPORTED PLATFORMS
===================
(ie: I've heard someone has compiled it on...)
- Intel GNU/Linux Slackware 3.5 (primary platform)
- Intel GNU/Linux other distributions
- 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)
- Intel GNU/Linux Systems in general
Patches to make it work on other platforms are welcome.
If the latest version doesn't work for you, try 0.19.3,
which is known to be pretty stable on many platforms.
REQUIREMENTS:
=============
@@ -56,34 +30,18 @@ The following software is required to use Window Maker:
The following is required to build Window Maker:
- Basic obvious stuff
If you will build Window Maker, make sure you have gcc (or some
other ANSI C compiler) and the X header files installed. Specially
for newbie Linux users: you must install all X development packages
and the gcc suite. Otherwise you won't be able to build any X
program, including Window Maker.
- libPropList
This library can be found in ftp://ftp.windowmaker.org/pub/libs
or in ftp://ftp.gnome.org/pub/libPropList
Install it before building Window Maker.
gcc (or some other ANSI C compiler)
glibc development files (usually glibc-devel in Linux distributions)
X development files (XFree86-devel or something similar)
- autoconf, automake and libtool
These tools are NOT needed, but IF you have one or
more of them installed, make sure you have ALL of the following
with exactly these versions:
autoconf 2.13
autoconf 2.54
automake 1.4
libtool 1.3
If you have a different version, disable them by temporarily
renaming them to something else or uninstalling them from your
system. If you don't develop software you don't need them,
so you can safely uninstall.
libtool 1.4.2
- lex (or flex) and yacc (or bison)
These are used by libPropList. lex is actually not needed since
it's output file is included, but either me or automake is stupid,
causing the configure script for libPropList to simply abort for no
convincent reason if lex is not found.
- Xft2
and its dependencies (such as freetype2 and fontconfig)
You will also need the development files for it (xft2-devel)
OPTIONAL:
@@ -128,13 +86,19 @@ might work too.
CONFIGURE OPTIONS:
==================
If you downloaded the cvs or git versions, type
./autogen.sh
to generate the config files.
These options can be passed to the configure script to enable/disable
some Window Maker features. Example:
./configure --enable-kde --enable-gnome
will configure Window Maker with KDE and GNOME supported compiled in.
./configure --enable-modelock --disable-gif
will configure Window Maker with modelock supported and disable gif support.
Normally, you won't need any of them.
To get a list of other options, run ./configure --help
@@ -148,12 +112,6 @@ To get a list of other options, run ./configure --help
The -I flag must precede each paths, like:
--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 use of the MIT shared memory extension. This will slow down
texture generation a little bit, but in some cases it seems to be
@@ -162,30 +120,10 @@ To get a list of other options, run ./configure --help
--disable-motif
disable support for mwm window manager hints
--enable-openlook
enable support for OPEN LOOK(tm) window manager hints
--enable-gnome
enable support for GNOME window manager hints
--enable-kde
enable support for kde/kwm window manager hints
--enable-lite
remove things that are already supported in desktop environments,
like KDE and GNOME. Disabled things are: window list, root
applications menu, multiple window selection. Note that you will not
be able to exit Window Maker from itself anymore; you will have to
use kill with the SIGTERM signal or exit it from KDE. It is not
advisable to enable it.
--enable-modelock
XKB language status lock support. If you don't know what it is you
probably don't need it.
--enable-sound
enable support of sound effects module
--disable-xpm
disables use of the XPM library even if it is available on your
system.
@@ -205,35 +143,10 @@ To get a list of other options, run ./configure --help
--disable-shape
disables shaped windows (for oclock, xeyes etc.)
--enable-debug
Do not use it unless you know what you're doing.
PLATFORM SPECIFIC NOTES:
========================
- DEC/Alpha machines
You might need to pass the --disable-shm flag to configure, like
./configure --disable-shm
- SCO Unix - run configure like
CFLAGS="-belf -DANSICPP" ./configure
- SunOS, Solaris
If you have gcc installed, run configure as:
CPP_PATH="gcc -E -x c" ./configure
Sun's cpp lacks some features needed by Window Maker and it can
cause problems when parsing the config files.
You also might need to use the --with-libs-from and --with-incs-from
to supply the directory where libtiff is located.
Someone mailed me that you also must make /usr/local/lib be the
first path in LD_LIBRARY_PATH to make it work.
If you have a Ultra Creator 3D or some other machine with high-end
graphics, be sure to start the X server with the default visual
set to 24bpp or you might experience problems with mangled colors.
This is a wmaker bug and will be fixed.
- GNU/Linux in general
Make sure you have /usr/local/lib in /etc/ld.so.conf and that you
run ldconfig after installing.
@@ -256,27 +169,6 @@ PLATFORM SPECIFIC NOTES:
* make sure you have /usr/local/lib in /etc/ld.so.conf before running
ldconfig;
* if you have problems that mention an error message with --no-reexec
uninstall libtool-1.2b and install libtool-1.3 instead. libtool-1.3
can be found in ftp.gnu.org Also read the TROUBLESHOOTING section;
* if you installed the Window Maker package from RedHat and are
installing a new version of it by hand (compiling yourself), uninstall
the package from RedHat before.
* make sure you have a symbolic link from /usr/include/X11 to
/usr/X11R6/include/X11 (if not, type ln -s /usr/X11R6/include/X11
/usr/include/X11 )
* make sure you have /lib/cpp pointing to the cpp program
If you have any doubts in doing any of the stuff above, please
don't hesitate to contact the RedHat user support. They will
kindly answer to all your questions regarding their system.
They also know much more about their own system than us
(we don't use RedHat).
- PowerPC MkLinux
You will need to have the latest version of Xpmac. Older versions
seem to have bugs that cause the system to hang.
@@ -299,15 +191,6 @@ PLATFORM SPECIFIC NOTES:
INSTALLATION:
=============
Unpack WindowMaker-extra-<version-number>.tar.gz in /usr/local/share
You can get the file at ftp://ftp.windowmaker.org. This file is optional
and only have a few icons, and themes. Look for the latest <version-number>
available.
Also there is a WindowMaker-extra.readme to instruct you where that package
should go.
Build Window Maker
------------------
For a quick start, type the following in your shell prompt:
@@ -339,9 +222,9 @@ following.
to get a complete listing of other options that are available.
2. Run configure with the options you want. For example, if you
want to use the --enable-kde option, type:
want to use the --enable-modelock option, type:
./configure --enable-kde
./configure --enable-modelock
3. (optional) Edit src/wconfig.h with your favorite text editor
and browse through it for some options you might want to change.
@@ -382,16 +265,29 @@ Read the User Guide for a more in-depth explanation of Window Maker.
You might want to take a look at the FAQ too.
Installing the extras package
-----------------------------
Unpack WindowMaker-extra-<version-number>.tar.gz in /usr/local/share
You can get the file at http://windowmaker.org/pub/source/release/. This file
is optional and only have a few icons, and themes. Look for the latest
<version-number> available. Also there is a WindowMaker-extra.readme to
instruct you where that package should go.
I don't have the root password :(
---------------------------------
If you can't get superuser privileges (can't be root) you can install
wmaker in your own home directory. For that, supply the --prefix option
when running configure in step 2 of building Window Maker. You will
also need to supply the --with-appspath option, to specify the path for
also need to supply the --with-gnustepdir option, to specify the path for
WPrefs.app Example:
./configure --prefix=/home/jshmoe --with-appspath=/home/jshmoe/GNUstep/Apps
./configure --prefix=/home/jshmoe --with-gnustepdir=/home/jshmoe/GNUstep/Applications
Then make /home/jshmoe/bin be included in your search PATH, add
@@ -410,8 +306,8 @@ If you are upgrading from an older version of Window Maker:
1. Configure and build Window Maker as always
2. Install Window Maker (but do not run wmaker.inst)
3. Read the NEWS file and update your configuration files,
if necessary.
3. Read the NEWS file and update your configuration files if necessary.
TROUBLESHOOTING
===============
@@ -431,8 +327,7 @@ ltconfig: unrecognized option `--no-reexec'
Try `ltconfig --help' for more information.
configure: error: libtool configure failed
remove the --no-reexec option from aclocal.m4 and libPropList/aclocal.m4
and reconfigure
remove the --no-reexec option from aclocal.m4 and reconfigure
Also make sure the autoconf and automake versions you have installed are:
autoconf 2.13
automake 1.4
@@ -441,12 +336,6 @@ libtool 1.3
Note that it must not be libtool 1.2b, it must be libtool 1.3,
from the GNU sites.
== Cant find proplist.h or libPropList.something
Download and install libPropList from the places pointed to
somewhere else in this file.
== configure doesn't detect libtiff, or other graphic libraries.
Delete config.cache, then rerun configure adding the following options to
@@ -480,7 +369,7 @@ If you're not sure, try renaming ~/GNUstep to ~/GNUtmp and then run wmaker.inst
== The root menu contains only 2 entries. ("XTerm" and "Exit...")
* Window Maker is not finding cpp (the C preprocessor). If your cpp is
not located in /lib/cpp, edit src/config.h and correct the path in
not located in /lib/cpp, edit config.h and correct the path in
CPP_PATH.
== checking lex output file root... configure: error: cannot find output from true; giving up
@@ -520,7 +409,7 @@ for other languages.
2 - Additionally, if your language uses multi-byte characters, such
as Japanese or Korean, you must set the MultiByteText option to YES
in ~/GNUstep/Defaults/WMGLOBAL and ~/GNUstep/Defaults/WindowMaker
in ~/GNUstep/Defaults/WMGLOBAL
3 - Configure, build and install Window Maker normally.
@@ -545,32 +434,3 @@ following order (for brazilian portuguese, in this case):
menu.pt_BR
menu.pt
menu
5 - If you chose a language that uses multi-byte characters, you must
configure the fonts appropriately. Read the manual page for XCreateFontSet
to have more details about it. You must change the ~/G/D/WindowMaker file
for fonts used in titlebars, menus and other things. For fonts used in
dialog windows, change ~/G/D/WMGLOBAL. The %d in the font names must not be
removed. You can also use the supplied wsetfont script for the task.
Read the script itself for instructions.
For example, you can specify the following in ~/G/D/WindowMaker:
WindowTitleFont = "-*-helvetica-bold-r-normal-*-12-*,-*-*-medium-r-normal-*-14-*";
MenuTitleFont = "-*-helvetica-bold-r-normal-*-12-*,-*-*-medium-r-normal-*-14-*";
MenuTextFont = "-*-helvetica-medium-r-normal-*-12-*,-*-*-medium-r-normal-*-14-*";
IconTitleFont = "-*-helvetica-medium-r-normal-*-8-*,-*-*-medium-r-normal-*-12-*";
ClipTitleFont = "-*-helvetica-bold-r-normal-*-10-*,-*-*-medium-r-normal-*-12-*";
DisplayFont = "-*-helvetica-medium-r-normal-*-12-*,-*-*-medium-r-normal-*-12-*";
and in ~/G/D/WMGLOBAL:
SystemFont = "-*-*-medium-r-normal-*-%d-*-*-*-*-*-*-*";
BoldSystemFont = "-*-*-medium-r-normal-*-%d-*-*-*-*-*-*-*";
The above 2 fonts are only used by applications that use WINGs (WindowMaker
and WPrefs.app)
The wsetfont script that's supplied will allow you to change the font
settings in a easier way. Take a look in the script for details on usage.

View File

@@ -1,566 +0,0 @@
Instruções de Instalação do Window Maker
PLATAFORMAS SUPORTADAS
======================
(obs: fiquei sabendo que conseguiram compilar nesses sistemas...)
- Intel GNU/Linux Slackware 3.5 (plataforma primária)
- outras distribuições do Intel GNU/Linux
- 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 em MacOS
- Amiga 3000 rodando RedHat Linux 5.1 (Rawhide)
Patches que possibilitem a execução em outras plataformas serão bem-vindos.
Se a última versão não funcionou para você, tente a 0.53.0,
que é conhecida por ser bastante estável em várias plataformas.
REQUERIMENTOS
=============
Os softwares a seguir são necessários para o uso do Window Maker:
- X11R6.x
O Window Maker pode ser compilado em versões mais antigas do X, como X11R5
(Solaris) ou X11R4 (OpenWindows) mas não funcionará 100% corretamente. Em
tais servidores não existirão ícones de aplicações e você terá problemas
usando o dock. Fazer upgrades das bibliotecas (Xlib Xt etc) ajudará se você
não pode fazer upgrade do servidor.
Para compilar o Window Maker você precisará do seguinte:
- Requerimentos básicos e óbvios
Se você vai compilar o Window Maker, tenha certeza de que você possui o gcc
(ou outro compilador ANSI) e os arquivos headers do X. Especialmente para
os iniciantes em Linux: você deve instalar todos os pacotes de desenvolvimento
do X e a suite gcc. Do contrário você não será capaz de compilar nenhum
programa X, incluindo o Window Maker.
- libPropList
Você pode achar esta biblioteca em ftp://ftp.windowmaker.org/pub/libs ou
ftp://ftp.gnome.org/pub/libPropList. Você deve instalar corretamente
esta biblioteca antes de instalar o Window Maker.
- autoconf, automake and libtool
Estes pacotes não são necessários, mas se você tiver um ou mais deles instalados,
verifique se todos eles são das seguintes versões:
autoconf 2.13
automake 1.4
libtool 1.3
Se você possui uma versão diferente, desative-os mudando os nomes dos arquivos
para outra coisa ou removendo-os do seu sistema. Se você não desenvolve
software você não precisa deles, logo, você pode desinstalá-los com segurança.
- lex (ou flex) e yacc (ou bison)
São usados pelo libPropList. O lex não seria necessário, já que o seu
arquivo de saída é incluído, mas como ou eu ou o automake é um pouco
burro, o script de configuração para o libPropList simplesmente
abortará sem motivo caso o lex não seja achado.
OPCIONAL:
=========
Estas bibliotecas não são necessárias para que o Window Maker funcione, mas elas
são suportadas caso você deseje usá-las. Os números das versões são os que eu
possuo (e portanto quase certamente funcionarão), mas outras versões devem funcionar
também.
- libXPM 4.7 ou mais atual
Versões antigas podem não funcionar.
Disponível em ftp://sunsite.unc.edu/pub/Linux/libs/X/
Há suporte nativo para arquivos XPM, mas ele não carregará imagens em
algumas formatos incomuns.
- libpng 0.96 ou mais atual e zlib
Para suporte a imagens PNG.
- libtiff 3.4 ou mais atual
Para suporte a imagens TIFF. Você pode baixar o libtiff em
ftp://ftp.sgi.com/graphics/tiff.
- libjpeg 6.0.1 ou mais atual
Para suporte a imagens JPEG.
- libgif 2.2 ou libungif
Para suporte a imagens tipo GIF.
- GNU xgettext
Se você deseja usar mensagens traduzidas, será necessário o GNU gettext. Outras
versões do gettext não são compatíveis e não funcionarão. Baixe a versão
GNU através do site ftp://ftp.gnu.org
A maioria dos pacotes citados pode ser encontrado em ftp.uu.net/pub/graphics
OPÇÕES DE CONFIGURAÇÃO
======================
Estas opções podem ser passadas ao script de configuração para ativar/desativar algumas
opções do Window Maker. Exemplo:
./configure --enable-kde --enable-gnome
irá configurar o Window Maker para que seja compilado com suporte ao KDE e GNOME.
Para obter uma lista com outras opcoes, execute ./configure --help:
--with-libs-from
Especifica diretórios (paths) adicionais onde se deve achar as bibliotecas.
A flag -L deve preceder cada caminho, tal como:
--with-libs-from="-L/opt/libs -L/usr/local/lib"
--with-incs-from
Especifica diretórios adicionais para os arquivos de cabeçalho (header files)
que serão procurados. A flag -l deve preceder cada caminho descrito, tal como:
--with-incs-from="-I/opt/headers -I/usr/local/include"
--enable-single-icon
Permite o agrupamento de todas as aplicações com a mesma WM_CLASS+WM_INSTANCE em
uma só. Esta opção não é suportada por todos os desenvolvedores. Se você tiver algum
problema com essa opção, escreva para o seu autor: Christopher Seawood
<cls@seawood.org>
--disable-shm
Desativa o uso da extensão de memória compartilhada do MIT. Isto reduzirá
um pouco a geração de texturas, mas em alguns casos se mostrará necessário
em virtude de um bug que se manifesta quando manipulam-se ícones e texturas.
--disable-motif
Desativa compatibilidade com gerenciador de janelas mwm.
--enable-openlook
Ativa compatibilidade com gerenciador de janelas OPEN LOOK(tm).
--enable-gnome
Ativa compatibilidade com gerenciador de janelas GNOME.
--enable-kde
Ativa compatibilidade com gerenciador de janelas kde/kwm.
--enable-lite
Remove coisas que já são suportadas em ambientes desktops como o KDE
e o GNOME. As opções desativadas são: lista de janelas (window list), menu de
aplicações root (root applications menu), seleção múltipla de janelas
(multiple window selection). Note que não será mais possível sair do Window
Maker de dentro; você terá que usar o kill com o sinal SIGTERM ou sair do KDE.
Não é aconselhado ativar essa opção.
--enable-modelock
Suporte ao bloqueio de status de linguagem do XKB. Se você não sabe o que
é isto, você provavelmente não precisa.
--enable-sound
Ativa o suporte ao módulo de efeitos sonoros.
--disable-xpm
Desativa o uso da biblioteca XPM mesmo se esta estiver disponível no seu sistema.
--disable-png
Desativa o uso da biblioteca PNG
--disable-tiff
Desativa o uso da biblioteca TIFF
--disable-gif
Desativa o uso da biblioteca GIF
--disable-jpeg
Desativa o uso da biblioteca JPEG
--disable-shape
Desativa o uso das shaped windows (para oclock, xeyes etc.).
--enable-debug
Não use esta opção a não ser que saiba realmente o que está fazendo
NOTAS ESPECÍFICAS PARA AS PLATAFORMAS
=====================================
- máquinas DEC/Alpha
Você provavelmente precisará usar a flag --disable-shm para configurar,
como ./configure --disable-shm
- SCO Unix - execute o configure tal como
CFLAGS="-belf -DANSICPP" ./configure
- SunOS, Solaris
Se você possui o gcc instalado, execute o configure como abaixo:
CPP_PATH="gcc -E -x c" ./configure
O cpp da Sun não possui agumas funções necessárias ao Window Maker e pode
causar problemas quando analisados os arquivos de configuração.
Você pode ainda precisar usar --with-libs-from e --with-incs-from
para fornecer o diretório onde a libtiff está localizada.
Alguem me mandou um email dizendo que você precisará deixar o /usr/local/lib
como primeiro caminho (path) no LD_LIBRARY_PATH para que funcione.
Se você tem uma Ultra Creator 3D ou outra máquina com gráficos high-end,
certifique-se de iniciar o servidor X com o visual padrão definido em 24bpp
ou você poderá ter problemas com cores desfiguaradas. Isto é um bug do
wmaker e será consertado.
- GNU/Linux em geral
Confira se você possui /etc/local/lib no /etc/ld.so.conf e rode ldconfig
após a instalação.
Remova qualquer versão em pacote do Window Maker antes de instalar uma versão
mais atual.
- RedHat GNU/Linux
Os sistemas RedHat apresentam vários incômodos. Se você usa, certifique-se
de seguir os passos abaixo ou o Window Maker não funcionará:
* se você instalou o Window Maker que vem junto com o Red Hat, desinstale-o
antes de instalar uma versão mais atual.
* certifique-se de que você não possui as variáveis de ambiente LANG e LINGUAS
configuradas como en_RN;
* certifique-se de que você possui /usr/local/bin na variável PATH;
* certifique-se de que você tem /usr/local/lib no /etc/ld.conf.so antes de
executar o ldconfig;
* se você tiver problemas que mencionem uma mensagem de erro com o
--no-reexec, remova a libtool-1.2b e instale a libtool-1.3. A libtool-1.3
pode ser encontrada em ftp.gnu.org. Também leia a seção TROUBLESHOOTING;
* se você instalou o pacote Window Maker do RedHat e está instalando uma
nova versão na mão (você mesmo está compilando), remova o pacote Window
Maker do seu sistema RedHat antes.
* certifique-se de que você possua o vínculo simbólico do /usr/include/X11
ao /usr/X11R6/include/X11 (se não, digite ln -s /usr/X11R6/include/X11
/usr/include/X11)
* certifique-se de que você tem o /lib/cpp apontando para o programa cpp.
Se você possui alguma dúvida quanto a realizar qualquer uma das tarefas acima,
por favor não hesite em contatar o suporte ao usuário RedHat. Eles gentilmente
irão responder a todas as suas dúvidas relacionadas ao sistema. Eles sabem
muito mais sobre o sistema deles do que nós (nós não usamos RedHat).
- PowerPC MkLinux
Você terá que possuir a última versão do Xpmac. Versões mais antigas
parecem ter bugs que fazem com que o sistema trave.
- Debian GNU/Linux
Se você deseja suporte a JPEG e TIFF, certifique-se que no seu sistema estão
instaladas as bibliotecas libtiff-dev e libjpeg-dev.
- SuSE GNU/Linux
Se você instalou o pacote Window Maker do SuSE, certifique-se de
removê-lo do seu sistema antes de compilar o wmaker ou você poderá
ter problemas.
- MetroX (versão desconhecida)
O MetroX possui uma falha que corrompe os pixmaps que são definidos
como backgrounds de janelas. Se você usa MetroX e está tendo problemas
estranhos com texturas, não use texturas nas titlebars. Ou use
um servidor X diferente.
INSTALAÇÃO:
===========
Desempacote o WindowMaker-extra-<numero-da-versao>.tar.gz no /usr/local/share.
Você pode pegar o arquivo no site ftp://ftp.windowmaker.org. Este arquivo
é opcional e possui alguns ícones e temas. Procure pelo último <número-da-versão>
disponível.
Ainda há o WindowMaker-extra.readme para instruí-lo sobre onde o pacote deve ir.
Compilando o Window Maker
-------------------------
Se você quer fazer de modo rápido e simples, digite o seguinte no seu prompt:
./configure
make
depois entre como root e digite:
make install
ldconfig
ou se você quiser remover os símbolos de depuração dos seus binários para
que eles se tornem menores, você pode digitar:
make install-strip
ldconfig
Estes comandos irão compilar e instalar o Window Maker com parâmetros padrões.
Se você deseja configurar algumas opções de compilação, você pode fazer o seguinte:
1.(opcional) Olhe na seção OPÇÕES DE CONFIGURAÇÃO acima para ver as
opções disponíveis. Execute também:
./configure --help
para obter uma lista completa das outras opções.
2. Rode o configure com as opções que você deseja. Por exemplo, se
deseja usar a opção --enable-kde, você deve digitar:
./configure --enable-kde
3. (opcional) Edite o arquivo src/wconfig.h com seu editor de texto
preferido e procure por alguma opção que deseja mudar
4. Compile. Só digite:
make
5. Entre como root (se você não pode fazer isso, leia a seção "Eu não tenho a
senha de root") e instale o Window Maker no seu sistema:
su root
make install
Configurações Específicas
-------------------------
Estas instruções não precisam ser seguidas quando for feito o upgrade do
Window Maker em cima de uma versão antiga, a menos que o arquivo NEWS diga
algo diferente.
Todo usuário no seu sistema que desejar rodar o Window Maker deverá fazer o seguinte:
1. Instalar os arquivos de configuração do Window Maker no diretório home.
Digite:
wmaker.inst
wmaker.inst vai instalar os arquivos de configuração do Window Maker e fazer
com que o X rode o Window Maker quando executado.
É isso!
Você pode digitar "man wmaker" para ver uma ajuda geral sobre configuração
e outras coisas.
Leia o Manual do Usuário para explicações mais profundas sobre o Window Maker.
Você deve dar uma olhada no FAQ também.
Eu não tenho a senha de root
----------------------------
Se você não pode obter privilégios de super-usuário (não pode ser root) você
pode instalar o wmaker no seu diretório home. Para isso, forneça a opção
--prefix quando for rodar o configure, como explicado no passo 2 da seção
Compilando o Window Maker.
Você ainda precisará fornecer a opção --with-appspath, para especificar o
caminho do WPrefs.app. Exemplo:
./configure --prefix=/home/jshmoe --with-appspath=/home/jshmoe/GNUstep/Apps
Depois faça com que /home/jshome/bin seja incluído na variável PATH, adicione
/home/jshome/lib na variável de ambiente LD_LIBRARY_PATH e rode bin/wmaker.inst
É claro, substitua /home/jshome com o seu diretório home.
UPGRADE
=======
Se você está fazendo um upgrade de uma versão antiga do Window maker:
1. Configure e compile o Window Maker como sempre
2. Instale o Window Maker (mas não rode o wmaker.inst)
3. Leia o arquivo NEWS e atualize seus arquivos de configuração,
se necessário.
TROUBLESHOOTING
===============
Quando você tiver problemas na configuração (enquanto roda o configure),
tal como não conseguir usar uma biblioteca de gráficos que você acha que tem
instalada, olhe no arquivo config.log para obter dicas sobre o que pode estar
errado.
== Erro ao carregar as fontes, mesmo quando elas existem
Tente reconstruir sem suporte NLS.
== Erro ao configurar
ltconfig: unrecognized option `--no-reexec'
Try `ltconfig --help' for more information.
configure: error: libtool configure failed
remova a opção --no-reexec do aclocal.m4 e da libPropList/aclocal.m4
e reconfigure.
Também verifique se as versões do autoconf e do automake que você tem
instaladas são:
autoconf 2.13
automake 1.4
libtool 1.3
Note que não deve ser libtool 1.2b, deve ser libtool 1.3.
== Não acha a proplist.h ou libPropList.algumacoisa
Baixe e instale a libPropList dos sites já citados neste arquivo.
== o configure não detecta a libtiff, ou outras bibliotecas gráficas.
Delete o config.cache, depois rode de novo o configure adicionando as
seguintes opções ao configure (e as outras opções que você usa):
--with-libs-from="-L/usr/local/lib"
--with-incs-from="-I/usr/local/include -I/usr/local/include/tiff"
Substitua o caminho para onde estão localizadas as suas bibliotecas gráficas
e os correspondentes arquivos de cabeçalho. Você pode colocar caminhos múltiplos
em qualquer uma dessas opções, como no exemplo do --with-incs-from. Só ponha um
espaço entre eles.
== o configure não detecta libXpm.
* Confira se você possui um vínculo simbólico da libXpm.so.4.9 para libXpm.so
== Segmentation fault na inicialização
* Confira se a versão da libXPM é a 4.7 ou mais atual
* Confira se você tem uma versão atualizada do ~/GNUstep/Defaults/WindowMaker
Se você não tem certeza, tente renomear ~/GNUstep para ~/GNUtmp e depois rode
o wmaker.inst
== "...: your machine is misconfigured. gethostname() returned (none)"
* o hostname da sua máquina está definido incorretamente. Execute um man hostname
para obter informações de como resolver isto.
== O menu do root possui só 2 entradas. ("XTerm" e "Exit...")
* O Window Maker não está achando o cpp (o pré-processador C). Se o seu cpp
não está localizado em /lib/cpp, edite src/config.h e corrija o caminho
no CPP_PATH.
== checking lex output file root... configure: error: cannot find output from
true; giving up
* Leia a seção REQUERIMENTOS deste arquivo.
LOCALES/INTERNACIONALIZAÇÃO
===========================
o Window Maker tem suporte a linguagem nacional. Para ativar esse suporte,
você precisa compilar o Window Maker com parâmetros adicionais.
0 - Você deve Ter o pacote do GNU gettext instalado. Este pode ser obtido
pelo ftp://prep.ai.mit.edu/pub/gnu/gettext-nnn.tar.gz
Os passos 1,2 e 3 podem ser pulados se você usa o script Install.
1 - Você deve selecionar as linguagens que deseja suportar. Defina a LINGUAS
para a lista dos locales que você deseja. O Inglês é sempre suportado. Exemplo:
setenv LINGUAS "pt ja de"
na csh
ou
export LINGUAS;LINGUAS="pt ja de"
na sh
A lista dos locales suportados pode ser achado no arquivo po/README.
O inglês é a língua oficial.
Leia o arquivo po/README se você deseja traduzir e manter os arquivos
locales para outras linguagens.
2 - Adicionalmente, se a sua linguagem usa caracteres multi-bytes, tais
como as línguas japonesas e koreanas, você deve definir a opção MultiByteText
para YES nos arquivos ~/GNUstep/Defaults/WMGLOBAL e ~/GNUstep/Defaults/WindowMaker
3 - Configure, compile e instale o Window Maker normalmente.
4 - Para selecionar um locale particular você deve definir a variável de
ambiente LANG para o locale que você quer. Por exemplo, se você quer definir o
locale português, você deve rodar
setenv LANG pt
na csh ou
export LANG; LANG=pt
nas Bourne sh e similares
Nota: Se você tem a variável de ambiente LC_CTYPE definida, você deve
indefiní-la antes de rodar o wmaker.
O Window Maker procura os arquivos de definições de menu na seguinte
ordem (para o português brasileiro, neste caso):
menu.pt_BR
menu.pt
menu
5 - Se você escolheu uma linguagem que usa caracteres multi-bytes, você
deve configurar as fontes adequadamente. Leia a página de manual para o
XcreateFontSet para obter mais detalhes sobre isto. Você deve mudar o arquivo
~/G/D/WindowMaker para as fontes usadas nas barras de título, menus e
outras coisas. Para as fontes usadas nas janelas de diálogo, mude o arquivo
~/G/D/WMGLOBAL. O %d no font names não deve ser removido. Você pode ainda usar
o wsetfont script para esta tarefa. Leia o próprio script para maiores instruções.
Por exemplo, você pode especificar o seguinte no ~/G/D/WindowMaker:
WindowTitleFont = "-*-helvetica-bold-r-normal-*-12-*,-*-*-medium-r-normal-*-14-*";
MenuTitleFont = "-*-helvetica-bold-r-normal-*-12-*,-*-*-medium-r-normal-*-14-*";
MenuTextFont = "-*-helvetica-medium-r-normal-*-12-*,-*-*-medium-r-normal-*-14-*";
IconTitleFont = "-*-helvetica-medium-r-normal-*-8-*,-*-*-medium-r-normal-*-12-*";
ClipTitleFont = "-*-helvetica-bold-r-normal-*-10-*,-*-*-medium-r-normal-*-12-*";
DisplayFont = "-*-helvetica-medium-r-normal-*-12-*,-*-*-medium-r-normal-*-12-*";
e no ~/G/D/WMGLOBAL:
SystemFont = "-*-*-medium-r-normal-*-%d-*-*-*-*-*-*-*";
BoldSystemFont = "-*-*-medium-r-normal-*-%d-*-*-*-*-*-*-*";
As duas fontes acima são usadas somente por aplicações que
usem WINGs (o Window Maker e WPrefs.app)
O script wsetfont que é fornecido vai permitir com que você mude as
definições de fonte do modo mais fácil. Dê uma olhada no script para maiores
detalhes sobre o uso.
Traduzido por Ricardo Sartori <sartori@inf.ufsc.br>

270
Install
View File

@@ -1,270 +0,0 @@
#!/bin/sh
#
# WindowMaker configuration and compilation script.
#
# Copyright (c) 1997, 1998, 1999 Alfredo K. Kojima
#
export LINGUAS;LINGUAS=""
if test "$NLSDIR" = ""; then
export NLSDIR;NLSDIR="/usr/lib/locale"
fi
OPTIONS=""
PREFIX="/usr/local"
perai() {
echo "Type <Return> to continue"
read nada
}
perform() {
if ! $* ; then
echo
echo "Window Maker installation failed or aborted by user."
exit 1
fi
}
trap "echo Window Maker installation aborted. ; exit 1" 2 3
echo
echo "========================="
echo "Window Maker Installation"
echo "========================="
echo
echo "NOTE: If this script fails, read the INSTALL file and"
echo "install by hand."
echo
echo "Please read the README, INSTALL and FAQ files before e-mailing "
echo "questions. We will IGNORE any questions that are already"
echo "answered in the documentation."
echo
perai
echo
echo "Did you install libPropList? If not, please install it now."
echo
perai
echo "Did you read the INSTALL file?"
echo -n "<y/n> "
read rtfm
if [ "$rtfm" != y ]; then
echo "Please read the INSTALL file before installing"
exit
fi
echo "Are you sure?"
echo -n "<y/n> "
read rtfm
if [ "$rtfm" != y ]; then
echo "Please read the INSTALL file before installing"
exit
fi
echo "Are you lying?"
echo -n "<y/n> "
read rtfm
if [ "$rtfm" != n ]; then
echo "What a shame!"
echo "Please read the INSTALL file before installing"
exit
fi
echo "Do you *swear* that you really read the INSTALL file?"
echo -n "<y/n> "
read rtfm
if [ "$rtfm" != y ]; then
echo "Please read the INSTALL file before installing"
exit
fi
echo "Last chance. You will not get help if you have some problem"
echo "because you didn't read that file. Even if your computer explodes."
echo "Do you *really* read it?"
echo -n "<y/n> "
read rtfm
if [ "$rtfm" != y ]; then
echo "Please read the INSTALL file before installing"
exit
fi
echo
echo "Ok, you have been warned."
echo
perai
if test "$USER" != "root"; then
echo
echo "Warning: you must run this script as root to install"
echo "Window Maker. Hit <Control>-<C> to quit this script."
perai
echo
fi
echo
echo "Option Selection"
echo "================"
######################## KDE
echo
echo "Do you want KDE support?"
echo -n "<y/n> [n] "
read kde
if [ "$kde" = y -o "$kde" = Y ]; then
OPTIONS="$OPTIONS --enable-kde"
fi
######################## GNOME
echo
echo "Do you want GNOME support?"
echo -n "<y/n> [n] "
read gnome
if [ "$gnome" = y -o "$gnome" = Y ]; then
OPTIONS="$OPTIONS --enable-gnome"
fi
######################## OLWM
echo
echo "Do you want OPEN LOOK(tm)/olwm support?"
echo -n "<y/n> [n] "
read olwm
if [ "$olwm" = y -o "$olwm" = Y ]; then
OPTIONS="$OPTIONS --enable-openlook"
fi
######################## NLS
echo
echo "Do you want National Language Support?"
echo -n "<y/n> [n] "
read NLS
if [ "$NLS" = "y" -o "$NLS" = "Y" ]; then
NLS="Y"
echo "The supported locales are:"
ling=` (cd po; /bin/ls *.po) `
ALL_LINGUAS=""
for l in $ling; do
lname=`(cd po; grep Language-Team $l|cut -f 2 -d: |cut -f 2 -d\ )`
lname=`echo $lname`
lcode=`basename $l .po`
ALL_LINGUAS="$ALL_LINGUAS $lcode"
echo "$lcode $lname"
done
echo "Type in the locales you want (all will install everything) [none]"
read foo
if test "$foo" = "all"; then
LINGUAS="$ALL_LINGUAS"
else
LINGUAS="$foo"
fi
echo "Selected locales are: $LINGUAS"
MB=""
for i in $LINGUAS; do
ok=0
for b in $ALL_LINGUAS; do
if test "$b" = "$i"; then
ok=1
break
fi
done
if test "$ok" = "0"; then
echo
echo "$i is not a supported locale"
perai
continue
fi
done
echo
echo "Where do you want to put the message files? [$NLSDIR]"
echo -n "? "
read foo
if test "x$foo" != "x"; then
NLSDIR=$foo
fi
fi
##################### Installation path
done=0
while [ $done = 0 ]; do
echo
echo "Where do you want to install Window Maker? [$PREFIX]"
echo "Don't change it if you don't know what you're doing."
if test "$USER" != "root"; then
echo "Make sure to specify a path where you have write permission."
fi
echo "(The default will put Window Maker in $PREFIX/bin, $PREFIX/lib etc.)"
echo -n "? "
read foo
if test "x$foo" != "x"; then
if [ "$foo" = "y" -o "$foo" = "n" ]; then
echo
echo "Hmm... I don't think you really want to install Window Maker into \"$foo\""
echo
else
done=1
PREFIX=$foo
fi
else
done=1
fi
echo
echo " $PREFIX/bin must be in the PATH environment variable"
echo "of all users who will use Window Maker"
perai
done
OPTIONS="$OPTIONS --prefix=$PREFIX"
##################### Configure
echo "--------------------------"
echo "Configuring Window Maker..."
echo "--------------------------"
if [ `uname -s` = "SCO_SV" ]; then
echo "CFLAGS=\"$CFLAGS -belf -DANSICPP\" ./configure $OPTIONS"
CFLAGS="$CFLAGS -belf -DANSICPP"
perform ./configure $OPTIONS
else
echo "CFLAGS=\"$CFLAGS $GCCFLAGS\" ./configure $OPTIONS"
CFLAGS="$CFLAGS $GCCFLAGS"
perform ./configure $OPTIONS
fi
#################### Compile
echo "-------------------------"
echo "Compiling Window Maker..."
echo "-------------------------"
(cd src; perform make clean)
perform make
echo "--------------------------"
echo "Installing Window Maker..."
echo "--------------------------"
perform make install
if [ `uname -s` = "Linux" ]; then
echo
echo " Make sure $PREFIX/lib is in the /etc/ld.so.conf file"
/sbin/ldconfig
fi
echo
echo "Installation Finished!"
echo
echo "Now, each user that wishes to use WindowMaker must run the wmaker.inst"
echo "script that was just installed."
if test "$NLS" = "Y"; then
echo "Don't forget to set the LANG environment variable to your locale"
fi

90
MIRRORS
View File

@@ -1,90 +0,0 @@
Window Maker FTP Mirror Sites
=======-=====================
Official Site (USA):
--------------------
ftp://ftp.windowmaker.org/
Australia:
----------
ftp://ftp.goldweb.com.au/pub/WindowMaker/
Contact: Matthew Hawkins <matt@goldweb.com.au>
France:
-------
ftp://ftp.ensm-ales.fr/pub/mirrors/ftp.windowmaker.org
Contact: Laurent PELLISSIER <Laurent.Pellissier@ensm-ales.fr>
Germany:
--------
ftp://ftp.freenews.de/pub/windowmaker/
Contact: Jonas Luster <jonas@cabal.arnooo.de>
United States of America:
-------------------------
ftp://ftp.io.com/pub/mirror/windowmaker/
Contact: Bobby <bobby@mezaway.org>
http://jgo.local.net/cool_downloads/wm/
Contact: Joshua Go <joshuago@usa.net>
ftp://ftp.cybertrails.com/pub/windowmaker/
Contact: Adam Jacob <adam@cybertrails.com>
Provider: Ameth Technologies
http://www.ameth.org/windowmaker/
ftp://ftp.ameth.org/pub/mirrors/ftp.windowmaker.org/
Contact: Chase Phillips <shepard@ameth.org>
Third Party Window Maker Distribution Packages
==============================================
Debian GNU/Linux (deb)
----------------------
Contact: Marcelo Magallon <mmagallo@efis.ucr.ac.cr>
Sites:
http://master.debian.org/~mmagallo/packages/wmaker/
RedHat GNU/Linux (RPM)
----------------------
For Intel:
Contact: Jim Knoble <jmknoble@pobox.com>
Sites:
ftp://ftp.windowmaker.org/pub/beta/compiled/linux/rpms/
ftp://ftp.redhat.com/pub/contrib/SRPMS/
ftp://ftp.redhat.com/pub/contrib/i386/
For Alpha:
Contact: Peter Petrakis <peterpan@wn.net>
Site:
http://math.stcc.mass.edu/petrakis/downloads/X11
HP-UX
-----
Sites:
UK: http://hpux.csc.liv.ac.uk/
Germany: http://hpux.ask.uni-karlsruhe.de/
US (WI): http://hpux.cae.wisc.edu/
France: http://hpux.cict.fr/
Netherlands: http://hpux.tn.tudelft.nl/
Canada: http://hpux.ee.ualberta.ca/
Italy: http://hpux.dsi.unimi.it/
South Africa: http://hpux.petech.ac.za/
Japan: http://hpux.u-aizu.ac.jp/
US (UT): http://hpux.cs.utah.edu/

View File

@@ -1,26 +1,53 @@
## Process this file with automake to produce Makefile.in
SUBDIRS = wrlib WINGs src util po WindowMaker wmlib test WPrefs.app doc\
contrib
AUTOMAKE_OPTIONS =
EXTRA_DIST = TODO BUGS BUGFORM FAQ FAQ.I18N MIRRORS COPYING.WTFPL \
Install acconfig.h INSTALL.pt README.pt\
mkpatch README.KDE README.GNOME WindowMaker.lsm.in\
README.definable-cursor \
libwmfun-0.0.2.tar.gz
BUILT_SOURCES = config-paths.h
WindowMaker.lsm: WindowMaker.lsm.in
size=`wc -c $(distdir).tar.gz|cut -d\ -f1`;\
size=`echo scale=2\;$$size/1048576|bc`;\
sed -e "s/VERSION/"$(VERSION)"/" \
-e "s/DATE/`date +%d%b%Y|tr a-z A-Z`/"\
-e "s/SIZE/$$size M/"\
WindowMaker.lsm.in > WindowMaker-$(VERSION).lsm
DISTCLEANFILES = config-paths.h
#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`
config.h: config-paths.h
config-paths.h: Makefile
@echo "Generating $@"
@echo '/* define to the path to cpp */' > $@
@echo '#define CPP_PATH "$(CPP_PATH)"' >> $@
@echo '' >> $@
@echo '/* gettext domain used for menu translations */' >> $@
@if test -z "$(menutextdomain)"; then \
echo '/* #undef MENU_TEXTDOMAIN "$(menutextdomain)" */' >> $@; \
else \
echo '#define MENU_TEXTDOMAIN "$(menutextdomain)"' >> $@; \
fi
@echo '' >> $@
@echo '/* define an extra path for pixmaps */' >> $@
@echo '#define PIXMAPDIR "$(pixmapdir)"' >> $@
@echo '' >> $@
@echo '/* where shared data is stored */' >> $@
@echo '#define PKGDATADIR "$(datadir)/WindowMaker"' >> $@
@echo '' >> $@
@echo '/* where the configuration is stored */' >> $@
@echo '#define SYSCONFDIR "$(sysconfdir)"' >> $@
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = wrlib WINGs src util po WindowMaker WPrefs.app doc
EXTRA_DIST = TODO BUGS BUGFORM FAQ FAQ.I18N INSTALL \
INSTALL-WMAKER README.definable-cursor \
The-perfect-Window-Maker-patch.txt \
README COPYING.WTFPL autogen.sh
if USE_LCOV
coverage-reset:
find . -type f -name '*.gcda' -exec rm -f '{}' ';'
lcov --directory . --zerocounters
coverage:
rm -rf coverage @lcov_output_directory@
-mkdir -p coverage @lcov_output_directory@
lcov --compat-libtool --capture --directory . --output-file coverage/coverage.info
genhtml --output-directory @lcov_output_directory@ coverage/coverage.info
.PHONY: coverage-reset coverage
endif

View File

@@ -1,374 +0,0 @@
# Makefile.in generated automatically by automake 1.4 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
AS = @AS@
CC = @CC@
CPP_PATH = @CPP_PATH@
DFLAGS = @DFLAGS@
DLLIBS = @DLLIBS@
DLLTOOL = @DLLTOOL@
GFXLIBS = @GFXLIBS@
HEADER_SEARCH_PATH = @HEADER_SEARCH_PATH@
ICONEXT = @ICONEXT@
INTLIBS = @INTLIBS@
LD = @LD@
LIBPL = @LIBPL@
LIBRARY_SEARCH_PATH = @LIBRARY_SEARCH_PATH@
LIBTOOL = @LIBTOOL@
LITE = @LITE@
LN_S = @LN_S@
MAKEINFO = @MAKEINFO@
MOFILES = @MOFILES@
NETLIBS = @NETLIBS@
NLSDIR = @NLSDIR@
NM = @NM@
OBJDUMP = @OBJDUMP@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
VERSION = @VERSION@
WPMOFILES = @WPMOFILES@
XCFLAGS = @XCFLAGS@
XGETTEXT = @XGETTEXT@
XLFLAGS = @XLFLAGS@
XLIBS = @XLIBS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBRARY_PATH = @X_LIBRARY_PATH@
supported_locales = @supported_locales@
wprefsdir = @wprefsdir@
SUBDIRS = wrlib WINGs src util po WindowMaker wmlib test WPrefs.app doc contrib
EXTRA_DIST = TODO BUGS BUGFORM FAQ FAQ.I18N MIRRORS COPYING.WTFPL Install acconfig.h INSTALL.pt README.pt mkpatch README.KDE README.GNOME WindowMaker.lsm.in README.definable-cursor docklib-0.2.tar.gz libwmfun-0.0.2.tar.gz
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ./src/config.h
CONFIG_CLEAN_FILES =
DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \
Makefile.in NEWS TODO acinclude.m4 aclocal.m4 config.guess config.sub \
configure configure.in install-sh ltconfig ltmain.sh missing \
mkinstalldirs
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = gtar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
cd $(top_builddir) \
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
$(ACLOCAL_M4): configure.in acinclude.m4
cd $(srcdir) && $(ACLOCAL)
config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
@SET_MAKE@
all-recursive install-data-recursive install-exec-recursive \
installdirs-recursive install-recursive uninstall-recursive \
check-recursive installcheck-recursive info-recursive dvi-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
dot_seen=no; \
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
rev="$$subdir $$rev"; \
test "$$subdir" = "." && dot_seen=yes; \
done; \
test "$$dot_seen" = "no" && rev=". $$rev"; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP)
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
here=`pwd` && cd $(srcdir) \
&& mkid -f$$here/ID $$unique $(LISP)
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
mostlyclean-tags:
clean-tags:
distclean-tags:
-rm -f TAGS ID
maintainer-clean-tags:
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
-rm -rf $(distdir)
GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
mkdir $(distdir)/=build
mkdir $(distdir)/=inst
dc_install_base=`cd $(distdir)/=inst && pwd`; \
cd $(distdir)/=build \
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) dist
-rm -rf $(distdir)
@banner="$(distdir).tar.gz is ready for distribution"; \
dashes=`echo "$$banner" | sed s/./=/g`; \
echo "$$dashes"; \
echo "$$banner"; \
echo "$$dashes"
dist: distdir
-chmod -R a+r $(distdir)
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
dist-all: distdir
-chmod -R a+r $(distdir)
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
distdir: $(DISTFILES)
-rm -rf $(distdir)
mkdir $(distdir)
-chmod 777 $(distdir)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu Makefile
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
for subdir in $(SUBDIRS); do \
if test "$$subdir" = .; then :; else \
test -d $(distdir)/$$subdir \
|| mkdir $(distdir)/$$subdir \
|| exit 1; \
chmod 777 $(distdir)/$$subdir; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
|| exit 1; \
fi; \
done
info-am:
info: info-recursive
dvi-am:
dvi: dvi-recursive
check-am: all-am
check: check-recursive
installcheck-am:
installcheck: installcheck-recursive
install-exec-am:
install-exec: install-exec-recursive
install-data-am:
install-data: install-data-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-recursive
uninstall-am:
uninstall: uninstall-recursive
all-am: Makefile
all-redirect: all-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs: installdirs-recursive
installdirs-am:
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
mostlyclean-am: mostlyclean-tags mostlyclean-generic
mostlyclean: mostlyclean-recursive
clean-am: clean-tags clean-generic mostlyclean-am
clean: clean-recursive
distclean-am: distclean-tags distclean-generic clean-am
-rm -f libtool
distclean: distclean-recursive
-rm -f config.status
maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \
distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-recursive
-rm -f config.status
.PHONY: install-data-recursive uninstall-data-recursive \
install-exec-recursive uninstall-exec-recursive installdirs-recursive \
uninstalldirs-recursive all-recursive check-recursive \
installcheck-recursive info-recursive dvi-recursive \
mostlyclean-recursive distclean-recursive clean-recursive \
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
install-exec install-data-am install-data install-am install \
uninstall-am uninstall all-redirect all-am all installdirs-am \
installdirs mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
WindowMaker.lsm: WindowMaker.lsm.in
size=`wc -c $(distdir).tar.gz|cut -d\ -f1`;\
size=`echo scale=2\;$$size/1048576|bc`;\
sed -e "s/VERSION/"$(VERSION)"/" \
-e "s/DATE/`date +%d%b%Y|tr a-z A-Z`/"\
-e "s/SIZE/$$size M/"\
WindowMaker.lsm.in > WindowMaker-$(VERSION).lsm
#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`
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

527
NEWS
View File

@@ -2,6 +2,527 @@
NEWS for veteran Window Maker users
-----------------------------------
--- 0.94.0-crm
New Resizing functionality
--------------------------
You can now use the mouse wheel and modifier keys to resize windows.
MOD+Wheel will resize windows vertically and CTRL+Wheel will resize
windows horizontally. MOD+CTRL+Wheel will resize both at the same time.
The resize step, or increment can be set in WPrefs in the "Window Handling"
page, or in the config file with "ResizeIncrement". If this intrudes into
a specific application's functionality, you can disable it on an application-
by-application basis by setting the "Do not bind mouse clicks" attribute in
"Advanced Options".
New Maximize functionality
--------------------------
Maximus/Maximumize. A new tiled maximization, configured with a keyboard
shortcut. Using it will maximize the window to the greatest area such that it
will not overlap any other window of the same workspace. This can be configured
in WPrefs in the "Keyboard Shortcuts" page, or in the config file with
"MaximusKey".
Left/right maximization. Now wmaker supports maximizing a window to the
left or right half of the screen, making it occupy 50% of the area. This is
useful on widescreen displays where you want to bring up two windows side-by-
side. The shortcut keys for this can be configured in WPrefs in the "Keyboard
Shortcuts" page, or in the config file with "LHMaximizeKey" and "RHMaximizeKey"
History and AutoComplete in the run dialog
------------------------------------------
The "Run..." dialog now autocompletes executables in your path (triggered by
the TAB key) and records the history of past commands (last 500 by default).
It can also complete folder names if you start the complete with a "/"
To use it replace %a with %A in the "Run..." entry in your WMRootMenu file.
See commit 05720d97076ffc1569e5 for more details.
Automatic menu generator (wmgenmenu)
-----------------------------------
There is now a new utility to generate the Window Maker menu automatically,
called wmgenmenu. It searches from a list of pre-defined applications the
ones which exist in your $PATH and adds them to the corresponding submenus
("Internet", "Terminals", "Editors" etc) of your WM menu. It also supports
localization (currently English and German). You can use it like:
$ wmgenmenu > WMRootMenu-new
$ cp WMRootMenu-new $HOME/GNUstep/Defaults/WMRootMenu
and WM will automatically detect the new menu file and use it without
restarting wmaker (made possible by the 'inotify' mechanism)
Automatic detection of menu changes (via inotify)
-------------------------------------------------
Window Maker now uses the 'inotify' mechanism from the linux kernel
to automatically detect changes in the WMRootMenu file. So the
--no-polling option is now gone and Window Maker does not wake up
your CPU unnecessarily (0 wakeups when idle, instead of 4).
So if you edit the WMRootMenu file by hand (or by using 'wmgenmenu'),
there is no need to restart wmaker for the changes to take effect.
DockApp recognition
-------------------
In addition to applications with only Withdrawn windows, Window Maker
will now treat any application with its WM_CLASS res_class set as
"DockApp". This provides an easy workaround for toolkits like gtk+ that
do not allow creation of windows with the initial_state member of
XWMHints set to WithdrawnState.
--- 0.92.0
GNUstep Installation Directory
------------------------------
WPrefs is now installed in /usr/local/bin and /usr/local/share by default.
If you use GNUstep and want it to install in /usr/GNUstep/Applications,
you may specify --with-gnustepdir=/usr/GNUstep
If the GNUSTEP_LOCAL_ROOT environment variable is defined when configure is
executed, it will be used (and you don't need to use --with-gnustepdir)
Cached Pixmaps Directory
------------------------
The directory where Window Maker stores the cached application pixmaps for
its later use has changed from ~/GNUstep/.AppInfo/WindowMaker to
~/GNUstep/Library/WindowMaker/CachedPixmaps for better compatibility with
the GNUstep path structure.
Also WPrefs now stores internal data in ~/GNUstep/Library/WindowMaker/WPrefs
(it was ~/GNUstep/.AppInfo/WPrefs before)
X Input Methods support in WINGs
--------------------------------
Preliminary support for X Input Methods was added to textfield and text
widgets in WINGs. Input for text in other languages than English should
work now (except for kanji which will most likely not work, even though
it wasn't tested).
Disabling the switch panel
--------------------------
To disable the panel shown during Alt-tabbing, you may put the following in
~/GNUstep/Defaults/WindowMaker
SwitchPanelImages= None;
--- 0.91.0
Alt-Tab Window Switching
------------------------
You can change the appearance of the panel shown during Alt-Tab window switching
with the SwitchPanelImages option:
(selected_icon_tile_image, background_image, width, height)
selected_icon_tile_image is the image used to highlight the currently selected
window icon. It must be 64x64 pixels.
background_image is the image used in the background of the panel. It must
be at least 64x80.
width and height are the width and size of the central part of the image.
When drawing the panel, the image will be split as:
|W |
+--+--+--+
| | | |
+--+--+--+ -
| | | | H
+--+--+--+ -
| | | |
+--+--+--+
The 4 corner images will be copied in their original sizes and the rest will
be scaled to the final panel size.
background_image, width and height are optional. If you leave them out,
a gray panel will be used. If your machine is not very fast, you may want
to use it.
--- 0.90.0
NetWM / EWMH Support
--------------------
Support for the EWMH standard has been added. Applications from GNOME 2.x and
KDE 3.x should now interoperate better with Window Maker.
Support for the obsolete/legacy GNOME 1.x, KDE 1.x and OpenLook(!) hints was
wiped out for the sake of sanity.
Antialiased font support
------------------------
With the addition of Xft2 support in the WINGs library, now
Window Maker can display antialiased text with TrueType or any scalable fonts.
You can pick fonts for Window Maker in the Font configuration section of
WPrefs.
Antialiased text is enabled by default, but can be disabled by adding
AntialiasedText = NO; in ~/GNUstep/Defaults/WMGLOBAL
This will disable antialiased text for any WINGs based application. If you
only want to disable them for a specific application only, like WindowMaker
for example, then add the same option in the applications configuration file,
in this case ~/GNUstep/Defaults/WindowMaker
For WindowMaker, this can also be achieved from the Expert panel in WPrefs.
Note that bitmapped fonts look much better than TrueType when antialiasing is
disabled.
Global Submenus
---------------
Global menus allow for system wide menus that are added to every users
application menus. They are located in /usr/etc/WindowMaker/,
/usr/local/etc/WindowMaker or whatever is your sysconf directory
for WindowMaker. There are 2 files:
GlobalMenu.pre, which is added to the beginning of the menu and
GlobalMenu.post, which is added to the end of the menu.
These are to be proplist format menus, for example:
(("Foobar", EXEC, foobar),
("Blabla", EXEC, blabla))
or, in case you want a submenu:
(("Submenu",
("Foobar", EXEC, foobar),
("Blabla", EXEC, blabla)))
UTF-8 Support
-------------
Window Maker now uses UTF-8 internally (and thus can display UTF-8 text
in window titles and other places). Menus and po files must now be
encoded in UTF-8. If your menus contain non ASCII characters, you can convert
them to UTF-8 with the following command:
iconv -f <current-file-encoding> -t utf-8 <filename> > <filename>.utf8
For example:
iconv -f iso-8859-1 -t utf-8 menu > menu.utf
mv menu.utf menu
Icon Panel for Alt-Tabbing
--------------------------
A panel with icons for the windows that you can switch to will appear
when you press Alt-Tab. You can navigate through the windows with Alt-Tab
(Alt-Shift-Tab) or with the left/right keys once the panel is shown.
--- 0.80.0
Shading/Unshading windows using mouse wheel on their titlebar
-------------------------------------------------------------
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
are interpreted via a mapping in the global WINGs configuration file,
WMGLOBAL, by the MouseWheelUp and MouseWheelDown directives which will do
shading and unshading respectfully.
However, to avoid unwanted triggers of shading/unshading the window, two
consecutive mouse wheel events in the same direction are required. The
trigger won't occur if the events are separated by more than a double-click's
worth of time, which is technically speaking like making a double-click with
the button that corresponds to the mouse wheel direction.
Practically speaking, this means that you have to move the mouse wheel up
or down quickly, like when you want to quickly scroll over something big.
Shared application icons
------------------------
Real application icon sharing was implemented in place of the collapse
appicon thing. With this applications of the same instance.class will
have a single shared application icon and hiding will hide all windows
of the aplications attached to that appicon as if there is a single
application. This feature is enabled by default for all applications in
the global WMWindowAttributes defaults domain using:
"*" = {SharedAppIcon = Yes;};
If you're not satisfied with this or want the old behaviour back you
can revert this (either in the global domain for all users or in your
personal WMWindowAttibutes domain) using SharedAppIcon = No; for "*"
It can also be enabled/disabled for individual applications as needed.
Setting this option can be done using the window's inspector panel in the
"Application Specific" section. You can set/unset it for all applications by
using the "Defaults for all windows" in the "Window Specification" section
Basically using this can have 2 major scenarios:
1. Leave it on by default, but disable it for the few specific
applications that do not behave well with it. (default)
2. Leave it off by default, and enable it for all applications for
which you want it enabled.
At this point all applications we tested work ok, some of them even
work better with this feature turned on: for example xmms and Corel's
WorkPerfect8 now only have 1 appicon (they used to have 2 without this
feature).
This feature is turned off by default for the following applications
because it's incompatible with them:
1. all GNUstep applications
2. applications with an application menu (wterm, Aileron, etc)
3. all applications with withdrawn windows only (this means all dockapps)
As a side note: wterm can use the shared appicon feature as long as it
doesn't use the appmenu (will do this by default). If you start it
using the appmenu (wterm -wm) it will disable the shared appicon
feature because apps with appmenus are incompatible with this feature.
If an application is a GNUstep application or if it has an appmenu, it's
detected automatically and the shared appicon is disabled automatically
without any user intervention or need to configure anything.
Dock/Clip stealing appicons
---------------------------
This feature is different form the Clip's "Autoattract Icons" feature
as it won't attach any new icon to the dock/clip.
What it does, is when you start an application by other means than
dock/clip, like for example using the main menu or a terminal, it will
search the dock/clips for the presence of an appicon for that
application, that is not already running at that moment and will attach
the started application to that appicon in the dock/clip if available,
making it look like the dock/clip just stole the appicon for the started
application. There is an animation for this to offer visual feedback
that this happened.
--- 0.70.0
New dock option
---------------
Copy/paste launch in dock.
==========================
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
-----------------
starting with 0.70.0 libPropList is no longer required to build Window
Maker. PropList handling code was added to WINGs being now better
integrated with all the rest. For more details check the Changelog and the
following files:
./WINGs/ChangeLog
./WINGs/NEWS
./WINGs/WINGs/WUtil.h
./WINGs/WINGs/proplist-compat.h
--- 0.65.1
Removed FocusFollowMouse option, only SloppyFocus present now.
Added None option to MoveDisplay and ResizeDisplay
--- 0.65.0
Single AppIcon
--------------
Removed --single-appicon patch and replaced it with a application
specific collapsing option. Check inspector panel and appicon menu.
New options to configure the workspace mouse actions
----------------------------------------------------
The following options were removed from the WindowMaker defaults configuration
file:
SelectWindowsMouseButton, WindowListMouseButton and ApplicationMenuMouseButton.
They were replaced with the following 3+1:
MouseLeftButtonAction, MouseMiddleButtonAction and MouseRightButtonAction plus
MouseWheelAction
In the old way because all gravitated around the workspace actions to which
specific mouse buttons could have been bound, it allowed one to specify in
the configuration file settings which would have led to weird situations
that also had undesirable results.
For example the same mouse button (for example left) could have been
assigned to all workspace actions: 'select windows', 'show window list menu'
and 'show applications menu' which of course were not only impossible to
accomplish while still having a properly working workspace, but they also
allowed one to specify some settings in the configuration file that were
never in fact translatable to proper workspace actions.
To void this kind of user interface inconsistency, the new options now
gravitate around the physical device (the mouse and its buttons) to which
specific workspace actions can be bound. This way, even if one assigns the
same action to all mouse buttons, that situation while gives redundant and
unpractical settings it will still translatable to proper workspace actions:
all buttons will execute the same action, but a button will execute only one
action at a time.
The new options take the following values:
all Mouse...ButtonAction can have one of the following values:
None, SelectWindows, OpenApplicationsMenu or OpenWindowListMenu
MouseWheelAction can be one of None or SwitchWorkspaces
If you had the default actions bound to mouse buttons before, then it will
work for you without any intervention in the configuration files.
Else you need to use WPrefs.app to bind the actions to the mouse buttons
again to your old settings. Also if you want to change the mouse wheel
behavior regarding workspaces you can now (use WPrefs.app to do this).
Client supplied icons
---------------------
Window Maker saves the client supplied icons in
~/GNUstep/Library/WindowMaker/CachedPixmaps in XPM format for later use
when the app is no longer running (to have the image to display for docked
icons for example).
Until recently the XPM images saved by Window Maker were incorrect, but a
recent fix in the code to save XPM's fixed them. But with this fix, all
previously saved XPM's in that directory are no longer readable (they give
wrong images on screen or fail to load).
To avoid the need for the user to fix this by hand editing WMWindowAttributes
and removing all references to icons in ~/GNUstep/Library/WindowMaker/CachedPixmaps
which can be annoying, new code was added to Window Maker to permit the
regeneration of images in ~/GNUstep/Library/WindowMaker/CachedPixmaps if they are missing.
With this addition, all you need to do to fix your old broken images, is to
delete all *.xpm files from ~/GNUstep/Library/WindowMaker/CachedPixmaps. Next time the
application that is supplying an icon image will start the icon will be
recreated if missing, but this time it will be saved with the new XPM save
code which produces good XPM images.
All the rest of the process is transparent to the user.
Hermes library support
----------------------
If configure finds hermes library (an optimized pixel format conversion
library) installed it will use it to do the pixel format conversion in
the wraster library for some cases (TrueColor visuals without dithering).
Currently the hermes routines cannot convert to an indexed destination,
so we can't use hermes for PseudoColor, GrayScale and StaticGray visuals.
Also hermes only does dithering for just 2 combinations of source/destination
bits/masks none of them useful to out needs so for dithering we still
use out routines.
The Hermes library is completely optional, you can build Window Maker
without having it, it just speeds up the things a little for some
situations.
hermes library is available here: http://www.clanlib.org/hermes/
--- 0.64.0
No Polling of Configuration Files
---------------------------------
Running Window Maker with one of -nopolling or --no-polling command line
options will make it not to poll every 3 seconds for changes in its
configuration files (good for laptops to let them spin disks down when idle).
Note:
For the ones used with Jim Knoble's 'no polling' patch, this is the same,
except that the need to #define ENABLE_NO_POLLING in wconfig.h was removed
and the behaviour is always available if you use the command line option.
--- 0.63.0
Interwoven Gradient
-------------------
interwoven gradients rip^Winspired on blackbox. Will render a texture that
interweaves 2 different ones.
(igradient, from1, to1, thickness1, from2, to2, thickness2)
Will render a interwoven texture with the 2 specified gradients,
with each section having the specified thickness.
wmagnify
--------
The wmagnify utility will magnify the area on teh screen where
your mouse pointer is located, updating it in real-time.
tip: maximize it horizontally, make it Omnipresent and Always at Bottom.
Then leave it in the bottom of the screen.
workspace border
----------------
2 options (WorkspaceBorder and WorkspaceBorderSize) were added to allow one to
set a small (0..5 pixels) border for the workspace. This border will not be
covered by windows when maximizing, allowing one to easily access the clip
or map a menu using the mouse in the border area, even when there are
windows maximized in both horizontal and vertical directions.
WorkspaceBorder can be one of (None, LeftRight, TopBottom, AllDirections)
while WorkspaceBorderSize is the size in pixles of the border not to be
covered by windows when maximizing (usually a small amount 0..5 pixles).
Both options can be set using WPrefs.app in the "Miscelaneous Ergonomic
Preferences" section. WPrefs will always limit WorkspaceBorderSize in the
(0..5) range.
Note that if "full screen maximization" option is set for a window, that
window will ignore this border area, maximizing to full screen.
--- 0.62.0
@@ -329,7 +850,7 @@ Themes
Removed all themes from the source tree, and moved them in a separate package.
You can download the new package from the same place as this package:
ftp://ftp.windowmaker.org/pub/beta/srcs/
ftp://ftp.windowmaker.info/pub/beta/srcs/
Look after WindowMaker-extra-<version-number>.tar.gz
Also WindowMaker-extra pack include the old WindowMaker-data.tar.gz which only
contained icons.
@@ -424,7 +945,7 @@ libPropList
WARNING!!! libPropList was removed from the Window Maker distribution
and is being distributed separately. If you dont have it installed yet,
get it from ftp.windowmaker.org/pub/libs and install before building
get it from ftp.windowmaker.info/pub/libs and install before building
Window Maker.
@@ -785,7 +1306,7 @@ Persistent Program Suplied Icons
Application supplied icons are now stored, so that the dock will keep
showing them after the app is exited. The icons are stored at
~/GNUstep/.AppInfo/WindowMaker/
~/GNUstep/Library/WindowMaker/CachedPixmaps
Sound support

265
README
View File

@@ -5,7 +5,6 @@
X11 Window Manager
<http://windowmaker.org>
<ftp://ftp.windowmaker.org>
by
@@ -13,9 +12,6 @@
Dan Pascu
Matthew Hawkins
]d
Web/FTP Master
@@ -44,25 +40,25 @@
Description
===========
Window Maker is the GNU window manager for the X Window System. It was
designed to emulate the look and feel of part of the NEXTSTEP(tm) GUI. It's
supposed to be relatively fast and small, feature rich, easy to configure and
easy to use, with a simple and elegant appearance borrowed from NEXTSTEP(tm).
Window Maker is the GNU window manager for the X Window System. It was designed
to emulate the look and feel of part of the NEXTSTEP(tm) GUI. It's supposed to
be relatively fast and small, feature rich, easy to configure and easy to use,
with a simple and elegant appearance borrowed from NEXTSTEP(tm).
Window Maker was designed keeping integration with GNUstep in mind and is the
"official" window manager for it. It is also part of the GNU project
(www.gnu.org) Read more about GNUstep further on this file.
Hints (information given by applications to integrate well with the window
manager) for Motif(tm), OPEN LOOK(tm), KDE and GNOME are also supported.
So you can replace any of the window managers for these environments
with Window Maker while keeping most, if not all, of the native window manager
functionality.
manager) for Motif(tm) and NETWM are also supported (NETWM is used by KDE and
GNOME, so they are automatically supported as a result). So you can replace any
of the window managers for these environments with Window Maker while keeping
most, if not all, of the native window manager functionality.
Window Maker was previously called WindowMaker.
Window Maker has no connection with Windowmaker, the software for
making windows and doors.
Window Maker has no connection with Windowmaker, the software for making windows
and doors.
Documentation
@@ -74,8 +70,8 @@ Read before asking.
in the directories.
* INSTALL has installation instructions and some troubleshooting tips.
You're meant to read it before installing. it was not written just to
fill up space in the package...
You're meant to read it before installing. it was not written just to fill up
space in the package.
* FAQ: Frequently Asked Questions. READ IT!!! FAQ.I18N is for
internationalization related questions.
@@ -83,22 +79,23 @@ internationalization related questions.
* NEWS: list user visible changes from the previous version. Read it if
you are upgrading.
* MIRRORS: some alternative places where you can get Window Maker,
including platform specific packages of Window Maker.
* BUGFORM: use it to send bug reports. Please do use it.
* ChangeLog: what changed from the previous version?
* BUGS: list of known bugs
*** Tutorial
There's a tutorial maintained by Georges Tarbouriech at:
http://www.linuxfocus.org/~georges.t/
*** User Guide
The Window Maker User's Guide can be downloaded from the official ftp
or web sites.
It can also be viewed in HTML format in:
http://people.delphi.com/crc3419/WMUserGuide/index.htm
The User Guide explains how to use Window Maker, the configuration files
and options.
@@ -121,8 +118,8 @@ way (not that the normal way is difficult, but...).
* TODO: plans for the future
* contrib/ has some contributed patches that are not supported by Window Maker
because they conflict with design filosophies of the developers or some
other reason.
because they conflict with design philosophies of the developers or some other
reason.
* util/ has various utility programs.
@@ -145,137 +142,96 @@ HELP ME!!!
==========
There is a mailing list for discussing Window Maker at
wm-user@windowmaker.org To subscribe to it, send a message containing:
subscribe
in the subject of the message to wm-user-request@windowmaker.org
wmaker-user@lists.windowmaker.org To subscribe to it, send a message to
wmaker-user-subscribe@lists.windowmaker.info
If you got a problem, ask there (after reading the docs, of course). The
people there is more likely to be able to answer your questions than we are.
For bug reports use the BUGFORM.
If you got a problem, ask there (after reading the docs, of course). The people
there is more likely to be able to answer your questions than we are. For bug
reports use the BUGFORM.
If you have a problem with a precompiled version of Window Maker
(rpm, deb etc), first ask the person who made the package.
If you have a problem with a precompiled version of Window Maker (rpm, deb etc),
first ask the person who made the package.
IMPORTANT NOTE: when asking for help (in the mailing list or to the
developerts, directly) *always* send information about the system you are
using. You can use the system information section at the end of BUGFORM as a
guideline. Another thing: please don't send HTML mail.
IMPORTANT NOTE: when asking for help (in the mailing list or to the developerts,
directly) *always* send information about the system you are using. You can use
the system information section at the end of BUGFORM as a guideline. Another
thing: please don't send HTML mail.
There is also a #windowmaker IRC channel at openprojects. To join there,
connect your irc client to irc.openprojects.net, irc.linux.com or some other
server of that network.
There is also a #windowmaker IRC channel at freenode. To join there, connect
your irc client to irc.freenode.net. irc.windowmaker.org will direct you to the
correct IRC network.
GNUstep
=======
GNUstep is a complete object-oriented development system, based on the
OpenStep specification released by NeXT(tm) (now Apple(tm)) and Sun(tm). It
will provide everything one needs to produce cross-platform, object-oriented,
graphical (and non-graphical) applications; providing among other things,
base system libraries, a high-level GUI application framework that uses a
Display PostScript(tm)-like imaging model (DGS), objects for accessing
relational databases, distributed objects and a graphical development
environment, with tools like interface modeller, a project management system
(project center) and other tools.
GNUstep is a complete object-oriented development system, based on the OpenStep
specification released by NeXT(tm) (now Apple(tm)) and Sun(tm). It will provide
everything one needs to produce cross-platform, object-oriented, graphical (and
non-graphical) applications; providing among other things, base system
libraries, a high-level GUI application framework that uses a Display
PostScript(tm)-like imaging model (DGS), objects for accessing relational
databases, distributed objects and a graphical development environment, with
tools like interface modeller, a project management system (project center) and
other tools.
The GNUstep development system will be used to create a user environment,
with everything needed for a complete graphical user interface, such as a
file viewer, text editors and other applications. Note that the user
environment (or "desktop environment") is only a small part of the whole
GNUstep project and therefore it does not "compete" with other projects like
KDE or GNOME, simply because they are completely different things.
The GNUstep development system will be used to create a user environment, with
everything needed for a complete graphical user interface, such as a file
viewer, text editors and other applications. Note that the user environment (or
"desktop environment") is only a small part of the whole GNUstep project and
therefore it does not "compete" with other projects like KDE or GNOME, simply
because they are completely different things.
For more information on the GNUstep project, visit: http://www.gnustep.org
and http://gnustep.current.nu
Running multiple instances of Window Maker
==========================================
It is not a good idea to run more than one instance of Window Maker
from the same user (so that wmaker will use the same configuration
files) at the same time. You might get unexpected behaviour when Window Maker
updates it's configuration files.
from the same user (so that wmaker will use the same configuration files) at the
same time. You might get unexpected behaviour when Window Maker updates it's
configuration files.
If you really desire to do this, try running Window Maker with the
command line option --static so that it will not update or change
any of the configuration files.
Sound support
=============
Sound is supported for Linux and FreeBSD systems with the use of a
separately distributed module called WSoundServer. There is also a graphical
configuration tool for setting up your sounds called WSoundPrefs.
You can download these at:
http://shadowmere.student.utwente.nl/
Note that you must compile Window Maker with the --enable-sound configure
flag and set the DisableSound option to NO.
OpenL**k support
================
I guess many users, mainly from the academic world, have to use
applications written using the OpenL**k toolkits, so having support
for these apps must be of some use.
To enable, use --enable-openlook when doing the configure. Note that
not everything is implemented.
Implemented stuff include decoration hints and the push-pin. Not implemented
stuff include _SUN_WINDOW_STATE (the compose led state stuff), drag and drop
interest stuff, header (not sure what's it) and footer strings.
Please give me feedback if something doesn't work. If the feature is
already implemented, but is not working because of a bug, I'll try to
have that fixed. If it's a non-implemented feature and you mention that
it's important (ie: not just cosmetical), I'll consider implementing it.
The "out" state of the pushpin is emulated as a pushed-in close button.
Just click on the button to make it pushed-out, which corresponds
to the pinned-in state of the pushpin. If you push again in the pushed-out
close button, it will act as a normal close button: it will close the window.
If you really desire to do this, try running Window Maker with the command line
option --static so that it will not update or change any of the configuration
files.
Performance Tuning
==================
If you want to diminish Window Maker's memory usage and improve performance,
while keeping a nice appearance and good functionality, follow the items
bellow:
while keeping a nice appearance and good functionality, follow the items bellow:
- use solid textures for everything, mainly titlebars and menus. If you
want a nice looking desktop, use the Traditional style.
- use solid textures for everything, mainly titlebars and menus. If you want a
nice looking desktop, use the Traditional style.
- turn NewStyle and Superfluous off
- do not bind many shortcuts in the menu and keep only the essential items
in the menu
- do not bind many shortcuts in the menu and keep only the essential items in
the menu
- turn on DisableClip
- edit wconfig.h and disable the NUMLOCK_HACK and the features you
don't use anyway (keep in mind that some of the #defines might not
work, as they are not fully supported). Make sure to always keep
NumLock and ScrollLock turned off.
- edit wconfig.h and disable the NUMLOCK_HACK and the features you don't use
anyway (keep in mind that some of the #defines might not work, as they are not
fully supported). Make sure to always keep NumLock and ScrollLock turned off.
- turn on DisableAnimations. You can also #undefine ANIMATIONS in wconfig.h
- strip down the default IconPath and PixmapPath entries to contain only
the paths that you really have in your system.
- do not use large images in the root background
- remove support for image formats you don't use
- to reduce memory usage, disable the icon cache, by setting the RIMAGE_CACHE
environment variable to 0. If you want to increase performance at the cost
of memory usage, set it's value to a value like the number of different
icons you use.
environment variable to 0. If you want to increase performance at the cost of
memory usage, set it's value to a value like the number of different icons you
use. Also, disable anti-aliased text support in ~/GNUstep/Defaults/WMGLOBAL.
Keyboard Mouse Control
======================
Many people ask about adding keyboard control of mouse, like in fvwm,
but Window Maker will not have such feature. The XKB extension supports
mouse simulation from the keyboard, in a much more powerfull fashion than
any simulation done by a window manager.
Many people ask about adding keyboard control of mouse, like in fvwm, but Window
Maker will not have such feature. The XKB extension supports mouse simulation
from the keyboard, in a much more powerfull fashion than any simulation done by
a window manager.
To enable it, hit the Control+Shift+NumLock or Shift+NumLock key combination.
You should hear the speaker beeping. To disable it, do the same thing.
@@ -303,22 +259,27 @@ milleage may vary.
How to make a gdb backtrace
===========================
Backtraces can help us fix bugs that make Window Maker crash. If you
find a bug that crashes Window Maker, please send a backtrace with your
bug report.
Backtraces can help us fix bugs that make Window Maker crash. If you find a bug
that crashes Window Maker, please send a backtrace with your bug report.
To make a usefull backtrace, you need a core file with debugging
information produced by Window Maker when it crashes. It should
have been installed without stripping too. If you
get the dialog window telling you that wmaker crashed and asks you
what to do, tell it to "Abort and leave a core file".
To make a usefull backtrace, you need a core file with debugging information
produced by Window Maker when it crashes. It should have been installed without
stripping too.
To compile wmaker with debugging information:
./configure
make CFLAGS=-g
If you get the dialog window telling you that wmaker crashed and asks you what
to do, tell it to "Abort and leave a core file".
script
cd src
gdb .libs/wmaker path_to_the_core_file
Then, in the gdb prompt type "bt". Quit from gdb by typing "quit"
and then, in the shell prompt, type "exit".
Then, in the gdb prompt type "bt". Quit from gdb by typing "quit" and then, in
the shell prompt, type "exit".
The file named typescript will contain the backtrace.
@@ -327,20 +288,19 @@ The file named typescript will contain the backtrace.
Copyrights & Disclaimers
========================
Window Maker is copyrighted by Alfredo K. Kojima and is licensed through the
GNU General Public License. Read the COPYING file for the complete license.
Window Maker is copyrighted by Alfredo K. Kojima and is licensed through the GNU
General Public License. Read the COPYING file for the complete license.
The icons that are distributed with this program and were made by Marco van
Hylckama Vlieg, are licensed through the GNU General Public License. Read the
COPYING file for the complete license.
The icons listed in COPYING.WTFPL and are distributed in this
program and were made by Banlu Kemiyatorn (]d), are licensed through the
"do What The Fuck you want to Public License". Read the COPYING.WTFPL
file for the complete license.
The icons listed in COPYING.WTFPL and are distributed in this program and were
made by Banlu Kemiyatorn (]d), are licensed through the "do What The Fuck you
want to Public License". Read the COPYING.WTFPL file for the complete license.
NeXT, OpenStep and NEXTSTEP are a trademarks of NeXT Computer, Inc.
All other trademarks are property of their respective owners.
NeXT, OpenStep and NEXTSTEP are a trademarks of NeXT Computer, Inc. All other
trademarks are property of their respective owners.
The authors reserve the right to make changes in the software without prior
notice.
@@ -349,42 +309,19 @@ notice.
Authors
=======
Alfredo K. Kojima <kojima@windowmaker.org>
Dan Pascu <dan@windowmaker.org>
Matt Hawkins <matt@windowmaker.org>
]d <id@windowmaker.org>
Alfredo K. Kojima <kojima@windowmaker.info>
Dan Pascu <dan@windowmaker.info>
]d <id@windowmaker.info>
Please don't ask us questions before reading the documentation (esp. the
FAQ, this file and INSTALL files) and about "cool" things you see in
people's desktop screenshots.
Please don't ask us questions before reading the documentation (esp. the FAQ,
this file and INSTALL files) and about "cool" things you see in people's desktop
screenshots.
The AUTHORS file contains a list of the people who have contributed to the
project. The name of people who have helped with localization (translation)
can be found in po/README and Window Maker/README
project. The name of people who have helped with localization (translation) can
be found in po/README and Window Maker/README
If you have any comments, fixes and bug reports (filled BUGFORMs) send them
to developers@windowmaker.org
Musicware
=========
If you use Window Maker and *really* like it, please consider making my day
by sending me a music CD (or a MiniDisc or even a MP3 CDR) of your favorite
band, singer, instrumentist, composer or whatever :^). I like listening to
music and would love to get new CDs, especially from other parts of the
world. I like almost any kind of music, from Ozzy Osbourne to Bach (mas não
pagode e sertanejo pelamordideus :), so I will be happy to receive just about
anything.
Snail mail address:
Alfredo Kengi Kojima
Rua Firmino O. Bimbi, 255/25B
Porto Alegre - RS
CEP 91751-330
Brazil
to wmaker-dev@lists.windowmaker.org

View File

@@ -1,53 +0,0 @@
Information on Using Window Maker with GNOME
--------------------------------------------
Status of GNOME support
-----------------------
GNOME window manager protocols seem to be a work in progress.
Things still change fairly frequently, so, the stuff implemented
may not reflect the latest protocol. If something doesn't work,
that's probably because the protocols have changed again and I still
didn't have time to reimplement everything or noticed that it
changed. If that happens, please tell me exactly what doesn't work.
Other than that, the so called "GNOME Window Manager Compliance - How to
write a GNOME compliant Window Manager" document, says this:
"There are currently a set of other hints available that are, at the
current time, not essential and therefore not documented here. It is,
however envisaged that they will be finalized and added to this
document, but for now are not needed."
Since they are non-essential and undocumented they are not yet implemented.
Implemented stuff:
- GNOME window manager hints
- Motif window manager hints
On the works:
- R6 style session management
Compilation/Installation
------------------------
To compile Window Maker with GNOME support, just configure it as:
./configure --enable-gnome
before compiling.
Also, do not disable mwm hints support (they are enabled by default).
Configuration
-------------
In WPrefs, go to the last section and toggle the "Disable miniwindows" option.

View File

@@ -1,125 +0,0 @@
Information on Using Window Maker with KDE
------------------------------------------
Window Maker supports almost all KDE/KWM specific client
communication protocols, so you can simply replace kwm with
Window Maker, if you think these advantages are worthy:
Window Maker KWM
=============================================================================
Looks NEXTSTEP(tm)/NEXTSTEP(tm) Original, but reminds
enhanced Windows(tm)
Decoration solid, gradient, multi-color solid, vertical and
Textures gradient, pixmaps, textured horizontal gradient,
gradient - all gradients are pixmap
supported in horizontal,
vertical and diagonal
directions
Configurable No Yes, but not totally
Titlebar Buttons
Mini CLI Yes, but limited Yes
Window Specific Yes In KDE 1.1, yes.
Configuration In KDE 1.0, no.
Quick Keyboard Yes In KDE 1.1, yes
Navigation In KDE 1.0, no.
Pager KDE pagers will work as Yes
well as GNOME pagers
Session Not yet supported, but Yes, old (pre-X11R6) style
Management X11R6 style SM is being worked.
Dock kpanel, GNOME panel and Dock kpanel
Built-in Yes No
krootbgwm
GNOME support Yes No
Memory Usage(1) 1.85Mb In KDE 1.0, 3.13Mb
In KDE 1.1, probably more
(1) Memory usage was tested by running wmaker and kwm at the same machine
with the same windows, on the same screen and similar window texture
configurations (at different times, of course). I looked in the output of
ps -m, in the SIZE field, right after starting the window managers.
Enabling KDE Support
--------------------
To enable KDE support in Window Maker, you must compile it after
configuring it as follows:
./configure --enable-kde
Then, just replace kwm with wmaker in your startkde script.
If you are going to use Window Makers sound server, comment out
kwmsound in startkde. Also if wmaker sets your root window
background, comment out kbgndwm, kde's wallpaper setter.
Make sure to disable workspace background setting in KDE. If you
wont be using Window Maker themes anyway, you can set
WorkspaceBack = (none);
in ~/GNUstep/Defaults/WindowMaker
Enhancing Integration
---------------------
Window Maker adds some extensions to KDE's messaging stuff, so you can run
Window Maker specific commands from places like kpanel, krootwm or even
kwmcom. Recently KDE developers have kindly added support for these extensions
in the more recent KDE versions from CVS. The added stuff are the following
kwm like commands:
wm:wmaker - select Window Maker support mode
wmaker:info - show info panel
wmaker:legal - show legal panel
wmaker:arrangeIcons - arrange icons
wmaker:showAll - show all windows
wmaker:hideOthers - hide others
wmaker:restart - restart wmaker
wmaker:exit - exit wmaker
You can test them with kwmcom, like:
kwmcom wmaker:info
Problems
--------
* kpanel will not be kept always on top. That's because kpanel is an
OverrideRedirect window, so Window Maker can't do anything about that.
Before requesting for a hack to work around that in Window Maker, please
request the kpanel author to fix it.
* because the KDE protocol for letting the window manager know the usable
window region is broken, you might find some problems with the window
positioning/maximization code and kpanel's position.
* It seems kpanel (and maybe KDE in general) doesn't like dynamically
changing the number of workspaces. So, don't create or destroy workspaces
while running on KDE, unless you really need.
* If kpanel, kwmpager or kpager becomes confused about the number of
windows present, restart them.
* Wmaker opens windows by default under/over the panel, when the panel is
at top or left of screen. Use the GUI configuration tool WPrefs to change
this.
* Some commands, such as cascade windows and rearrange windows are not
yet implemented.

View File

@@ -1,67 +1,78 @@
# README.definable-cursor: How to use definable-cursor patch for Window Maker
# created 1999-Apr-24 14:53 jmk
# autodate: 1999-Apr-24 16:29
__________________________________________________
|O| Definable Mouse Cursors for Window Maker |X|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The definable-cursor patch for Window Maker
<http://www.windowmaker.org/> allows user-definable mouse cursors; the
Definable Mouse Cursors for Window Maker
----------------------------------------
The definable-cursor feature allows user-definable mouse cursors; the
cursors can either be the built-in ones from the X11 cursor font, or
they can be bitmap (XBM) files. User-definable cursors can be useful
for theme-builders, lefthanders, and the visually impaired.
This README describes how to apply the patch to Window Maker and how to
use the features it enables.
____________________________
|O| Applying the Patch |X|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Defining Your Own Cursors
-------------------------
The definable-cursor patch is available from
<http://www.pobox.com/~jmknoble/WindowMaker/patches/>.
To apply the patch, do the following (where `XX' is the version of
Window Maker you're patching):
(0) gzip -dc WindowMaker-XX.tar.gz | tar -xvf -
(1) cd ./WindowMaker-XX
(2) patch </wherever/you/put/WindowMaker-XX-definable-cursor.patch
(3) Build Window Maker according to the instructions in the
accompanying `INSTALL' file.
___________________________________
|O| Defining Your Own Cursors |X|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
A cursor specification is one of:
A cursor specification takes one of the following forms in the
~/GNUstep/Defaults/WindowMaker file:
(none)
(builtin, <cursor-name>)
(bitmap, <bitmap-filename>, <mask-filename>)
where <cursor-name> uses the same syntax as for `xsetroot -cursor_name',
and <bitmap-filename> and <mask-filename> are the same as for
`xsetroot -cursor'; <bitmap-filename> and <mask-filename> are searched
for along WM's PixmapPath. If you use `(none)', the cursor will be
inherited from the parent window (which often ends up being the root
window).
They have the following meanings:
none The cursor is inherited from the parent window (often,
this means the root window).
builtin Use the cursor named <cursor-name> from X11's set of
built-in cursors. The names are the same as you use
with 'xsetroot -cursor_name'. See the xsetroot(1) man
page for more information.
bitmap Use the bitmap in <bitmap-filename> as the foreground
cursor bitmap, and the one in <mask-filename> as the
background (mask) bitmap. This is pretty much the same
as 'xsetroot -cursor', except that Window Maker searches
for the bitmaps along its PixmapPath.
You can set the following cursor types (they're shown here with their
defaults):
NormalCursor = (builtin, left_ptr);
ArrowCursor = (builtin, top_left_arrow);
MoveCursor = (builtin, fleur);
ResizeCursor = (builtin, sizing);
TopLeftResizeCursor = (builtin, top_left_corner);
TopRightResizeCursor = (builtin, top_right_corner);
BottomLeftResizeCursor = (builtin, bottom_left_corner);
BottomRightResizeCursor = (builtin, bottom_right_corner);
VerticalResizeCursor = (builtin, sb_v_double_arrow);
HorizontalResizeCursor = (builtin, sb_h_double_arrow);
WaitCursor = (builtin, watch);
QuestionCursor = (builtin, question_arrow);
TextCursor = (builtin, xterm);
SelectCursor = (builtin, cross);
______________________
|O| Random Notes |X|
^^^^^^^^^^^^^^^^^^^^^^
The following cursor types are allowed, but they're deprecated (Window
Maker used them in the past, but doesn't use them anymore):
ResizeCursor = (builtin, sizing);
Using Cursors with 'getstyle' and 'setstyle'
--------------------------------------------
The 'getstyle' and 'setstyle' style/theme-management utilities can
handle user-definable cursors. By default, 'getstyle' ignores cursor
definitions; using 'getstyle -t' to get theme-related settings will
also include any cursors you've defined in the resulting stylefile.
However, by default, 'setstyle' does NOT ignore cursor settings. If
you wish to set a style or theme without installing cursor settings,
you can use 'setstyle --no-cursors' to ignore the cursor definitions.
Random Notes
------------
Most X11 cursors are 16x16 bitmaps. Many X servers can actually handle
larger cursors, though. To check, use:
@@ -75,12 +86,7 @@ and in the resulting output look for a line such as:
The example above indicates that my X server can handle cursors up to
64 pixels wide by 64 pixels high.
You can create your own bitmap cursors using the `bitmap' program that
accompanies most X11 distributions. For example bitmap cursors, see
<http://www.pobox.com/~jmknoble/WindowMaker/cursors/>.
You can create your own bitmap cursors using the 'bitmap' program that
accompanies most X11 distributions. For example bitmap cursors and
masks, see <http://www.pobox.com/~jmknoble/WindowMaker/cursors/>.
For an example
--jim
%%%%%%%%%%%%%%% jim knoble %%%%%%%% jmknoble@pobox.com %%%%%%%%%%%%%%%%%

379
README.pt
View File

@@ -1,379 +0,0 @@
GNU Window Maker
Gerenciador de Janelas X11
<http://windowmaker.org>
<ftp://ftp.windowmaker.org>
por
Alfredo K. Kojima
Dan Pascu
Matthew Hawkins
]d
Web/FTP Master
Phillip Smith
Parabéns! Você acabou de adquirir um dispositivo muito
bom que lhe proporcionaria milhares de anos de uso sem problemas,
exceto por que, você, com vai certeza destruí-lo com algum procedimento
idiota típico dos consumidores. Por isso nós pedimos POR FAVOR,
PELO AMOR DE DEUS LEIA O MANUAL DO DONO COM MUITA ATENÇÃO ANTES
DE DESEMBRULHAR O DISPOSITIVO. VOCÊ JÁ O DESEMPACOTOU, NÃO FOI?
VOCÊ DESEMPACOTOU-O, CONECTOU-O, LIGOU-O E ENCHEU-O DE COISAS,
E AGORA A SUA CRIANÇA, A MESMA CRIANÇA QUE UMA VEZ ENFIOU UMA
SALSICHA NO SEU VIDEOCASSETE E APERTOU NO "FAST FORWARD", ESTA
CRIANÇA ESTÁ BRINCANDO COM OS BOTÕES TAMBÉM CERTO? E SÓ AGORA VOCÊ
ESTÁ COMEÇANDO A LER AS INSTRUÇÕES CERTO??? NÓS PODEMOS ENTÃO QUEBRAR
ESTES DISPOSITIVOS NA FÁBRICA ANTES DE DESPACHÁ-LOS, VOCÊ
SABIA DISSO?
-- Dave Barry, "Read This First!"
Descrição
=========
O Window Maker é o gerenciador de janelas GNU para o X Window System. Ele foi
desenvolvido para emular o visual e a sensação de parte da GUI NEXTSTEP(tm).
Procura ser relativamente rápido e pequeno, rico em opções, fácil de
configurar e usar, com uma aparência simples e elegante emprestada do
NEXTSTEP(tm).
O Window Maker foi projetado tendo em mente a integração com o GNUStep e
é o gerenciador de janelas "oficial" dele. É ainda parte do projeto GNU
(www.gnu.org).
Leia mais sobre o GNUstep neste arquivo.
Hints (informações dadas pelas aplicações para que se integrem bem com o
gerenciador de janelas) para Motif(tm), OPEN LOOK(tm), KDE e GNOME também
são suportados. Logo, você pode substituir os gerenciadores de janela desses
ambientes pelo Window Maker e manter muito, senão toda a funcionalidade do
gerenciador de janelas nativo.
O Window Maker antes se chamava WindowMaker.
O Window Maker não tem relação com o Windowmaker, o software para construção
de janelas e portas.
Documentação
============
Leia antes de perguntar.
* Os arquivos README distribuídos por toda a árvore dos fontes contêm
informações relacionadas ao conteúdo dos diretórios.
* O INSTALL possui instruções para instalação e algumas dicas quando há
algum problema. Você deveria lê-lo antes da instalação. Ele não foi escrito
somente para ocupar espaço no pacote...
* FAQ: Frequently Asked Questions. LEIA! O FAQ.I18N é sobre questões
relacionadas à internacionalização.
* NEWS: lista as mudanças de uma versão para outra e que são visíveis ao
usuário. Leia-o se você estiver fazendo uma atualização.
* MIRRORS: alguns locais alternativos onde você pode pegar o Window Maker,
incluindo pacotes do Window Maker específicos para certas plataformas.
* BUGFORM: use-o para enviar relatos de bug. Use-o por favor.
* ChangeLog: o que foi mudado a partir da última versão?
* BUGS: lista dos bugs conhecidos
*** Guia do Usuário
O Guia do Usuário Window Maker pode ser baixado do ftp oficial ou por
sites web. Pode ser visto ainda no formato HTML no:
http://people.delphi.com/crc3419/WMUserGuide/index.htm
O Guia do Usuário explica como usar o Window Maker, fala sobre os
arquivos de configuração e as opções.
*** man pages
Digite "man wmaker" no prompt da shell para obter uma ajuda geral sobre
o Window Maker.
Diretórios & Arquivos na Árvore dos Fontes
==========================================
* O Install é um script para configurar e compilar o Window Maker de
um modo fácil (não que o modo normal seja difícil, mas...).
* AUTHORS: os créditos
* TODO: planos para o futuro
* O contrib/ possui alguns patches enviados e que não foram suportados
pelo Window Maker por entrarem em conflito com a filosofia de projeto dos
desenvolvedores ou por algum outro motivo.
* O util/ possui vários programas utilitários.
* O WPrefs.app/ é o programa de configuração.
* O src/wconfig.h possui opções de compilação que você pode mudar para
selecionar algumas opções/aspectos e outras coisas mais.
* O WINGs/ é a biblioteca de widget NEXTSTEP lookalike
* A wrlib/ é a biblioteca de processamento de imagens
* O po/ possui catálogos de mensagens, que são versões traduzidas das
mensagens mostradas pelo Window Maker
* A docklib-x.x.tar.gz é a biblioteca para desenvolvimento de dockapps
SOCORRO!!!
==========
Há uma lista de discussão para debate de questões sobre o Window Maker
no wm-user@windowmaker.org. Para inscrever-se, mande uma mensagem
contendo:
subscribe
no campo de assunto da mensagem para wm-user-request@windowmaker.org
Se você tiver algum problema, pergunte lá (somente depois de ter lido os
documentos, é claro). As pessoas da lista estão mais preparadas para
resolver o seu problema do que nós. Para relatar BUGS, use o BUGFORM.
Se você tiver problemas com uma versão pré-compilada do Window
Maker (rpm, deb etc), primeiro questione a pessoa que criou o pacote.
NOTA IMPORTANTE: quando for pedir ajuda (seja na lista de discussão ou
diretamente aos desenvolvedores) *sempre* envie informações sobre o sistema
que você está usando. Você pode usar a seção system information no final
do BUGFORM como guia. Outra coisa: não mande mensagens em HTML.
Há ainda o canal de IRC #windowmaker na EFNET. Para entrar lá, conecte
seu cliente de irc no irc.concentric.net, irc.prison.net ou outro
servidor dessa rede.
GNUstep
=======
O GNUstep é um completo sistema de desenvolvimento orientado a objetos,
baseado na especificação OpenStep lançada pela NeXT(tm) (agora Apple(tm) e
Sun(tm)). Ele irá fornecer tudo que é necessário para desenvolver aplicações
orientadas a objetos, gráficas (e não gráficas), cross-platform; fornecendo,
dentre outras coisas, bibliotecas bases do sistema, uma estrutura de alto
nível para aplicações GUI que usa um modelo de imagens do tipo Display
PostScript(tm), objetos para acesso a bancos de dados relacional, objetos
distribuídos e um ambiente de desenvolvimento gráfico, com ferramentas como
um modelador de interfaces, um projeto de gerenciamento de sistema (central
de projetos) e outras ferramentas.
O sistema de desenvolvimento GNUstep será usado para criar um ambiente
de usuário, com tudo necessário para uma interface gráfica, tais como
visualizador de arquivos, editores de texto e outras aplicações. Note que o
ambiente do usuário (ou "ambiente desktop") é somente uma pequena parte de
todo o projeto GNUstep e não "compete" com projetos como o KDE e o GNOME,
simplesmente por que eles são coisas completamente diferentes.
Para mais informação sobre o projeto GNUstep, visite http://www.gnustep.org
e http://gnustep.current.nu
Executando múltiplas instâncias do Window Maker
===============================================
Não é uma boa idéia rodar mais de uma instância do Window Maker sob
um mesmo usuário ao mesmo tempo (já que o wmaker usa os mesmos arquivos
de configuração). Você pode obter comportamentos inesperados quando o
Window Maker atualizar os seus arquivos de configuração.
Suporte para som
================
O Som é suportado nos sistemas Linux e FreeBSD com o uso de módulos
distribuídos separadamente. Você pode baixá-los no:
http://www.frontiernet.net/~southgat/wmsound
Observe que você deve compilar o Window Maker usando o configure com a
flag --enable-sound e definindo a opção DisableSound para NO.
Suporte ao OpenL**k
===================
Acredito que muitos usuários, principalmente os do mundo acadêmico,
tenham que usar aplicações escritas em toolkits OpenL**k, então o suporte
para estes aplicativos deve ser de algum uso.
Para ativar, use o --enable-openlook quando rodar o configure. Note
que nem tudo está implementado.
As opções implementadas incluem hints de decoração e o push-pin.
Coisas não implementadas incluem _SUN_WINDOW_STATE (the compose led
state stuff), coisas relacionadas ao "drag and drop", cabeçalho (não
tenho certeza do que é) e o string footer.
Por favor me dêem retorno se algo não funcionar. Se a opção já está
implementada, mas não está funcionando por causa de um bug, eu tentarei
corrigí-la. Se é uma característica ainda não implementada e você mencionar
que é importante (ie: não somente cosmética), eu considerarei a sua
implementação.
O estado "out" do pushpin é emulado como um botão de fechar pressionado.
Clique no botão para fazer com que ele fique despressionado, o que
corresponde ao estado "pinned-in" do pushpin. Se você pressionar de novo
o botão de fechar despressionado, ele vai agir como um botão de fechar
normal: vai fechar a janela.
Ajuste da Performance
====================
Se você deseja diminuir o uso de memória pelo Window Maker, aumentar a
performance, e ainda manter uma boa aparência e funcionalidade, siga os
itens abaixo:
- use texturas sólidas para tudo, barras de títulos e menus. Se você quer
um desktop com um belo visual, use o estilo "Traditional".
- desligue o "NewStyle" e o "Superfluous"
- não vincule muitos atalhos ao seu menu e guarde somente coisas essenciais
no menu
- ative o "DisableClip"
- edite o wconfig.h e desative o NUMLOCK_HACK e as opções que você não
usa mesmo (tenha em mente que alguns dos #defines podem não funcionar,
já que eles não estão completamente suportados). Certifique-se de sempre
manter o NumLock e o ScrollLock desligados.
- ligue a opção "DisableAnimations". Você pode também usar o #undefine
ANIMATIONS no arquivo config.h
- verifique as entradas padrão "IconPath" e "PixmapPath" para que contenham
somente os paths que você realmente possua no seu sistema.
- não use imagens grandes no seu background root
- remova o suporte para formatos de imagens que você não usa
- para reduzir o uso de memória, desative o cache de ícones, definindo a
variável de ambiente RIMAGE_CACHE para 0. Se você deseja melhorar o
desempenho perdendo só um pouco de memória, defina essa variável para
o valor correspondente ao número de ícones que você usa.
Controle de Mouse pelo Teclado
==============================
Muitas pessoas perguntam sobre adicionar o controle do mouse pelo teclado,
como no fvwm, mas o Window Maker não possui tal opção. A extensão XKB
suporta a simulação do mouse pelo teclado, de uma maneira muito mais
poderosa do que qualquer outra simulação realizada por um gerenciador de
janelas.
Para ativá-la, aperte a combinação Control+Shift+NumLock ou Shift+NumLock.
Você deve então ouvir um beep. Para desativá-la, faça a mesma coisa.
Para controlar com o mouse, use as seguintes teclas do keypad:
- 4 (seta esquerda), 7 (Home), 8 (seta para cima), 9 (PgUp), 6 (seta direita),
3 (PgDn), 2 (seta para baixo) e 1 (End) move o mouse para as direções
correspondentes;
- segurar as teclas acima e depois segurar a tecla 5 vai fazer o ponteiro
se mover mais rápido;
- / vai selecionar o primeiro botão do mouse (botão esquerdo);
- * vai selecionar o segundo botão do mouse (botão do meio);
- - vai selecionar o terceiro botão do mouse (botão direito);
- 5 vai fazer um clique com o botão do mouse que foi selecionado;
- + vai fazer um duplo-clique com o botão do mouse que foi selecionado;
- 0 (Ins) vai clicar e segurar o botão do mouse selecionado;
- . (Del) vai liberar o botão do mouse selecionado que foi previamente
clicado com a tecla 0 (Ins).
Os valores das teclas acima funcionam com um servidor X XFree86 3.2 (X11R6.1)
mas nosso alcance pode variar.
Como fazer um backtrace com o gdb
=================================
Os backtraces nos ajudam a arrumar bugs que fazem com que o Window Maker
trave. Se você achar um bug que trave o Window Maker, por favor envie o
backtrace com o relato do bug.
Para fazer um backtrace útil, você precisa de um arquivo core
com informações de depuração produzidas pelo Window Maker quando ele
travar. O padrão do Window Maker é iniciar um outro gerenciador
de janelas quando ele travar, o que não gerará um arquivo core. Você
precisa editar o arquivo src/wconfig.h *depois* de ter rodado o configure
e mudar a linha que se parece com o seguinte:
#undef NO_EMERGENCY_AUTORESTART
para:
#define NO_EMERGENCY_AUTORESTART
Depois, no diretório src, digite:
make clean
make CFLAGS=-g
make install
e espere o Window Maker ser instalado.
Depois de instalado o Window Maker, inicie o X e reproduza o bug fazendo
com que o Window Maker trave. Quando ele travar, vá até o diretório
onde você compilou o wmaker e digite o seguinte comando na sua shell:
script
cd src
gdb .libs/wmaker path_ao_arquivo_core
Depois, no prompt do gdb, digite "bt". Saia do gdb digitando "quit"
e depois no prompt da shell, digite "exit".
O arquivo chamado typescript conterá o backtrace.
Direitos Autorais & Disclaimers
===============================
O Window Maker é registrado por Alfredo K. Kojima e é licenciado pela Licença
Pública Geral GNU. Leia o arquivo COPYING para ler a licença completa.
Os ícones que são distribuídos com esse programa foram criados por Marco
van Hylckama Vlieg são licenciados pela OpenContent License. Leia o
arquivo COPYING.OPL para a licença completa.
NeXT, OpenStep e NEXTSTEP são marcas da NeXT Computer, Inc.
Todas as outras marcas são propriedade dos respectivos donos.
Os autores se reservam no direito de fazer alterações no software sem
qualquer aviso prévio.
Autores
=======
Alfredo K. Kojima <kojima@windowmaker.org>
Dan Pascu <dan@windowmaker.org>
]d <id@windowmaker.org>
Por favor não nos perguntem coisas antes de ler a documentação (o FAQ,
este arquivo e os arquivos INSTALL), ou sobre coisas "legais" que você
viu em screenshots de desktops.
O arquivo AUTHORS contem uma lista de pessoas que contribuíram com o projeto.
O nome das pessoas que ajudaram com a tradução pode ser achado no po/README e
Window Maker/README
Se você tem algum comentário, correção ou deseja relatar bugs (junto com
o BUGFORM) mande-os para developers@windowmaker.org
Traduzido por: Ricardo Sartori <sartori@inf.ufsc.br>

24
TODO
View File

@@ -7,14 +7,17 @@ Do ASAP:
- fix RemakeStackList() to account for transient windows
- blink border of clients with UrgencyHint set between red and black
- finish session stuff
- add multiline support for balloons
- remove colors_per_channel stuff from wmaker after?
+ finish the ability to browse for files/dirs in the WPrefs menu editor
- check whether window states are being saved/restored properly via netwm
on restart/crash-restart (grep for XXX/TODO)
Need to do:
===========
- put a "Do not save workspace state" in the exit confirmation dialog
- figure out a better gnustep path for wprefs.app installation
- impelment a generic pixmap type, which receives attributes
(scaled/maxscaled/centered/tiled, smoothed, size/position, ...)
- allow user to select/restore default root menu from wprefs
- fix windoze cycle window patch
- support for X11R6.4 extension for getting extra visual info in wrlib's
automatic best context guessing
- docklet to control AccessX (keyboard accessibility) functions
@@ -22,12 +25,17 @@ Need to do:
- add function to directly make a thumbnail of an image, using the
functionality provided by the image libraries to load a minimal
amount of data.
+ investigate memory leaks
- rewrite defaults/wdefaults stuff to use WINGs UD stuff. Search list:
~/G/D/WindowMaker /u/l/s/W/D/WindowMaker built-in-defaults
- remake internal string processing to use wchar? unicode?
- add new file for stuff like default commands and dnd commands for
docked apps, balloons for the dock etc
- check whether apps with name.class set to empty strings should be treated
like if name.class is NULL.NULL
- review the defaults handling code (not to reread after we update a
domain if possible, check WINGs apps updating WMWindowAttributes after
start making screen to flash on update)
Maybe some day:
===============
@@ -41,7 +49,7 @@ Never: (so, dont even bother to ask)
with 2 CPUs ;).
- anything that requires the mouse pointer to be jumped by WindowMaker to
somewhere. This is *terrible* behaviour. And it's not just IMO.
- rewrite to use Gtk... I wont even explain why...
- rewrite to use Gtk... I wont even bother to explain why...
- ICCCM 2.0: ICCCM 2.0 (not 1.0, which is what everybody supports so so) is
@@ -54,3 +62,9 @@ sample implementation (twm?) it might be supported. Maybe dtwm supports
it? I dont know...
After 1.0.0 is released
=======================
- rework/redesign the appicon/dock/clip concept
- maybe rewrite the main code in obj-c or c++
- major clean up in theming/texturing stuff

View File

@@ -0,0 +1,87 @@
____________
Introduction
------------
This short tutorial is meant to help you help me in the task
of having a maintainable and bug-free Window Maker.
It assumes you have 'git' correctly installed and you have set
the most basic configuration options via 'git config' (or by
editing the $HOME/.gitconfig file yourself). See the end
of this file for an example .gitconfig (which is the one
I use).
You should probably by now have already cloned my repository,
but here is how you can do it just in case:
# this is the preferred method (ie faster, native implementation)
git clone git://repo.or.cz/wmaker-crm.git
# use the http method only if are behind a firewall which blocks git://
git clone http://repo.or.cz/r/wmaker-crm.git
__________________________________
How to submit patches the git way
----------------------------------
Suppose you have a working copy of the git repo and you found
a bug in Window Maker and you know how to fix it. This is
what you can do to submit your patch in a way which will allow
me to apply it quickly.
# Optional: Create a new branch (just to be safe in case you screw up)
git checkout -b my-new-branch
Now you edit and save the files to fix the bug...
# Optional: Check what you did, review etc
git diff
# if it looks good, commit your changes
git commit -a
# git will pop up the editor which you configured in .gitconfig so
# that you will be able to write a commit log. It will use the 'vi'
# editor otherwise.
(write a _good_ and succinct commit log, explaining what you fixed etc)
# Prepare the patch to submit to the mailing-list. This step will create
# a file named 0001-subject-of-your-patch.patch from the last commit
# (use HEAD~2 if you want patches for the last 2 commits etc)
git format-patch HEAD~1
After the above steps, you are ready to send the created .patch file
to the mailing-list: wmaker-dev@lists.windowmaker.org
Just send it as-is, and I will be able to apply it with
# this is how I am going to apply your patch
git am 0001-subject-of-your-patch.patch
and it will automatically append your commit to the repo, with the
proper authorship, date, subject, commit log etc.
___________________
Example .gitconfig
-------------------
[user]
name = Erwin Schrodinger
email = schrodinger@gmail.com
[core]
editor = xjed
[status]
showUntrackedFiles = no
[color]
branch = auto
status = auto
diff = auto
ui = auto
[apply]
whitespace = fix

View File

@@ -1,6 +0,0 @@
Makefile Makefile.in
fontl testcolorpanel testmywidget testnot wmfile wtest wmquery connect
get-wings-flags get-wutil-flags
.libs
.psrc .inslog2 tca.map tca.log
*.rpt

View File

@@ -1,3 +1,307 @@
Changes since wmaker 0.92.0:
............................
- updated the XDND code in to work with GDK based applications.
WINGs based applications should now work with both KDE and GNOME
applications (Sylvain Reynal <sreynal@nerim.net>)
- better check for the XDND protocol version when interoperating with other
applications. As it seems xdnd version 3 (which WINGs supports) and newer
are not backward compatible with xdnd version 1 and 2. This is why WINGs
applications cannot interoperate with GNUstep applications (which uses
xdnd version 2). Xdnd version 4 and 5 are backwards compatible with
version 3 though. (Sylvain Reynal <sreynal@nerim.net>)
- removed dependency on rgb.txt from X11 and issues with locating it on the
filesystem for different systems/distributions.
- Removed dependency on rgb.txt (from X11) and issues with locating it on the
filesystem for different systems/distributions.
Changes since wmaker 0.80.1:
............................
- Added WMSetConnectionShutdownOnClose()
- Added an extra member to the ConnectionDelegate: canResumeSending
see NEWS for details.
- WMDrawString() and WMDrawImageString() now take WMColor instead of GC as
arguments. WMDrawImageString() receives 2 colors (text & background).
This is to allow easy extension for Xft/Xrender and hide X low level details
Read NEWS for details since this will break backward compatibility.
- Added alpha channel to WMColor. 2 new functions also:
WMCreateRGBAColor() and WMSetColorAlpha()
- Miscelaneous code cleanups in wtext.c
- Added Xft2 support in WINGs (for drawing antialiased fonts with transparency).
- New options in WMGLOBAL: AntialiasedText. Check NEWS for details.
- Fixed some improper calls to snprintf in wfont.c
- Added double buffering when drawing a WMFrame title with an antialiased font
to avoid flickering.
- Added double buffering when drawing WMList items to avoid flickering.
Double buffering for list also works for user drawn lists. Read NEWS for
details and incompatibilities introduced by this change.
- Added WMGetColorAlpha(WMColor *color)
- Better outline when drawing balloons.
- Added WMCreateFontWithAttributes()
- You can now pass "SystemFont", "BoldSystemFont", "SystemFont-##" or
"BoldSystemFont-##", with ## being the font size to any font creating
function to create a font with the (bold) system font font specification.
- Added WMCopyFontWithChanges(). This is a more generic and powerful function
meant to replaces the obsoleted WMEmphasizeFont(), WMNormalizeFont(),
WMStrenghtenFont() and the other similar functions. To get the same effect
you pass some predefined structs to it: WFANormal, WFABold, WFAEmphasized,
etc which are declared in WINGs.h).
- Fixed a bug with empty frame titles (Alexey Voinov <voins@voins.program.ru>)
- Added WMGetWidgetBackgroundColor()
- Code cleanup in wtext.c
- Fixed a memory leak in wfontpanel.c
- Fixed WMGetTextDefaultColor() not to retain the returned color. It returns
only a reference to the internal color, which you shouldn't release
- Added wstrndup()
- Added WMGetFontName()
- Added fontpanel callback
- Added WMSetTableViewHasHorizontalScroller()
- Fixed bug that could cause SIGSEGV by accessing beyond the end of text in
a WINGs textfield widget.
- Fixed small memory leak in the font panel code.
- Fixed call to qsort in WMSortArray.
- Fixed a memleak in the file panel.
- Double/triple-click selection in text widgets
(Vitaly Ovtchinnikov <ov@rbcmail.ru>)
- Fixed bug in tableview (clicked row callback got incorrect row)
(Carlos Torres <vlaadbrain@operamail.com>)
- Fixed bug in resizing a scrollview
- Fixed bug with wrong text wrapping (Alexey Voinov <voins@voins.program.ru>)
- Added wmkrect()
- Added xdnd v3 support (Sylvain Reynal <sreynal@nerim.net>)
- Fixed and enhanced text wrapping.
Changes since wmaker 0.80.0:
............................
- 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:
............................
- added an internal strcasecmp() (only on systems where is not present)
- removed some redundant includes of ../src/config.h when wconfig.h is
included too
- removed a wsyserror() message when reading a property list from file
(the programmer should decide if to give that message or just ignore).
- added a 'Bool recursive' flag to WMMergePLDictionaries()
- added WMSubtractPLDictionaries()
Changes since wmaker 0.65.0:
............................
- fixed problem with WINGs based apps exiting with a "X_RotateProperties"
related error when text was selected in a textfiled.
- moved wstrdup(), wstrconcat() and wstrappend() from memory.c to string.c
- added property list handling code making libPropList unnecessary and
obsolete. Backward compatibility is provided through the
WINGs/proplist-compat.h header file which has #defines from old libPropList
function names to new function names with minimal changes. Read this
header file and the NEWS file for more details about this subject.
- Renamed WMGetUDAllKeys() to WMGetUDKeys()
Changes since wmaker 0.64.0:
............................
- made programmatic scroller changes send notifications
- replaced WMSetBoxExpandsToParent with WMSetViewExpands...
- added WMGetLabelFont()
- added WMAddPersistentTimerHandler()
- Moved all internal handlers (timer, idle and input) to handlers.c
- simplified wevent.c and wutil.c.
- fixed handling of input with poll (was broken)
- fixed mem leak that occured when input handling was done with poll
- simpler and more straightforward event handling for timer, idle, input
and X events (also fixed some problems the old handling logic had)
- moved timer, idle and input handler definitions and prototypes from
WINGs.h to WUtil.h because they're not GUI related.
- better and more robust handling of events (timer, idle, input, X) in
WMMaskEvent(). Also fixed a bug where input and timer events were not
treated for undefined periods of time under some circumstances.
- fixed secure textfields not to allow text selection, to avoid compromising
sensitive information by pasting it to a terminal.
- replaced wmkrange(), wmkpoint() and wmksize() functions with macros.
- added WMRemoveFromArrayMatching(array, match, cdata), which will remove the
first element in the array that is matched by match(item, cdata)==True.
- added WMArrayFirst(), WMArrayLast(), WMArrayNext() and WMArrayPrevious()
functions and also WM_ITERATE_ARRAY() and WM_ETARETI_ARRAY() macros, to make
interfaces to WMBag and WMArray similar and to make life a little simpler
when iterating through all elements of an array.
- replaced bags with arrays wherever appropriate. This will improve
performance a bit.
- replaced some recursive code with iterative code in selection.c
- added WMCreateBlendedPixmapFromRImage()
- small API change:
1. Renamed WMSetApplicationIconImage(), WMGetApplicationIconImage() and
WMSetWindowMiniwindowImage() to respectively WMSetApplicationIconPixmap(),
WMGetApplicationIconPixmap() and WMSetWindowMiniwindowPixmap()
They operate on a WMPixmap which is practically an X Pixmap with no alpha
channel information and the new name is more suggestive and also leaves
room for the new functions added for operating on images with alpha info.
2. Added WMSetApplicationIconImage() and WMGetApplicationIconImage() which
operate on an RImage and store alpha information too.
3. Added WMCreateApplicationIconBlendedPixmap() which will take the image
set by WMSetApplicationIconImage() and will combine it with a color.
If color is NULL it will blend using the default panel color (#aeaaae)
All these changes will allow WINGs to handle images with alpha blending
correctly in panels and wherever else needed. More about in NEWS.
- updated panels to use the newly available RImages if present and fallback
to old WMPixmaps if not, to properly show alpha blended images.
- replaced some still left malloc's with wmalloc's.
- fixed a bug in WMReparentWidget()
- added WMReparentWidget() to WINGs.h
- fixed a bug that made the scroller knob jump backwards when dragged (this
bug had no relation with the behavior that #define STRICT_NEXT_BEHAVIOUR
attempts to accomplish).
- fixed scrolling direction with mouse wheel for horizontal scroller.
changes since wmaker 0.63.1:
............................
- added WMRunModalLoop() and WMBreakModalLoop()
- added WMSetBoxExpandsToParent()
- added WMRemoveBoxSubview()
- moved WINGs headers in a WINGs subdirectory when installed.
use #include <WINGs/header_file_name> in your application from now on.
Also updated get-{wings|wutil}-flags.
- Fixed a mem leak in WMList.
- Fixed a bug that caused sigsegv for a WMList with more than 32767 items.
- Added an example of how to create a server type program with WMConnection.
- added WMOpenScreen()
changes since wmaker 0.62.1:
............................
- added WRuler widget
- added WText widget (rtf multiline text widget)
Nwanua Elumeze <nwanua@colorado.edu>
- added a new AUTO option for the UseMultiByte option
- added WMRaiseWidget()/WMLowerWidget()
- added missing EscapeTextMovement to textfield delegate/notification
- added WMGetLabelText()
- added WMReparentWidget()
- added WMCreateTabViewItem()
- added W_CreateUnmanagedTopView()
- added wtokenjoin(), wtokensplit(), wtokenfree(), wtrimspace()
- added WMWidgetIsMapped()
- added WMSetApplicationIconWindow()
- restructured the directory tree. Added Documentation, Examples and Tests
subdirectories
- removed WMArrayBag and reorganized WMTreeBag to be WMBag.
- added WMArray class.
- added WMSetWindowUserPosition()
- added WMGetListSelectedItems()
- added WMSetListAllowMultipleSelection(), WMListAllowsMultipleSelection().
- added WMSetListAllowEmptySelection(), WMListAllowsEmptySelection().
- WMListSelectionDidChangeNotification passes NULL as the notification
client data (previously passed the selected item row).
- added WMUnselectListItem(), WMSelectAllListItems(), WMUnselectAllListItems()
- better behavior of wheel mices in WMList. Simple mouse wheel events
will scroll by 1/3 of the WMList height. Using Shift as a modifier will
scroll line by line, while using Control as a modifier will scroll page
by page.
- better behavior of WMScroller regarding mouse wheel events. 'Shift' modifier
will scroll line by line, while 'Control' modifier will scroll page by page.
- fixed some buffer overflow allowing bugs.
- added WSDecrementWheel and WSIncrementWheel for handling mouse wheel in
scrollers and scrolled widgets. This should be treated like the WSxxxPage
counterparts, except it should scroll by page_size/3 instead of one full page
- added WMSetBrowserAllowMultipleSelection(), WMSetBrowserAllowEmptySelection()
WMBrowserAllowsMultipleSelection() and WMBrowserAllowsEmptySelection()
- WMBrowser now allows multiple selections.
- Added WMGetBrowserPaths() to retrieve the paths for browsers that allow
multiple selections.
- WMDestroyWidget() now calls WMUnmapWidget() first
- added WMScrollerDidScrollNotification to scroller
- added WMGetScrollViewVisibleRect()
- fixed a mem leak in the browser code.
- renamed wstrappend() to wstrconcat(). wstrconcat(str1, str2) concatenates
str1 with str2 and returns that in a newly malloc'ed string.
Be sure to rename wstrappend with wstrconcat in your code too, else
hazardous things can happen!
- implemented a new wstrappend() function. wstrappend(dst, src) will append
src to dst modifing dst and returning a pointer to it. No new string is
generated, except if dst is NULL, in which case its the same as calling
wstrdup(src).
dst can ONLY be NULL or a dynamically allocated string (obtained from a
call to malloc, realloc, wmalloc, wrealloc, ...). dst CANNOT be a static
or a constant string!
- added wmessage() for printing a variable formatted string to stderr, with
the program name prepended to it. Similar to wwarning(), except that it
doesn't add "warning:" in the output message.
- added WMBox widget
- added WMAddTabViewItemWithView()
- added W_SetViewCursor()
- made Extra widgets library
- added table widget in Extras library
- added WMGetConnectionUnsentData() (WMGetConnectionQueuedData() too as an
alias).
- added WMSetConnectionCloseOnExec() to specify if the socket associated
with a connection survives an exec* call or not. When a new connection is
created using the WMCreate... or WMAcceptConnection() calls, it has the
close on exec flag set automatically to 'True' by the library. Unless
you want to let the socket of some connection to survive across an exec*
call, you need not to call this function.
- removed all the wsyserror() and wwarning() calls from host.c and
connection.c and replaced where appropriate with assertions. If a function
returns some invalid result, you can still get the system error message if
you need, by calling wsyserrorwithcode() and passing WCErrorCode, if
WCErrorCode > 0. If WCErrorCode==0, that is not a system error, and
wsyserrorwithcode() should not be called in this case.
- added WMNextHashEnumeratorKey() to retrieve all keys in some hash enumerator
one by one.
- fixed a bug with mouse wheels scrolling in scrollers even with the widget
fully visible.
- Fixed a memory leak (the destroy function for a view was never called and
as a result the shaded windows didn't go away when closed. The non-shaded
windows were unmapped on close but not destroyed either so they only
apparently went away, but continued to use memory).
- Fixed a bug in the hashtable code which free'd the whole item instead of
just the item key in WMResetHashTable() (possible source of SIGSEGVs)
changes since wmaker 0.62.0:
............................
- added WMSetWidgetDefaultFont(), WMSetWidgetDefaultBoldFont()
changes since wmaker 0.62.0:
............................
- added WM{S,G}etDataFormat()
- added drag and drop
- changed selection code
- added clientdata to WMFindInBag
- removed SetWindowInitialSize()
- added SetWindowAspectRatio()
- added initial timeout when establishing a connection.
- added WMSetConnectionDefaultTimeout() and WMSetConnectionOpenTimeout();
- added WMGetConnectionTimeoutState()
changes since wmaker 0.61.1:
............................

View File

@@ -0,0 +1,6 @@
## automake input file for WINGs - Documentation
AUTOMAKE_OPTIONS =
EXTRA_DIST =

View File

@@ -0,0 +1,40 @@
## automake input file for WINGs - Examples
AUTOMAKE_OPTIONS =
noinst_PROGRAMS = connect server fontl puzzle colorpick
LDADD= $(top_builddir)/WINGs/libWINGs.la $(top_builddir)/wrlib/libwraster.la \
$(top_builddir)/WINGs/libWUtil.la \
@XFTLIBS@ @INTLIBS@
colorpick_DEPENDENCIES = $(top_builddir)/WINGs/libWINGs.la
fontl_DEPENDENCIES = $(top_builddir)/WINGs/libWINGs.la
puzzle_DEPENDENCIES = $(top_builddir)/WINGs/libWINGs.la
connect_DEPENDENCIES = $(top_builddir)/WINGs/libWUtil.la
connect_LDADD = $(top_builddir)/WINGs/libWUtil.la @LIBRARY_SEARCH_PATH@ @INTLIBS@
server_DEPENDENCIES = $(top_builddir)/WINGs/libWUtil.la
server_LDADD = $(top_builddir)/WINGs/libWUtil.la @LIBRARY_SEARCH_PATH@ @INTLIBS@
INCLUDES = -I$(top_srcdir)/WINGs -I$(top_srcdir)/wrlib -I$(top_srcdir)/src \
-DRESOURCE_PATH=\"$(datadir)/WINGs\" @HEADER_SEARCH_PATH@ -DDEBUG
LIBTOOL = $(QUIET) $(SHELL) $(top_builddir)/libtool $(LIBTOOL_ARG)
.c.o:
$(QUIET)$(COMPILE) -c $<
.c.obj:
$(QUIET)$(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
$(QUIET)$(LTCOMPILE) -c -o $@ $<

19
WINGs/Examples/README Normal file
View File

@@ -0,0 +1,19 @@
Files:
-----
server - server example of using WMConnection. It keeps a database of
timeouts for a group of users, allowing one to add/remove
users and update the timeouts associated with them.
connect - client example of using WMConnection. Works with the server
program above. Just start both without any parameter and
type help in the client to find out how to operate them.
Rest is self explanatory.
puzzle - a nice zuPzel =)
fontl - a map of all characters with their corresponding ascii,
hex, decimal and octal representations.

View File

@@ -0,0 +1,39 @@
#include <stdlib.h>
#include <stdio.h>
#include <WINGs/WINGs.h>
void showSelectedColor(void *self, void *cdata)
{
WMColorPanel *panel = (WMColorPanel *) self;
printf("Selected Color: %s\n", WMGetColorRGBDescription(WMGetColorPanelColor(panel)));
}
int main(int argc, char **argv)
{
Display *dpy;
WMScreen *scr;
WMInitializeApplication("wmcolorpick", &argc, argv);
dpy = XOpenDisplay("");
if (!dpy) {
printf("could not open display\n");
exit(1);
}
scr = WMCreateScreen(dpy, DefaultScreen(dpy));
{
WMColorPanel *panel = WMGetColorPanel(scr);
WMSetColorPanelAction(panel, showSelectedColor, NULL);
WMShowColorPanel(panel);
}
WMScreenMainLoop(scr);
return 0;
}

97
WINGs/Examples/fontl.c Normal file
View File

@@ -0,0 +1,97 @@
/*
* WINGs demo: font lister
*
* Copyright (c) 1998-2003 Alfredo K. Kojima
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <WINGs/WINGs.h>
#include <WINGs/WUtil.h>
void wAbort()
{
exit(0);
}
void show(WMWidget * self, void *data)
{
char buf[60];
void *d;
WMLabel *l = (WMLabel *) data;
d = WMGetHangedData(self);
sprintf(buf, "%i - 0x%x - 0%o", (int)d, (int)d, (int)d);
WMSetLabelText(l, buf);
}
void quit(WMWidget * self, void *data)
{
exit(0);
}
int main(int argc, char **argv)
{
Display *dpy;
WMWindow *win;
WMScreen *scr;
WMButton *lab, *l0 = NULL;
WMLabel *pos;
int x, y, c;
char buf[20];
WMInitializeApplication("FontView", &argc, argv);
dpy = XOpenDisplay("");
if (!dpy) {
wfatal("cant open display");
exit(0);
}
scr = WMCreateSimpleApplicationScreen(dpy);
win = WMCreateWindow(scr, "main");
WMResizeWidget(win, 20 * 33, 20 + 20 * 9);
WMSetWindowTitle(win, "Font Chars");
WMSetWindowCloseAction(win, quit, NULL);
pos = WMCreateLabel(win);
WMResizeWidget(pos, 20 * 33, 20);
WMMoveWidget(pos, 10, 5);
c = 0;
for (y = 0; y < 8; y++) {
for (x = 0; x < 32; x++, c++) {
lab = WMCreateCustomButton(win, WBBStateLightMask);
WMResizeWidget(lab, 20, 20);
WMMoveWidget(lab, 10 + x * 20, 30 + y * 20);
sprintf(buf, "%c", c);
WMSetButtonText(lab, buf);
WMSetButtonAction(lab, show, pos);
WMHangData(lab, (void *)(uintptr_t) c);
if (c > 0) {
WMGroupButtons(l0, lab);
} else {
l0 = lab;
}
}
}
WMRealizeWidget(win);
WMMapSubwidgets(win);
WMMapWidget(win);
WMScreenMainLoop(scr);
return 0;
}

233
WINGs/Examples/puzzle.c Normal file
View File

@@ -0,0 +1,233 @@
#include <stdlib.h>
#include <stdio.h>
#include <WINGs/WINGs.h>
#include <stdint.h>
#define MAX_SIZE 10*10
WMWindow *win;
WMButton *Button[MAX_SIZE];
signed char Map[MAX_SIZE];
int Size = 4;
int MoveCount;
#define MAP(x,y) Map[(x)+(y)*Size]
int WinSize = 120;
Bool CheckWin(void)
{
int i;
for (i = 0; i < Size * Size - 1; i++) {
if (Map[i] != i)
return False;
}
return True;
}
void MoveButton(int button, int x, int y)
{
WMMoveWidget(Button[button], x * (WinSize / Size), y * (WinSize / Size));
}
Bool SlideButton(int button)
{
int x = 0, y = 0, done = 0;
/* locate the button */
for (y = 0; y < Size; y++) {
for (x = 0; x < Size; x++) {
if (MAP(x, y) == button) {
done = 1;
break;
}
}
if (done)
break;
}
if (x > 0 && MAP(x - 1, y) < 0) {
MAP(x, y) = -1;
MoveButton(button, x - 1, y);
MAP(x - 1, y) = button;
} else if (x < Size - 1 && MAP(x + 1, y) < 0) {
MAP(x, y) = -1;
MoveButton(button, x + 1, y);
MAP(x + 1, y) = button;
} else if (y > 0 && MAP(x, y - 1) < 0) {
MAP(x, y) = -1;
MoveButton(button, x, y - 1);
MAP(x, y - 1) = button;
} else if (y < Size - 1 && MAP(x, y + 1) < 0) {
MAP(x, y) = -1;
MoveButton(button, x, y + 1);
MAP(x, y + 1) = button;
} else {
return False;
}
return True;
}
#define SWAP(a,b) {int tmp; tmp=a; a=b; b=tmp;}
void ResetGame(void)
{
int i, x, y, ox, oy;
MoveCount = 0;
for (i = 0; i < Size * Size - 1; i++) {
Map[i] = i;
}
Map[i] = -1;
ox = x = Size - 1;
oy = y = Size - 1;
for (i = 0; i < 1000; i++) {
int ok;
ok = 1;
switch (rand() % 4) {
case 0:
if (x > 0)
x--;
else
ok = 0;
break;
case 2:
if (x < Size - 1)
x++;
else
ok = 0;
break;
case 1:
if (y > 0)
y--;
else
ok = 0;
break;
case 3:
if (y < Size - 1)
y++;
else
ok = 0;
break;
}
if (ok) {
MoveButton(MAP(x, y), ox, oy);
SWAP(MAP(ox, oy), MAP(x, y));
while (XPending(WMScreenDisplay(WMWidgetScreen(win)))) {
XEvent ev;
WMNextEvent(WMScreenDisplay(WMWidgetScreen(win)), &ev);
WMHandleEvent(&ev);
}
ox = x;
oy = y;
}
}
}
void buttonClick(WMWidget * w, void *ptr)
{
char buffer[300];
if (SlideButton((uintptr_t)ptr)) {
MoveCount++;
if (CheckWin()) {
sprintf(buffer, "You finished the game in %i moves.", MoveCount);
if (WMRunAlertPanel(WMWidgetScreen(w), win, "You Won!", buffer,
"Wee!", "Gah! Lemme retry!", NULL) == WAPRDefault) {
exit(0);
}
ResetGame();
}
}
}
static void resizeObserver(void *self, WMNotification * notif)
{
WMSize size = WMGetViewSize(WMWidgetView(win));
int x, y;
WinSize = size.width;
for (y = 0; y < Size; y++) {
for (x = 0; x < Size; x++) {
if (MAP(x, y) >= 0) {
WMResizeWidget(Button[(int)MAP(x, y)], WinSize / Size, WinSize / Size);
WMMoveWidget(Button[(int)MAP(x, y)], x * (WinSize / Size), y * (WinSize / Size));
}
}
}
}
int main(int argc, char **argv)
{
Display *dpy;
WMScreen *scr;
int x, y, i;
WMInitializeApplication("Puzzle", &argc, argv);
dpy = XOpenDisplay("");
if (!dpy) {
printf("could not open display\n");
exit(1);
}
scr = WMCreateScreen(dpy, DefaultScreen(dpy));
win = WMCreateWindow(scr, "puzzle");
WMResizeWidget(win, WinSize, WinSize);
WMSetWindowTitle(win, "zuPzel");
WMSetWindowMinSize(win, 80, 80);
WMSetWindowAspectRatio(win, 2, 2, 2, 2);
WMSetWindowResizeIncrements(win, Size, Size);
WMSetViewNotifySizeChanges(WMWidgetView(win), True);
WMAddNotificationObserver(resizeObserver, NULL, WMViewSizeDidChangeNotification, WMWidgetView(win));
for (i = y = 0; y < Size && i < Size * Size - 1; y++) {
for (x = 0; x < Size && i < Size * Size - 1; x++) {
char buf[32];
WMColor *color;
RColor col;
RHSVColor hsv;
hsv.hue = i * 360 / (Size * Size - 1);
hsv.saturation = 120;
hsv.value = 200;
RHSVtoRGB(&hsv, &col);
color = WMCreateRGBColor(scr, col.red << 8, col.green << 8, col.blue << 8, False);
MAP(x, y) = i;
Button[i] = WMCreateButton(win, WBTMomentaryLight);
WMSetWidgetBackgroundColor(Button[i], color);
WMReleaseColor(color);
WMSetButtonAction(Button[i], buttonClick, (void *)(uintptr_t) i);
WMResizeWidget(Button[i], WinSize / Size, WinSize / Size);
WMMoveWidget(Button[i], x * (WinSize / Size), y * (WinSize / Size));
sprintf(buf, "%i", i + 1);
WMSetButtonText(Button[i], buf);
WMSetButtonTextAlignment(Button[i], WACenter);
i++;
}
}
WMMapSubwidgets(win);
WMMapWidget(win);
WMRealizeWidget(win);
ResetGame();
WMScreenMainLoop(scr);
return 0;
}

30
WINGs/Extras/Makefile.am Normal file
View File

@@ -0,0 +1,30 @@
## automake input file for WINGs
AUTOMAKE_OPTIONS =
# is this a kluge? if so, how should i do it?
includedir = @includedir@/WINGs
include_HEADERS = wtableview.h wtabledelegates.h
lib_LTLIBRARIES = libExtraWINGs.la
noinst_PROGRAMS = test
EXTRA_DIST =
libExtraWINGs_la_SOURCES = \
wtableview.c \
wtabledelegates.c \
wtableview.h \
wtabledelegates.h
INCLUDES = -I$(top_srcdir)/wrlib -I$(top_srcdir)/WINGs \
-DRESOURCE_PATH=\"$(datadir)/WINGs\" @HEADER_SEARCH_PATH@ -DDEBUG
LDADD= $(top_builddir)/WINGs/libWINGs.la $(top_builddir)/wrlib/libwraster.la \
$(top_builddir)/WINGs/libWUtil.la \
@XFTLIBS@ @INTLIBS@
test_LDADD = wtableview.o wtabledelegates.o $(LDADD)

124
WINGs/Extras/test.c Normal file
View File

@@ -0,0 +1,124 @@
#include <WINGs/WINGs.h>
#include <stdio.h>
#include <stdint.h>
#include "wtableview.h"
#include "wtabledelegates.h"
static char *col1[20] = { 0 };
static int col2[20];
static char *options[] = {
"Option1",
"Option2",
"Option3",
"Option4",
"Option5"
};
int numberOfRows(WMTableViewDelegate * self, WMTableView * table)
{
return 20;
}
void *valueForCell(WMTableViewDelegate * self, WMTableColumn * column, int row)
{
/*WMTableView *table = (WMTableView*)WMGetTableColumnTableView(column); */
int i;
if (col1[0] == 0) {
for (i = 0; i < 20; i++) {
char buf[128];
sprintf(buf, "Test row %i", i);
col1[i] = wstrdup(buf);
col2[i] = 0;
}
}
if ((uintptr_t)WMGetTableColumnId(column) == 1)
return col1[row];
else
return (void *)(uintptr_t) col2[row];
}
void setValueForCell(WMTableViewDelegate * self, WMTableColumn * column, int row, void *data)
{
if ((uintptr_t)WMGetTableColumnId(column) == 1)
col1[row] = data;
else
col2[row] = (uintptr_t) data;
}
static WMTableViewDelegate delegate = {
NULL,
numberOfRows,
valueForCell,
setValueForCell
};
void clickedTable(WMWidget * w, void *self)
{
int row = WMGetTableViewClickedRow((WMTableView *) self);
WMEditTableViewRow(self, row);
}
int main(int argc, char **argv)
{
WMScreen *scr;
WMWindow *win;
WMTableView *table;
WMTableColumn *col;
WMTableColumnDelegate *colDeleg;
WMInitializeApplication("test", &argc, argv);
scr = WMOpenScreen(NULL);
XSynchronize(WMScreenDisplay(scr), 1);
win = WMCreateWindow(scr, "eweq");
WMResizeWidget(win, 400, 200);
WMMapWidget(win);
table = WMCreateTableView(win);
WMSetTableViewHasHorizontalScroller(table, 0);
WMSetViewExpandsToParent(WMWidgetView(table), 10, 10, 10, 10);
WMSetTableViewBackgroundColor(table, WMWhiteColor(scr));
/*WMSetTableViewGridColor(table, WMGrayColor(scr)); */
WMSetTableViewHeaderHeight(table, 20);
WMSetTableViewDelegate(table, &delegate);
WMSetTableViewAction(table, clickedTable, table);
colDeleg = WTCreateStringEditorDelegate(table);
col = WMCreateTableColumn("Group");
WMSetTableColumnWidth(col, 180);
WMAddTableViewColumn(table, col);
WMSetTableColumnDelegate(col, colDeleg);
WMSetTableColumnId(col, (void *)1);
colDeleg = WTCreateEnumSelectorDelegate(table);
WTSetEnumSelectorOptions(colDeleg, options, 5);
col = WMCreateTableColumn("Package");
WMSetTableColumnWidth(col, 140);
WMAddTableViewColumn(table, col);
WMSetTableColumnDelegate(col, colDeleg);
WMSetTableColumnId(col, (void *)2);
colDeleg = WTCreateBooleanSwitchDelegate(table);
col = WMCreateTableColumn("Bool");
WMSetTableColumnWidth(col, 50);
WMAddTableViewColumn(table, col);
WMSetTableColumnDelegate(col, colDeleg);
WMSetTableColumnId(col, (void *)2);
WMMapWidget(table);
WMRealizeWidget(win);
WMScreenMainLoop(scr);
return 0;
}

View File

@@ -0,0 +1,522 @@
#include <stdint.h>
#include <WINGs/WINGsP.h>
#include "wtableview.h"
#include "wtabledelegates.h"
typedef struct {
WMTableView *table;
WMFont *font;
GC gc;
GC selGC;
WMColor *textColor;
} StringData;
typedef struct {
WMTableView *table;
GC selGc;
} PixmapData;
typedef struct {
WMTextField *widget;
WMTableView *table;
WMFont *font;
GC gc;
GC selGC;
WMColor *textColor;
} StringEditorData;
typedef struct {
WMPopUpButton *widget;
WMTableView *table;
WMFont *font;
char **options;
int count;
GC gc;
GC selGC;
WMColor *textColor;
} EnumSelectorData;
typedef struct {
WMButton *widget;
WMTableView *table;
Bool state;
GC gc;
GC selGC;
} BooleanSwitchData;
static char *SelectionColor = "#bbbbcc";
static void
stringDraw(WMScreen * scr, Drawable d, GC gc, GC sgc, WMColor * textColor,
WMFont * font, void *data, WMRect rect, Bool selected)
{
int x, y;
XRectangle rects[1];
Display *dpy = WMScreenDisplay(scr);
x = rect.pos.x + 5;
y = rect.pos.y + (rect.size.height - WMFontHeight(font)) / 2;
rects[0].x = rect.pos.x + 1;
rects[0].y = rect.pos.y + 1;
rects[0].width = rect.size.width - 1;
rects[0].height = rect.size.height - 1;
XSetClipRectangles(dpy, gc, 0, 0, rects, 1, YXSorted);
if (!selected) {
XFillRectangles(dpy, d, gc, rects, 1);
WMDrawString(scr, d, textColor, font, x, y, data, strlen(data));
} else {
XFillRectangles(dpy, d, sgc, rects, 1);
WMDrawString(scr, d, textColor, font, x, y, data, strlen(data));
}
XSetClipMask(dpy, gc, None);
}
static void pixmapDraw(WMScreen * scr, Drawable d, GC gc, GC sgc, WMPixmap * pixmap, WMRect rect, Bool selected)
{
int x, y;
XRectangle rects[1];
Display *dpy = WMScreenDisplay(scr);
WMSize size;
rects[0].x = rect.pos.x + 1;
rects[0].y = rect.pos.y + 1;
rects[0].width = rect.size.width - 1;
rects[0].height = rect.size.height - 1;
XSetClipRectangles(dpy, gc, 0, 0, rects, 1, YXSorted);
if (!selected) {
XFillRectangles(dpy, d, gc, rects, 1);
if (pixmap) {
size = WMGetPixmapSize(pixmap);
x = rect.pos.x + (rect.size.width - size.width) / 2;
y = rect.pos.y + (rect.size.height - size.height) / 2;
WMDrawPixmap(pixmap, d, x, y);
}
} else {
XFillRectangles(dpy, d, sgc, rects, 1);
if (pixmap) {
size = WMGetPixmapSize(pixmap);
x = rect.pos.x + (rect.size.width - size.width) / 2;
y = rect.pos.y + (rect.size.height - size.height) / 2;
WMDrawPixmap(pixmap, d, x, y);
}
}
XSetClipMask(dpy, gc, None);
}
/* ---------------------------------------------------------------------- */
static void SECellPainter(WMTableColumnDelegate * self, WMTableColumn * column, int row, Drawable d)
{
StringEditorData *strdata = (StringEditorData *) self->data;
WMTableView *table = WMGetTableColumnTableView(column);
stringDraw(WMWidgetScreen(table), d,
strdata->gc, strdata->selGC, strdata->textColor, strdata->font,
WMTableViewDataForCell(table, column, row), WMTableViewRectForCell(table, column, row), False);
}
static void selectedSECellPainter(WMTableColumnDelegate * self, WMTableColumn * column, int row, Drawable d)
{
StringEditorData *strdata = (StringEditorData *) self->data;
WMTableView *table = WMGetTableColumnTableView(column);
stringDraw(WMWidgetScreen(table), d,
strdata->gc, strdata->selGC, strdata->textColor, strdata->font,
WMTableViewDataForCell(table, column, row), WMTableViewRectForCell(table, column, row), True);
}
static void beginSECellEdit(WMTableColumnDelegate * self, WMTableColumn * column, int row)
{
StringEditorData *strdata = (StringEditorData *) self->data;
WMRect rect = WMTableViewRectForCell(strdata->table, column, row);
void *data = WMTableViewDataForCell(strdata->table, column, row);
WMSetTextFieldText(strdata->widget, (char *)data);
WMMoveWidget(strdata->widget, rect.pos.x, rect.pos.y);
WMResizeWidget(strdata->widget, rect.size.width + 1, rect.size.height + 1);
WMMapWidget(strdata->widget);
}
static void endSECellEdit(WMTableColumnDelegate * self, WMTableColumn * column, int row)
{
StringEditorData *strdata = (StringEditorData *) self->data;
char *text;
WMUnmapWidget(strdata->widget);
text = WMGetTextFieldText(strdata->widget);
WMSetTableViewDataForCell(strdata->table, column, row, (void *)text);
}
WMTableColumnDelegate *WTCreateStringEditorDelegate(WMTableView * parent)
{
WMTableColumnDelegate *delegate = wmalloc(sizeof(WMTableColumnDelegate));
WMScreen *scr = WMWidgetScreen(parent);
StringEditorData *data = wmalloc(sizeof(StringEditorData));
data->widget = WMCreateTextField(parent);
W_ReparentView(WMWidgetView(data->widget), WMGetTableViewDocumentView(parent), 0, 0);
data->table = parent;
data->font = WMSystemFontOfSize(scr, 12);
data->gc = WMColorGC(WMWhiteColor(scr));
data->selGC = WMColorGC(WMCreateNamedColor(scr, SelectionColor, False));
data->textColor = WMBlackColor(scr);
delegate->data = data;
delegate->drawCell = SECellPainter;
delegate->drawSelectedCell = selectedSECellPainter;
delegate->beginCellEdit = beginSECellEdit;
delegate->endCellEdit = endSECellEdit;
return delegate;
}
/* ---------------------------------------------------------------------- */
static void ESCellPainter(WMTableColumnDelegate * self, WMTableColumn * column, int row, Drawable d)
{
EnumSelectorData *strdata = (EnumSelectorData *) self->data;
WMTableView *table = WMGetTableColumnTableView(column);
uintptr_t i = (uintptr_t)WMTableViewDataForCell(table, column, row);
stringDraw(WMWidgetScreen(table), d,
strdata->gc, strdata->selGC, strdata->textColor, strdata->font,
strdata->options[i], WMTableViewRectForCell(table, column, row), False);
}
static void selectedESCellPainter(WMTableColumnDelegate * self, WMTableColumn * column, int row, Drawable d)
{
EnumSelectorData *strdata = (EnumSelectorData *) self->data;
WMTableView *table = WMGetTableColumnTableView(column);
uintptr_t i = (uintptr_t)WMTableViewDataForCell(table, column, row);
stringDraw(WMWidgetScreen(table), d,
strdata->gc, strdata->selGC, strdata->textColor, strdata->font,
strdata->options[i], WMTableViewRectForCell(table, column, row), True);
}
static void beginESCellEdit(WMTableColumnDelegate * self, WMTableColumn * column, int row)
{
EnumSelectorData *strdata = (EnumSelectorData *) self->data;
WMRect rect = WMTableViewRectForCell(strdata->table, column, row);
uintptr_t data = (uintptr_t)WMTableViewDataForCell(strdata->table, column, row);
wassertr(data < strdata->count);
WMSetPopUpButtonSelectedItem(strdata->widget, data);
WMMoveWidget(strdata->widget, rect.pos.x, rect.pos.y);
WMResizeWidget(strdata->widget, rect.size.width, rect.size.height + 1);
WMMapWidget(strdata->widget);
}
static void endESCellEdit(WMTableColumnDelegate * self, WMTableColumn * column, int row)
{
EnumSelectorData *strdata = (EnumSelectorData *) self->data;
int option;
WMUnmapWidget(strdata->widget);
option = WMGetPopUpButtonSelectedItem(strdata->widget);
WMSetTableViewDataForCell(strdata->table, column, row, (void *)(uintptr_t) option);
}
WMTableColumnDelegate *WTCreateEnumSelectorDelegate(WMTableView * parent)
{
WMTableColumnDelegate *delegate = wmalloc(sizeof(WMTableColumnDelegate));
WMScreen *scr = WMWidgetScreen(parent);
EnumSelectorData *data = wmalloc(sizeof(EnumSelectorData));
data->widget = WMCreatePopUpButton(parent);
W_ReparentView(WMWidgetView(data->widget), WMGetTableViewDocumentView(parent), 0, 0);
data->table = parent;
data->font = WMSystemFontOfSize(scr, 12);
data->gc = WMColorGC(WMWhiteColor(scr));
data->selGC = WMColorGC(WMCreateNamedColor(scr, SelectionColor, False));
data->textColor = WMBlackColor(scr);
data->count = 0;
data->options = NULL;
delegate->data = data;
delegate->drawCell = ESCellPainter;
delegate->drawSelectedCell = selectedESCellPainter;
delegate->beginCellEdit = beginESCellEdit;
delegate->endCellEdit = endESCellEdit;
return delegate;
}
void WTSetEnumSelectorOptions(WMTableColumnDelegate * delegate, char **options, int count)
{
EnumSelectorData *data = (EnumSelectorData *) delegate->data;
int i;
for (i = 0; i < WMGetPopUpButtonNumberOfItems(data->widget); i++) {
WMRemovePopUpButtonItem(data->widget, 0);
}
data->options = options;
data->count = count;
for (i = 0; i < count; i++) {
WMAddPopUpButtonItem(data->widget, options[i]);
}
}
/* ---------------------------------------------------------------------- */
static void BSCellPainter(WMTableColumnDelegate * self, WMTableColumn * column, int row, Drawable d)
{
BooleanSwitchData *strdata = (BooleanSwitchData *) self->data;
WMTableView *table = WMGetTableColumnTableView(column);
uintptr_t i = (uintptr_t)WMTableViewDataForCell(table, column, row);
WMScreen *scr = WMWidgetScreen(table);
if (i) {
pixmapDraw(scr, d,
strdata->gc, strdata->selGC, WMGetSystemPixmap(scr, WSICheckMark),
WMTableViewRectForCell(table, column, row), False);
} else {
pixmapDraw(scr, d,
strdata->gc, strdata->selGC, NULL, WMTableViewRectForCell(table, column, row), False);
}
}
static void selectedBSCellPainter(WMTableColumnDelegate * self, WMTableColumn * column, int row, Drawable d)
{
BooleanSwitchData *strdata = (BooleanSwitchData *) self->data;
WMTableView *table = WMGetTableColumnTableView(column);
uintptr_t i = (uintptr_t)WMTableViewDataForCell(table, column, row);
WMScreen *scr = WMWidgetScreen(table);
if (i) {
pixmapDraw(scr, d,
strdata->gc, strdata->selGC, WMGetSystemPixmap(scr, WSICheckMark),
WMTableViewRectForCell(table, column, row), True);
} else {
pixmapDraw(scr, d,
strdata->gc, strdata->selGC, NULL, WMTableViewRectForCell(table, column, row), True);
}
}
static void beginBSCellEdit(WMTableColumnDelegate * self, WMTableColumn * column, int row)
{
BooleanSwitchData *strdata = (BooleanSwitchData *) self->data;
WMRect rect = WMTableViewRectForCell(strdata->table, column, row);
uintptr_t data = (uintptr_t)WMTableViewDataForCell(strdata->table, column, row);
WMSetButtonSelected(strdata->widget, data);
WMMoveWidget(strdata->widget, rect.pos.x + 1, rect.pos.y + 1);
WMResizeWidget(strdata->widget, rect.size.width - 1, rect.size.height - 1);
WMMapWidget(strdata->widget);
}
static void endBSCellEdit(WMTableColumnDelegate * self, WMTableColumn * column, int row)
{
BooleanSwitchData *strdata = (BooleanSwitchData *) self->data;
int value;
value = WMGetButtonSelected(strdata->widget);
WMSetTableViewDataForCell(strdata->table, column, row, (void *)(uintptr_t) value);
WMUnmapWidget(strdata->widget);
}
WMTableColumnDelegate *WTCreateBooleanSwitchDelegate(WMTableView * parent)
{
WMTableColumnDelegate *delegate = wmalloc(sizeof(WMTableColumnDelegate));
WMScreen *scr = WMWidgetScreen(parent);
BooleanSwitchData *data = wmalloc(sizeof(BooleanSwitchData));
WMColor *color;
data->widget = WMCreateSwitchButton(parent);
W_ReparentView(WMWidgetView(data->widget), WMGetTableViewDocumentView(parent), 0, 0);
WMSetButtonText(data->widget, NULL);
WMSetButtonImagePosition(data->widget, WIPImageOnly);
WMSetButtonImage(data->widget, NULL);
WMSetButtonAltImage(data->widget, WMGetSystemPixmap(scr, WSICheckMark));
data->table = parent;
color = WMCreateNamedColor(scr, SelectionColor, False);
WMSetWidgetBackgroundColor(data->widget, color);
data->gc = WMColorGC(WMWhiteColor(scr));
data->selGC = WMColorGC(color);
delegate->data = data;
delegate->drawCell = BSCellPainter;
delegate->drawSelectedCell = selectedBSCellPainter;
delegate->beginCellEdit = beginBSCellEdit;
delegate->endCellEdit = endBSCellEdit;
return delegate;
}
/* ---------------------------------------------------------------------- */
static void SCellPainter(WMTableColumnDelegate * self, WMTableColumn * column, int row, Drawable d)
{
StringData *strdata = (StringData *) self->data;
WMTableView *table = WMGetTableColumnTableView(column);
stringDraw(WMWidgetScreen(table), d,
strdata->gc, strdata->selGC, strdata->textColor, strdata->font,
WMTableViewDataForCell(table, column, row), WMTableViewRectForCell(table, column, row), False);
}
static void selectedSCellPainter(WMTableColumnDelegate * self, WMTableColumn * column, int row, Drawable d)
{
StringData *strdata = (StringData *) self->data;
WMTableView *table = WMGetTableColumnTableView(column);
stringDraw(WMWidgetScreen(table), d,
strdata->gc, strdata->selGC, strdata->textColor, strdata->font,
WMTableViewDataForCell(table, column, row), WMTableViewRectForCell(table, column, row), True);
}
WMTableColumnDelegate *WTCreateStringDelegate(WMTableView * parent)
{
WMTableColumnDelegate *delegate = wmalloc(sizeof(WMTableColumnDelegate));
WMScreen *scr = WMWidgetScreen(parent);
StringData *data = wmalloc(sizeof(StringData));
data->table = parent;
data->font = WMSystemFontOfSize(scr, 12);
data->gc = WMColorGC(WMWhiteColor(scr));
data->selGC = WMColorGC(WMCreateNamedColor(scr, SelectionColor, False));
data->textColor = WMBlackColor(scr);
delegate->data = data;
delegate->drawCell = SCellPainter;
delegate->drawSelectedCell = selectedSCellPainter;
delegate->beginCellEdit = NULL;
delegate->endCellEdit = NULL;
return delegate;
}
/* ---------------------------------------------------------------------- */
static void PCellPainter(WMTableColumnDelegate * self, WMTableColumn * column, int row, Drawable d)
{
StringData *strdata = (StringData *) self->data;
WMTableView *table = WMGetTableColumnTableView(column);
pixmapDraw(WMWidgetScreen(table), d,
strdata->gc, strdata->selGC,
(WMPixmap *) WMTableViewDataForCell(table, column, row),
WMTableViewRectForCell(table, column, row), False);
}
static void selectedPCellPainter(WMTableColumnDelegate * self, WMTableColumn * column, int row, Drawable d)
{
StringData *strdata = (StringData *) self->data;
WMTableView *table = WMGetTableColumnTableView(column);
pixmapDraw(WMWidgetScreen(table), d,
strdata->gc, strdata->selGC,
(WMPixmap *) WMTableViewDataForCell(table, column, row),
WMTableViewRectForCell(table, column, row), True);
}
WMTableColumnDelegate *WTCreatePixmapDelegate(WMTableView * table)
{
WMTableColumnDelegate *delegate = wmalloc(sizeof(WMTableColumnDelegate));
WMScreen *scr = WMWidgetScreen(table);
StringData *data = wmalloc(sizeof(StringData));
data->table = table;
data->gc = WMColorGC(WMWhiteColor(scr));
data->selGC = WMColorGC(WMCreateNamedColor(scr, SelectionColor, False));
delegate->data = data;
delegate->drawCell = PCellPainter;
delegate->drawSelectedCell = selectedPCellPainter;
delegate->beginCellEdit = NULL;
delegate->endCellEdit = NULL;
return delegate;
}
/* ---------------------------------------------------------------------- */
static void drawPSCell(WMTableColumnDelegate * self, Drawable d, WMTableColumn * column, int row, Bool selected)
{
StringData *strdata = (StringData *) self->data;
WMTableView *table = WMGetTableColumnTableView(column);
void **data;
WMPixmap *pix;
char *str;
WMRect rect;
WMSize size;
data = WMTableViewDataForCell(table, column, row);
str = (char *)data[0];
pix = (WMPixmap *) data[1];
rect = WMTableViewRectForCell(table, column, row);
if (pix) {
int owidth = rect.size.width;
size = WMGetPixmapSize(pix);
rect.size.width = size.width;
pixmapDraw(WMWidgetScreen(table),
WMViewXID(WMGetTableViewDocumentView(table)),
strdata->gc, strdata->selGC, pix, rect, selected);
rect.pos.x += size.width - 1;
rect.size.width = owidth - size.width + 1;
}
stringDraw(WMWidgetScreen(table), d, strdata->gc, strdata->selGC,
strdata->textColor, strdata->font, str, rect, selected);
}
static void PSCellPainter(WMTableColumnDelegate * self, WMTableColumn * column, int row, Drawable d)
{
drawPSCell(self, d, column, row, False);
}
static void selectedPSCellPainter(WMTableColumnDelegate * self, WMTableColumn * column, int row, Drawable d)
{
drawPSCell(self, d, column, row, True);
}
WMTableColumnDelegate *WTCreatePixmapStringDelegate(WMTableView * parent)
{
WMTableColumnDelegate *delegate = wmalloc(sizeof(WMTableColumnDelegate));
WMScreen *scr = WMWidgetScreen(parent);
StringData *data = wmalloc(sizeof(StringData));
data->table = parent;
data->font = WMSystemFontOfSize(scr, 12);
data->gc = WMColorGC(WMWhiteColor(scr));
data->selGC = WMColorGC(WMCreateNamedColor(scr, SelectionColor, False));
data->textColor = WMBlackColor(scr);
delegate->data = data;
delegate->drawCell = PSCellPainter;
delegate->drawSelectedCell = selectedPSCellPainter;
delegate->beginCellEdit = NULL;
delegate->endCellEdit = NULL;
return delegate;
}

View File

@@ -0,0 +1,25 @@
#ifndef _TABLEDELEGATES_H_
#define _TABLEDELEGATES_H_
#ifdef __cplusplus
extern "C" {
#endif
WMTableColumnDelegate *WTCreatePixmapDelegate(WMTableView *table);
WMTableColumnDelegate *WTCreateStringDelegate(WMTableView *table);
WMTableColumnDelegate *WTCreatePixmapStringDelegate(WMTableView *parent);
WMTableColumnDelegate *WTCreateStringEditorDelegate(WMTableView *table);
WMTableColumnDelegate *WTCreateEnumSelectorDelegate(WMTableView *table);
void WTSetEnumSelectorOptions(WMTableColumnDelegate *delegate,
char **options, int count);
WMTableColumnDelegate *WTCreateBooleanSwitchDelegate(WMTableView *parent);
#ifdef __cplusplus
}
#endif
#endif

1243
WINGs/Extras/wtableview.c Normal file

File diff suppressed because it is too large Load Diff

121
WINGs/Extras/wtableview.h Normal file
View File

@@ -0,0 +1,121 @@
#ifndef _WTABLEVIEW_H_
#define _WTABLEVIEW_H_
#ifdef __cplusplus
extern "C" {
#endif
typedef struct W_TableColumn WMTableColumn;
typedef struct W_TableView WMTableView;
extern const char *WMTableViewSelectionDidChangeNotification;
typedef struct WMTableColumnDelegate {
void *data;
void (*drawCell)(struct WMTableColumnDelegate *self,
WMTableColumn *column, int row, Drawable d);
void (*drawSelectedCell)(struct WMTableColumnDelegate *self,
WMTableColumn *column, int row, Drawable d);
void (*beginCellEdit)(struct WMTableColumnDelegate *self, WMTableColumn *column,
int row);
void (*endCellEdit)(struct WMTableColumnDelegate *self, WMTableColumn *column,
int row);
} WMTableColumnDelegate;
typedef struct W_TableViewDelegate {
void *data;
int (*numberOfRows)(struct W_TableViewDelegate *self,
WMTableView *table);
void *(*valueForCell)(struct W_TableViewDelegate *self,
WMTableColumn *column, int row);
void (*setValueForCell)(struct W_TableViewDelegate *self,
WMTableColumn *column, int row, void *value);
} WMTableViewDelegate;
WMTableColumn *WMCreateTableColumn(char *title);
void WMSetTableColumnWidth(WMTableColumn *column, unsigned width);
void WMSetTableColumnConstraints(WMTableColumn *column,
unsigned minWidth, unsigned maxWidth);
void WMSetTableColumnDelegate(WMTableColumn *column,
WMTableColumnDelegate *delegate);
WMTableView *WMGetTableColumnTableView(WMTableColumn *column);
void WMSetTableColumnId(WMTableColumn *column, void *id);
void *WMGetTableColumnId(WMTableColumn *column);
WMTableView *WMCreateTableView(WMWidget *parent);
void WMSetTableViewDataSource(WMTableView *table, void *source);
void *WMGetTableViewDataSource(WMTableView *table);
void WMSetTableViewHeaderHeight(WMTableView *table, unsigned height);
void WMAddTableViewColumn(WMTableView *table, WMTableColumn *column);
void WMSetTableViewDelegate(WMTableView *table, WMTableViewDelegate *delegate);
void WMSetTableViewAction(WMTableView *table, WMAction *action,
void *clientData);
void *WMGetTableViewClickedColumn(WMTableView *table);
int WMGetTableViewClickedRow(WMTableView *table);
WMArray *WMGetTableViewSelectedRows(WMTableView *table);
WMView *WMGetTableViewDocumentView(WMTableView *table);
void WMEditTableViewRow(WMTableView *table, int row);
void WMSelectTableViewRow(WMTableView *table, int row);
void *WMTableViewDataForCell(WMTableView *table, WMTableColumn *column,
int row);
void WMSetTableViewDataForCell(WMTableView *table, WMTableColumn *column,
int row, void *data);
WMRect WMTableViewRectForCell(WMTableView *table, WMTableColumn *column,
int row);
void WMSetTableViewBackgroundColor(WMTableView *table, WMColor *color);
void WMSetTableViewGridColor(WMTableView *table, WMColor *color);
void WMSetTableViewRowHeight(WMTableView *table, int height);
void WMReloadTableView(WMTableView *table);
void WMNoteTableViewNumberOfRowsChanged(WMTableView *table);
void WMScrollTableViewRowToVisible(WMTableView *table, int row);
void WMSetTableViewHasHorizontalScroller(WMTableView *tPtr, Bool flag);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -1,85 +1,48 @@
## automake input file for WINGs
AUTOMAKE_OPTIONS = no-dependencies
AUTOMAKE_OPTIONS =
SUBDIRS = Resources
SUBDIRS = WINGs . po Documentation Resources
LIBLIST= $(top_builddir)/wrlib/libwraster.la\
@LIBRARY_SEARCH_PATH@ @GFXLIBS@ @XLIBS@ \
-lm @LIBPL@
#lib_LTLIBRARIES = libWINGs.la
lib_LIBRARIES = libWINGs.a libWUtil.a
#libWINGs_la_LDFLAGS = -version-info 1:1:0
include_HEADERS = WINGs.h WUtil.h WINGsP.h
libWINGs_la_LDFLAGS = -version-info @WINGS_VERSION@
libWUtil_la_LDFLAGS = -version-info @WUTIL_VERSION@
bin_SCRIPTS = get-wings-flags get-wutil-flags
noinst_PROGRAMS = wtest wmquery wmfile fontl testmywidget testcolorpanel connect
testmywidget_SOURCES = testmywidget.c mywidget.c mywidget.h
testmywidget_LDADD = libWINGs.a $(LIBLIST)
fontl_SOURCES = fontl.c
fontl_LDADD = libWINGs.a $(LIBLIST)
wtest_SOURCES = wtest.c
wtest_LDADD = libWINGs.a $(LIBLIST)
wtest_DEPENDENCIES = libWINGs.a
wmfile_SOURCES = wmfile.c
wmfile_LDADD = libWINGs.a $(LIBLIST)
testcolorpanel_SOURCES = testcolorpanel.c
testcolorpanel_LDADD = libWINGs.a $(LIBLIST)
wmquery_SOURCES = wmquery.c
wmquery_LDADD = libWINGs.a $(LIBLIST)
connect_SOURCES = connect.c
connect_LDADD = libWUtil.a @LIBRARY_SEARCH_PATH@ @NETLIBS@ @LIBPL@
lib_LTLIBRARIES = libWUtil.la libWINGs.la
EXTRA_DIST = logo.xpm BUGS
LDADD= libWUtil.la libWINGs.la $(top_builddir)/wrlib/libwraster.la @INTLIBS@
libWINGs_la_LIBADD = libWUtil.la $(top_builddir)/wrlib/libwraster.la @XLIBS@ @XFTLIBS@ @FCLIBS@ @LIBM@
libWUtil_la_LIBADD = @LIBBSD@
EXTRA_DIST = BUGS make-rgb Examples Extras Tests get-wings-flags.in get-wutil-flags.in
# wbutton.c
libWINGs_a_SOURCES = \
WINGs.h \
WINGsP.h \
libWINGs_la_SOURCES = \
configuration.c \
dragcommon.c \
dragdestination.c \
dragsource.c \
international.c \
notification.c \
rgb.h \
selection.c \
userdefaults.c \
wapplication.c \
wappresource.c \
wballoon.c \
wbox.c \
wbrowser.c \
wbutton.c \
wcolor.c \
wcolorpanel.c \
wcolorwell.c \
wconfig.h \
wevent.c \
wfilepanel.c \
wframe.c \
wfont.c \
wfontpanel.c \
widgets.c \
winputmethod.c \
wlabel.c \
wlist.c \
wmenuitem.c \
@@ -88,49 +51,73 @@ libWINGs_a_SOURCES = \
wpixmap.c \
wpopupbutton.c \
wprogressindicator.c \
wruler.c \
wscroller.c \
wscrollview.c \
wslider.c \
wsplitview.c \
wtabview.c \
wtext.c \
wtextfield.c \
wwindow.c \
wview.c \
wwindow.c
libWUtil_la_SOURCES = \
array.c \
bagtree.c \
data.c \
error.c \
findfile.c \
bagarray.c \
bagtree.c \
connection.c \
data.c \
handlers.c \
hashtable.c \
host.c \
memory.c \
usleep.c
libWUtil_a_SOURCES = \
WINGs.h \
WINGsP.h \
bagarray.c \
bagtree.c \
connection.c \
data.c \
host.c \
international.c \
misc.c \
notification.c \
proplist.c \
string.c \
tree.c \
userdefaults.c \
usleep.c \
wapplication.c \
wutil.c \
error.c \
findfile.c \
hashtable.c \
memory.c \
usleep.c
wconfig.h \
wutil.c
INCLUDES = -I$(top_srcdir)/wrlib -I$(top_srcdir)/src \
-DRESOURCE_PATH=\"$(datadir)/WINGs\" @HEADER_SEARCH_PATH@ -DDEBUG
AM_CPPFLAGS = -DLOCALEDIR=\"$(NLSDIR)\" -DRESOURCE_PATH=\"$(datadir)/WINGs\" -DDEBUG
AM_CFLAGS =
INCLUDES = -I$(top_srcdir)/WINGs/WINGs -I$(top_srcdir)/wrlib -I$(top_srcdir)/src \
@XFTFLAGS@ @HEADER_SEARCH_PATH@
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = WINGs.pc
DISTCLEANFILES = $(pkgconfig_DATA) get-wings-flags get-wutil-flags
WINGs.pc: Makefile
@echo "Generating $@"
@echo 'Name: WINGs' > $@
@echo 'Description: Small widget set with the NeXTStep(TM) look and feel' >> $@
@echo 'Version: $(VERSION)' >> $@
@echo 'Requires: wrlib' >> $@
@echo 'Libs: $(lib_search_path) -lWINGs' >> $@
@echo 'Libs.private: $(XFTLIBS) $(XLIBS) -lm $(INTLIBS)' >> $@
@echo 'Cflags: $(inc_search_path)' >> $@
get-wings-flags: get-wings-flags.in Makefile
@echo "Generating $@"
@$(SED) -e 's#$${inc_search_path}#$(inc_search_path)#;' \
-e 's#$${lib_search_path}#$(lib_search_path)#;' \
-e 's#$${GFXLIBS}#$(GFXLIBS)#;' \
-e 's#$${XFTLIBS}#$(XFTLIBS)#;' \
-e 's#$${INTLIBS}#$(INTLIBS)#;' \
-e 's#$${XLIBS}#$(XLIBS)#;' < $(dir $<@)get-wings-flags.in > $@
@chmod 755 $@
get-wutil-flags: get-wutil-flags.in Makefile
@echo "Generating $@"
@$(SED) -e 's#$${includedir}#$(includedir)#;' \
-e 's#$${libdir}#$(libdir)#;' \
-e 's#$${INTLIBS}#$(INTLIBS)#;' < $(dir $<@)get-wutil-flags.in > $@
@chmod 755 $@
wcolorpanel.o: wcolorpanel.c
$(COMPILE) -c -DRGBTXT="\"@X_LIBRARY_PATH@/X11/rgb.txt\"" $<

450
WINGs/NEWS Normal file
View File

@@ -0,0 +1,450 @@
** API and ABI modifications since wmaker 0.92.0
** libWINGs **
<WINGsP.h>
struct W_DragDestinationInfo: new members added SIZE CHANGE
<WINGs.h>
WMGetTextFieldCursorPosition ADDED
WC_Matrix REMOVED from enum.
WMCreateProgressIndicator REMOVED
WMSetProgressIndicatorMinValue REMOVED
WMSetProgressIndicatorMaxValue REMOVED
WMSetProgressIndicatorValue REMOVED
WMGetProgressIndicatorMinValue REMOVED
WMGetProgressIndicatorMaxValue REMOVED
WMGetProgressIndicatorValue REMOVED
typedef struct W_Ruler WMRuler REMOVED
typedef struct WMRulerMargins REMOVED
WMAppendTextBlock REMOVED
WMAppendTextStream REMOVED
WMCreateRuler REMOVED
WMCreateTextBlockWithObject REMOVED
WMCreateTextBlockWithPixmap REMOVED
WMCreateTextBlockWithText REMOVED
WMCreateTextForDocumentType REMOVED
WMDestroyTextBlock REMOVED
WMFindInTextStream REMOVED
WMFreezeText REMOVED
WMGetGrabbedRulerMargin REMOVED
WMGetReleasedRulerMargin REMOVED
WMGetRulerMargins REMOVED
WMGetRulerOffset REMOVED
WMGetTextBlockProperties REMOVED
WMGetTextDefaultColor REMOVED
WMGetTextDefaultFont REMOVED
WMGetTextEditable REMOVED
WMGetTextIgnoresNewline REMOVED
WMGetTextInsertType REMOVED
WMGetTextObjects REMOVED
WMGetTextRulerShown REMOVED
WMGetTextSelectedObjects REMOVED
WMGetTextSelectedStream REMOVED
WMGetTextSelectionColor REMOVED
WMGetTextSelectionFont REMOVED
WMGetTextSelectionUnderlined REMOVED
WMGetTextStream REMOVED
WMGetTextUsesMonoFont REMOVED
WMIsMarginEqualToMargin REMOVED
WMPageText REMOVED
WMPrependTextBlock REMOVED
WMPrependTextStream REMOVED
WMRemoveTextBlock REMOVED
WMReplaceTextSelection REMOVED
WMScrollText REMOVED
WMSetRulerMargins REMOVED
WMSetRulerMoveAction REMOVED
WMSetRulerOffset REMOVED
WMSetRulerReleaseAction REMOVED
WMSetTextAlignment REMOVED
WMSetTextBackgroundColor REMOVED
WMSetTextBackgroundPixmap REMOVED
WMSetTextBlockProperties REMOVED
WMSetTextDefaultColor REMOVED
WMSetTextDefaultFont REMOVED
WMSetTextDelegate REMOVED
WMSetTextEditable REMOVED
WMSetTextForegroundColor REMOVED
WMSetTextHasHorizontalScroller REMOVED
WMSetTextHasRuler REMOVED
WMSetTextHasVerticalScroller REMOVED
WMSetTextIgnoresNewline REMOVED
WMSetTextIndentNewLines REMOVED
WMSetTextRelief REMOVED
WMSetTextSelectionColor REMOVED
WMSetTextSelectionFont REMOVED
WMSetTextSelectionUnderlined REMOVED
WMSetTextUsesMonoFont REMOVED
WMShowTextRuler REMOVED
WMThawText REMOVED
WMRefreshText REMOVED
WMCreateText REMOVED
WMClearText REMOVED
** libWutil **
enum WMConnectionState REMOVED
enum WMConnectionTimeoutState REMOVED
struct ConnectionDelegate REMOVED
__wmessage ADDED
wstrerror REMOVED
wmessage converted from function to wrapper macro
wwarning converted from function to wrapper macro
wfatal converted from function to wrapper macro
wsyserror converted from function to wrapper macro
wsyserror REMOVED (use werror instead)
werror macro ADDED (replaces wsyserror)
wsyserrorwithcode removed
wmkdirhier ADDED
wrmdirhier ADDED
wmalloc0 REMOVED
wnew REMOVED
wnew0 REMOVED
wstrlcpy ADDED
wstrlcat ADDED
WMPushInArray REMOVED
WMWritePropListToFile NUMBER OF FUNCTION ARGUMENTS CHANGED
WMGetCurrentHost
WMGetHostWithName
WMGetHostWithAddress
WMRetainHost
WMReleaseHost
WMSetHostCacheEnabled
WMIsHostCacheEnabled
WMFlushHostCache
WMIsHostEqualToHost
WMGetHostName
WMGetHostNames
WMGetHostAddress
WMCreateConnectionAsServerAtAddress REMOVED
WMCreateConnectionToAddress REMOVED
WMCreateConnectionToAddressAndNotify REMOVED
WMCloseConnection REMOVED
WMDestroyConnection REMOVED
WMConnection* WMAcceptConnection REMOVED
WMGetConnectionAvailableData REMOVED
WMSendConnectionData REMOVED
WMEnqueueConnectionData REMOVED
WMFlushConnection REMOVED
WMSetConnectionDelegate REMOVED
WMGetConnectionService REMOVED
WMGetConnectionProtocol REMOVED
WMSetConnectionNonBlocking REMOVED
WMSetConnectionCloseOnExec REMOVED
WMSetConnectionShutdownOnClose REMOVED
WMGetConnectionClientData REMOVED
WMSetConnectionClientData REMOVED
WMGetConnectionFlags REMOVED
WMSetConnectionFlags REMOVED
WMGetConnectionSocket REMOVED
WMGetConnectionState REMOVED
WMGetConnectionTimeoutState REMOVED
WMGetConnectionUnsentData REMOVED
WMGetConnectionQueuedData REMOVED
WMSetConnectionDefaultTimeout REMOVED
WMSetConnectionOpenTimeout REMOVED
WMSetConnectionSendTimeout REMOVED
WMTreeWalkProc ADDED
WMTreeWalk ADDED
wshellquote ADDED
----------------------------------------------------
*** Mon Oct 14 19:42:42 EEST 2002 - Dan
Double buffering
----------------
To avoid flickering caused by redrawing the widgets on Expose events, a
double buffering tehnique was implemented for most of the widgets.
This flickering effect has gotten more vizible with the introduction
of antialiased fonts. If with normal text one can redraw the text over the
old one over and over again without any degradation of the text (new pixels
simply overwrite old pixels), with antialiased text the situation is
different and text gets quickly corrupted. To avoid this corruption, one
needs to first erase the area where the text will go, which can cause the
before mentioned flickering.
The double buffer is implemented to solve this issue.
This is a change that that will be automatically available for any WINGs
applications and will require no change in the existing code.
However there is an exception from this in case of WMList if you delegate
the drawing of items to userspace (read below for the compelte details).
*** Mon Oct 14 22:07:42 EEST 2002 - Dan
WMList change
-------------
In case of WMList there is the posibility to delegate the drawing of the
list items to the application that is linked with WINGs, and this code will
not be inside the WINGs library, but in userland. Since we use the double
buffering tehnique in this case too (to allow all widgets based on WMList
and the ones that draw their list items by themselves to benefit from the
double buffering advantage automatically), we no longer pass the window to
the user code doing item drawing, but instead pass this pixmap in which we
draw before copying to the real window.
Since one cannot use XClearWindow() or XClearArea() on pixmaps, but only on
windows, if the code drawing list items used to call these functions to clear
the item area before drawing it needs to change to using XFillRectangle()
instead.
With this change it also means that there is no longer any need to do any
double buffering in the user code, since it's already done by WINGs.
*** Mon Oct 14 19:28:35 EEST 2002 - Dan
API change
----------
WMDrawString() and WMDrawImageString() no longer take a GC as argument.
Instead WMDrawString() takes a WMColor* as the color for the string to be
drawn, while WMDrawImageString() takes 2 WMColor* arguments in place of the
old GC: first for text color and second for background color.
This change is required to support extending WMFont to allow it to handle
antialiased fonts through the XFree86 Xft2 extension.
This also has the advantage of hiding low level X11 details and use WINGs
internat objects instead.
To fix your old code to work with the new WINGs API you need to replace the
GC passed to WMDraw***String() in your code with a WMColor*.
Most of the old code used to be like this:
WMDrawString(screen, window, WMColorGC(color), font, x, y, txt, len);
for the new API it should be replaced by:
WMDrawString(screen, window, color, font, x, y, txt, len);
However if you used a particular GC created by yourself to suit your special
needs, you need to pass a color which is the same as the foreground color of
that gc.
For WMDrawImageString(), from:
WMDrawImageString(screen, window, gc, font, x, y, txt, len);
becomes
WMDrawImageString(screen, window, textColor, backColor, font, x, y, txt, len);
where textColor and backColor are declared like:
WMColor *textColor, *backColor;
and have the color of the foreground respective the background of the old gc.
*** Wed Oct 9 07:10:04 EEST 2002 - Dan
Antialiased font support
------------------------
With the addition of Xft2 support in the WINGs library, now WINGs can display
antialiased text with TrueType or any scalable fonts.
Antialiased text is enabled by default, but can be disabled by adding
AntialiasedText = NO; in ~/GNUstep/Defaults/WMGLOBAL
This will disable antialiased text for any WINGs based application. If you
only want to disable them for a specific application only, like WindowMaker
for example, then add the same option in the applications configuration file,
in this case ~/GNUstep/Defaults/WindowMaker
Note that bitmapped fonts look much better than TrueType when antialiasing is
disabled.
*** Mon Sep 09 06:58:30 EEST 2002 - Dan
New delegate for the WMConnection class
---------------------------------------
ConnectionDelegate structure has a new member: canResumeSending.
The purpose of this callback is to notify you that you can resume sending
data over a WMConnection.
It works in the following manner:
WMSendConnectionData() can return 3 values: -1, 0, 1
-1 - means that the connection has died. you should stop sending data and
close the connection ASAP.
1 - means that the data was succesfully sent
0 - means that the data (or part of it) was not sent. however, it was saved
in a queue and the library will try to send it later when possible.
if the return value is 1, you can continue to send the next message, and so
on, until the return value of such a send call will be 0.
After it returns 0 you can continue sending, however, the data will not be
sent over the connection because the operating system cannot accept any more
data for the moment. Instead it will be queued inside the library, making your
program's memory footprint increase. If the ammount of data you need to
send is limited and not too big, this shouldn't be a problem, because your
data will be queued and sent when the operating system will notify the
library that sending is possible again.
If this is the case you can just ignore the output of WMSendConnectionData()
and not set a callback for canResumeSending.
However, if the ammount of data you have to send is undetermined and you
also want to keep a small memory footprint for your program (so that it
won't grow until it uses all your available memory ;) ), you will have to
stop sending data over the connection as soon as WMSendConnectionData()
returns with 0. Then you should somehow mark this situation in your program
to avoid it trying to send anymore data until notified that it can resume.
(You should have also set a canResumeSending callback when you initialized
your WMConnection object because else you cannot be notified when to resume.)
Now, when you receive such a 0 from the send operation, your last sent data
is put in a queue inside the library. At a later time when the operating
system notifies the library that sending is possible again, the library will
resume to send the data that is saved in the queue. After it will be able to
send all the data in the queue, the canResumeSending callback will be
called, letting you know that not only you can resume sending because the
operating system is again able to send data, but also that the queue was
completely flushed.
From the canResumeSending callback, you should again update the status of
your program marking that it can send again, and then resume sending the
data from where you were left.
*** Thu Oct 04 06:00:09 EEST 2001 -Dan
Property lists handling code
----------------------------
Code to handle property lists was added to WINGs. It is more robust
than the libPropList code, mostly because some conflicting concepts
borrowed from UserDefaults (which libPropList use) are no longer used in
the WINGs property lists code. These borrowed concepts conflicted with the
retain/release mechanism of property lists and could lead in certain cases
to segmentation faults when executing libPropList based code. But the worse
part was that these libPropList problems were practically unsolvable without
removing one of those conflicting concepts and without a complete redesign.
The new WINGs property lists code is also better integrated with the other
data types from WINGs and is actively maintained.
Practically the things that were removed from the WINGs property list
implementation compared to the old libPropList implementation, are exactly
the UserDefaults borrowed concepts that conflict with the retain/release
mechanism:
- The container of a proplist object and the associated functions are gone.
- The filename associated with a proplist object and the corresponding
functions are gone. Now the saving function needs the filename as a
parameter.
- The synchronization functions are no longer supported. They are part of
the UserDefaults and are implemented there.
- No functions related to domains/registering were implemented in the WINGs
property lists code, because they are also not part of property lists.
They are more in connection with UserDefaults and a central point of access
for domains.
The above 2 concepts: container and filename were added to libPropList just
to let it support synchronization which was borrowed from UserDefaults.
Property lists as defined in the openstep specification are just complex
data structures composed of strings, data, arrays, dictionaries and a mix of
them and are not associated with any file in particular. UserDefaults on the
other hand are property lists read from a specific file and they associate
that property list with that file and allow them to be synchronized.
Old libPropList based code can still be used by linking against the WINGs
library containing the new proplist code with minimal changes which are
described in detail in the comments at the top of the WINGs/proplist-compat.h
header file (the same file carries the #defines for mapping old libPropList
functions to the new WINGs proplist functions).
Our recommendation is to move to the new functions WINGs provide because
they better integrate with other function naming conventions in WINGs.
The proplist-compat.h header file is just a way to have old code up and
running with minimal changes so that we can remove the old and unmaintained
libPropList from systems while keeping to use old libPropList based code
without rewriting it and it should not be used for other purposes.
*** Sat Apr 21 09:12:09 EEST 2001 -Dan
API change
----------
To allow a correct display of icon images with alpha blending in panels and
other places where a WINGs based application may use them the following
changes took place:
1. The following functions were renamed:
- WMSetApplicationIconImage() --> WMSetApplicationIconPixmap()
- WMGetApplicationIconImage() --> WMGetApplicationIconPixmap()
- WMSetWindowMiniwindowImage() --> WMSetWindowMiniwindowPixmap()
2. The following functions were added:
- WMSetApplicationIconImage(WMScreen *scr, RImage *image)
- RImage* WMGetApplicationIconImage(WMScreen *scr)
- WMPixmap* WMCreateApplicationIconBlendedPixmap(WMScreen *scr, RColor *col)
As you can see the old functions that operated on WMPixmap images (which are
basically X Pixmaps that lack alpha information) were renamed to ...Pixmap()
to make them more suggestive about what they do and to make room for the
new functions that operate on RImages (that hold alpha information).
Since the corresponding WMGet... functions only retrieve the stored
image/pixmap from the application, I'll outline how the WMSet...
functions operate:
All WM...IconPixmap() functions operate on WMPixmaps
All WM...IconImage() functions operate on RImages
- WMSetApplicationIconImage() will set the RImage to be used in panels
and will also convert the RImage to a WMPixmap with a threshold of 128
and will use that pixmap for the appicon image. If that doesn't satisfy
you, you can make a call to WMSetApplicationIconPixmap() on your own to
set whatever WMPixmap you see fit for the appicon.
- WMSetApplicationIconPixmap() will set the WMPixmap to be used for the
appicon and for the panels
If you use only one of the above functions, the corresponding image/pixmap
will be used everywhere where needed (panels and appicon), but the pixmap
version will not be able to handle alpha blending correctly.
If you use both WMSetApplicationIconImage() and WMSetApplicationIconPixmap()
then the RImage will have priority in panels, and the WMPixmap will only be
used for the appicon. This allows you to better control what icon is
displayed in the appicon, in case the default conversion of the RImage to a
pixmap with a threshold of 128 is not good enough, or in case you want a
different icon to be shown in the appicon than in panels.
Also this new function was added:
- WMCreateApplicationIconBlendedPixmap() will use the RImage set with
WMSetApplicationIconImage() if available and will blend it with the color
you passed. This will make the image show well on a background of that
color. If the RImage was not set it will return NULL. You need to call
WMReleasePixmap() on it after you finish with it. Passing a NULL pointer
instead of a color will make the RImage be blended with the default color
of the WINGs widgets: '#aeaaae' making it suitable to be assigned to any
WINGs widget.
To make your existing code work as before all you need to do is to rename
the following functions:
- WMSetApplicationIconImage() --> WMSetApplicationIconPixmap()
- WMGetApplicationIconImage() --> WMGetApplicationIconPixmap()
- WMSetWindowMiniwindowImage() --> WMSetWindowMiniwindowPixmap()
But if you want to take advantage of the new abilities to show alpha
blended images you need to start using the new functions.

View File

@@ -5,7 +5,7 @@
Alfredo Kengi Kojima
kojima@windowmaker.org
kojima@windowmaker.info
WINGs is a small widget set with the N*XTSTEP look and feel. It's API
@@ -13,7 +13,7 @@ is inspired in OpenStep and it's implementation borrows some ideas
from Tk. It has a reasonable set of widgets, sufficient for building
small applications (like a CDPlayer or hacking something like rxvt). It
also has other functions that are usefull for applications, like a
User Defaults like configuration manager and a notification system.
User Defaults alike configuration manager and a notification system.
The library is limited and it's design is a little sloppy,
so it's not intended to build large or complex applications, like
@@ -26,7 +26,7 @@ workaround some of it's limitations, although you'll probably be able to
write something like a trivial tic-tac-toe game without knowing much Xlib.
Some of it's functions are designed to support the Window Maker window
manager (see http://windowmaker.org) In fact, it's primary role is to
manager (see http://windowmaker.info) In fact, it's primary role is to
support Window Maker. All other uses of it are just an added bonus.
It will help you to understand the API if you read the ApplicationKit
@@ -56,22 +56,19 @@ Widgets provided by WINGs:
- slider
- scrollable view
- color well
- split view (only 2 subviews)
- split view
- tabbed view
- progress indicator
- selection (make pasteboard like?)
- drag&drop
- input box
- file panel
- color panel
- alert panel
- font panel
Planned:
--------
- selection (pasteboard like)
- drag&drop
If you think you can code the following, please do. They are needed by
WPrefs.app, but the number of other things I have to do is huge.
@@ -84,7 +81,6 @@ Wish list: (I don't have the know-how or time to do them)
- text (with support for RTF)
- matrix (like NSMatrix)
- splitviews with more than 2 subviews
- font manager (like NSFontManager)
- finish other wigets
- optimize list scrolling (XCopyArea() the area that's already drawn)

View File

@@ -1,3 +0,0 @@
Makefile Makefile.in
.psrc .inslog2 tca.map tca.log
*.rpt

View File

@@ -1,231 +0,0 @@
# Makefile.in generated automatically by automake 1.4 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
AS = @AS@
CC = @CC@
CPP_PATH = @CPP_PATH@
DFLAGS = @DFLAGS@
DLLIBS = @DLLIBS@
DLLTOOL = @DLLTOOL@
GFXLIBS = @GFXLIBS@
HEADER_SEARCH_PATH = @HEADER_SEARCH_PATH@
ICONEXT = @ICONEXT@
INTLIBS = @INTLIBS@
LD = @LD@
LIBPL = @LIBPL@
LIBRARY_SEARCH_PATH = @LIBRARY_SEARCH_PATH@
LIBTOOL = @LIBTOOL@
LITE = @LITE@
LN_S = @LN_S@
MAKEINFO = @MAKEINFO@
MOFILES = @MOFILES@
NETLIBS = @NETLIBS@
NLSDIR = @NLSDIR@
NM = @NM@
OBJDUMP = @OBJDUMP@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
VERSION = @VERSION@
WPMOFILES = @WPMOFILES@
XCFLAGS = @XCFLAGS@
XGETTEXT = @XGETTEXT@
XLFLAGS = @XLFLAGS@
XLIBS = @XLIBS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBRARY_PATH = @X_LIBRARY_PATH@
supported_locales = @supported_locales@
wprefsdir = @wprefsdir@
resdatadir = $(datadir)/WINGs
resdata_DATA = Images.tiff Images.xpm defaultIcon.tiff defaultIcon.xpm
EXTRA_DIST = $(resdata_DATA) Images.xcf
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../../src/config.h
CONFIG_CLEAN_FILES =
DATA = $(resdata_DATA)
DIST_COMMON = Makefile.am Makefile.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = gtar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu WINGs/Resources/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
install-resdataDATA: $(resdata_DATA)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(resdatadir)
@list='$(resdata_DATA)'; for p in $$list; do \
if test -f $(srcdir)/$$p; then \
echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(resdatadir)/$$p"; \
$(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(resdatadir)/$$p; \
else if test -f $$p; then \
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(resdatadir)/$$p"; \
$(INSTALL_DATA) $$p $(DESTDIR)$(resdatadir)/$$p; \
fi; fi; \
done
uninstall-resdataDATA:
@$(NORMAL_UNINSTALL)
list='$(resdata_DATA)'; for p in $$list; do \
rm -f $(DESTDIR)$(resdatadir)/$$p; \
done
tags: TAGS
TAGS:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = WINGs/Resources
distdir: $(DISTFILES)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(top_distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu WINGs/Resources/Makefile
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
info-am:
info: info-am
dvi-am:
dvi: dvi-am
check-am: all-am
check: check-am
installcheck-am:
installcheck: installcheck-am
install-exec-am:
install-exec: install-exec-am
install-data-am: install-resdataDATA
install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am: uninstall-resdataDATA
uninstall: uninstall-am
all-am: Makefile $(DATA)
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs:
$(mkinstalldirs) $(DESTDIR)$(resdatadir)
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
mostlyclean-am: mostlyclean-generic
mostlyclean: mostlyclean-am
clean-am: clean-generic mostlyclean-am
clean: clean-am
distclean-am: distclean-generic clean-am
-rm -f libtool
distclean: distclean-am
maintainer-clean-am: maintainer-clean-generic distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-am
.PHONY: uninstall-resdataDATA install-resdataDATA tags distdir info-am \
info dvi-am dvi check check-am installcheck-am installcheck \
install-exec-am install-exec install-data-am install-data install-am \
install uninstall-am uninstall all-redirect all-am all installdirs \
mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@@ -1,4 +1,13 @@
- move paint to idle handlers
- check if its useful to add some WMBrowserSelectionDidChangeNotification
(actually a pass-through for WMListSelectionDidChangeNotification).
Or a delegate to be called when the list selection change.
- add some way to modify speed when scrolling WMList, depending on how
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
- make it work in 8bpp

22
WINGs/Tests/Makefile.am Normal file
View File

@@ -0,0 +1,22 @@
## automake input file for WINGs - Tests
AUTOMAKE_OPTIONS =
noinst_PROGRAMS = wtest wmquery wmfile testmywidget
LDADD= $(top_builddir)/WINGs/libWINGs.la $(top_builddir)/wrlib/libwraster.la \
$(top_builddir)/WINGs/libWUtil.la \
@XFTLIBS@ @INTLIBS@
testmywidget_SOURCES = testmywidget.c mywidget.c mywidget.h
wtest_DEPENDENCIES = $(top_builddir)/WINGs/libWINGs.la
EXTRA_DIST = logo.xpm upbtn.xpm wm.html wm.png
INCLUDES = -I$(top_srcdir)/WINGs -I$(top_srcdir)/wrlib -I$(top_srcdir)/src \
-DRESOURCE_PATH=\"$(datadir)/WINGs\" @XFTFLAGS@ @HEADER_SEARCH_PATH@ \
-DDEBUG

197
WINGs/Tests/mywidget.c Normal file
View File

@@ -0,0 +1,197 @@
/*
* Demo user widget for WINGs
*
* Author: Alfredo K. Kojima
*
* This file is in the public domain.
*
*/
/*
*
* Include the WINGs private data header.
*
*
*/
#include <WINGs/WINGsP.h>
/*
* Our public header.
*/
#include "mywidget.h"
/*
* Define the widget "class"
*/
typedef struct W_MyWidget {
/* these two fields must be present in all your widgets in this
* exact position */
W_Class widgetClass;
WMView *view;
/* put your stuff here */
char *text;
} _MyWidget;
/* some forward declarations */
static void destroyMyWidget(_MyWidget * mPtr);
static void paintMyWidget(_MyWidget * mPtr);
static void handleEvents(XEvent * event, void *data);
static void handleActionEvents(XEvent * event, void *data);
/*
* Delegates
* See the source for the other widgets to see how to use.
* You won't need to use this most of the time.
*/
static W_ViewDelegate _MyWidgetDelegate = {
NULL,
NULL,
NULL,
NULL,
NULL
};
/* our widget class ID */
static W_Class myWidgetClass = 0;
/*
* Initializer for our widget. Must be called before creating any
* instances of the widget.
*/
W_Class InitMyWidget(WMScreen * scr)
{
/* register our widget with WINGs and get our widget class ID */
if (!myWidgetClass) {
myWidgetClass = W_RegisterUserWidget();
}
return myWidgetClass;
}
/*
* Our widget fabrication plant.
*/
MyWidget *CreateMyWidget(WMWidget * parent)
{
MyWidget *mPtr;
/* allocate some storage for our new widget instance */
mPtr = wmalloc(sizeof(MyWidget));
/* initialize it */
memset(mPtr, 0, sizeof(MyWidget));
/* set the class ID */
mPtr->widgetClass = myWidgetClass;
/*
* Create the view for our widget.
* Note: the Window for the view is only created after the view is
* realized with W_RealizeView()
*
* Consider the returned view as read-only.
*/
mPtr->view = W_CreateView(W_VIEW(parent));
if (!mPtr->view) {
wfree(mPtr);
return NULL;
}
/* always do this */
mPtr->view->self = mPtr;
/* setup the delegates for the view */
mPtr->view->delegate = &_MyWidgetDelegate;
/*
* Intercept some events for our widget, so that we can handle them.
*/
WMCreateEventHandler(mPtr->view, ExposureMask /* this allows us to know when we should paint */
| StructureNotifyMask, /* this allows us to know things like when we are destroyed */
handleEvents, mPtr);
/*
* Intercept some other events. This could be merged with the above
* call, but we separate for more organization.
*/
WMCreateEventHandler(mPtr->view, ButtonPressMask, handleActionEvents, mPtr);
return mPtr;
}
/*
* Paint our widget contents.
*/
static void paintMyWidget(_MyWidget * mPtr)
{
W_Screen *scr = mPtr->view->screen;
WMColor *color;
if (mPtr->text) {
color = WMWhiteColor(scr);
W_PaintText(mPtr->view, mPtr->view->window, scr->normalFont, 0, 0,
mPtr->view->size.width, WACenter, color, False, mPtr->text, strlen(mPtr->text));
WMReleaseColor(color);
}
}
static void handleEvents(XEvent * event, void *data)
{
_MyWidget *mPtr = (_MyWidget *) data;
switch (event->type) {
case Expose:
if (event->xexpose.count != 0)
break;
paintMyWidget(mPtr);
break;
case DestroyNotify:
destroyMyWidget(mPtr);
break;
}
}
static void handleActionEvents(XEvent * event, void *data)
{
_MyWidget *mPtr = (_MyWidget *) data;
switch (event->type) {
case ButtonPress:
XBell(mPtr->view->screen->display, 100);
XBell(mPtr->view->screen->display, 100);
break;
}
}
void SetMyWidgetText(MyWidget * mPtr, char *text)
{
CHECK_CLASS(mPtr, myWidgetClass);
if (mPtr->text)
wfree(mPtr->text);
mPtr->text = wstrdup(text);
if (W_VIEW_MAPPED(mPtr->view)) {
paintMyWidget(mPtr);
}
}
static void destroyMyWidget(_MyWidget * mPtr)
{
/*
* Free all data we allocated for our widget.
*/
if (mPtr->text)
wfree(mPtr->text);
wfree(mPtr);
}

View File

@@ -0,0 +1,46 @@
#include <WINGs/WINGs.h>
#include <stdlib.h>
#include "mywidget.h"
void wAbort()
{
exit(1);
}
int main(int argc, char **argv)
{
Display *dpy = XOpenDisplay("");
WMScreen *scr;
WMWindow *win;
MyWidget *thing;
WMInitializeApplication("Test", &argc, argv);
if (!dpy) {
wfatal("could not open display");
exit(1);
}
scr = WMCreateSimpleApplicationScreen(dpy);
/* init our widget */
InitMyWidget(scr);
win = WMCreateWindow(scr, "test");
WMResizeWidget(win, 150, 50);
thing = CreateMyWidget(win);
SetMyWidgetText(thing, "The Test");
WMResizeWidget(thing, 100, 20);
WMMoveWidget(thing, 10, 10);
WMRealizeWidget(win);
WMMapSubwidgets(win);
WMMapWidget(win);
WMScreenMainLoop(scr);
return 0;
}

57
WINGs/Tests/upbtn.xpm Normal file
View File

@@ -0,0 +1,57 @@
/* XPM */
static char * upbtn_xpm[] = {
"20 22 32 1",
" c None",
". c #000000",
"+ c #FFFFFF",
"@ c #4A485A",
"# c #524052",
"$ c #4A595A",
"% c #5A596A",
"& c #4A486A",
"* c #5A595A",
"= c #52556A",
"- c #52406A",
"; c #6A556A",
"> c #5A6D6A",
", c #5A597B",
"' c #5A6D7B",
") c #6A557B",
"! c #6A6D7B",
"~ c #6A697B",
"{ c #6A698B",
"] c #7B797B",
"^ c #C5C2C5",
"/ c #6A818B",
"( c #6A7D7B",
"_ c #7B698B",
": c #6A798B",
"< c #7B799C",
"[ c #7B798B",
"} c #7B8D94",
"| c #7B81A4",
"1 c #8B85A4",
"2 c #73899C",
"3 c #7B89A4",
" ",
" .+ ",
" .@#+ ",
" .$%$&+ ",
" .*=*-*-+ ",
" .%%%%%%$%+ ",
" .%=%;%=*=*-+ ",
" .>%>,''>,>%=%+ ",
" .%)>)!~>)>)>=*#+ ",
" .>~'~'{'{'~',>%$@+ ",
" ]+++^{!{!~!)>+++++ ",
" ./{/{({'~+ ",
" ._:_:_!~>+ ",
" ./</</{'~+ ",
" .<<<[_({!+ ",
" .}|}</{(~+ ",
" .12<[_:{'+ ",
" .31}</{'~+ ",
" .12<[_!~>+ ",
" .2</</{''+ ",
" ]+++++++++ ",
" "};

37
WINGs/Tests/wm.html Normal file
View File

@@ -0,0 +1,37 @@
<HTML><font size=-1>
<center>
<Img src=wm.png></b><p>
<b>GNU Window Maker</B><br>
<i>X11 Window Manager</i><p>
<u>http://windowmaker.info<br>
ftp.windowmaker.info</u></font><Br>
</center>
<b><i>Window Maker</b>
<Img src=upbtn.xpm></i>is the GNU window manager
for the X Window System. It was
designed to emulate the look and feel of part of the NEXTSTEP(tm) GUI. Its
supposed to be relatively fast and small, feature rich, easy to configure and
easy to use, with a simple and elegant appearance borrowed from NEXTSTEP(tm).
<p>
<b>Window Maker</b> was designed keeping integration with GNUstep in
mind and is the
"official" window manager for it. It is also part of the GNU project
(<u>www.gnu.org</u>)
<p>
<b>What is <i>GNUstep?</i></b><p>
<i><b>G</i>NU</b>step is a complete object-oriented development system, based on the
OpenStep specification released by NeXT(tm) (now Apple(tm)) and Sun(tm). It will provide everything one needs to produce cross-platform, object-oriented, graphical (and non-graphical) applications; providing among other things, base system libraries, a high-level GUI application framework that uses a Display PostScript(tm)-like imaging model (DGS), objects for accessing relational databases, distributed objects and a graphical development environment, with tools like interface modeller, a project management system
(project center) and other tools.
<p>
The GNUstep development system will be used to create a user environment,
with everything needed for a complete graphical user interface, such as a
file viewer, text editors and other applications. Note that the user
environment (or "desktop environment") is only a small part of the whole
GNUstep project and therefore it does not "compete" with other projects like
KDE or GNOME, simply because they are completely different things.
<p>
For more information on the GNUstep project, visit:
<u>http://www.gnustep.org</u> and <u>http://gnustep.current.nu</u>
</HTML>

BIN
WINGs/Tests/wm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

112
WINGs/Tests/wmfile.c Normal file
View File

@@ -0,0 +1,112 @@
/*
* Author: Len Trigg <trigg@cs.waikato.ac.nz>
*/
/*
Update: Franck Wolff <frawolff@club-internet.fr>
-----------------------------------------------------------------------
List of updated functions :
- main :
add -s option for a save panel...
-----------------------------------------------------------------------
*/
#include <WINGs/WINGs.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include "logo.xpm"
void wAbort()
{
exit(1);
}
char *ProgName;
void usage(void)
{
fprintf(stderr,
"usage:\n"
"\t%s [-options]\n"
"\n"
"options:\n"
" -s\t\tSave panel (default open panel)\n"
" -i <str>\tInitial directory (default /)\n"
" -t <str>\tQuery window title (default none)\n"
"\n"
"information:\n"
"\t%s pops up a WindowMaker style file selection panel.\n"
"\n" "version:\n" "\t%s\n", ProgName, ProgName, __DATE__);
exit(0);
}
#define OPEN_PANEL_TYPE 0
#define SAVE_PANEL_TYPE 1
int main(int argc, char **argv)
{
Display *dpy = XOpenDisplay("");
WMScreen *scr;
WMPixmap *pixmap;
WMOpenPanel *oPanel;
WMSavePanel *sPanel;
/* RImage *image; */
char *title = NULL;
char *initial = "/";
int ch;
int panelType = OPEN_PANEL_TYPE;
extern char *optarg;
extern int optind;
if (!dpy) {
puts("could not open display");
exit(1);
}
WMInitializeApplication("WMFile", &argc, argv);
ProgName = argv[0];
while ((ch = getopt(argc, argv, "si:ht:")) != -1)
switch (ch) {
case 's':
panelType = SAVE_PANEL_TYPE;
break;
case 'i':
initial = optarg;
break;
case 't':
title = optarg;
break;
default:
usage();
}
for (; optind < argc; optind++)
usage();
scr = WMCreateSimpleApplicationScreen(dpy);
pixmap = WMCreatePixmapFromXPMData(scr, GNUSTEP_XPM);
WMSetApplicationIconPixmap(scr, pixmap);
WMReleasePixmap(pixmap);
if (panelType == SAVE_PANEL_TYPE) {
sPanel = WMGetSavePanel(scr);
if (WMRunModalFilePanelForDirectory(sPanel, NULL, initial,
/*title */ NULL, NULL) == True)
printf("%s\n", WMGetFilePanelFileName(sPanel));
else
printf("\n");
} else {
oPanel = WMGetOpenPanel(scr);
if (WMRunModalFilePanelForDirectory(oPanel, NULL, initial,
/*title */ NULL, NULL) == True)
printf("%s\n", WMGetFilePanelFileName(oPanel));
else
printf("\n");
}
return 0;
}

90
WINGs/Tests/wmquery.c Normal file
View File

@@ -0,0 +1,90 @@
/*
* Author: Len Trigg <trigg@cs.waikato.ac.nz>
*/
#include <WINGs/WINGs.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include "logo.xpm"
void wAbort()
{
exit(1);
}
char *ProgName;
void usage(void)
{
fprintf(stderr,
"usage:\n"
"\t%s [-options]\n"
"\n"
"options:\n"
" -i <str>\tInitial entry contents (default none)\n"
" -p <str>\tPrompt message (default none)\n"
" -t <str>\tQuery window title (default none)\n"
"\n"
"information:\n"
"\t%s pops up a WindowMaker style input panel.\n"
"\n" "version:\n" "\t%s\n", ProgName, ProgName, __DATE__);
exit(0);
}
int main(int argc, char **argv)
{
Display *dpy = XOpenDisplay("");
WMScreen *scr;
WMPixmap *pixmap;
char *title = NULL;
char *prompt = NULL;
char *initial = NULL;
char *result = NULL;
int ch;
extern char *optarg;
extern int optind;
WMInitializeApplication("WMQuery", &argc, argv);
ProgName = argv[0];
if (!dpy) {
puts("could not open display");
exit(1);
}
while ((ch = getopt(argc, argv, "i:hp:t:")) != -1)
switch (ch) {
case 'i':
initial = optarg;
break;
case 'p':
prompt = optarg;
break;
case 't':
title = optarg;
break;
default:
usage();
}
for (; optind < argc; optind++)
usage();
scr = WMCreateSimpleApplicationScreen(dpy);
pixmap = WMCreatePixmapFromXPMData(scr, GNUSTEP_XPM);
WMSetApplicationIconPixmap(scr, pixmap);
WMReleasePixmap(pixmap);
if ((result = WMRunInputPanel(scr, NULL, title, prompt, initial, "OK", "Cancel")) != NULL)
printf("%s\n", result);
else
printf("\n");
return 0;
}

1002
WINGs/Tests/wtest.c Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

8
WINGs/WINGs/Makefile.am Normal file
View File

@@ -0,0 +1,8 @@
## automake input file for WINGs - Headers subdir
AUTOMAKE_OPTIONS =
# is this a kluge? if so, how should i do it?
includedir = @includedir@/WINGs
include_HEADERS = WINGs.h WUtil.h WINGsP.h proplist-compat.h

1838
WINGs/WINGs/WINGs.h Normal file

File diff suppressed because it is too large Load Diff

639
WINGs/WINGs/WINGsP.h Normal file
View File

@@ -0,0 +1,639 @@
#ifndef _WINGSP_H_
#define _WINGSP_H_
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <WINGs/WINGs.h>
#if WINGS_H_VERSION < 20041030
#error There_is_an_old_WINGs.h_file_somewhere_in_your_system._Please_remove_it.
#endif
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <stdio.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define DOUBLE_BUFFER 1
#define WC_UserWidget 128
#define SCROLLER_WIDTH 20
#define XDND_VERSION 3
typedef struct W_Application {
char *applicationName;
int argc;
char **argv;
char *resourcePath;
} W_Application;
typedef struct W_Font {
struct W_Screen *screen;
struct _XftFont *font;
short height;
short y;
short refCount;
char *name;
} W_Font;
typedef struct W_Pixmap {
struct W_Screen *screen;
Pixmap pixmap;
Pixmap mask;
unsigned short width;
unsigned short height;
short depth;
short refCount;
} W_Pixmap;
typedef struct W_Color {
struct W_Screen *screen;
XColor color;
unsigned short alpha;
short refCount;
GC gc;
struct {
unsigned int exact:1;
} flags;
} W_Color;
typedef struct W_FocusInfo {
struct W_View *toplevel;
struct W_View *focused; /* view that has the focus in this toplevel */
struct W_FocusInfo *next;
} W_FocusInfo;
typedef void* W_DndState(WMView *destView, XClientMessageEvent *event,
WMDraggingInfo *info);
typedef struct W_DragOperationItem {
WMDragOperationType type;
char* text;
} W_DragOperationItem;
typedef struct W_DragSourceInfo {
WMView *sourceView;
Window destinationWindow;
W_DndState *state;
WMSelectionProcs *selectionProcs;
Window icon;
WMPoint imageLocation;
WMPoint mouseOffset; /* mouse pos in icon */
Cursor dragCursor;
WMRect noPositionMessageZone;
Atom firstThreeTypes[3];
} W_DragSourceInfo;
typedef struct W_DragDestinationInfo {
WMView *destView;
WMView *xdndAwareView;
Window sourceWindow;
W_DndState *state;
Bool sourceActionChanged;
WMArray *sourceTypes;
WMArray *requiredTypes;
Bool typeListAvailable;
WMArray *dropDatas;
} W_DragDestinationInfo;
struct W_DraggingInfo {
unsigned char protocolVersion; /* version supported on the other side */
Time timestamp;
Atom sourceAction;
Atom destinationAction;
W_DragSourceInfo* sourceInfo; /* infos needed by source */
W_DragDestinationInfo* destInfo; /* infos needed by destination */
} W_DraggingInfo;
typedef struct W_Screen {
Display *display;
int screen;
int depth;
Colormap colormap;
Visual *visual;
Time lastEventTime;
Window rootWin;
struct W_View *rootView;
RContext *rcontext;
struct W_IMContext *imctx;
struct _XftDraw *xftdraw; /* shared XftDraw */
/* application related */
W_FocusInfo *focusInfo;
RImage *applicationIconImage; /* image (can have alpha channel) */
struct W_Pixmap *applicationIconPixmap; /* pixmap - no alpha channel */
Window applicationIconWindow;
struct W_Window *windowList; /* list of windows in the app */
Window groupLeader; /* the leader of the application */
/* also used for other things */
struct W_SelectionHandlers *selectionHandlerList;
struct {
unsigned int hasAppIcon:1;
unsigned int simpleApplication:1;
} aflags;
WMOpenPanel *sharedOpenPanel;
WMSavePanel *sharedSavePanel;
struct W_FontPanel *sharedFontPanel;
struct W_ColorPanel *sharedColorPanel;
Pixmap stipple;
struct W_View *dragSourceView;
struct W_DraggingInfo dragInfo;
/* colors */
W_Color *white;
W_Color *black;
W_Color *gray;
W_Color *darkGray;
GC stippleGC;
GC copyGC;
GC clipGC;
GC monoGC; /* GC for 1bpp visuals */
GC xorGC;
GC ixorGC; /* IncludeInferiors XOR */
GC drawStringGC; /* for WMDrawString() */
GC drawImStringGC; /* for WMDrawImageString() */
W_Font *normalFont;
W_Font *boldFont;
WMHashTable *fontCache;
Bool antialiasedText;
unsigned int ignoredModifierMask; /* modifiers to ignore when typing txt */
struct W_Balloon *balloon;
struct W_Pixmap *checkButtonImageOn;
struct W_Pixmap *checkButtonImageOff;
struct W_Pixmap *radioButtonImageOn;
struct W_Pixmap *radioButtonImageOff;
struct W_Pixmap *buttonArrow;
struct W_Pixmap *pushedButtonArrow;
struct W_Pixmap *scrollerDimple;
struct W_Pixmap *upArrow;
struct W_Pixmap *downArrow;
struct W_Pixmap *leftArrow;
struct W_Pixmap *rightArrow;
struct W_Pixmap *hiUpArrow;
struct W_Pixmap *hiDownArrow;
struct W_Pixmap *hiLeftArrow;
struct W_Pixmap *hiRightArrow;
struct W_Pixmap *pullDownIndicator;
struct W_Pixmap *popUpIndicator;
struct W_Pixmap *checkMark;
struct W_Pixmap *homeIcon;
struct W_Pixmap *altHomeIcon;
struct W_Pixmap *trashcanIcon;
struct W_Pixmap *altTrashcanIcon;
struct W_Pixmap *createDirIcon;
struct W_Pixmap *altCreateDirIcon;
struct W_Pixmap *disketteIcon;
struct W_Pixmap *altDisketteIcon;
struct W_Pixmap *unmountIcon;
struct W_Pixmap *altUnmountIcon;
struct W_Pixmap *magnifyIcon;
/*struct W_Pixmap *altMagnifyIcon;*/
struct W_Pixmap *wheelIcon;
struct W_Pixmap *grayIcon;
struct W_Pixmap *rgbIcon;
struct W_Pixmap *cmykIcon;
struct W_Pixmap *hsbIcon;
struct W_Pixmap *customPaletteIcon;
struct W_Pixmap *colorListIcon;
struct W_Pixmap *defaultObjectIcon;
Cursor defaultCursor;
Cursor textCursor;
Cursor invisibleCursor;
Atom attribsAtom; /* GNUstepWindowAttributes */
Atom deleteWindowAtom; /* WM_DELETE_WINDOW */
Atom protocolsAtom; /* _XA_WM_PROTOCOLS */
Atom clipboardAtom; /* CLIPBOARD */
Atom xdndAwareAtom; /* XdndAware */
Atom xdndSelectionAtom;
Atom xdndEnterAtom;
Atom xdndLeaveAtom;
Atom xdndPositionAtom;
Atom xdndDropAtom;
Atom xdndFinishedAtom;
Atom xdndTypeListAtom;
Atom xdndActionListAtom;
Atom xdndActionDescriptionAtom;
Atom xdndStatusAtom;
Atom xdndActionCopy;
Atom xdndActionMove;
Atom xdndActionLink;
Atom xdndActionAsk;
Atom xdndActionPrivate;
Atom wmIconDragOffsetAtom;
Atom wmStateAtom; /* WM_STATE */
Atom utf8String;
Atom netwmName;
Atom netwmIconName;
Atom netwmIcon;
/* stuff for detecting double-clicks */
Time lastClickTime; /* time of last mousedown event */
Window lastClickWindow; /* window of the last mousedown */
struct W_View *modalView;
unsigned modalLoop:1;
unsigned ignoreNextDoubleClick:1;
} W_Screen;
typedef struct W_ViewDelegate {
void *data;
void (*didMove)(struct W_ViewDelegate*, WMView*);
void (*didResize)(struct W_ViewDelegate*, WMView*);
void (*willMove)(struct W_ViewDelegate*, WMView*, int*, int*);
void (*willResize)(struct W_ViewDelegate*, WMView*,
unsigned int*, unsigned int*);
} W_ViewDelegate;
typedef struct W_View {
struct W_Screen *screen;
WMWidget *self; /* must point to the widget the view belongs to */
W_ViewDelegate *delegate;
Window window;
WMSize size;
short topOffs;
short leftOffs;
short bottomOffs;
short rightOffs;
WMPoint pos;
struct W_View *nextFocusChain; /* next/prev in focus chain */
struct W_View *prevFocusChain;
struct W_View *nextResponder; /* next to receive keyboard events */
struct W_View *parent; /* parent WMView */
struct W_View *childrenList; /* first in list of child windows */
struct W_View *nextSister; /* next on parent's children list */
WMArray *eventHandlers; /* event handlers for this window */
unsigned long attribFlags;
XSetWindowAttributes attribs;
void *hangedData; /* data holder for user program */
WMColor *backColor;
Cursor cursor;
Atom *droppableTypes;
struct W_DragSourceProcs *dragSourceProcs;
struct W_DragDestinationProcs *dragDestinationProcs;
WMPixmap *dragImage;
int helpContext;
XIC xic;
struct {
unsigned int realized:1;
unsigned int mapped:1;
unsigned int parentDying:1;
unsigned int dying:1; /* the view is being destroyed */
unsigned int topLevel:1; /* is a top level window */
unsigned int root:1; /* is the root window */
unsigned int mapWhenRealized:1; /* map the view when it's realized */
unsigned int alreadyDead:1; /* view was freed */
unsigned int dontCompressMotion:1; /* motion notify event compress */
unsigned int notifySizeChanged:1;
unsigned int dontCompressExpose:1; /* expose event compress */
/* toplevel only */
unsigned int worksWhenModal:1;
unsigned int pendingRelease1:1;
unsigned int pendingRelease2:1;
unsigned int pendingRelease3:1;
unsigned int pendingRelease4:1;
unsigned int pendingRelease5:1;
unsigned int xdndHintSet:1;
} flags;
int refCount;
} W_View;
typedef struct W_EventHandler {
unsigned long eventMask;
WMEventProc *proc;
void *clientData;
} W_EventHandler;
typedef struct _WINGsConfiguration {
char *systemFont;
char *boldSystemFont;
int defaultFontSize;
Bool antialiasedText;
char *floppyPath;
unsigned doubleClickDelay;
unsigned mouseWheelUp;
unsigned mouseWheelDown;
} _WINGsConfiguration;
extern _WINGsConfiguration WINGsConfiguration;
#define CHECK_CLASS(widget, class) assert(W_CLASS(widget)==(class))
#define W_CLASS(widget) (((W_WidgetType*)(widget))->widgetClass)
#define W_VIEW(widget) (((W_WidgetType*)(widget))->view)
#define W_VIEW_REALIZED(view) (view)->flags.realized
#define W_VIEW_MAPPED(view) (view)->flags.mapped
#define W_VIEW_DISPLAY(view) (view)->screen->display
#define W_VIEW_SCREEN(view) (view)->screen
#define W_VIEW_DRAWABLE(view) (view)->window
#define W_VIEW_WIDTH(view) (view)->size.width
#define W_VIEW_HEIGHT(view) (view)->size.height
#define W_PIXEL(c) (c)->color.pixel
#define W_FONTID(f) (f)->font->fid
#define W_DRAWABLE(scr) (scr)->rcontext->drawable
W_View *W_GetViewForXWindow(Display *display, Window window);
W_View *W_CreateView(W_View *parent);
W_View *W_CreateTopView(W_Screen *screen);
W_View *W_CreateUnmanagedTopView(W_Screen *screen);
W_View *W_CreateRootView(W_Screen *screen);
void W_DestroyView(W_View *view);
void W_RealizeView(W_View *view);
void W_ReparentView(W_View *view, W_View *newParent, int x, int y);
void W_RaiseView(W_View *view);
void W_LowerView(W_View *view);
void W_MapView(W_View *view);
void W_MapSubviews(W_View *view);
void W_UnmapSubviews(W_View *view);
W_View *W_TopLevelOfView(W_View *view);
void W_UnmapView(W_View *view);
void W_MoveView(W_View *view, int x, int y);
void W_ResizeView(W_View *view, unsigned int width, unsigned int height);
void W_SetViewBackgroundColor(W_View *view, WMColor *color);
void W_SetViewCursor(W_View *view, Cursor cursor);
void W_DrawRelief(W_Screen *scr, Drawable d, int x, int y, unsigned int width,
unsigned int height, WMReliefType relief);
void W_DrawReliefWithGC(W_Screen *scr, Drawable d, int x, int y,
unsigned int width, unsigned int height,
WMReliefType relief,
GC black, GC dark, GC light, GC white);
void W_CallDestroyHandlers(W_View *view);
void W_PaintTextAndImage(W_View *view, int wrap, WMColor *textColor,
W_Font *font, WMReliefType relief, char *text,
WMAlignment alignment, W_Pixmap *image,
WMImagePosition position, WMColor *backColor, int ofs);
void W_PaintText(W_View *view, Drawable d, WMFont *font, int x, int y,
int width, WMAlignment alignment, WMColor *color,
int wrap, char *text, int length);
int W_GetTextHeight(WMFont *font, char *text, int width, int wrap);
int W_TextWidth(WMFont *font, char *text, int length);
void W_BroadcastMessage(W_View *targetParent, XEvent *event);
void W_DispatchMessage(W_View *target, XEvent *event);
void W_SetFocusOfToplevel(W_View *toplevel, W_View *view);
W_View *W_FocusedViewOfToplevel(W_View *view);
void W_SetFocusOfTopLevel(W_View *toplevel, W_View *view);
void W_ReleaseView(WMView *view);
WMView *W_RetainView(WMView *view);
void W_InitApplication(WMScreen *scr);
void W_InitNotificationCenter(void);
W_Class W_RegisterUserWidget(void);
void W_RedisplayView(WMView *view);
Bool W_ApplicationInitialized(void);
void W_HandleSelectionEvent(XEvent *event);
void W_HandleDNDClientMessage(WMView *toplevel, XClientMessageEvent *event);
void W_FlushASAPNotificationQueue(void);
void W_FlushIdleNotificationQueue(void);
struct W_Balloon *W_CreateBalloon(WMScreen *scr);
void W_BalloonHandleEnterView(WMView *view);
void W_BalloonHandleLeaveView(WMView *view);
Bool W_CheckIdleHandlers(void);
void W_CheckTimerHandlers(void);
Bool W_HandleInputEvents(Bool waitForInput, int inputfd);
/* XDnD */
Atom W_OperationToAction(WMScreen *scr, WMDragOperationType operation);
WMDragOperationType W_ActionToOperation(WMScreen *scr, Atom action);
void W_FreeDragOperationItem(void* item);
Bool W_SendDnDClientMessage(Display *dpy, Window win, Atom message,
unsigned long data1, unsigned long data2,
unsigned long data3, unsigned long data4,
unsigned long data5);
void W_DragSourceStartTimer(WMDraggingInfo *info);
void W_DragSourceStopTimer(void);
void W_DragSourceStateHandler(WMDraggingInfo *info, XClientMessageEvent *event);
void W_DragDestinationStartTimer(WMDraggingInfo *info);
void W_DragDestinationStopTimer(void);
void W_DragDestinationStoreEnterMsgInfo(WMDraggingInfo *info, WMView *toplevel,
XClientMessageEvent *event);
void W_DragDestinationStorePositionMsgInfo(WMDraggingInfo *info,
WMView *toplevel,
XClientMessageEvent *event);
void W_DragDestinationCancelDropOnEnter(WMView *toplevel, WMDraggingInfo *info);
void W_DragDestinationStateHandler(WMDraggingInfo *info,
XClientMessageEvent *event);
void W_DragDestinationInfoClear(WMDraggingInfo *info);
void W_FreeViewXdndPart(WMView *view);
/* XIM */
void W_InitIM(WMScreen *scr);
void W_CreateIC(WMView *view);
void W_DestroyIC(WMView *view);
void W_FocusIC(WMView *view);
void W_UnFocusIC(WMView *view);
void W_SetPreeditPositon(W_View *view, int x, int y);
int W_LookupString(W_View *view, XKeyPressedEvent *event, char *buffer,
int buflen, KeySym *keysym, Status *status);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* _WINGSP_H_ */

881
WINGs/WINGs/WUtil.h Normal file
View File

@@ -0,0 +1,881 @@
#ifndef _WUTIL_H_
#define _WUTIL_H_
#include <X11/Xlib.h>
#include <limits.h>
#include <sys/types.h>
/* SunOS 4.x Blargh.... */
#ifndef NULL
#define NULL ((void*)0)
#endif
#ifndef WMAX
# define WMAX(a,b) ((a)>(b) ? (a) : (b))
#endif
#ifndef WMIN
# define WMIN(a,b) ((a)<(b) ? (a) : (b))
#endif
#ifndef __ASSERT_FUNCTION
# if (!defined (__GNUC__) || (__GNUC__ < 2 && \
__GNUC_MINOR__ < (defined (__cplusplus) ? 6 : 4)))
# define __ASSERT_FUNCTION ((char *) 0)
# else
# define __ASSERT_FUNCTION __PRETTY_FUNCTION__
# endif
#endif
#ifndef __GNUC__
#define __attribute__(x) /*NOTHING*/
#endif
#ifdef NDEBUG
#define wassertr(expr) {}
#define wassertrv(expr, val) {}
#else /* !NDEBUG */
#ifdef DEBUG
#include <assert.h>
#define wassertr(expr) assert(expr)
#define wassertrv(expr, val) assert(expr)
#else /* !DEBUG */
#define wassertr(expr) \
if (!(expr)) { \
wwarning("%s line %i (%s): assertion %s failed",\
__FILE__, __LINE__, __ASSERT_FUNCTION, #expr);\
return;\
}
#define wassertrv(expr, val) \
if (!(expr)) { \
wwarning("%s line %i (%s): assertion %s failed",\
__FILE__, __LINE__, __ASSERT_FUNCTION, #expr);\
return (val);\
}
#endif /* !DEBUG */
#endif /* !NDEBUG */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
typedef enum {
WMPostWhenIdle = 1,
WMPostASAP = 2,
WMPostNow = 3
} WMPostingStyle;
typedef enum {
WNCNone = 0,
WNCOnName = 1,
WNCOnSender = 2
} WMNotificationCoalescing;
enum {
WBNotFound = INT_MIN, /* element was not found in WMBag */
WANotFound = -1 /* element was not found in WMArray */
};
typedef struct W_Array WMArray;
typedef struct W_Bag WMBag;
typedef struct W_Data WMData;
typedef struct W_TreeNode WMTreeNode;
typedef struct W_HashTable WMHashTable;
typedef struct W_UserDefaults WMUserDefaults;
typedef struct W_Notification WMNotification;
typedef struct W_NotificationQueue WMNotificationQueue;
typedef struct W_Host WMHost;
typedef struct W_Connection WMConnection;
typedef struct W_PropList WMPropList;
/* Some typedefs for the handler stuff */
typedef void *WMHandlerID;
typedef void WMCallback(void *data);
typedef void WMInputProc(int fd, int mask, void *clientData);
typedef int WMCompareDataProc(const void *item1, const void *item2);
typedef void WMTreeWalkProc(WMTreeNode *aNode, void *data);
typedef void WMFreeDataProc(void *data);
/* Used by WMBag or WMArray for matching data */
typedef int WMMatchDataProc(const void *item, const void *cdata);
typedef struct {
int position;
int count;
} WMRange;
/* DO NOT ACCESS THE CONTENTS OF THIS STRUCT */
typedef struct {
void *table;
void *nextItem;
int index;
} WMHashEnumerator;
typedef struct {
/* NULL is pointer hash */
unsigned (*hash)(const void *);
/* NULL is pointer compare */
Bool (*keyIsEqual)(const void *, const void *);
/* NULL does nothing */
void* (*retainKey)(const void *);
/* NULL does nothing */
void (*releaseKey)(const void *);
} WMHashTableCallbacks;
typedef int WMArrayIterator;
typedef void *WMBagIterator;
typedef void WMNotificationObserverAction(void *observerData,
WMNotification *notification);
/* ---[ WINGs/memory.c ]-------------------------------------------------- */
void* wmalloc(size_t size);
void* wrealloc(void *ptr, size_t newsize);
void wfree(void *ptr);
void wrelease(void *ptr);
void* wretain(void *ptr);
typedef void waborthandler(int);
waborthandler* wsetabort(waborthandler* handler);
/* ---[ WINGs/error.c ]--------------------------------------------------- */
enum {
WMESSAGE_TYPE_MESSAGE,
WMESSAGE_TYPE_WARNING,
WMESSAGE_TYPE_ERROR,
WMESSAGE_TYPE_FATAL
};
#define wmessage(fmt, args...) __wmessage( __func__, __FILE__, __LINE__, WMESSAGE_TYPE_MESSAGE, fmt, ## args)
#define wwarning(fmt, args...) __wmessage( __func__, __FILE__, __LINE__, WMESSAGE_TYPE_WARNING, fmt, ## args)
#define werror(fmt, args...) __wmessage( __func__, __FILE__, __LINE__, WMESSAGE_TYPE_ERROR, fmt, ## args)
#define wfatal(fmt, args...) __wmessage( __func__, __FILE__, __LINE__, WMESSAGE_TYPE_FATAL, fmt, ## args)
void __wmessage(const char *func, const char *file, int line, int type, const char *msg, ...)
__attribute__((__format__(printf,5,6)));
/* ---[ WINGs/findfile.c ]------------------------------------------------ */
char* wfindfile(char *paths, char *file);
char* wfindfileinlist(char **path_list, char *file);
char* wfindfileinarray(WMPropList* array, char *file);
char* wexpandpath(char *path);
/* don't free the returned string */
char* wgethomedir(void);
/* ---[ WINGs/proplist.c ]------------------------------------------------ */
int wmkdirhier(const char *path);
int wrmdirhier(const char *path);
/* ---[ WINGs/string.c ]-------------------------------------------------- */
char *wstrdup(const char *str);
char* wstrndup(const char *str, size_t len);
/* Concatenate str1 with str2 and return that in a newly malloc'ed string.
* str1 and str2 can be any strings including static and constant strings.
* str1 and str2 will not be modified.
* Free the returned string when you're done with it. */
char* wstrconcat(char *str1, char *str2);
/* This will append src to dst, and return dst. dst MUST be either NULL
* or a string that was a result of a dynamic allocation (malloc, realloc
* wmalloc, wrealloc, ...). dst CANNOT be a static or a constant string!
* Modifies dst (no new string is created except if dst==NULL in which case
* it is equivalent to calling wstrdup(src) ).
* The returned address may be different from the original address of dst,
* so always assign the returned address to avoid dangling pointers. */
char* wstrappend(char *dst, char *src);
size_t wstrlcpy(char *, const char *, size_t);
size_t wstrlcat(char *, const char *, size_t);
void wtokensplit(char *command, char ***argv, int *argc);
char* wtokennext(char *word, char **next);
char* wtokenjoin(char **list, int count);
void wtokenfree(char **tokens, int count);
char* wtrimspace(const char *s);
/* transform `s' so that the result is safe to pass to the shell as an argument.
* returns a newly allocated string.
* with very heavy inspirations from NetBSD's shquote(3).
*/
char *wshellquote(const char *s);
/* ---[ WINGs/wmisc.c ]--------------------------------------------------- */
WMRange wmkrange(int start, int count);
/* ---[ WINGs/usleep.c ]-------------------------------------------------- */
void wusleep(unsigned int usec);
/* ---[ WINGs/handlers.c ]------------------------------------------------ */
/* Event handlers: timer, idle, input */
WMHandlerID WMAddTimerHandler(int milliseconds, WMCallback *callback,
void *cdata);
WMHandlerID WMAddPersistentTimerHandler(int milliseconds, WMCallback *callback,
void *cdata);
void WMDeleteTimerWithClientData(void *cdata);
void WMDeleteTimerHandler(WMHandlerID handlerID);
WMHandlerID WMAddIdleHandler(WMCallback *callback, void *cdata);
void WMDeleteIdleHandler(WMHandlerID handlerID);
WMHandlerID WMAddInputHandler(int fd, int condition, WMInputProc *proc,
void *clientData);
void WMDeleteInputHandler(WMHandlerID handlerID);
/* This function is used _only_ if you create a non-GUI program.
* For GUI based programs use WMNextEvent()/WMHandleEvent() instead.
* This function will handle all input/timer/idle events, then return.
*/
void WHandleEvents(void);
/* ---[ WINGs/hashtable.c ]----------------------------------------------- */
WMHashTable* WMCreateHashTable(WMHashTableCallbacks callbacks);
void WMFreeHashTable(WMHashTable *table);
void WMResetHashTable(WMHashTable *table);
unsigned WMCountHashTable(WMHashTable *table);
void* WMHashGet(WMHashTable *table, const void *key);
/* Returns True if there is a value associated with <key> in the table, in
* which case <retKey> and <retItem> will contain the item's internal key
* address and the item's value respectively.
* If there is no value associated with <key> it will return False and in
* this case <retKey> and <retItem> will be undefined.
* Use this when you need to perform your own custom retain/release mechanism
* which requires access to the keys too.
*/
Bool WMHashGetItemAndKey(WMHashTable *table, const void *key,
void **retItem, void **retKey);
/* put data in table, replacing already existing data and returning
* the old value */
void* WMHashInsert(WMHashTable *table, const void *key, const void *data);
void WMHashRemove(WMHashTable *table, const void *key);
/* warning: do not manipulate the table while using the enumerator functions */
WMHashEnumerator WMEnumerateHashTable(WMHashTable *table);
void* WMNextHashEnumeratorItem(WMHashEnumerator *enumerator);
void* WMNextHashEnumeratorKey(WMHashEnumerator *enumerator);
/* Returns True if there is a next element, in which case key and item
* will contain the next element's key and value respectively.
* If there is no next element available it will return False and in this
* case key and item will be undefined.
*/
Bool WMNextHashEnumeratorItemAndKey(WMHashEnumerator *enumerator,
void **item, void **key);
/* some predefined callback sets */
extern const WMHashTableCallbacks WMIntHashCallbacks;
/* sizeof(keys) are <= sizeof(void*) */
extern const WMHashTableCallbacks WMStringHashCallbacks;
/* keys are strings. Strings will be copied with wstrdup()
* and freed with wfree() */
extern const WMHashTableCallbacks WMStringPointerHashCallbacks;
/* keys are strings, but they are not copied */
/* ---[ WINGs/array.c ]--------------------------------------------------- */
/*
* WMArray use an array to store the elements.
* Item indexes may be only positive integer numbers.
* The array cannot contain holes in it.
*
* Pros:
* Fast [O(1)] access to elements
* Fast [O(1)] push/pop
*
* Cons:
* A little slower [O(n)] for insertion/deletion of elements that
* aren't in the end
*/
WMArray* WMCreateArray(int initialSize);
WMArray* WMCreateArrayWithDestructor(int initialSize, WMFreeDataProc *destructor);
WMArray* WMCreateArrayWithArray(WMArray *array);
#define WMDuplicateArray(array) WMCreateArrayWithArray(array)
void WMEmptyArray(WMArray *array);
void WMFreeArray(WMArray *array);
int WMGetArrayItemCount(WMArray *array);
/* appends other to array. other remains unchanged */
void WMAppendArray(WMArray *array, WMArray *other);
/* add will place the element at the end of the array */
void WMAddToArray(WMArray *array, void *item);
/* insert will increment the index of elements after it by 1 */
void WMInsertInArray(WMArray *array, int index, void *item);
/* replace and set will return the old item WITHOUT calling the
* destructor on it even if its available. Free the returned item yourself.
*/
void* WMReplaceInArray(WMArray *array, int index, void *item);
#define WMSetInArray(array, index, item) WMReplaceInArray(array, index, item)
/* delete and remove will remove the elements and cause the elements
* after them to decrement their indexes by 1. Also will call the
* destructor on the deleted element if there's one available.
*/
int WMDeleteFromArray(WMArray *array, int index);
#define WMRemoveFromArray(array, item) WMRemoveFromArrayMatching(array, NULL, item)
int WMRemoveFromArrayMatching(WMArray *array, WMMatchDataProc *match, void *cdata);
void* WMGetFromArray(WMArray *array, int index);
#define WMGetFirstInArray(array, item) WMFindInArray(array, NULL, item)
/* pop will return the last element from the array, also removing it
* from the array. The destructor is NOT called, even if available.
* Free the returned element if needed by yourself
*/
void* WMPopFromArray(WMArray *array);
int WMFindInArray(WMArray *array, WMMatchDataProc *match, void *cdata);
int WMCountInArray(WMArray *array, void *item);
/* comparer must return:
* < 0 if a < b
* > 0 if a > b
* = 0 if a = b
*/
void WMSortArray(WMArray *array, WMCompareDataProc *comparer);
void WMMapArray(WMArray *array, void (*function)(void*, void*), void *data);
WMArray* WMGetSubarrayWithRange(WMArray* array, WMRange aRange);
void* WMArrayFirst(WMArray *array, WMArrayIterator *iter);
void* WMArrayLast(WMArray *array, WMArrayIterator *iter);
/* The following 2 functions assume that the array doesn't change between calls */
void* WMArrayNext(WMArray *array, WMArrayIterator *iter);
void* WMArrayPrevious(WMArray *array, WMArrayIterator *iter);
/* The following 2 macros assume that the array doesn't change in the for loop */
#define WM_ITERATE_ARRAY(array, var, i) \
for (var = WMArrayFirst(array, &(i)); (i) != WANotFound; \
var = WMArrayNext(array, &(i)))
#define WM_ETARETI_ARRAY(array, var, i) \
for (var = WMArrayLast(array, &(i)); (i) != WANotFound; \
var = WMArrayPrevious(array, &(i)))
/* ---[ WINGs/bagtree.c ]------------------------------------------------- */
/*
* Tree bags use a red-black tree for storage.
* Item indexes may be any integer number.
*
* Pros:
* O(lg n) insertion/deletion/search
* Good for large numbers of elements with sparse indexes
*
* Cons:
* O(lg n) insertion/deletion/search
* Slow for storing small numbers of elements
*/
#define WMCreateBag(size) WMCreateTreeBag()
#define WMCreateBagWithDestructor(size, d) WMCreateTreeBagWithDestructor(d)
WMBag* WMCreateTreeBag(void);
WMBag* WMCreateTreeBagWithDestructor(WMFreeDataProc *destructor);
int WMGetBagItemCount(WMBag *bag);
void WMAppendBag(WMBag *bag, WMBag *other);
void WMPutInBag(WMBag *bag, void *item);
/* insert will increment the index of elements after it by 1 */
void WMInsertInBag(WMBag *bag, int index, void *item);
/* erase will remove the element from the bag,
* but will keep the index of the other elements unchanged */
int WMEraseFromBag(WMBag *bag, int index);
/* delete and remove will remove the elements and cause the elements
* after them to decrement their indexes by 1 */
int WMDeleteFromBag(WMBag *bag, int index);
int WMRemoveFromBag(WMBag *bag, void *item);
void* WMGetFromBag(WMBag *bag, int index);
void* WMReplaceInBag(WMBag *bag, int index, void *item);
#define WMSetInBag(bag, index, item) WMReplaceInBag(bag, index, item)
/* comparer must return:
* < 0 if a < b
* > 0 if a > b
* = 0 if a = b
*/
void WMSortBag(WMBag *bag, WMCompareDataProc *comparer);
void WMEmptyBag(WMBag *bag);
void WMFreeBag(WMBag *bag);
void WMMapBag(WMBag *bag, void (*function)(void*, void*), void *data);
int WMGetFirstInBag(WMBag *bag, void *item);
int WMCountInBag(WMBag *bag, void *item);
int WMFindInBag(WMBag *bag, WMMatchDataProc *match, void *cdata);
void* WMBagFirst(WMBag *bag, WMBagIterator *ptr);
void* WMBagLast(WMBag *bag, WMBagIterator *ptr);
/* The following 4 functions assume that the bag doesn't change between calls */
void* WMBagNext(WMBag *bag, WMBagIterator *ptr);
void* WMBagPrevious(WMBag *bag, WMBagIterator *ptr);
void* WMBagIteratorAtIndex(WMBag *bag, int index, WMBagIterator *ptr);
int WMBagIndexForIterator(WMBag *bag, WMBagIterator ptr);
/* The following 2 macros assume that the bag doesn't change in the for loop */
#define WM_ITERATE_BAG(bag, var, i) \
for (var = WMBagFirst(bag, &(i)); (i) != NULL; \
var = WMBagNext(bag, &(i)))
#define WM_ETARETI_BAG(bag, var, i) \
for (var = WMBagLast(bag, &(i)); (i) != NULL; \
var = WMBagPrevious(bag, &(i)))
/* ---[ WINGs/data.c ]---------------------------------------------------- */
/* WMData handling */
/* Creating/destroying data */
WMData* WMCreateDataWithCapacity(unsigned capacity);
WMData* WMCreateDataWithLength(unsigned length);
WMData* WMCreateDataWithBytes(void *bytes, unsigned length);
/* destructor is a function called to free the data when releasing the data
* object, or NULL if no freeing of data is necesary. */
WMData* WMCreateDataWithBytesNoCopy(void *bytes, unsigned length,
WMFreeDataProc *destructor);
WMData* WMCreateDataWithData(WMData *aData);
WMData* WMRetainData(WMData *aData);
void WMReleaseData(WMData *aData);
/* Adjusting capacity */
void WMSetDataCapacity(WMData *aData, unsigned capacity);
void WMSetDataLength(WMData *aData, unsigned length);
void WMIncreaseDataLengthBy(WMData *aData, unsigned extraLength);
/* Accessing data */
const void* WMDataBytes(WMData *aData);
void WMGetDataBytes(WMData *aData, void *buffer);
void WMGetDataBytesWithLength(WMData *aData, void *buffer, unsigned length);
void WMGetDataBytesWithRange(WMData *aData, void *buffer, WMRange aRange);
WMData* WMGetSubdataWithRange(WMData *aData, WMRange aRange);
/* Testing data */
Bool WMIsDataEqualToData(WMData *aData, WMData *anotherData);
unsigned WMGetDataLength(WMData *aData);
/* Adding data */
void WMAppendDataBytes(WMData *aData, void *bytes, unsigned length);
void WMAppendData(WMData *aData, WMData *anotherData);
/* Modifying data */
void WMReplaceDataBytesInRange(WMData *aData, WMRange aRange, void *bytes);
void WMResetDataBytesInRange(WMData *aData, WMRange aRange);
void WMSetData(WMData *aData, WMData *anotherData);
void WMSetDataFormat(WMData *aData, unsigned format);
unsigned WMGetDataFormat(WMData *aData);
/* Storing data */
/* ---[ WINGs/tree.c ]---------------------------------------------------- */
/* Generic Tree and TreeNode */
WMTreeNode* WMCreateTreeNode(void *data);
WMTreeNode* WMCreateTreeNodeWithDestructor(void *data, WMFreeDataProc *destructor);
WMTreeNode* WMInsertItemInTree(WMTreeNode *parent, int index, void *item);
#define WMAddItemToTree(parent, item) WMInsertItemInTree(parent, -1, item)
WMTreeNode* WMInsertNodeInTree(WMTreeNode *parent, int index, WMTreeNode *aNode);
#define WMAddNodeToTree(parent, aNode) WMInsertNodeInTree(parent, -1, aNode)
void WMDestroyTreeNode(WMTreeNode *aNode);
void WMDeleteLeafForTreeNode(WMTreeNode *aNode, int index);
void WMRemoveLeafForTreeNode(WMTreeNode *aNode, void *leaf);
void* WMReplaceDataForTreeNode(WMTreeNode *aNode, void *newData);
void* WMGetDataForTreeNode(WMTreeNode *aNode);
int WMGetTreeNodeDepth(WMTreeNode *aNode);
WMTreeNode* WMGetParentForTreeNode(WMTreeNode *aNode);
/* Sort only the leaves of the passed node */
void WMSortLeavesForTreeNode(WMTreeNode *aNode, WMCompareDataProc *comparer);
/* Sort all tree recursively starting from the passed node */
void WMSortTree(WMTreeNode *aNode, WMCompareDataProc *comparer);
/* Returns the first node which matches node's data with cdata by 'match' */
WMTreeNode* WMFindInTree(WMTreeNode *aTree, WMMatchDataProc *match, void *cdata);
/* Returns the first node where node's data matches cdata by 'match' and node is
* at most `limit' depths down from `aTree'. */
WMTreeNode *WMFindInTreeWithDepthLimit(WMTreeNode * aTree, WMMatchDataProc * match, void *cdata, int limit);
/* Returns first tree node that has data == cdata */
#define WMGetFirstInTree(aTree, cdata) WMFindInTree(aTree, NULL, cdata)
/* Walk every node of aNode with `walk' */
void WMTreeWalk(WMTreeNode *aNode, WMTreeWalkProc * walk, void *data, Bool DepthFirst);
/* ---[ WINGs/data.c ]---------------------------------------------------- */
WMNotification* WMCreateNotification(const char *name, void *object, void *clientData);
void WMReleaseNotification(WMNotification *notification);
WMNotification* WMRetainNotification(WMNotification *notification);
void* WMGetNotificationClientData(WMNotification *notification);
void* WMGetNotificationObject(WMNotification *notification);
const char* WMGetNotificationName(WMNotification *notification);
void WMAddNotificationObserver(WMNotificationObserverAction *observerAction,
void *observer, const char *name, void *object);
void WMPostNotification(WMNotification *notification);
void WMRemoveNotificationObserver(void *observer);
void WMRemoveNotificationObserverWithName(void *observer, const char *name,
void *object);
void WMPostNotificationName(const char *name, void *object, void *clientData);
WMNotificationQueue* WMGetDefaultNotificationQueue(void);
WMNotificationQueue* WMCreateNotificationQueue(void);
void WMDequeueNotificationMatching(WMNotificationQueue *queue,
WMNotification *notification,
unsigned mask);
void WMEnqueueNotification(WMNotificationQueue *queue,
WMNotification *notification,
WMPostingStyle postingStyle);
void WMEnqueueCoalesceNotification(WMNotificationQueue *queue,
WMNotification *notification,
WMPostingStyle postingStyle,
unsigned coalesceMask);
/* ---[ WINGs/proplist.c ]------------------------------------------------ */
/* Property Lists handling */
void WMPLSetCaseSensitive(Bool caseSensitive);
WMPropList* WMCreatePLString(char *str);
WMPropList* WMCreatePLData(WMData *data);
WMPropList* WMCreatePLDataWithBytes(unsigned char *bytes, unsigned int length);
WMPropList* WMCreatePLDataWithBytesNoCopy(unsigned char *bytes,
unsigned int length,
WMFreeDataProc *destructor);
WMPropList* WMCreatePLArray(WMPropList *elem, ...);
WMPropList* WMCreatePLDictionary(WMPropList *key, WMPropList *value, ...);
WMPropList* WMRetainPropList(WMPropList *plist);
void WMReleasePropList(WMPropList *plist);
/* Objects inserted in arrays and dictionaries will be retained,
* so you can safely release them after insertion.
* For dictionaries both the key and value are retained.
* Objects removed from arrays or dictionaries are released */
void WMInsertInPLArray(WMPropList *plist, int index, WMPropList *item);
void WMAddToPLArray(WMPropList *plist, WMPropList *item);
void WMDeleteFromPLArray(WMPropList *plist, int index);
void WMRemoveFromPLArray(WMPropList *plist, WMPropList *item);
void WMPutInPLDictionary(WMPropList *plist, WMPropList *key, WMPropList *value);
void WMRemoveFromPLDictionary(WMPropList *plist, WMPropList *key);
/* It will insert all key/value pairs from source into dest, overwriting
* the values with the same keys from dest, keeping all values with keys
* only present in dest unchanged */
WMPropList* WMMergePLDictionaries(WMPropList *dest, WMPropList *source,
Bool recursive);
/* It will remove all key/value pairs from dest for which there is an
* identical key/value present in source. Entires only present in dest, or
* which have different values in dest than in source will be preserved. */
WMPropList* WMSubtractPLDictionaries(WMPropList *dest, WMPropList *source,
Bool recursive);
int WMGetPropListItemCount(WMPropList *plist);
Bool WMIsPLString(WMPropList *plist);
Bool WMIsPLData(WMPropList *plist);
Bool WMIsPLArray(WMPropList *plist);
Bool WMIsPLDictionary(WMPropList *plist);
Bool WMIsPropListEqualTo(WMPropList *plist, WMPropList *other);
/* Returns a reference. Do not free it! */
char* WMGetFromPLString(WMPropList *plist);
/* Returns a reference. Do not free it! */
WMData* WMGetFromPLData(WMPropList *plist);
/* Returns a reference. Do not free it! */
const unsigned char* WMGetPLDataBytes(WMPropList *plist);
int WMGetPLDataLength(WMPropList *plist);
/* Returns a reference. */
WMPropList* WMGetFromPLArray(WMPropList *plist, int index);
/* Returns a reference. */
WMPropList* WMGetFromPLDictionary(WMPropList *plist, WMPropList *key);
/* Returns a PropList array with all the dictionary keys. Release it when
* you're done. Keys in array are retained from the original dictionary
* not copied and need NOT to be released individually. */
WMPropList* WMGetPLDictionaryKeys(WMPropList *plist);
/* Creates only the first level deep object. All the elements inside are
* retained from the original */
WMPropList* WMShallowCopyPropList(WMPropList *plist);
/* Makes a completely separate replica of the original proplist */
WMPropList* WMDeepCopyPropList(WMPropList *plist);
WMPropList* WMCreatePropListFromDescription(char *desc);
/* Free the returned string when you no longer need it */
char* WMGetPropListDescription(WMPropList *plist, Bool indented);
WMPropList* WMReadPropListFromFile(char *file);
Bool WMWritePropListToFile(WMPropList *plist, char *path);
/* ---[ WINGs/userdefaults.c ]-------------------------------------------- */
char* wusergnusteppath(void);
char* wdefaultspathfordomain(char *domain);
char* wglobaldefaultspathfordomain(const char *domain);
WMUserDefaults* WMGetStandardUserDefaults(void);
WMUserDefaults* WMGetDefaultsFromPath(char *path);
void WMSynchronizeUserDefaults(WMUserDefaults *database);
void WMSaveUserDefaults(WMUserDefaults *database);
void WMEnableUDPeriodicSynchronization(WMUserDefaults *database, Bool enable);
/* Returns a WMPropList array with all the keys in the user defaults database.
* Free the array with WMReleasePropList() when no longer needed.
* Keys in array are just retained references to the original keys */
WMPropList* WMGetUDKeys(WMUserDefaults *database);
WMPropList* WMGetUDObjectForKey(WMUserDefaults *database, char *defaultName);
void WMSetUDObjectForKey(WMUserDefaults *database, WMPropList *object,
char *defaultName);
void WMRemoveUDObjectForKey(WMUserDefaults *database, char *defaultName);
char* WMGetUDStringForKey(WMUserDefaults *database, char *defaultName);
int WMGetUDIntegerForKey(WMUserDefaults *database, char *defaultName);
float WMGetUDFloatForKey(WMUserDefaults *database, char *defaultName);
Bool WMGetUDBoolForKey(WMUserDefaults *database, char *defaultName);
void WMSetUDStringForKey(WMUserDefaults *database, char *value,
char *defaultName);
void WMSetUDIntegerForKey(WMUserDefaults *database, int value,
char *defaultName);
void WMSetUDFloatForKey(WMUserDefaults *database, float value,
char *defaultName);
void WMSetUDBoolForKey(WMUserDefaults *database, Bool value,
char *defaultName);
WMPropList* WMGetUDSearchList(WMUserDefaults *database);
void WMSetUDSearchList(WMUserDefaults *database, WMPropList *list);
extern char *WMUserDefaultsDidChangeNotification;
/*-------------------------------------------------------------------------*/
/* Global variables */
extern int WCErrorCode;
/*-------------------------------------------------------------------------*/
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif

View File

@@ -0,0 +1,138 @@
/*
* This header file is provided for old libPropList compatibility.
* DO _NOT_ USE this except for letting your old libPropList-based code to
* work with the new property list code from WINGs, with minimal changes.
*
* All code written with old libPropList functions should work, given
* that the following changes are made:
*
* 1. Replace all
* #include <proplist.h>
* with
* #include <WINGs/proplist-compat.h>
* in your code.
*
* 2. Change all calls to PLSave() to have the extra filename parameter like:
* PLSave(proplist_t proplist, char* filename, Bool atomically)
*
* 3. The PLSetStringCmpHook() function is no longer available. There is a
* similar but simpler function provided which is enough for practical
* purposes:
* PLSetCaseSensitive(Bool caseSensitive)
*
* 4. The following functions do no longer exist. They were removed because
* they were based on concepts borrowed from UserDefaults which conflict
* with the retain/release mechanism:
* PLSynchronize(), PLDeepSynchronize(), PLShallowSynchronize()
* PLSetFilename(), PLGetFilename()
* PLGetContainer()
* You should change your code to not use them anymore.
*
* 5. The following functions are no longer available. They were removed
* because they also used borrowed concepts which have no place in a
* property list as defined in the OpenStep specifications. Also these
* functions were hardly ever used in programs to our knowledge.
* PLGetDomainNames(), PLGetDomain(), PLSetDomain(), PLDeleteDomain()
* PLRegister(), PLUnregister()
* You should also change your code to not use them anymore (in case you
* ever used them anyway ;-) ).
*
* 6. Link your program with libWINGs or libWUtil instead of libPropList.
* (libWINGs should be used for GUI apps, while libWUtil for non-GUI apps)
*
*
* Our recommandation is to rewrite your code to use the new functions and
* link against libWINGs/libWUtil. We do not recommend you to keep using old
* libPropList function names. This file is provided just to allow existing
* libropList based applications to run with minimal changes with the new
* proplist code from WINGs before their authors get the time to rewrite
* them. New proplist code from WINGs provide a better integration with the
* other data types from WINGs, not to mention that the proplist code in WINGs
* is actively maintained while the old libPropList is dead.
*
*/
#ifndef _PROPLIST_COMPAT_H_
#define _PROPLIST_COMPAT_H_
#include <WINGs/WUtil.h>
typedef WMPropList* proplist_t;
#ifndef YES
#define YES True
#endif
#ifndef NO
#define NO False
#endif
#define PLSetCaseSensitive(c) WMPLSetCaseSensitive(c)
#define PLMakeString(bytes) WMCreatePLString(bytes)
#define PLMakeData(bytes, length) WMCreatePLDataWithBytes(bytes, length)
#define PLMakeArrayFromElements WMCreatePLArray
#define PLMakeDictionaryFromEntries WMCreatePLDictionary
#define PLRetain(pl) WMRetainPropList(pl)
#define PLRelease(pl) WMReleasePropList(pl)
#define PLInsertArrayElement(array, pl, pos) WMInsertInPLArray(array, pos, pl)
#define PLAppendArrayElement(array, pl) WMAddToPLArray(array, pl)
#define PLRemoveArrayElement(array, pos) WMDeleteFromPLArray(array, pos)
#define PLInsertDictionaryEntry(dict, key, value) WMPutInPLDictionary(dict, key, value)
#define PLRemoveDictionaryEntry(dict, key) WMRemoveFromPLDictionary(dict, key)
#define PLMergeDictionaries(dest, source) WMMergePLDictionaries(dest, source, False)
#define PLGetNumberOfElements(pl) WMGetPropListItemCount(pl)
#define PLIsString(pl) WMIsPLString(pl)
#define PLIsData(pl) WMIsPLData(pl)
#define PLIsArray(pl) WMIsPLArray(pl)
#define PLIsDictionary(pl) WMIsPLDictionary(pl)
#define PLIsSimple(pl) (WMIsPLString(pl) || WMIsPLData(pl))
#define PLIsCompound(pl) (WMIsPLArray(pl) || WMIsPLDictionary(pl))
#define PLIsEqual(pl1, pl2) WMIsPropListEqualTo(pl1, pl2)
#define PLGetString(pl) WMGetFromPLString(pl)
#define PLGetDataBytes(pl) WMGetPLDataBytes(pl)
#define PLGetDataLength(pl) WMGetPLDataLength(pl)
#define PLGetArrayElement(pl, index) WMGetFromPLArray(pl, index)
#define PLGetDictionaryEntry(pl, key) WMGetFromPLDictionary(pl, key)
#define PLGetAllDictionaryKeys(pl) WMGetPLDictionaryKeys(pl)
#define PLShallowCopy(pl) WMShallowCopyPropList(pl)
#define PLDeepCopy(pl) WMDeepCopyPropList(pl)
#define PLGetProplistWithDescription(desc) WMCreatePropListFromDescription(desc)
#define PLGetDescriptionIndent(pl, level) WMGetPropListDescription(pl, True)
#define PLGetDescription(pl) WMGetPropListDescription(pl, False)
#define PLGetStringDescription(pl) WMGetPropListDescription(pl, False)
#define PLGetDataDescription(pl) WMGetPropListDescription(pl, False)
#define PLGetProplistWithPath(file) WMReadPropListFromFile(file)
#define PLSave(pl, file, atm) WMWritePropListToFile(pl, file)
/* Unsupported functions. Do not ask for them. They're evil :P */
#define PLSetStringCmpHook(fn) error_PLSetStringCmpHook_is_not_supported
#define PLDeepSynchronize(pl) error_PLDeepSynchronize_is_not_supported
#define PLSynchronize(pl) error_PLSynchronize_is_not_supported
#define PLShallowSynchronize(pl) error_PLShallowSynchronize_is_not_supported
#define PLSetFilename(pl, filename) error_PLSetFilename_is_not_supported
#define PLGetFilename(pl, filename) error_PLGetFilename_is_not_supported
#define PLGetContainer(pl) error_PLGetContainer_is_not_supported
#define PLGetDomainNames error_PLGetDomainNames_is_not_supported
#define PLGetDomain(name) error_PLGetDomain_is_not_supported
#define PLSetDomain(name, value, kickme) error_PLSetDomain_is_not_supported
#define PLDeleteDomain(name, kickme) error_PLDeleteDomain_is_not_supported
#define PLRegister(name, callback) error_PLRegister_is_not_supported
#define PLUnregister(name) error_PLUnregister_is_not_supported
#endif

View File

@@ -1,510 +0,0 @@
#ifndef _WINGSP_H_
#define _WINGSP_H_
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include "WINGs.h"
#if WINGS_H_VERSION < 991003
#error There_is_an_old_WINGs.h_file_somewhere_in_your_system._Please_remove_it.
#endif
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define DOUBLE_BUFFER
#define WC_UserWidget 128
#define SCROLLER_WIDTH 20
#define XDND_VERSION 4
typedef struct W_Application {
char *applicationName;
int argc;
char **argv;
char *resourcePath;
} W_Application;
typedef struct W_Font {
struct W_Screen *screen;
union {
XFontSet set;
XFontStruct *normal;
} font;
short height;
short y;
short refCount;
char *name;
unsigned int notFontSet:1;
} W_Font;
typedef struct W_Pixmap {
struct W_Screen *screen;
Pixmap pixmap;
Pixmap mask;
unsigned short width;
unsigned short height;
short depth;
short refCount;
} W_Pixmap;
typedef struct W_Color {
struct W_Screen *screen;
XColor color;
short refCount;
GC gc;
struct {
unsigned int exact:1;
} flags;
} W_Color;
typedef struct W_FocusInfo {
struct W_View *toplevel;
struct W_View *focused; /* view that has the focus in this toplevel */
struct W_FocusInfo *next;
} W_FocusInfo;
struct W_DraggingInfo {
Window destinationWindow;
Window sourceWindow;
WMPoint location;
unsigned sourceOperation;
WMPixmap *image;
WMPoint imageLocation;
Time timestamp;
int protocolVersion;
WMView *destView;
/* only valid if in the same app.. should be treated as internal data */
// WMView *destination;
// WMView *source;
};
typedef struct W_Screen {
Display *display;
int screen;
int depth;
Colormap colormap;
Visual *visual;
Time lastEventTime;
Window rootWin;
struct W_View *rootView;
RContext *rcontext;
/* application related */
W_FocusInfo *focusInfo;
struct W_Pixmap *applicationIcon;
struct W_Window *windowList; /* list of windows in the app */
Window groupLeader; /* the leader of the application */
/* also used for other things */
struct W_SelectionHandlers *selectionHandlerList;
struct {
unsigned int hasAppIcon:1;
unsigned int simpleApplication:1;
} aflags;
WMOpenPanel *sharedOpenPanel;
WMSavePanel *sharedSavePanel;
struct W_FontPanel *sharedFontPanel;
struct W_ColorPanel *sharedColorPanel;
Pixmap stipple;
struct W_DraggingInfo dragInfo;
/* colors */
W_Color *white;
W_Color *black;
W_Color *gray;
W_Color *darkGray;
GC stippleGC;
GC copyGC;
GC clipGC;
GC monoGC; /* GC for 1bpp visuals */
GC xorGC;
GC ixorGC; /* IncludeInferiors XOR */
GC textFieldGC;
W_Font *normalFont;
W_Font *boldFont;
WMHashTable *fontCache;
Bool useMultiByte;
struct W_Balloon *balloon;
struct W_Pixmap *checkButtonImageOn;
struct W_Pixmap *checkButtonImageOff;
struct W_Pixmap *radioButtonImageOn;
struct W_Pixmap *radioButtonImageOff;
struct W_Pixmap *buttonArrow;
struct W_Pixmap *pushedButtonArrow;
struct W_Pixmap *scrollerDimple;
struct W_Pixmap *upArrow;
struct W_Pixmap *downArrow;
struct W_Pixmap *leftArrow;
struct W_Pixmap *rightArrow;
struct W_Pixmap *hiUpArrow;
struct W_Pixmap *hiDownArrow;
struct W_Pixmap *hiLeftArrow;
struct W_Pixmap *hiRightArrow;
struct W_Pixmap *pullDownIndicator;
struct W_Pixmap *popUpIndicator;
struct W_Pixmap *checkMark;
struct W_Pixmap *homeIcon;
struct W_Pixmap *altHomeIcon;
struct W_Pixmap *trashcanIcon;
struct W_Pixmap *altTrashcanIcon;
struct W_Pixmap *createDirIcon;
struct W_Pixmap *altCreateDirIcon;
struct W_Pixmap *disketteIcon;
struct W_Pixmap *altDisketteIcon;
struct W_Pixmap *unmountIcon;
struct W_Pixmap *altUnmountIcon;
struct W_Pixmap *magnifyIcon;
/* struct W_Pixmap *altMagnifyIcon;*/
struct W_Pixmap *wheelIcon;
struct W_Pixmap *grayIcon;
struct W_Pixmap *rgbIcon;
struct W_Pixmap *cmykIcon;
struct W_Pixmap *hsbIcon;
struct W_Pixmap *customPaletteIcon;
struct W_Pixmap *colorListIcon;
struct W_Pixmap *defaultObjectIcon;
Cursor defaultCursor;
Cursor textCursor;
Cursor invisibleCursor;
Atom attribsAtom; /* GNUstepWindowAttributes */
Atom deleteWindowAtom; /* WM_DELETE_WINDOW */
Atom protocolsAtom; /* _XA_WM_PROTOCOLS */
Atom clipboardAtom; /* CLIPBOARD */
Atom xdndAwareAtom; /* XdndAware */
Atom xdndSelectionAtom;
Atom xdndEnterAtom;
Atom xdndLeaveAtom;
Atom xdndPositionAtom;
Atom xdndDropAtom;
Atom xdndFinishedAtom;
Atom xdndTypeListAtom;
Atom xdndStatusAtom;
Atom wmStateAtom; /* WM_STATE */
/* stuff for detecting double-clicks */
Time lastClickTime; /* time of last mousedown event */
Window lastClickWindow; /* window of the last mousedown */
struct W_View *modalView;
unsigned modal:1;
unsigned ignoreNextDoubleClick:1;
} W_Screen;
typedef struct W_ViewDelegate {
void *data;
void (*didMove)(struct W_ViewDelegate*, WMView*);
void (*didResize)(struct W_ViewDelegate*, WMView*);
void (*willMove)(struct W_ViewDelegate*, WMView*, int*, int*);
void (*willResize)(struct W_ViewDelegate*, WMView*,
unsigned int*, unsigned int*);
} W_ViewDelegate;
typedef struct W_View {
struct W_Screen *screen;
WMWidget *self; /* must point to the widget the
* view belongs to */
W_ViewDelegate *delegate;
Window window;
WMSize size;
WMPoint pos;
struct W_View *nextFocusChain; /* next/prev in focus chain */
struct W_View *prevFocusChain;
struct W_View *parent; /* parent WMView */
struct W_View *childrenList; /* first in list of child windows */
struct W_View *nextSister; /* next on parent's children list */
struct W_EventHandler *handlerList;/* list of event handlers for this window */
unsigned long attribFlags;
XSetWindowAttributes attribs;
void *hangedData; /* data holder for user program */
WMColor *backColor;
Atom *droppableTypes;
struct W_DragSourceProcs *dragSourceProcs;
struct W_DragDestinationProcs *dragDestinationProcs;
int helpContext;
struct {
unsigned int realized:1;
unsigned int mapped:1;
unsigned int parentDying:1;
unsigned int dying:1; /* the view is being destroyed */
unsigned int topLevel:1; /* is a top level window */
unsigned int root:1; /* is the root window */
unsigned int mapWhenRealized:1;/* map the view when it's realized */
unsigned int alreadyDead:1; /* view was freed */
unsigned int dontCompressMotion:1; /* motion notify event compress */
unsigned int notifySizeChanged:1;
unsigned int dontCompressExpose:1; /* will compress all expose
events into one */
/* toplevel only */
unsigned int worksWhenModal:1;
unsigned int pendingRelease1:1;
unsigned int pendingRelease2:1;
unsigned int pendingRelease3:1;
unsigned int pendingRelease4:1;
unsigned int pendingRelease5:1;
unsigned int xdndHintSet:1;
} flags;
int refCount;
} W_View;
typedef struct W_EventHandler {
unsigned long eventMask;
WMEventProc *proc;
void *clientData;
struct W_EventHandler *nextHandler;
} W_EventHandler;
typedef struct _WINGsConfiguration {
char *systemFont;
char *boldSystemFont;
int defaultFontSize;
Bool useMultiByte;
unsigned doubleClickDelay;
} _WINGsConfiguration;
extern _WINGsConfiguration WINGsConfiguration;
#define CHECK_CLASS(widget, class) assert(W_CLASS(widget)==(class))
#define W_CLASS(widget) (((W_WidgetType*)(widget))->widgetClass)
#define W_VIEW(widget) (((W_WidgetType*)(widget))->view)
#define W_VIEW_REALIZED(view) (view)->flags.realized
#define W_VIEW_MAPPED(view) (view)->flags.mapped
#define W_VIEW_SCREEN(view) (view)->screen
#define W_VIEW_DRAWABLE(view) (view)->window
#define W_VIEW_WIDTH(view) (view)->size.width
#define W_VIEW_HEIGHT(view) (view)->size.height
#define W_PIXEL(c) (c)->color.pixel
#define W_FONTID(f) (f)->font->fid
#define W_DRAWABLE(scr) (scr)->rcontext->drawable
W_View *W_GetViewForXWindow(Display *display, Window window);
W_View *W_CreateView(W_View *parent);
W_View *W_CreateTopView(W_Screen *screen);
W_View *W_CreateRootView(W_Screen *screen);
void W_DestroyView(W_View *view);
void W_RealizeView(W_View *view);
void W_ReparentView(W_View *view, W_View *newParent, int x, int y);
void W_MapView(W_View *view);
void W_MapSubviews(W_View *view);
void W_UnmapSubviews(W_View *view);
W_View *W_TopLevelOfView(W_View *view);
void W_UnmapView(W_View *view);
void W_MoveView(W_View *view, int x, int y);
void W_ResizeView(W_View *view, unsigned int width, unsigned int height);
void W_SetViewBackgroundColor(W_View *view, WMColor *color);
void W_DrawRelief(W_Screen *scr, Drawable d, int x, int y, unsigned int width,
unsigned int height, WMReliefType relief);
void W_CleanUpEvents(W_View *view);
void W_CallDestroyHandlers(W_View *view);
void W_PaintTextAndImage(W_View *view, int wrap, GC textGC, W_Font *font,
WMReliefType relief, char *text,
WMAlignment alignment, W_Pixmap *image,
WMImagePosition position, GC backGC, int ofs);
void W_PaintText(W_View *view, Drawable d, WMFont *font, int x, int y,
int width, WMAlignment alignment, GC gc,
int wrap, char *text, int length);
int W_GetTextHeight(WMFont *font, char *text, int width, int wrap);
int W_TextWidth(WMFont *font, char *text, int length);
void W_BroadcastMessage(W_View *targetParent, XEvent *event);
void W_DispatchMessage(W_View *target, XEvent *event);
void W_SetFocusOfToplevel(W_View *toplevel, W_View *view);
W_View *W_FocusedViewOfToplevel(W_View *view);
void W_SetFocusOfTopLevel(W_View *toplevel, W_View *view);
void W_ReleaseView(WMView *view);
WMView *W_RetainView(WMView *view);
void W_InitApplication(WMScreen *scr);
void W_InitNotificationCenter(void);
W_Class W_RegisterUserWidget(void);
void W_RedisplayView(WMView *view);
Bool W_ApplicationInitialized(void);
char *W_GetTextSelection(WMScreen *scr, Atom selection);
void W_HandleSelectionEvent(XEvent *event);
void W_HandleDNDClientMessage(WMView *toplevel, XClientMessageEvent *event);
void W_FlushASAPNotificationQueue();
void W_FlushIdleNotificationQueue();
struct W_Balloon *W_CreateBalloon(WMScreen *scr);
void W_BalloonHandleEnterView(WMView *view);
void W_BalloonHandleLeaveView(WMView *view);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* _WINGSP_H_ */

View File

@@ -1,707 +0,0 @@
#ifndef _WUTIL_H_
#define _WUTIL_H_
#include <X11/Xlib.h>
#include <limits.h>
#include <sys/types.h>
/* SunOS 4.x Blargh.... */
#ifndef NULL
#define NULL ((void*)0)
#endif
/*
* Warning: proplist.h #defines BOOL which will clash with the
* typedef BOOL in Xmd.h
* proplist.h should use Bool (which is a #define in Xlib.h) instead.
*
*/
#include <proplist.h>
#ifndef WMAX
# define WMAX(a,b) ((a)>(b) ? (a) : (b))
#endif
#ifndef WMIN
# define WMIN(a,b) ((a)<(b) ? (a) : (b))
#endif
#if (!defined (__GNUC__) || __GNUC__ < 2 || \
__GNUC_MINOR__ < (defined (__cplusplus) ? 6 : 4))
#define __ASSERT_FUNCTION ((char *) 0)
#else
#define __ASSERT_FUNCTION __PRETTY_FUNCTION__
#endif
#ifdef NDEBUG
#define wassertr(expr) {}
#define wassertrv(expr, val) {}
#else /* !NDEBUG */
#ifdef DEBUG
#include <assert.h>
#define wassertr(expr) assert(expr)
#define wassertrv(expr, val) assert(expr)
#else /* !DEBUG */
#define wassertr(expr) \
if (!(expr)) { \
wwarning("%s line %i (%s): assertion %s failed",\
__FILE__, __LINE__, __ASSERT_FUNCTION, #expr);\
return;\
}
#define wassertrv(expr, val) \
if (!(expr)) { \
wwarning("%s line %i (%s): assertion %s failed",\
__FILE__, __LINE__, __ASSERT_FUNCTION, #expr);\
return (val);\
}
#endif /* !DEBUG */
#endif /* !NDEBUG */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
typedef enum {
WMPostWhenIdle = 1,
WMPostASAP = 2,
WMPostNow = 3
} WMPostingStyle;
typedef enum {
WNCNone = 0,
WNCOnName = 1,
WNCOnSender = 2
} WMNotificationCoalescing;
/* The possible states for connections */
typedef enum {
WCNotConnected=0,
WCListening,
WCInProgress,
WCFailed,
WCConnected,
WCDied,
WCClosed
} WMConnectionState;
enum {
WBNotFound = INT_MIN /* element was not found in bag */
};
typedef struct W_Bag WMBag;
typedef struct W_Data WMData;
typedef struct W_HashTable WMHashTable;
typedef struct W_UserDefaults WMUserDefaults;
typedef struct W_Notification WMNotification;
typedef struct W_NotificationQueue WMNotificationQueue;
typedef struct W_Host WMHost;
typedef struct W_Connection WMConnection;
typedef struct {
int position;
int count;
} WMRange;
/* DO NOT ACCESS THE CONTENTS OF THIS STRUCT */
typedef struct {
void *table;
void *nextItem;
int index;
} WMHashEnumerator;
typedef struct {
/* NULL is pointer hash */
unsigned (*hash)(const void *);
/* NULL is pointer compare */
Bool (*keyIsEqual)(const void *, const void *);
/* NULL does nothing */
void* (*retainKey)(const void *);
/* NULL does nothing */
void (*releaseKey)(const void *);
} WMHashTableCallbacks;
typedef void *WMBagIterator;
typedef struct W_BagFunctions {
int (*getItemCount)(WMBag *self);
int (*appendBag)(WMBag *self, WMBag *bag);
int (*putInBag)(WMBag *self, void *item);
int (*insertInBag)(WMBag *self, int index, void *item);
int (*removeFromBag)(WMBag *bag, void *item);
int (*eraseFromBag)(WMBag *bag, int index);
int (*deleteFromBag)(WMBag *bag, int index);
void *(*getFromBag)(WMBag *bag, int index);
int (*firstInBag)(WMBag *bag, void *item);
int (*countInBag)(WMBag *bag, void *item);
void *(*replaceInBag)(WMBag *bag, int index, void *item);
int (*sortBag)(WMBag *bag, int (*comparer)(const void*, const void*));
void (*emptyBag)(WMBag *bag);
void (*freeBag)(WMBag *bag);
void (*mapBag)(WMBag *bag, void (*function)(void*, void*), void *data);
int (*findInBag)(WMBag *bag, int (*match)(void*));
void *(*first)(WMBag *bag, WMBagIterator *ptr);
void *(*last)(WMBag *bag, WMBagIterator *ptr);
void *(*next)(WMBag *bag, WMBagIterator *ptr);
void *(*previous)(WMBag *bag, WMBagIterator *ptr);
void *(*iteratorAtIndex)(WMBag *bag, int index, WMBagIterator *ptr);
int (*indexForIterator)(WMBag *bag, WMBagIterator ptr);
} W_BagFunctions;
struct W_Bag {
void *data;
void (*destructor)(void *item);
W_BagFunctions func;
};
#if 0
typedef struct {
char character; /* the escape character */
char *value; /* value to place */
} WMSEscapes;
#endif
/* The connection callbacks */
typedef struct ConnectionDelegate {
void *data;
void (*didCatchException)(struct ConnectionDelegate *self,
WMConnection *cPtr);
void (*didDie)(struct ConnectionDelegate *self, WMConnection *cPtr);
void (*didInitialize)(struct ConnectionDelegate *self, WMConnection *cPtr);
void (*didReceiveInput)(struct ConnectionDelegate *self, WMConnection *cPtr);
void (*didTimeout)(struct ConnectionDelegate *self, WMConnection *cPtr);
} ConnectionDelegate;
typedef void WMNotificationObserverAction(void *observerData,
WMNotification *notification);
/*......................................................................*/
typedef void (waborthandler)(int);
waborthandler *wsetabort(waborthandler*);
/* don't free the returned string */
char *wstrerror(int errnum);
void wfatal(const char *msg, ...);
void wwarning(const char *msg, ...);
void wsyserror(const char *msg, ...);
void wsyserrorwithcode(int error, const char *msg, ...);
char *wfindfile(char *paths, char *file);
char *wfindfileinlist(char **path_list, char *file);
char *wfindfileinarray(proplist_t array, char *file);
char *wexpandpath(char *path);
/* don't free the returned string */
char *wgethomedir();
void *wmalloc(size_t size);
void *wrealloc(void *ptr, size_t newsize);
void wfree(void *ptr);
void wrelease(void *ptr);
void *wretain(void *ptr);
char *wstrdup(char *str);
char *wstrappend(char *dst, char *src);
char *wusergnusteppath();
char *wdefaultspathfordomain(char *domain);
void wusleep(unsigned int microsec);
#if 0
int wsprintesc(char *buffer, int length, char *format, WMSEscapes **escapes,
int count);
#endif
/*......................................................................*/
/* This function is used _only_ if you create a NON-GUI program.
* For GUI based programs use WMNextEvent()/WMHandleEvent() instead.
* This function will handle all input/timer/idle events, then return.
*/
void WHandleEvents();
/*......................................................................*/
WMHashTable *WMCreateHashTable(WMHashTableCallbacks callbacks);
void WMFreeHashTable(WMHashTable *table);
void WMResetHashTable(WMHashTable *table);
void *WMHashGet(WMHashTable *table, const void *key);
/* put data in table, replacing already existing data and returning
* the old value */
void *WMHashInsert(WMHashTable *table, void *key, void *data);
void WMHashRemove(WMHashTable *table, const void *key);
/* warning: do not manipulate the table while using these functions */
WMHashEnumerator WMEnumerateHashTable(WMHashTable *table);
void *WMNextHashEnumeratorItem(WMHashEnumerator *enumerator);
unsigned WMCountHashTable(WMHashTable *table);
/* some predefined callback sets */
extern const WMHashTableCallbacks WMIntHashCallbacks;
/* sizeof(keys) are <= sizeof(void*) */
extern const WMHashTableCallbacks WMStringHashCallbacks;
/* keys are strings. Strings will be copied with wstrdup()
* and freed with free() */
extern const WMHashTableCallbacks WMStringPointerHashCallbacks;
/* keys are strings, bug they are not copied */
/*......................................................................*/
/*
* Array bags use an array to store the elements.
* Item indexes may be any integer number.
*
* Pros:
* Fast [O(1)] access to elements
* Fast [O(1)] push/pop
*
* Cons:
* A little slower [O(n)] for insertion/deletion of elements that
* arent in the end
* Element indexes with large difference will cause large holes
*/
#if 0
WMBag* WMCreateArrayBag(int initialSize);
WMBag* WMCreateArrayBagWithDestructor(int initialSize,
void (*destructor)(void*));
#endif
/*
* Tree bags use a red-black tree for storage.
* Item indexes may be any integer number.
*
* Pros:
* O(lg n) insertion/deletion/search
* Good for large numbers of elements with sparse indexes
*
* Cons:
* O(lg n) insertion/deletion/search
* Slow for storing small numbers of elements
*/
WMBag *WMCreateTreeBag(void);
WMBag *WMCreateTreeBagWithDestructor(void (*destructor)(void*));
#define WMCreateArrayBag(a) WMCreateTreeBag()
#define WMCreateArrayBagWithDestructor(a,d) WMCreateTreeBagWithDestructor(d)
#define WMCreateBag(size) WMCreateTreeBag()
#define WMGetBagItemCount(bag) bag->func.getItemCount(bag)
#define WMAppendBag(bag, other) bag->func.appendBag(bag, other)
#define WMPutInBag(bag, item) bag->func.putInBag(bag, item)
/* insert will increment the index of elements after it by 1 */
#define WMInsertInBag(bag, index, item) bag->func.insertInBag(bag, index, item)
/* this is slow */
/* erase will remove the element from the bag,
* but will keep the index of the other elements unchanged */
#define WMEraseFromBag(bag, index) bag->func.deleteFromBag(bag, index)
/* delete and remove will remove the elements and cause the elements
* after them to decrement their indexes by 1 */
#define WMRemoveFromBag(bag, item) bag->func.removeFromBag(bag, item)
#define WMDeleteFromBag(bag, index) bag->func.deleteFromBag(bag, index)
#define WMGetFromBag(bag, index) bag->func.getFromBag(bag, index)
#define WMCountInBag(bag, item) bag->func.countInBag(bag, item)
#define WMReplaceInBag(bag, index, item) bag->func.replaceInBag(bag, index, item)
#define WMSetInBag(bag, index, item) bag->func.replaceInBag(bag, index, item)
/* comparer must return:
* < 0 if a < b
* > 0 if a > b
* = 0 if a = b
*/
#define WMSortBag(bag, comparer) bag->func.sortBag(bag, comparer)
#define WMEmptyBag(bag) bag->func.emptyBag(bag)
#define WMFreeBag(bag) bag->func.freeBag(bag)
#define WMMapBag(bag, function, cdata) bag->func.mapBag(bag, function, cdata)
#define WMGetFirstInBag(bag, item) bag->func.firstInBag(bag, item)
#define WMCountInBag(bag, item) bag->func.countInBag(bag, item)
#define WMFindInBag(bag, match) bag->func.findInBag(bag, match)
#define WMBagFirst(bag, ptr) bag->func.first(bag, ptr)
#define WMBagLast(bag, ptr) bag->func.last(bag, ptr)
#define WMBagNext(bag, ptr) bag->func.next(bag, ptr)
#define WMBagPrevious(bag, ptr) bag->func.previous(bag, ptr)
#define WMBagIteratorAtIndex(bag, index, ptr) bag->func.iteratorAtIndex(bag, index, ptr)
#define WMBagIndexForIterator(bag, ptr) bag->func.indexForIterator(bag, ptr)
#define WM_ITERATE_BAG(bag, var, i) \
for (var = WMBagFirst(bag, &(i)); (i) != NULL; \
var = WMBagNext(bag, &(i)))
#define WM_ETARETI_BAG(bag, var, i) \
for (var = WMBagLast(bag, &(i)); (i) != NULL; \
var = WMBagPrevious(bag, &(i)))
/*-------------------------------------------------------------------------*/
/* WMData handling */
/* Creating/destroying data */
WMData* WMCreateDataWithCapacity(unsigned capacity);
WMData* WMCreateDataWithLength(unsigned length);
WMData* WMCreateDataWithBytes(void *bytes, unsigned length);
WMData* WMCreateDataWithBytesNoCopy(void *bytes, unsigned length);
WMData* WMCreateDataWithData(WMData *aData);
WMData* WMRetainData(WMData *aData);
void WMReleaseData(WMData *aData);
/* Adjusting capacity */
void WMSetDataCapacity(WMData *aData, unsigned capacity);
void WMSetDataLength(WMData *aData, unsigned length);
void WMIncreaseDataLengthBy(WMData *aData, unsigned extraLength);
/* Accessing data */
const void* WMDataBytes(WMData *aData);
void WMGetDataBytes(WMData *aData, void *buffer);
void WMGetDataBytesWithLength(WMData *aData, void *buffer, unsigned length);
void WMGetDataBytesWithRange(WMData *aData, void *buffer, WMRange aRange);
WMData* WMGetSubdataWithRange(WMData *aData, WMRange aRange);
/* Testing data */
Bool WMIsDataEqualToData(WMData *aData, WMData *anotherData);
unsigned WMGetDataLength(WMData *aData);
unsigned WMGetDataHash(WMData *aData);
/* Adding data */
void WMAppendDataBytes(WMData *aData, void *bytes, unsigned length);
void WMAppendData(WMData *aData, WMData *anotherData);
/* Modifying data */
void WMReplaceDataBytesInRange(WMData *aData, WMRange aRange, void *bytes);
void WMResetDataBytesInRange(WMData *aData, WMRange aRange);
void WMSetData(WMData *aData, WMData *anotherData);
/* Storing data */
/*--------------------------------------------------------------------------*/
WMNotification *WMCreateNotification(char *name, void *object, void *clientData);
void WMReleaseNotification(WMNotification *notification);
WMNotification *WMRetainNotification(WMNotification *notification);
void *WMGetNotificationClientData(WMNotification *notification);
void *WMGetNotificationObject(WMNotification *notification);
char *WMGetNotificationName(WMNotification *notification);
void WMAddNotificationObserver(WMNotificationObserverAction *observerAction,
void *observer, char *name, void *object);
void WMPostNotification(WMNotification *notification);
void WMRemoveNotificationObserver(void *observer);
void WMRemoveNotificationObserverWithName(void *observer, char *name,
void *object);
void WMPostNotificationName(char *name, void *object, void *clientData);
WMNotificationQueue *WMGetDefaultNotificationQueue(void);
WMNotificationQueue *WMCreateNotificationQueue(void);
void WMDequeueNotificationMatching(WMNotificationQueue *queue,
WMNotification *notification,
unsigned mask);
void WMEnqueueNotification(WMNotificationQueue *queue,
WMNotification *notification,
WMPostingStyle postingStyle);
void WMEnqueueCoalesceNotification(WMNotificationQueue *queue,
WMNotification *notification,
WMPostingStyle postingStyle,
unsigned coalesceMask);
/*......................................................................*/
WMUserDefaults *WMGetStandardUserDefaults(void);
WMUserDefaults *WMGetDefaultsFromPath(char *path);
void WMSynchronizeUserDefaults(WMUserDefaults *database);
void WMSaveUserDefaults(WMUserDefaults *database);
void WMEnableUDPeriodicSynchronization(WMUserDefaults *database, Bool enable);
proplist_t WMGetUDObjectForKey(WMUserDefaults *database, char *defaultName);
void WMSetUDObjectForKey(WMUserDefaults *database, proplist_t object,
char *defaultName);
void WMRemoveUDObjectForKey(WMUserDefaults *database, char *defaultName);
/* you can free the returned string */
char *WMGetUDStringForKey(WMUserDefaults *database, char *defaultName);
int WMGetUDIntegerForKey(WMUserDefaults *database, char *defaultName);
float WMGetUDFloatForKey(WMUserDefaults *database, char *defaultName);
Bool WMGetUDBoolForKey(WMUserDefaults *database, char *defaultName);
void WMSetUDStringForKey(WMUserDefaults *database, char *value,
char *defaultName);
void WMSetUDIntegerForKey(WMUserDefaults *database, int value,
char *defaultName);
void WMSetUDFloatForKey(WMUserDefaults *database, float value,
char *defaultName);
void WMSetUDBoolForKey(WMUserDefaults *database, Bool value,
char *defaultName);
proplist_t WMGetUDSearchList(WMUserDefaults *database);
void WMSetUDSearchList(WMUserDefaults *database, proplist_t list);
extern char *WMUserDefaultsDidChangeNotification;
/*-------------------------------------------------------------------------*/
/* WMHost: host handling */
WMHost* WMGetCurrentHost();
WMHost* WMGetHostWithName(char* name);
WMHost* WMGetHostWithAddress(char* address);
WMHost* WMRetainHost(WMHost *hPtr);
void WMReleaseHost(WMHost *hPtr);
/*
* Host cache management
* If enabled, only one object representing each host will be created, and
* a shared instance will be returned by all methods that return a host.
* Enabled by default.
*/
void WMSetHostCacheEnabled(Bool flag);
Bool WMIsHostCacheEnabled();
void WMFlushHostCache();
/*
* Compare hosts: Hosts are equal if they share at least one address
*/
Bool WMIsHostEqualToHost(WMHost* hPtr, WMHost* anotherHost);
/*
* Host names.
* WMGetHostName() will return first name (official) if a host has several.
* WMGetHostNames() will return a R/O WMBag with all the names of the host.
*/
char* WMGetHostName(WMHost* hPtr);
/* The returned bag is R/O. Do not modify it, and do not free it! */
WMBag* WMGetHostNames(WMHost* hPtr);
/*
* Host addresses.
* Addresses are represented as "Dotted Decimal" strings, e.g. "192.42.172.1"
* WMGetHostAddress() will return an arbitrary address if a host has several.
* WMGetHostAddresses() will return a R/O WMBag with all addresses of the host.
*/
char* WMGetHostAddress(WMHost* hPtr);
/* The returned bag is R/O. Do not modify it, and do not free it! */
WMBag* WMGetHostAddresses(WMHost* hPtr);
/*-------------------------------------------------------------------------*/
/* WMConnection functions */
WMConnection* WMCreateConnectionAsServerAtAddress(char *host, char *service,
char *protocol);
WMConnection* WMCreateConnectionToAddress(char *host, char *service,
char *protocol);
WMConnection* WMCreateConnectionToAddressAndNotify(char *host, char *service,
char *protocol);
void WMCloseConnection(WMConnection *cPtr);
void WMDestroyConnection(WMConnection *cPtr);
WMConnection* WMAcceptConnection(WMConnection *listener);
/* Release the returned data! */
WMData* WMGetConnectionAvailableData(WMConnection *cPtr);
int WMSendConnectionData(WMConnection *cPtr, WMData *data);
Bool WMEnqueueConnectionData(WMConnection *cPtr, WMData *data);
#define WMFlushConnection(cPtr) WMSendConnectionData((cPtr), NULL)
void WMSetConnectionDelegate(WMConnection *cPtr, ConnectionDelegate *delegate);
/* Connection info */
char* WMGetConnectionAddress(WMConnection *cPtr);
char* WMGetConnectionService(WMConnection *cPtr);
char* WMGetConnectionProtocol(WMConnection *cPtr);
void WMSetConnectionNonBlocking(WMConnection *cPtr, Bool flag);
void* WMGetConnectionClientData(WMConnection *cPtr);
void WMSetConnectionClientData(WMConnection *cPtr, void *data);
unsigned int WMGetConnectionFlags(WMConnection *cPtr);
void WMSetConnectionFlags(WMConnection *cPtr, unsigned int flags);
int WMGetConnectionSocket(WMConnection *cPtr);
WMConnectionState WMGetConnectionState(WMConnection *cPtr);
void WMSetConnectionSendTimeout(WMConnection *cPtr, unsigned int timeout);
/* Global variables */
extern int WCErrorCode;
/*-------------------------------------------------------------------------*/
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif

314
WINGs/array.c Normal file
View File

@@ -0,0 +1,314 @@
/*
* Dynamically Resized Array
*
* Authors: Alfredo K. Kojima <kojima@windowmaker.info>
* Dan Pascu <dan@windowmaker.info>
*
* This code is released to the Public Domain, but
* proper credit is always appreciated :)
*/
#include <stdlib.h>
#include <string.h>
#include "WUtil.h"
#define INITIAL_SIZE 8
#define RESIZE_INCREMENT 8
typedef struct W_Array {
void **items; /* the array data */
int itemCount; /* # of items in array */
int allocSize; /* allocated size of array */
WMFreeDataProc *destructor; /* the destructor to free elements */
} W_Array;
WMArray *WMCreateArray(int initialSize)
{
return WMCreateArrayWithDestructor(initialSize, NULL);
}
WMArray *WMCreateArrayWithDestructor(int initialSize, WMFreeDataProc * destructor)
{
WMArray *array;
array = wmalloc(sizeof(WMArray));
if (initialSize <= 0) {
initialSize = INITIAL_SIZE;
}
array->items = wmalloc(sizeof(void *) * initialSize);
array->itemCount = 0;
array->allocSize = initialSize;
array->destructor = destructor;
return array;
}
WMArray *WMCreateArrayWithArray(WMArray * array)
{
WMArray *newArray;
newArray = wmalloc(sizeof(WMArray));
newArray->items = wmalloc(sizeof(void *) * array->allocSize);
memcpy(newArray->items, array->items, sizeof(void *) * array->itemCount);
newArray->itemCount = array->itemCount;
newArray->allocSize = array->allocSize;
newArray->destructor = NULL;
return newArray;
}
void WMEmptyArray(WMArray * array)
{
if (array->destructor) {
while (array->itemCount > 0) {
array->itemCount--;
array->destructor(array->items[array->itemCount]);
}
}
/*memset(array->items, 0, array->itemCount * sizeof(void*)); */
array->itemCount = 0;
}
void WMFreeArray(WMArray * array)
{
WMEmptyArray(array);
wfree(array->items);
wfree(array);
}
int WMGetArrayItemCount(WMArray * array)
{
return array->itemCount;
}
void WMAppendArray(WMArray * array, WMArray * other)
{
if (other->itemCount == 0)
return;
if (array->itemCount + other->itemCount > array->allocSize) {
array->allocSize += other->allocSize;
array->items = wrealloc(array->items, sizeof(void *) * array->allocSize);
}
memcpy(array->items + array->itemCount, other->items, sizeof(void *) * other->itemCount);
array->itemCount += other->itemCount;
}
void WMAddToArray(WMArray * array, void *item)
{
if (array->itemCount >= array->allocSize) {
array->allocSize += RESIZE_INCREMENT;
array->items = wrealloc(array->items, sizeof(void *) * array->allocSize);
}
array->items[array->itemCount] = item;
array->itemCount++;
}
void WMInsertInArray(WMArray * array, int index, void *item)
{
wassertr(index >= 0 && index <= array->itemCount);
if (array->itemCount >= array->allocSize) {
array->allocSize += RESIZE_INCREMENT;
array->items = wrealloc(array->items, sizeof(void *) * array->allocSize);
}
if (index < array->itemCount) {
memmove(array->items + index + 1, array->items + index,
sizeof(void *) * (array->itemCount - index));
}
array->items[index] = item;
array->itemCount++;
}
void *WMReplaceInArray(WMArray * array, int index, void *item)
{
void *old;
wassertrv(index >= 0 && index <= array->itemCount, NULL);
/* is it really useful to perform append if index == array->itemCount ? -Dan */
if (index == array->itemCount) {
WMAddToArray(array, item);
return NULL;
}
old = array->items[index];
array->items[index] = item;
return old;
}
int WMDeleteFromArray(WMArray * array, int index)
{
wassertrv(index >= 0 && index < array->itemCount, 0);
if (array->destructor) {
array->destructor(array->items[index]);
}
if (index < array->itemCount - 1) {
memmove(array->items + index, array->items + index + 1,
sizeof(void *) * (array->itemCount - index - 1));
}
array->itemCount--;
return 1;
}
int WMRemoveFromArrayMatching(WMArray * array, WMMatchDataProc * match, void *cdata)
{
int i;
if (match != NULL) {
for (i = 0; i < array->itemCount; i++) {
if ((*match) (array->items[i], cdata)) {
WMDeleteFromArray(array, i);
return 1;
}
}
} else {
for (i = 0; i < array->itemCount; i++) {
if (array->items[i] == cdata) {
WMDeleteFromArray(array, i);
return 1;
}
}
}
return 0;
}
void *WMGetFromArray(WMArray * array, int index)
{
if (index < 0 || index >= array->itemCount)
return NULL;
return array->items[index];
}
void *WMPopFromArray(WMArray * array)
{
array->itemCount--;
return array->items[array->itemCount];
}
int WMFindInArray(WMArray * array, WMMatchDataProc * match, void *cdata)
{
int i;
if (match != NULL) {
for (i = 0; i < array->itemCount; i++) {
if ((*match) (array->items[i], cdata))
return i;
}
} else {
for (i = 0; i < array->itemCount; i++) {
if (array->items[i] == cdata)
return i;
}
}
return WANotFound;
}
int WMCountInArray(WMArray * array, void *item)
{
int i, count;
for (i = 0, count = 0; i < array->itemCount; i++) {
if (array->items[i] == item)
count++;
}
return count;
}
void 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);
}
}
void WMMapArray(WMArray * array, void (*function) (void *, void *), void *data)
{
int i;
for (i = 0; i < array->itemCount; i++) {
(*function) (array->items[i], data);
}
}
WMArray *WMGetSubarrayWithRange(WMArray * array, WMRange aRange)
{
WMArray *newArray;
if (aRange.count <= 0)
return WMCreateArray(0);
if (aRange.position < 0)
aRange.position = 0;
if (aRange.position >= array->itemCount)
aRange.position = array->itemCount - 1;
if (aRange.position + aRange.count > array->itemCount)
aRange.count = array->itemCount - aRange.position;
newArray = WMCreateArray(aRange.count);
memcpy(newArray->items, array->items + aRange.position, sizeof(void *) * aRange.count);
newArray->itemCount = aRange.count;
return newArray;
}
void *WMArrayFirst(WMArray * array, WMArrayIterator * iter)
{
if (array->itemCount == 0) {
*iter = WANotFound;
return NULL;
} else {
*iter = 0;
return array->items[0];
}
}
void *WMArrayLast(WMArray * array, WMArrayIterator * iter)
{
if (array->itemCount == 0) {
*iter = WANotFound;
return NULL;
} else {
*iter = array->itemCount - 1;
return array->items[*iter];
}
}
void *WMArrayNext(WMArray * array, WMArrayIterator * iter)
{
if (*iter >= 0 && *iter < array->itemCount - 1) {
return array->items[++(*iter)];
} else {
*iter = WANotFound;
return NULL;
}
}
void *WMArrayPrevious(WMArray * array, WMArrayIterator * iter)
{
if (*iter > 0 && *iter < array->itemCount) {
return array->items[--(*iter)];
} else {
*iter = WANotFound;
return NULL;
}
}

View File

@@ -1,419 +0,0 @@
#include <stdlib.h>
#include <string.h>
#include "WUtil.h"
#if 0
typedef struct W_ArrayBag {
void **items;
int size;
int count;
int base;
int first;
int last;
} W_ArrayBag;
static int getItemCount(WMBag *bag);
static int appendBag(WMBag *bag, WMBag *appendedBag);
static int putInBag(WMBag *bag, void *item);
static int insertInBag(WMBag *bag, int index, void *item);
static int removeFromBag(WMBag *bag, void *item);
static int deleteFromBag(WMBag *bag, int index);
static void* getFromBag(WMBag *bag, int index);
static int firstInBag(WMBag *bag, void *item);
static int countInBag(WMBag *bag, void *item);
static void* replaceInBag(WMBag *bag, int index, void *item);
static int sortBag(WMBag *bag, int (*comparer)(const void*, const void*));
static void emptyBag(WMBag *bag);
static void freeBag(WMBag *bag);
static void mapBag(WMBag *bag, void (*function)(void*, void*), void *data);
static int findInBag(WMBag *bag, int (*match)(void*));
static void* first(WMBag *bag, void **ptr);
static void* last(WMBag *bag, void **ptr);
static void* next(WMBag *bag, void **ptr);
static void* previous(WMBag *bag, void **ptr);
static void* iteratorAtIndex(WMBag *bag, int index, WMBagIterator *ptr);
static int indexForIterator(WMBag *bag, WMBagIterator ptr);
static W_BagFunctions arrayFunctions = {
getItemCount,
appendBag,
putInBag,
insertInBag,
removeFromBag,
deleteFromBag,
deleteFromBag,
getFromBag,
firstInBag,
countInBag,
replaceInBag,
sortBag,
emptyBag,
freeBag,
mapBag,
findInBag,
first,
last,
next,
previous,
iteratorAtIndex,
indexForIterator
};
#define ARRAY ((W_ArrayBag*)bag->data)
#define I2O(a, i) ((a)->base + i)
WMBag*
WMCreateArrayBagWithDestructor(int initialSize, void (*destructor)(void*))
{
WMBag *bag;
W_ArrayBag *array;
int size;
assert(0&&"array bag is not working");
bag = wmalloc(sizeof(WMBag));
array = wmalloc(sizeof(W_ArrayBag));
bag->data = array;
array->items = wmalloc(sizeof(void*) * size);
array->size = size;
array->count = 0;
array->first = 0;
array->last = 0;
array->base = 0;
bag->func = arrayFunctions;
bag->destructor = destructor;
return bag;
}
WMBag*
WMCreateArrayBag(int initialSize)
{
return WMCreateArrayBagWithDestructor(initialSize, NULL);
}
static int
getItemCount(WMBag *bag)
{
return ARRAY->count;
}
static int
appendBag(WMBag *bag, WMBag *appendedBag)
{
W_ArrayBag *array = (W_ArrayBag*)appendedBag->data;
int ok;
int i;
for (i = array->first; i <= array->last; i++) {
if (array->items[array->base+i]) {
ok = putInBag(bag, array->items[array->base+i]);
if (!ok)
return 0;
}
}
return 1;
}
static int
putInBag(WMBag *bag, void *item)
{
return insertInBag(bag, ARRAY->last+1, item);
}
static int
insertInBag(WMBag *bag, int index, void *item)
{
W_ArrayBag *array = ARRAY;
if (I2O(array, index) >= array->size) {
array->size = WMAX(array->size + 16, I2O(array, index));
array->items = wrealloc(array->items, sizeof(void*) * array->size);
memset(array->items + I2O(array, array->last), 0,
sizeof(void*) * (array->size - I2O(array, array->last)));
}
if (index > array->last) {
array->last = index;
} else if (index >= array->first) {
memmove(array->items + I2O(array, index),
array->items + (I2O(array, index) + 1), sizeof(void*));
array->last++;
} else {
memmove(array->items,
array->items + (abs(index) - array->base),
sizeof(void*) * (abs(index) - array->base));
memset(array->items, 0, sizeof(void*) * (abs(index) - array->base));
array->first = index;
array->base = abs(index);
}
array->items[array->base + index] = item;
array->count++;
return 1;
}
static int
removeFromBag(WMBag *bag, void *item)
{
int i;
W_ArrayBag *array = ARRAY;
for (i = 0; i < array->count; i++) {
if (array->items[i] == item) {
if (bag->destructor)
bag->destructor(array->items[i]);
memmove(&array->items[i], &array->items[i + 1],
(array->count - i - 1) * sizeof(void*));
array->count--;
return 1;
}
}
return 0;
}
static int
deleteFromBag(WMBag *bag, int index)
{
W_ArrayBag *array = ARRAY;
if (index < 0 || index >= array->count)
return 0;
if (index < array->count-1) {
if (bag->destructor)
bag->destructor(array->items[index]);
memmove(&array->items[index], &array->items[index + 1],
(array->count - index - 1) * sizeof(void*));
}
array->count--;
return 1;
}
static void*
getFromBag(WMBag *bag, int index)
{
if (index < 0 || index >= ARRAY->count)
return NULL;
return ARRAY->items[index];
}
static int
firstInBag(WMBag *bag, void *item)
{
int j;
int count = ARRAY->count;
W_ArrayBag *array = ARRAY;
for (j = 0; j < count; j++) {
if (array->items[j] == item)
return j;
}
return -1;
}
static int
countInBag(WMBag *bag, void *item)
{
int i, j;
int count = ARRAY->count;
W_ArrayBag *array = ARRAY;
for (j = 0, i = 0; j < count; j++) {
if (array->items[j] == item)
i++;
}
return i;
}
static void*
replaceInBag(WMBag *bag, int index, void *item)
{
void *old;
if (index < 0 || index >= ARRAY->count)
return NULL;
old = ARRAY->items[index];
ARRAY->items[index] = item;
return old;
}
static int
sortBag(WMBag *bag, int (*comparer)(const void*, const void*))
{
qsort(ARRAY->items, ARRAY->count, sizeof(void*), comparer);
return 1;
}
static void
emptyBag(WMBag *bag)
{
W_ArrayBag *array = ARRAY;
if (bag->destructor) {
while (--array->count) {
bag->destructor(array->items[array->count]);
}
}
ARRAY->count=0;
}
static void
freeBag(WMBag *bag)
{
emptyBag(bag);
wfree(ARRAY->items);
wfree(ARRAY);
wfree(bag);
}
static void
mapBag(WMBag *bag, void (*function)(void *, void *), void *clientData)
{
int i;
for (i = 0; i < ARRAY->last; i++) {
if (ARRAY->items[i])
(*function)(ARRAY->items[i], clientData);
}
}
static int
findInBag(WMBag *bag, int (*match)(void*))
{
int i;
for (i = 0; i < ARRAY->last; i++) {
if ((*match)(ARRAY->items[i]))
return i;
}
return -1;
}
static void*
first(WMBag *bag, void **ptr)
{
*ptr = NULL;
if (ARRAY->count == 0)
return NULL;
*(int**)ptr = 0;
return ARRAY->items[0];
}
static void*
last(WMBag *bag, void **ptr)
{
*ptr = NULL;
if (ARRAY->count == 0)
return NULL;
*(int*)ptr = ARRAY->count-1;
return ARRAY->items[ARRAY->count-1];
}
static void*
next(WMBag *bag, void **ptr)
{
if (!*ptr)
return NULL;
(*(int*)ptr)++;
if (*(int*)ptr >= ARRAY->count) {
*ptr = NULL;
return NULL;
}
return ARRAY->items[*(int*)ptr];
}
static void*
previous(WMBag *bag, void **ptr)
{
if (!*ptr)
return NULL;
(*(int*)ptr)--;
if (*(int*)ptr < 0) {
*ptr = NULL;
return NULL;
}
return ARRAY->items[*(int*)ptr];
}
static void*
iteratorAtIndex(WMBag *bag, int index, WMBagIterator *ptr)
{
}
static int
indexForIterator(WMBag *bag, WMBagIterator ptr)
{
}
#endif

View File

@@ -1,13 +1,9 @@
#include <stdlib.h>
#include <string.h>
#include "WUtil.h"
typedef struct W_Node {
struct W_Node *parent;
struct W_Node *left;
@@ -18,75 +14,20 @@ typedef struct W_Node {
int index;
} W_Node;
typedef struct W_TreeBag {
typedef struct W_Bag {
W_Node *root;
W_Node *nil; /* sentinel */
int count;
} W_TreeBag;
static int getItemCount(WMBag *self);
static int appendBag(WMBag *self, WMBag *bag);
static int putInBag(WMBag *self, void *item);
static int insertInBag(WMBag *self, int index, void *item);
static int removeFromBag(WMBag *bag, void *item);
static int eraseFromBag(WMBag *bag, int index);
static int deleteFromBag(WMBag *bag, int index);
static void *getFromBag(WMBag *bag, int index);
static int countInBag(WMBag *bag, void *item);
static int firstInBag(WMBag *bag, void *item);
static void *replaceInBag(WMBag *bag, int index, void *item);
static int sortBag(WMBag *bag, int (*comparer)(const void*, const void*));
static void emptyBag(WMBag *bag);
static void freeBag(WMBag *bag);
static void mapBag(WMBag *bag, void (*function)(void*, void*), void *data);
static int findInBag(WMBag *bag, int (*match)(void*));;
static void *first(WMBag *bag, WMBagIterator *ptr);
static void *last(WMBag *bag, WMBagIterator *ptr);
static void *next(WMBag *bag, WMBagIterator *ptr);
static void *previous(WMBag *bag, WMBagIterator *ptr);
static void *iteratorAtIndex(WMBag *bag, int index, WMBagIterator *ptr);
static int indexForIterator(WMBag *bag, WMBagIterator ptr);
static W_BagFunctions bagFunctions = {
getItemCount,
appendBag,
putInBag,
insertInBag,
removeFromBag,
eraseFromBag,
deleteFromBag,
getFromBag,
firstInBag,
countInBag,
replaceInBag,
sortBag,
emptyBag,
freeBag,
mapBag,
findInBag,
first,
last,
next,
previous,
iteratorAtIndex,
indexForIterator
};
void (*destructor) (void *item);
} W_Bag;
#define IS_LEFT(node) (node == node->parent->left)
#define IS_RIGHT(node) (node == node->parent->right)
static void leftRotate(W_TreeBag *tree, W_Node *node)
static void leftRotate(W_Bag * tree, W_Node * node)
{
W_Node *node2;
@@ -110,9 +51,7 @@ static void leftRotate(W_TreeBag *tree, W_Node *node)
node->parent = node2;
}
static void rightRotate(W_TreeBag *tree, W_Node *node)
static void rightRotate(W_Bag * tree, W_Node * node)
{
W_Node *node2;
@@ -136,16 +75,14 @@ static void rightRotate(W_TreeBag *tree, W_Node *node)
node->parent = node2;
}
static void treeInsert(W_TreeBag *tree, W_Node *node)
static void treeInsert(W_Bag * tree, W_Node * node)
{
W_Node *y = tree->nil;
W_Node *x = tree->root;
while (x != tree->nil) {
y = x;
if (node->index < x->index)
if (node->index <= x->index)
x = x->left;
else
x = x->right;
@@ -153,14 +90,13 @@ static void treeInsert(W_TreeBag *tree, W_Node *node)
node->parent = y;
if (y == tree->nil)
tree->root = node;
else if (node->index < y->index)
else if (node->index <= y->index)
y->left = node;
else
y->right = node;
}
static void rbTreeInsert(W_TreeBag *tree, W_Node *node)
static void rbTreeInsert(W_Bag * tree, W_Node * node)
{
W_Node *y;
@@ -212,9 +148,7 @@ static void rbTreeInsert(W_TreeBag *tree, W_Node *node)
tree->root->color = 'B';
}
static void rbDeleteFixup(W_TreeBag *tree, W_Node *node)
static void rbDeleteFixup(W_Bag * tree, W_Node * node)
{
W_Node *w;
@@ -248,7 +182,7 @@ static void rbDeleteFixup(W_TreeBag *tree, W_Node *node)
if (w->color == 'R') {
w->color = 'B';
node->parent->color = 'R';
leftRotate(tree, node->parent);
rightRotate(tree, node->parent);
w = node->parent->left;
}
if (w->left->color == 'B' && w->right->color == 'B') {
@@ -258,20 +192,20 @@ static void rbDeleteFixup(W_TreeBag *tree, W_Node *node)
if (w->left->color == 'B') {
w->right->color = 'B';
w->color = 'R';
rightRotate(tree, w);
leftRotate(tree, w);
w = node->parent->left;
}
w->color = node->parent->color;
node->parent->color = 'B';
w->left->color = 'B';
leftRotate(tree, node->parent);
rightRotate(tree, node->parent);
node = tree->root;
}
}
}
node->color = 'B';
}
}
static W_Node *treeMinimum(W_Node * node, W_Node * nil)
{
@@ -280,7 +214,6 @@ static W_Node *treeMinimum(W_Node *node, W_Node *nil)
return node;
}
static W_Node *treeMaximum(W_Node * node, W_Node * nil)
{
while (node->right != nil)
@@ -288,7 +221,6 @@ static W_Node *treeMaximum(W_Node *node, W_Node *nil)
return node;
}
static W_Node *treeSuccessor(W_Node * node, W_Node * nil)
{
W_Node *y;
@@ -304,7 +236,6 @@ static W_Node *treeSuccessor(W_Node *node, W_Node *nil)
return y;
}
static W_Node *treePredecessor(W_Node * node, W_Node * nil)
{
W_Node *y;
@@ -320,8 +251,7 @@ static W_Node *treePredecessor(W_Node *node, W_Node *nil)
return y;
}
static W_Node *rbTreeDelete(W_TreeBag *tree, W_Node *node)
static W_Node *rbTreeDelete(W_Bag * tree, W_Node * node)
{
W_Node *nil = tree->nil;
W_Node *x, *y;
@@ -360,8 +290,6 @@ static W_Node *rbTreeDelete(W_TreeBag *tree, W_Node *node)
return y;
}
static W_Node *treeSearch(W_Node * root, W_Node * nil, int index)
{
if (root == nil || root->index == index) {
@@ -375,7 +303,6 @@ static W_Node *treeSearch(W_Node *root, W_Node *nil, int index)
}
}
static W_Node *treeFind(W_Node * root, W_Node * nil, void *data)
{
W_Node *tmp;
@@ -392,10 +319,6 @@ static W_Node *treeFind(W_Node *root, W_Node *nil, void *data)
return tmp;
}
#if 0
static char buf[512];
@@ -417,7 +340,6 @@ static void printNodes(W_Node *node, W_Node *nil, int depth)
printNodes(node->right, nil, depth + 1);
}
void PrintTree(WMBag * bag)
{
W_TreeBag *tree = (W_TreeBag *) bag->data;
@@ -426,83 +348,58 @@ void PrintTree(WMBag *bag)
}
#endif
#define SELF ((W_TreeBag*)self->data)
WMBag *WMCreateTreeBag(void)
{
return WMCreateTreeBagWithDestructor(NULL);
}
WMBag *WMCreateTreeBagWithDestructor(void (*destructor)(void*))
WMBag *WMCreateTreeBagWithDestructor(WMFreeDataProc * destructor)
{
WMBag *bag;
W_TreeBag *tree;
bag = wmalloc(sizeof(WMBag));
bag->data = tree = wmalloc(sizeof(W_TreeBag));
memset(tree, 0, sizeof(W_TreeBag));
tree->nil = wmalloc(sizeof(W_Node));
memset(tree->nil, 0, sizeof(W_Node));
tree->nil->left = tree->nil->right = tree->nil->parent = tree->nil;
tree->nil->index = WBNotFound;
tree->root = tree->nil;
bag->nil = wmalloc(sizeof(W_Node));
bag->nil->left = bag->nil->right = bag->nil->parent = bag->nil;
bag->nil->index = WBNotFound;
bag->root = bag->nil;
bag->destructor = destructor;
bag->func = bagFunctions;
return bag;
}
static int getItemCount(WMBag *self)
int WMGetBagItemCount(WMBag * self)
{
return SELF->count;
return self->count;
}
static int appendBag(WMBag *self, WMBag *bag)
void WMAppendBag(WMBag * self, WMBag * bag)
{
WMBagIterator ptr;
void *data;
for (data = first(bag, &ptr); data != NULL; data = next(bag, &ptr)) {
if (!putInBag(self, data))
return 0;
for (data = WMBagFirst(bag, &ptr); data != NULL; data = WMBagNext(bag, &ptr)) {
WMPutInBag(self, data);
}
}
return 1;
}
static int putInBag(WMBag *self, void *item)
void WMPutInBag(WMBag * self, void *item)
{
W_Node *ptr;
ptr = wmalloc(sizeof(W_Node));
ptr->data = item;
ptr->index = SELF->count;
ptr->left = SELF->nil;
ptr->right = SELF->nil;
ptr->parent = SELF->nil;
ptr->index = self->count;
ptr->left = self->nil;
ptr->right = self->nil;
ptr->parent = self->nil;
rbTreeInsert(SELF, ptr);
rbTreeInsert(self, ptr);
SELF->count++;
return 1;
self->count++;
}
static int insertInBag(WMBag *self, int index, void *item)
void WMInsertInBag(WMBag * self, int index, void *item)
{
W_Node *ptr;
@@ -510,41 +407,38 @@ static int insertInBag(WMBag *self, int index, void *item)
ptr->data = item;
ptr->index = index;
ptr->left = SELF->nil;
ptr->right = SELF->nil;
ptr->parent = SELF->nil;
ptr->left = self->nil;
ptr->right = self->nil;
ptr->parent = self->nil;
rbTreeInsert(SELF, ptr);
rbTreeInsert(self, ptr);
while ((ptr = treeSuccessor(ptr, SELF->nil)) != SELF->nil) {
while ((ptr = treeSuccessor(ptr, self->nil)) != self->nil) {
ptr->index++;
}
SELF->count++;
return 1;
self->count++;
}
static int removeFromBag(WMBag *self, void *item)
int WMRemoveFromBag(WMBag * self, void *item)
{
W_Node *ptr = treeFind(SELF->root, SELF->nil, item);
W_Node *ptr = treeFind(self->root, self->nil, item);
if (ptr != SELF->nil) {
if (ptr != self->nil) {
W_Node *tmp;
SELF->count--;
self->count--;
tmp = treeSuccessor(ptr, SELF->nil);
while (tmp != SELF->nil) {
tmp = treeSuccessor(ptr, self->nil);
while (tmp != self->nil) {
tmp->index--;
tmp = treeSuccessor(tmp, SELF->nil);
tmp = treeSuccessor(tmp, self->nil);
}
ptr = rbTreeDelete(SELF, ptr);
free(ptr);
ptr = rbTreeDelete(self, ptr);
if (self->destructor)
self->destructor(ptr->data);
wfree(ptr);
return 1;
} else {
@@ -552,18 +446,20 @@ static int removeFromBag(WMBag *self, void *item)
}
}
static int eraseFromBag(WMBag *self, int index)
int WMEraseFromBag(WMBag * self, int index)
{
W_Node *ptr = treeSearch(SELF->root, SELF->nil, index);
W_Node *ptr = treeSearch(self->root, self->nil, index);
if (ptr != SELF->nil) {
if (ptr != self->nil) {
SELF->count--;
self->count--;
ptr = rbTreeDelete(SELF, ptr);
free(ptr);
ptr = rbTreeDelete(self, ptr);
if (self->destructor)
self->destructor(ptr->data);
wfree(ptr);
wassertrv(self->count == 0 || self->root->index >= 0, 1);
return 1;
} else {
@@ -571,24 +467,27 @@ static int eraseFromBag(WMBag *self, int index)
}
}
static int deleteFromBag(WMBag *self, int index)
int WMDeleteFromBag(WMBag * self, int index)
{
W_Node *ptr = treeSearch(SELF->root, SELF->nil, index);
W_Node *ptr = treeSearch(self->root, self->nil, index);
if (ptr != SELF->nil) {
if (ptr != self->nil) {
W_Node *tmp;
SELF->count--;
self->count--;
tmp = treeSuccessor(ptr, SELF->nil);
while (tmp != SELF->nil) {
tmp = treeSuccessor(ptr, self->nil);
while (tmp != self->nil) {
tmp->index--;
tmp = treeSuccessor(tmp, SELF->nil);
tmp = treeSuccessor(tmp, self->nil);
}
ptr = rbTreeDelete(SELF, ptr);
free(ptr);
ptr = rbTreeDelete(self, ptr);
if (self->destructor)
self->destructor(ptr->data);
wfree(ptr);
wassertrv(self->count == 0 || self->root->index >= 0, 1);
return 1;
} else {
@@ -596,33 +495,28 @@ static int deleteFromBag(WMBag *self, int index)
}
}
static void *getFromBag(WMBag *self, int index)
void *WMGetFromBag(WMBag * self, int index)
{
W_Node *node;
node = treeSearch(SELF->root, SELF->nil, index);
if (node != SELF->nil)
node = treeSearch(self->root, self->nil, index);
if (node != self->nil)
return node->data;
else
return NULL;
}
static int firstInBag(WMBag *self, void *item)
int WMGetFirstInBag(WMBag * self, void *item)
{
W_Node *node;
node = treeFind(SELF->root, SELF->nil, item);
if (node != SELF->nil)
node = treeFind(self->root, self->nil, item);
if (node != self->nil)
return node->index;
else
return WBNotFound;
}
static int treeCount(W_Node * root, W_Node * nil, void *item)
{
int count = 0;
@@ -642,25 +536,23 @@ static int treeCount(W_Node *root, W_Node *nil, void *item)
return count;
}
static int countInBag(WMBag *self, void *item)
int WMCountInBag(WMBag * self, void *item)
{
return treeCount(SELF->root, SELF->nil, item);
return treeCount(self->root, self->nil, item);
}
static void *replaceInBag(WMBag *self, int index, void *item)
void *WMReplaceInBag(WMBag * self, int index, void *item)
{
W_Node *ptr = treeSearch(SELF->root, SELF->nil, index);
W_Node *ptr = treeSearch(self->root, self->nil, index);
void *old = NULL;
if (item == NULL) {
SELF->count--;
ptr = rbTreeDelete(SELF, ptr);
free(ptr);
} else if (ptr != SELF->nil) {
self->count--;
ptr = rbTreeDelete(self, ptr);
if (self->destructor)
self->destructor(ptr->data);
wfree(ptr);
} else if (ptr != self->nil) {
old = ptr->data;
ptr->data = item;
} else {
@@ -670,58 +562,52 @@ static void *replaceInBag(WMBag *self, int index, void *item)
ptr->data = item;
ptr->index = index;
ptr->left = SELF->nil;
ptr->right = SELF->nil;
ptr->parent = SELF->nil;
ptr->left = self->nil;
ptr->right = self->nil;
ptr->parent = self->nil;
rbTreeInsert(SELF, ptr);
rbTreeInsert(self, ptr);
SELF->count++;
self->count++;
}
return old;
}
static int sortBag(WMBag *self, int (*comparer)(const void*, const void*))
void WMSortBag(WMBag * self, WMCompareDataProc * comparer)
{
void **items;
W_Node *tmp;
int i;
if (self->count == 0)
return;
items = wmalloc(sizeof(void*)*SELF->count);
items = wmalloc(sizeof(void *) * self->count);
i = 0;
tmp = treeMinimum(SELF->root, SELF->nil);
while (tmp != SELF->nil) {
tmp = treeMinimum(self->root, self->nil);
while (tmp != self->nil) {
items[i++] = tmp->data;
tmp = treeSuccessor(tmp, SELF->nil);
tmp = treeSuccessor(tmp, self->nil);
}
qsort(&items[0], SELF->count, sizeof(void*), comparer);
qsort(&items[0], self->count, sizeof(void *), comparer);
i = 0;
tmp = treeMinimum(SELF->root, SELF->nil);
while (tmp != SELF->nil) {
tmp = treeMinimum(self->root, self->nil);
while (tmp != self->nil) {
tmp->index = i;
tmp->data = items[i++];
tmp = treeSuccessor(tmp, SELF->nil);
tmp = treeSuccessor(tmp, self->nil);
}
wfree(items);
return 1;
}
static void deleteTree(WMBag * self, W_Node * node)
{
if (node == SELF->nil)
if (node == self->nil)
return;
deleteTree(self, node->left);
@@ -731,29 +617,24 @@ static void deleteTree(WMBag *self, W_Node *node)
deleteTree(self, node->right);
free(node);
wfree(node);
}
static void emptyBag(WMBag *self)
void WMEmptyBag(WMBag * self)
{
deleteTree(self, SELF->root);
SELF->root = SELF->nil;
SELF->count = 0;
deleteTree(self, self->root);
self->root = self->nil;
self->count = 0;
}
static void freeBag(WMBag *self)
void WMFreeBag(WMBag * self)
{
emptyBag(self);
free(self);
WMEmptyBag(self);
wfree(self->nil);
wfree(self);
}
static void mapTree(W_TreeBag *tree, W_Node *node,
void (*function)(void*, void*), void *data)
static void mapTree(W_Bag * tree, W_Node * node, void (*function) (void *, void *), void *data)
{
if (node == tree->nil)
return;
@@ -765,132 +646,108 @@ static void mapTree(W_TreeBag *tree, W_Node *node,
mapTree(tree, node->right, function, data);
}
static void mapBag(WMBag *self, void (*function)(void*, void*), void *data)
void WMMapBag(WMBag * self, void (*function) (void *, void *), void *data)
{
mapTree(SELF, SELF->root, function, data);
mapTree(self, self->root, function, data);
}
static int findInTree(W_TreeBag *tree, W_Node *node, int (*function)(void*))
static int findInTree(W_Bag * tree, W_Node * node, WMMatchDataProc * function, void *cdata)
{
int index;
if (node == tree->nil)
return WBNotFound;
index = findInTree(tree, node->left, function);
index = findInTree(tree, node->left, function, cdata);
if (index != WBNotFound)
return index;
if ((*function)(node->data)) {
if ((*function) (node->data, cdata)) {
return node->index;
}
return findInTree(tree, node->right, function);
return findInTree(tree, node->right, function, cdata);
}
static int findInBag(WMBag *self, int (*match)(void*))
int WMFindInBag(WMBag * self, WMMatchDataProc * match, void *cdata)
{
return findInTree(SELF, SELF->root, match);
return findInTree(self, self->root, match, cdata);
}
static void *first(WMBag *self, WMBagIterator *ptr)
void *WMBagFirst(WMBag * self, WMBagIterator * ptr)
{
W_Node *node;
node = treeMinimum(SELF->root, SELF->nil);
node = treeMinimum(self->root, self->nil);
if (node == SELF->nil) {
if (node == self->nil) {
*ptr = NULL;
return NULL;
} else {
*ptr = node;
return node->data;
}
}
static void *last(WMBag *self, WMBagIterator *ptr)
void *WMBagLast(WMBag * self, WMBagIterator * ptr)
{
W_Node *node;
node = treeMaximum(SELF->root, SELF->nil);
node = treeMaximum(self->root, self->nil);
if (node == SELF->nil) {
if (node == self->nil) {
*ptr = NULL;
return NULL;
} else {
*ptr = node;
return node->data;
}
}
static void *next(WMBag *self, WMBagIterator *ptr)
void *WMBagNext(WMBag * self, WMBagIterator * ptr)
{
W_Node *node;
if (*ptr == NULL)
return NULL;
node = treeSuccessor(*ptr, SELF->nil);
node = treeSuccessor(*ptr, self->nil);
if (node == SELF->nil) {
if (node == self->nil) {
*ptr = NULL;
return NULL;
} else {
*ptr = node;
return node->data;
}
}
static void *previous(WMBag *self, WMBagIterator *ptr)
void *WMBagPrevious(WMBag * self, WMBagIterator * ptr)
{
W_Node *node;
if (*ptr == NULL)
return NULL;
node = treePredecessor(*ptr, SELF->nil);
node = treePredecessor(*ptr, self->nil);
if (node == SELF->nil) {
if (node == self->nil) {
*ptr = NULL;
return NULL;
} else {
*ptr = node;
return node->data;
}
}
static void *iteratorAtIndex(WMBag *self, int index, WMBagIterator *ptr)
void *WMBagIteratorAtIndex(WMBag * self, int index, WMBagIterator * ptr)
{
W_Node *node;
node = treeSearch(SELF->root, SELF->nil, index);
node = treeSearch(self->root, self->nil, index);
if (node == SELF->nil) {
if (node == self->nil) {
*ptr = NULL;
return NULL;
} else {
@@ -899,9 +756,7 @@ static void *iteratorAtIndex(WMBag *self, int index, WMBagIterator *ptr)
}
}
static int indexForIterator(WMBag *bag, WMBagIterator ptr)
int WMBagIndexForIterator(WMBag * bag, WMBagIterator ptr)
{
return ((W_Node *) ptr)->index;
}

View File

@@ -1,48 +1,93 @@
#include "WINGsP.h"
#include "wconfig.h"
#include <proplist.h>
#include <X11/Xlocale.h>
_WINGsConfiguration WINGsConfiguration;
#define SYSTEM_FONT "Trebuchet MS,sans serif"
#define BOLD_SYSTEM_FONT "Trebuchet MS,sans serif:bold"
#define DEFAULT_FONT_SIZE 12
#define FLOPPY_PATH "/floppy"
#define SYSTEM_FONT "-*-helvetica-medium-r-normal-*-%d-*-*-*-*-*-*-*,-*-*-medium-r-*-*-%d-*-*-*-*-*-*-*"
static unsigned getButtonWithName(const char *name, unsigned defaultButton)
{
if (strncmp(name, "Button", 6) == 0 && strlen(name) == 7) {
switch (name[6]) {
case '1':
return Button1;
case '2':
return Button2;
case '3':
return Button3;
case '4':
return Button4;
case '5':
return Button5;
default:
break;
}
}
#define BOLD_SYSTEM_FONT "-*-helvetica-bold-r-normal-*-%d-*-*-*-*-*-*-*,-*-*-bold-r-*-*-%d-*-*-*-*-*-*-*"
return defaultButton;
}
void
W_ReadConfigurations(void)
void W_ReadConfigurations(void)
{
WMUserDefaults *defaults;
Bool aaIsSet = False;
memset(&WINGsConfiguration, 0, sizeof(_WINGsConfiguration));
defaults = WMGetStandardUserDefaults();
if (defaults) {
WINGsConfiguration.systemFont =
WMGetUDStringForKey(defaults, "SystemFont");
char *buttonName;
WMPropList *val;
unsigned button;
WINGsConfiguration.boldSystemFont =
WMGetUDStringForKey(defaults, "BoldSystemFont");
WINGsConfiguration.systemFont = WMGetUDStringForKey(defaults, "SystemFont");
WINGsConfiguration.useMultiByte =
WMGetUDBoolForKey(defaults, "MultiByteText");
WINGsConfiguration.boldSystemFont = WMGetUDStringForKey(defaults, "BoldSystemFont");
WINGsConfiguration.doubleClickDelay =
WMGetUDIntegerForKey(defaults, "DoubleClickTime");
WINGsConfiguration.defaultFontSize =
WMGetUDIntegerForKey(defaults, "DefaultFontSize");
val = WMGetUDObjectForKey(defaults, "AntialiasedText");
if (val && WMIsPLString(val) && WMGetFromPLString(val)) {
aaIsSet = True;
WINGsConfiguration.antialiasedText =
WMGetUDBoolForKey(defaults, "AntialiasedText");
}
WINGsConfiguration.doubleClickDelay = WMGetUDIntegerForKey(defaults, "DoubleClickTime");
WINGsConfiguration.floppyPath = WMGetUDStringForKey(defaults, "FloppyPath");
buttonName = WMGetUDStringForKey(defaults, "MouseWheelUp");
if (buttonName) {
button = getButtonWithName(buttonName, Button4);
wfree(buttonName);
} else {
button = Button4;
}
WINGsConfiguration.mouseWheelUp = button;
buttonName = WMGetUDStringForKey(defaults, "MouseWheelDown");
if (buttonName) {
button = getButtonWithName(buttonName, Button5);
wfree(buttonName);
} else {
button = Button5;
}
WINGsConfiguration.mouseWheelDown = button;
if (WINGsConfiguration.mouseWheelDown == WINGsConfiguration.mouseWheelUp) {
WINGsConfiguration.mouseWheelUp = Button4;
WINGsConfiguration.mouseWheelDown = Button5;
}
WINGsConfiguration.defaultFontSize = WMGetUDIntegerForKey(defaults, "DefaultFontSize");
}
if (!WINGsConfiguration.systemFont) {
WINGsConfiguration.systemFont = SYSTEM_FONT;
@@ -50,12 +95,23 @@ W_ReadConfigurations(void)
if (!WINGsConfiguration.boldSystemFont) {
WINGsConfiguration.boldSystemFont = BOLD_SYSTEM_FONT;
}
if (WINGsConfiguration.defaultFontSize == 0) {
WINGsConfiguration.defaultFontSize = DEFAULT_FONT_SIZE;
}
if (!aaIsSet) {
WINGsConfiguration.antialiasedText = True;
}
if (!WINGsConfiguration.floppyPath) {
WINGsConfiguration.floppyPath = FLOPPY_PATH;
}
if (WINGsConfiguration.doubleClickDelay == 0) {
WINGsConfiguration.doubleClickDelay = 250;
}
if (WINGsConfiguration.defaultFontSize == 0) {
WINGsConfiguration.defaultFontSize = 12;
if (WINGsConfiguration.mouseWheelUp == 0) {
WINGsConfiguration.mouseWheelUp = Button4;
}
if (WINGsConfiguration.mouseWheelDown == 0) {
WINGsConfiguration.mouseWheelDown = Button5;
}
}

View File

@@ -1,209 +0,0 @@
/*
* WINGs connect.c: example how to create a network client using WMConnection
*
* Copyright (c) 1999 Dan Pascu
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include "WINGs.h"
static int initialized = 0;
static void didReceiveInput(ConnectionDelegate *self, WMConnection *cPtr);
static void connectionDidDie(ConnectionDelegate *self, WMConnection *cPtr);
static void didInitialize(ConnectionDelegate *self, WMConnection *cPtr);
static ConnectionDelegate socketDelegate = {
NULL, /* data */
NULL, /* didCatchException */
connectionDidDie, /* didDie */
didInitialize, /* didInitialize */
didReceiveInput, /* didReceiveInput */
NULL /* didTimeout */
};
void
wAbort(Bool foo) /*FOLD00*/
{
exit(1);
}
static char*
getMessage(WMConnection *cPtr)
{
char *buffer;
WMData *aData;
int length;
aData = WMGetConnectionAvailableData(cPtr);
if (!aData)
return NULL;
if ((length=WMGetDataLength(aData))==0) {
WMReleaseData(aData);
return NULL;
}
buffer = (char*)wmalloc(length+1);
WMGetDataBytes(aData, buffer);
buffer[length]= '\0';
WMReleaseData(aData);
return buffer;
}
static void
inputHandler(int fd, int mask, void *clientData)
{
WMConnection *cPtr = (WMConnection*)clientData;
WMData *aData;
char buf[4096];
int n;
if (!initialized)
return;
n = read(fd, buf, 4096);
if (n>0) {
aData = WMCreateDataWithBytes(buf, n);
WMSendConnectionData(cPtr, aData);
WMReleaseData(aData);
}
}
static void
didReceiveInput(ConnectionDelegate *self, WMConnection *cPtr) /*FOLD00*/
{
char *buffer;
buffer = getMessage(cPtr);
if (!buffer) {
fprintf(stderr, "Connection closed by peer.\n");
exit(0);
}
printf("%s", buffer);
wfree(buffer);
}
static void
connectionDidDie(ConnectionDelegate *self, WMConnection *cPtr) /*FOLD00*/
{
WMCloseConnection(cPtr);
fprintf(stderr, "Connection closed by peer.\n");
exit(0);
}
static void
didInitialize(ConnectionDelegate *self, WMConnection *cPtr)
{
int state = WMGetConnectionState(cPtr);
WMHost *host;
if (state == WCConnected) {
host = WMGetHostWithAddress(WMGetConnectionAddress(cPtr));
fprintf(stderr, "connected to '%s:%s'\n",
host?WMGetHostName(host):WMGetConnectionAddress(cPtr),
WMGetConnectionService(cPtr));
initialized = 1;
if (host)
WMReleaseHost(host);
return;
} else {
wsyserrorwithcode(WCErrorCode, "Unable to connect");
exit(1);
}
}
int
main(int argc, char **argv) /*FOLD00*/
{
char *ProgName, *host, *port;
int i;
WMConnection *sPtr;
wsetabort(wAbort);
WMInitializeApplication("connect", &argc, argv);
ProgName = strrchr(argv[0],'/');
if (!ProgName)
ProgName = argv[0];
else
ProgName++;
host = NULL;
port = "7000";
if (argc>1) {
for (i=1; i<argc; i++) {
if (strcmp(argv[i], "--help")==0 || strcmp(argv[i], "-h")==0) {
printf("usage: %s [host [port]]\n\n", ProgName);
exit(0);
} else {
if (!host)
host = argv[i];
else
port = argv[i];
}
}
}
printf("Trying to make connection to '%s:%s'\n",
host?host:"localhost", port);
sPtr = WMCreateConnectionToAddressAndNotify(host, port, NULL);
if (!sPtr) {
wfatal("could not create connection. exiting");
exit(1);
}
WMSetConnectionDelegate(sPtr, &socketDelegate);
/* watch what user types and send it over the connection */
WMAddInputHandler(0, WIReadMask, inputHandler, sPtr);
while (1) {
WHandleEvents();
}
return 0;
}

View File

@@ -1,939 +0,0 @@
/*
* WINGs WMConnection function library
*
* Copyright (c) 1999 Dan Pascu
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* TODO:
* - decide if we want to support connections with external sockets, else
* clean up the structure of the unneeded members.
*
*/
#include "../src/config.h"
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <errno.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <signal.h>
#ifdef __FreeBSD__
#include <sys/signal.h>
#endif
#include "WINGs.h"
/* Some older systems does not define this (linux libc5, maybe others too) */
#ifndef SHUT_RDWR
# define SHUT_RDWR 2
#endif
/* for SunOS */
#ifndef SA_RESTART
# define SA_RESTART 0
#endif
/* Stuff for setting the sockets into non-blocking mode. */
/*#ifdef __POSIX_SOURCE
# define NONBLOCK_OPT O_NONBLOCK
#else
# define NONBLOCK_OPT FNDELAY
#endif*/
#define NONBLOCK_OPT O_NONBLOCK
#define NETBUF_SIZE 4096
#define DEF_TIMEOUT 600 /* 600 seconds == 10 minutes */
int WCErrorCode = 0;
static Bool SigInitialized = False;
typedef struct TimeoutData {
unsigned timeout;
WMHandlerID *handler;
} TimeoutData;
typedef struct W_Connection {
int sock; /* the socket we speak through */
struct {
WMHandlerID *read; /* the input read handler */
WMHandlerID *write; /* the input write handler */
WMHandlerID *exception; /* the input exception handler */
} handler;
ConnectionDelegate *delegate; /* client delegates */
void *clientData; /* client data */
unsigned int uflags; /* flags for the client */
WMBag *outputQueue;
unsigned bufPos;
TimeoutData sendTimeout;
WMConnectionState state;
char *address;
char *service;
char *protocol;
Bool closeOnRelease;
Bool wasNonBlocking;
Bool isNonBlocking;
} W_Connection;
static void
clearOutputQueue(WMConnection *cPtr) /*FOLD00*/
{
int i;
cPtr->bufPos = 0;
for (i=0; i<WMGetBagItemCount(cPtr->outputQueue); i++)
WMReleaseData(WMGetFromBag(cPtr->outputQueue, i));
WMEmptyBag(cPtr->outputQueue);
}
static void
sendTimeout(void *cdata) /*FOLD00*/
{
WMConnection *cPtr = (WMConnection*) cdata;
TimeoutData *tPtr = &cPtr->sendTimeout;
tPtr->handler = NULL;
if (cPtr->handler.write) {
WMDeleteInputHandler(cPtr->handler.write);
cPtr->handler.write = NULL;
}
if (WMGetBagItemCount(cPtr->outputQueue)>0) {
clearOutputQueue(cPtr);
if (cPtr->delegate && cPtr->delegate->didTimeout)
(*cPtr->delegate->didTimeout)(cPtr->delegate, cPtr);
}
}
static void
inputHandler(int fd, int mask, void *clientData) /*FOLD00*/
{
WMConnection *cPtr = (WMConnection*)clientData;
if (cPtr->state==WCClosed || cPtr->state==WCDied)
return;
if ((mask & WIWriteMask)) {
if (cPtr->state == WCInProgress) {
int result;
int len = sizeof(result);
if (getsockopt(cPtr->sock, SOL_SOCKET, SO_ERROR,
(void*)&result, &len) == 0 && result != 0) {
cPtr->state = WCFailed;
WCErrorCode = result;
/* should call wsyserrorwithcode(result, ...) here? */
} else {
cPtr->state = WCConnected;
}
if (cPtr->handler.write) {
WMDeleteInputHandler(cPtr->handler.write);
cPtr->handler.write = NULL;
}
if (cPtr->delegate && cPtr->delegate->didInitialize)
(*cPtr->delegate->didInitialize)(cPtr->delegate, cPtr);
if (cPtr->state == WCFailed)
return;
} else if (cPtr->state == WCConnected) {
WMFlushConnection(cPtr);
}
}
if (!cPtr->delegate)
return;
/* if the connection died, may get destroyed in the delegate, so retain */
wretain(cPtr);
if ((mask & WIReadMask) && cPtr->delegate->didReceiveInput)
(*cPtr->delegate->didReceiveInput)(cPtr->delegate, cPtr);
if ((mask & WIExceptMask) && cPtr->delegate->didCatchException)
(*cPtr->delegate->didCatchException)(cPtr->delegate, cPtr);
wrelease(cPtr);
}
static Bool
setSocketNonBlocking(int sock, Bool flag) /*FOLD00*/
{
int state;
Bool isNonBlock;
state = fcntl(sock, F_GETFL, 0);
if (state < 0) {
wsyserror("Failed to get socket flags with fcntl.");
return False;
}
isNonBlock = (state & NONBLOCK_OPT) != 0;
if (flag) {
if (isNonBlock)
return True;
state |= NONBLOCK_OPT;
} else {
if (!isNonBlock)
return True;
state &= ~NONBLOCK_OPT;
}
if (fcntl(sock, F_SETFL, state) < 0) {
wsyserror("Failed to set socket flags with fcntl.");
return False;
}
return True;
}
static void
setConnectionAddress(WMConnection *cPtr, struct sockaddr_in *socketaddr) /*FOLD00*/
{
wassertr(cPtr->address==NULL);
cPtr->address = wstrdup(inet_ntoa(socketaddr->sin_addr));
cPtr->service = wmalloc(16);
sprintf(cPtr->service, "%hu", ntohs(socketaddr->sin_port));
cPtr->protocol = wstrdup("tcp");
}
static struct sockaddr_in*
getSocketAddress(char* name, char* service, char* protocol) /*FOLD00*/
{
static struct sockaddr_in socketaddr;
struct servent *sp;
if (!protocol || protocol[0]=='\0')
protocol = "tcp";
memset(&socketaddr, 0, sizeof(struct sockaddr_in));
socketaddr.sin_family = AF_INET;
/*
* If we were given a hostname, we use any address for that host.
* Otherwise we expect the given name to be an address unless it is
* NULL (any address).
*/
if (name && name[0]!='\0') {
WMHost *host = WMGetHostWithName(name);
if (!host)
return NULL; /* name is not a hostname nor a number and dot adr */
name = WMGetHostAddress(host);
#ifndef HAVE_INET_ATON
if ((socketaddr.sin_addr.s_addr = inet_addr(name)) == INADDR_NONE) {
#else
if (inet_aton(name, &socketaddr.sin_addr) == 0) {
#endif
WMReleaseHost(host);
return NULL;
}
WMReleaseHost(host);
} else {
socketaddr.sin_addr.s_addr = htonl(INADDR_ANY);
}
if (!service || service[0]=='\0') {
socketaddr.sin_port = 0;
} else if ((sp = getservbyname(service, protocol))==0) {
char *endptr;
unsigned portNumber;
portNumber = strtoul(service, &endptr, 10);
if (service[0]!='\0' && *endptr=='\0' && portNumber<65536) {
socketaddr.sin_port = htons(portNumber);
} else {
return NULL;
}
} else {
socketaddr.sin_port = sp->s_port;
}
return &socketaddr;
}
static WMConnection*
createConnectionWithSocket(int sock, Bool closeOnRelease) /*FOLD00*/
{
WMConnection *cPtr;
struct sigaction sig_action;
cPtr = wmalloc(sizeof(WMConnection));
wretain(cPtr);
memset(cPtr, 0, sizeof(WMConnection));
cPtr->sock = sock;
cPtr->sendTimeout.timeout = DEF_TIMEOUT;
cPtr->sendTimeout.handler = NULL;
cPtr->closeOnRelease = closeOnRelease;
cPtr->outputQueue = WMCreateBag(16);
cPtr->state = WCNotConnected;
/* ignore dead pipe */
if (!SigInitialized) {
sig_action.sa_handler = SIG_IGN;
sig_action.sa_flags = SA_RESTART;
sigaction(SIGPIPE, &sig_action, NULL);
SigInitialized = True;
}
return cPtr;
}
#if 0
WMConnection*
WMCreateConnectionWithSocket(int sock, Bool closeOnRelease) /*FOLD00*/
{
WMConnection *cPtr;
struct sockaddr_in clientname;
int size, n;
cPtr = createConnectionWithSocket(sock, closeOnRelease);
cPtr->wasNonBlocking = WMIsConnectionNonBlocking(cPtr);
cPtr->isNonBlocking = cPtr->wasNonBlocking;
/* some way to find out if it is connected, and binded. can't find
if it listens though!!!
*/
size = sizeof(clientname);
n = getpeername(sock, (struct sockaddr*) &clientname, &size);
if (n==0) {
/* Since we have a peer, it means we are connected */
cPtr->state = WCConnected;
} else {
size = sizeof(clientname);
n = getsockname(sock, (struct sockaddr*) &clientname, &size);
if (n==0) {
/* We don't have a peer, but we are binded to an address.
* Assume we are listening on it (we don't know that for sure!)
*/
cPtr->state = WCListening;
} else {
cPtr->state = WCNotConnected;
}
}
return cPtr;
}
#endif
/*
* host is the name on which we want to listen for incoming connections,
* and it must be a name of this host, or NULL if we want to listen
* on any incoming address.
* service is either a service name as present in /etc/services, or the port
* number we want to listen on. If NULL, a random port between
* 1024 and 65535 will be assigned to us.
* protocol is one of "tcp" or "udp". If NULL, "tcp" will be used by default.
* currently only "tcp" is supported.
*/
WMConnection*
WMCreateConnectionAsServerAtAddress(char *host, char *service, char *protocol) /*FOLD00*/
{
WMConnection *cPtr;
struct sockaddr_in *socketaddr;
int sock, size, on;
if ((socketaddr = getSocketAddress(host, service, protocol)) == NULL) {
WCErrorCode = 0;
wwarning("Bad address-service-protocol combination");
return NULL;
}
/* Create the actual socket */
sock = socket(PF_INET, SOCK_STREAM, 0);
if (sock<0) {
WCErrorCode = errno;
wsyserror("Unable to create socket");
return NULL;
}
/*
* Set socket options. We try to make the port reusable and have it
* close as fast as possible without waiting in unnecessary wait states
* on close.
*/
on = 1;
setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void *)&on, sizeof(on));
if (bind(sock, (struct sockaddr *)socketaddr, sizeof(*socketaddr)) < 0) {
WCErrorCode = errno;
wsyserror("Unable to bind to address '%s:%hu'",
inet_ntoa(socketaddr->sin_addr),
ntohs(socketaddr->sin_port));
close(sock);
return NULL;
}
if (listen(sock, 10) < 0) {
WCErrorCode = errno;
wsyserror("Unable to listen on port '%hu'",
ntohs(socketaddr->sin_port));
close(sock);
return NULL;
}
/* Find out what is the address/service/protocol we get */
/* In case some of address/service/protocol were NULL */
size = sizeof(*socketaddr);
if (getsockname(sock, (struct sockaddr*)socketaddr, &size) < 0) {
WCErrorCode = errno;
wsyserror("Unable to get socket address");
close(sock);
return NULL;
}
cPtr = createConnectionWithSocket(sock, True);
cPtr->state = WCListening;
WMSetConnectionNonBlocking(cPtr, True);
setConnectionAddress(cPtr, socketaddr);
return cPtr;
}
WMConnection*
WMCreateConnectionToAddress(char *host, char *service, char *protocol) /*FOLD00*/
{
WMConnection *cPtr;
struct sockaddr_in *socketaddr;
int sock;
if (service==NULL || service[0]=='\0') {
WCErrorCode = 0;
wwarning("Bad argument - service is not specified");
return NULL;
}
if (host==NULL || host[0]=='\0')
host = "localhost";
if ((socketaddr = getSocketAddress(host, service, protocol)) == NULL) {
WCErrorCode = 0;
wwarning("Bad address-service-protocol combination");
return NULL;
}
/* Create the actual socket */
sock = socket(PF_INET, SOCK_STREAM, 0);
if (sock<0) {
WCErrorCode = errno;
wsyserror("Unable to create socket");
return NULL;
}
/* make socket blocking while we connect. */
setSocketNonBlocking(sock, False);
if (connect(sock, (struct sockaddr*)socketaddr, sizeof(*socketaddr)) < 0) {
WCErrorCode = errno;
wsyserror("Unable to make connection to address '%s:%hu'",
inet_ntoa(socketaddr->sin_addr),
ntohs(socketaddr->sin_port));
close(sock);
return NULL;
}
cPtr = createConnectionWithSocket(sock, True);
cPtr->state = WCConnected;
WMSetConnectionNonBlocking(cPtr, True);
setConnectionAddress(cPtr, socketaddr);
return cPtr;
}
WMConnection*
WMCreateConnectionToAddressAndNotify(char *host, char *service, char *protocol) /*FOLD00*/
{
WMConnection *cPtr;
/*TimeoutData *tPtr;*/
struct sockaddr_in *socketaddr;
int sock;
Bool isNonBlocking;
if (service==NULL || service[0]=='\0') {
WCErrorCode = 0;
wwarning("Bad argument - service is not specified");
return NULL;
}
if (host==NULL || host[0]=='\0')
host = "localhost";
if ((socketaddr = getSocketAddress(host, service, protocol)) == NULL) {
WCErrorCode = 0;
wwarning("Bad address-service-protocol combination");
return NULL;
}
/* Create the actual socket */
sock = socket(PF_INET, SOCK_STREAM, 0);
if (sock<0) {
WCErrorCode = errno;
wsyserror("Unable to create socket");
return NULL;
}
isNonBlocking = setSocketNonBlocking(sock, True);
if (connect(sock, (struct sockaddr*)socketaddr, sizeof(*socketaddr)) < 0) {
if (errno!=EINPROGRESS) {
WCErrorCode = errno;
wsyserror("Unable to make connection to address '%s:%hu'",
inet_ntoa(socketaddr->sin_addr),
ntohs(socketaddr->sin_port));
close(sock);
return NULL;
}
}
cPtr = createConnectionWithSocket(sock, True);
cPtr->state = WCInProgress;
cPtr->isNonBlocking = isNonBlocking;
/*tPtr = &cPtr->sendTimeout;
tPtr->handler = WMAddTimerHandler(tPtr->timeout*1000, connectTimeout, cPtr);
*/
cPtr->handler.write = WMAddInputHandler(cPtr->sock, WIWriteMask,
inputHandler, cPtr);
setConnectionAddress(cPtr, socketaddr);
return cPtr;
}
static void
removeAllHandlers(WMConnection *cPtr) /*FOLD00*/
{
if (cPtr->handler.read)
WMDeleteInputHandler(cPtr->handler.read);
if (cPtr->handler.write)
WMDeleteInputHandler(cPtr->handler.write);
if (cPtr->handler.exception)
WMDeleteInputHandler(cPtr->handler.exception);
if (cPtr->sendTimeout.handler)
WMDeleteTimerHandler(cPtr->sendTimeout.handler);
cPtr->handler.read = NULL;
cPtr->handler.write = NULL;
cPtr->handler.exception = NULL;
cPtr->sendTimeout.handler = NULL;
}
void
WMDestroyConnection(WMConnection *cPtr) /*FOLD00*/
{
if (cPtr->closeOnRelease && cPtr->sock>=0) {
shutdown(cPtr->sock, SHUT_RDWR);
close(cPtr->sock);
}
removeAllHandlers(cPtr);
clearOutputQueue(cPtr);
WMFreeBag(cPtr->outputQueue);
if (cPtr->address) {
wfree(cPtr->address);
wfree(cPtr->service);
wfree(cPtr->protocol);
}
wrelease(cPtr);
}
void
WMCloseConnection(WMConnection *cPtr) /*FOLD00*/
{
if (cPtr->sock>=0) {
shutdown(cPtr->sock, SHUT_RDWR);
close(cPtr->sock);
cPtr->sock = -1;
}
removeAllHandlers(cPtr);
clearOutputQueue(cPtr);
cPtr->state = WCClosed;
}
WMConnection*
WMAcceptConnection(WMConnection *listener) /*FOLD00*/
{
struct sockaddr_in clientname;
int size;
int newSock;
WMConnection *newConnection;
if (listener->state!=WCListening) {
wwarning("Called 'WMAcceptConnection()' on a non-listening connection");
WCErrorCode = 0;
return NULL;
}
size = sizeof(clientname);
newSock = accept(listener->sock, (struct sockaddr*) &clientname, &size);
if (newSock<0) {
if (errno!=EAGAIN && errno!=EWOULDBLOCK) {
WCErrorCode = errno;
wsyserror("Could not accept connection");
} else {
WCErrorCode = 0;
}
return NULL;
}
newConnection = createConnectionWithSocket(newSock, True);
WMSetConnectionNonBlocking(newConnection, True);
newConnection->state = WCConnected;
setConnectionAddress(newConnection, &clientname);
return newConnection;
}
char*
WMGetConnectionAddress(WMConnection *cPtr) /*FOLD00*/
{
return cPtr->address;
}
char*
WMGetConnectionService(WMConnection *cPtr) /*FOLD00*/
{
return cPtr->service;
}
char*
WMGetConnectionProtocol(WMConnection *cPtr)
{
return cPtr->protocol;
}
int
WMGetConnectionSocket(WMConnection *cPtr) /*FOLD00*/
{
return cPtr->sock;
}
WMConnectionState
WMGetConnectionState(WMConnection *cPtr) /*FOLD00*/
{
return cPtr->state;
}
Bool
WMEnqueueConnectionData(WMConnection *cPtr, WMData *data) /*FOLD00*/
{
wassertrv(cPtr->state!=WCNotConnected && cPtr->state!=WCListening, False);
wassertrv(cPtr->state!=WCInProgress && cPtr->state!=WCFailed, False);
if (cPtr->state!=WCConnected)
return False;
WMPutInBag(cPtr->outputQueue, WMRetainData(data));
return True;
}
int
WMSendConnectionData(WMConnection *cPtr, WMData *data) /*FOLD00*/
{
int bytes, pos, len, totalTransfer;
TimeoutData *tPtr = &cPtr->sendTimeout;
const unsigned char *dataBytes;
wassertrv(cPtr->state!=WCNotConnected && cPtr->state!=WCListening, -1);
wassertrv(cPtr->state!=WCInProgress && cPtr->state!=WCFailed, -1);
if (cPtr->state!=WCConnected)
return -1;
/* If we have no data just flush the queue, else try to send data */
if (data && WMGetDataLength(data)>0) {
WMPutInBag(cPtr->outputQueue, WMRetainData(data));
/* If there already was something in queue, and also a write input
* handler is established, it means we were unable to send, so
* return and let the write handler notify us when we can send.
*/
if (WMGetBagItemCount(cPtr->outputQueue)>1 && cPtr->handler.write)
return 0;
}
totalTransfer = 0;
while (WMGetBagItemCount(cPtr->outputQueue) > 0) {
data = WMGetFromBag(cPtr->outputQueue, 0);
dataBytes = (const unsigned char *)WMDataBytes(data);
len = WMGetDataLength(data);
pos = cPtr->bufPos; /* where we're left last time */
while(pos < len) {
again:
bytes = write(cPtr->sock, dataBytes+pos, len - pos);
if(bytes<0) {
switch (errno) {
case EINTR:
goto again;
case EWOULDBLOCK:
/* save the position where we're left and add a timeout */
cPtr->bufPos = pos;
if (!tPtr->handler) {
tPtr->handler = WMAddTimerHandler(tPtr->timeout*1000,
sendTimeout, cPtr);
}
if (!cPtr->handler.write) {
cPtr->handler.write =
WMAddInputHandler(cPtr->sock, WIWriteMask,
inputHandler, cPtr);
}
return totalTransfer;
default:
WCErrorCode = errno;
cPtr->state = WCDied;
/*clearOutputQueue(cPtr);*/
removeAllHandlers(cPtr);
if (cPtr->delegate && cPtr->delegate->didDie)
(*cPtr->delegate->didDie)(cPtr->delegate, cPtr);
return -1;
}
}
pos += bytes;
totalTransfer += bytes;
}
WMReleaseData(data);
WMDeleteFromBag(cPtr->outputQueue, 0);
cPtr->bufPos = 0;
if (tPtr->handler) {
WMDeleteTimerHandler(tPtr->handler);
tPtr->handler = NULL;
}
if (cPtr->handler.write) {
WMDeleteInputHandler(cPtr->handler.write);
cPtr->handler.write = NULL;
}
}
return totalTransfer;
}
/*
* WMGetConnectionAvailableData(connection):
*
* will return a WMData structure containing the available data on the
* specified connection. If connection is non-blocking (default) and no data
* is available when this function is called, an empty WMData is returned.
*
* If an error occurs while reading or the other side closed connection,
* it will return NULL.
* Also trying to read from an already died or closed connection is
* considered to be an error condition, and will return NULL.
*/
WMData*
WMGetConnectionAvailableData(WMConnection *cPtr) /*FOLD00*/
{
char buffer[NETBUF_SIZE];
int nbytes;
WMData *aData;
wassertrv(cPtr->state!=WCNotConnected && cPtr->state!=WCListening, NULL);
wassertrv(cPtr->state!=WCInProgress && cPtr->state!=WCFailed, NULL);
if (cPtr->state!=WCConnected)
return NULL;
aData = NULL;
again:
nbytes = read(cPtr->sock, buffer, NETBUF_SIZE);
if (nbytes<0) {
switch (errno) {
case EINTR:
goto again;
case EWOULDBLOCK:
aData = WMCreateDataWithCapacity(0);
break;
default:
WCErrorCode = errno;
cPtr->state = WCDied;
removeAllHandlers(cPtr);
if (cPtr->delegate && cPtr->delegate->didDie)
(*cPtr->delegate->didDie)(cPtr->delegate, cPtr);
break;
}
} else if (nbytes==0) { /* the other side has closed connection */
cPtr->state = WCClosed;
removeAllHandlers(cPtr);
if (cPtr->delegate && cPtr->delegate->didDie)
(*cPtr->delegate->didDie)(cPtr->delegate, cPtr);
} else {
aData = WMCreateDataWithBytes(buffer, nbytes);
}
return aData;
}
void
WMSetConnectionDelegate(WMConnection *cPtr, ConnectionDelegate *delegate) /*FOLD00*/
{
wassertr(cPtr->sock >= 0);
/* Don't try to set the delegate multiple times */
wassertr(cPtr->delegate == NULL);
cPtr->delegate = delegate;
if (delegate && delegate->didReceiveInput && !cPtr->handler.read)
cPtr->handler.read = WMAddInputHandler(cPtr->sock, WIReadMask,
inputHandler, cPtr);
if (delegate && delegate->didCatchException && !cPtr->handler.exception)
cPtr->handler.exception = WMAddInputHandler(cPtr->sock, WIExceptMask,
inputHandler, cPtr);
}
#if 0
Bool
WMIsConnectionNonBlocking(WMConnection *cPtr) /*FOLD00*/
{
#if 1
int state;
state = fcntl(cPtr->sock, F_GETFL, 0);
if (state < 0) {
wsyserror("Failed to get socket flags with fcntl.");
/* If we can't use fcntl on socket, this probably also means we could
* not use fcntl to set non-blocking mode, and since a socket defaults
* to blocking when created, return False as the best assumption */
return False;
}
return ((state & NONBLOCK_OPT)!=0);
#else
return cPtr->isNonBlocking;
#endif
}
#endif
void
WMSetConnectionNonBlocking(WMConnection *cPtr, Bool flag) /*FOLD00*/
{
if (cPtr->sock < 0)
return;
if (cPtr->isNonBlocking == flag)
return;
if (setSocketNonBlocking(cPtr->sock, flag)==True)
cPtr->isNonBlocking = flag;
}
void*
WMGetConnectionClientData(WMConnection *cPtr) /*FOLD00*/
{
return cPtr->clientData;
}
void
WMSetConnectionClientData(WMConnection *cPtr, void *data) /*FOLD00*/
{
cPtr->clientData = data;
}
unsigned int
WMGetConnectionFlags(WMConnection *cPtr) /*FOLD00*/
{
return cPtr->uflags;
}
void
WMSetConnectionFlags(WMConnection *cPtr, unsigned int flags) /*FOLD00*/
{
cPtr->uflags = flags;
}
void
WMSetConnectionSendTimeout(WMConnection *cPtr, unsigned int timeout) /*FOLD00*/
{
if (timeout == 0)
timeout = DEF_TIMEOUT;
cPtr->sendTimeout.timeout = timeout;
}

View File

@@ -1,7 +1,7 @@
/*
* WINGs WMData function library
*
* Copyright (c) 1999 Dan Pascu
* Copyright (c) 1999-2003 Dan Pascu
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -18,28 +18,22 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <string.h>
#include "WUtil.h"
typedef struct W_Data {
unsigned length; /* How many bytes we have */
unsigned capacity; /* How many bytes it can hold */
unsigned growth; /* How much to grow */
void *bytes; /* Actual data */
unsigned retainCount;
unsigned freeData:1; /* whether the data should be released */
WMFreeDataProc *destructor;
int format; /* 0, 8, 16 or 32 */
} W_Data;
/* Creating and destroying data objects */
WMData*
WMCreateDataWithCapacity(unsigned capacity) /*FOLD00*/
WMData *WMCreateDataWithCapacity(unsigned capacity)
{
WMData *aData;
@@ -49,18 +43,18 @@ WMCreateDataWithCapacity(unsigned capacity) /*FOLD00*/
aData->bytes = wmalloc(capacity);
else
aData->bytes = NULL;
aData->capacity = capacity;
aData->growth = capacity / 2 > 0 ? capacity / 2 : 1;
aData->length = 0;
aData->retainCount = 1;
aData->freeData = 1;
aData->format = 0;
aData->destructor = wfree;
return aData;
}
WMData*
WMCreateDataWithLength(unsigned length) /*FOLD00*/
WMData *WMCreateDataWithLength(unsigned length)
{
WMData *aData;
@@ -73,9 +67,7 @@ WMCreateDataWithLength(unsigned length) /*FOLD00*/
return aData;
}
WMData*
WMCreateDataWithBytes(void *bytes, unsigned length) /*FOLD00*/
WMData *WMCreateDataWithBytes(void *bytes, unsigned length)
{
WMData *aData;
@@ -86,9 +78,7 @@ WMCreateDataWithBytes(void *bytes, unsigned length) /*FOLD00*/
return aData;
}
WMData*
WMCreateDataWithBytesNoCopy(void *bytes, unsigned length) /*FOLD00*/
WMData *WMCreateDataWithBytesNoCopy(void *bytes, unsigned length, WMFreeDataProc * destructor)
{
WMData *aData;
@@ -98,47 +88,46 @@ WMCreateDataWithBytesNoCopy(void *bytes, unsigned length) /*FOLD00*/
aData->growth = length / 2 > 0 ? length / 2 : 1;
aData->bytes = bytes;
aData->retainCount = 1;
aData->freeData = 0;
aData->format = 0;
aData->destructor = destructor;
return aData;
}
WMData*
WMCreateDataWithData(WMData *aData) /*FOLD00*/
WMData *WMCreateDataWithData(WMData * aData)
{
if (aData->length > 0)
return WMCreateDataWithBytes(aData->bytes, aData->length);
else
return WMCreateDataWithCapacity(0);
WMData *newData;
if (aData->length > 0) {
newData = WMCreateDataWithBytes(aData->bytes, aData->length);
} else {
newData = WMCreateDataWithCapacity(0);
}
newData->format = aData->format;
return newData;
}
WMData*
WMRetainData(WMData *aData) /*FOLD00*/
WMData *WMRetainData(WMData * aData)
{
aData->retainCount++;
return aData;
}
void
WMReleaseData(WMData *aData) /*FOLD00*/
void WMReleaseData(WMData * aData)
{
aData->retainCount--;
if (aData->retainCount > 0)
return;
if (aData->bytes && aData->freeData)
wfree(aData->bytes);
if (aData->bytes != NULL && aData->destructor != NULL) {
aData->destructor(aData->bytes);
}
wfree(aData);
}
/* Adjusting capacity */
void
WMSetDataCapacity(WMData *aData, unsigned capacity) /*FOLD00*/
void WMSetDataCapacity(WMData * aData, unsigned capacity)
{
if (aData->capacity != capacity) {
aData->bytes = wrealloc(aData->bytes, capacity);
@@ -150,49 +139,47 @@ WMSetDataCapacity(WMData *aData, unsigned capacity) /*FOLD00*/
}
}
void
WMSetDataLength(WMData *aData, unsigned length) /*FOLD00*/
void WMSetDataLength(WMData * aData, unsigned length)
{
if (length > aData->capacity) {
WMSetDataCapacity(aData, length);
}
if (length > aData->length) {
unsigned char *dataBytes = (unsigned char *)aData->bytes;
memset(dataBytes + aData->length, 0, length - aData->length);
memset((unsigned char *)aData->bytes + aData->length, 0, length - aData->length);
}
aData->length = length;
}
void WMSetDataFormat(WMData * aData, unsigned format)
{
aData->format = format;
}
void
WMIncreaseDataLengthBy(WMData *aData, unsigned extraLength) /*FOLD00*/
void WMIncreaseDataLengthBy(WMData * aData, unsigned extraLength)
{
WMSetDataLength(aData, aData->length + extraLength);
}
/* Accessing data */
const void*
WMDataBytes(WMData *aData) /*FOLD00*/
const void *WMDataBytes(WMData * aData)
{
return aData->bytes;
}
void
WMGetDataBytes(WMData *aData, void *buffer) /*FOLD00*/
void WMGetDataBytes(WMData * aData, void *buffer)
{
wassertr(aData->length > 0);
memcpy(buffer, aData->bytes, aData->length);
}
unsigned WMGetDataFormat(WMData * aData)
{
return aData->format;
}
void
WMGetDataBytesWithLength(WMData *aData, void *buffer, unsigned length) /*FOLD00*/
void WMGetDataBytesWithLength(WMData * aData, void *buffer, unsigned length)
{
wassertr(aData->length > 0);
wassertr(length <= aData->length);
@@ -200,37 +187,33 @@ WMGetDataBytesWithLength(WMData *aData, void *buffer, unsigned length) /*FOLD00*
memcpy(buffer, aData->bytes, length);
}
void
WMGetDataBytesWithRange(WMData *aData, void *buffer, WMRange aRange) /*FOLD00*/
void WMGetDataBytesWithRange(WMData * aData, void *buffer, WMRange aRange)
{
unsigned char *dataBytes = (unsigned char *)aData->bytes;
wassertr(aRange.position < aData->length);
wassertr(aRange.count <= aData->length - aRange.position);
memcpy(buffer,dataBytes + aRange.position, aRange.count);
memcpy(buffer, (unsigned char *)aData->bytes + aRange.position, aRange.count);
}
WMData*
WMGetSubdataWithRange(WMData *aData, WMRange aRange) /*FOLD00*/
WMData *WMGetSubdataWithRange(WMData * aData, WMRange aRange)
{
void *buffer;
WMData *newData;
/* return an empty subdata instead if aRange.count is 0 ? */
wassertrv(aRange.count > 0, NULL);
if (aRange.count <= 0)
return WMCreateDataWithCapacity(0);
buffer = wmalloc(aRange.count);
WMGetDataBytesWithRange(aData, buffer, aRange);
return WMCreateDataWithBytesNoCopy(buffer, aRange.count);
}
newData = WMCreateDataWithBytesNoCopy(buffer, aRange.count, wfree);
newData->format = aData->format;
return newData;
}
/* Testing data */
Bool
WMIsDataEqualToData(WMData *aData, WMData *anotherData) /*FOLD00*/
Bool WMIsDataEqualToData(WMData * aData, WMData * anotherData)
{
if (aData->length != anotherData->length)
return False;
@@ -241,28 +224,16 @@ WMIsDataEqualToData(WMData *aData, WMData *anotherData) /*FOLD00*/
return (memcmp(aData->bytes, anotherData->bytes, aData->length) == 0);
}
unsigned
WMGetDataLength(WMData *aData) /*FOLD00*/
unsigned WMGetDataLength(WMData * aData)
{
return aData->length;
}
unsigned
WMGetDataHash(WMData *aData) /*FOLD00*/
{
return aData->length;
}
/* Adding data */
void
WMAppendDataBytes(WMData *aData, void *bytes, unsigned length) /*FOLD00*/
void WMAppendDataBytes(WMData * aData, void *bytes, unsigned length)
{
unsigned oldLength = aData->length;
unsigned newLength = oldLength + length;
unsigned char *dataBytes = (unsigned char *)aData->bytes;
if (newLength > aData->capacity) {
unsigned nextCapacity = aData->capacity + aData->growth;
@@ -277,48 +248,35 @@ WMAppendDataBytes(WMData *aData, void *bytes, unsigned length) /*FOLD00*/
WMSetDataCapacity(aData, nextCapacity);
aData->growth = nextGrowth;
}
memcpy(dataBytes + oldLength, bytes, length);
memcpy((unsigned char *)aData->bytes + oldLength, bytes, length);
aData->length = newLength;
}
void
WMAppendData(WMData *aData, WMData *anotherData) /*FOLD00*/
void WMAppendData(WMData * aData, WMData * anotherData)
{
if (anotherData->length > 0)
WMAppendDataBytes(aData, anotherData->bytes, anotherData->length);
}
/* Modifying data */
void
WMReplaceDataBytesInRange(WMData *aData, WMRange aRange, void *bytes) /*FOLD00*/
void WMReplaceDataBytesInRange(WMData * aData, WMRange aRange, void *bytes)
{
unsigned char *dataBytes = (unsigned char *)aData->bytes;
wassertr(aRange.position < aData->length);
wassertr(aRange.count <= aData->length - aRange.position);
memcpy(dataBytes + aRange.position, bytes, aRange.count);
memcpy((unsigned char *)aData->bytes + aRange.position, bytes, aRange.count);
}
void
WMResetDataBytesInRange(WMData *aData, WMRange aRange) /*FOLD00*/
void WMResetDataBytesInRange(WMData * aData, WMRange aRange)
{
unsigned char *dataBytes = (unsigned char *)aData->bytes;
wassertr(aRange.position < aData->length);
wassertr(aRange.count <= aData->length - aRange.position);
memset(dataBytes + aRange.position, 0, aRange.count);
memset((unsigned char *)aData->bytes + aRange.position, 0, aRange.count);
}
void
WMSetData(WMData *aData, WMData *anotherData) /*FOLD00*/
void WMSetData(WMData * aData, WMData * anotherData)
{
unsigned length = anotherData->length;
@@ -328,7 +286,4 @@ WMSetData(WMData *aData, WMData *anotherData) /*FOLD00*/
aData->length = length;
}
/* Storing data */

255
WINGs/dragcommon.c Normal file
View File

@@ -0,0 +1,255 @@
#include "WINGsP.h"
#define XDND_SOURCE_VERSION(dragInfo) dragInfo->protocolVersion
#define XDND_DEST_INFO(dragInfo) dragInfo->destInfo
#define XDND_DEST_VIEW(dragInfo) dragInfo->destInfo->destView
static Bool _WindowExists;
Atom W_OperationToAction(WMScreen * scr, WMDragOperationType operation)
{
switch (operation) {
case WDOperationNone:
return None;
case WDOperationCopy:
return scr->xdndActionCopy;
case WDOperationMove:
return scr->xdndActionMove;
case WDOperationLink:
return scr->xdndActionLink;
case WDOperationAsk:
return scr->xdndActionAsk;
case WDOperationPrivate:
return scr->xdndActionPrivate;
default:
return None;
}
}
WMDragOperationType W_ActionToOperation(WMScreen * scr, Atom action)
{
if (action == scr->xdndActionCopy) {
return WDOperationCopy;
} else if (action == scr->xdndActionMove) {
return WDOperationMove;
} else if (action == scr->xdndActionLink) {
return WDOperationLink;
} else if (action == scr->xdndActionAsk) {
return WDOperationAsk;
} else if (action == scr->xdndActionPrivate) {
return WDOperationPrivate;
} else if (action == None) {
return WDOperationNone;
} else {
char *tmp = XGetAtomName(scr->display, action);
wwarning("unknown XDND action %s ", tmp);
XFree(tmp);
return WDOperationCopy;
}
}
static void freeDragOperationItem(void *item)
{
wfree(item);
}
WMArray *WMCreateDragOperationArray(int initialSize)
{
return WMCreateArrayWithDestructor(initialSize, freeDragOperationItem);
}
WMDragOperationItem *WMCreateDragOperationItem(WMDragOperationType type, char *text)
{
W_DragOperationItem *result = wmalloc(sizeof(W_DragOperationItem));
result->type = type;
result->text = text;
return (WMDragOperationItem *) result;
}
WMDragOperationType WMGetDragOperationItemType(WMDragOperationItem * item)
{
return ((W_DragOperationItem *) item)->type;
}
char *WMGetDragOperationItemText(WMDragOperationItem * item)
{
return ((W_DragOperationItem *) item)->text;
}
static int handleNoWindowXError(Display * dpy, XErrorEvent * errEvt)
{
if (errEvt->error_code == BadWindow || errEvt->error_code == BadDrawable) {
_WindowExists = False;
return Success;
}
return errEvt->error_code;
}
static Bool windowExists(Display * dpy, Window win)
{
void *previousErrorHandler;
XWindowAttributes attr;
XSynchronize(dpy, True);
previousErrorHandler = XSetErrorHandler(handleNoWindowXError);
_WindowExists = True;
/* can generate BadDrawable or BadWindow */
XGetWindowAttributes(dpy, win, &attr);
XSetErrorHandler(previousErrorHandler);
XSynchronize(dpy, False);
return _WindowExists;
}
Bool
W_SendDnDClientMessage(Display * dpy, Window win, Atom message,
unsigned long data0,
unsigned long data1, unsigned long data2, unsigned long data3, unsigned long data4)
{
XEvent ev;
#ifdef XDND_DEBUG
char *msgName = XGetAtomName(dpy, message);
printf("sending message %s ... ", msgName);
XFree(msgName);
#endif
if (!windowExists(dpy, win)) {
wwarning("xdnd message target %lu does no longer exist.", win);
return False; /* message not sent */
}
ev.type = ClientMessage;
ev.xclient.message_type = message;
ev.xclient.format = 32;
ev.xclient.window = win;
ev.xclient.data.l[0] = data0;
ev.xclient.data.l[1] = data1;
ev.xclient.data.l[2] = data2;
ev.xclient.data.l[3] = data3;
ev.xclient.data.l[4] = data4;
XSendEvent(dpy, win, False, 0, &ev);
XFlush(dpy);
#ifdef XDND_DEBUG
printf("sent\n");
#endif
return True; /* message sent */
}
static void handleLeaveMessage(WMDraggingInfo * info)
{
if (XDND_DEST_INFO(info) != NULL) {
/* XDND_DEST_VIEW is never NULL (it's the xdnd aware view) */
wassertr(XDND_DEST_VIEW(info) != NULL);
if (XDND_DEST_VIEW(info)->dragDestinationProcs != NULL) {
XDND_DEST_VIEW(info)->dragDestinationProcs->concludeDragOperation(XDND_DEST_VIEW(info));
}
W_DragDestinationInfoClear(info);
}
}
void W_HandleDNDClientMessage(WMView * toplevel, XClientMessageEvent * event)
{
WMScreen *scr = W_VIEW_SCREEN(toplevel);
WMDraggingInfo *info = &scr->dragInfo;
Atom messageType = event->message_type;
#ifdef XDND_DEBUG
{
char *msgTypeName = XGetAtomName(scr->display, messageType);
if (msgTypeName != NULL)
printf("event type = %s\n", msgTypeName);
else
printf("pb with event type !\n");
}
#endif
/* Messages from destination to source */
if (messageType == scr->xdndStatusAtom || messageType == scr->xdndFinishedAtom) {
W_DragSourceStopTimer();
W_DragSourceStateHandler(info, event);
return;
}
/* Messages from source to destination */
if (messageType == scr->xdndEnterAtom) {
Bool positionSent = (XDND_DEST_INFO(info) != NULL);
W_DragDestinationStopTimer();
W_DragDestinationStoreEnterMsgInfo(info, toplevel, event);
/* Xdnd version 3 and up are not compatible with version 1 or 2 */
if (XDND_SOURCE_VERSION(info) > 2) {
if (positionSent) {
/* xdndPosition previously received on xdnd aware view */
W_DragDestinationStateHandler(info, event);
return;
} else {
W_DragDestinationStartTimer(info);
return;
}
} else {
wwarning("received dnd enter msg with unsupported version %i", XDND_SOURCE_VERSION(info));
W_DragDestinationCancelDropOnEnter(toplevel, info);
return;
}
}
if (messageType == scr->xdndPositionAtom) {
W_DragDestinationStopTimer();
W_DragDestinationStorePositionMsgInfo(info, toplevel, event);
W_DragDestinationStateHandler(info, event);
return;
}
if (messageType == scr->xdndSelectionAtom || messageType == scr->xdndDropAtom) {
W_DragDestinationStopTimer();
W_DragDestinationStateHandler(info, event);
return;
}
if (messageType == scr->xdndLeaveAtom) {
/* conclude drop operation, and clear dragging info */
W_DragDestinationStopTimer();
handleLeaveMessage(info);
}
}
/* called in destroyView (wview.c) */
void W_FreeViewXdndPart(WMView * view)
{
WMUnregisterViewDraggedTypes(view);
if (view->dragSourceProcs)
wfree(view->dragSourceProcs);
if (view->dragDestinationProcs)
wfree(view->dragDestinationProcs);
if (view->dragImage)
WMReleasePixmap(view->dragImage);
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
/*
* 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
* it under the terms of the GNU General Public License as published by
@@ -18,158 +18,79 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include "wconfig.h"
#include "../src/config.h"
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <WUtil.h>
extern char *_WINGS_progname;
#define MAXLINE 1024
/*********************************************************************
* Returns the system error message associated with error code 'errnum'
*********************************************************************/
char*
wstrerror(int errnum)
{
#if defined(HAVE_STRERROR)
return strerror(errnum);
#elif !defined(HAVE_STRERROR) && defined(BSD)
extern int errno, sys_nerr;
# ifndef __DECC
extern char *sys_errlist[];
# endif
static char buf[] = "Unknown error 12345678901234567890";
if (errno < sys_nerr)
return sys_errlist[errnum];
sprintf (buf, "Unknown error %d", errnum);
return buf;
#else /* no strerror() and no sys_errlist[] */
static char buf[] = "Error 12345678901234567890";
sprintf(buf, "Error %d", errnum);
return buf;
#endif
}
/**************************************************************************
* Prints a fatal error message with variable arguments and terminates
*
* msg - message to print with optional formatting
* ... - arguments to use on formatting
**************************************************************************/
void
wfatal(const char *msg, ...)
void __wmessage(const char *func, const char *file, int line, int type, const char *msg, ...)
{
va_list args;
char buf[MAXLINE];
char *buf;
static int linemax = 0;
int truncated = 0;
va_start(args, msg);
vsprintf(buf, msg, args);
strcat(buf,"\n");
fflush(stdout);
fputs(_WINGS_progname, stderr);
fputs(" fatal error: ",stderr);
fputs(buf, stderr);
fflush(stdout);
fflush(stderr);
va_end(args);
if (linemax == 0) {
#ifdef HAVE_SYSCONF
linemax = sysconf(_SC_LINE_MAX);
if (linemax == -1) {
/* I'd like to know of this ever fires */
fprintf(stderr, "%s %d: sysconf(_SC_LINE_MAX) returned error\n",
__FILE__, __LINE__);
linemax = 512;
}
#else /* !HAVE_SYSCONF */
fprintf(stderr, "%s %d: Your system does not have sysconf(3); "
"let wmaker-dev@windowmaker.org know.\n", __FILE__, __LINE__);
linemax = 512;
#endif /* HAVE_SYSCONF */
}
buf = wmalloc(linemax);
/*********************************************************************
* Prints a warning message with variable arguments
*
* msg - message to print with optional formatting
* ... - arguments to use on formatting
*********************************************************************/
void
wwarning(const char *msg, ...)
{
va_list args;
char buf[MAXLINE];
va_start(args, msg);
vsprintf(buf, msg, args);
strcat(buf,"\n");
fflush(stdout);
fputs(_WINGS_progname, stderr);
fputs(" warning: ",stderr);
fputs(buf, stderr);
fflush(stdout);
fflush(stderr);
va_end(args);
/* message format: <wings_progname>(function(file:line): <type?>: <message>"\n" */
strncat(buf, _WINGS_progname ? _WINGS_progname : "WINGs", linemax - 1);
snprintf(buf + strlen(buf), linemax - strlen(buf), "(%s(%s:%d))", func, file, line);
strncat(buf, ": ", linemax - 1 - strlen(buf));
switch (type) {
case WMESSAGE_TYPE_FATAL:
strncat(buf, _("fatal error: "), linemax - 1 - strlen(buf));
break;
case WMESSAGE_TYPE_ERROR:
strncat(buf, _("error: "), linemax - 1 - strlen(buf));
break;
case WMESSAGE_TYPE_WARNING:
strncat(buf, _("warning: "), linemax - 1 - strlen(buf));
break;
case WMESSAGE_TYPE_MESSAGE:
/* FALLTHROUGH */
default: /* should not happen, but doesn't hurt either */
break;
}
/*********************************************************************
* Prints a system error message with variable arguments
*
* msg - message to print with optional formatting
* ... - arguments to use on formatting
*********************************************************************/
void
wsyserror(const char *msg, ...)
{
va_list args;
char buf[MAXLINE];
int error=errno;
va_start(args, msg);
vsprintf(buf, msg, args);
fflush(stdout);
fputs(_WINGS_progname, stderr);
fputs(" error: ", stderr);
strcat(buf, ": ");
strcat(buf, wstrerror(error));
strcat(buf,"\n");
fputs(buf, stderr);
fflush(stderr);
fflush(stdout);
if (vsnprintf(buf + strlen(buf), linemax - strlen(buf), msg, args) >= linemax - strlen(buf))
truncated = 1;
va_end(args);
fputs(buf, stderr);
if (truncated)
fputs("*** message truncated ***", stderr);
fputs("\n", stderr);
wfree(buf);
}
/*********************************************************************
* Prints a system error message with variable arguments, being given
* the error code.
*
* error - the error code foe which to print the message
* msg - message to print with optional formatting
* ... - arguments to use on formatting
*********************************************************************/
void
wsyserrorwithcode(int error, const char *msg, ...)
{
va_list args;
char buf[MAXLINE];
va_start(args, msg);
vsprintf(buf, msg, args);
fflush(stdout);
fputs(_WINGS_progname, stderr);
fputs(" error: ", stderr);
strcat(buf, ": ");
strcat(buf, wstrerror(error));
strcat(buf,"\n");
fputs(buf, stderr);
fflush(stderr);
fflush(stdout);
va_end(args);
}

View File

@@ -1,7 +1,7 @@
/*
* 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
* it under the terms of the GNU General Public License as published by
@@ -18,11 +18,11 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include "../src/config.h"
#include "wconfig.h"
#include "WUtil.h"
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
@@ -33,52 +33,59 @@
#define PATH_MAX 1024
#endif
char*
wgethomedir()
char *wgethomedir()
{
char *home = getenv("HOME");
static char *home = NULL;
char *tmp;
struct passwd *user;
if (home)
return home;
tmp = getenv("HOME");
if (tmp) {
home = wstrdup(tmp);
return home;
}
user = getpwuid(getuid());
if (!user) {
wsyserror("could not get password entry for UID %i", getuid());
return "/";
}
if (!user->pw_dir) {
return "/";
} else {
return user->pw_dir;
}
werror(_("could not get password entry for UID %i"), getuid());
home = "/";
}
if (!user->pw_dir)
home = "/";
else
home = wstrdup(user->pw_dir);
static char*
getuserhomedir(char *username)
return home;
}
static char *getuserhomedir(const char *username)
{
static char *home = NULL;
struct passwd *user;
if (home)
return home;
user = getpwnam(username);
if (!user) {
wsyserror("could not get password entry for user %s", username);
werror(_("could not get password entry for user %s"), username);
return NULL;
}
if (!user->pw_dir) {
return "/";
} else {
return user->pw_dir;
}
if (!user->pw_dir)
home = "/";
else
home = wstrdup(user->pw_dir);
return home;
}
char*
wexpandpath(char *path)
char *wexpandpath(char *path)
{
char *origpath = path;
char buffer2[PATH_MAX + 2];
char buffer[PATH_MAX + 2];
int i;
@@ -91,25 +98,28 @@ wexpandpath(char *path)
path++;
if (*path == '/' || *path == 0) {
home = wgethomedir();
strcat(buffer, home);
if (strlen(home) > PATH_MAX ||
wstrlcpy(buffer, home, sizeof(buffer)) >= sizeof(buffer))
goto error;
} else {
int j;
j = 0;
while (*path != 0 && *path != '/') {
if (j > PATH_MAX)
goto error;
buffer2[j++] = *path;
buffer2[j] = 0;
path++;
}
home = getuserhomedir(buffer2);
if (!home)
return NULL;
strcat(buffer, home);
if (!home || wstrlcat(buffer, home, sizeof(buffer)) >= sizeof(buffer))
goto error;
}
}
i = strlen(buffer);
while (*path!=0) {
while (*path != 0 && i <= PATH_MAX) {
char *tmp;
if (*path == '$') {
@@ -119,35 +129,51 @@ wexpandpath(char *path)
if (*path == '(') {
path++;
while (*path != 0 && *path != ')') {
if (j > PATH_MAX)
goto error;
buffer2[j++] = *(path++);
buffer2[j] = 0;
}
if (*path==')')
if (*path == ')') {
path++;
tmp = getenv(buffer2);
if (!tmp) {
buffer[i] = 0;
strcat(buffer, "$(");
strcat(buffer, buffer2);
strcat(buffer, ")");
i += strlen(buffer2)+3;
} else {
strcat(buffer, tmp);
i += strlen(tmp);
tmp = NULL;
}
if (!tmp) {
if ((i += strlen(buffer2) + 2) > PATH_MAX)
goto error;
buffer[i] = 0;
if (wstrlcat(buffer, "$(", sizeof(buffer)) >= sizeof(buffer) ||
wstrlcat(buffer, buffer2, sizeof(buffer)) >= sizeof(buffer))
goto error;
if (*(path-1)==')') {
if (++i > PATH_MAX ||
wstrlcat(buffer, ")", sizeof(buffer)) >= sizeof(buffer))
goto error;
}
} else {
if ((i += strlen(tmp)) > PATH_MAX ||
wstrlcat(buffer, tmp, sizeof(buffer)) >= sizeof(buffer))
goto error;
}
} else {
while (*path != 0 && *path != '/') {
if (j > PATH_MAX)
goto error;
buffer2[j++] = *(path++);
buffer2[j] = 0;
}
tmp = getenv(buffer2);
if (!tmp) {
strcat(buffer, "$");
strcat(buffer, buffer2);
i += strlen(buffer2)+1;
if ((i += strlen(buffer2) + 1) > PATH_MAX ||
wstrlcat(buffer, "$", sizeof(buffer)) >= sizeof(buffer) ||
wstrlcat(buffer, buffer2, sizeof(buffer)) >= sizeof(buffer))
goto error;
} else {
strcat(buffer, tmp);
i += strlen(tmp);
if ((i += strlen(tmp)) > PATH_MAX ||
wstrlcat(buffer, tmp, sizeof(buffer)) >= sizeof(buffer))
goto error;
}
}
} else {
@@ -156,10 +182,35 @@ wexpandpath(char *path)
}
}
if (*path!=0)
goto error;
return wstrdup(buffer);
error:
errno = ENAMETOOLONG;
werror(_("could not expand %s"), origpath);
return NULL;
}
/* 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;
}
/*
*----------------------------------------------------------------------
@@ -176,19 +227,17 @@ wexpandpath(char *path)
*
*----------------------------------------------------------------------
*/
char*
wfindfile(char *paths, char *file)
char *wfindfile(char *paths, char *file)
{
char *path;
char *tmp;
int done;
char *tmp, *tmp2;
int len, flen;
char *fullpath;
if (!file)
return NULL;
if (*file=='/' || *file=='~' || *file=='$' || !paths) {
if (*file == '/' || *file == '~' || *file == '$' || !paths || *paths == 0) {
if (access(file, F_OK) < 0) {
fullpath = wexpandpath(file);
if (!fullpath)
@@ -207,32 +256,42 @@ wfindfile(char *paths, char *file)
flen = strlen(file);
tmp = paths;
done = 0;
while (!done) {
len = strcspn(tmp, ":");
if (len==0) done=1;
while (*tmp) {
tmp = skipchar(tmp, ':');
if (*tmp == 0)
break;
tmp2 = nextchar(tmp, ':');
len = tmp2 - tmp;
path = wmalloc(len + flen + 2);
path = memcpy(path, tmp, len);
path[len] = 0;
strcat(path, "/");
strcat(path, file);
if (path[len - 1] != '/' &&
wstrlcat(path, "/", len + flen + 2) >= len + flen + 2) {
wfree(path);
return NULL;
}
if (wstrlcat(path, file, len + flen + 2) >= len + flen + 2) {
wfree(path);
return NULL;
}
fullpath = wexpandpath(path);
wfree(path);
if (fullpath) {
if (access(fullpath, F_OK) == 0) {
return fullpath;
}
wfree(fullpath);
}
tmp=&(tmp[len+1]);
if (*tmp==0) break;
tmp = tmp2;
}
return NULL;
}
char*
wfindfileinlist(char **path_list, char *file)
char *wfindfileinlist(char **path_list, char *file)
{
int i;
char *path;
@@ -265,8 +324,11 @@ wfindfileinlist(char **path_list, char *file)
path = wmalloc(len + flen + 2);
path = memcpy(path, path_list[i], len);
path[len] = 0;
strcat(path, "/");
strcat(path, file);
if (wstrlcat(path, "/", len + flen + 2) >= len + flen + 2 ||
wstrlcat(path, file, len + flen + 2) >= len + flen + 2) {
wfree(path);
return NULL;
}
/* expand tilde */
fullpath = wexpandpath(path);
wfree(path);
@@ -278,13 +340,11 @@ wfindfileinlist(char **path_list, char *file)
wfree(fullpath);
}
}
return NULL;
}
char*
wfindfileinarray(proplist_t array, char *file)
char *wfindfileinarray(WMPropList * array, char *file)
{
int i;
char *path;
@@ -312,21 +372,24 @@ wfindfileinarray(proplist_t array, char *file)
}
flen = strlen(file);
for (i=0; i<PLGetNumberOfElements(array); i++) {
proplist_t prop;
for (i = 0; i < WMGetPropListItemCount(array); i++) {
WMPropList *prop;
char *p;
prop = PLGetArrayElement(array, i);
prop = WMGetFromPLArray(array, i);
if (!prop)
continue;
p = PLGetString(prop);
p = WMGetFromPLString(prop);
len = strlen(p);
path = wmalloc(len + flen + 2);
path = memcpy(path, p, len);
path[len] = 0;
strcat(path, "/");
strcat(path, file);
if (wstrlcat(path, "/", len + flen + 2) >= len + flen + 2 ||
wstrlcat(path, file, len + flen + 2) >= len + flen + 2) {
wfree(path);
return NULL;
}
/* expand tilde */
fullpath = wexpandpath(path);
wfree(path);
@@ -340,7 +403,3 @@ wfindfileinarray(proplist_t array, char *file)
}
return NULL;
}

View File

@@ -1,104 +0,0 @@
/*
* WINGs demo: font lister
*
* Copyright (c) 1998 Alfredo K. Kojima
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#include <stdlib.h>
#include <stdio.h>
#include "WINGs.h"
#include "WUtil.h"
void
wAbort()
{
exit(0);
}
void show(WMWidget *self, void *data)
{
char buf[60];
void *d;
WMLabel *l = (WMLabel*)data;
d = WMGetHangedData(self);
sprintf(buf, "%i - 0x%x - 0%o", (int)d, (int)d, (int)d);
WMSetLabelText(l, buf);
}
void quit(WMWidget *self, void *data)
{
exit(0);
}
int
main(int argc, char **argv)
{
Display *dpy;
WMWindow *win;
WMScreen *scr;
WMButton *lab, *l0=NULL;
WMLabel *pos;
int x, y, c;
char buf[20];
WMInitializeApplication("FontView", &argc, argv);
dpy = XOpenDisplay("");
if (!dpy) {
wfatal("cant open display");
exit(0);
}
scr = WMCreateSimpleApplicationScreen(dpy);
win = WMCreateWindow(scr, "main");
WMResizeWidget(win, 20*33, 20+20*9);
WMSetWindowTitle(win, "Font Chars");
WMSetWindowCloseAction(win, quit, NULL);
pos = WMCreateLabel(win);
WMResizeWidget(pos, 20*33, 20);
WMMoveWidget(pos, 10, 5);
c = 0;
for (y=0; y<8; y++) {
for (x=0; x<32; x++, c++) {
lab = WMCreateCustomButton(win, WBBStateLightMask);
WMResizeWidget(lab, 20, 20);
WMMoveWidget(lab, 10+x*20, 30+y*20);
sprintf(buf, "%c", c);
WMSetButtonText(lab, buf);
WMSetButtonAction(lab, show, pos);
WMHangData(lab, (void*)c);
if (c>0) {
WMGroupButtons(l0, lab);
} else {
l0 = lab;
}
}
}
WMRealizeWidget(win);
WMMapSubwidgets(win);
WMMapWidget(win);
WMScreenMainLoop(scr);
return 0;
}

31
WINGs/get-wings-flags.in Normal file
View File

@@ -0,0 +1,31 @@
#!/bin/sh
WCFLAGS="${inc_search_path}"
WLFLAGS="${lib_search_path}"
WLIBS="-lWINGs -lWUtil -lwraster ${GFXLIBS} ${XFTLIBS} ${XLIBS} -lm ${INTLIBS}"
usage="Usage: get-wings-flags [--cflags] [--ldflags] [--libs]"
if test $# -eq 0; then
echo "${usage}" 1>&2
exit 1
fi
while test $# -gt 0; do
case $1 in
--cflags)
echo $WCFLAGS
;;
--ldflags|--lflags)
echo $WLFLAGS
;;
--libs)
echo $WLIBS
;;
*)
echo "${usage}" 1>&2
exit 1
;;
esac
shift
done

31
WINGs/get-wutil-flags.in Normal file
View File

@@ -0,0 +1,31 @@
#!/bin/sh
WCFLAGS="-I${includedir}"
WLFLAGS="-L${libdir}"
WLIBS="-lWUtil ${INTLIBS}"
usage="Usage: get-wutil-flags [--cflags] [--ldflags] [--libs]"
if test $# -eq 0; then
echo "${usage}" 1>&2
exit 1
fi
while test $# -gt 0; do
case $1 in
--cflags)
echo $WCFLAGS
;;
--ldflags|--lflags)
echo $WLFLAGS
;;
--libs)
echo $WLIBS
;;
*)
echo "${usage}" 1>&2
exit 1
;;
esac
shift
done

566
WINGs/handlers.c Normal file
View File

@@ -0,0 +1,566 @@
/*
* WINGs internal handlers: timer, idle and input handlers
*/
#include "wconfig.h"
#include "WINGsP.h"
#include <sys/types.h>
#include <unistd.h>
#include <X11/Xos.h>
#ifdef HAVE_SYS_SELECT_H
# include <sys/select.h>
#endif
#include <time.h>
#ifndef X_GETTIMEOFDAY
#define X_GETTIMEOFDAY(t) gettimeofday(t, (struct timezone*)0)
#endif
typedef struct TimerHandler {
WMCallback *callback; /* procedure to call */
struct timeval when; /* when to call the callback */
void *clientData;
struct TimerHandler *next;
int nextDelay; /* 0 if it's one-shot */
} TimerHandler;
typedef struct IdleHandler {
WMCallback *callback;
void *clientData;
} IdleHandler;
typedef struct InputHandler {
WMInputProc *callback;
void *clientData;
int fd;
int mask;
} InputHandler;
/* queue of timer event handlers */
static TimerHandler *timerHandler = NULL;
static WMArray *idleHandler = NULL;
static WMArray *inputHandler = NULL;
#define timerPending() (timerHandler)
static void rightNow(struct timeval *tv)
{
X_GETTIMEOFDAY(tv);
}
/* is t1 after t2 ? */
#define IS_AFTER(t1, t2) (((t1).tv_sec > (t2).tv_sec) || \
(((t1).tv_sec == (t2).tv_sec) \
&& ((t1).tv_usec > (t2).tv_usec)))
#define IS_ZERO(tv) (tv.tv_sec == 0 && tv.tv_usec == 0)
#define SET_ZERO(tv) tv.tv_sec = 0, tv.tv_usec = 0
static void addmillisecs(struct timeval *tv, int milliseconds)
{
tv->tv_usec += milliseconds * 1000;
tv->tv_sec += tv->tv_usec / 1000000;
tv->tv_usec = tv->tv_usec % 1000000;
}
static void enqueueTimerHandler(TimerHandler * handler)
{
TimerHandler *tmp;
/* insert callback in queue, sorted by time left */
if (!timerHandler || !IS_AFTER(handler->when, timerHandler->when)) {
/* first in the queue */
handler->next = timerHandler;
timerHandler = handler;
} else {
tmp = timerHandler;
while (tmp->next && IS_AFTER(handler->when, tmp->next->when)) {
tmp = tmp->next;
}
handler->next = tmp->next;
tmp->next = handler;
}
}
static void delayUntilNextTimerEvent(struct timeval *delay)
{
struct timeval now;
TimerHandler *handler;
handler = timerHandler;
while (handler && IS_ZERO(handler->when))
handler = handler->next;
if (!handler) {
/* The return value of this function is only valid if there _are_
timers active. */
delay->tv_sec = 0;
delay->tv_usec = 0;
return;
}
rightNow(&now);
if (IS_AFTER(now, handler->when)) {
delay->tv_sec = 0;
delay->tv_usec = 0;
} else {
delay->tv_sec = handler->when.tv_sec - now.tv_sec;
delay->tv_usec = handler->when.tv_usec - now.tv_usec;
if (delay->tv_usec < 0) {
delay->tv_usec += 1000000;
delay->tv_sec--;
}
}
}
WMHandlerID WMAddTimerHandler(int milliseconds, WMCallback * callback, void *cdata)
{
TimerHandler *handler;
handler = malloc(sizeof(TimerHandler));
if (!handler)
return NULL;
rightNow(&handler->when);
addmillisecs(&handler->when, milliseconds);
handler->callback = callback;
handler->clientData = cdata;
handler->nextDelay = 0;
enqueueTimerHandler(handler);
return handler;
}
WMHandlerID WMAddPersistentTimerHandler(int milliseconds, WMCallback * callback, void *cdata)
{
TimerHandler *handler = WMAddTimerHandler(milliseconds, callback, cdata);
if (handler != NULL)
handler->nextDelay = milliseconds;
return handler;
}
void WMDeleteTimerWithClientData(void *cdata)
{
TimerHandler *handler, *tmp;
if (!cdata || !timerHandler)
return;
tmp = timerHandler;
if (tmp->clientData == cdata) {
tmp->nextDelay = 0;
if (!IS_ZERO(tmp->when)) {
timerHandler = tmp->next;
wfree(tmp);
}
} else {
while (tmp->next) {
if (tmp->next->clientData == cdata) {
handler = tmp->next;
handler->nextDelay = 0;
if (IS_ZERO(handler->when))
break;
tmp->next = handler->next;
wfree(handler);
break;
}
tmp = tmp->next;
}
}
}
void WMDeleteTimerHandler(WMHandlerID handlerID)
{
TimerHandler *tmp, *handler = (TimerHandler *) handlerID;
if (!handler || !timerHandler)
return;
tmp = timerHandler;
handler->nextDelay = 0;
if (IS_ZERO(handler->when))
return;
if (tmp == handler) {
timerHandler = handler->next;
wfree(handler);
} else {
while (tmp->next) {
if (tmp->next == handler) {
tmp->next = handler->next;
wfree(handler);
break;
}
tmp = tmp->next;
}
}
}
WMHandlerID WMAddIdleHandler(WMCallback * callback, void *cdata)
{
IdleHandler *handler;
handler = malloc(sizeof(IdleHandler));
if (!handler)
return NULL;
handler->callback = callback;
handler->clientData = cdata;
/* add handler at end of queue */
if (!idleHandler) {
idleHandler = WMCreateArrayWithDestructor(16, wfree);
}
WMAddToArray(idleHandler, handler);
return handler;
}
void WMDeleteIdleHandler(WMHandlerID handlerID)
{
IdleHandler *handler = (IdleHandler *) handlerID;
if (!handler || !idleHandler)
return;
WMRemoveFromArray(idleHandler, handler);
}
WMHandlerID WMAddInputHandler(int fd, int condition, WMInputProc * proc, void *clientData)
{
InputHandler *handler;
handler = wmalloc(sizeof(InputHandler));
handler->fd = fd;
handler->mask = condition;
handler->callback = proc;
handler->clientData = clientData;
if (!inputHandler)
inputHandler = WMCreateArrayWithDestructor(16, wfree);
WMAddToArray(inputHandler, handler);
return handler;
}
void WMDeleteInputHandler(WMHandlerID handlerID)
{
InputHandler *handler = (InputHandler *) handlerID;
if (!handler || !inputHandler)
return;
WMRemoveFromArray(inputHandler, handler);
}
Bool W_CheckIdleHandlers(void)
{
IdleHandler *handler;
WMArray *handlerCopy;
WMArrayIterator iter;
if (!idleHandler || WMGetArrayItemCount(idleHandler) == 0) {
W_FlushIdleNotificationQueue();
/* make sure an observer in queue didn't added an idle handler */
return (idleHandler != NULL && WMGetArrayItemCount(idleHandler) > 0);
}
handlerCopy = WMDuplicateArray(idleHandler);
WM_ITERATE_ARRAY(handlerCopy, handler, iter) {
/* check if the handler still exist or was removed by a callback */
if (WMGetFirstInArray(idleHandler, handler) == WANotFound)
continue;
(*handler->callback) (handler->clientData);
WMDeleteIdleHandler(handler);
}
WMFreeArray(handlerCopy);
W_FlushIdleNotificationQueue();
/* this is not necesarrily False, because one handler can re-add itself */
return (WMGetArrayItemCount(idleHandler) > 0);
}
void W_CheckTimerHandlers(void)
{
TimerHandler *handler;
struct timeval now;
if (!timerHandler) {
W_FlushASAPNotificationQueue();
return;
}
rightNow(&now);
handler = timerHandler;
while (handler && IS_AFTER(now, handler->when)) {
if (!IS_ZERO(handler->when)) {
SET_ZERO(handler->when);
(*handler->callback) (handler->clientData);
}
handler = handler->next;
}
while (timerHandler && IS_ZERO(timerHandler->when)) {
handler = timerHandler;
timerHandler = timerHandler->next;
if (handler->nextDelay > 0) {
handler->when = now;
addmillisecs(&handler->when, handler->nextDelay);
enqueueTimerHandler(handler);
} else {
wfree(handler);
}
}
W_FlushASAPNotificationQueue();
}
/*
* This functions will handle input events on all registered file descriptors.
* Input:
* - waitForInput - True if we want the function to wait until an event
* appears on a file descriptor we watch, False if we
* want the function to immediately return if there is
* no data available on the file descriptors we watch.
* - inputfd - Extra input file descriptor to watch for input.
* This is only used when called from wevent.c to watch
* on ConnectionNumber(dpy) to avoid blocking of X events
* if we wait for input from other file handlers.
* Output:
* if waitForInput is False, the function will return False if there are no
* input handlers registered, or if there is no data
* available on the registered ones, and will return True
* if there is at least one input handler that has data
* available.
* if waitForInput is True, the function will return False if there are no
* input handlers registered, else it will block until an
* event appears on one of the file descriptors it watches
* and then it will return True.
*
* If the retured value is True, the input handlers for the corresponding file
* descriptors are also called.
*
* Parametersshould be passed like this:
* - from wevent.c:
* waitForInput - apropriate value passed by the function who called us
* inputfd = ConnectionNumber(dpy)
* - from wutil.c:
* waitForInput - apropriate value passed by the function who called us
* inputfd = -1
*
*/
Bool W_HandleInputEvents(Bool waitForInput, int inputfd)
{
#if defined(HAVE_POLL) && defined(HAVE_POLL_H) && !defined(HAVE_SELECT)
struct poll fd *fds;
InputHandler *handler;
int count, timeout, nfds, i, extrafd;
extrafd = (inputfd < 0) ? 0 : 1;
if (inputHandler)
nfds = WMGetArrayItemCount(inputHandler);
else
nfds = 0;
if (!extrafd && nfds == 0) {
W_FlushASAPNotificationQueue();
return False;
}
fds = wmalloc((nfds + extrafd) * sizeof(struct pollfd));
if (extrafd) {
/* put this to the end of array to avoid using ranges from 1 to nfds+1 */
fds[nfds].fd = inputfd;
fds[nfds].events = POLLIN;
}
/* use WM_ITERATE_ARRAY() here */
for (i = 0; i < nfds; i++) {
handler = WMGetFromArray(inputHandler, i);
fds[i].fd = handler->fd;
fds[i].events = 0;
if (handler->mask & WIReadMask)
fds[i].events |= POLLIN;
if (handler->mask & WIWriteMask)
fds[i].events |= POLLOUT;
#if 0 /* FIXME */
if (handler->mask & WIExceptMask)
FD_SET(handler->fd, &eset);
#endif
}
/*
* Setup the timeout to the estimated time until the
* next timer expires.
*/
if (!waitForInput) {
timeout = 0;
} else if (timerPending()) {
struct timeval tv;
delayUntilNextTimerEvent(&tv);
timeout = tv.tv_sec * 1000 + tv.tv_usec / 1000;
} else {
timeout = -1;
}
count = poll(fds, nfds + extrafd, timeout);
if (count > 0 && nfds > 0) {
WMArray *handlerCopy = WMDuplicateArray(inputHandler);
int mask;
/* use WM_ITERATE_ARRAY() here */
for (i = 0; i < nfds; i++) {
handler = WMGetFromArray(handlerCopy, i);
/* check if the handler still exist or was removed by a callback */
if (WMGetFirstInArray(inputHandler, handler) == WANotFound)
continue;
mask = 0;
if ((handler->mask & WIReadMask) &&
(fds[i].revents & (POLLIN | POLLRDNORM | POLLRDBAND | POLLPRI)))
mask |= WIReadMask;
if ((handler->mask & WIWriteMask) && (fds[i].revents & (POLLOUT | POLLWRBAND)))
mask |= WIWriteMask;
if ((handler->mask & WIExceptMask) && (fds[i].revents & (POLLHUP | POLLNVAL | POLLERR)))
mask |= WIExceptMask;
if (mask != 0 && handler->callback) {
(*handler->callback) (handler->fd, mask, handler->clientData);
}
}
WMFreeArray(handlerCopy);
}
wfree(fds);
W_FlushASAPNotificationQueue();
return (count > 0);
#else
#ifdef HAVE_SELECT
struct timeval timeout;
struct timeval *timeoutPtr;
fd_set rset, wset, eset;
int maxfd, nfds, i;
int count;
InputHandler *handler;
if (inputHandler)
nfds = WMGetArrayItemCount(inputHandler);
else
nfds = 0;
if (inputfd < 0 && nfds == 0) {
W_FlushASAPNotificationQueue();
return False;
}
FD_ZERO(&rset);
FD_ZERO(&wset);
FD_ZERO(&eset);
if (inputfd < 0) {
maxfd = 0;
} else {
FD_SET(inputfd, &rset);
maxfd = inputfd;
}
/* use WM_ITERATE_ARRAY() here */
for (i = 0; i < nfds; i++) {
handler = WMGetFromArray(inputHandler, i);
if (handler->mask & WIReadMask)
FD_SET(handler->fd, &rset);
if (handler->mask & WIWriteMask)
FD_SET(handler->fd, &wset);
if (handler->mask & WIExceptMask)
FD_SET(handler->fd, &eset);
if (maxfd < handler->fd)
maxfd = handler->fd;
}
/*
* Setup the timeout to the estimated time until the
* next timer expires.
*/
if (!waitForInput) {
SET_ZERO(timeout);
timeoutPtr = &timeout;
} else if (timerPending()) {
delayUntilNextTimerEvent(&timeout);
timeoutPtr = &timeout;
} else {
timeoutPtr = (struct timeval *)0;
}
count = select(1 + maxfd, &rset, &wset, &eset, timeoutPtr);
if (count > 0 && nfds > 0) {
WMArray *handlerCopy = WMDuplicateArray(inputHandler);
int mask;
/* use WM_ITERATE_ARRAY() here */
for (i = 0; i < nfds; i++) {
handler = WMGetFromArray(handlerCopy, i);
/* check if the handler still exist or was removed by a callback */
if (WMGetFirstInArray(inputHandler, handler) == WANotFound)
continue;
mask = 0;
if ((handler->mask & WIReadMask) && FD_ISSET(handler->fd, &rset))
mask |= WIReadMask;
if ((handler->mask & WIWriteMask) && FD_ISSET(handler->fd, &wset))
mask |= WIWriteMask;
if ((handler->mask & WIExceptMask) && FD_ISSET(handler->fd, &eset))
mask |= WIExceptMask;
if (mask != 0 && handler->callback) {
(*handler->callback) (handler->fd, mask, handler->clientData);
}
}
WMFreeArray(handlerCopy);
}
W_FlushASAPNotificationQueue();
return (count > 0);
#else /* not HAVE_SELECT, not HAVE_POLL */
# error Neither select nor poll. You lose.
#endif /* HAVE_SELECT */
#endif /* HAVE_POLL */
}

View File

@@ -1,5 +1,4 @@
#include <sys/types.h>
#include <string.h>
#include <stdlib.h>
@@ -7,27 +6,21 @@
#include "WUtil.h"
#define INITIAL_CAPACITY 23
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
# define INLINE inline
#else
# define INLINE
#endif
typedef struct HashItem {
void *key;
void *data;
const void *key;
const void *data;
struct HashItem *next; /* collided item list */
} HashItem;
typedef struct W_HashTable {
WMHashTableCallbacks callbacks;
@@ -37,9 +30,6 @@ typedef struct W_HashTable {
HashItem **table;
} HashTable;
#define HASH(table, key) (((table)->callbacks.hash ? \
(*(table)->callbacks.hash)(key) : hashPtr(key)) % (table)->size)
@@ -49,11 +39,7 @@ typedef struct W_HashTable {
#define RELKEY(table, key) if ((table)->callbacks.releaseKey) \
(*(table)->callbacks.releaseKey)(key)
static INLINE unsigned
hashString(const char *key)
static INLINE unsigned hashString(const char *key)
{
unsigned ret = 0;
unsigned ctr = 0;
@@ -66,19 +52,12 @@ hashString(const char *key)
return ret;
}
static INLINE unsigned
hashPtr(const void *key)
static INLINE unsigned hashPtr(const void *key)
{
return ((size_t) key / sizeof(char *));
}
static void
rellocateItem(WMHashTable *table, HashItem *item)
static void rellocateItem(WMHashTable * table, HashItem * item)
{
unsigned h;
@@ -88,9 +67,7 @@ rellocateItem(WMHashTable *table, HashItem *item)
table->table[h] = item;
}
static void
rebuildTable(WMHashTable *table)
static void rebuildTable(WMHashTable * table)
{
HashItem *next;
HashItem **oldArray;
@@ -104,7 +81,6 @@ rebuildTable(WMHashTable *table)
newSize = table->size * 2;
table->table = wmalloc(sizeof(char *) * newSize);
memset(table->table, 0, sizeof(char*)*newSize);
table->size = newSize;
for (i = 0; i < oldSize; i++) {
@@ -117,10 +93,7 @@ rebuildTable(WMHashTable *table)
wfree(oldArray);
}
WMHashTable*
WMCreateHashTable(WMHashTableCallbacks callbacks)
WMHashTable *WMCreateHashTable(WMHashTableCallbacks callbacks)
{
HashTable *table;
@@ -137,9 +110,7 @@ WMCreateHashTable(WMHashTableCallbacks callbacks)
return table;
}
void
WMResetHashTable(WMHashTable *table)
void WMResetHashTable(WMHashTable * table)
{
HashItem *item, *tmp;
int i;
@@ -148,7 +119,7 @@ WMResetHashTable(WMHashTable *table)
item = table->table[i];
while (item) {
tmp = item->next;
RELKEY(table, item);
RELKEY(table, item->key);
wfree(item);
item = tmp;
}
@@ -164,9 +135,7 @@ WMResetHashTable(WMHashTable *table)
memset(table->table, 0, sizeof(HashItem *) * table->size);
}
void
WMFreeHashTable(WMHashTable *table)
void WMFreeHashTable(WMHashTable * table)
{
HashItem *item, *tmp;
int i;
@@ -184,10 +153,12 @@ WMFreeHashTable(WMHashTable *table)
wfree(table);
}
unsigned WMCountHashTable(WMHashTable * table)
{
return table->itemCount;
}
void*
WMHashGet(WMHashTable *table, const void *key)
void *WMHashGet(WMHashTable * table, const void *key)
{
unsigned h;
HashItem *item;
@@ -211,15 +182,46 @@ WMHashGet(WMHashTable *table, const void *key)
}
}
if (item)
return item->data;
return (void *)item->data;
else
return NULL;
}
Bool WMHashGetItemAndKey(WMHashTable * table, const void *key, void **retItem, void **retKey)
{
unsigned h;
HashItem *item;
h = HASH(table, key);
item = table->table[h];
void*
WMHashInsert(WMHashTable *table, void *key, void *data)
if (table->callbacks.keyIsEqual) {
while (item) {
if ((*table->callbacks.keyIsEqual) (key, item->key)) {
break;
}
item = item->next;
}
} else {
while (item) {
if (key == item->key) {
break;
}
item = item->next;
}
}
if (item) {
if (retKey)
*retKey = (void *)item->key;
if (retItem)
*retItem = (void *)item->data;
return True;
} else {
return False;
}
}
void *WMHashInsert(WMHashTable * table, const void *key, const void *data)
{
unsigned h;
HashItem *item;
@@ -247,14 +249,14 @@ WMHashInsert(WMHashTable *table, void *key, void *data)
}
if (replacing) {
void *old;
const void *old;
old = item->data;
item->data = data;
RELKEY(table, item->key);
item->key = DUPKEY(table, key);
return old;
return (void *)old;
} else {
HashItem *nitem;
@@ -281,17 +283,14 @@ WMHashInsert(WMHashTable *table, void *key, void *data)
return NULL;
}
static HashItem*
deleteFromList(HashTable *table, HashItem *item, const void *key)
static HashItem *deleteFromList(HashTable * table, HashItem * item, const void *key)
{
HashItem *next;
if (item == NULL)
return NULL;
if ((table->callbacks.keyIsEqual
&& (*table->callbacks.keyIsEqual)(key, item->key))
if ((table->callbacks.keyIsEqual && (*table->callbacks.keyIsEqual) (key, item->key))
|| (!table->callbacks.keyIsEqual && key == item->key)) {
next = item->next;
@@ -308,9 +307,7 @@ deleteFromList(HashTable *table, HashItem *item, const void *key)
return item;
}
void
WMHashRemove(WMHashTable *table, const void *key)
void WMHashRemove(WMHashTable * table, const void *key)
{
unsigned h;
@@ -319,9 +316,7 @@ WMHashRemove(WMHashTable *table, const void *key)
table->table[h] = deleteFromList(table, table->table[h], key);
}
WMHashEnumerator
WMEnumerateHashTable(WMHashTable *table)
WMHashEnumerator WMEnumerateHashTable(WMHashTable * table)
{
WMHashEnumerator enumerator;
@@ -332,12 +327,9 @@ WMEnumerateHashTable(WMHashTable *table)
return enumerator;
}
void*
WMNextHashEnumeratorItem(WMHashEnumerator *enumerator)
void *WMNextHashEnumeratorItem(WMHashEnumerator * enumerator)
{
void *data = NULL;
const void *data = NULL;
/* this assumes the table doesn't change between
* WMEnumerateHashTable() and WMNextHashEnumeratorItem() calls */
@@ -357,30 +349,72 @@ WMNextHashEnumeratorItem(WMHashEnumerator *enumerator)
enumerator->nextItem = ((HashItem *) enumerator->nextItem)->next;
}
return data;
return (void *)data;
}
unsigned
WMCountHashTable(WMHashTable *table)
void *WMNextHashEnumeratorKey(WMHashEnumerator * enumerator)
{
return table->itemCount;
const void *key = NULL;
/* this assumes the table doesn't change between
* WMEnumerateHashTable() and WMNextHashEnumeratorKey() calls */
if (enumerator->nextItem == NULL) {
HashTable *table = enumerator->table;
while (++enumerator->index < table->size) {
if (table->table[enumerator->index] != NULL) {
enumerator->nextItem = table->table[enumerator->index];
break;
}
}
}
if (enumerator->nextItem) {
key = ((HashItem *) enumerator->nextItem)->key;
enumerator->nextItem = ((HashItem *) enumerator->nextItem)->next;
}
static Bool
compareStrings(const char *key1, const char *key2)
return (void *)key;
}
Bool WMNextHashEnumeratorItemAndKey(WMHashEnumerator * enumerator, void **item, void **key)
{
/* this assumes the table doesn't change between
* WMEnumerateHashTable() and WMNextHashEnumeratorItemAndKey() calls */
if (enumerator->nextItem == NULL) {
HashTable *table = enumerator->table;
while (++enumerator->index < table->size) {
if (table->table[enumerator->index] != NULL) {
enumerator->nextItem = table->table[enumerator->index];
break;
}
}
}
if (enumerator->nextItem) {
if (item)
*item = (void *)((HashItem *) enumerator->nextItem)->data;
if (key)
*key = (void *)((HashItem *) enumerator->nextItem)->key;
enumerator->nextItem = ((HashItem *) enumerator->nextItem)->next;
return True;
}
return False;
}
static Bool compareStrings(const char *key1, const char *key2)
{
return strcmp(key1, key2) == 0;
}
typedef unsigned (*hashFunc) (const void *);
typedef Bool(*isEqualFunc) (const void *, const void *);
typedef void *(*retainFunc) (const void *);
typedef void (*releaseFunc) (const void *);
const WMHashTableCallbacks WMIntHashCallbacks = {
NULL,
NULL,
@@ -392,15 +426,12 @@ const WMHashTableCallbacks WMStringHashCallbacks = {
(hashFunc) hashString,
(isEqualFunc) compareStrings,
(retainFunc) wstrdup,
(releaseFunc)free
(releaseFunc) wfree
};
const WMHashTableCallbacks WMStringPointerHashCallbacks = {
(hashFunc) hashString,
(isEqualFunc) compareStrings,
NULL,
NULL
};

View File

@@ -1,316 +0,0 @@
/*
* WINGs WMHost function library
*
* Copyright (c) 1999-2000 Dan Pascu
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <unistd.h>
#include <string.h>
#include <netdb.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "WUtil.h"
/* Tell stupid Solaris what's going on */
#ifndef INADDR_NONE
#define INADDR_NONE (-1)
#endif
typedef struct W_Host {
char *name;
WMBag *names;
WMBag *addresses;
int refCount;
} W_Host;
static WMHashTable *hostCache = NULL;
static Bool hostCacheEnabled = True;
/* Max hostname length (RFC 1123) */
#define W_MAXHOSTNAMELEN 255
static WMHost*
getHostFromCache(char *name)
{
if (!hostCache)
return NULL;
return WMHashGet(hostCache, name);
}
static WMHost*
getHostWithHostEntry(struct hostent *host, char *name)
{
WMHost *hPtr;
struct in_addr in;
int i;
hPtr = (WMHost*)wmalloc(sizeof(WMHost));
memset(hPtr, 0, sizeof(WMHost));
hPtr->names = WMCreateBag(1);
hPtr->addresses = WMCreateBag(1);
WMPutInBag(hPtr->names, wstrdup(host->h_name));
for (i=0; host->h_aliases[i]!=NULL; i++) {
WMPutInBag(hPtr->names, wstrdup(host->h_aliases[i]));
}
for (i=0; host->h_addr_list[i]!=NULL; i++) {
memcpy((void*)&in.s_addr, (const void*)host->h_addr_list[i],
host->h_length);
WMPutInBag(hPtr->addresses, wstrdup(inet_ntoa(in)));
}
hPtr->refCount = 1;
if (hostCacheEnabled) {
if (!hostCache)
hostCache = WMCreateHashTable(WMStringPointerHashCallbacks);
hPtr->name = wstrdup(name);
wassertr(WMHashInsert(hostCache, hPtr->name, hPtr)==NULL);
hPtr->refCount++;
}
return hPtr;
}
WMHost*
WMGetCurrentHost()
{
char name[W_MAXHOSTNAMELEN+1];
if (gethostname(name, W_MAXHOSTNAMELEN) < 0) {
wsyserror("Cannot get current host name");
return NULL;
}
name[W_MAXHOSTNAMELEN] = '\0';
return WMGetHostWithName(name);
}
WMHost*
WMGetHostWithName(char* name)
{
struct hostent *host;
WMHost *hPtr;
if (name == NULL) {
wwarning("NULL host name in 'WMGetHostWithName()'");
return NULL;
}
if (hostCacheEnabled) {
if ((hPtr = getHostFromCache(name)) != NULL) {
WMRetainHost(hPtr);
return hPtr;
}
}
host = gethostbyname(name);
if (host == NULL) {
return NULL;
}
hPtr = getHostWithHostEntry(host, name);
return hPtr;
}
WMHost*
WMGetHostWithAddress(char* address)
{
struct hostent *host;
struct in_addr in;
WMHost *hPtr;
if (address == NULL) {
wwarning("NULL address in 'WMGetHostWithAddress()'");
return NULL;
}
if (hostCacheEnabled) {
if ((hPtr = getHostFromCache(address)) != NULL) {
WMRetainHost(hPtr);
return hPtr;
}
}
#ifndef HAVE_INET_ATON
if ((in.s_addr = inet_addr(address)) == INADDR_NONE)
return NULL;
#else
if (inet_aton(address, &in.s_addr) == 0)
return NULL;
#endif
host = gethostbyaddr((char*)&in, sizeof(in), AF_INET);
if (host == NULL) {
return NULL;
}
hPtr = getHostWithHostEntry(host, address);
return hPtr;
}
WMHost*
WMRetainHost(WMHost *hPtr)
{
hPtr->refCount++;
return hPtr;
}
void
WMReleaseHost(WMHost *hPtr)
{
int i;
hPtr->refCount--;
if (hPtr->refCount > 0)
return;
for (i=0; i<WMGetBagItemCount(hPtr->names); i++)
wfree(WMGetFromBag(hPtr->names, i));
for (i=0; i<WMGetBagItemCount(hPtr->addresses); i++)
wfree(WMGetFromBag(hPtr->addresses, i));
WMFreeBag(hPtr->names);
WMFreeBag(hPtr->addresses);
if (hPtr->name) {
WMHashRemove(hostCache, hPtr->name);
wfree(hPtr->name);
}
wfree(hPtr);
}
void
WMSetHostCacheEnabled(Bool flag)
{
hostCacheEnabled = flag;
}
Bool
WMIsHostCacheEnabled()
{
return hostCacheEnabled;
}
void
WMFlushHostCache()
{
if (hostCache && WMCountHashTable(hostCache)>0) {
WMBag *hostBag = WMCreateBag(WMCountHashTable(hostCache));
WMHashEnumerator enumer = WMEnumerateHashTable(hostCache);
WMHost *hPtr;
int i;
while ((hPtr = WMNextHashEnumeratorItem(&enumer))) {
/* we can't release the host here, because we can't change the
* hash while using the enumerator functions. */
WMPutInBag(hostBag, hPtr);
}
for (i=0; i<WMGetBagItemCount(hostBag); i++)
WMReleaseHost(WMGetFromBag(hostBag, i));
WMFreeBag(hostBag);
WMResetHashTable(hostCache);
}
}
Bool
WMIsHostEqualToHost(WMHost* hPtr, WMHost* aPtr)
{
int i, j;
char *adr1, *adr2;
wassertrv(hPtr!=NULL && aPtr!=NULL, False);
if (hPtr == aPtr)
return True;
for (i=0; i<WMGetBagItemCount(aPtr->addresses); i++) {
adr1 = WMGetFromBag(aPtr->addresses, i);
for (j=0; j<WMGetBagItemCount(hPtr->addresses); j++) {
adr2 = WMGetFromBag(hPtr->addresses, j);
if (strcmp(adr1, adr2)==0)
return True;
}
}
return False;
}
char*
WMGetHostName(WMHost *hPtr)
{
return (WMGetBagItemCount(hPtr->names) > 0 ?
WMGetFromBag(hPtr->names, 0) : NULL);
/*return WMGetFromBag(hPtr->names, 0);*/
}
WMBag*
WMGetHostNames(WMHost *hPtr)
{
return hPtr->names;
}
char*
WMGetHostAddress(WMHost *hPtr)
{
return (WMGetBagItemCount(hPtr->addresses) > 0 ?
WMGetFromBag(hPtr->addresses, 0) : NULL);
}
WMBag*
WMGetHostAddresses(WMHost *hPtr)
{
return hPtr->addresses;
}

View File

@@ -1,12 +0,0 @@
#include <X11/Xlib.h>
#include "WINGsP.h"
void
InitI18n(Display *dpy)
{
}

53
WINGs/make-rgb Executable file
View File

@@ -0,0 +1,53 @@
#!/usr/bin/python
import sys
import re
from optparse import OptionParser
parser = OptionParser(version="%prog 1.0")
parser.add_option("-f", "--file", dest="rgbtxtFile", default='/etc/X11/rgb.txt',
help="rgb.txt file containing X11 colors (/etc/X11/rgb.txt)",
metavar="File")
(options, args) = parser.parse_args()
f = open(options.rgbtxtFile)
lines = f.readlines()
f.close()
colorLine = re.compile(r'''\s*
(?P<red>\d+) # red
\s+
(?P<green>\d+) # green
\s+
(?P<blue>\d+) # blue
\s+
(?P<name>[^\s]+) # name
''', re.VERBOSE)
print '''
/* Automatically generated file. Do NOT edit. Regenerate it using make-rgb */
#ifndef RGB_H_
#define RGB_H_
#include <wraster.h>
typedef struct RGBColor {
RColor color;
char *name;
} RGBColor;
RGBColor rgbColors[] = {'''
for line in lines:
m = colorLine.match(line)
if m:
print ''' {{%(red)3s, %(green)3s, %(blue)3s, 0}, "%(name)s"},''' % m.groupdict()
print ''' {{ 0, 0, 0, 0}, NULL}
};
#endif
'''

View File

@@ -1,7 +1,7 @@
/*
* 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
* it under the terms of the GNU General Public License as published by
@@ -18,9 +18,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include "../src/config.h"
#include "wconfig.h"
#include "WUtil.h"
#include <stdlib.h>
@@ -31,9 +29,12 @@
#include <assert.h>
#include <signal.h>
#ifdef TEST_WITH_GC
#ifdef USE_BOEHM_GC
#ifndef GC_DEBUG
#define GC_DEBUG
#endif /* !GC_DEBUG */
#include <gc/gc.h>
#endif
#endif /* USE_BOEHM_GC */
#ifndef False
# define False 0
@@ -42,9 +43,7 @@
# define True 1
#endif
static void
defaultHandler(int bla)
static void defaultHandler(int bla)
{
if (bla)
kill(getpid(), SIGABRT);
@@ -52,14 +51,11 @@ defaultHandler(int bla)
exit(1);
}
static waborthandler *aborthandler = (waborthandler *) defaultHandler;
#define wAbort(a) (*aborthandler)(a)
waborthandler*
wsetabort(waborthandler *handler)
waborthandler *wsetabort(waborthandler * handler)
{
waborthandler *old = aborthandler;
@@ -68,28 +64,26 @@ wsetabort(waborthandler *handler)
return old;
}
static int Aborting = 0; /* if we're in the middle of an emergency exit */
static WMHashTable *table = NULL;
void *wmalloc(size_t size)
{
void *tmp;
#ifdef TEST_WITH_GC
tmp = GC_malloc(size);
assert(size > 0);
#ifdef USE_BOEHM_GC
tmp = GC_MALLOC(size);
#else
tmp = malloc(size);
#endif
if (tmp == NULL) {
wwarning("malloc() failed. Retrying after 2s.");
sleep(2);
#ifdef TEST_WITH_GC
tmp = GC_malloc(size);
#ifdef USE_BOEHM_GC
tmp = GC_MALLOC(size);
#else
tmp = malloc(size);
#endif
@@ -104,10 +98,10 @@ void *wmalloc(size_t size)
}
}
}
memset(tmp, 0, size);
return tmp;
}
void *wrealloc(void *ptr, size_t newsize)
{
void *nptr;
@@ -118,23 +112,22 @@ void *wrealloc(void *ptr, size_t newsize)
wfree(ptr);
nptr = NULL;
} else {
#ifdef TEST_WITH_GC
nptr = GC_realloc(ptr, newsize);
#ifdef USE_BOEHM_GC
nptr = GC_REALLOC(ptr, newsize);
#else
nptr = realloc(ptr, newsize);
#endif
if (nptr == NULL) {
wwarning("realloc() failed. Retrying after 2s.");
sleep(2);
#ifdef TEST_WITH_GC
nptr = GC_realloc(ptr, newsize);
#ifdef USE_BOEHM_GC
nptr = GC_REALLOC(ptr, newsize);
#else
nptr = realloc(ptr, newsize);
#endif
if (nptr == NULL) {
if (Aborting) {
fputs("Really Bad Error: recursive realloc() failure.",
stderr);
fputs("Really Bad Error: recursive realloc() failure.", stderr);
exit(-1);
} else {
wfatal("virtual memory exhausted");
@@ -147,9 +140,7 @@ void *wrealloc(void *ptr, size_t newsize)
return nptr;
}
void*
wretain(void *ptr)
void *wretain(void *ptr)
{
int *refcount;
@@ -175,22 +166,28 @@ wretain(void *ptr)
return ptr;
}
void
wfree(void *ptr)
void wfree(void *ptr)
{
#ifdef TEST_WITH_GC
GC_free(ptr);
if (ptr)
#ifdef USE_BOEHM_GC
/* This should eventually be removed, once the criss-cross
* of wmalloc()d memory being free()d, malloc()d memory being
* wfree()d, various misuses of calling wfree() on objects
* allocated by libc malloc() and calling libc free() on
* objects allocated by Boehm GC (think external libraries)
* is cleaned up.
*/
if (GC_base(ptr) != 0)
GC_FREE(ptr);
else
free(ptr);
#else
free(ptr);
#endif
ptr = NULL;
}
void
wrelease(void *ptr)
void wrelease(void *ptr)
{
int *refcount;
@@ -214,31 +211,3 @@ wrelease(void *ptr)
#endif
}
}
char*
wstrdup(char *str)
{
assert(str!=NULL);
return strcpy(wmalloc(strlen(str)+1), str);
}
char*
wstrappend(char *dst, char *src)
{
char *str;
if (!dst)
return wstrdup(src);
else if (!src)
return wstrdup(dst);
str = wmalloc(strlen(dst)+strlen(src)+1);
strcpy(str, dst);
strcat(str, src);
return str;
}

14
WINGs/misc.c Normal file
View File

@@ -0,0 +1,14 @@
/* Miscelaneous helper functions */
#include "WINGsP.h"
WMRange wmkrange(int start, int count)
{
WMRange range;
range.position = start;
range.count = count;
return range;
}

View File

@@ -1,227 +0,0 @@
/*
* Demo user widget for WINGs
*
* Author: Alfredo K. Kojima
*
* This file is in the public domain.
*
*/
/*
*
* Include the WINGs private data header.
*
*
*/
#include "WINGsP.h"
/*
* Our public header.
*/
#include "mywidget.h"
/*
* Define the widget "class"
*/
typedef struct W_MyWidget {
/* these two fields must be present in all your widgets in this
* exact position */
W_Class widgetClass;
WMView *view;
/* put your stuff here */
char *text;
} _MyWidget;
/* some forward declarations */
static void destroyMyWidget(_MyWidget *mPtr);
static void paintMyWidget(_MyWidget *mPtr);
static void handleEvents(XEvent *event, void *data);
static void handleActionEvents(XEvent *event, void *data);
/*
* Delegates
* See the source for the other widgets to see how to use.
* You won't need to use this most of the time.
*/
static W_ViewDelegate _MyWidgetDelegate = {
NULL,
NULL,
NULL,
NULL,
NULL
};
/* our widget class ID */
static W_Class myWidgetClass = 0;
/*
* Initializer for our widget. Must be called before creating any
* instances of the widget.
*/
W_Class
InitMyWidget(WMScreen *scr)
{
/* register our widget with WINGs and get our widget class ID */
if (!myWidgetClass) {
myWidgetClass = W_RegisterUserWidget();
}
return myWidgetClass;
}
/*
* Our widget fabrication plant.
*/
MyWidget*
CreateMyWidget(WMWidget *parent)
{
MyWidget *mPtr;
/* allocate some storage for our new widget instance */
mPtr = wmalloc(sizeof(MyWidget));
/* initialize it */
memset(mPtr, 0, sizeof(MyWidget));
/* set the class ID */
mPtr->widgetClass = myWidgetClass;
/*
* Create the view for our widget.
* Note: the Window for the view is only created after the view is
* realized with W_RealizeView()
*
* Consider the returned view as read-only.
*/
mPtr->view = W_CreateView(W_VIEW(parent));
if (!mPtr->view) {
wfree(mPtr);
return NULL;
}
/* always do this */
mPtr->view->self = mPtr;
/* setup the delegates for the view */
mPtr->view->delegate = &_MyWidgetDelegate;
/*
* Intercept some events for our widget, so that we can handle them.
*/
WMCreateEventHandler(mPtr->view, ExposureMask /* this allows us to know when we should paint */
|StructureNotifyMask, /* this allows us to know things like when we are destroyed */
handleEvents, mPtr);
/*
* Intercept some other events. This could be merged with the above
* call, but we separate for more organization.
*/
WMCreateEventHandler(mPtr->view, ButtonPressMask,handleActionEvents, mPtr);
return mPtr;
}
/*
* Paint our widget contents.
*/
static void
paintMyWidget(_MyWidget *mPtr)
{
W_Screen *scr = mPtr->view->screen;
WMColor *color;
if (mPtr->text) {
color = WMWhiteColor(scr);
W_PaintText(mPtr->view, mPtr->view->window, scr->normalFont, 0, 0,
mPtr->view->size.width, WACenter, WMColorGC(color),
False, mPtr->text, strlen(mPtr->text));
WMReleaseColor(color);
}
}
static void
handleEvents(XEvent *event, void *data)
{
_MyWidget *mPtr = (_MyWidget*)data;
switch (event->type) {
case Expose:
if (event->xexpose.count!=0)
break;
paintMyWidget(mPtr);
break;
case DestroyNotify:
destroyMyWidget(mPtr);
break;
}
}
static void
handleActionEvents(XEvent *event, void *data)
{
_MyWidget *mPtr = (_MyWidget*)data;
switch (event->type) {
case ButtonPress:
XBell(mPtr->view->screen->display, 100);
XBell(mPtr->view->screen->display, 100);
break;
}
}
void
SetMyWidgetText(MyWidget *mPtr, char *text)
{
CHECK_CLASS(mPtr, myWidgetClass);
if (mPtr->text)
wfree(mPtr->text);
mPtr->text = wstrdup(text);
if (W_VIEW_MAPPED(mPtr->view)) {
paintMyWidget(mPtr);
}
}
static void
destroyMyWidget(_MyWidget *mPtr)
{
/*
* Free all data we allocated for our widget.
*/
if (mPtr->text)
wfree(mPtr->text);
wfree(mPtr);
}

View File

@@ -6,58 +6,44 @@
#include "WUtil.h"
typedef struct W_Notification {
char *name;
const char *name;
void *object;
void *clientData;
int refCount;
} Notification;
extern void W_FlushASAPNotificationQueue();
char*
WMGetNotificationName(WMNotification *notification)
const char *WMGetNotificationName(WMNotification * notification)
{
return notification->name;
}
void*
WMGetNotificationObject(WMNotification *notification)
void *WMGetNotificationObject(WMNotification * notification)
{
return notification->object;
}
void*
WMGetNotificationClientData(WMNotification *notification)
void *WMGetNotificationClientData(WMNotification * notification)
{
return notification->clientData;
}
WMNotification*
WMCreateNotification(char *name, void *object, void *clientData)
WMNotification *WMCreateNotification(const char *name, void *object, void *clientData)
{
Notification *nPtr;
nPtr = wmalloc(sizeof(Notification));
nPtr->name = name;
nPtr->object = object;
nPtr->clientData = clientData;
nPtr->refCount = 1;
return nPtr;
}
void
WMReleaseNotification(WMNotification *notification)
void WMReleaseNotification(WMNotification * notification)
{
notification->refCount--;
@@ -66,23 +52,20 @@ WMReleaseNotification(WMNotification *notification)
}
}
WMNotification*
WMRetainNotification(WMNotification *notification)
WMNotification *WMRetainNotification(WMNotification * notification)
{
notification->refCount++;
return notification;
}
/***************** Notification Center *****************/
typedef struct NotificationObserver {
WMNotificationObserverAction *observerAction;
void *observer;
char *name;
const char *name;
void *object;
struct NotificationObserver *prev; /* for tables */
@@ -90,7 +73,6 @@ typedef struct NotificationObserver {
struct NotificationObserver *nextAction; /* for observerTable */
} NotificationObserver;
typedef struct W_NotificationCenter {
WMHashTable *nameTable; /* names -> observer lists */
WMHashTable *objectTable; /* object -> observer lists */
@@ -99,27 +81,21 @@ typedef struct W_NotificationCenter {
WMHashTable *observerTable; /* observer -> NotificationObserver */
} NotificationCenter;
/* default (and only) center */
static NotificationCenter *notificationCenter = NULL;
void
W_InitNotificationCenter(void)
void W_InitNotificationCenter(void)
{
notificationCenter = wmalloc(sizeof(NotificationCenter));
notificationCenter->nameTable = WMCreateHashTable(WMStringPointerHashCallbacks);
notificationCenter->objectTable = WMCreateHashTable(WMIntHashCallbacks);
notificationCenter->nilList = NULL;
notificationCenter->observerTable = WMCreateHashTable(WMIntHashCallbacks);
}
void
WMAddNotificationObserver(WMNotificationObserverAction * observerAction,
void *observer, char *name, void *object)
void *observer, const char *name, void *object)
{
NotificationObserver *oRec, *rec;
@@ -131,9 +107,8 @@ WMAddNotificationObserver(WMNotificationObserverAction *observerAction,
oRec->next = NULL;
oRec->prev = NULL;
/* put this action in the list of actions for this observer */
rec = WMHashInsert(notificationCenter->observerTable, observer, oRec);
rec = (NotificationObserver *) WMHashInsert(notificationCenter->observerTable, observer, oRec);
if (rec) {
/* if this is not the first action for the observer */
@@ -151,14 +126,14 @@ WMAddNotificationObserver(WMNotificationObserverAction *observerAction,
notificationCenter->nilList = oRec;
} else if (!name) {
/* any message coming from object */
rec = WMHashInsert(notificationCenter->objectTable, object, oRec);
rec = (NotificationObserver *) WMHashInsert(notificationCenter->objectTable, object, oRec);
oRec->next = rec;
if (rec) {
rec->prev = oRec;
}
} else {
/* name && (object || !object) */
rec = WMHashInsert(notificationCenter->nameTable, name, oRec);
rec = (NotificationObserver *) WMHashInsert(notificationCenter->nameTable, name, oRec);
oRec->next = rec;
if (rec) {
rec->prev = oRec;
@@ -166,22 +141,19 @@ WMAddNotificationObserver(WMNotificationObserverAction *observerAction,
}
}
void
WMPostNotification(WMNotification *notification)
void WMPostNotification(WMNotification * notification)
{
NotificationObserver *orec, *tmp;
WMRetainNotification(notification);
/* tell the observers that want to know about a particular message */
orec = WMHashGet(notificationCenter->nameTable, notification->name);
orec = (NotificationObserver *) WMHashGet(notificationCenter->nameTable, notification->name);
while (orec) {
tmp = orec->next;
if (!orec->object || !notification->object
|| orec->object == notification->object) {
if (!orec->object || !notification->object || orec->object == notification->object) {
/* tell the observer */
if (orec->observerAction) {
(*orec->observerAction) (orec->observer, notification);
@@ -192,7 +164,7 @@ WMPostNotification(WMNotification *notification)
}
/* tell the observers that want to know about an object */
orec = WMHashGet(notificationCenter->objectTable, notification->object);
orec = (NotificationObserver *) WMHashGet(notificationCenter->objectTable, notification->object);
while (orec) {
tmp = orec->next;
@@ -219,14 +191,12 @@ WMPostNotification(WMNotification *notification)
WMReleaseNotification(notification);
}
void
WMRemoveNotificationObserver(void *observer)
void WMRemoveNotificationObserver(void *observer)
{
NotificationObserver *orec, *tmp, *rec;
/* get the list of actions the observer is doing */
orec = WMHashGet(notificationCenter->observerTable, observer);
orec = (NotificationObserver *) WMHashGet(notificationCenter->observerTable, observer);
/*
* FOREACH orec IN actionlist for observer
@@ -244,24 +214,22 @@ WMRemoveNotificationObserver(void *observer)
notificationCenter->nilList = orec->next;
} else if (!orec->name) {
/* any message coming from object */
rec = WMHashGet(notificationCenter->objectTable, orec->object);
rec = (NotificationObserver *) WMHashGet(notificationCenter->objectTable, orec->object);
if (rec == orec) {
/* replace table entry */
if (orec->next) {
WMHashInsert(notificationCenter->objectTable, orec->object,
orec->next);
WMHashInsert(notificationCenter->objectTable, orec->object, orec->next);
} else {
WMHashRemove(notificationCenter->objectTable, orec->object);
}
}
} else {
/* name && (object || !object) */
rec = WMHashGet(notificationCenter->nameTable, orec->name);
rec = (NotificationObserver *) WMHashGet(notificationCenter->nameTable, orec->name);
if (rec == orec) {
/* replace table entry */
if (orec->next) {
WMHashInsert(notificationCenter->nameTable, orec->name,
orec->next);
WMHashInsert(notificationCenter->nameTable, orec->name, orec->next);
} else {
WMHashRemove(notificationCenter->nameTable, orec->name);
}
@@ -280,15 +248,13 @@ WMRemoveNotificationObserver(void *observer)
WMHashRemove(notificationCenter->observerTable, observer);
}
void
WMRemoveNotificationObserverWithName(void *observer, char *name, void *object)
void WMRemoveNotificationObserverWithName(void *observer, const char *name, void *object)
{
NotificationObserver *orec, *tmp, *rec;
NotificationObserver *newList = NULL;
/* get the list of actions the observer is doing */
orec = WMHashGet(notificationCenter->observerTable, observer);
orec = (NotificationObserver *) WMHashGet(notificationCenter->observerTable, observer);
WMHashRemove(notificationCenter->observerTable, observer);
@@ -301,7 +267,9 @@ WMRemoveNotificationObserverWithName(void *observer, char *name, void *object)
if (notificationCenter->nilList == orec)
notificationCenter->nilList = orec->next;
} else if (!name) {
rec = WMHashGet(notificationCenter->objectTable, orec->object);
rec =
(NotificationObserver *) WMHashGet(notificationCenter->objectTable,
orec->object);
if (rec == orec) {
assert(rec->prev == NULL);
/* replace table entry */
@@ -309,12 +277,12 @@ WMRemoveNotificationObserverWithName(void *observer, char *name, void *object)
WMHashInsert(notificationCenter->objectTable,
orec->object, orec->next);
} else {
WMHashRemove(notificationCenter->objectTable,
orec->object);
WMHashRemove(notificationCenter->objectTable, orec->object);
}
}
} else {
rec = WMHashGet(notificationCenter->nameTable, orec->name);
rec = (NotificationObserver *) WMHashGet(notificationCenter->nameTable,
orec->name);
if (rec == orec) {
assert(rec->prev == NULL);
/* replace table entry */
@@ -322,8 +290,7 @@ WMRemoveNotificationObserverWithName(void *observer, char *name, void *object)
WMHashInsert(notificationCenter->nameTable,
orec->name, orec->next);
} else {
WMHashRemove(notificationCenter->nameTable,
orec->name);
WMHashRemove(notificationCenter->nameTable, orec->name);
}
}
}
@@ -357,9 +324,7 @@ WMRemoveNotificationObserverWithName(void *observer, char *name, void *object)
}
}
void
WMPostNotificationName(char *name, void *object, void *clientData)
void WMPostNotificationName(const char *name, void *object, void *clientData)
{
WMNotification *notification;
@@ -370,27 +335,21 @@ WMPostNotificationName(char *name, void *object, void *clientData)
WMReleaseNotification(notification);
}
/**************** Notification Queues ****************/
typedef struct W_NotificationQueue {
WMBag *asapQueue;
WMBag *idleQueue;
WMArray *asapQueue;
WMArray *idleQueue;
struct W_NotificationQueue *next;
} NotificationQueue;
static WMNotificationQueue *notificationQueueList = NULL;
/* default queue */
static WMNotificationQueue *notificationQueue = NULL;
WMNotificationQueue*
WMGetDefaultNotificationQueue(void)
WMNotificationQueue *WMGetDefaultNotificationQueue(void)
{
if (!notificationQueue)
notificationQueue = WMCreateNotificationQueue();
@@ -398,16 +357,13 @@ WMGetDefaultNotificationQueue(void)
return notificationQueue;
}
WMNotificationQueue*
WMCreateNotificationQueue(void)
WMNotificationQueue *WMCreateNotificationQueue(void)
{
NotificationQueue *queue;
queue = wmalloc(sizeof(NotificationQueue));
queue->asapQueue = WMCreateBag(8);
queue->idleQueue = WMCreateBag(8);
queue->asapQueue = WMCreateArrayWithDestructor(8, (WMFreeDataProc *) WMReleaseNotification);
queue->idleQueue = WMCreateArrayWithDestructor(8, (WMFreeDataProc *) WMReleaseNotification);
queue->next = notificationQueueList;
notificationQueueList = queue;
@@ -415,81 +371,52 @@ WMCreateNotificationQueue(void)
return queue;
}
void
WMEnqueueNotification(WMNotificationQueue *queue, WMNotification *notification,
WMPostingStyle postingStyle)
void WMEnqueueNotification(WMNotificationQueue * queue, WMNotification * notification, WMPostingStyle postingStyle)
{
WMEnqueueCoalesceNotification(queue, notification, postingStyle,
WNCOnName|WNCOnSender);
WMEnqueueCoalesceNotification(queue, notification, postingStyle, WNCOnName | WNCOnSender);
}
#define NOTIF ((WMNotification*)cdata)
#define ITEM ((WMNotification*)item)
void
WMDequeueNotificationMatching(WMNotificationQueue *queue,
WMNotification *notification, unsigned mask)
static int matchSenderAndName(const void *item, const void *cdata)
{
WMBagIterator i;
WMNotification *tmp;
if ((mask & WNCOnName) && (mask & WNCOnSender)) {
WM_ITERATE_BAG(queue->asapQueue, tmp, i) {
if (notification->object == tmp->object &&
strcmp(notification->name, tmp->name) == 0) {
WMRemoveFromBag(queue->asapQueue, tmp);
WMReleaseNotification(tmp);
break;
}
}
WM_ITERATE_BAG(queue->idleQueue, tmp, i) {
if (notification->object == tmp->object &&
strcmp(notification->name, tmp->name) == 0) {
WMRemoveFromBag(queue->idleQueue, tmp);
WMReleaseNotification(tmp);
break;
}
}
} else if (mask & WNCOnName) {
WM_ITERATE_BAG(queue->asapQueue, tmp, i) {
if (strcmp(notification->name, tmp->name) == 0) {
WMRemoveFromBag(queue->asapQueue, tmp);
WMReleaseNotification(tmp);
break;
}
}
WM_ITERATE_BAG(queue->idleQueue, tmp, i) {
if (strcmp(notification->name, tmp->name) == 0) {
WMRemoveFromBag(queue->idleQueue, tmp);
WMReleaseNotification(tmp);
break;
}
}
} else if (mask & WNCOnSender) {
WM_ITERATE_BAG(queue->asapQueue, tmp, i) {
if (notification->object == tmp->object) {
WMRemoveFromBag(queue->asapQueue, tmp);
WMReleaseNotification(tmp);
break;
}
}
WM_ITERATE_BAG(queue->idleQueue, tmp, i) {
if (notification->object == tmp->object) {
WMRemoveFromBag(queue->idleQueue, tmp);
WMReleaseNotification(tmp);
break;
}
}
}
return (NOTIF->object == ITEM->object && strcmp(NOTIF->name, ITEM->name) == 0);
}
static int matchSender(const void *item, const void *cdata)
{
return (NOTIF->object == ITEM->object);
}
static int matchName(const void *item, const void *cdata)
{
return (strcmp(NOTIF->name, ITEM->name) == 0);
}
#undef NOTIF
#undef ITEM
void WMDequeueNotificationMatching(WMNotificationQueue * queue, WMNotification * notification, unsigned mask)
{
WMMatchDataProc *matchFunc;
if ((mask & WNCOnName) && (mask & WNCOnSender))
matchFunc = matchSenderAndName;
else if (mask & WNCOnName)
matchFunc = matchName;
else if (mask & WNCOnSender)
matchFunc = matchSender;
else
return;
WMRemoveFromArrayMatching(queue->asapQueue, matchFunc, notification);
WMRemoveFromArrayMatching(queue->idleQueue, matchFunc, notification);
}
void
WMEnqueueCoalesceNotification(WMNotificationQueue * queue,
WMNotification *notification,
WMPostingStyle postingStyle,
unsigned coalesceMask)
WMNotification * notification, WMPostingStyle postingStyle, unsigned coalesceMask)
{
if (coalesceMask != WNCNone)
WMDequeueNotificationMatching(queue, notification, coalesceMask);
@@ -501,50 +428,39 @@ WMEnqueueCoalesceNotification(WMNotificationQueue *queue,
break;
case WMPostASAP:
WMPutInBag(queue->asapQueue, notification);
WMAddToArray(queue->asapQueue, notification);
break;
case WMPostWhenIdle:
WMPutInBag(queue->idleQueue, notification);
WMAddToArray(queue->idleQueue, notification);
break;
}
}
void
W_FlushASAPNotificationQueue()
void W_FlushASAPNotificationQueue()
{
WMNotificationQueue *queue = notificationQueueList;
while (queue) {
while (WMGetBagItemCount(queue->asapQueue)) {
WMNotification *tmp = WMGetFromBag(queue->asapQueue, 0);
WMPostNotification(tmp);
WMReleaseNotification(tmp);
WMDeleteFromBag(queue->asapQueue, 0);
while (WMGetArrayItemCount(queue->asapQueue)) {
WMPostNotification(WMGetFromArray(queue->asapQueue, 0));
WMDeleteFromArray(queue->asapQueue, 0);
}
queue = queue->next;
}
}
void
W_FlushIdleNotificationQueue()
void W_FlushIdleNotificationQueue()
{
WMNotificationQueue *queue = notificationQueueList;
while (queue) {
while (WMGetBagItemCount(queue->idleQueue)) {
WMNotification *tmp = WMGetFromBag(queue->idleQueue, 0);
WMPostNotification(tmp);
WMReleaseNotification(tmp);
WMDeleteFromBag(queue->idleQueue, 0);
while (WMGetArrayItemCount(queue->idleQueue)) {
WMPostNotification(WMGetFromArray(queue->idleQueue, 0));
WMDeleteFromArray(queue->idleQueue, 0);
}
queue = queue->next;
}
}

50
WINGs/po/Makefile.am Normal file
View File

@@ -0,0 +1,50 @@
nlsdir = $(NLSDIR)
CATALOGS = @WINGSMOFILES@
CLEANFILES = $(CATALOGS) WINGs.pot
EXTRA_DIST = bg.po ca.po cs.po de.po fr.po sk.po
POTFILES = \
$(top_builddir)/WINGs/error.c \
$(top_builddir)/WINGs/findfile.c \
$(top_builddir)/WINGs/proplist.c \
$(top_builddir)/WINGs/userdefaults.c \
$(top_builddir)/WINGs/wcolor.c \
$(top_builddir)/WINGs/wcolorpanel.c \
$(top_builddir)/WINGs/wfilepanel.c \
$(top_builddir)/WINGs/wfont.c \
$(top_builddir)/WINGs/wfontpanel.c \
$(top_builddir)/WINGs/widgets.c \
$(top_builddir)/WINGs/wruler.c
SUFFIXES = .po .mo
.po.mo:
msgfmt -c -o $@ $<
all-local: $(CATALOGS)
WINGs.pot: $(POTFILES)
xgettext --default-domain=WINGs \
--add-comments --keyword=_ --keyword=N_ $(POTFILES)
if cmp -s WINGs.po WINGs.pot; then \
rm -f WINGs.po; \
else \
mv -f WINGs.po WINGs.pot; \
fi
install-data-local: $(CATALOGS)
$(mkinstalldirs) $(DESTDIR)$(nlsdir)
chmod 755 $(DESTDIR)$(nlsdir)
for n in $(CATALOGS) __DuMmY ; do \
if test "$$n" -a "$$n" != "__DuMmY" ; then \
l=`basename $$n .mo`; \
$(mkinstalldirs) $(DESTDIR)$(nlsdir)/$$l/LC_MESSAGES; \
chmod 755 $(DESTDIR)$(nlsdir)/$$l; \
chmod 755 $(DESTDIR)$(nlsdir)/$$l/LC_MESSAGES; \
$(INSTALL_DATA) -m 644 $$n $(DESTDIR)$(nlsdir)/$$l/LC_MESSAGES/WINGs.mo; \
fi; \
done

19
WINGs/po/README Normal file
View File

@@ -0,0 +1,19 @@
Instructions for translating po files can be found in the po/README directory
in the top of the WindowMaker source tree.
All files are in UTF-8
File Language Note Current Maintainer
------------------------------------------------------------------------------
ca.po Catalan Ernest Adrogué <eadrogue@gmx.net>
cs.po Czech Jiri Hnidek <Jiri.Hnidek@vslib.cz
de.po German Guido Scholz <guido.scholz@bayernline.de>
fr.po French Emmanuel Benoit <tseeker@neptune.fr>
Antoine Hulin <antoine@origan.fdn.org>
sk.po Slovak Jan 'judas' Tomka <judas@linux.sk>
bg.po Bulgarian Anton Zinoviev <zinoviev@debian.org>
Notes
-----

660
WINGs/po/bg.po Normal file
View File

@@ -0,0 +1,660 @@
# Message catalog for WINGs
# Copyright (C) 2003 Free Software Foundation, Inc.
# Anton Zinoviev <zinoviev@debian.org>, 2003
#
msgid ""
msgstr ""
"Project-Id-Version: WINGs 0.80.0\n"
"POT-Creation-Date: 2003-02-08 21:42+0200\n"
"PO-Revision-Date: 2003-02-09 12:10+0200\n"
"Last-Translator: Anton Zinoviev <zinoviev@debian.org>\n"
"Language-Team: Bulgarian <dict@linux.zonebg.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../../WINGs/connection.c:461 ../../WINGs/connection.c:526
#: ../../WINGs/connection.c:569
msgid "Bad address-service-protocol combination"
msgstr "Неправилна комбинация адрес-услуга-протокол"
#: ../../WINGs/error.c:54
#, c-format
msgid "Unknown error %d"
msgstr "Непозната грешка %d"
#: ../../WINGs/error.c:59
#, c-format
msgid "Error %d"
msgstr "Грешка %d"
#: ../../WINGs/error.c:110
msgid " warning: "
msgstr "внимание: "
#: ../../WINGs/error.c:137
msgid " fatal error: "
msgstr " критична грешка: "
#: ../../WINGs/error.c:163 ../../WINGs/error.c:192
msgid " error: "
msgstr " грешка: "
#: ../../WINGs/findfile.c:48
#, c-format
msgid "could not get password entry for UID %i"
msgstr "не може да се получи записът за парола на потребител с номер %i"
#: ../../WINGs/findfile.c:66
#, c-format
msgid "could not get password entry for user %s"
msgstr "не може да се получи записът за парола на потребител %s<"
#: ../../WINGs/host.c:114
msgid "Cannot get current host name"
msgstr "Не може да се получи името на хоста"
#: ../../WINGs/proplist.c:91
#, c-format
msgid "syntax error in %s %s, line %i: %s"
msgstr "синтактична грешка в %s %s, ред %i: %s"
#: ../../WINGs/proplist.c:150
msgid "Only string or data is supported for a proplist dictionary key"
msgstr "Като ключ за достъп до proplist се поддържат само низове или данни"
#: ../../WINGs/proplist.c:184 ../../WINGs/proplist.c:236
#: ../../WINGs/proplist.c:394 ../../WINGs/proplist.c:474
#: ../../WINGs/proplist.c:1075 ../../WINGs/proplist.c:1127
#: ../../WINGs/proplist.c:1293 ../../WINGs/proplist.c:1372
#: ../../WINGs/proplist.c:1493 ../../WINGs/proplist.c:1540
msgid "Used proplist functions on non-WMPropLists objects"
msgstr "Ползват се proplist-функции за обекти, които не са от тип WMPropLists"
#: ../../WINGs/proplist.c:630
msgid "unterminated PropList string"
msgstr "незавършен низ PropList"
#: ../../WINGs/proplist.c:670
msgid "unterminated PropList data"
msgstr "незавършени данни PropList"
#: ../../WINGs/proplist.c:678
msgid "unterminated PropList data (missing hexdigit)"
msgstr "незавършени данни PropList (липсва шестнадесетично число)"
#: ../../WINGs/proplist.c:690 ../../WINGs/proplist.c:695
msgid "non hexdigit character in PropList data"
msgstr "знак, който не е шестнадесетично число, в данни PropList"
#: ../../WINGs/proplist.c:729
msgid "unterminated PropList array"
msgstr "незавършен масив PropList"
#: ../../WINGs/proplist.c:737
msgid "missing or unterminated PropList array"
msgstr "липсващ или незавършен масив Proplist"
#: ../../WINGs/proplist.c:747
msgid "could not get PropList array element"
msgstr "не може да се получи елемент от масив PropList"
#: ../../WINGs/proplist.c:776
msgid "unterminated PropList dictionary"
msgstr "незавършен речник PropList"
#: ../../WINGs/proplist.c:793
msgid "missing PropList dictionary key"
msgstr "липсващ ключ за достъп до PropList"
#: ../../WINGs/proplist.c:795
msgid "missing PropList dictionary entry key or unterminated dictionary"
msgstr "липсващ ключ за достъп до PropList или незавършен речник"
#: ../../WINGs/proplist.c:803
msgid "error parsing PropList dictionary key"
msgstr "грешка при разбор на ключ в PropList"
#: ../../WINGs/proplist.c:811
msgid "missing = in PropList dictionary entry"
msgstr "липсва знак за равенство в елемент на PropList"
#: ../../WINGs/proplist.c:819
msgid "error parsing PropList dictionary entry value"
msgstr "грешка при разбор на стойност на елемент в PropList"
#: ../../WINGs/proplist.c:827
msgid "missing ; in PropList dictionary entry"
msgstr "липсва знак точка и запетая в елемент на PropList"
#: ../../WINGs/proplist.c:888
msgid ""
"was expecting a string, data, array or dictionary. If it's a string, try "
"enclosing it with \"."
msgstr "очакваха се низ, данни, масив или речник. Ако е речник, пробвайте да го оградите с \"."
#: ../../WINGs/proplist.c:892
msgid "Comments are not allowed inside WindowMaker owned domain files."
msgstr "Не се позволяват коментари във файлове с области, собственост на Уиндоу Мейкър"
#: ../../WINGs/proplist.c:1563 ../../WINGs/proplist.c:1628
msgid "extra data after end of property list"
msgstr "данни в повече след края на списък свойства"
#: ../../WINGs/proplist.c:1606
#, c-format
msgid "could not get size for file '%s'"
msgstr "не може да се получи размерът за файл \"%s\""
#: ../../WINGs/proplist.c:1618
#, c-format
msgid "error reading from file '%s'"
msgstr "грешка при четене от файл \"%s\""
#: ../../WINGs/proplist.c:1669
#, c-format
msgid "mkstemp (%s) failed"
msgstr "mkstemp (%s) не успя"
#: ../../WINGs/proplist.c:1680
#, c-format
msgid "mktemp (%s) failed"
msgstr "mktemp (%s) не успя"
#: ../../WINGs/proplist.c:1691
#, c-format
msgid "open (%s) failed"
msgstr "open (%s) не успя"
#: ../../WINGs/proplist.c:1698
#, c-format
msgid "writing to file: %s failed"
msgstr "записът във файл %s не успя"
#: ../../WINGs/proplist.c:1706
#, c-format
msgid "fclose (%s) failed"
msgstr "fclose (%s) не успя"
#: ../../WINGs/proplist.c:1715
#, c-format
msgid "rename ('%s' to '%s') failed"
msgstr "преименуването (от \"%s\" на \"%s\") не успя"
#. something happened with the file. just overwrite it
#: ../../WINGs/userdefaults.c:192 ../../WINGs/userdefaults.c:208
#, c-format
msgid "cannot read domain from file '%s' when syncing"
msgstr "не може да се прочете областта от файл \"%s\" при синхронизиране"
#: ../../WINGs/wcolor.c:198 ../../WINGs/wcolor.c:211 ../../WINGs/wcolor.c:250
#: ../../WINGs/wcolor.c:291
#, c-format
msgid "could not allocate %s color"
msgstr "не може да се задели цвят %s"
#: ../../WINGs/wcolor.c:198
msgid "white"
msgstr "бял"
#: ../../WINGs/wcolor.c:211
msgid "black"
msgstr "черен"
#: ../../WINGs/wcolor.c:250
msgid "gray"
msgstr "сив"
#: ../../WINGs/wcolor.c:291
msgid "dark gray"
msgstr "тъмносив"
#: ../../WINGs/wcolorpanel.c:415
msgid "Colors"
msgstr "Цветове"
#: ../../WINGs/wcolorpanel.c:605 ../../WINGs/wcolorpanel.c:2824
msgid "Brightness"
msgstr "Яркост"
#: ../../WINGs/wcolorpanel.c:607 ../../WINGs/wcolorpanel.c:683
#: ../../WINGs/wcolorpanel.c:716 ../../WINGs/wcolorpanel.c:750
#: ../../WINGs/wcolorpanel.c:810 ../../WINGs/wcolorpanel.c:844
#: ../../WINGs/wcolorpanel.c:878 ../../WINGs/wcolorpanel.c:913
#: ../../WINGs/wcolorpanel.c:2164 ../../WINGs/wcolorpanel.c:2826
#: ../../WINGs/wcolorpanel.c:2862 ../../WINGs/wcolorpanel.c:2898
#: ../../WINGs/wcolorpanel.c:3746
msgid "Color Panel: Could not allocate memory"
msgstr "Color Panel: не може да се задели памет"
#: ../../WINGs/wcolorpanel.c:680 ../../WINGs/wcolorpanel.c:681
msgid "Red"
msgstr "Червен"
#: ../../WINGs/wcolorpanel.c:713 ../../WINGs/wcolorpanel.c:714
msgid "Green"
msgstr "Зелен"
#: ../../WINGs/wcolorpanel.c:747 ../../WINGs/wcolorpanel.c:748
msgid "Blue"
msgstr "Син"
#: ../../WINGs/wcolorpanel.c:807 ../../WINGs/wcolorpanel.c:808
msgid "Cyan"
msgstr "Синьозелен"
#: ../../WINGs/wcolorpanel.c:841 ../../WINGs/wcolorpanel.c:842
msgid "Magenta"
msgstr "Пурпурен"
#: ../../WINGs/wcolorpanel.c:875 ../../WINGs/wcolorpanel.c:876
msgid "Yellow"
msgstr "Жълт"
#: ../../WINGs/wcolorpanel.c:910 ../../WINGs/wcolorpanel.c:911
msgid "Black"
msgstr "Черен"
#: ../../WINGs/wcolorpanel.c:991
msgid "Spectrum"
msgstr "Спектър"
#: ../../WINGs/wcolorpanel.c:1021
msgid "Palette"
msgstr "Палитра"
#: ../../WINGs/wcolorpanel.c:1027
msgid "New from File..."
msgstr "Нова от файл..."
#: ../../WINGs/wcolorpanel.c:1028 ../../WINGs/wcolorpanel.c:1076
#: ../../WINGs/wcolorpanel.c:1093
msgid "Rename..."
msgstr "Преименувай..."
#: ../../WINGs/wcolorpanel.c:1029 ../../WINGs/wcolorpanel.c:1077
#: ../../WINGs/wcolorpanel.c:1094 ../../WINGs/wcolorpanel.c:3321
msgid "Remove"
msgstr "Премахни"
#: ../../WINGs/wcolorpanel.c:1030
msgid "Copy"
msgstr "Копирай"
#: ../../WINGs/wcolorpanel.c:1031
#, fuzzy
msgid "New from Clipboard"
msgstr "Нова от Clipboard"
#: ../../WINGs/wcolorpanel.c:1052
msgid "X11-Colors"
msgstr "Цветове от X11"
#: ../../WINGs/wcolorpanel.c:1069
msgid "Color"
msgstr "Цвят"
#: ../../WINGs/wcolorpanel.c:1075
msgid "Add..."
msgstr "Добави..."
#: ../../WINGs/wcolorpanel.c:1085
msgid "List"
msgstr "Списък"
#: ../../WINGs/wcolorpanel.c:1092
msgid "New..."
msgstr "Нов..."
#: ../../WINGs/wcolorpanel.c:1231
#, c-format
msgid ""
"Color Panel: Could not create directory %s needed to store configurations"
msgstr "Color Panel: Не може да се създаде директория %s, необходима за да се запазят настройките"
#. Delete the file, it doesn't belong here
#: ../../WINGs/wcolorpanel.c:1237 ../../WINGs/wcolorpanel.c:3207
#: ../../WINGs/wcolorpanel.c:3211
msgid "File Error"
msgstr "Файлова грешка"
#: ../../WINGs/wcolorpanel.c:1238
msgid "Could not create ColorPanel configuration directory"
msgstr "Не може да се създаде конфигурационна директория за ColorPanel"
#: ../../WINGs/wcolorpanel.c:1239 ../../WINGs/wcolorpanel.c:3208
#: ../../WINGs/wcolorpanel.c:3213 ../../WINGs/wcolorpanel.c:3240
#: ../../WINGs/wfilepanel.c:250 ../../WINGs/wfilepanel.c:647
#: ../../WINGs/wfilepanel.c:659 ../../WINGs/wfilepanel.c:760
#: ../../WINGs/wfilepanel.c:971 ../../WINGs/wfontpanel.c:709
msgid "OK"
msgstr "Приемам"
#: ../../WINGs/wcolorpanel.c:1245 ../../WINGs/wcolorpanel.c:1281
#: ../../WINGs/wcolorpanel.c:1299
msgid "Color Panel: Could not find file"
msgstr "Color Panel: Не може да се открие файла"
#: ../../WINGs/wcolorpanel.c:1486 ../../WINGs/wcolorpanel.c:1551
#: ../../WINGs/wcolorpanel.c:1615
msgid "Color Panel: X failed request"
msgstr "Color Panel: не успя заявка към X"
#: ../../WINGs/wcolorpanel.c:2860
msgid "Saturation"
msgstr "Наситеност"
#: ../../WINGs/wcolorpanel.c:2896
msgid "Hue"
msgstr "Нюанс"
#: ../../WINGs/wcolorpanel.c:3146
msgid "Open Palette"
msgstr "Отваряне на палитра"
#: ../../WINGs/wcolorpanel.c:3208
msgid "Invalid file format !"
msgstr "Неправилен файлов формат!"
#: ../../WINGs/wcolorpanel.c:3210
#, c-format
msgid "can't remove file %s"
msgstr "не може да се изтрие файлът %s"
#: ../../WINGs/wcolorpanel.c:3212
msgid "Couldn't remove file from Configuration Directory !"
msgstr "Не може да се изтрие файл от директорията за настройки!"
#: ../../WINGs/wcolorpanel.c:3239
msgid "Rename"
msgstr "Преименуване"
#: ../../WINGs/wcolorpanel.c:3239
msgid "Rename palette to:"
msgstr "Преименувай палитрата на "
#: ../../WINGs/wcolorpanel.c:3240 ../../WINGs/wfilepanel.c:259
#: ../../WINGs/wfilepanel.c:659 ../../WINGs/wfilepanel.c:760
msgid "Cancel"
msgstr "Отменям"
#. Careful, this palette exists already
#: ../../WINGs/wcolorpanel.c:3256 ../../WINGs/wfilepanel.c:760
msgid "Warning"
msgstr "Внимание"
#: ../../WINGs/wcolorpanel.c:3257
msgid ""
"Palette already exists !\n"
"\n"
"Overwrite ?"
msgstr ""
"Такава палитра вече съществува!\n"
"\n"
"Да бъде ли заменена с новата?"
#: ../../WINGs/wcolorpanel.c:3257 ../../WINGs/wcolorpanel.c:3321
msgid "No"
msgstr "Не"
#: ../../WINGs/wcolorpanel.c:3257 ../../WINGs/wcolorpanel.c:3321
msgid "Yes"
msgstr "Да"
#: ../../WINGs/wcolorpanel.c:3289
#, c-format
msgid "Couldn't rename palette %s to %s\n"
msgstr "Палитрата %s не може да се преименува на %s\n"
#: ../../WINGs/wcolorpanel.c:3315
msgid "This will permanently remove the palette "
msgstr "Това ще отстрани палитрата необратимо "
#: ../../WINGs/wcolorpanel.c:3318
msgid ""
".\n"
"\n"
"Are you sure you want to remove this palette ?"
msgstr ""
".\n"
"\n"
"Убедени ли сте, че искате да отстраните тази палитра?"
#: ../../WINGs/wcolorpanel.c:3343
#, c-format
msgid "Couldn't remove palette %s\n"
msgstr "Палитрата %s не може да бъде отстранена\n"
#: ../../WINGs/wcolorpanel.c:3648
#, c-format
msgid "Could not open %s"
msgstr "Не може да бъде отворен %s"
#: ../../WINGs/wcolorpanel.c:3655
#, c-format
msgid "Could not create %s"
msgstr "Не може да бъде създаден %s"
#: ../../WINGs/wcolorpanel.c:3666
#, c-format
msgid "Write error on file %s"
msgstr "Грешка при запис във файл %s"
#: ../../WINGs/wcolorpanel.c:3711
msgid "Color Panel: Color unspecified"
msgstr "Color Panel: Не е посочен цвят"
#: ../../WINGs/wfilepanel.c:235
msgid "Name:"
msgstr "Име:"
#: ../../WINGs/wfilepanel.c:332 ../../WINGs/wfilepanel.c:396
msgid "Open"
msgstr "Отвори"
#: ../../WINGs/wfilepanel.c:350 ../../WINGs/wfilepanel.c:402
msgid "Save"
msgstr "Запази"
#: ../../WINGs/wfilepanel.c:562
#, c-format
msgid "WINGs: could not open directory %s\n"
msgstr "WINGs: директорията %s не може да се отвори\n"
#: ../../WINGs/wfilepanel.c:580
#, c-format
msgid "WINGs: could not stat %s\n"
msgstr "WINGs: не могат да се получат атрибутите (stat) за %s\n"
#: ../../WINGs/wfilepanel.c:647 ../../WINGs/wfilepanel.c:970
#: ../../WINGs/wfontpanel.c:708
msgid "Error"
msgstr "Грешка"
#: ../../WINGs/wfilepanel.c:658
msgid "Create Directory"
msgstr "Създаване на директория"
#: ../../WINGs/wfilepanel.c:659
msgid "Enter directory name"
msgstr "Въведете името на директорията"
#: ../../WINGs/wfilepanel.c:695 ../../WINGs/wfilepanel.c:734
#: ../../WINGs/wfilepanel.c:765 ../../WINGs/wfilepanel.c:793
msgid "Permission denied."
msgstr "Отказан достъп"
#: ../../WINGs/wfilepanel.c:698
#, c-format
msgid "'%s' already exists."
msgstr "вече съществува \"%s\"."
#: ../../WINGs/wfilepanel.c:701
msgid "Path does not exist."
msgstr "Пътят не съществува."
#: ../../WINGs/wfilepanel.c:731 ../../WINGs/wfilepanel.c:790
#, c-format
msgid "'%s' does not exist."
msgstr "Не съществува \"%s\"."
#: ../../WINGs/wfilepanel.c:738 ../../WINGs/wfilepanel.c:797
msgid "Insufficient memory available."
msgstr "Не е достъпна достатъчно памет."
#: ../../WINGs/wfilepanel.c:742 ../../WINGs/wfilepanel.c:801
#, c-format
msgid "'%s' is on a read-only filesystem."
msgstr "\"%s\" се намира във файлова система с достъп само за четене."
#: ../../WINGs/wfilepanel.c:745 ../../WINGs/wfilepanel.c:777
#: ../../WINGs/wfilepanel.c:804
#, c-format
msgid "Can not delete '%s'."
msgstr "\"%s\" не може да бъде изтрит."
#: ../../WINGs/wfilepanel.c:752
#, c-format
msgid "Delete directory %s ?"
msgstr "Да се изтрие ли директорията %s?"
#: ../../WINGs/wfilepanel.c:756
#, c-format
msgid "Delete file %s ?"
msgstr "Да се изтрие ли файлът %s?"
#: ../../WINGs/wfilepanel.c:768
#, c-format
msgid "Directory '%s' does not exist."
msgstr "Директорията \"%s\" не съществува."
#: ../../WINGs/wfilepanel.c:771
#, c-format
msgid "Directory '%s' is not empty."
msgstr "Директорията \"%s\" не е празна."
#: ../../WINGs/wfilepanel.c:774
#, c-format
msgid "Directory '%s' is busy."
msgstr "Директорията \"%s е заета."
#: ../../WINGs/wfilepanel.c:787
#, c-format
msgid "'%s' is a directory."
msgstr "\"%s\" е директория."
#: ../../WINGs/wfilepanel.c:829
#, c-format
msgid "An error occured browsing '%s'."
msgstr "Настъпи грешка при показване на \"%s\"."
#: ../../WINGs/wfilepanel.c:833
#, c-format
msgid "'%s' is not a directory."
msgstr "\"%s\" не е директория."
#: ../../WINGs/wfilepanel.c:970
msgid "File does not exist."
msgstr "Файлът не съществува."
#: ../../WINGs/wfont.c:129
#, c-format
msgid "the following character sets are missing in %s:"
msgstr "в %s липсват следните кодирания:"
#: ../../WINGs/wfont.c:136
#, c-format
msgid ""
"the string \"%s\" will be used in place of any characters from those sets."
msgstr "Вместо кой да е символ от тези кодирания ще се използва низът \"%s\"."
#: ../../WINGs/wfont.c:300 ../../WINGs/wfont.c:336
#, c-format
msgid "could not load font set %s. Trying fixed."
msgstr "не може да се зареди шрифтова комбинация %s. Опит за шрифт fixed."
#: ../../WINGs/wfont.c:306 ../../WINGs/wfont.c:342
#, c-format
msgid "could not load font %s. Trying fixed."
msgstr "не може да се зареди шрифт %s. Опит за шрифт fixed."
#: ../../WINGs/wfont.c:310 ../../WINGs/wfont.c:346
msgid "could not load fixed font!"
msgstr "не може да се зареди шрифтът fixed!"
#: ../../WINGs/wfont.c:441
#, c-format
msgid "font description %s is too large."
msgstr "шрифтовото описание %s е твърде дълго."
#: ../../WINGs/wfontpanel.c:205
msgid "Test!!!"
msgstr "Проба!!! Test!!!"
#: ../../WINGs/wfontpanel.c:211
msgid "Family"
msgstr "Гарнитура"
#: ../../WINGs/wfontpanel.c:222
msgid "Typeface"
msgstr "Стил"
#: ../../WINGs/wfontpanel.c:233
msgid "Size"
msgstr "Размер"
#: ../../WINGs/wfontpanel.c:252
msgid "Set"
msgstr "Установи"
#: ../../WINGs/wfontpanel.c:257
msgid "Revert"
msgstr "Предишното"
#: ../../WINGs/wfontpanel.c:709
msgid "Could not retrieve font list"
msgstr "Не може да се получи списъка от шрифтове"
#: ../../WINGs/wfontpanel.c:721
#, c-format
msgid "font name %s is longer than 256, which is invalid."
msgstr "името на шрифта %s е по-дълго от 256 символа, което е недопустимо."
#: ../../WINGs/wfontpanel.c:868
msgid "Roman"
msgstr "Изправен"
#: ../../WINGs/wfontpanel.c:871
msgid "Italic"
msgstr "Курсив"
#: ../../WINGs/wfontpanel.c:873
msgid "Oblique"
msgstr "Наклонен"
#: ../../WINGs/wfontpanel.c:875
msgid "Rev Italic"
msgstr "Обратен курсив"
#: ../../WINGs/wfontpanel.c:877
msgid "Rev Oblique"
msgstr "Обратно наклонен"
#: ../../WINGs/wfontpanel.c:883
msgid "Normal"
msgstr "Нормален"
#: ../../WINGs/widgets.c:415
#, c-format
msgid "WINGs: could not load widget images file: %s"
msgstr "WINGs: не може да се зареди изображението %s на библиотеката."
#: ../../WINGs/widgets.c:763
msgid ""
"could not load any fonts. Make sure your font installation and locale "
"settings are correct."
msgstr "не може да се зареди никакъв шрифт. Убедете се, че имате правилно инсталирани шрифтове и посочен езиков локал."
#: ../../WINGs/wruler.c:189
msgid "0 inches"
msgstr "0 цола"

736
WINGs/po/ca.po Normal file
View File

@@ -0,0 +1,736 @@
# Catalan messages for WINGs.
# Copyright (C) 2003 Ernest Adrogué <eadrogue@gmx.net>.
# This file is distributed under the terms of the GNU General Public License.
#
# Version history:
# WM-ver author email date
# 0.80.2 Ernest Adrogué eadrogue@gmx.net 23 Feb 2003
# CVS-20030914 Ernest Adrogué eadrogue@gmx.net 15 Set 2003
#
msgid ""
msgstr ""
"Project-Id-Version: WINGs 0.80.2\n"
"POT-Creation-Date: 2003-09-16 22:59+0200\n"
"PO-Revision-Date: 2003-09-16 23:16+0200\n"
"Last-Translator: Ernest Adrogué <eadrogue@gmx.net>\n"
"Language-Team: Catalan <ca@dodds.net>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../../WINGs/connection.c:467 ../../WINGs/connection.c:532
#: ../../WINGs/connection.c:575
msgid "Bad address-service-protocol combination"
msgstr "Combinació adreça-servei-protocol incorrecta"
#: ../../WINGs/error.c:54
#, c-format
msgid "Unknown error %d"
msgstr "Error no identificat %d"
#: ../../WINGs/error.c:59
#, c-format
msgid "Error %d"
msgstr "Error %d"
#: ../../WINGs/error.c:110
msgid " warning: "
msgstr ": atenció: "
#: ../../WINGs/error.c:137
msgid " fatal error: "
msgstr ": error fatal: "
#: ../../WINGs/error.c:163 ../../WINGs/error.c:192
msgid " error: "
msgstr ": error: "
#: ../../WINGs/findfile.c:48
#, c-format
msgid "could not get password entry for UID %i"
msgstr "no s'ha pogut obtenir l'informació de compte de l'UID %i"
#: ../../WINGs/findfile.c:66
#, c-format
msgid "could not get password entry for user %s"
msgstr "no s'ha pogut obtenir l'informació de compte de l'usuari %s"
#: ../../WINGs/host.c:114
msgid "Cannot get current host name"
msgstr "No s'ha pogut obtenir el nom de host actual"
# falten coses per traduïr en el codi font. eac
#: ../../WINGs/proplist.c:91
#, c-format
msgid "syntax error in %s %s, line %i: %s"
msgstr "error de sintaxi a %s %s, línia %i: %s"
#: ../../WINGs/proplist.c:150
msgid "Only string or data is supported for a proplist dictionary key"
msgstr ""
"Una entrada PropList de diccionari només pot contenir dades o una cadena"
#: ../../WINGs/proplist.c:184 ../../WINGs/proplist.c:236
#: ../../WINGs/proplist.c:394 ../../WINGs/proplist.c:474
#: ../../WINGs/proplist.c:1075 ../../WINGs/proplist.c:1127
#: ../../WINGs/proplist.c:1293 ../../WINGs/proplist.c:1372
#: ../../WINGs/proplist.c:1493 ../../WINGs/proplist.c:1540
msgid "Used proplist functions on non-WMPropLists objects"
msgstr "S'han usat funcions PropList en objectes no-WMPropLists"
#: ../../WINGs/proplist.c:630
msgid "unterminated PropList string"
msgstr "cadena PropList incompleta"
#: ../../WINGs/proplist.c:670
msgid "unterminated PropList data"
msgstr "dades PropList incompletes"
#: ../../WINGs/proplist.c:678
msgid "unterminated PropList data (missing hexdigit)"
msgstr "Dades PropList incompletes (falta un digit hexadecimal)"
#: ../../WINGs/proplist.c:690 ../../WINGs/proplist.c:695
msgid "non hexdigit character in PropList data"
msgstr "cap digit hexadecimal a les dades PropList"
#: ../../WINGs/proplist.c:729
msgid "unterminated PropList array"
msgstr "matriu PropList incompleta"
#: ../../WINGs/proplist.c:737
msgid "missing or unterminated PropList array"
msgstr "matriu PropList incompleta o inexistent"
#: ../../WINGs/proplist.c:747
msgid "could not get PropList array element"
msgstr "no s'ha pogut obtenir un element de la matriu PropList"
#: ../../WINGs/proplist.c:776
msgid "unterminated PropList dictionary"
msgstr "diccionari PropList incomplet"
#: ../../WINGs/proplist.c:793
msgid "missing PropList dictionary key"
msgstr "falta una entrada PropList de diccionari"
#: ../../WINGs/proplist.c:795
msgid "missing PropList dictionary entry key or unterminated dictionary"
msgstr "falta una entrada PropList de diccionari o bé està incompleta"
#: ../../WINGs/proplist.c:803
msgid "error parsing PropList dictionary key"
msgstr "error mentre s'analitzava l'entrada PropList de diccionari"
#: ../../WINGs/proplist.c:811
msgid "missing = in PropList dictionary entry"
msgstr "falta un \"=\" a l'entrada PropList de diccionari"
#: ../../WINGs/proplist.c:819
msgid "error parsing PropList dictionary entry value"
msgstr "error mentre s'analitzava el valor de l'entrada PropList de diccionari"
#: ../../WINGs/proplist.c:827
msgid "missing ; in PropList dictionary entry"
msgstr "falta un \";\" a l'entrada PropList de diccionari"
#: ../../WINGs/proplist.c:888
msgid ""
"was expecting a string, data, array or dictionary. If it's a string, try "
"enclosing it with \"."
msgstr ""
"s'esperava una cadena, dada, matriu o diccionari. Si es tractava d'una\n"
"cadena proveu d'escriure-la \"entre cometes\"."
#: ../../WINGs/proplist.c:892
msgid "Comments are not allowed inside WindowMaker owned domain files."
msgstr "No es permeten comentaris en els fitxers de domini de WindowMaker."
#: ../../WINGs/proplist.c:1563 ../../WINGs/proplist.c:1630
msgid "extra data after end of property list"
msgstr "sobren dades després de la llista de propietats"
#: ../../WINGs/proplist.c:1606
#, c-format
msgid "could not get size for file '%s'"
msgstr "no s'ha pogut obtenir la mida de \"%s\""
#: ../../WINGs/proplist.c:1619
#, c-format
msgid "error reading from file '%s'"
msgstr "error mentre es llegia el fitxer \"%s\""
#: ../../WINGs/proplist.c:1671
#, c-format
msgid "mkstemp (%s) failed"
msgstr "la rutina mkstemp (%s) ha fallat"
#: ../../WINGs/proplist.c:1682
#, c-format
msgid "mktemp (%s) failed"
msgstr "la rutina mktemp (%s) ha fallat"
#: ../../WINGs/proplist.c:1693
#, c-format
msgid "open (%s) failed"
msgstr "la rutina open (%s) ha fallat"
#: ../../WINGs/proplist.c:1700
#, c-format
msgid "writing to file: %s failed"
msgstr "l'escriptura del fitxer \"%s\" ha fallat"
#: ../../WINGs/proplist.c:1708
#, c-format
msgid "fclose (%s) failed"
msgstr "la rutina fclose (%s) ha fallat"
#: ../../WINGs/proplist.c:1717
#, c-format
msgid "rename ('%s' to '%s') failed"
msgstr "el canvi de nom (\"%s\" a \"%s\") ha fallat"
#. something happened with the file. just overwrite it
#: ../../WINGs/userdefaults.c:188 ../../WINGs/userdefaults.c:204
#, c-format
msgid "cannot read domain from file '%s' when syncing"
msgstr "no s'ha pogut llegir un domini del fitxer \"%s\" quan es sincronitzava"
#: ../../WINGs/wcolor.c:224 ../../WINGs/wcolor.c:236 ../../WINGs/wcolor.c:275
#: ../../WINGs/wcolor.c:316
#, c-format
msgid "could not allocate %s color"
msgstr "no s'ha pogut assignar espai pel color \"%s\""
#: ../../WINGs/wcolor.c:224
msgid "white"
msgstr "blanc"
#: ../../WINGs/wcolor.c:236
msgid "black"
msgstr "negre"
#: ../../WINGs/wcolor.c:275
msgid "gray"
msgstr "gris"
#: ../../WINGs/wcolor.c:316
msgid "dark gray"
msgstr "gris fosc"
#: ../../WINGs/wcolorpanel.c:420
msgid "Colors"
msgstr "Colors"
#: ../../WINGs/wcolorpanel.c:610 ../../WINGs/wcolorpanel.c:2829
msgid "Brightness"
msgstr "Claror"
#: ../../WINGs/wcolorpanel.c:612 ../../WINGs/wcolorpanel.c:688
#: ../../WINGs/wcolorpanel.c:721 ../../WINGs/wcolorpanel.c:755
#: ../../WINGs/wcolorpanel.c:815 ../../WINGs/wcolorpanel.c:849
#: ../../WINGs/wcolorpanel.c:883 ../../WINGs/wcolorpanel.c:918
#: ../../WINGs/wcolorpanel.c:2169 ../../WINGs/wcolorpanel.c:2831
#: ../../WINGs/wcolorpanel.c:2867 ../../WINGs/wcolorpanel.c:2903
#: ../../WINGs/wcolorpanel.c:3745
msgid "Color Panel: Could not allocate memory"
msgstr "Panell de color: No s'ha pogut assignar memòria"
#: ../../WINGs/wcolorpanel.c:685 ../../WINGs/wcolorpanel.c:686
msgid "Red"
msgstr "Roig"
#: ../../WINGs/wcolorpanel.c:718 ../../WINGs/wcolorpanel.c:719
msgid "Green"
msgstr "Verd"
#: ../../WINGs/wcolorpanel.c:752 ../../WINGs/wcolorpanel.c:753
msgid "Blue"
msgstr "Blau"
#: ../../WINGs/wcolorpanel.c:812 ../../WINGs/wcolorpanel.c:813
msgid "Cyan"
msgstr "Cian"
#: ../../WINGs/wcolorpanel.c:846 ../../WINGs/wcolorpanel.c:847
msgid "Magenta"
msgstr "Magenta"
#: ../../WINGs/wcolorpanel.c:880 ../../WINGs/wcolorpanel.c:881
msgid "Yellow"
msgstr "Groc"
#: ../../WINGs/wcolorpanel.c:915 ../../WINGs/wcolorpanel.c:916
msgid "Black"
msgstr "Negre"
#: ../../WINGs/wcolorpanel.c:996
msgid "Spectrum"
msgstr "Espectre"
#: ../../WINGs/wcolorpanel.c:1026
msgid "Palette"
msgstr "Paleta"
#: ../../WINGs/wcolorpanel.c:1032
msgid "New from File..."
msgstr "Obtenir d'un fitxer..."
#: ../../WINGs/wcolorpanel.c:1033 ../../WINGs/wcolorpanel.c:1081
#: ../../WINGs/wcolorpanel.c:1098
msgid "Rename..."
msgstr "Reanomenar..."
#: ../../WINGs/wcolorpanel.c:1034 ../../WINGs/wcolorpanel.c:1082
#: ../../WINGs/wcolorpanel.c:1099 ../../WINGs/wcolorpanel.c:3326
msgid "Remove"
msgstr "Eliminar"
#: ../../WINGs/wcolorpanel.c:1035
msgid "Copy"
msgstr "Copiar"
#: ../../WINGs/wcolorpanel.c:1036
msgid "New from Clipboard"
msgstr "Obtenir del porta-retalls..."
#: ../../WINGs/wcolorpanel.c:1057
msgid "X11-Colors"
msgstr "Colors-X11"
#: ../../WINGs/wcolorpanel.c:1074
msgid "Color"
msgstr "Color"
#: ../../WINGs/wcolorpanel.c:1080
msgid "Add..."
msgstr "Afegeix..."
#: ../../WINGs/wcolorpanel.c:1090
msgid "List"
msgstr "Llista"
#: ../../WINGs/wcolorpanel.c:1097
msgid "New..."
msgstr "Nou..."
#: ../../WINGs/wcolorpanel.c:1236
#, c-format
msgid ""
"Color Panel: Could not create directory %s needed to store configurations"
msgstr ""
"Panell de color: No s'ha pogut crear el directori \"%s\" necessari per desar "
"la configuració"
#. Delete the file, it doesn't belong here
#: ../../WINGs/wcolorpanel.c:1242 ../../WINGs/wcolorpanel.c:3212
#: ../../WINGs/wcolorpanel.c:3216
msgid "File Error"
msgstr "Error de fitxer"
#: ../../WINGs/wcolorpanel.c:1243
msgid "Could not create ColorPanel configuration directory"
msgstr "No s'ha pogut crear el directori de configuració del Panell de color"
#: ../../WINGs/wcolorpanel.c:1244 ../../WINGs/wcolorpanel.c:3213
#: ../../WINGs/wcolorpanel.c:3218 ../../WINGs/wcolorpanel.c:3245
#: ../../WINGs/wfilepanel.c:250 ../../WINGs/wfilepanel.c:650
#: ../../WINGs/wfilepanel.c:662 ../../WINGs/wfilepanel.c:763
#: ../../WINGs/wfilepanel.c:974 ../../WINGs/wfontpanel.c:751
msgid "OK"
msgstr "D'acord"
#: ../../WINGs/wcolorpanel.c:1250 ../../WINGs/wcolorpanel.c:1286
#: ../../WINGs/wcolorpanel.c:1304
msgid "Color Panel: Could not find file"
msgstr "Panell de color: No s'ha trobat el fitxer"
#: ../../WINGs/wcolorpanel.c:1491 ../../WINGs/wcolorpanel.c:1556
#: ../../WINGs/wcolorpanel.c:1620
msgid "Color Panel: X failed request"
msgstr "Panell de color: petició X fallida"
#: ../../WINGs/wcolorpanel.c:2865
msgid "Saturation"
msgstr "Saturació"
#: ../../WINGs/wcolorpanel.c:2901
msgid "Hue"
msgstr "Matís"
# és el títol d'un quadre de diàleg. eac
#: ../../WINGs/wcolorpanel.c:3151
msgid "Open Palette"
msgstr "Obrir paleta"
#: ../../WINGs/wcolorpanel.c:3213
msgid "Invalid file format !"
msgstr "El format del fitxer no és vàlid !"
#: ../../WINGs/wcolorpanel.c:3215
#, c-format
msgid "can't remove file %s"
msgstr "no s'ha pogut eliminar el fitxer \"%s\""
#: ../../WINGs/wcolorpanel.c:3217
msgid "Couldn't remove file from Configuration Directory !"
msgstr "No s'ha pogut eliminar el fitxer del directori de configuració !"
#: ../../WINGs/wcolorpanel.c:3244
msgid "Rename"
msgstr "Reanomena"
#: ../../WINGs/wcolorpanel.c:3244
msgid "Rename palette to:"
msgstr "Reanomena la paleta com a:"
#: ../../WINGs/wcolorpanel.c:3245 ../../WINGs/wfilepanel.c:259
#: ../../WINGs/wfilepanel.c:662 ../../WINGs/wfilepanel.c:763
msgid "Cancel"
msgstr "Cancel·la"
#. Careful, this palette exists already
#: ../../WINGs/wcolorpanel.c:3261 ../../WINGs/wfilepanel.c:763
msgid "Warning"
msgstr "Atenció"
#: ../../WINGs/wcolorpanel.c:3262
msgid ""
"Palette already exists !\n"
"\n"
"Overwrite ?"
msgstr ""
"Ja existia una paleta amb aquest nom!\n"
"\n"
"La voleu sobreescriure?"
#: ../../WINGs/wcolorpanel.c:3262 ../../WINGs/wcolorpanel.c:3326
msgid "No"
msgstr "No"
#: ../../WINGs/wcolorpanel.c:3262 ../../WINGs/wcolorpanel.c:3326
msgid "Yes"
msgstr "Sí"
#: ../../WINGs/wcolorpanel.c:3294
#, c-format
msgid "Couldn't rename palette %s to %s\n"
msgstr "No s'ha pogut reanomenar la paleta %s com a %s\n"
#: ../../WINGs/wcolorpanel.c:3320
msgid "This will permanently remove the palette "
msgstr "Això eliminarà la paleta per sempre "
#: ../../WINGs/wcolorpanel.c:3323
msgid ""
".\n"
"\n"
"Are you sure you want to remove this palette ?"
msgstr ""
".\n"
"\n"
"Esteu segurs que voleu eliminar aquesta paleta?"
#: ../../WINGs/wcolorpanel.c:3348
#, c-format
msgid "Couldn't remove palette %s\n"
msgstr "No s'ha pogut eliminar la paleta %s\n"
#: ../../WINGs/wcolorpanel.c:3647
#, c-format
msgid "Could not open %s"
msgstr "No s'ha pogut obrir %s"
#: ../../WINGs/wcolorpanel.c:3654
#, c-format
msgid "Could not create %s"
msgstr "No s'ha pogut crear %s"
#: ../../WINGs/wcolorpanel.c:3665
#, c-format
msgid "Write error on file %s"
msgstr "Error d'escriptura en el fitxer %s"
#: ../../WINGs/wcolorpanel.c:3710
msgid "Color Panel: Color unspecified"
msgstr "Panell de color: Color no especificat"
#: ../../WINGs/wfilepanel.c:235
msgid "Name:"
msgstr "Nom:"
#: ../../WINGs/wfilepanel.c:332 ../../WINGs/wfilepanel.c:396
msgid "Open"
msgstr "Obre"
#: ../../WINGs/wfilepanel.c:350 ../../WINGs/wfilepanel.c:402
msgid "Save"
msgstr "Desa"
#: ../../WINGs/wfilepanel.c:565
#, c-format
msgid "WINGs: could not open directory %s\n"
msgstr "WINGs: no s'ha pogut obrir el directori %s\n"
#: ../../WINGs/wfilepanel.c:583
#, c-format
msgid "WINGs: could not stat %s\n"
msgstr "WINGs: no s'ha pogut determinar l'estat de %s\n"
#: ../../WINGs/wfilepanel.c:650 ../../WINGs/wfilepanel.c:973
#: ../../WINGs/wfontpanel.c:750
msgid "Error"
msgstr "Error"
# és el nom d'un quadre de diàleg. eac
#: ../../WINGs/wfilepanel.c:661
msgid "Create Directory"
msgstr "Crear directori"
#: ../../WINGs/wfilepanel.c:662
msgid "Enter directory name"
msgstr "Entreu el nom del directori"
#: ../../WINGs/wfilepanel.c:698 ../../WINGs/wfilepanel.c:737
#: ../../WINGs/wfilepanel.c:768 ../../WINGs/wfilepanel.c:796
msgid "Permission denied."
msgstr "Permís denegat."
#: ../../WINGs/wfilepanel.c:701
#, c-format
msgid "'%s' already exists."
msgstr "\"%s\" existia prèviament."
#: ../../WINGs/wfilepanel.c:704
msgid "Path does not exist."
msgstr "L'ubicació no existeix."
#: ../../WINGs/wfilepanel.c:734 ../../WINGs/wfilepanel.c:793
#, c-format
msgid "'%s' does not exist."
msgstr "\"%s\" no existeix."
#: ../../WINGs/wfilepanel.c:741 ../../WINGs/wfilepanel.c:800
msgid "Insufficient memory available."
msgstr "No hi ha prou memòria disponible."
#: ../../WINGs/wfilepanel.c:745 ../../WINGs/wfilepanel.c:804
#, c-format
msgid "'%s' is on a read-only filesystem."
msgstr "\"%s\" es troba en un sistema de fitxers de només lectura."
#: ../../WINGs/wfilepanel.c:748 ../../WINGs/wfilepanel.c:780
#: ../../WINGs/wfilepanel.c:807
#, c-format
msgid "Can not delete '%s'."
msgstr "No s'ha pogut eliminar \"%s\"."
#: ../../WINGs/wfilepanel.c:755
#, c-format
msgid "Delete directory %s ?"
msgstr "Voleu eliminar el directori %s ?"
#: ../../WINGs/wfilepanel.c:759
#, c-format
msgid "Delete file %s ?"
msgstr "Voleu eliminar el fitxer %s ?"
#: ../../WINGs/wfilepanel.c:771
#, c-format
msgid "Directory '%s' does not exist."
msgstr "El directori \"%s\" no existeix."
#: ../../WINGs/wfilepanel.c:774
#, c-format
msgid "Directory '%s' is not empty."
msgstr "El directori \"%s\" no està buit."
#: ../../WINGs/wfilepanel.c:777
#, c-format
msgid "Directory '%s' is busy."
msgstr "El directori \"%s\" es troba ocupat."
#: ../../WINGs/wfilepanel.c:790
#, c-format
msgid "'%s' is a directory."
msgstr "\"%s\" és un directori."
#: ../../WINGs/wfilepanel.c:832
#, c-format
msgid "An error occured browsing '%s'."
msgstr "S'ha produït un error mentre s'explorava \"%s\"."
#: ../../WINGs/wfilepanel.c:836
#, c-format
msgid "'%s' is not a directory."
msgstr "\"%s\" no és un directori."
#: ../../WINGs/wfilepanel.c:973
msgid "File does not exist."
msgstr "El fitxer no existeix."
#: ../../WINGs/wfont.c:324 ../../WINGs/wfont.c:344
#, c-format
msgid "could not load font %s."
msgstr "no s'ha pogut carregar el tipus de lletra %s."
#: ../../WINGs/wfont.c:375 ../../WINGs/wfont.c:420 ../../WINGs/wfont.c:475
#: ../../WINGs/wfont.c:1337 ../../WINGs/wfont.c:1398 ../../WINGs/wfont.c:1469
#, c-format
msgid ""
"Conversion to widechar failed (possible invalid multibyte sequence): '%s':"
"(pos %d)\n"
msgstr ""
"Ha fallat la conversió a caràcter estès (possible seqüència no vàlida): '%"
"s': (pos %d)\n"
#. // remove warning later. or maybe not
#: ../../WINGs/wfont.c:591 ../../WINGs/wfont.c:1568
#, c-format
msgid "Invalid font specification: '%s'\n"
msgstr "Especificació de font no vàlida: \"%s\"\n"
#: ../../WINGs/wfont.c:770 ../../WINGs/wfont.c:780
#, c-format
msgid "Invalid size specification '%s' in %s. Using default %d\n"
msgstr ""
"La mida \"%s\" especificada a %s no és vàlida. S'usa el valor per omissió %"
"d\n"
#: ../../WINGs/wfont.c:824
#, c-format
msgid "the following character sets are missing in %s:"
msgstr "els següents conjunts de caràcters falten a %s:"
#: ../../WINGs/wfont.c:830
#, c-format
msgid ""
"the string \"%s\" will be used in place of any characters from those sets."
msgstr ""
"la cadena \"%s\" s'usarà en lloc dels caràcters d'aquests conjunts de "
"caràcters."
#. is arial a good fallback for multibyte?
#: ../../WINGs/wfont.c:1232 ../../WINGs/wfont.c:1247
#, c-format
msgid "could not load font %s. Trying arial."
msgstr "no s'ha pogut carregar el tipus de lletra %s. Provant amb \"arial\"."
#: ../../WINGs/wfont.c:1239
msgid "could not load antialiased font set. Reverting to standard font sets."
msgstr ""
"no s'ha pogut carregar el conjunt de fonts amb allisat. S'usarà l'estàndard."
#: ../../WINGs/wfont.c:1242
#, c-format
msgid "could not load FontSet %s. Trying fixed."
msgstr "no s'ha pogut carregar el tipus de lletra %s. Provant amb \"fixed\"."
#: ../../WINGs/wfont.c:1254
msgid "could not load antialiased fonts. Reverting to normal fonts."
msgstr "no s'han pogut carregar fonts allisades. S'usaran fonts normals."
#: ../../WINGs/wfont.c:1257 ../../WINGs/wfont.c:1268
#, c-format
msgid "could not load font %s. Trying fixed."
msgstr "no s'ha pogut carregar la font %s. Provant amb \"fixed\"."
#: ../../WINGs/wfont.c:1262
#, c-format
msgid "could not load font set %s. Trying fixed."
msgstr "no s'ha pogut carregar el conjunt de fonts %s. Provant amb \"fixed\"."
#: ../../WINGs/wfont.c:1272
msgid "could not load fixed font!"
msgstr "no s'ha pogut carregar el tipus de lletra \"fixed\" !"
#: ../../WINGs/wfont.c:1520
#, c-format
msgid "font description %s is too large."
msgstr "la descripció de tipus de lletra %s és massa gran."
#: ../../WINGs/wfontpanel.c:235
msgid "Test!!!"
msgstr "Prova!!!"
#: ../../WINGs/wfontpanel.c:241
msgid "Family"
msgstr "Familia"
#: ../../WINGs/wfontpanel.c:252
msgid "Typeface"
msgstr "Fosa"
#: ../../WINGs/wfontpanel.c:263
msgid "Size"
msgstr "Mida"
#: ../../WINGs/wfontpanel.c:282
msgid "Set"
msgstr "Conjunt"
#: ../../WINGs/wfontpanel.c:288
msgid "Revert"
msgstr "Torna"
#: ../../WINGs/wfontpanel.c:751
msgid "Could not retrieve font list"
msgstr "No s'ha pogut obtenir la llista de tipus de lletra"
#: ../../WINGs/wfontpanel.c:765
#, c-format
msgid "font name %s is longer than 256, which is invalid."
msgstr ""
"el nom de tipus de lletra %s ocupa més de 256 caràcters, per tant no és "
"vàlid."
#: ../../WINGs/wfontpanel.c:913
msgid "Roman"
msgstr "Romana"
#: ../../WINGs/wfontpanel.c:916
msgid "Italic"
msgstr "Itàlica"
#: ../../WINGs/wfontpanel.c:918
msgid "Oblique"
msgstr "Obliqua"
#: ../../WINGs/wfontpanel.c:920
msgid "Rev Italic"
msgstr "Itàlica inv"
#: ../../WINGs/wfontpanel.c:922
msgid "Rev Oblique"
msgstr "Obliqua inv"
#: ../../WINGs/wfontpanel.c:928
msgid "Normal"
msgstr "Normal"
#: ../../WINGs/widgets.c:419
#, c-format
msgid "WINGs: could not load widget images file: %s"
msgstr "WINGs: no s'ha pogut carregar el fitxer d'imatges: %s"
#: ../../WINGs/widgets.c:772
msgid ""
"could not load any fonts. Make sure your font installation and locale "
"settings are correct."
msgstr ""
"no s'ha pogut carregar cap font. Assegureu-vos que heu instal·lat i "
"configurat correctament les fonts i el local."
#: ../../WINGs/wruler.c:192
msgid "0 inches"
msgstr "0 polzades"
#~ msgid ""
#~ "Text antialiasing is enabled in the configuration but the X server "
#~ "doesn't have the required capabilities (missing RENDER extension). "
#~ "Disabling text antialiasing."
#~ msgstr ""
#~ "L'allisat de text està habilitat a la configuració però el servidor X no\n"
#~ "té la capacitat necessària (falta l'extensió RENDER) de manera que "
#~ "l'allisat\n"
#~ "de text es deshabilitarà."

663
WINGs/po/cs.po Normal file
View File

@@ -0,0 +1,663 @@
# Czech messages for WINGs
# (C) 2001 Jiří Hnídek
# Special thanks to Jan "judas" Tomka
#
# Original translation by Jiří Hnídek on Oct 11 2001
# Currently maintained by Jiří Hnídek <jiri.hnidek@vslib.cz>
#
msgid ""
msgstr ""
"Project-Id-Version: WINGs 0.70.0\n"
"POT-Creation-Date: 2001-10-11 19:10+0100\n"
"PO-Revision-Date: 2001-10-11 22:00+0100\n"
"Last-Translator: Jiří Hnídek <jiri.hnidek@vslib.cz>\n"
"Language-Team: Czech <cz@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: unknown\n"
#: ../../WINGs/connection.c:451 ../../WINGs/connection.c:516
#: ../../WINGs/connection.c:559
msgid "Bad address-service-protocol combination"
msgstr "Nesprávná kombinace adresa-služba-protokol"
#: ../../WINGs/dragsource.c:541
msgid "DND selection lost during drag operation..."
msgstr "DND výběr se ztratil během opere táhnutí..."
#: ../../WINGs/dragsource.c:610
#, c-format
msgid "drag & drop timed out while waiting for response from 0x%x\n"
msgstr "čas pro drag & drop vypršel během čekání na odpoveď z 0x%x\n"
#: ../../WINGs/dragsource.c:728
msgid "could not get ownership or DND selection"
msgstr "nemožné získat vlastnictví nebo DND výběr"
#: ../../WINGs/dragsource.c:898
#, c-format
msgid "drag source received unexpected XdndFinished message from %x"
msgstr "zdroj tahání přijal neočekávanou zprávu XdndFinished z %x"
#: ../../WINGs/dragsource.c:1040
#, c-format
msgid "unknown XDND action %s from 0x%x"
msgstr "neznámá XDND akce %s z 0x%x"
#: ../../WINGs/dragsource.c:1073
msgid "received invalid drag & drop type list"
msgstr "přijatý nesprávný seznam typů drag & drop"
#: ../../WINGs/dragsource.c:1161
msgid "received Enter event in bad order"
msgstr "přijatá událost Enter v nesprávném pořadí"
#: ../../WINGs/dragsource.c:1168
#, c-format
msgid "received drag & drop request with unsupported version %i"
msgstr "přijatý požadavek drag & drop s nepodporovanou verzí %i"
#: ../../WINGs/error.c:56
#, c-format
msgid "Unknown error %d"
msgstr "Neznámá chyba %d"
#: ../../WINGs/error.c:61
#, c-format
msgid "Error %d"
msgstr "Chyba %d"
#: ../../WINGs/error.c:112
msgid " warning: "
msgstr " varovíní: "
#: ../../WINGs/error.c:139
msgid " fatal error: "
msgstr " fatální chyba: "
#: ../../WINGs/error.c:165 ../../WINGs/error.c:194
msgid " error: "
msgstr " chyba: "
#: ../../WINGs/findfile.c:50
#, c-format
msgid "could not get password entry for UID %i"
msgstr "nemožné zjistit informaci o UID %i"
#: ../../WINGs/findfile.c:68
#, c-format
msgid "could not get password entry for user %s"
msgstr "nemožné zjistit informaci o uživatelovi %s"
#: ../../WINGs/hashtable.c:275
msgid "rebuilding hash table...\n"
msgstr "přepis tabulky hashovských funkcí...\n"
#: ../../WINGs/hashtable.c:279
msgid "finished rebuild.\n"
msgstr "konec přepisu.\n"
#: ../../WINGs/host.c:116
msgid "Cannot get current host name"
msgstr "Nemožné zjistit aktuální jméno počítače"
#: ../../WINGs/memory.c:94
msgid "malloc() failed. Retrying after 2s."
msgstr "chyba malloc(). Nový pokus o 2s."
#: ../../WINGs/memory.c:103
msgid "Really Bad Error: recursive malloc() failure."
msgstr "Skutečně ošklivá chyba: rekurzivní chyba malloc()."
#: ../../WINGs/memory.c:106 ../../WINGs/memory.c:146
msgid "virtual memory exhausted"
msgstr "virtuální paměť vyčerpaná"
#: ../../WINGs/memory.c:133
msgid "realloc() failed. Retrying after 2s."
msgstr "chyba realloc(). Nový pokus o 2s."
#: ../../WINGs/memory.c:142
msgid "Really Bad Error: recursive realloc() failure."
msgstr "Skutečně ošklivá chyba: rekurzivní chyba realloc()."
#: ../../WINGs/memory.c:205
#, c-format
msgid "trying to release unexisting data %p"
msgstr "pokus uvolnit neexistujícá data %p"
#: ../../WINGs/memory.c:210
#, c-format
msgid "RELEASING %p\n"
msgstr "UVOLNĚNÍ %p\n"
#: ../../WINGs/wcolor.c:198 ../../WINGs/wcolor.c:211 ../../WINGs/wcolor.c:250
#: ../../WINGs/wcolor.c:291
#, c-format
msgid "could not allocate %s color"
msgstr "nemožné alokovat %s barvu"
#: ../../WINGs/wcolor.c:198
msgid "white"
msgstr "bílou"
#: ../../WINGs/wcolor.c:211
msgid "black"
msgstr "černou"
#: ../../WINGs/wcolor.c:250
msgid "gray"
msgstr "šedou"
#: ../../WINGs/wcolor.c:291
msgid "dark gray"
msgstr "tmavě šedou"
#: ../../WINGs/wcolorpanel.c:410
msgid "Colors"
msgstr "Barvy"
#: ../../WINGs/wcolorpanel.c:600 ../../WINGs/wcolorpanel.c:2819
msgid "Brightness"
msgstr "Světlost"
#: ../../WINGs/wcolorpanel.c:602 ../../WINGs/wcolorpanel.c:678
#: ../../WINGs/wcolorpanel.c:711 ../../WINGs/wcolorpanel.c:745
#: ../../WINGs/wcolorpanel.c:805 ../../WINGs/wcolorpanel.c:839
#: ../../WINGs/wcolorpanel.c:873 ../../WINGs/wcolorpanel.c:908
#: ../../WINGs/wcolorpanel.c:2159 ../../WINGs/wcolorpanel.c:2821
#: ../../WINGs/wcolorpanel.c:2857 ../../WINGs/wcolorpanel.c:2893
#: ../../WINGs/wcolorpanel.c:3741
msgid "Color Panel: Could not allocate memory"
msgstr "Panel barev: Nemožné alokovat paměť"
#: ../../WINGs/wcolorpanel.c:675 ../../WINGs/wcolorpanel.c:676
msgid "Red"
msgstr "Červená"
#: ../../WINGs/wcolorpanel.c:708 ../../WINGs/wcolorpanel.c:709
msgid "Green"
msgstr "Zelená"
#: ../../WINGs/wcolorpanel.c:742 ../../WINGs/wcolorpanel.c:743
msgid "Blue"
msgstr "Modrá"
#: ../../WINGs/wcolorpanel.c:802 ../../WINGs/wcolorpanel.c:803
msgid "Cyan"
msgstr ""
#: ../../WINGs/wcolorpanel.c:836 ../../WINGs/wcolorpanel.c:837
msgid "Magenta"
msgstr ""
#: ../../WINGs/wcolorpanel.c:870 ../../WINGs/wcolorpanel.c:871
msgid "Yellow"
msgstr "Žlutá"
#: ../../WINGs/wcolorpanel.c:905 ../../WINGs/wcolorpanel.c:906
msgid "Black"
msgstr "Černá"
#: ../../WINGs/wcolorpanel.c:986
msgid "Spectrum"
msgstr "Spektrum"
#: ../../WINGs/wcolorpanel.c:1016
msgid "Palette"
msgstr "Paleta"
#: ../../WINGs/wcolorpanel.c:1022
msgid "New from File..."
msgstr "Nová ze souboru..."
#: ../../WINGs/wcolorpanel.c:1023 ../../WINGs/wcolorpanel.c:1071
#: ../../WINGs/wcolorpanel.c:1088
msgid "Rename..."
msgstr "Přejmenovat..."
#: ../../WINGs/wcolorpanel.c:1024 ../../WINGs/wcolorpanel.c:1072
#: ../../WINGs/wcolorpanel.c:1089 ../../WINGs/wcolorpanel.c:3316
msgid "Remove"
msgstr "Odstranit"
#: ../../WINGs/wcolorpanel.c:1025
msgid "Copy"
msgstr "Kopírovat"
#: ../../WINGs/wcolorpanel.c:1026
msgid "New from Clipboard"
msgstr "Nová ze schránky"
#: ../../WINGs/wcolorpanel.c:1047
msgid "X11-Colors"
msgstr "Barvy X11"
#: ../../WINGs/wcolorpanel.c:1064
msgid "Color"
msgstr "Barva"
#: ../../WINGs/wcolorpanel.c:1070
msgid "Add..."
msgstr "Přidat..."
#: ../../WINGs/wcolorpanel.c:1080
msgid "List"
msgstr "Seznam"
#: ../../WINGs/wcolorpanel.c:1087
msgid "New..."
msgstr "Nový..."
#: ../../WINGs/wcolorpanel.c:1226
#, c-format
msgid ""
"Color Panel: Could not create directory %s needed to store configurations"
msgstr ""
"Panel barev: Nemožné vytvořit adresář %s potřebný k uložení nastavení"
#. Delete the file, it doesn't belong here
#: ../../WINGs/wcolorpanel.c:1232 ../../WINGs/wcolorpanel.c:3202
#: ../../WINGs/wcolorpanel.c:3206
msgid "File Error"
msgstr "Chyba souboru"
#: ../../WINGs/wcolorpanel.c:1233
msgid "Could not create ColorPanel configuration directory"
msgstr "Nemožné vytvořit konfigurační adresář panelu barev"
#: ../../WINGs/wcolorpanel.c:1234 ../../WINGs/wcolorpanel.c:3203
#: ../../WINGs/wcolorpanel.c:3208 ../../WINGs/wcolorpanel.c:3235
#: ../../WINGs/wfilepanel.c:243 ../../WINGs/wfilepanel.c:641
#: ../../WINGs/wfilepanel.c:653 ../../WINGs/wfilepanel.c:752
#: ../../WINGs/wfilepanel.c:963 ../../WINGs/wfontpanel.c:717
msgid "OK"
msgstr "OK"
#: ../../WINGs/wcolorpanel.c:1240 ../../WINGs/wcolorpanel.c:1276
#: ../../WINGs/wcolorpanel.c:1294
msgid "Color Panel: Could not find file"
msgstr "Panel barev: Nemožné nalézt soubor"
#: ../../WINGs/wcolorpanel.c:1481 ../../WINGs/wcolorpanel.c:1546
#: ../../WINGs/wcolorpanel.c:1610
msgid "Color Panel: X failed request"
msgstr "Panel barev: chyba požadavku X"
#: ../../WINGs/wcolorpanel.c:2855
msgid "Saturation"
msgstr "Saturace"
#: ../../WINGs/wcolorpanel.c:2891
msgid "Hue"
msgstr "Odteď"
#: ../../WINGs/wcolorpanel.c:3141
msgid "Open Palette"
msgstr "Otevřít paletu"
#: ../../WINGs/wcolorpanel.c:3203
msgid "Invalid file format !"
msgstr "Nesprávný souborový formát!"
#: ../../WINGs/wcolorpanel.c:3205
#, c-format
msgid "can't remove file %s"
msgstr "nemožné odstranit soubor %s"
#: ../../WINGs/wcolorpanel.c:3207
msgid "Couldn't remove file from Configuration Directory !"
msgstr "Nemožné odstranit soubor z konfiguračního adresáře!"
#: ../../WINGs/wcolorpanel.c:3234
msgid "Rename"
msgstr "Přejmenovat"
#: ../../WINGs/wcolorpanel.c:3234
msgid "Rename palette to:"
msgstr "Přejmenovat paletu:"
#: ../../WINGs/wcolorpanel.c:3235 ../../WINGs/wfilepanel.c:252
#: ../../WINGs/wfilepanel.c:653 ../../WINGs/wfilepanel.c:752
msgid "Cancel"
msgstr "Zrušit"
#. Careful, this palette exists already
#: ../../WINGs/wcolorpanel.c:3251 ../../WINGs/wfilepanel.c:752
msgid "Warning"
msgstr "Varování"
#: ../../WINGs/wcolorpanel.c:3252
msgid ""
"Palette already exists !\n"
"\n"
"Overwrite ?"
msgstr ""
"Paleta už existuje!\n"
"\n"
"Přepsat?"
#: ../../WINGs/wcolorpanel.c:3252 ../../WINGs/wcolorpanel.c:3316
msgid "No"
msgstr "Ne"
#: ../../WINGs/wcolorpanel.c:3252 ../../WINGs/wcolorpanel.c:3316
msgid "Yes"
msgstr "Ano"
#: ../../WINGs/wcolorpanel.c:3284
#, c-format
msgid "Couldn't rename palette %s to %s\n"
msgstr "Nemožné přejmenovat paletu %s na %s\n"
#: ../../WINGs/wcolorpanel.c:3310
msgid "This will permanently remove the palette "
msgstr "Paleta bude natrvalo smazaná"
#: ../../WINGs/wcolorpanel.c:3313
msgid ""
".\n"
"\n"
"Are you sure you want to remove this palette ?"
msgstr ""
".\n"
"\n"
"Jste si jisti, že chcete odstranit tuto paletu?"
#: ../../WINGs/wcolorpanel.c:3338
#, c-format
msgid "Couldn't remove palette %s\n"
msgstr "Nemožné odstranit paletu %s\n"
#: ../../WINGs/wcolorpanel.c:3643
#, c-format
msgid "Could not open %s"
msgstr "Nemožné otevřít %s"
#: ../../WINGs/wcolorpanel.c:3650
#, c-format
msgid "Could not create %s"
msgstr "Nemožné vytvořit %s"
#: ../../WINGs/wcolorpanel.c:3661
#, c-format
msgid "Write error on file %s"
msgstr "Chyba při zápisu do souboru %s"
#: ../../WINGs/wcolorpanel.c:3706
msgid "Color Panel: Color unspecified"
msgstr "Panel barev: Nespecifikovaná barva"
#: ../../WINGs/wfilepanel.c:228
msgid "Name:"
msgstr "Jméno:"
#: ../../WINGs/wfilepanel.c:325 ../../WINGs/wfilepanel.c:390
msgid "Open"
msgstr "Otevřít"
#: ../../WINGs/wfilepanel.c:343 ../../WINGs/wfilepanel.c:396
msgid "Save"
msgstr "Uložit"
#: ../../WINGs/wfilepanel.c:556
#, c-format
msgid "WINGs: could not open directory %s\n"
msgstr "WINGs: nemožné otevřít adresář %s\n"
#: ../../WINGs/wfilepanel.c:574
#, c-format
msgid "WINGs: could not stat %s\n"
msgstr "WINGs: nemožné zjistit informace o %s\n"
#: ../../WINGs/wfilepanel.c:641 ../../WINGs/wfilepanel.c:962
#: ../../WINGs/wfontpanel.c:716
msgid "Error"
msgstr "Chyba"
#: ../../WINGs/wfilepanel.c:652
msgid "Create Directory"
msgstr "Vytvořit adresář"
#: ../../WINGs/wfilepanel.c:653
msgid "Enter directory name"
msgstr "Jméno adresáře"
#: ../../WINGs/wfilepanel.c:689 ../../WINGs/wfilepanel.c:728
#: ../../WINGs/wfilepanel.c:757 ../../WINGs/wfilepanel.c:785
msgid "Permission denied."
msgstr "Přístup odmítnut."
#: ../../WINGs/wfilepanel.c:692
#, c-format
msgid "'%s' already exists."
msgstr "'%s' už existuje"
#: ../../WINGs/wfilepanel.c:695
msgid "Path does not exist."
msgstr "Cesta neexistuje."
#: ../../WINGs/wfilepanel.c:725 ../../WINGs/wfilepanel.c:782
#, c-format
msgid "'%s' does not exist."
msgstr "'%s' neexistuje."
#: ../../WINGs/wfilepanel.c:732 ../../WINGs/wfilepanel.c:789
msgid "Insufficient memory available."
msgstr "Nedostatek paměti."
#: ../../WINGs/wfilepanel.c:736 ../../WINGs/wfilepanel.c:793
#, c-format
msgid "'%s' is on a read-only filesystem."
msgstr "'%s' je na souborovém systému jen pro čtení."
#: ../../WINGs/wfilepanel.c:739 ../../WINGs/wfilepanel.c:769
#: ../../WINGs/wfilepanel.c:796
#, c-format
msgid "Can not delete '%s'."
msgstr "Nemožné odstranit '%s'."
#: ../../WINGs/wfilepanel.c:745
#, c-format
msgid "Delete directory %s ?"
msgstr "Odstranit adresář %s?"
#: ../../WINGs/wfilepanel.c:748
#, c-format
msgid "Delete file %s ?"
msgstr "Odstranit soubor %s?"
#: ../../WINGs/wfilepanel.c:760
#, c-format
msgid "Directory '%s' does not exist."
msgstr "Adresář '%s' neexistuje."
#: ../../WINGs/wfilepanel.c:763
#, c-format
msgid "Directory '%s' is not empty."
msgstr "Adresář '%s' není prázdný."
#: ../../WINGs/wfilepanel.c:766
#, c-format
msgid "Directory '%s' is busy."
msgstr "Adresář '%s' je používaný."
#: ../../WINGs/wfilepanel.c:779
#, c-format
msgid "'%s' is a directory."
msgstr "'%s' je adresář."
#: ../../WINGs/wfilepanel.c:821
#, c-format
msgid "An error occured browsing '%s'."
msgstr "Při prohlížení '%s' nastala chyba."
#: ../../WINGs/wfilepanel.c:825
#, c-format
msgid "'%s' is not a directory."
msgstr "'%s' není adresář."
#: ../../WINGs/wfilepanel.c:962
msgid "File does not exist."
msgstr "Soubor neexistuje."
#: ../../WINGs/wfont.c:129
#, c-format
msgid "the following character sets are missing in %s:"
msgstr "nasledující sady znaků chybí v %s:"
#: ../../WINGs/wfont.c:136
#, c-format
msgid ""
"the string \"%s\" will be used in place of any characters from those sets."
msgstr ""
"řetězec \"%s\" bude použitý namísto znaků z těchto sad."
#: ../../WINGs/wfont.c:282 ../../WINGs/wfont.c:318
#, c-format
msgid "could not load font set %s. Trying fixed."
msgstr "nemožné načíst font %s. Zkouší se načíst fixed."
#: ../../WINGs/wfont.c:288 ../../WINGs/wfont.c:324
#, c-format
msgid "could not load font %s. Trying fixed."
msgstr "nemožno načíst font %s. Zkoší se načíst fixed."
#: ../../WINGs/wfont.c:292 ../../WINGs/wfont.c:328
msgid "could not load fixed font!"
msgstr "nemožné načíst font fixed!"
#: ../../WINGs/wfont.c:423
#, c-format
msgid "font description %s is too large."
msgstr "popis fontu %s je příliš velký."
#: ../../WINGs/wfontpanel.c:205
msgid "Test!!!"
msgstr "Zkouška!!!"
#: ../../WINGs/wfontpanel.c:211
msgid "Family"
msgstr ""
#: ../../WINGs/wfontpanel.c:222
msgid "Typeface"
msgstr ""
#: ../../WINGs/wfontpanel.c:233
msgid "Size"
msgstr "Velikost"
#: ../../WINGs/wfontpanel.c:252
msgid "Set"
msgstr "Sada"
#: ../../WINGs/wfontpanel.c:257
msgid "Revert"
msgstr "Zpět"
#: ../../WINGs/wfontpanel.c:717
msgid "Could not retrieve font list"
msgstr "Nemožné obdržet seznam fontů"
#: ../../WINGs/wfontpanel.c:729
#, c-format
msgid "font name %s is longer than 256, which is invalid."
msgstr "jméno fontu %s je delší než 256, což je špatně."
#: ../../WINGs/wfontpanel.c:880
msgid "Roman"
msgstr ""
#: ../../WINGs/wfontpanel.c:883
msgid "Italic"
msgstr ""
#: ../../WINGs/wfontpanel.c:885
msgid "Oblique"
msgstr ""
#: ../../WINGs/wfontpanel.c:887
msgid "Rev Italic"
msgstr ""
#: ../../WINGs/wfontpanel.c:889
msgid "Rev Oblique"
msgstr ""
#: ../../WINGs/wfontpanel.c:895
msgid "Normal"
msgstr "Normílní"
#: ../../WINGs/widgets.c:414
#, c-format
msgid "WINGs: could not load widget images file: %s"
msgstr "WINGs: nemožné načíst soubor s obrázky pro widgety: %s"
#: ../../WINGs/widgets.c:525
#, c-format
msgid "WINGs: could not open display %s"
msgstr "WINGs: nemožné otevřít display %s"
#: ../../WINGs/widgets.c:717
msgid ""
"could not load any fonts. Make sure your font installationand locale "
"settings are correct."
msgstr ""
"nemožné načíst žádný font. Ubezpečte se, že instalace fontů a místního "
"nastavení jsou v pořádku."
#: ../../WINGs/wruler.c:189
msgid "0 inches"
msgstr "0 palců"
#: ../../WINGs/wtext.c:1212
msgid "...for this app will surely crash :-)\n"
msgstr "...pro tuto aplikaci to určitě spadne :-)\n"
#: ../../WINGs/wtext.c:2084
msgid "didn't get it\n"
msgstr "nedosaženo\n"
#: ../../WINGs/wtext.c:2726
#, c-format
msgid "type is [%s]\n"
msgstr "typ je [%s]\n"
#: ../../WINGs/wtext.c:2797
msgid "could not request data for dropped data"
msgstr "nemohou být vyžádána data pro položená data"
#: ../../WINGs/wtext.c:2995
msgid "could not create text's view\n"
msgstr "nemožné zobrazit text\n"
#: ../../WINGs/wview.c:219
msgid "trying to realize widget of unrealized parent"
msgstr "snaha vytvořit widget neexistujícího rodiče objektu"
#: ../../WINGs/wview.c:267
msgid "trying to reparent realized view to unrealized parent"
msgstr ""
#: ../../WINGs/wtextfield.c:490
msgid "only left alignment is supported in textfields"
msgstr "pro textové pole je povolené jen levé zarovnání"
#pozor, co je STRING?
#: ../../WINGs/wwindow.c:222
msgid "window title conversion error... using STRING encoding"
msgstr "chyba konverze titulku okna... použije se kódovaní STRING"
#: ../../WINGs/wwindow.c:313
msgid "could not allocate memory for window size hints"
msgstr "nemožné alokovat paměť pro pokyny velikosti okna"
#: ../../WINGs/wwindow.c:586
msgid "could not allocate memory for WM hints"
msgstr "nemožné alokovat paměť pro pokyny WM"
#: ../../WINGs/wwindow.c:627
msgid "icon title conversion error..using STRING encoding"
msgstr "chyba konverze titulku ikony... použije se kódovaní STRING"

627
WINGs/po/de.po Normal file
View File

@@ -0,0 +1,627 @@
#
# German Message Catalog for WINGs
#
# Initial translation
# Gudio Scholz <guido.scholz@bayernline.de>
#
# Adapted to versions 0.80 ff.
# Torsten Marek <shlomme@gmx.net>
#
msgid ""
msgstr ""
"Project-Id-Version: WINGs\n"
"POT-Creation-Date: 2004-11-01 16:24+0100\n"
"PO-Revision-Date: 2004-11-05 23:48+0100\n"
"Last-Translator: shlomme@gmx.net\n"
"Language-Team: German\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../../WINGs/connection.c:471 ../../WINGs/connection.c:536
#: ../../WINGs/connection.c:579
msgid "Bad address-service-protocol combination"
msgstr "Ungültige Kombination von Adresse und Dienstprotokoll"
#: ../../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 "Passworteintrag für UID %i konnte nicht ermittelt werden"
#: ../../WINGs/findfile.c:66
#, c-format
msgid "could not get password entry for user %s"
msgstr "Passworteintrag für Benutzer %s konnte nicht ermittelt werden"
#: ../../WINGs/host.c:114
msgid "Cannot get current host name"
msgstr "Aktueller Hostname kann nicht ermittelt werden"
#: ../../WINGs/proplist.c:91
#, c-format
msgid "syntax error in %s %s, line %i: %s"
msgstr "Syntaxfehler in %s %s, Zeile %i: %s"
#: ../../WINGs/proplist.c:150
msgid "Only string or data is supported for a proplist dictionary key"
msgstr ""
"Nur Zeichenketten oder Binärdaten werden als Schlüssel für ein PropList-Dictionary "
"unterstützt"
#: ../../WINGs/proplist.c:184 ../../WINGs/proplist.c:236
#: ../../WINGs/proplist.c:394 ../../WINGs/proplist.c:474
#: ../../WINGs/proplist.c: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-Funktionen werden auf nicht-WMPropList-Objekte angewendet"
#: ../../WINGs/proplist.c:630
msgid "unterminated PropList string"
msgstr "nicht terminierte PropList-Zeichenkette"
#: ../../WINGs/proplist.c:670
msgid "unterminated PropList data"
msgstr "nicht terminierte PropList-Binärdaten"
#: ../../WINGs/proplist.c:678
msgid "unterminated PropList data (missing hexdigit)"
msgstr "nicht terminierte PropList-Binärdaten (fehlendes Hex-Zeichen)"
#: ../../WINGs/proplist.c:690 ../../WINGs/proplist.c:695
msgid "non hexdigit character in PropList data"
msgstr "falsches Hex-Zeichen in PropList-Binärdaten"
#: ../../WINGs/proplist.c:729
msgid "unterminated PropList array"
msgstr "nicht terminiertes PropList-Array"
#: ../../WINGs/proplist.c:737
msgid "missing or unterminated PropList array"
msgstr "fehlendes oder nicht terminiertes PropList-Array"
#: ../../WINGs/proplist.c:747
msgid "could not get PropList array element"
msgstr "PropList-Array-Element konnte nicht gelesen werden"
#: ../../WINGs/proplist.c:776
msgid "unterminated PropList dictionary"
msgstr "nicht terminiertes PropList-Dictionary"
#: ../../WINGs/proplist.c:793
msgid "missing PropList dictionary key"
msgstr "fehlender Schlüssel in PropList-Dictionary"
#: ../../WINGs/proplist.c:795
msgid "missing PropList dictionary entry key or unterminated dictionary"
msgstr "fehlender Schlüssel in PropList-Dictionary oder fehlende Terminierung"
#: ../../WINGs/proplist.c:803
msgid "error parsing PropList dictionary key"
msgstr "Fehler beim Parsen eines PropList-Dictionary-Schlüssels"
#: ../../WINGs/proplist.c:811
msgid "missing = in PropList dictionary entry"
msgstr "fehlendes \"=\" in PropList-Dictionary-Schlüssel"
#: ../../WINGs/proplist.c:819
msgid "error parsing PropList dictionary entry value"
msgstr "Fehler beim Parsen eines PropList-Dictionary-Wertes"
#: ../../WINGs/proplist.c:827
msgid "missing ; in PropList dictionary entry"
msgstr "fehlendes \";\" in PropList-Dictionary-Eintrag"
#: ../../WINGs/proplist.c:888
msgid ""
"was expecting a string, data, array or dictionary. If it's a string, try "
"enclosing it with \"."
msgstr ""
"Zeichenkette, Binärdaten, Array oder Dictionary erwartet. Zeichenketten ggf. mit \" "
"einklammern."
#: ../../WINGs/proplist.c:892
msgid "Comments are not allowed inside WindowMaker owned domain files."
msgstr "Kommentare sind in Domänendaten von WindowMaker nicht erlaubt."
#: ../../WINGs/proplist.c:1563 ../../WINGs/proplist.c:1630
msgid "extra data after end of property list"
msgstr "zusätzliche Daten hinter dem Ende der Propertyliste"
#: ../../WINGs/proplist.c:1606
#, c-format
msgid "could not get size for file '%s'"
msgstr "Dateigröße von '%s' konnte nicht ermittelt werden"
#: ../../WINGs/proplist.c:1619
#, c-format
msgid "error reading from file '%s'"
msgstr "Fehler beim Lesen der Datei '%s'"
#: ../../WINGs/proplist.c:1671
#, c-format
msgid "mkstemp (%s) failed"
msgstr "mkstemp (%s) fehlgeschlagen"
#: ../../WINGs/proplist.c:1682
#, c-format
msgid "mktemp (%s) failed"
msgstr "mktemp (%s) fehlgeschlagen"
#: ../../WINGs/proplist.c:1693
#, c-format
msgid "open (%s) failed"
msgstr "open (%s) fehlgeschlagen"
#: ../../WINGs/proplist.c:1700
#, c-format
msgid "writing to file: %s failed"
msgstr "Schreiben in Datei: %s fehlgeschlagen"
#: ../../WINGs/proplist.c:1708
#, c-format
msgid "fclose (%s) failed"
msgstr "fclose (%s) fehlgeschlagen"
#: ../../WINGs/proplist.c:1717
#, c-format
msgid "rename ('%s' to '%s') failed"
msgstr "rename ('%s' nach '%s') fehlgeschlagen"
#. 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 "Bei der Synchronisation konnte nicht aus der Datei '%s' gelesen werden"
#: ../../WINGs/wcolor.c:237 ../../WINGs/wcolor.c:249 ../../WINGs/wcolor.c:288
#: ../../WINGs/wcolor.c:329
#, c-format
msgid "could not allocate %s color"
msgstr "Farbe %s konnte nicht erzeugt werden"
#: ../../WINGs/wcolor.c:237
msgid "white"
msgstr "Weiß"
#: ../../WINGs/wcolor.c:249
msgid "black"
msgstr "Schwarz"
#: ../../WINGs/wcolor.c:288
msgid "gray"
msgstr "Grau"
#: ../../WINGs/wcolor.c:329
msgid "dark gray"
msgstr "Dunkelgrau"
#: ../../WINGs/wcolorpanel.c:420
msgid "Colors"
msgstr "Farben"
#: ../../WINGs/wcolorpanel.c:610 ../../WINGs/wcolorpanel.c:2829
msgid "Brightness"
msgstr "Helligkeit"
#: ../../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 "Farb-Panel: Speicher konnte nicht reserviert werden"
#: ../../WINGs/wcolorpanel.c:685 ../../WINGs/wcolorpanel.c:686
msgid "Red"
msgstr "Rot"
#: ../../WINGs/wcolorpanel.c:718 ../../WINGs/wcolorpanel.c:719
msgid "Green"
msgstr "Grün"
#: ../../WINGs/wcolorpanel.c:752 ../../WINGs/wcolorpanel.c:753
msgid "Blue"
msgstr "Blau"
#: ../../WINGs/wcolorpanel.c:812 ../../WINGs/wcolorpanel.c:813
msgid "Cyan"
msgstr ""
#: ../../WINGs/wcolorpanel.c:846 ../../WINGs/wcolorpanel.c:847
msgid "Magenta"
msgstr ""
#: ../../WINGs/wcolorpanel.c:880 ../../WINGs/wcolorpanel.c:881
msgid "Yellow"
msgstr "Gelb"
#: ../../WINGs/wcolorpanel.c:915 ../../WINGs/wcolorpanel.c:916
msgid "Black"
msgstr "Schwarz"
#: ../../WINGs/wcolorpanel.c:996
msgid "Spectrum"
msgstr "Spektrum"
#: ../../WINGs/wcolorpanel.c:1026
msgid "Palette"
msgstr ""
#: ../../WINGs/wcolorpanel.c:1032
msgid "New from File..."
msgstr "Neu aus Datei..."
#: ../../WINGs/wcolorpanel.c:1033 ../../WINGs/wcolorpanel.c:1081
#: ../../WINGs/wcolorpanel.c:1098
msgid "Rename..."
msgstr "Umbenennen..."
#: ../../WINGs/wcolorpanel.c:1034 ../../WINGs/wcolorpanel.c:1082
#: ../../WINGs/wcolorpanel.c:1099 ../../WINGs/wcolorpanel.c:3326
msgid "Remove"
msgstr "Entfernen"
#: ../../WINGs/wcolorpanel.c:1035
msgid "Copy"
msgstr "Kopieren"
#: ../../WINGs/wcolorpanel.c:1036
msgid "New from Clipboard"
msgstr "Neu aus Zwischenablage"
#: ../../WINGs/wcolorpanel.c:1057
msgid "X11-Colors"
msgstr "X11-Farben"
#: ../../WINGs/wcolorpanel.c:1074
msgid "Color"
msgstr "Farbe"
#: ../../WINGs/wcolorpanel.c:1080
msgid "Add..."
msgstr "Hinzufügen..."
#: ../../WINGs/wcolorpanel.c:1090
msgid "List"
msgstr "Liste"
#: ../../WINGs/wcolorpanel.c:1097
msgid "New..."
msgstr "Neu..."
#: ../../WINGs/wcolorpanel.c:1236
#, c-format
msgid "Color Panel: Could not create directory %s needed to store configurations"
msgstr "Farb-Panel: Verzeichnis %s konnte zum Speichern der Konfiguration nicht erzeugt werden"
#. Delete the file, it doesn't belong here
#: ../../WINGs/wcolorpanel.c:1242 ../../WINGs/wcolorpanel.c:3212
#: ../../WINGs/wcolorpanel.c:3216
msgid "File Error"
msgstr "Dateifehler"
#: ../../WINGs/wcolorpanel.c:1243
msgid "Could not create ColorPanel configuration directory"
msgstr "Konfigurationsverzeichnis für Farb-Panel konnte nicht erzeugt werden"
#: ../../WINGs/wcolorpanel.c:1244 ../../WINGs/wcolorpanel.c:3213
#: ../../WINGs/wcolorpanel.c:3218 ../../WINGs/wcolorpanel.c:3245
#: ../../WINGs/wfilepanel.c:250 ../../WINGs/wfilepanel.c:650
#: ../../WINGs/wfilepanel.c:662 ../../WINGs/wfilepanel.c:763
#: ../../WINGs/wfilepanel.c:974 ../../WINGs/wfontpanel.c:591
msgid "OK"
msgstr ""
#: ../../WINGs/wcolorpanel.c:1250 ../../WINGs/wcolorpanel.c:1286
#: ../../WINGs/wcolorpanel.c:1304
msgid "Color Panel: Could not find file"
msgstr "Farb-Panel: Datei konnte nicht gefunden werden"
#: ../../WINGs/wcolorpanel.c:1491 ../../WINGs/wcolorpanel.c:1556
#: ../../WINGs/wcolorpanel.c:1620
msgid "Color Panel: X failed request"
msgstr "Farb-Panel: X-Anfrage fehlgeschlagen"
#: ../../WINGs/wcolorpanel.c:2865
msgid "Saturation"
msgstr "Sättigung"
#: ../../WINGs/wcolorpanel.c:2901
msgid "Hue"
msgstr "Farbton"
#: ../../WINGs/wcolorpanel.c:3151
msgid "Open Palette"
msgstr "Palette öffnen"
#: ../../WINGs/wcolorpanel.c:3213
msgid "Invalid file format !"
msgstr "Ungültiges Dateiformat!"
#: ../../WINGs/wcolorpanel.c:3215
#, c-format
msgid "can't remove file %s"
msgstr "Datei %s konnte nicht entfert werden"
#: ../../WINGs/wcolorpanel.c:3217
msgid "Couldn't remove file from Configuration Directory !"
msgstr "Datei konnte nicht aus Konfigurationsverzeichnis entfernt werden!"
#: ../../WINGs/wcolorpanel.c:3244
msgid "Rename"
msgstr "Umbenennen"
#: ../../WINGs/wcolorpanel.c:3244
msgid "Rename palette to:"
msgstr "Palette umbenennen in:"
#: ../../WINGs/wcolorpanel.c:3245 ../../WINGs/wfilepanel.c:259
#: ../../WINGs/wfilepanel.c:662 ../../WINGs/wfilepanel.c:763
msgid "Cancel"
msgstr "Abbrechen"
#. Careful, this palette exists already
#: ../../WINGs/wcolorpanel.c:3261 ../../WINGs/wfilepanel.c:763
msgid "Warning"
msgstr "Warnung"
#: ../../WINGs/wcolorpanel.c:3262
msgid ""
"Palette already exists !\n"
"\n"
"Overwrite ?"
msgstr ""
"Palette existiert bereits!\n"
"\n"
"Überschreiben?"
#: ../../WINGs/wcolorpanel.c:3262 ../../WINGs/wcolorpanel.c:3326
msgid "No"
msgstr "Nein"
#: ../../WINGs/wcolorpanel.c:3262 ../../WINGs/wcolorpanel.c:3326
msgid "Yes"
msgstr "Ja"
#: ../../WINGs/wcolorpanel.c:3294
#, c-format
msgid "Couldn't rename palette %s to %s\n"
msgstr "Palette %s konnte nicht nach %s umbenannt werden\n"
#: ../../WINGs/wcolorpanel.c:3320
msgid "This will permanently remove the palette "
msgstr "Hiermit wird die Palette unwiderruflich gelöscht "
#: ../../WINGs/wcolorpanel.c:3323
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:3348
#, c-format
msgid "Couldn't remove palette %s\n"
msgstr "Palette %s konnte nicht gelöscht werden\n"
#: ../../WINGs/wcolorpanel.c:3647
#, c-format
msgid "Could not open %s"
msgstr "%s konnte nicht geöffnet werden"
#: ../../WINGs/wcolorpanel.c:3654
#, c-format
msgid "Could not create %s"
msgstr "%s konnte nicht erzeugt werden"
#: ../../WINGs/wcolorpanel.c:3665
#, c-format
msgid "Write error on file %s"
msgstr "Schreibfehler bei Datei %s"
#: ../../WINGs/wcolorpanel.c:3710
msgid "Color Panel: Color unspecified"
msgstr "Farb-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:565
#, c-format
msgid "WINGs: could not open directory %s\n"
msgstr "WINGs: Verzeichnis %s konnte nicht geöffnet werden\n"
#: ../../WINGs/wfilepanel.c:583
#, c-format
msgid "WINGs: could not stat %s\n"
msgstr "WINGs: Dateistatus von %s unbestimmbar\n"
#: ../../WINGs/wfilepanel.c:650 ../../WINGs/wfilepanel.c:973
#: ../../WINGs/wfontpanel.c:590
msgid "Error"
msgstr "Fehler"
#: ../../WINGs/wfilepanel.c:661
msgid "Create Directory"
msgstr "Verzeichnis anlegen"
#: ../../WINGs/wfilepanel.c:662
msgid "Enter directory name"
msgstr "Verzeichnisname eingeben"
#: ../../WINGs/wfilepanel.c:698 ../../WINGs/wfilepanel.c:737
#: ../../WINGs/wfilepanel.c:768 ../../WINGs/wfilepanel.c:796
msgid "Permission denied."
msgstr "Zugriff verweigert."
#: ../../WINGs/wfilepanel.c:701
#, c-format
msgid "'%s' already exists."
msgstr "'%s' existiert bereits."
#: ../../WINGs/wfilepanel.c:704
msgid "Path does not exist."
msgstr "Pfad existiert nicht."
#: ../../WINGs/wfilepanel.c:734 ../../WINGs/wfilepanel.c:793
#, c-format
msgid "'%s' does not exist."
msgstr "'%s' existiert nicht."
#: ../../WINGs/wfilepanel.c:741 ../../WINGs/wfilepanel.c:800
msgid "Insufficient memory available."
msgstr "Nicht genügend Speicher verfügbar."
#: ../../WINGs/wfilepanel.c:745 ../../WINGs/wfilepanel.c:804
#, c-format
msgid "'%s' is on a read-only filesystem."
msgstr "'%s' liegt auf einem nur lesbaren Dateisystem."
#: ../../WINGs/wfilepanel.c:748 ../../WINGs/wfilepanel.c:780
#: ../../WINGs/wfilepanel.c:807
#, c-format
msgid "Can not delete '%s'."
msgstr "Kann %s nicht löschen."
#: ../../WINGs/wfilepanel.c:755
#, c-format
msgid "Delete directory %s ?"
msgstr "Verzeichnis %s löschen?"
#: ../../WINGs/wfilepanel.c:759
#, c-format
msgid "Delete file %s ?"
msgstr "Datei %s löschen?"
#: ../../WINGs/wfilepanel.c:771
#, c-format
msgid "Directory '%s' does not exist."
msgstr "Verzeichnis '%s' existiert nicht."
#: ../../WINGs/wfilepanel.c:774
#, c-format
msgid "Directory '%s' is not empty."
msgstr "Verzeichnis '%s' ist nicht leer."
#: ../../WINGs/wfilepanel.c:777
#, c-format
msgid "Directory '%s' is busy."
msgstr "Verzeichnis '%s' wird benutz."
#: ../../WINGs/wfilepanel.c:790
#, c-format
msgid "'%s' is a directory."
msgstr "'%s' ist ein Verzeichnis."
#: ../../WINGs/wfilepanel.c:832
#, c-format
msgid "An error occured browsing '%s'."
msgstr "Fehler beim Lesen von '%s'."
#: ../../WINGs/wfilepanel.c:836
#, c-format
msgid "'%s' is not a directory."
msgstr "'%s' ist kein Verzeichnis."
#: ../../WINGs/wfilepanel.c:973
msgid "File does not exist."
msgstr "Datei existiert nicht."
#: ../../WINGs/wfont.c:40
#, c-format
msgid "invalid font: %s. Trying '%s'"
msgstr "Ungültige Schriftart: %s. Wird ersetzt durch %s."
#: ../../WINGs/wfont.c:257 ../../WINGs/wfont.c:277
#, c-format
msgid "could not load font: %s."
msgstr "Schriftart konnte nicht geladen werden: %s"
#. WMSetWidgetBackgroundColor(panel->win, WMWhiteColor(scr));
#: ../../WINGs/wfontpanel.c:203
msgid "Font Panel"
msgstr "Schrift-Panel"
#: ../../WINGs/wfontpanel.c:239
msgid "The quick brown fox jumps over the lazy dog"
msgstr ""
#: ../../WINGs/wfontpanel.c:245
msgid "Family"
msgstr "Familie"
#: ../../WINGs/wfontpanel.c:256
msgid "Typeface"
msgstr "Schriftart"
#: ../../WINGs/wfontpanel.c:267
msgid "Size"
msgstr "Größe"
#: ../../WINGs/wfontpanel.c:286
msgid "Set"
msgstr "Setzen"
#: ../../WINGs/wfontpanel.c:292
msgid "Revert"
msgstr "Zurücksetzen"
#: ../../WINGs/wfontpanel.c:591
msgid "Could not init font config library\n"
msgstr "\"font-config\"-Bibliothek konnte nicht initialisiert werden\n"
#: ../../WINGs/widgets.c:419
#, c-format
msgid "WINGs: could not load widget images file: %s"
msgstr "WINGs: Widget-Bilderdatei konnte nicht geladen werden: %s"
#: ../../WINGs/widgets.c:767
msgid ""
"could not load any fonts. Make sure your font installation and locale "
"settings are correct."
msgstr ""
"Keine Schrifen konnten geladen werden. Überprüfen Sie, ob Ihre Schrifteninstallation und -"
"Lokalisierungseinstellungen korrekt sind."
#: ../../WINGs/wruler.c:192
msgid "0 inches"
msgstr "0 Inch"

739
WINGs/po/fr.po Normal file
View File

@@ -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=UTF-8\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 %s"
#: ../../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"

719
WINGs/po/sk.po Normal file
View File

@@ -0,0 +1,719 @@
# Slovak messages for WINGs
# (C) 2001 Jan "judas" Tomka
#
# Original translation by Jan "judas" Tomka on Feb 25 2001
# Currently maintained by Jan "judas" Tomka <judas@linux.sk>
#
# Version history:
# WM-ver author email date
# 0.65.1 Jan "judas" Tomka <judas@linux.sk> Aug 08 2001
# 0.70.0 Jan "judas" Tomka <judas@linux.sk> Oct 15 2001
# 0.70.1 Jan "judas" Tomka <judas@linux.sk> Nov 02 2001
# 0.80.0 Jan "judas" Tomka <judas@linux.sk> Dec 20 2001
# 0.80.2 Jan "judas" Tomka <judas@linux.sk> Jan 31 2004
#
msgid ""
msgstr ""
"Project-Id-Version: WINGs 0.80.0\n"
"POT-Creation-Date: 2004-01-31 18:36+0100\n"
"PO-Revision-Date: 2001-12-20 04:00+0100\n"
"Last-Translator: Jan \"judas\" Tomka <judas@linux.sk>\n"
"Language-Team: Slovak <sk@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../../WINGs/connection.c:467 ../../WINGs/connection.c:532
#: ../../WINGs/connection.c:575
msgid "Bad address-service-protocol combination"
msgstr "Nesprávna kombinácia adresa-služba-protokol"
#: ../../WINGs/error.c:54
#, c-format
msgid "Unknown error %d"
msgstr "Nezmána chyba %d"
#: ../../WINGs/error.c:59
#, c-format
msgid "Error %d"
msgstr "Chyba %d"
#: ../../WINGs/error.c:110
msgid " warning: "
msgstr " varovanie: "
#: ../../WINGs/error.c:137
msgid " fatal error: "
msgstr " fatálna chyba: "
#: ../../WINGs/error.c:163 ../../WINGs/error.c:192
msgid " error: "
msgstr " chyba: "
#: ../../WINGs/findfile.c:48
#, c-format
msgid "could not get password entry for UID %i"
msgstr "nemožno zistiť informácie o UID %i"
#: ../../WINGs/findfile.c:66
#, c-format
msgid "could not get password entry for user %s"
msgstr "nemožno zistiť informácie o užívateľovi %s"
#: ../../WINGs/host.c:114
msgid "Cannot get current host name"
msgstr "Nemožno zistiť aktuálne meno počítača"
#: ../../WINGs/proplist.c:91
#, c-format
msgid "syntax error in %s %s, line %i: %s"
msgstr "chyba syntaxe v %s %s, riadok %i: %s"
#: ../../WINGs/proplist.c:150
msgid "Only string or data is supported for a proplist dictionary key"
msgstr "Pre kľúč slovníka proplist je podporovaný len reťazec alebo dáta"
#: ../../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 "Použitá proplist funkcia na iných ako WMPropLists objektoch"
#: ../../WINGs/proplist.c:630
msgid "unterminated PropList string"
msgstr "neukončený PropList reťazec"
#: ../../WINGs/proplist.c:670
msgid "unterminated PropList data"
msgstr "neukončené PropList dáta"
#: ../../WINGs/proplist.c:678
msgid "unterminated PropList data (missing hexdigit)"
msgstr "neukončené PropList dáta (chýbajúca hex číslica)"
#: ../../WINGs/proplist.c:690 ../../WINGs/proplist.c:695
msgid "non hexdigit character in PropList data"
msgstr "v PropList dátach je znak, ktorý nie je hex číslicou"
#: ../../WINGs/proplist.c:729
msgid "unterminated PropList array"
msgstr "neukončené PropList pole"
#: ../../WINGs/proplist.c:737
msgid "missing or unterminated PropList array"
msgstr "chýbajúce alebo neukončené PropList pole"
#: ../../WINGs/proplist.c:747
msgid "could not get PropList array element"
msgstr "nemožno zistiť prvok PropList poľa"
#: ../../WINGs/proplist.c:776
msgid "unterminated PropList dictionary"
msgstr "neukončený PropList slovník"
#: ../../WINGs/proplist.c:793
msgid "missing PropList dictionary key"
msgstr "chýbajúci kľúč PropList slovníka"
#: ../../WINGs/proplist.c:795
msgid "missing PropList dictionary entry key or unterminated dictionary"
msgstr "chýbajúci kľúč položky PropList slovníka alebo neukončený slovník"
#: ../../WINGs/proplist.c:803
msgid "error parsing PropList dictionary key"
msgstr "chyba pri parsovaní kľúča PropList slovníka"
#: ../../WINGs/proplist.c:811
msgid "missing = in PropList dictionary entry"
msgstr "chýbajúce = v položke PropList slovníka"
#: ../../WINGs/proplist.c:819
msgid "error parsing PropList dictionary entry value"
msgstr "chyba pri parsovaní hodnoty položky PropList slovníka"
#: ../../WINGs/proplist.c:827
msgid "missing ; in PropList dictionary entry"
msgstr "chýbajúca ; v položke PropList slovníka"
#: ../../WINGs/proplist.c:888
msgid ""
"was expecting a string, data, array or dictionary. If it's a string, try "
"enclosing it with \"."
msgstr ""
"očakávaný bol reťazec, dáta, pole alebo slovník. Ak je to reťazec, skúste ho "
"uzavrieť medzi \"."
#: ../../WINGs/proplist.c:892
msgid "Comments are not allowed inside WindowMaker owned domain files."
msgstr "Komentáre v doménových súboroch Window Makera nie sú povolené."
#: ../../WINGs/proplist.c:1563 ../../WINGs/proplist.c:1630
msgid "extra data after end of property list"
msgstr "prebytočné dáta na konci property listu"
#: ../../WINGs/proplist.c:1606
#, c-format
msgid "could not get size for file '%s'"
msgstr "nemožno zistiť veľkosť súboru '%s'"
#: ../../WINGs/proplist.c:1619
#, c-format
msgid "error reading from file '%s'"
msgstr "chyba pri čítaní zo súboru '%s'"
#: ../../WINGs/proplist.c:1671
#, c-format
msgid "mkstemp (%s) failed"
msgstr "chyba mkstemp (%s)"
#: ../../WINGs/proplist.c:1682
#, c-format
msgid "mktemp (%s) failed"
msgstr "chyba mktemp(%s)"
#: ../../WINGs/proplist.c:1693
#, c-format
msgid "open (%s) failed"
msgstr "chyba pri otváraní (%s)"
#: ../../WINGs/proplist.c:1700
#, c-format
msgid "writing to file: %s failed"
msgstr "chyba pri zápise do súboru: %s"
#: ../../WINGs/proplist.c:1708
#, c-format
msgid "fclose (%s) failed"
msgstr "chyba fclose (%s)"
#: ../../WINGs/proplist.c:1717
#, c-format
msgid "rename ('%s' to '%s') failed"
msgstr "chyba rename ('%s' na '%s')"
#. something happened with the file. just overwrite it
#: ../../WINGs/userdefaults.c:188 ../../WINGs/userdefaults.c:204
#, c-format
msgid "cannot read domain from file '%s' when syncing"
msgstr "nemožno čítať doménu zo súboru '%s' pri synchronizácii"
#: ../../WINGs/wcolor.c:224 ../../WINGs/wcolor.c:236 ../../WINGs/wcolor.c:275
#: ../../WINGs/wcolor.c:316
#, c-format
msgid "could not allocate %s color"
msgstr "nemožno alokovať %s farbu"
#: ../../WINGs/wcolor.c:224
msgid "white"
msgstr "bielu"
#: ../../WINGs/wcolor.c:236
msgid "black"
msgstr "čiernu"
#: ../../WINGs/wcolor.c:275
msgid "gray"
msgstr "šedú"
#: ../../WINGs/wcolor.c:316
msgid "dark gray"
msgstr "tmavošedú"
#: ../../WINGs/wcolorpanel.c:420
msgid "Colors"
msgstr "Farby"
#: ../../WINGs/wcolorpanel.c:610 ../../WINGs/wcolorpanel.c:2829
msgid "Brightness"
msgstr "Svetlosť"
#: ../../WINGs/wcolorpanel.c:612 ../../WINGs/wcolorpanel.c:688
#: ../../WINGs/wcolorpanel.c:721 ../../WINGs/wcolorpanel.c:755
#: ../../WINGs/wcolorpanel.c:815 ../../WINGs/wcolorpanel.c:849
#: ../../WINGs/wcolorpanel.c:883 ../../WINGs/wcolorpanel.c:918
#: ../../WINGs/wcolorpanel.c:2169 ../../WINGs/wcolorpanel.c:2831
#: ../../WINGs/wcolorpanel.c:2867 ../../WINGs/wcolorpanel.c:2903
#: ../../WINGs/wcolorpanel.c:3745
msgid "Color Panel: Could not allocate memory"
msgstr "Panel farieb: Nemožno alokovať pamäť"
#: ../../WINGs/wcolorpanel.c:685 ../../WINGs/wcolorpanel.c:686
msgid "Red"
msgstr "Červená"
#: ../../WINGs/wcolorpanel.c:718 ../../WINGs/wcolorpanel.c:719
msgid "Green"
msgstr "Zelená"
#: ../../WINGs/wcolorpanel.c:752 ../../WINGs/wcolorpanel.c:753
msgid "Blue"
msgstr "Modrá"
#: ../../WINGs/wcolorpanel.c:812 ../../WINGs/wcolorpanel.c:813
msgid "Cyan"
msgstr "Azúrová"
#: ../../WINGs/wcolorpanel.c:846 ../../WINGs/wcolorpanel.c:847
msgid "Magenta"
msgstr "Purpurová"
#: ../../WINGs/wcolorpanel.c:880 ../../WINGs/wcolorpanel.c:881
msgid "Yellow"
msgstr "Žltá"
#: ../../WINGs/wcolorpanel.c:915 ../../WINGs/wcolorpanel.c:916
msgid "Black"
msgstr "Čierna"
#: ../../WINGs/wcolorpanel.c:996
msgid "Spectrum"
msgstr "Spektrum"
#: ../../WINGs/wcolorpanel.c:1026
msgid "Palette"
msgstr "Paleta"
#: ../../WINGs/wcolorpanel.c:1032
msgid "New from File..."
msgstr "Nová zo súboru..."
#: ../../WINGs/wcolorpanel.c:1033 ../../WINGs/wcolorpanel.c:1081
#: ../../WINGs/wcolorpanel.c:1098
msgid "Rename..."
msgstr "Premenovať..."
#: ../../WINGs/wcolorpanel.c:1034 ../../WINGs/wcolorpanel.c:1082
#: ../../WINGs/wcolorpanel.c:1099 ../../WINGs/wcolorpanel.c:3326
msgid "Remove"
msgstr "Odstrániť"
#: ../../WINGs/wcolorpanel.c:1035
msgid "Copy"
msgstr "Kopírovať"
#: ../../WINGs/wcolorpanel.c:1036
msgid "New from Clipboard"
msgstr "Nová z nástenky"
#: ../../WINGs/wcolorpanel.c:1057
msgid "X11-Colors"
msgstr "Farby X11"
#: ../../WINGs/wcolorpanel.c:1074
msgid "Color"
msgstr "Farba"
#: ../../WINGs/wcolorpanel.c:1080
msgid "Add..."
msgstr "Pridať..."
#: ../../WINGs/wcolorpanel.c:1090
msgid "List"
msgstr "Zoznam"
#: ../../WINGs/wcolorpanel.c:1097
msgid "New..."
msgstr "Nový..."
#: ../../WINGs/wcolorpanel.c:1236
#, c-format
msgid ""
"Color Panel: Could not create directory %s needed to store configurations"
msgstr ""
"Panel farieb: Nemožno vytvoriť adresár %s potrebný na uloženie nastavení"
#. Delete the file, it doesn't belong here
#: ../../WINGs/wcolorpanel.c:1242 ../../WINGs/wcolorpanel.c:3212
#: ../../WINGs/wcolorpanel.c:3216
msgid "File Error"
msgstr "Chyba súboru"
#: ../../WINGs/wcolorpanel.c:1243
msgid "Could not create ColorPanel configuration directory"
msgstr "Nemožno vytvoriť konfiguračný adresár panelu farieb"
#: ../../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 "Panel farieb: Nemožno nájsť súbor"
#: ../../WINGs/wcolorpanel.c:1491 ../../WINGs/wcolorpanel.c:1556
#: ../../WINGs/wcolorpanel.c:1620
msgid "Color Panel: X failed request"
msgstr "Panel farieb: chyba požiadavky X"
#: ../../WINGs/wcolorpanel.c:2865
msgid "Saturation"
msgstr "Saturácia"
#: ../../WINGs/wcolorpanel.c:2901
msgid "Hue"
msgstr "Odtieň"
#: ../../WINGs/wcolorpanel.c:3151
msgid "Open Palette"
msgstr "Otvoriť paletu"
#: ../../WINGs/wcolorpanel.c:3213
msgid "Invalid file format !"
msgstr "Nesprávny súborový formát!"
#: ../../WINGs/wcolorpanel.c:3215
#, c-format
msgid "can't remove file %s"
msgstr "namožno odstrániť súbor %s"
#: ../../WINGs/wcolorpanel.c:3217
msgid "Couldn't remove file from Configuration Directory !"
msgstr "Nemožno odstrániť súbor z konfiguračného adresára!"
#: ../../WINGs/wcolorpanel.c:3244
msgid "Rename"
msgstr "Premenovať"
#: ../../WINGs/wcolorpanel.c:3244
msgid "Rename palette to:"
msgstr "Premenovať paletu:"
#: ../../WINGs/wcolorpanel.c:3245 ../../WINGs/wfilepanel.c:259
#: ../../WINGs/wfilepanel.c:662 ../../WINGs/wfilepanel.c:763
msgid "Cancel"
msgstr "Zrušiť"
#. Careful, this palette exists already
#: ../../WINGs/wcolorpanel.c:3261 ../../WINGs/wfilepanel.c:763
msgid "Warning"
msgstr "Varovanie"
#: ../../WINGs/wcolorpanel.c:3262
msgid ""
"Palette already exists !\n"
"\n"
"Overwrite ?"
msgstr ""
"Paleta už existuje!\n"
"\n"
"Prepísať?"
#: ../../WINGs/wcolorpanel.c:3262 ../../WINGs/wcolorpanel.c:3326
msgid "No"
msgstr "Nie"
#: ../../WINGs/wcolorpanel.c:3262 ../../WINGs/wcolorpanel.c:3326
msgid "Yes"
msgstr "Áno"
#: ../../WINGs/wcolorpanel.c:3294
#, c-format
msgid "Couldn't rename palette %s to %s\n"
msgstr "Nemožno premenovať paletu %s na %s\n"
#: ../../WINGs/wcolorpanel.c:3320
msgid "This will permanently remove the palette "
msgstr "Paleta bude natrvalo zmazaná"
#: ../../WINGs/wcolorpanel.c:3323
msgid ""
".\n"
"\n"
"Are you sure you want to remove this palette ?"
msgstr ""
".\n"
"\n"
"Ste si istý, že chcete odstrániť túto paletu?"
#: ../../WINGs/wcolorpanel.c:3348
#, c-format
msgid "Couldn't remove palette %s\n"
msgstr "Nemožno odstrániť paletu %s\n"
#: ../../WINGs/wcolorpanel.c:3647
#, c-format
msgid "Could not open %s"
msgstr "Nemožno otvoriť %s"
#: ../../WINGs/wcolorpanel.c:3654
#, c-format
msgid "Could not create %s"
msgstr "Nemožno vytvoriť %s"
#: ../../WINGs/wcolorpanel.c:3665
#, c-format
msgid "Write error on file %s"
msgstr "Chyba zápisu do súboru %s"
#: ../../WINGs/wcolorpanel.c:3710
msgid "Color Panel: Color unspecified"
msgstr "Panel farieb: Nešpecifikovaná farba"
#: ../../WINGs/wfilepanel.c:235
msgid "Name:"
msgstr "Meno:"
#: ../../WINGs/wfilepanel.c:332 ../../WINGs/wfilepanel.c:396
msgid "Open"
msgstr "Otvoriť"
#: ../../WINGs/wfilepanel.c:350 ../../WINGs/wfilepanel.c:402
msgid "Save"
msgstr "Uložiť"
#: ../../WINGs/wfilepanel.c:565
#, c-format
msgid "WINGs: could not open directory %s\n"
msgstr "WINGs: nemožno otvoriť adresár %s\n"
#: ../../WINGs/wfilepanel.c:583
#, c-format
msgid "WINGs: could not stat %s\n"
msgstr "WINGs: nemožno zistiť informácie o %s\n"
#: ../../WINGs/wfilepanel.c:650 ../../WINGs/wfilepanel.c:973
#: ../../WINGs/wfontpanel.c:750
msgid "Error"
msgstr "Chyba"
#: ../../WINGs/wfilepanel.c:661
msgid "Create Directory"
msgstr "Vytvoriť adresár"
#: ../../WINGs/wfilepanel.c:662
msgid "Enter directory name"
msgstr "Meno adresára"
#: ../../WINGs/wfilepanel.c:698 ../../WINGs/wfilepanel.c:737
#: ../../WINGs/wfilepanel.c:768 ../../WINGs/wfilepanel.c:796
msgid "Permission denied."
msgstr "Prístup zamietnutý."
#: ../../WINGs/wfilepanel.c:701
#, c-format
msgid "'%s' already exists."
msgstr "'%s' už existuje"
#: ../../WINGs/wfilepanel.c:704
msgid "Path does not exist."
msgstr "Cesta neexistuje."
#: ../../WINGs/wfilepanel.c:734 ../../WINGs/wfilepanel.c:793
#, c-format
msgid "'%s' does not exist."
msgstr "'%s' neexistuje."
#: ../../WINGs/wfilepanel.c:741 ../../WINGs/wfilepanel.c:800
msgid "Insufficient memory available."
msgstr "Nedostatok pamäti."
#: ../../WINGs/wfilepanel.c:745 ../../WINGs/wfilepanel.c:804
#, c-format
msgid "'%s' is on a read-only filesystem."
msgstr "'%s' je na súborovom systéme len pre čítanie."
#: ../../WINGs/wfilepanel.c:748 ../../WINGs/wfilepanel.c:780
#: ../../WINGs/wfilepanel.c:807
#, c-format
msgid "Can not delete '%s'."
msgstr "Nemožno odstrániť '%s'."
#: ../../WINGs/wfilepanel.c:755
#, c-format
msgid "Delete directory %s ?"
msgstr "Odstrániť adresár %s?"
#: ../../WINGs/wfilepanel.c:759
#, c-format
msgid "Delete file %s ?"
msgstr "Odstrániť súbor %s?"
#: ../../WINGs/wfilepanel.c:771
#, c-format
msgid "Directory '%s' does not exist."
msgstr "Adresár '%s' neexistuje."
#: ../../WINGs/wfilepanel.c:774
#, c-format
msgid "Directory '%s' is not empty."
msgstr "Adresár '%s' nie je prázdny."
#: ../../WINGs/wfilepanel.c:777
#, c-format
msgid "Directory '%s' is busy."
msgstr "Adresár '%s' je používaný."
#: ../../WINGs/wfilepanel.c:790
#, c-format
msgid "'%s' is a directory."
msgstr "'%s' je adresár."
#: ../../WINGs/wfilepanel.c:832
#, c-format
msgid "An error occured browsing '%s'."
msgstr "Pri prehliadaní '%s' nastala chyba."
#: ../../WINGs/wfilepanel.c:836
#, c-format
msgid "'%s' is not a directory."
msgstr "'%s' nie je adresár."
#: ../../WINGs/wfilepanel.c:973
msgid "File does not exist."
msgstr "Súbor neexistuje."
#: ../../WINGs/wfont.c:324 ../../WINGs/wfont.c:344
#, c-format
msgid "could not load font %s."
msgstr "nemožno načítať font %s."
#: ../../WINGs/wfont.c:375 ../../WINGs/wfont.c:420 ../../WINGs/wfont.c:475
#: ../../WINGs/wfont.c:1337 ../../WINGs/wfont.c:1398 ../../WINGs/wfont.c:1469
#, c-format
msgid ""
"Conversion to widechar failed (possible invalid multibyte sequence): '%s':"
"(pos %d)\n"
msgstr ""
"Konverzia do widechar zlyhala (možno nesprávna multibyte sekvencia): '%s':"
"(pos %d)\n"
#. // remove warning later. or maybe not
#: ../../WINGs/wfont.c:591 ../../WINGs/wfont.c:1568
#, c-format
msgid "Invalid font specification: '%s'\n"
msgstr "Chybná špecifikácia fontu: '%s'\n"
#: ../../WINGs/wfont.c:770 ../../WINGs/wfont.c:780
#, c-format
msgid "Invalid size specification '%s' in %s. Using default %d\n"
msgstr "Chybná špecifikácia veľkosti '%s' v %s. Použije sa implicitná %d\n"
#: ../../WINGs/wfont.c:824
#, c-format
msgid "the following character sets are missing in %s:"
msgstr "nasledujúce sady znakov chýbajú v %s:"
#: ../../WINGs/wfont.c:830
#, c-format
msgid ""
"the string \"%s\" will be used in place of any characters from those sets."
msgstr "reťazec \"%s\" bude použitý namiesto znakov z týchto sád."
#. is arial a good fallback for multibyte?
#: ../../WINGs/wfont.c:1232 ../../WINGs/wfont.c:1247
#, c-format
msgid "could not load font %s. Trying arial."
msgstr "nemožno načítať font %s. Skúša sa načítať arial."
#: ../../WINGs/wfont.c:1239
msgid "could not load antialiased font set. Reverting to standard font sets."
msgstr "nemožno načítať antialiasovanú sadu fontov. Späť k štandardnej sade fontov."
#: ../../WINGs/wfont.c:1242
#, c-format
msgid "could not load FontSet %s. Trying fixed."
msgstr "nemožno načítať sadu fontov %s. Skúša sa načítať fixed."
#: ../../WINGs/wfont.c:1254
msgid "could not load antialiased fonts. Reverting to normal fonts."
msgstr "nemožno zaviesť antialiasovaný font. Návrat k normálnemu fontu."
#: ../../WINGs/wfont.c:1257 ../../WINGs/wfont.c:1268
#, c-format
msgid "could not load font %s. Trying fixed."
msgstr "nemožno načítať font %s. Skúša sa načítať fixed."
#: ../../WINGs/wfont.c:1262
#, c-format
msgid "could not load font set %s. Trying fixed."
msgstr "nemožno načítať font %s. Skúša sa načítať fixed."
#: ../../WINGs/wfont.c:1272
msgid "could not load fixed font!"
msgstr "nemožno načítať font fixed!"
#: ../../WINGs/wfont.c:1520
#, c-format
msgid "font description %s is too large."
msgstr "popis fontu %s je príliš veľký."
#: ../../WINGs/wfontpanel.c:235
msgid "Test!!!"
msgstr "Skúška!!!"
#: ../../WINGs/wfontpanel.c:241
msgid "Family"
msgstr "Rodina"
#: ../../WINGs/wfontpanel.c:252
msgid "Typeface"
msgstr "Vzhľad"
#: ../../WINGs/wfontpanel.c:263
msgid "Size"
msgstr "Veľkosť"
#: ../../WINGs/wfontpanel.c:282
msgid "Set"
msgstr "Sada"
#: ../../WINGs/wfontpanel.c:288
msgid "Revert"
msgstr "Obrátiť"
#: ../../WINGs/wfontpanel.c:751
msgid "Could not retrieve font list"
msgstr "Nemožno obdržať zoznam fontov"
#: ../../WINGs/wfontpanel.c:765
#, c-format
msgid "font name %s is longer than 256, which is invalid."
msgstr "meno fontu %s je dlhšie ako 256, čo je nesprávne."
#: ../../WINGs/wfontpanel.c:913
msgid "Roman"
msgstr "roman"
#: ../../WINGs/wfontpanel.c:916
msgid "Italic"
msgstr "kurzíva"
#: ../../WINGs/wfontpanel.c:918
msgid "Oblique"
msgstr "šikmé"
#: ../../WINGs/wfontpanel.c:920
msgid "Rev Italic"
msgstr "obr. kurzíva"
#: ../../WINGs/wfontpanel.c:922
msgid "Rev Oblique"
msgstr "obr. šikmé"
#: ../../WINGs/wfontpanel.c:928
msgid "Normal"
msgstr "normálne"
#: ../../WINGs/widgets.c:419
#, c-format
msgid "WINGs: could not load widget images file: %s"
msgstr "WINGs: nemožno načítať súbor s obrázkami pre widgety: %s"
#: ../../WINGs/widgets.c:772
msgid ""
"could not load any fonts. Make sure your font installation and locale "
"settings are correct."
msgstr ""
"nemožno načítať žiadny font. Ubezpečte sa, že inštalácia fontov a miestne "
"nastavenia sú v poriadku."
#: ../../WINGs/wruler.c:192
msgid "0 inches"
msgstr "0 palcov"

1748
WINGs/proplist.c Normal file

File diff suppressed because it is too large Load Diff

771
WINGs/rgb.h Normal file
View File

@@ -0,0 +1,771 @@
/* Automatically generated file. Do NOT edit. Regenerate it using make-rgb */
#ifndef RGB_H_
#define RGB_H_
#include <wraster.h>
typedef struct RGBColor {
RColor color;
char *name;
} RGBColor;
RGBColor rgbColors[] = {
{{255, 250, 250, 0}, "snow"},
{{248, 248, 255, 0}, "ghost"},
{{248, 248, 255, 0}, "GhostWhite"},
{{245, 245, 245, 0}, "white"},
{{245, 245, 245, 0}, "WhiteSmoke"},
{{220, 220, 220, 0}, "gainsboro"},
{{255, 250, 240, 0}, "floral"},
{{255, 250, 240, 0}, "FloralWhite"},
{{253, 245, 230, 0}, "old"},
{{253, 245, 230, 0}, "OldLace"},
{{250, 240, 230, 0}, "linen"},
{{250, 235, 215, 0}, "antique"},
{{250, 235, 215, 0}, "AntiqueWhite"},
{{255, 239, 213, 0}, "papaya"},
{{255, 239, 213, 0}, "PapayaWhip"},
{{255, 235, 205, 0}, "blanched"},
{{255, 235, 205, 0}, "BlanchedAlmond"},
{{255, 228, 196, 0}, "bisque"},
{{255, 218, 185, 0}, "peach"},
{{255, 218, 185, 0}, "PeachPuff"},
{{255, 222, 173, 0}, "navajo"},
{{255, 222, 173, 0}, "NavajoWhite"},
{{255, 228, 181, 0}, "moccasin"},
{{255, 248, 220, 0}, "cornsilk"},
{{255, 255, 240, 0}, "ivory"},
{{255, 250, 205, 0}, "lemon"},
{{255, 250, 205, 0}, "LemonChiffon"},
{{255, 245, 238, 0}, "seashell"},
{{240, 255, 240, 0}, "honeydew"},
{{245, 255, 250, 0}, "mint"},
{{245, 255, 250, 0}, "MintCream"},
{{240, 255, 255, 0}, "azure"},
{{240, 248, 255, 0}, "alice"},
{{240, 248, 255, 0}, "AliceBlue"},
{{230, 230, 250, 0}, "lavender"},
{{255, 240, 245, 0}, "lavender"},
{{255, 240, 245, 0}, "LavenderBlush"},
{{255, 228, 225, 0}, "misty"},
{{255, 228, 225, 0}, "MistyRose"},
{{255, 255, 255, 0}, "white"},
{{ 0, 0, 0, 0}, "black"},
{{ 47, 79, 79, 0}, "dark"},
{{ 47, 79, 79, 0}, "DarkSlateGray"},
{{ 47, 79, 79, 0}, "dark"},
{{ 47, 79, 79, 0}, "DarkSlateGrey"},
{{105, 105, 105, 0}, "dim"},
{{105, 105, 105, 0}, "DimGray"},
{{105, 105, 105, 0}, "dim"},
{{105, 105, 105, 0}, "DimGrey"},
{{112, 128, 144, 0}, "slate"},
{{112, 128, 144, 0}, "SlateGray"},
{{112, 128, 144, 0}, "slate"},
{{112, 128, 144, 0}, "SlateGrey"},
{{119, 136, 153, 0}, "light"},
{{119, 136, 153, 0}, "LightSlateGray"},
{{119, 136, 153, 0}, "light"},
{{119, 136, 153, 0}, "LightSlateGrey"},
{{190, 190, 190, 0}, "gray"},
{{190, 190, 190, 0}, "grey"},
{{211, 211, 211, 0}, "light"},
{{211, 211, 211, 0}, "LightGrey"},
{{211, 211, 211, 0}, "light"},
{{211, 211, 211, 0}, "LightGray"},
{{ 25, 25, 112, 0}, "midnight"},
{{ 25, 25, 112, 0}, "MidnightBlue"},
{{ 0, 0, 128, 0}, "navy"},
{{ 0, 0, 128, 0}, "navy"},
{{ 0, 0, 128, 0}, "NavyBlue"},
{{100, 149, 237, 0}, "cornflower"},
{{100, 149, 237, 0}, "CornflowerBlue"},
{{ 72, 61, 139, 0}, "dark"},
{{ 72, 61, 139, 0}, "DarkSlateBlue"},
{{106, 90, 205, 0}, "slate"},
{{106, 90, 205, 0}, "SlateBlue"},
{{123, 104, 238, 0}, "medium"},
{{123, 104, 238, 0}, "MediumSlateBlue"},
{{132, 112, 255, 0}, "light"},
{{132, 112, 255, 0}, "LightSlateBlue"},
{{ 0, 0, 205, 0}, "medium"},
{{ 0, 0, 205, 0}, "MediumBlue"},
{{ 65, 105, 225, 0}, "royal"},
{{ 65, 105, 225, 0}, "RoyalBlue"},
{{ 0, 0, 255, 0}, "blue"},
{{ 30, 144, 255, 0}, "dodger"},
{{ 30, 144, 255, 0}, "DodgerBlue"},
{{ 0, 191, 255, 0}, "deep"},
{{ 0, 191, 255, 0}, "DeepSkyBlue"},
{{135, 206, 235, 0}, "sky"},
{{135, 206, 235, 0}, "SkyBlue"},
{{135, 206, 250, 0}, "light"},
{{135, 206, 250, 0}, "LightSkyBlue"},
{{ 70, 130, 180, 0}, "steel"},
{{ 70, 130, 180, 0}, "SteelBlue"},
{{176, 196, 222, 0}, "light"},
{{176, 196, 222, 0}, "LightSteelBlue"},
{{173, 216, 230, 0}, "light"},
{{173, 216, 230, 0}, "LightBlue"},
{{176, 224, 230, 0}, "powder"},
{{176, 224, 230, 0}, "PowderBlue"},
{{175, 238, 238, 0}, "pale"},
{{175, 238, 238, 0}, "PaleTurquoise"},
{{ 0, 206, 209, 0}, "dark"},
{{ 0, 206, 209, 0}, "DarkTurquoise"},
{{ 72, 209, 204, 0}, "medium"},
{{ 72, 209, 204, 0}, "MediumTurquoise"},
{{ 64, 224, 208, 0}, "turquoise"},
{{ 0, 255, 255, 0}, "cyan"},
{{224, 255, 255, 0}, "light"},
{{224, 255, 255, 0}, "LightCyan"},
{{ 95, 158, 160, 0}, "cadet"},
{{ 95, 158, 160, 0}, "CadetBlue"},
{{102, 205, 170, 0}, "medium"},
{{102, 205, 170, 0}, "MediumAquamarine"},
{{127, 255, 212, 0}, "aquamarine"},
{{ 0, 100, 0, 0}, "dark"},
{{ 0, 100, 0, 0}, "DarkGreen"},
{{ 85, 107, 47, 0}, "dark"},
{{ 85, 107, 47, 0}, "DarkOliveGreen"},
{{143, 188, 143, 0}, "dark"},
{{143, 188, 143, 0}, "DarkSeaGreen"},
{{ 46, 139, 87, 0}, "sea"},
{{ 46, 139, 87, 0}, "SeaGreen"},
{{ 60, 179, 113, 0}, "medium"},
{{ 60, 179, 113, 0}, "MediumSeaGreen"},
{{ 32, 178, 170, 0}, "light"},
{{ 32, 178, 170, 0}, "LightSeaGreen"},
{{152, 251, 152, 0}, "pale"},
{{152, 251, 152, 0}, "PaleGreen"},
{{ 0, 255, 127, 0}, "spring"},
{{ 0, 255, 127, 0}, "SpringGreen"},
{{124, 252, 0, 0}, "lawn"},
{{124, 252, 0, 0}, "LawnGreen"},
{{ 0, 255, 0, 0}, "green"},
{{127, 255, 0, 0}, "chartreuse"},
{{ 0, 250, 154, 0}, "medium"},
{{ 0, 250, 154, 0}, "MediumSpringGreen"},
{{173, 255, 47, 0}, "green"},
{{173, 255, 47, 0}, "GreenYellow"},
{{ 50, 205, 50, 0}, "lime"},
{{ 50, 205, 50, 0}, "LimeGreen"},
{{154, 205, 50, 0}, "yellow"},
{{154, 205, 50, 0}, "YellowGreen"},
{{ 34, 139, 34, 0}, "forest"},
{{ 34, 139, 34, 0}, "ForestGreen"},
{{107, 142, 35, 0}, "olive"},
{{107, 142, 35, 0}, "OliveDrab"},
{{189, 183, 107, 0}, "dark"},
{{189, 183, 107, 0}, "DarkKhaki"},
{{240, 230, 140, 0}, "khaki"},
{{238, 232, 170, 0}, "pale"},
{{238, 232, 170, 0}, "PaleGoldenrod"},
{{250, 250, 210, 0}, "light"},
{{250, 250, 210, 0}, "LightGoldenrodYellow"},
{{255, 255, 224, 0}, "light"},
{{255, 255, 224, 0}, "LightYellow"},
{{255, 255, 0, 0}, "yellow"},
{{255, 215, 0, 0}, "gold"},
{{238, 221, 130, 0}, "light"},
{{238, 221, 130, 0}, "LightGoldenrod"},
{{218, 165, 32, 0}, "goldenrod"},
{{184, 134, 11, 0}, "dark"},
{{184, 134, 11, 0}, "DarkGoldenrod"},
{{188, 143, 143, 0}, "rosy"},
{{188, 143, 143, 0}, "RosyBrown"},
{{205, 92, 92, 0}, "indian"},
{{205, 92, 92, 0}, "IndianRed"},
{{139, 69, 19, 0}, "saddle"},
{{139, 69, 19, 0}, "SaddleBrown"},
{{160, 82, 45, 0}, "sienna"},
{{205, 133, 63, 0}, "peru"},
{{222, 184, 135, 0}, "burlywood"},
{{245, 245, 220, 0}, "beige"},
{{245, 222, 179, 0}, "wheat"},
{{244, 164, 96, 0}, "sandy"},
{{244, 164, 96, 0}, "SandyBrown"},
{{210, 180, 140, 0}, "tan"},
{{210, 105, 30, 0}, "chocolate"},
{{178, 34, 34, 0}, "firebrick"},
{{165, 42, 42, 0}, "brown"},
{{233, 150, 122, 0}, "dark"},
{{233, 150, 122, 0}, "DarkSalmon"},
{{250, 128, 114, 0}, "salmon"},
{{255, 160, 122, 0}, "light"},
{{255, 160, 122, 0}, "LightSalmon"},
{{255, 165, 0, 0}, "orange"},
{{255, 140, 0, 0}, "dark"},
{{255, 140, 0, 0}, "DarkOrange"},
{{255, 127, 80, 0}, "coral"},
{{240, 128, 128, 0}, "light"},
{{240, 128, 128, 0}, "LightCoral"},
{{255, 99, 71, 0}, "tomato"},
{{255, 69, 0, 0}, "orange"},
{{255, 69, 0, 0}, "OrangeRed"},
{{255, 0, 0, 0}, "red"},
{{255, 105, 180, 0}, "hot"},
{{255, 105, 180, 0}, "HotPink"},
{{255, 20, 147, 0}, "deep"},
{{255, 20, 147, 0}, "DeepPink"},
{{255, 192, 203, 0}, "pink"},
{{255, 182, 193, 0}, "light"},
{{255, 182, 193, 0}, "LightPink"},
{{219, 112, 147, 0}, "pale"},
{{219, 112, 147, 0}, "PaleVioletRed"},
{{176, 48, 96, 0}, "maroon"},
{{199, 21, 133, 0}, "medium"},
{{199, 21, 133, 0}, "MediumVioletRed"},
{{208, 32, 144, 0}, "violet"},
{{208, 32, 144, 0}, "VioletRed"},
{{255, 0, 255, 0}, "magenta"},
{{238, 130, 238, 0}, "violet"},
{{221, 160, 221, 0}, "plum"},
{{218, 112, 214, 0}, "orchid"},
{{186, 85, 211, 0}, "medium"},
{{186, 85, 211, 0}, "MediumOrchid"},
{{153, 50, 204, 0}, "dark"},
{{153, 50, 204, 0}, "DarkOrchid"},
{{148, 0, 211, 0}, "dark"},
{{148, 0, 211, 0}, "DarkViolet"},
{{138, 43, 226, 0}, "blue"},
{{138, 43, 226, 0}, "BlueViolet"},
{{160, 32, 240, 0}, "purple"},
{{147, 112, 219, 0}, "medium"},
{{147, 112, 219, 0}, "MediumPurple"},
{{216, 191, 216, 0}, "thistle"},
{{255, 250, 250, 0}, "snow1"},
{{238, 233, 233, 0}, "snow2"},
{{205, 201, 201, 0}, "snow3"},
{{139, 137, 137, 0}, "snow4"},
{{255, 245, 238, 0}, "seashell1"},
{{238, 229, 222, 0}, "seashell2"},
{{205, 197, 191, 0}, "seashell3"},
{{139, 134, 130, 0}, "seashell4"},
{{255, 239, 219, 0}, "AntiqueWhite1"},
{{238, 223, 204, 0}, "AntiqueWhite2"},
{{205, 192, 176, 0}, "AntiqueWhite3"},
{{139, 131, 120, 0}, "AntiqueWhite4"},
{{255, 228, 196, 0}, "bisque1"},
{{238, 213, 183, 0}, "bisque2"},
{{205, 183, 158, 0}, "bisque3"},
{{139, 125, 107, 0}, "bisque4"},
{{255, 218, 185, 0}, "PeachPuff1"},
{{238, 203, 173, 0}, "PeachPuff2"},
{{205, 175, 149, 0}, "PeachPuff3"},
{{139, 119, 101, 0}, "PeachPuff4"},
{{255, 222, 173, 0}, "NavajoWhite1"},
{{238, 207, 161, 0}, "NavajoWhite2"},
{{205, 179, 139, 0}, "NavajoWhite3"},
{{139, 121, 94, 0}, "NavajoWhite4"},
{{255, 250, 205, 0}, "LemonChiffon1"},
{{238, 233, 191, 0}, "LemonChiffon2"},
{{205, 201, 165, 0}, "LemonChiffon3"},
{{139, 137, 112, 0}, "LemonChiffon4"},
{{255, 248, 220, 0}, "cornsilk1"},
{{238, 232, 205, 0}, "cornsilk2"},
{{205, 200, 177, 0}, "cornsilk3"},
{{139, 136, 120, 0}, "cornsilk4"},
{{255, 255, 240, 0}, "ivory1"},
{{238, 238, 224, 0}, "ivory2"},
{{205, 205, 193, 0}, "ivory3"},
{{139, 139, 131, 0}, "ivory4"},
{{240, 255, 240, 0}, "honeydew1"},
{{224, 238, 224, 0}, "honeydew2"},
{{193, 205, 193, 0}, "honeydew3"},
{{131, 139, 131, 0}, "honeydew4"},
{{255, 240, 245, 0}, "LavenderBlush1"},
{{238, 224, 229, 0}, "LavenderBlush2"},
{{205, 193, 197, 0}, "LavenderBlush3"},
{{139, 131, 134, 0}, "LavenderBlush4"},
{{255, 228, 225, 0}, "MistyRose1"},
{{238, 213, 210, 0}, "MistyRose2"},
{{205, 183, 181, 0}, "MistyRose3"},
{{139, 125, 123, 0}, "MistyRose4"},
{{240, 255, 255, 0}, "azure1"},
{{224, 238, 238, 0}, "azure2"},
{{193, 205, 205, 0}, "azure3"},
{{131, 139, 139, 0}, "azure4"},
{{131, 111, 255, 0}, "SlateBlue1"},
{{122, 103, 238, 0}, "SlateBlue2"},
{{105, 89, 205, 0}, "SlateBlue3"},
{{ 71, 60, 139, 0}, "SlateBlue4"},
{{ 72, 118, 255, 0}, "RoyalBlue1"},
{{ 67, 110, 238, 0}, "RoyalBlue2"},
{{ 58, 95, 205, 0}, "RoyalBlue3"},
{{ 39, 64, 139, 0}, "RoyalBlue4"},
{{ 0, 0, 255, 0}, "blue1"},
{{ 0, 0, 238, 0}, "blue2"},
{{ 0, 0, 205, 0}, "blue3"},
{{ 0, 0, 139, 0}, "blue4"},
{{ 30, 144, 255, 0}, "DodgerBlue1"},
{{ 28, 134, 238, 0}, "DodgerBlue2"},
{{ 24, 116, 205, 0}, "DodgerBlue3"},
{{ 16, 78, 139, 0}, "DodgerBlue4"},
{{ 99, 184, 255, 0}, "SteelBlue1"},
{{ 92, 172, 238, 0}, "SteelBlue2"},
{{ 79, 148, 205, 0}, "SteelBlue3"},
{{ 54, 100, 139, 0}, "SteelBlue4"},
{{ 0, 191, 255, 0}, "DeepSkyBlue1"},
{{ 0, 178, 238, 0}, "DeepSkyBlue2"},
{{ 0, 154, 205, 0}, "DeepSkyBlue3"},
{{ 0, 104, 139, 0}, "DeepSkyBlue4"},
{{135, 206, 255, 0}, "SkyBlue1"},
{{126, 192, 238, 0}, "SkyBlue2"},
{{108, 166, 205, 0}, "SkyBlue3"},
{{ 74, 112, 139, 0}, "SkyBlue4"},
{{176, 226, 255, 0}, "LightSkyBlue1"},
{{164, 211, 238, 0}, "LightSkyBlue2"},
{{141, 182, 205, 0}, "LightSkyBlue3"},
{{ 96, 123, 139, 0}, "LightSkyBlue4"},
{{198, 226, 255, 0}, "SlateGray1"},
{{185, 211, 238, 0}, "SlateGray2"},
{{159, 182, 205, 0}, "SlateGray3"},
{{108, 123, 139, 0}, "SlateGray4"},
{{202, 225, 255, 0}, "LightSteelBlue1"},
{{188, 210, 238, 0}, "LightSteelBlue2"},
{{162, 181, 205, 0}, "LightSteelBlue3"},
{{110, 123, 139, 0}, "LightSteelBlue4"},
{{191, 239, 255, 0}, "LightBlue1"},
{{178, 223, 238, 0}, "LightBlue2"},
{{154, 192, 205, 0}, "LightBlue3"},
{{104, 131, 139, 0}, "LightBlue4"},
{{224, 255, 255, 0}, "LightCyan1"},
{{209, 238, 238, 0}, "LightCyan2"},
{{180, 205, 205, 0}, "LightCyan3"},
{{122, 139, 139, 0}, "LightCyan4"},
{{187, 255, 255, 0}, "PaleTurquoise1"},
{{174, 238, 238, 0}, "PaleTurquoise2"},
{{150, 205, 205, 0}, "PaleTurquoise3"},
{{102, 139, 139, 0}, "PaleTurquoise4"},
{{152, 245, 255, 0}, "CadetBlue1"},
{{142, 229, 238, 0}, "CadetBlue2"},
{{122, 197, 205, 0}, "CadetBlue3"},
{{ 83, 134, 139, 0}, "CadetBlue4"},
{{ 0, 245, 255, 0}, "turquoise1"},
{{ 0, 229, 238, 0}, "turquoise2"},
{{ 0, 197, 205, 0}, "turquoise3"},
{{ 0, 134, 139, 0}, "turquoise4"},
{{ 0, 255, 255, 0}, "cyan1"},
{{ 0, 238, 238, 0}, "cyan2"},
{{ 0, 205, 205, 0}, "cyan3"},
{{ 0, 139, 139, 0}, "cyan4"},
{{151, 255, 255, 0}, "DarkSlateGray1"},
{{141, 238, 238, 0}, "DarkSlateGray2"},
{{121, 205, 205, 0}, "DarkSlateGray3"},
{{ 82, 139, 139, 0}, "DarkSlateGray4"},
{{127, 255, 212, 0}, "aquamarine1"},
{{118, 238, 198, 0}, "aquamarine2"},
{{102, 205, 170, 0}, "aquamarine3"},
{{ 69, 139, 116, 0}, "aquamarine4"},
{{193, 255, 193, 0}, "DarkSeaGreen1"},
{{180, 238, 180, 0}, "DarkSeaGreen2"},
{{155, 205, 155, 0}, "DarkSeaGreen3"},
{{105, 139, 105, 0}, "DarkSeaGreen4"},
{{ 84, 255, 159, 0}, "SeaGreen1"},
{{ 78, 238, 148, 0}, "SeaGreen2"},
{{ 67, 205, 128, 0}, "SeaGreen3"},
{{ 46, 139, 87, 0}, "SeaGreen4"},
{{154, 255, 154, 0}, "PaleGreen1"},
{{144, 238, 144, 0}, "PaleGreen2"},
{{124, 205, 124, 0}, "PaleGreen3"},
{{ 84, 139, 84, 0}, "PaleGreen4"},
{{ 0, 255, 127, 0}, "SpringGreen1"},
{{ 0, 238, 118, 0}, "SpringGreen2"},
{{ 0, 205, 102, 0}, "SpringGreen3"},
{{ 0, 139, 69, 0}, "SpringGreen4"},
{{ 0, 255, 0, 0}, "green1"},
{{ 0, 238, 0, 0}, "green2"},
{{ 0, 205, 0, 0}, "green3"},
{{ 0, 139, 0, 0}, "green4"},
{{127, 255, 0, 0}, "chartreuse1"},
{{118, 238, 0, 0}, "chartreuse2"},
{{102, 205, 0, 0}, "chartreuse3"},
{{ 69, 139, 0, 0}, "chartreuse4"},
{{192, 255, 62, 0}, "OliveDrab1"},
{{179, 238, 58, 0}, "OliveDrab2"},
{{154, 205, 50, 0}, "OliveDrab3"},
{{105, 139, 34, 0}, "OliveDrab4"},
{{202, 255, 112, 0}, "DarkOliveGreen1"},
{{188, 238, 104, 0}, "DarkOliveGreen2"},
{{162, 205, 90, 0}, "DarkOliveGreen3"},
{{110, 139, 61, 0}, "DarkOliveGreen4"},
{{255, 246, 143, 0}, "khaki1"},
{{238, 230, 133, 0}, "khaki2"},
{{205, 198, 115, 0}, "khaki3"},
{{139, 134, 78, 0}, "khaki4"},
{{255, 236, 139, 0}, "LightGoldenrod1"},
{{238, 220, 130, 0}, "LightGoldenrod2"},
{{205, 190, 112, 0}, "LightGoldenrod3"},
{{139, 129, 76, 0}, "LightGoldenrod4"},
{{255, 255, 224, 0}, "LightYellow1"},
{{238, 238, 209, 0}, "LightYellow2"},
{{205, 205, 180, 0}, "LightYellow3"},
{{139, 139, 122, 0}, "LightYellow4"},
{{255, 255, 0, 0}, "yellow1"},
{{238, 238, 0, 0}, "yellow2"},
{{205, 205, 0, 0}, "yellow3"},
{{139, 139, 0, 0}, "yellow4"},
{{255, 215, 0, 0}, "gold1"},
{{238, 201, 0, 0}, "gold2"},
{{205, 173, 0, 0}, "gold3"},
{{139, 117, 0, 0}, "gold4"},
{{255, 193, 37, 0}, "goldenrod1"},
{{238, 180, 34, 0}, "goldenrod2"},
{{205, 155, 29, 0}, "goldenrod3"},
{{139, 105, 20, 0}, "goldenrod4"},
{{255, 185, 15, 0}, "DarkGoldenrod1"},
{{238, 173, 14, 0}, "DarkGoldenrod2"},
{{205, 149, 12, 0}, "DarkGoldenrod3"},
{{139, 101, 8, 0}, "DarkGoldenrod4"},
{{255, 193, 193, 0}, "RosyBrown1"},
{{238, 180, 180, 0}, "RosyBrown2"},
{{205, 155, 155, 0}, "RosyBrown3"},
{{139, 105, 105, 0}, "RosyBrown4"},
{{255, 106, 106, 0}, "IndianRed1"},
{{238, 99, 99, 0}, "IndianRed2"},
{{205, 85, 85, 0}, "IndianRed3"},
{{139, 58, 58, 0}, "IndianRed4"},
{{255, 130, 71, 0}, "sienna1"},
{{238, 121, 66, 0}, "sienna2"},
{{205, 104, 57, 0}, "sienna3"},
{{139, 71, 38, 0}, "sienna4"},
{{255, 211, 155, 0}, "burlywood1"},
{{238, 197, 145, 0}, "burlywood2"},
{{205, 170, 125, 0}, "burlywood3"},
{{139, 115, 85, 0}, "burlywood4"},
{{255, 231, 186, 0}, "wheat1"},
{{238, 216, 174, 0}, "wheat2"},
{{205, 186, 150, 0}, "wheat3"},
{{139, 126, 102, 0}, "wheat4"},
{{255, 165, 79, 0}, "tan1"},
{{238, 154, 73, 0}, "tan2"},
{{205, 133, 63, 0}, "tan3"},
{{139, 90, 43, 0}, "tan4"},
{{255, 127, 36, 0}, "chocolate1"},
{{238, 118, 33, 0}, "chocolate2"},
{{205, 102, 29, 0}, "chocolate3"},
{{139, 69, 19, 0}, "chocolate4"},
{{255, 48, 48, 0}, "firebrick1"},
{{238, 44, 44, 0}, "firebrick2"},
{{205, 38, 38, 0}, "firebrick3"},
{{139, 26, 26, 0}, "firebrick4"},
{{255, 64, 64, 0}, "brown1"},
{{238, 59, 59, 0}, "brown2"},
{{205, 51, 51, 0}, "brown3"},
{{139, 35, 35, 0}, "brown4"},
{{255, 140, 105, 0}, "salmon1"},
{{238, 130, 98, 0}, "salmon2"},
{{205, 112, 84, 0}, "salmon3"},
{{139, 76, 57, 0}, "salmon4"},
{{255, 160, 122, 0}, "LightSalmon1"},
{{238, 149, 114, 0}, "LightSalmon2"},
{{205, 129, 98, 0}, "LightSalmon3"},
{{139, 87, 66, 0}, "LightSalmon4"},
{{255, 165, 0, 0}, "orange1"},
{{238, 154, 0, 0}, "orange2"},
{{205, 133, 0, 0}, "orange3"},
{{139, 90, 0, 0}, "orange4"},
{{255, 127, 0, 0}, "DarkOrange1"},
{{238, 118, 0, 0}, "DarkOrange2"},
{{205, 102, 0, 0}, "DarkOrange3"},
{{139, 69, 0, 0}, "DarkOrange4"},
{{255, 114, 86, 0}, "coral1"},
{{238, 106, 80, 0}, "coral2"},
{{205, 91, 69, 0}, "coral3"},
{{139, 62, 47, 0}, "coral4"},
{{255, 99, 71, 0}, "tomato1"},
{{238, 92, 66, 0}, "tomato2"},
{{205, 79, 57, 0}, "tomato3"},
{{139, 54, 38, 0}, "tomato4"},
{{255, 69, 0, 0}, "OrangeRed1"},
{{238, 64, 0, 0}, "OrangeRed2"},
{{205, 55, 0, 0}, "OrangeRed3"},
{{139, 37, 0, 0}, "OrangeRed4"},
{{255, 0, 0, 0}, "red1"},
{{238, 0, 0, 0}, "red2"},
{{205, 0, 0, 0}, "red3"},
{{139, 0, 0, 0}, "red4"},
{{255, 20, 147, 0}, "DeepPink1"},
{{238, 18, 137, 0}, "DeepPink2"},
{{205, 16, 118, 0}, "DeepPink3"},
{{139, 10, 80, 0}, "DeepPink4"},
{{255, 110, 180, 0}, "HotPink1"},
{{238, 106, 167, 0}, "HotPink2"},
{{205, 96, 144, 0}, "HotPink3"},
{{139, 58, 98, 0}, "HotPink4"},
{{255, 181, 197, 0}, "pink1"},
{{238, 169, 184, 0}, "pink2"},
{{205, 145, 158, 0}, "pink3"},
{{139, 99, 108, 0}, "pink4"},
{{255, 174, 185, 0}, "LightPink1"},
{{238, 162, 173, 0}, "LightPink2"},
{{205, 140, 149, 0}, "LightPink3"},
{{139, 95, 101, 0}, "LightPink4"},
{{255, 130, 171, 0}, "PaleVioletRed1"},
{{238, 121, 159, 0}, "PaleVioletRed2"},
{{205, 104, 137, 0}, "PaleVioletRed3"},
{{139, 71, 93, 0}, "PaleVioletRed4"},
{{255, 52, 179, 0}, "maroon1"},
{{238, 48, 167, 0}, "maroon2"},
{{205, 41, 144, 0}, "maroon3"},
{{139, 28, 98, 0}, "maroon4"},
{{255, 62, 150, 0}, "VioletRed1"},
{{238, 58, 140, 0}, "VioletRed2"},
{{205, 50, 120, 0}, "VioletRed3"},
{{139, 34, 82, 0}, "VioletRed4"},
{{255, 0, 255, 0}, "magenta1"},
{{238, 0, 238, 0}, "magenta2"},
{{205, 0, 205, 0}, "magenta3"},
{{139, 0, 139, 0}, "magenta4"},
{{255, 131, 250, 0}, "orchid1"},
{{238, 122, 233, 0}, "orchid2"},
{{205, 105, 201, 0}, "orchid3"},
{{139, 71, 137, 0}, "orchid4"},
{{255, 187, 255, 0}, "plum1"},
{{238, 174, 238, 0}, "plum2"},
{{205, 150, 205, 0}, "plum3"},
{{139, 102, 139, 0}, "plum4"},
{{224, 102, 255, 0}, "MediumOrchid1"},
{{209, 95, 238, 0}, "MediumOrchid2"},
{{180, 82, 205, 0}, "MediumOrchid3"},
{{122, 55, 139, 0}, "MediumOrchid4"},
{{191, 62, 255, 0}, "DarkOrchid1"},
{{178, 58, 238, 0}, "DarkOrchid2"},
{{154, 50, 205, 0}, "DarkOrchid3"},
{{104, 34, 139, 0}, "DarkOrchid4"},
{{155, 48, 255, 0}, "purple1"},
{{145, 44, 238, 0}, "purple2"},
{{125, 38, 205, 0}, "purple3"},
{{ 85, 26, 139, 0}, "purple4"},
{{171, 130, 255, 0}, "MediumPurple1"},
{{159, 121, 238, 0}, "MediumPurple2"},
{{137, 104, 205, 0}, "MediumPurple3"},
{{ 93, 71, 139, 0}, "MediumPurple4"},
{{255, 225, 255, 0}, "thistle1"},
{{238, 210, 238, 0}, "thistle2"},
{{205, 181, 205, 0}, "thistle3"},
{{139, 123, 139, 0}, "thistle4"},
{{ 0, 0, 0, 0}, "gray0"},
{{ 0, 0, 0, 0}, "grey0"},
{{ 3, 3, 3, 0}, "gray1"},
{{ 3, 3, 3, 0}, "grey1"},
{{ 5, 5, 5, 0}, "gray2"},
{{ 5, 5, 5, 0}, "grey2"},
{{ 8, 8, 8, 0}, "gray3"},
{{ 8, 8, 8, 0}, "grey3"},
{{ 10, 10, 10, 0}, "gray4"},
{{ 10, 10, 10, 0}, "grey4"},
{{ 13, 13, 13, 0}, "gray5"},
{{ 13, 13, 13, 0}, "grey5"},
{{ 15, 15, 15, 0}, "gray6"},
{{ 15, 15, 15, 0}, "grey6"},
{{ 18, 18, 18, 0}, "gray7"},
{{ 18, 18, 18, 0}, "grey7"},
{{ 20, 20, 20, 0}, "gray8"},
{{ 20, 20, 20, 0}, "grey8"},
{{ 23, 23, 23, 0}, "gray9"},
{{ 23, 23, 23, 0}, "grey9"},
{{ 26, 26, 26, 0}, "gray10"},
{{ 26, 26, 26, 0}, "grey10"},
{{ 28, 28, 28, 0}, "gray11"},
{{ 28, 28, 28, 0}, "grey11"},
{{ 31, 31, 31, 0}, "gray12"},
{{ 31, 31, 31, 0}, "grey12"},
{{ 33, 33, 33, 0}, "gray13"},
{{ 33, 33, 33, 0}, "grey13"},
{{ 36, 36, 36, 0}, "gray14"},
{{ 36, 36, 36, 0}, "grey14"},
{{ 38, 38, 38, 0}, "gray15"},
{{ 38, 38, 38, 0}, "grey15"},
{{ 41, 41, 41, 0}, "gray16"},
{{ 41, 41, 41, 0}, "grey16"},
{{ 43, 43, 43, 0}, "gray17"},
{{ 43, 43, 43, 0}, "grey17"},
{{ 46, 46, 46, 0}, "gray18"},
{{ 46, 46, 46, 0}, "grey18"},
{{ 48, 48, 48, 0}, "gray19"},
{{ 48, 48, 48, 0}, "grey19"},
{{ 51, 51, 51, 0}, "gray20"},
{{ 51, 51, 51, 0}, "grey20"},
{{ 54, 54, 54, 0}, "gray21"},
{{ 54, 54, 54, 0}, "grey21"},
{{ 56, 56, 56, 0}, "gray22"},
{{ 56, 56, 56, 0}, "grey22"},
{{ 59, 59, 59, 0}, "gray23"},
{{ 59, 59, 59, 0}, "grey23"},
{{ 61, 61, 61, 0}, "gray24"},
{{ 61, 61, 61, 0}, "grey24"},
{{ 64, 64, 64, 0}, "gray25"},
{{ 64, 64, 64, 0}, "grey25"},
{{ 66, 66, 66, 0}, "gray26"},
{{ 66, 66, 66, 0}, "grey26"},
{{ 69, 69, 69, 0}, "gray27"},
{{ 69, 69, 69, 0}, "grey27"},
{{ 71, 71, 71, 0}, "gray28"},
{{ 71, 71, 71, 0}, "grey28"},
{{ 74, 74, 74, 0}, "gray29"},
{{ 74, 74, 74, 0}, "grey29"},
{{ 77, 77, 77, 0}, "gray30"},
{{ 77, 77, 77, 0}, "grey30"},
{{ 79, 79, 79, 0}, "gray31"},
{{ 79, 79, 79, 0}, "grey31"},
{{ 82, 82, 82, 0}, "gray32"},
{{ 82, 82, 82, 0}, "grey32"},
{{ 84, 84, 84, 0}, "gray33"},
{{ 84, 84, 84, 0}, "grey33"},
{{ 87, 87, 87, 0}, "gray34"},
{{ 87, 87, 87, 0}, "grey34"},
{{ 89, 89, 89, 0}, "gray35"},
{{ 89, 89, 89, 0}, "grey35"},
{{ 92, 92, 92, 0}, "gray36"},
{{ 92, 92, 92, 0}, "grey36"},
{{ 94, 94, 94, 0}, "gray37"},
{{ 94, 94, 94, 0}, "grey37"},
{{ 97, 97, 97, 0}, "gray38"},
{{ 97, 97, 97, 0}, "grey38"},
{{ 99, 99, 99, 0}, "gray39"},
{{ 99, 99, 99, 0}, "grey39"},
{{102, 102, 102, 0}, "gray40"},
{{102, 102, 102, 0}, "grey40"},
{{105, 105, 105, 0}, "gray41"},
{{105, 105, 105, 0}, "grey41"},
{{107, 107, 107, 0}, "gray42"},
{{107, 107, 107, 0}, "grey42"},
{{110, 110, 110, 0}, "gray43"},
{{110, 110, 110, 0}, "grey43"},
{{112, 112, 112, 0}, "gray44"},
{{112, 112, 112, 0}, "grey44"},
{{115, 115, 115, 0}, "gray45"},
{{115, 115, 115, 0}, "grey45"},
{{117, 117, 117, 0}, "gray46"},
{{117, 117, 117, 0}, "grey46"},
{{120, 120, 120, 0}, "gray47"},
{{120, 120, 120, 0}, "grey47"},
{{122, 122, 122, 0}, "gray48"},
{{122, 122, 122, 0}, "grey48"},
{{125, 125, 125, 0}, "gray49"},
{{125, 125, 125, 0}, "grey49"},
{{127, 127, 127, 0}, "gray50"},
{{127, 127, 127, 0}, "grey50"},
{{130, 130, 130, 0}, "gray51"},
{{130, 130, 130, 0}, "grey51"},
{{133, 133, 133, 0}, "gray52"},
{{133, 133, 133, 0}, "grey52"},
{{135, 135, 135, 0}, "gray53"},
{{135, 135, 135, 0}, "grey53"},
{{138, 138, 138, 0}, "gray54"},
{{138, 138, 138, 0}, "grey54"},
{{140, 140, 140, 0}, "gray55"},
{{140, 140, 140, 0}, "grey55"},
{{143, 143, 143, 0}, "gray56"},
{{143, 143, 143, 0}, "grey56"},
{{145, 145, 145, 0}, "gray57"},
{{145, 145, 145, 0}, "grey57"},
{{148, 148, 148, 0}, "gray58"},
{{148, 148, 148, 0}, "grey58"},
{{150, 150, 150, 0}, "gray59"},
{{150, 150, 150, 0}, "grey59"},
{{153, 153, 153, 0}, "gray60"},
{{153, 153, 153, 0}, "grey60"},
{{156, 156, 156, 0}, "gray61"},
{{156, 156, 156, 0}, "grey61"},
{{158, 158, 158, 0}, "gray62"},
{{158, 158, 158, 0}, "grey62"},
{{161, 161, 161, 0}, "gray63"},
{{161, 161, 161, 0}, "grey63"},
{{163, 163, 163, 0}, "gray64"},
{{163, 163, 163, 0}, "grey64"},
{{166, 166, 166, 0}, "gray65"},
{{166, 166, 166, 0}, "grey65"},
{{168, 168, 168, 0}, "gray66"},
{{168, 168, 168, 0}, "grey66"},
{{171, 171, 171, 0}, "gray67"},
{{171, 171, 171, 0}, "grey67"},
{{173, 173, 173, 0}, "gray68"},
{{173, 173, 173, 0}, "grey68"},
{{176, 176, 176, 0}, "gray69"},
{{176, 176, 176, 0}, "grey69"},
{{179, 179, 179, 0}, "gray70"},
{{179, 179, 179, 0}, "grey70"},
{{181, 181, 181, 0}, "gray71"},
{{181, 181, 181, 0}, "grey71"},
{{184, 184, 184, 0}, "gray72"},
{{184, 184, 184, 0}, "grey72"},
{{186, 186, 186, 0}, "gray73"},
{{186, 186, 186, 0}, "grey73"},
{{189, 189, 189, 0}, "gray74"},
{{189, 189, 189, 0}, "grey74"},
{{191, 191, 191, 0}, "gray75"},
{{191, 191, 191, 0}, "grey75"},
{{194, 194, 194, 0}, "gray76"},
{{194, 194, 194, 0}, "grey76"},
{{196, 196, 196, 0}, "gray77"},
{{196, 196, 196, 0}, "grey77"},
{{199, 199, 199, 0}, "gray78"},
{{199, 199, 199, 0}, "grey78"},
{{201, 201, 201, 0}, "gray79"},
{{201, 201, 201, 0}, "grey79"},
{{204, 204, 204, 0}, "gray80"},
{{204, 204, 204, 0}, "grey80"},
{{207, 207, 207, 0}, "gray81"},
{{207, 207, 207, 0}, "grey81"},
{{209, 209, 209, 0}, "gray82"},
{{209, 209, 209, 0}, "grey82"},
{{212, 212, 212, 0}, "gray83"},
{{212, 212, 212, 0}, "grey83"},
{{214, 214, 214, 0}, "gray84"},
{{214, 214, 214, 0}, "grey84"},
{{217, 217, 217, 0}, "gray85"},
{{217, 217, 217, 0}, "grey85"},
{{219, 219, 219, 0}, "gray86"},
{{219, 219, 219, 0}, "grey86"},
{{222, 222, 222, 0}, "gray87"},
{{222, 222, 222, 0}, "grey87"},
{{224, 224, 224, 0}, "gray88"},
{{224, 224, 224, 0}, "grey88"},
{{227, 227, 227, 0}, "gray89"},
{{227, 227, 227, 0}, "grey89"},
{{229, 229, 229, 0}, "gray90"},
{{229, 229, 229, 0}, "grey90"},
{{232, 232, 232, 0}, "gray91"},
{{232, 232, 232, 0}, "grey91"},
{{235, 235, 235, 0}, "gray92"},
{{235, 235, 235, 0}, "grey92"},
{{237, 237, 237, 0}, "gray93"},
{{237, 237, 237, 0}, "grey93"},
{{240, 240, 240, 0}, "gray94"},
{{240, 240, 240, 0}, "grey94"},
{{242, 242, 242, 0}, "gray95"},
{{242, 242, 242, 0}, "grey95"},
{{245, 245, 245, 0}, "gray96"},
{{245, 245, 245, 0}, "grey96"},
{{247, 247, 247, 0}, "gray97"},
{{247, 247, 247, 0}, "grey97"},
{{250, 250, 250, 0}, "gray98"},
{{250, 250, 250, 0}, "grey98"},
{{252, 252, 252, 0}, "gray99"},
{{252, 252, 252, 0}, "grey99"},
{{255, 255, 255, 0}, "gray100"},
{{255, 255, 255, 0}, "grey100"},
{{169, 169, 169, 0}, "dark"},
{{169, 169, 169, 0}, "DarkGrey"},
{{169, 169, 169, 0}, "dark"},
{{169, 169, 169, 0}, "DarkGray"},
{{ 0, 0, 139, 0}, "dark"},
{{ 0, 0, 139, 0}, "DarkBlue"},
{{ 0, 139, 139, 0}, "dark"},
{{ 0, 139, 139, 0}, "DarkCyan"},
{{139, 0, 139, 0}, "dark"},
{{139, 0, 139, 0}, "DarkMagenta"},
{{139, 0, 0, 0}, "dark"},
{{139, 0, 0, 0}, "DarkRed"},
{{144, 238, 144, 0}, "light"},
{{144, 238, 144, 0}, "LightGreen"},
{{ 0, 0, 0, 0}, NULL}
};
#endif

View File

@@ -1,5 +1,4 @@
#include <stdlib.h>
#include <X11/Xatom.h>
@@ -8,67 +7,70 @@
#define MAX_PROPERTY_SIZE 8*1024
char *WMSelectionOwnerDidChangeNotification = "WMSelectionOwnerDidChange";
typedef struct SelectionHandler {
WMWidget *widget;
WMView *view;
Atom selection;
Time timestamp;
WMConvertSelectionProc *convProc;
WMLoseSelectionProc *loseProc;
WMSelectionDoneProc *doneProc;
WMSelectionProcs procs;
void *data;
struct {
unsigned delete_pending:1;
unsigned done_pending:1;
} flags;
struct SelectionHandler *next;
} SelectionHandler;
static SelectionHandler *selHandlers = NULL;
void
WMDeleteSelectionHandler(WMWidget *widget, Atom selection)
{
SelectionHandler *handler, *tmp;
Display *dpy = WMWidgetScreen(widget)->display;
Window win = WMWidgetXID(widget);
typedef struct SelectionCallback {
WMView *view;
Atom selection;
Atom target;
Time timestamp;
WMSelectionCallback *callback;
void *data;
struct {
unsigned delete_pending:1;
unsigned done_pending:1;
} flags;
} SelectionCallback;
static WMArray *selCallbacks = NULL;
static WMArray *selHandlers = NULL;
static Bool gotXError = False;
void WMDeleteSelectionHandler(WMView * view, Atom selection, Time timestamp)
{
SelectionHandler *handler;
Display *dpy = W_VIEW_SCREEN(view)->display;
Window win = W_VIEW_DRAWABLE(view);
WMArrayIterator iter;
if (!selHandlers)
return;
tmp = selHandlers;
/*//printf("deleting selection handler for %d", win); */
if (tmp->widget == widget) {
WM_ITERATE_ARRAY(selHandlers, handler, iter) {
if (handler->view == view && (handler->selection == selection || selection == None)
&& (handler->timestamp == timestamp || timestamp == CurrentTime)) {
if (tmp->flags.done_pending) {
tmp->flags.delete_pending = 1;
if (handler->flags.done_pending) {
handler->flags.delete_pending = 1;
/*//puts(": postponed because still pending"); */
return;
}
selHandlers = tmp->next;
timestamp = tmp->timestamp;
wfree(tmp);
} else {
while (tmp->next) {
if (tmp->next->widget == widget) {
if (tmp->next->flags.done_pending) {
tmp->next->flags.delete_pending = 1;
return;
}
handler = tmp->next;
tmp->next = handler->next;
timestamp = handler->timestamp;
wfree(handler);
/*//printf(": found & removed"); */
WMRemoveFromArray(selHandlers, handler);
break;
}
tmp = tmp->next;
}
}
/*//printf("\n"); */
XGrabServer(dpy);
if (XGetSelectionOwner(dpy, selection) == win) {
XSetSelectionOwner(dpy, selection, None, timestamp);
@@ -76,48 +78,68 @@ WMDeleteSelectionHandler(WMWidget *widget, Atom selection)
XUngrabServer(dpy);
}
static Bool gotError = 0;
/*
static int
errorHandler(XErrorEvent *error)
void WMDeleteSelectionCallback(WMView * view, Atom selection, Time timestamp)
{
return 0;
SelectionCallback *handler;
WMArrayIterator iter;
if (!selCallbacks)
return;
WM_ITERATE_ARRAY(selCallbacks, handler, iter) {
if (handler->view == view && (handler->selection == selection || selection == None)
&& (handler->timestamp == timestamp || timestamp == CurrentTime)) {
if (handler->flags.done_pending) {
handler->flags.delete_pending = 1;
return;
}
WMRemoveFromArray(selCallbacks, handler);
break;
}
}
}
*/
static Bool
writeSelection(Display *dpy, Window requestor, Atom property, Atom type,
void *value, long length, int format)
static int handleXError(Display * dpy, XErrorEvent * ev)
{
/*
printf("write to %x: %s\n", requestor, XGetAtomName(dpy, property));
*/
gotError = False;
gotXError = True;
#ifndef __sgi
if (!XChangeProperty(dpy, requestor, property, type, format,
PropModeReplace, value, length))
return False;
#else
/* in sgi seems this seems to return void */
XChangeProperty(dpy, requestor, property, type, format,
PropModeReplace, value, length);
#endif
return 1;
}
static Bool writeSelection(Display * dpy, Window requestor, Atom property, Atom type, WMData * data)
{
static void *oldHandler;
int format, bpi;
format = WMGetDataFormat(data);
if (format == 0)
format = 8;
bpi = format / 8;
/* printf("write to %x: %s\n", requestor, XGetAtomName(dpy, property)); */
oldHandler = XSetErrorHandler(handleXError);
gotXError = False;
XChangeProperty(dpy, requestor, property, type, format, PropModeReplace,
WMDataBytes(data), WMGetDataLength(data) / bpi);
XFlush(dpy);
return !gotError;
XSetErrorHandler(oldHandler);
return !gotXError;
}
static void
notifySelection(XEvent *event, Atom prop)
static void notifySelection(XEvent * event, Atom prop)
{
XEvent ev;
/*
printf("envent to %x\n", event->xselectionrequest.requestor);
*/
/* printf("event to %x\n", event->xselectionrequest.requestor); */
ev.xselection.type = SelectionNotify;
ev.xselection.serial = 0;
ev.xselection.send_event = True;
@@ -128,295 +150,240 @@ notifySelection(XEvent *event, Atom prop)
ev.xselection.property = prop;
ev.xselection.time = event->xselectionrequest.time;
XSendEvent(event->xany.display, event->xselectionrequest.requestor,
False, 0, &ev);
XSendEvent(event->xany.display, event->xselectionrequest.requestor, False, 0, &ev);
XFlush(event->xany.display);
}
void
W_HandleSelectionEvent(XEvent *event)
static void handleRequestEvent(XEvent * event)
{
SelectionHandler *handler;
WMArrayIterator iter;
WMArray *copy;
Bool handledRequest;
handler = selHandlers;
while (handler) {
if (WMWidgetXID(handler->widget)==event->xany.window
/* && handler->selection == event->selection*/) {
WM_ITERATE_ARRAY(selHandlers, handler, iter) {
switch (event->type) {
case SelectionClear:
if (handler->loseProc)
(*handler->loseProc)(handler->widget, handler->selection);
break;
case SelectionRequest:
if (handler->convProc) {
Atom atom;
void *data;
unsigned length;
int format;
Atom prop;
/* they're requesting for something old */
if (event->xselectionrequest.time < handler->timestamp
&& event->xselectionrequest.time != CurrentTime) {
notifySelection(event, None);
if (W_VIEW_DRAWABLE(handler->view)
!= event->xselectionclear.window) {
break;
}
handler->flags.done_pending = 1;
if (handler->procs.selectionLost)
handler->procs.selectionLost(handler->view, handler->selection, handler->data);
handler->flags.done_pending = 0;
handler->flags.delete_pending = 1;
break;
if (!(*handler->convProc)(handler->widget,
handler->selection,
event->xselectionrequest.target,
&atom, &data, &length, &format)) {
notifySelection(event, None);
case SelectionRequest:
if (W_VIEW_DRAWABLE(handler->view) != event->xselectionrequest.owner) {
break;
}
if (handler->procs.convertSelection != NULL
&& handler->selection == event->xselectionrequest.selection) {
Atom atom;
WMData *data;
Atom prop;
/* they're requesting for something old.. maybe another handler
* can handle it */
if (event->xselectionrequest.time < handler->timestamp
&& event->xselectionrequest.time != CurrentTime) {
break;
}
handledRequest = False;
handler->flags.done_pending = 1;
data = handler->procs.convertSelection(handler->view,
handler->selection,
event->xselectionrequest.target,
handler->data, &atom);
prop = event->xselectionrequest.property;
/* obsolete clients that don't set the property field */
if (prop == None)
prop = event->xselectionrequest.target;
if (!writeSelection(event->xselectionrequest.display,
event->xselectionrequest.requestor,
prop, atom, data, length, format)) {
wfree(data);
notifySelection(event, None);
break;
if (data) {
if (writeSelection(event->xselectionrequest.display,
event->xselectionrequest.requestor, prop, atom, data)) {
handledRequest = True;
}
WMReleaseData(data);
}
wfree(data);
notifySelection(event, prop);
notifySelection(event, (handledRequest == True ? prop : None));
if (handler->doneProc) {
(*handler->doneProc)(handler->widget,
if (handler->procs.selectionDone != NULL) {
handler->procs.selectionDone(handler->view,
handler->selection,
event->xselectionrequest.target);
event->xselectionrequest.target,
handler->data);
}
handler->flags.done_pending = 0;
/* in case the handler was deleted from some
* callback */
if (handler->flags.delete_pending) {
WMDeleteSelectionHandler(handler->widget,
handler->selection);
}
}
break;
case SelectionNotify:
break;
}
}
handler = handler->next;
/* delete handlers */
copy = WMDuplicateArray(selHandlers);
WM_ITERATE_ARRAY(copy, handler, iter) {
if (handler && handler->flags.delete_pending) {
WMDeleteSelectionHandler(handler->view, handler->selection, handler->timestamp);
}
}
WMFreeArray(copy);
}
Bool
WMCreateSelectionHandler(WMWidget *w, Atom selection, Time timestamp,
WMConvertSelectionProc *convProc,
WMLoseSelectionProc *loseProc,
WMSelectionDoneProc *doneProc)
static WMData *getSelectionData(Display * dpy, Window win, Atom where)
{
SelectionHandler *handler, *tmp;
Display *dpy = WMWidgetScreen(w)->display;
WMData *wdata;
unsigned char *data;
Atom rtype;
int bits, bpi;
unsigned long len, bytes;
XSetSelectionOwner(dpy, selection, WMWidgetXID(w), timestamp);
if (XGetSelectionOwner(dpy, selection) != WMWidgetXID(w))
if (XGetWindowProperty(dpy, win, where, 0, MAX_PROPERTY_SIZE,
False, AnyPropertyType, &rtype, &bits, &len, &bytes, &data) != Success) {
return NULL;
}
bpi = bits / 8;
wdata = WMCreateDataWithBytesNoCopy(data, len * bpi, (WMFreeDataProc *) XFree);
WMSetDataFormat(wdata, bits);
return wdata;
}
static void handleNotifyEvent(XEvent * event)
{
SelectionCallback *handler;
WMArrayIterator iter;
WMArray *copy;
WMData *data;
WM_ITERATE_ARRAY(selCallbacks, handler, iter) {
if (W_VIEW_DRAWABLE(handler->view) != event->xselection.requestor
|| handler->selection != event->xselection.selection) {
continue;
}
handler->flags.done_pending = 1;
if (event->xselection.property == None) {
data = NULL;
} else {
data = getSelectionData(event->xselection.display,
event->xselection.requestor, event->xselection.property);
}
(*handler->callback) (handler->view, handler->selection,
handler->target, handler->timestamp, handler->data, data);
if (data != NULL) {
WMReleaseData(data);
}
handler->flags.done_pending = 0;
handler->flags.delete_pending = 1;
}
/* delete callbacks */
copy = WMDuplicateArray(selCallbacks);
WM_ITERATE_ARRAY(copy, handler, iter) {
if (handler && handler->flags.delete_pending) {
WMDeleteSelectionCallback(handler->view, handler->selection, handler->timestamp);
}
}
WMFreeArray(copy);
}
void W_HandleSelectionEvent(XEvent * event)
{
/*//printf("%d received selection ", event->xany.window); */
/*//switch(event->type) {
case SelectionNotify:
puts("notify"); break;
case SelectionRequest:
puts("request"); break;
case SelectionClear:
puts("clear"); break;
default:
puts("unknown"); break;
} */
if (event->type == SelectionNotify) {
handleNotifyEvent(event);
} else {
handleRequestEvent(event);
}
}
Bool WMCreateSelectionHandler(WMView * view, Atom selection, Time timestamp, WMSelectionProcs * procs, void *cdata)
{
SelectionHandler *handler;
Display *dpy = W_VIEW_SCREEN(view)->display;
XSetSelectionOwner(dpy, selection, W_VIEW_DRAWABLE(view), timestamp);
if (XGetSelectionOwner(dpy, selection) != W_VIEW_DRAWABLE(view)) {
return False;
}
handler = malloc(sizeof(SelectionHandler));
if (!handler)
return False;
WMPostNotificationName(WMSelectionOwnerDidChangeNotification, (void *)selection, (void *)view);
handler->widget = w;
/*//printf("created selection handler for %d\n", W_VIEW_DRAWABLE(view)); */
handler = wmalloc(sizeof(SelectionHandler));
handler->view = view;
handler->selection = selection;
handler->timestamp = timestamp;
handler->convProc = convProc;
handler->loseProc = loseProc;
handler->doneProc = doneProc;
handler->procs = *procs;
handler->data = cdata;
memset(&handler->flags, 0, sizeof(handler->flags));
if (!selHandlers) {
/* first in the queue */
handler->next = selHandlers;
selHandlers = handler;
} else {
tmp = selHandlers;
while (tmp->next) {
tmp = tmp->next;
}
handler->next = tmp->next;
tmp->next = handler;
if (selHandlers == NULL) {
selHandlers = WMCreateArrayWithDestructor(4, wfree);
}
WMAddToArray(selHandlers, handler);
return True;
}
static void
timeoutHandler(void *data)
Bool
WMRequestSelection(WMView * view, Atom selection, Atom target, Time timestamp,
WMSelectionCallback * callback, void *cdata)
{
*(int*)data = 1;
}
SelectionCallback *handler;
static Bool
getInternalSelection(WMScreen *scr, Atom selection, Atom target,
void **data, unsigned *length)
{
Window owner;
SelectionHandler *handler;
/*
* Check if the selection is owned by this application and if so,
* do the conversion directly.
*/
*data = NULL;
owner = XGetSelectionOwner(scr->display, selection);
if (!owner)
if (XGetSelectionOwner(W_VIEW_SCREEN(view)->display, selection) == None)
return False;
handler = selHandlers;
while (handler) {
if (WMWidgetXID(handler->widget) == owner
/* && handler->selection == event->selection*/) {
break;
}
handler = handler->next;
}
if (!handler)
if (!XConvertSelection(W_VIEW_SCREEN(view)->display, selection, target,
W_VIEW_SCREEN(view)->clipboardAtom, W_VIEW_DRAWABLE(view), timestamp)) {
return False;
if (handler->convProc) {
Atom atom;
int format;
if (!(*handler->convProc)(handler->widget, handler->selection,
target, &atom, data, length, &format)) {
return True;
}
if (handler->doneProc) {
(*handler->doneProc)(handler->widget, handler->selection, target);
}
handler = wmalloc(sizeof(SelectionCallback));
handler->view = view;
handler->selection = selection;
handler->target = target;
handler->timestamp = timestamp;
handler->callback = callback;
handler->data = cdata;
if (selCallbacks == NULL) {
selCallbacks = WMCreateArrayWithDestructor(4, wfree);
}
WMAddToArray(selCallbacks, handler);
return True;
}
char*
W_GetTextSelection(WMScreen *scr, Atom selection)
{
int buffer = -1;
switch (selection) {
case XA_CUT_BUFFER0:
buffer = 0;
break;
case XA_CUT_BUFFER1:
buffer = 1;
break;
case XA_CUT_BUFFER2:
buffer = 2;
break;
case XA_CUT_BUFFER3:
buffer = 3;
break;
case XA_CUT_BUFFER4:
buffer = 4;
break;
case XA_CUT_BUFFER5:
buffer = 5;
break;
case XA_CUT_BUFFER6:
buffer = 6;
break;
case XA_CUT_BUFFER7:
buffer = 7;
break;
}
if (buffer >= 0) {
char *data;
int size;
data = XFetchBuffer(scr->display, &size, buffer);
return data;
} else {
char *data;
int bits;
Atom rtype;
unsigned long len, bytes;
WMHandlerID timer;
int timeout = 0;
XEvent ev;
unsigned length;
XDeleteProperty(scr->display, scr->groupLeader, scr->clipboardAtom);
if (getInternalSelection(scr, selection, XA_STRING, (void**)&data,
&length)) {
return data;
}
XConvertSelection(scr->display, selection, XA_STRING,
scr->clipboardAtom, scr->groupLeader,
scr->lastEventTime);
timer = WMAddTimerHandler(1000, timeoutHandler, &timeout);
while (!XCheckTypedWindowEvent(scr->display, scr->groupLeader,
SelectionNotify, &ev) && !timeout);
if (!timeout) {
WMDeleteTimerHandler(timer);
} else {
wwarning("selection retrieval timed out");
return NULL;
}
/* nobody owns the selection or the current owner has
* nothing to do with what we need */
if (ev.xselection.property == None) {
return NULL;
}
if (XGetWindowProperty(scr->display, scr->groupLeader,
scr->clipboardAtom, 0, MAX_PROPERTY_SIZE,
False, XA_STRING, &rtype, &bits, &len,
&bytes, (unsigned char**)&data)!=Success) {
return NULL;
}
if (rtype!=XA_STRING || bits!=8) {
wwarning("invalid data in text selection");
if (data)
XFree(data);
return NULL;
}
return data;
}
}

427
WINGs/string.c Normal file
View File

@@ -0,0 +1,427 @@
/*
* Until FreeBSD gets their act together;
* http://www.mail-archive.com/freebsd-hackers@freebsd.org/msg69469.html
*/
#if defined( FREEBSD )
# undef _XOPEN_SOURCE
#endif
#include "wconfig.h"
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#ifdef HAVE_BSD_STRING_H
#include <bsd/string.h>
#endif
#include "WUtil.h"
#define PRC_ALPHA 0
#define PRC_BLANK 1
#define PRC_ESCAPE 2
#define PRC_DQUOTE 3
#define PRC_EOS 4
#define PRC_SQUOTE 5
typedef struct {
short nstate;
short output;
} DFA;
static DFA mtable[9][6] = {
{{3, 1}, {0, 0}, {4, 0}, {1, 0}, {8, 0}, {6, 0}},
{{1, 1}, {1, 1}, {2, 0}, {3, 0}, {5, 0}, {1, 1}},
{{1, 1}, {1, 1}, {1, 1}, {1, 1}, {5, 0}, {1, 1}},
{{3, 1}, {5, 0}, {4, 0}, {1, 0}, {5, 0}, {6, 0}},
{{3, 1}, {3, 1}, {3, 1}, {3, 1}, {5, 0}, {3, 1}},
{{-1, -1}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}, /* final state */
{{6, 1}, {6, 1}, {7, 0}, {6, 1}, {5, 0}, {3, 0}},
{{6, 1}, {6, 1}, {6, 1}, {6, 1}, {5, 0}, {6, 1}},
{{-1, -1}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}, /* final state */
};
char *wtokennext(char *word, char **next)
{
char *ptr;
char *ret, *t;
int state, ctype;
t = ret = wmalloc(strlen(word) + 1);
ptr = word;
state = 0;
while (1) {
if (*ptr == 0)
ctype = PRC_EOS;
else if (*ptr == '\\')
ctype = PRC_ESCAPE;
else if (*ptr == '"')
ctype = PRC_DQUOTE;
else if (*ptr == '\'')
ctype = PRC_SQUOTE;
else if (*ptr == ' ' || *ptr == '\t')
ctype = PRC_BLANK;
else
ctype = PRC_ALPHA;
if (mtable[state][ctype].output) {
*t = *ptr;
t++;
*t = 0;
}
state = mtable[state][ctype].nstate;
ptr++;
if (mtable[state][0].output < 0) {
break;
}
}
if (*ret == 0)
t = NULL;
else
t = wstrdup(ret);
wfree(ret);
if (ctype == PRC_EOS)
*next = NULL;
else
*next = ptr;
return t;
}
/* separate a string in tokens, taking " and ' into account */
void wtokensplit(char *command, char ***argv, int *argc)
{
char *token, *line;
int count;
count = 0;
line = command;
do {
token = wtokennext(line, &line);
if (token) {
if (count == 0)
*argv = wmalloc(sizeof(char **));
else
*argv = wrealloc(*argv, (count + 1) * sizeof(char **));
(*argv)[count++] = token;
}
} while (token != NULL && line != NULL);
*argc = count;
}
char *wtokenjoin(char **list, int count)
{
int i, j;
char *flat_string, *wspace;
j = 0;
for (i = 0; i < count; i++) {
if (list[i] != NULL && list[i][0] != 0) {
j += strlen(list[i]);
if (strpbrk(list[i], " \t"))
j += 2;
}
}
flat_string = wmalloc(j + count + 1);
for (i = 0; i < count; i++) {
if (list[i] != NULL && list[i][0] != 0) {
if (i > 0 &&
wstrlcat(flat_string, " ", j + count + 1) >= j + count + 1)
goto error;
wspace = strpbrk(list[i], " \t");
if (wspace &&
wstrlcat(flat_string, "\"", j + count + 1) >= j + count + 1)
goto error;
if (wstrlcat(flat_string, list[i], j + count + 1) >= j + count + 1)
goto error;
if (wspace &&
wstrlcat(flat_string, "\"", j + count + 1) >= j + count + 1)
goto error;
}
}
return flat_string;
error:
wfree(flat_string);
return NULL;
}
void wtokenfree(char **tokens, int count)
{
while (count--)
wfree(tokens[count]);
wfree(tokens);
}
char *wtrimspace(const char *s)
{
char *t;
if (s == NULL)
return NULL;
while (isspace(*s) && *s)
s++;
t = (char *)s + strlen(s) - 1;
while (t > s && isspace(*t))
t--;
return wstrndup(s, t - s + 1);
}
char *wstrdup(const char *str)
{
assert(str != NULL);
return strcpy(wmalloc(strlen(str) + 1), str);
}
char *wstrndup(const 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 *wstrconcat(char *str1, char *str2)
{
char *str;
size_t slen;
if (!str1)
return wstrdup(str2);
else if (!str2)
return wstrdup(str1);
slen = strlen(str1) + strlen(str2) + 1;
str = wmalloc(slen);
if (wstrlcpy(str, str1, slen) >= slen ||
wstrlcat(str, str2, slen) >= slen) {
wfree(str);
return NULL;
}
return str;
}
char *wstrappend(char *dst, char *src)
{
size_t slen;
if (!dst)
return wstrdup(src);
else if (!src || *src == 0)
return dst;
slen = strlen(dst) + strlen(src) + 1;
dst = wrealloc(dst, slen);
if (wstrlcat(dst, src, slen) >= slen)
return NULL;
return dst;
}
#if HAVE_STRLCAT
size_t
wstrlcat(char *dst, const char *src, size_t siz)
{
return strlcat(dst, src, siz);
}
#else
/* $OpenBSD: strlcat.c,v 1.13 2005/08/08 08:05:37 espie Exp $ */
/*
* Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/*
* Appends src to string dst of size siz (unlike strncat, siz is the
* full size of dst, not space left). At most siz-1 characters
* will be copied. Always NUL terminates (unless siz <= strlen(dst)).
* Returns strlen(src) + MIN(siz, strlen(initial dst)).
* If retval >= siz, truncation occurred.
*/
size_t
wstrlcat(char *dst, const char *src, size_t siz)
{
char *d = dst;
const char *s = src;
size_t n = siz;
size_t dlen;
/* Find the end of dst and adjust bytes left but don't go past end */
while (n-- != 0 && *d != '\0')
d++;
dlen = d - dst;
n = siz - dlen;
if (n == 0)
return(dlen + strlen(s));
while (*s != '\0') {
if (n != 1) {
*d++ = *s;
n--;
}
s++;
}
*d = '\0';
return(dlen + (s - src)); /* count does not include NUL */
}
#endif /* HAVE_STRLCAT */
#if HAVE_STRLCPY
size_t
wstrlcpy(char *dst, const char *src, size_t siz)
{
return strlcpy(dst, src, siz);
}
#else
/* $OpenBSD: strlcpy.c,v 1.11 2006/05/05 15:27:38 millert Exp $ */
/*
* Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/*
* Copy src to string dst of size siz. At most siz-1 characters
* will be copied. Always NUL terminates (unless siz == 0).
* Returns strlen(src); if retval >= siz, truncation occurred.
*/
size_t
wstrlcpy(char *dst, const char *src, size_t siz)
{
char *d = dst;
const char *s = src;
size_t n = siz;
/* Copy as many bytes as will fit */
if (n != 0) {
while (--n != 0) {
if ((*d++ = *s++) == '\0')
break;
}
}
/* Not enough room in dst, add NUL and traverse rest of src */
if (n == 0) {
if (siz != 0)
*d = '\0'; /* NUL-terminate dst */
while (*s++)
;
}
return(s - src - 1); /* count does not include NUL */
}
#endif /* HAVE_STRLCPY */
/* transform `s' so that the result is safe to pass to the shell as an argument.
* returns a newly allocated string.
* with very heavy inspirations from NetBSD's shquote(3).
*/
char *wshellquote(const char *s)
{
char *p, *r, *last, *ret;
size_t slen;
int needs_quoting;
if (!s)
return NULL;
needs_quoting = !*s; /* the empty string does need quoting */
/* do not quote if consists only of the following characters */
for (p = (char *)s; *p && !needs_quoting; p++) {
needs_quoting = !(isalnum(*p) || (*p == '+') || (*p == '/') ||
(*p == '.') || (*p == ',') || (*p == '-'));
}
if (!needs_quoting)
return wstrdup(s);
for (slen = 0, p = (char *)s; *p; p++) /* count space needed (worst case) */
slen += *p == '\'' ? 4 : 1; /* every single ' becomes ''\' */
slen += 2 /* leading + trailing "'" */ + 1 /* NULL */;
ret = r = wmalloc(slen);
p = (char *)s;
last = p;
if (*p != '\'') /* if string doesn't already begin with "'" */
*r++ ='\''; /* start putting it in quotes */
while (*p) {
last = p;
if (*p == '\'') { /* turn each ' into ''\' */
if (p != s) /* except if it's the first ', in which case */
*r++ = '\''; /* only escape it */
*r++ = '\\';
*r++ = '\'';
while (*++p && *p == '\'') { /* keep turning each consecutive 's into \' */
*r++ = '\\';
*r++ = '\'';
}
if (*p) /* if more input follows, terminate */
*r++ = '\''; /* what we have so far */
} else {
*r++ = *p++;
}
}
if (*last != '\'') /* if the last one isn't already a ' */
*r++ = '\''; /* terminate the whole shebang */
*r = '\0';
return ret; /* technically, we lose (but not leak) a couple of */
/* bytes (twice the number of consecutive 's in the */
/* input or so), but since these are relatively rare */
/* and short-lived strings, not sure if a trip to */
/* wstrdup+wfree worths the gain. */
}

Some files were not shown because too many files have changed in this diff Show More