mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-18 12:00:31 +01:00
Code update for Window Maker version 0.50.0
Read changes in ChangeLog and NEWS
This commit is contained in:
20
AUTHORS
20
AUTHORS
@@ -13,7 +13,7 @@ restart, dock bug fixes
|
||||
Andrea Arcangeli <arcangeli@mbox.queen.it>
|
||||
Fix for cascade window placement
|
||||
|
||||
Peter Bentley <peter.bentley@nomura.co.uk>
|
||||
Peter Bentley <pete@sorted.org>
|
||||
fixed WM_STATE handling bug, fixed some memory leaks, made application menus
|
||||
be mapped near the windows for non-click-to-focus modes, timer bug
|
||||
|
||||
@@ -27,6 +27,9 @@ shaded window indication in window list
|
||||
Rob Clark <rclark@turing.cs.hmc.edu>
|
||||
Text input field, 15bpp support
|
||||
|
||||
George Clernon <clernong@tinet.ie>
|
||||
bug fix in browser widget
|
||||
|
||||
Sylvain CORRE <sylvain.corre@wanadoo.fr>
|
||||
bug fix for MkLinux/PPC
|
||||
|
||||
@@ -53,8 +56,8 @@ Documentation help, autoconf cleanup
|
||||
Mark 'segfault' Guzman <root@lsd.pbx.org>
|
||||
Various bugfixes
|
||||
|
||||
Ullrich Hafner <hafner@informatik.uni-wuerzburg.de>
|
||||
Better detection of gfx libraries
|
||||
Ullrich Hafner <hafner@bigfoot.de>
|
||||
Better detection of gfx libraries, added IconTitleColor/IconTitleBack
|
||||
|
||||
Greg Hayes <sdc@choice.net>
|
||||
Twisted miniaturization animation
|
||||
@@ -111,7 +114,7 @@ Tim Malone <mrgone@eskimo.com>
|
||||
bug fix, jpeg bug fix
|
||||
|
||||
MANOME Tomonori <manome@itlb.te.noda.sut.ac.jp>
|
||||
I18N bug fixes and japanese locale
|
||||
I18N bug fixes and japanese locale, wsetfont script
|
||||
|
||||
Brian Alexander Martin <brian@goober.wireless.ucsc.edu>
|
||||
PIPE_MENU
|
||||
@@ -141,7 +144,7 @@ Initial code for clip's collapse feature.
|
||||
Ture Pelsson <ture@lysator.liu.se>
|
||||
various portability fixes, replaced busy wait with select() in event
|
||||
handling code, fixed problem with some misbehaved kids after a fork(),
|
||||
some other bug fixes
|
||||
some other bug fixes, support for poll() in event handling code
|
||||
|
||||
Toby Sargeant <?>
|
||||
menu format converter
|
||||
@@ -155,6 +158,9 @@ REDUCE_APPICON/single-icon
|
||||
Chong Shang Shan <chongsha@sps.nus.edu.sg>
|
||||
flipping iconification animation
|
||||
|
||||
Daniel Skarda <0rfelyus@atrey.karlin.mff.cuni.cz>
|
||||
SGI "black dialogs" bug fix
|
||||
|
||||
Paul D. Smith <psmith@BayNetworks.COM>
|
||||
SunOS portability, configure fixes
|
||||
|
||||
@@ -182,7 +188,9 @@ dgradient fix
|
||||
|
||||
"]d" <mhz@gpf.or.th>
|
||||
Window list menu miniaturized/hidden hints, XDE support, XKB lock
|
||||
language status
|
||||
language status, WINGs enhancements, bug fixes, window commands menu
|
||||
enhancement, window move/resize by keyboard
|
||||
|
||||
|
||||
Trae Mc Combs <x@themes.org>
|
||||
BlueWaves.jpeg background image in BlueWaves theme.
|
||||
|
||||
2
BUGS
2
BUGS
@@ -2,8 +2,6 @@
|
||||
- during startup, transient windows should be miniaturized with their owners
|
||||
not in their own icons
|
||||
- stacking code is buggy (or XFree is buggy)
|
||||
- WINGs has problems in some platforms (SGI, Sun etc.) Anyone on these
|
||||
systems want to fix it?
|
||||
- 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
|
||||
|
||||
42
ChangeLog
42
ChangeLog
@@ -1,3 +1,45 @@
|
||||
Changes since version 0.20.3:
|
||||
.............................
|
||||
|
||||
- window list is ordered by workspace
|
||||
- preliminary grid move mode
|
||||
- fixed prob with docked apps with the same name switching places (like wmmon
|
||||
and wmmon -s)
|
||||
- wrapping of workspace switching for 5button mice
|
||||
- added restart in fallback menu
|
||||
- fixed buglet in modifier error reporting
|
||||
- extra options in window command menu
|
||||
- changed select() used in wevent.c to poll()
|
||||
- fixed bug in SGI boxes (black dialogs)
|
||||
- added IconTitleBack, IconTitleColor
|
||||
- made error checking stricter
|
||||
- fixed crash when saving application supplied icons that have many colors
|
||||
- added move threshold to menus
|
||||
- added textured gradient textures
|
||||
- added -nofont flag for setstyle
|
||||
- added -p flag and theme pack support for getstyle
|
||||
- fixed crash bug when clicking on menu title opened with kbd
|
||||
- fixed bug that caused incorrect saving of icon configuration (the -name bug)
|
||||
- scale pixmap texture for workspaceback type will maintain aspect ratio
|
||||
- fixed memory leak in jpeg loader
|
||||
- started XStandardColormap support
|
||||
- added StartMaximized window flag
|
||||
- fixed bug of mixed up Unfocusable and StartMiniaturized flags
|
||||
- yet another try to switch to shared libraries
|
||||
- workspace specific background images
|
||||
- stack new windows to under focused window if autofocus is off (disabled)
|
||||
- added kde support
|
||||
- implemented the "GNOME Window Manager Compliance" stuff
|
||||
- window move/resize by keyboard
|
||||
- rewrote window attribute code to make it cleaner
|
||||
- added --enable-lite configure option
|
||||
- added support to change prompt in %a() for root menu
|
||||
- rewrote exit code
|
||||
- added KeepInsideScreen=YES; for scilab in default WMWindowAttributes
|
||||
- added an option to the Clip, to allow automatic Raise/Lower when the mouse
|
||||
cursor enter/leave the Clip.
|
||||
|
||||
|
||||
Changes since version 0.20.2:
|
||||
.............................
|
||||
|
||||
|
||||
69
INSTALL
69
INSTALL
@@ -7,12 +7,13 @@ SUPPORTED PLATFORMS
|
||||
===================
|
||||
(ie: I've heard someone has compiled it on...)
|
||||
|
||||
- Intel/Linux RedHat 4.2 (primary platform)
|
||||
- Intel/Linux Slackware 3.5 (primary platform)
|
||||
- Intel/Linux other distributions
|
||||
- Sparc/Linux RedHat 5.1
|
||||
- PowerPC/MkLinux
|
||||
- Alpha/Linux RedHat 5.1
|
||||
- FreeBSD
|
||||
- NetBSD
|
||||
- Solaris 2.5.1, 2.5.2
|
||||
- Solaris 2.6.0
|
||||
- Solaris 2.7beta
|
||||
@@ -21,14 +22,18 @@ SUPPORTED PLATFORMS
|
||||
- OSF/1
|
||||
- HP-UX
|
||||
- AIX 4.1.4 / IBM PowerPC
|
||||
- AIX 4.3.2 / IBM PowerPC
|
||||
- AIX 5.3
|
||||
- DEC Alpha/Digital UNIX 4.x
|
||||
- XFree86 / OS/2
|
||||
- Corel NetWinder
|
||||
- SunOS 4.x
|
||||
- MacOS / MachTen 4.1.1
|
||||
- PowerMac / Power MachTen 4.1.1 over MacOS
|
||||
|
||||
Patches to make it work on other platforms are welcome.
|
||||
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:
|
||||
@@ -72,8 +77,7 @@ OPTIONAL:
|
||||
These libraries are not required to make Window Maker work, but they
|
||||
are supported in case you want to use them. Version numbers are those
|
||||
that I have (and therefore, guraranteed to work), but other versions
|
||||
might work too. Tell me if you made wmaker work with some library
|
||||
with a version older than the stated here.
|
||||
might work too.
|
||||
|
||||
|
||||
- libXPM 4.7 or newer
|
||||
@@ -118,6 +122,37 @@ support compiled in.
|
||||
|
||||
To get a list of other options, run ./configure --help
|
||||
|
||||
--enable-kanji support to display Kanji characters, Korean, Chinese
|
||||
and other languagues that require special characters.
|
||||
|
||||
--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 necessary due to a bug that manifests as messed
|
||||
icons and textures.
|
||||
|
||||
--disable-motif disable support for mwm hints
|
||||
|
||||
--enable-gnome enable support for stuff needed by GNOME
|
||||
(GNOME compliant bla bla bla)
|
||||
|
||||
--enable-kde enable support for kde/kwm 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.
|
||||
|
||||
--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
|
||||
@@ -135,20 +170,7 @@ To get a list of other options, run ./configure --help
|
||||
|
||||
--enable-debug adds extra debugging information. Do not use it
|
||||
unless you're debugging Window Maker.
|
||||
|
||||
--enable-kanji support to display Kanji characters, Korean, Chinese
|
||||
and other languagues that require special characters.
|
||||
|
||||
--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.
|
||||
|
||||
--enable-modelock XKB language status lock support. If you don't know
|
||||
what it is you probably don't need it.
|
||||
|
||||
|
||||
PLATFORM SPECIFIC NOTES:
|
||||
@@ -164,6 +186,11 @@ PLATFORM SPECIFIC NOTES:
|
||||
You also might need to use the --with-gfx-libs and --with-gfx-incs
|
||||
to supply the directory where libtiff is located.
|
||||
|
||||
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 bug and will be fixed.
|
||||
|
||||
- RedHat Linux
|
||||
Make sure you don't have the LANG and LINGUAS environment variables
|
||||
set to en_RN. Also, make sure you have /usr/local/bin in your
|
||||
@@ -424,9 +451,9 @@ menu
|
||||
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. Note that at the moment you can only
|
||||
supply a single font in WMGLOBAL. The %d in the font names must not be
|
||||
removed.
|
||||
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:
|
||||
|
||||
|
||||
24
Install
24
Install
@@ -57,6 +57,30 @@ 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"
|
||||
echo "Do you want to disable features that become duplicated with"
|
||||
echo "KDE support (like root menus)?"
|
||||
echo -n <y/n> [n] "
|
||||
read lite
|
||||
if [ "$lite" = y -o "lite" = Y ]; then
|
||||
OPTIONS="$OPTIONS --enable-lite"
|
||||
fi
|
||||
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
|
||||
|
||||
######################## NLS
|
||||
echo
|
||||
|
||||
5
MIRRORS
5
MIRRORS
@@ -35,7 +35,12 @@ 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 WindowMaker Distribution Packages
|
||||
|
||||
@@ -69,6 +69,9 @@ I18N = @I18N@
|
||||
I18N_MB = @I18N_MB@
|
||||
ICONEXT = @ICONEXT@
|
||||
INTLIBS = @INTLIBS@
|
||||
LD = @LD@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LITE = @LITE@
|
||||
LN_S = @LN_S@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MOFILES = @MOFILES@
|
||||
@@ -100,7 +103,7 @@ CONFIG_HEADER = ./src/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \
|
||||
Makefile.in NEWS TODO aclocal.m4 config.guess config.sub configure \
|
||||
configure.in install-sh missing mkinstalldirs
|
||||
configure.in install-sh ltconfig ltmain.sh missing mkinstalldirs
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
@@ -292,6 +295,7 @@ clean: clean-recursive clean-am
|
||||
|
||||
distclean: distclean-recursive distclean-am
|
||||
-rm -f config.status
|
||||
-rm -f libtool
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive maintainer-clean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
|
||||
149
NEWS
149
NEWS
@@ -2,6 +2,155 @@
|
||||
NEWS for veteran Window Maker users
|
||||
-----------------------------------
|
||||
|
||||
--- 0.50.0
|
||||
|
||||
|
||||
KDE and GNOME
|
||||
-------------
|
||||
|
||||
Added full support for GNOME and KWM hints.
|
||||
Read the INSTALL file to see how enable them.
|
||||
|
||||
Everything in the so called GNOME window manager bla bla bla pseudo-spec is
|
||||
implemented.
|
||||
|
||||
As for KDE stuff, it implements 90% of everything kwm does, adds some
|
||||
Window Maker specific extensions to it and still uses half of the memory
|
||||
kwm does, which should be enough to let you dump kwm ;) For details on what
|
||||
exactly is implemented, see comments in src/kwm.c Read the README.KDE file
|
||||
for more information.
|
||||
|
||||
|
||||
WARNING: Some KDE hints are badly designed, so doing things like using
|
||||
kpanel's desktop switcher/pager and Window Maker's internal workspace
|
||||
management functions to create, destroy and rename workspaces at the same
|
||||
time might cause unknown effects. To be on the safe side, only
|
||||
use either of them to manage workspaces. Switching workspaces is hopefully,
|
||||
safe, so you can switch workspaces from wherever you want.
|
||||
|
||||
|
||||
|
||||
Workspace Specific Background Images
|
||||
------------------------------------
|
||||
|
||||
Use the WorkspaceSpecificBack to set background images for specific
|
||||
workspaces. The WorkspaceBack is used as the default background image.
|
||||
|
||||
Example:
|
||||
|
||||
WorkspaceSpecificBack = ((solid, red), (cpixmap, ship.jpg, gray), (),
|
||||
(dgradient, red, blue))
|
||||
|
||||
This will set the background image of workspace 1 to (solid, 0),
|
||||
2 to ship.jpg and 4 to a gradient. Workspace 3 and other workspaces
|
||||
will have the image defined by WorkspaceBack.
|
||||
|
||||
Note that this uses quite some memory...
|
||||
|
||||
|
||||
setstyle/getstyle
|
||||
-----------------
|
||||
|
||||
setstyle now accepts the -nofonts flag, which will load the style
|
||||
file ignoring all font related options.
|
||||
|
||||
Example:
|
||||
|
||||
setstyle -nofonts Blabla.style
|
||||
|
||||
|
||||
getstyle can be used to create theme packs. See the usage in the
|
||||
WindowMaker/README.themes file.
|
||||
|
||||
|
||||
|
||||
New Texture Type
|
||||
----------------
|
||||
|
||||
Textured gradients will tile a texture pixmap and combine it with a gradient,
|
||||
using an arbitrary opaqueness.
|
||||
|
||||
Syntax is (thgradient, <file>, <opaqueness>, <color1>, <color2>)
|
||||
(tvgradient, <file>, <opaqueness>, <color1>, <color2>)
|
||||
(tdgradient, <file>, <opaqueness>, <color1>, <color2>)
|
||||
where:
|
||||
<color1> and <color2> are the colors for the gradient,
|
||||
<file> is the texture file and
|
||||
<opaqueness> is the opaqueness to merge the texture witht the gradient,
|
||||
ranging from 0 to 255.
|
||||
|
||||
Example:
|
||||
|
||||
(thgradient, "BlueImage.jpeg", 120, white, black)
|
||||
|
||||
The BlackTexture style and Checker theme are examples.
|
||||
|
||||
Hints:
|
||||
|
||||
You can use any type of pixmap file for this, but small (like 64x32)
|
||||
grayscale pixmap files should get the best results (fast and low memory
|
||||
usage). You can use color pixmaps, but it is harder to get the desired effect
|
||||
with them.
|
||||
|
||||
Be warned that this texture type is the slowest.
|
||||
|
||||
|
||||
|
||||
New Options
|
||||
-----------
|
||||
|
||||
IconTitleBack and IconTitleColor control the color of the
|
||||
miniwindow title. Both of them are colors.
|
||||
|
||||
Example:
|
||||
IconTitleColor=white;
|
||||
IconTitleBack=black;
|
||||
|
||||
|
||||
Since this introduces an incompatibility in themes and getting flamed by the
|
||||
themes ppl isn't the most pleasant thing ("Whaddafuk you're thinking!? You
|
||||
just broke 500 themes!!!" ;) the setstyle command was hacked so that it will
|
||||
make old themes work as before, by trying to automatically set the above
|
||||
options. Note that in some cases it will not have exactly the same results as
|
||||
before.
|
||||
|
||||
|
||||
StartMaximized window attribute. Will maximize the window when it
|
||||
is mapped.
|
||||
|
||||
|
||||
AutoRaiseLower option for the Clip. This allows automatic Raise/Lower of the
|
||||
Clip icons when the mouse pointer enter/leave the Clip. To avoid unwanted
|
||||
raising/lowering there is a time threshold before raising/lowering.
|
||||
The thresholds can be changed in wconfig.h by changing one or both of
|
||||
AUTO_LOWER_DELAY and AUTO_RAISE_DELAY (expressed in miliseconds).
|
||||
For example if you set AUTO_RAISE_DELAY to 0, then the Clip will be raised as
|
||||
soon as the mouse pointer enters it's area. Setting AUTO_RAISE_DELAY to a very
|
||||
big value, will make the Clip to practically do not auto raise unless clicked,
|
||||
but to be automatically lowered after AUTO_LOWER_DELAY (ms) when leaved.
|
||||
|
||||
|
||||
New ThemePack Format
|
||||
--------------------
|
||||
|
||||
Starting with this version, a new format of themes is being supported.
|
||||
Before you open pine and start composing your flame, rest assured that
|
||||
the old format is still supported. The new format is documented
|
||||
in the WindowMaker/README.themes file.
|
||||
|
||||
|
||||
Root Menu
|
||||
---------
|
||||
|
||||
The -noext option for OPEN_MENU will strip whatever is after the last .
|
||||
in file names that appear on the opened directory. So,
|
||||
|
||||
OPEN_MENU ~/bg WITH xv -root -quit
|
||||
|
||||
will create a menu with all the images in ~/bg without the extension.
|
||||
|
||||
|
||||
|
||||
--- 0.20.3
|
||||
|
||||
|
||||
|
||||
48
README
48
README
@@ -1,9 +1,12 @@
|
||||
|
||||
|
||||
|
||||
Window Maker X11 Window Manager
|
||||
|
||||
<http://windowmaker.org>
|
||||
<ftp://ftp.windowmaker.org>
|
||||
|
||||
by
|
||||
|
||||
Alfredo K. Kojima
|
||||
|
||||
@@ -12,6 +15,11 @@
|
||||
Matthew Hawkins
|
||||
|
||||
|
||||
Web/FTP Master
|
||||
|
||||
Phillip Smith
|
||||
|
||||
|
||||
|
||||
Congratulations! You have purchased an extremely fine
|
||||
device that would give you thousands of years of trouble-free
|
||||
@@ -42,6 +50,20 @@ Window Maker was designed keeping integration with GNUstep in mind and is the
|
||||
"official" window manager for it. Read more about GNUstep further on this
|
||||
file.
|
||||
|
||||
\begin{marketing babble}
|
||||
Window Maker is also KDE and GNOME compliant, which means you can use
|
||||
it as the window manager of these desktop environments and even fully
|
||||
replace kwm with wmaker if you use KDE. In that case, you would benefit
|
||||
from the best of both worlds, being able to take advantage of the usability
|
||||
and unique features of Window Maker, while still having access to KDE
|
||||
features such as the panel, pager and tight integration with all KDE
|
||||
applications. I've known of many cases where people keep switching KDE
|
||||
and Window Maker depending on their mood or needs of the day, but now
|
||||
you don't need that anymore :)
|
||||
As GNOME components become more available, the same can be said about it.
|
||||
Window Maker can be considered a fully compliant GNOME window manager.
|
||||
\end{marketing babble}
|
||||
|
||||
Window Maker was previously called WindowMaker.
|
||||
|
||||
Window Maker has no connection with Windowmaker, the software for
|
||||
@@ -148,15 +170,18 @@ 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 a interface builder, a project management system and other
|
||||
tools.
|
||||
environment, with tools like interface modeller, a project management system
|
||||
(project center) and other tools.
|
||||
|
||||
GNUstep 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.
|
||||
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
|
||||
@@ -316,11 +341,12 @@ Musicware
|
||||
=========
|
||||
|
||||
If you use Window Maker and *really* like it, please consider making my day
|
||||
by sending me a music CD (or a MiniDisc) 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.
|
||||
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:
|
||||
|
||||
|
||||
16
TODO
16
TODO
@@ -3,21 +3,22 @@ Do ASAP:
|
||||
========
|
||||
- fix bestvisual selection code. Broken.
|
||||
- add a dialog to let user choose if we should restart, restart twm or continue crashing on crash. Do not forget to check if wmaker is already fully running.
|
||||
- fix stacking. buggy again (maybe XFree 3.2 bug)
|
||||
- fix RemakeStackList() to account for transient windows
|
||||
- differential update of appmenu
|
||||
- make unhide app map windows in the same stacking order they were before
|
||||
hiding
|
||||
- blink border of clients with UrgencyHint set between red and black
|
||||
- finish session stuff
|
||||
- order window list menu by workspace
|
||||
- fix scroller to not jump while dragging knob (lock setparameters() while dragging?)
|
||||
- add multiline support for balloons
|
||||
- move/add balloon to WINGs
|
||||
- finish XStandardColormap stuff in wrlib
|
||||
|
||||
Need to do:
|
||||
===========
|
||||
- allow user to select/restore default root menu from wprefs
|
||||
- fix and include the windoze cycle window patch
|
||||
- support for X11R6.4 extension for getting extra visual info in wrlib's
|
||||
automatic best context guessing
|
||||
- rewrite menu traversal code
|
||||
- docklet to control AccessX (keyboard accessibility) functions
|
||||
- rewrite all redundant stuff to use WINGs
|
||||
- resizebartexture option
|
||||
@@ -30,9 +31,6 @@ Need to do:
|
||||
- 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?
|
||||
- -stateprefix cmd arg to specify sufix for WMState domain (multiple instance
|
||||
support)
|
||||
- GNOME stuff
|
||||
- add new file for stuff like default commands and dnd commands for
|
||||
docked apps, balloons for the dock etc
|
||||
- alpha-channel app specified icons
|
||||
@@ -41,14 +39,12 @@ Maybe some day:
|
||||
===============
|
||||
- virtual workspace
|
||||
- optimize for size
|
||||
- make dithering in 8bpp better
|
||||
|
||||
|
||||
Never: (so, dont even bother to ask)
|
||||
======
|
||||
- different themes for each workspace. Unless you give us a SGI/Power Onyx
|
||||
with 2 CPUs ;). Different workspacebacks for each workspace is being
|
||||
considered, but don't hold your breath.
|
||||
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.
|
||||
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
changes since wmaker 0.20.3:
|
||||
............................
|
||||
|
||||
- added WMSetSliderImage(), WMSetSliderKnobThickness()
|
||||
- added WMGetListItemHeight()
|
||||
- added WMListDidScrollNotification
|
||||
- added WSetColorWellBordered()
|
||||
- added hacky color dragging in colorwell
|
||||
- added poll() support in WMNextEvent. WARNING: the stuff needed for
|
||||
WMAddInputHandler() is not yet implemented for the poll stuff
|
||||
- added WMSetFilePanelAccessoryView(), WMGetFilePanelAccessoryView()
|
||||
- added WMSetPopUpButtonEnabled()
|
||||
- added WMGetLabelImage()
|
||||
- autoscroll for popup button menus
|
||||
- added WMDrawPixmap()
|
||||
- WARNING: changed parameter list for WMListDrawProc
|
||||
|
||||
changes since wmaker 0.20.2:
|
||||
............................
|
||||
|
||||
|
||||
@@ -5,39 +5,43 @@ AUTOMAKE_OPTIONS = no-dependencies
|
||||
SUBDIRS = Resources
|
||||
|
||||
|
||||
LIBLIST= -L$(top_builddir)/wrlib -lwraster\
|
||||
LIBLIST= $(top_builddir)/wrlib/libwraster.la\
|
||||
@GFXLFLAGS@ @XLFLAGS@ @GFXLIBS@ @XLIBS@ \
|
||||
-lm -L$(top_builddir)/libPropList -lPropList
|
||||
-lm $(top_builddir)/libPropList/libPropList.la
|
||||
|
||||
|
||||
#lib_LTLIBRARIES = libWINGs.la
|
||||
|
||||
lib_LIBRARIES = libWINGs.a
|
||||
|
||||
#libWINGs_la_LDFLAGS = -version-info 1:1:0
|
||||
|
||||
include_HEADERS = WINGs.h WUtil.h WINGsP.h
|
||||
|
||||
noinst_PROGRAMS = wtest wmquery wmfile fontl testmywidget
|
||||
|
||||
testmywidget_SOURCES = testmywidget.c mywidget.c mywidget.h
|
||||
|
||||
testmywidget_LDADD = -L. -lWINGs $(LIBLIST)
|
||||
testmywidget_LDADD = libWINGs.a $(LIBLIST)
|
||||
|
||||
fontl_SOURCES = fontl.c
|
||||
|
||||
fontl_LDADD = -L. -lWINGs $(LIBLIST)
|
||||
fontl_LDADD = libWINGs.a $(LIBLIST)
|
||||
|
||||
wtest_SOURCES = wtest.c
|
||||
|
||||
wtest_LDADD = -L. -lWINGs $(LIBLIST)
|
||||
wtest_LDADD = libWINGs.a $(LIBLIST)
|
||||
|
||||
wtest_DEPENDENCIES = libWINGs.a
|
||||
|
||||
wmfile_SOURCES = wmfile.c
|
||||
|
||||
wmfile_LDADD = -L. -lWINGs $(LIBLIST)
|
||||
wmfile_LDADD = libWINGs.a $(LIBLIST)
|
||||
|
||||
|
||||
wmquery_SOURCES = wmquery.c
|
||||
|
||||
wmquery_LDADD = -L. -lWINGs $(LIBLIST)
|
||||
wmquery_LDADD = libWINGs.a $(LIBLIST)
|
||||
|
||||
|
||||
EXTRA_DIST = logo.xpm
|
||||
|
||||
@@ -69,6 +69,9 @@ I18N = @I18N@
|
||||
I18N_MB = @I18N_MB@
|
||||
ICONEXT = @ICONEXT@
|
||||
INTLIBS = @INTLIBS@
|
||||
LD = @LD@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LITE = @LITE@
|
||||
LN_S = @LN_S@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MOFILES = @MOFILES@
|
||||
@@ -94,37 +97,41 @@ AUTOMAKE_OPTIONS = no-dependencies
|
||||
|
||||
SUBDIRS = Resources
|
||||
|
||||
LIBLIST= -L$(top_builddir)/wrlib -lwraster\
|
||||
LIBLIST= $(top_builddir)/wrlib/libwraster.la\
|
||||
@GFXLFLAGS@ @XLFLAGS@ @GFXLIBS@ @XLIBS@ \
|
||||
-lm -L$(top_builddir)/libPropList -lPropList
|
||||
-lm $(top_builddir)/libPropList/libPropList.la
|
||||
|
||||
#lib_LTLIBRARIES = libWINGs.la
|
||||
|
||||
lib_LIBRARIES = libWINGs.a
|
||||
|
||||
#libWINGs_la_LDFLAGS = -version-info 1:1:0
|
||||
|
||||
include_HEADERS = WINGs.h WUtil.h WINGsP.h
|
||||
|
||||
noinst_PROGRAMS = wtest wmquery wmfile fontl testmywidget
|
||||
|
||||
testmywidget_SOURCES = testmywidget.c mywidget.c mywidget.h
|
||||
|
||||
testmywidget_LDADD = -L. -lWINGs $(LIBLIST)
|
||||
testmywidget_LDADD = libWINGs.a $(LIBLIST)
|
||||
|
||||
fontl_SOURCES = fontl.c
|
||||
|
||||
fontl_LDADD = -L. -lWINGs $(LIBLIST)
|
||||
fontl_LDADD = libWINGs.a $(LIBLIST)
|
||||
|
||||
wtest_SOURCES = wtest.c
|
||||
|
||||
wtest_LDADD = -L. -lWINGs $(LIBLIST)
|
||||
wtest_LDADD = libWINGs.a $(LIBLIST)
|
||||
|
||||
wtest_DEPENDENCIES = libWINGs.a
|
||||
|
||||
wmfile_SOURCES = wmfile.c
|
||||
|
||||
wmfile_LDADD = -L. -lWINGs $(LIBLIST)
|
||||
wmfile_LDADD = libWINGs.a $(LIBLIST)
|
||||
|
||||
wmquery_SOURCES = wmquery.c
|
||||
|
||||
wmquery_LDADD = -L. -lWINGs $(LIBLIST)
|
||||
wmquery_LDADD = libWINGs.a $(LIBLIST)
|
||||
|
||||
EXTRA_DIST = logo.xpm
|
||||
|
||||
@@ -196,20 +203,26 @@ PROGRAMS = $(noinst_PROGRAMS)
|
||||
wtest_OBJECTS = wtest.o
|
||||
wtest_LDFLAGS =
|
||||
wmquery_OBJECTS = wmquery.o
|
||||
wmquery_DEPENDENCIES =
|
||||
wmquery_DEPENDENCIES = libWINGs.a $(top_builddir)/wrlib/libwraster.la \
|
||||
$(top_builddir)/libPropList/libPropList.la
|
||||
wmquery_LDFLAGS =
|
||||
wmfile_OBJECTS = wmfile.o
|
||||
wmfile_DEPENDENCIES =
|
||||
wmfile_DEPENDENCIES = libWINGs.a $(top_builddir)/wrlib/libwraster.la \
|
||||
$(top_builddir)/libPropList/libPropList.la
|
||||
wmfile_LDFLAGS =
|
||||
fontl_OBJECTS = fontl.o
|
||||
fontl_DEPENDENCIES =
|
||||
fontl_DEPENDENCIES = libWINGs.a $(top_builddir)/wrlib/libwraster.la \
|
||||
$(top_builddir)/libPropList/libPropList.la
|
||||
fontl_LDFLAGS =
|
||||
testmywidget_OBJECTS = testmywidget.o mywidget.o
|
||||
testmywidget_DEPENDENCIES =
|
||||
testmywidget_DEPENDENCIES = libWINGs.a \
|
||||
$(top_builddir)/wrlib/libwraster.la \
|
||||
$(top_builddir)/libPropList/libPropList.la
|
||||
testmywidget_LDFLAGS =
|
||||
CFLAGS = @CFLAGS@
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
||||
LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
||||
LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
HEADERS = $(include_HEADERS)
|
||||
|
||||
DIST_COMMON = README ChangeLog Makefile.am Makefile.in TODO
|
||||
@@ -225,7 +238,7 @@ OBJECTS = $(libWINGs_a_OBJECTS) $(wtest_OBJECTS) $(wmquery_OBJECTS) $(wmfile_OBJ
|
||||
all: all-recursive all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .o .s
|
||||
.SUFFIXES: .S .c .lo .o .s
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu WINGs/Makefile
|
||||
|
||||
@@ -285,6 +298,25 @@ distclean-compile:
|
||||
|
||||
maintainer-clean-compile:
|
||||
|
||||
.c.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
|
||||
.s.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
|
||||
.S.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
|
||||
maintainer-clean-libtool:
|
||||
|
||||
libWINGs.a: $(libWINGs_a_OBJECTS) $(libWINGs_a_DEPENDENCIES)
|
||||
-rm -f libWINGs.a
|
||||
$(AR) cru libWINGs.a $(libWINGs_a_OBJECTS) $(libWINGs_a_LIBADD)
|
||||
@@ -463,18 +495,19 @@ maintainer-clean-generic:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean-am: mostlyclean-libLIBRARIES mostlyclean-compile \
|
||||
mostlyclean-noinstPROGRAMS mostlyclean-tags \
|
||||
mostlyclean-generic
|
||||
mostlyclean-libtool mostlyclean-noinstPROGRAMS \
|
||||
mostlyclean-tags mostlyclean-generic
|
||||
|
||||
clean-am: clean-libLIBRARIES clean-compile clean-noinstPROGRAMS \
|
||||
clean-tags clean-generic mostlyclean-am
|
||||
clean-am: clean-libLIBRARIES clean-compile clean-libtool \
|
||||
clean-noinstPROGRAMS clean-tags clean-generic \
|
||||
mostlyclean-am
|
||||
|
||||
distclean-am: distclean-libLIBRARIES distclean-compile \
|
||||
distclean-noinstPROGRAMS distclean-tags \
|
||||
distclean-generic clean-am
|
||||
distclean-libtool distclean-noinstPROGRAMS \
|
||||
distclean-tags distclean-generic clean-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-libLIBRARIES \
|
||||
maintainer-clean-compile \
|
||||
maintainer-clean-compile maintainer-clean-libtool \
|
||||
maintainer-clean-noinstPROGRAMS maintainer-clean-tags \
|
||||
maintainer-clean-generic distclean-am
|
||||
|
||||
@@ -484,6 +517,7 @@ clean: clean-recursive clean-am
|
||||
|
||||
distclean: distclean-recursive distclean-am
|
||||
-rm -f config.status
|
||||
-rm -f libtool
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive maintainer-clean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@@ -492,14 +526,15 @@ maintainer-clean: maintainer-clean-recursive maintainer-clean-am
|
||||
.PHONY: mostlyclean-libLIBRARIES distclean-libLIBRARIES \
|
||||
clean-libLIBRARIES maintainer-clean-libLIBRARIES uninstall-libLIBRARIES \
|
||||
install-libLIBRARIES mostlyclean-compile distclean-compile \
|
||||
clean-compile maintainer-clean-compile mostlyclean-noinstPROGRAMS \
|
||||
distclean-noinstPROGRAMS clean-noinstPROGRAMS \
|
||||
maintainer-clean-noinstPROGRAMS uninstall-includeHEADERS \
|
||||
install-includeHEADERS 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 \
|
||||
clean-compile maintainer-clean-compile mostlyclean-libtool \
|
||||
distclean-libtool clean-libtool maintainer-clean-libtool \
|
||||
mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \
|
||||
clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \
|
||||
uninstall-includeHEADERS install-includeHEADERS 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 dvi \
|
||||
installcheck all-am install-exec-am install-data-am uninstall-am \
|
||||
|
||||
@@ -69,6 +69,9 @@ I18N = @I18N@
|
||||
I18N_MB = @I18N_MB@
|
||||
ICONEXT = @ICONEXT@
|
||||
INTLIBS = @INTLIBS@
|
||||
LD = @LD@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LITE = @LITE@
|
||||
LN_S = @LN_S@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MOFILES = @MOFILES@
|
||||
@@ -193,6 +196,7 @@ clean: clean-generic mostlyclean
|
||||
|
||||
distclean: distclean-generic clean
|
||||
-rm -f config.status
|
||||
-rm -f libtool
|
||||
|
||||
maintainer-clean: maintainer-clean-generic distclean
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <wraster.h>
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
#define WINGS_H_VERSION 980930
|
||||
#define WINGS_H_VERSION 981220
|
||||
|
||||
|
||||
|
||||
@@ -188,7 +188,7 @@ enum {
|
||||
#define WSIHighlightedArrowUp 9
|
||||
#define WSIArrowDown 10
|
||||
#define WSIHighlightedArrowDown 11
|
||||
|
||||
#define WSICheckMark 12
|
||||
|
||||
enum {
|
||||
WLDSSelected = (1 << 16),
|
||||
@@ -352,8 +352,8 @@ typedef void WMCallback(void *data);
|
||||
/* delegate method like stuff */
|
||||
typedef void WMFreeDataProc(void *data);
|
||||
|
||||
typedef void WMListDrawProc(WMList *lPtr, Drawable d, char *text, int state,
|
||||
WMRect *rect);
|
||||
typedef void WMListDrawProc(WMList *lPtr, int index, Drawable d, char *text,
|
||||
int state, WMRect *rect);
|
||||
|
||||
/*
|
||||
typedef void WMSplitViewResizeSubviewsProc(WMSplitView *sPtr,
|
||||
@@ -493,6 +493,8 @@ WMPixmap *WMCreatePixmapFromFile(WMScreen *scrPtr, char *fileName);
|
||||
WMPixmap *WMCreateBlendedPixmapFromFile(WMScreen *scrPtr, char *fileName,
|
||||
RColor *color);
|
||||
|
||||
void WMDrawPixmap(WMPixmap *pixmap, Drawable d, int x, int y);
|
||||
|
||||
Pixmap WMGetPixmapXID(WMPixmap *pixmap);
|
||||
|
||||
Pixmap WMGetPixmapMaskXID(WMPixmap *pixmap);
|
||||
@@ -694,6 +696,8 @@ void WMSetLabelWraps(WMLabel *lPtr, Bool flag);
|
||||
|
||||
void WMSetLabelImage(WMLabel *lPtr, WMPixmap *image);
|
||||
|
||||
WMPixmap *WMGetLabelImage(WMLabel *lPtr);
|
||||
|
||||
void WMSetLabelImagePosition(WMLabel *lPtr, WMImagePosition position);
|
||||
|
||||
void WMSetLabelTextAlignment(WMLabel *lPtr, WMAlignment alignment);
|
||||
@@ -738,6 +742,7 @@ void WMSetTextFieldEnabled(WMTextField *tPtr, Bool flag);
|
||||
void WMSetTextFieldSecure(WMTextField *tPtr, Bool flag);
|
||||
|
||||
|
||||
extern char *WMListDidScrollNotification;
|
||||
extern char *WMTextDidChangeNotification;
|
||||
extern char *WMTextDidBeginEditingNotification;
|
||||
extern char *WMTextDidEndEditingNotification;
|
||||
@@ -782,6 +787,8 @@ void WMSetListUserDrawProc(WMList *lPtr, WMListDrawProc *proc);
|
||||
|
||||
void WMSetListUserDrawItemHeight(WMList *lPtr, unsigned short height);
|
||||
|
||||
int WMGetListItemHeight(WMList *lPtr);
|
||||
|
||||
/* don't free the returned data */
|
||||
WMListItem *WMGetListSelectedItem(WMList *lPtr);
|
||||
|
||||
@@ -801,6 +808,8 @@ void WMSetListBottomPosition(WMList *lPtr, int row);
|
||||
|
||||
int WMGetListPosition(WMList *lPtr);
|
||||
|
||||
extern char *WMListDidScrollNotification;
|
||||
|
||||
/* ....................................................................... */
|
||||
|
||||
WMBrowser *WMCreateBrowser(WMWidget *parent);
|
||||
@@ -876,6 +885,8 @@ char *WMGetPopUpButtonItem(WMPopUpButton *bPtr, int index);
|
||||
|
||||
int WMGetPopUpButtonNumberOfItems(WMPopUpButton *bPtr);
|
||||
|
||||
void WMSetPopUpButtonEnabled(WMPopUpButton *bPtr, Bool flag);
|
||||
|
||||
/* ....................................................................... */
|
||||
|
||||
WMColorWell *WMCreateColorWell(WMWidget *parent);
|
||||
@@ -884,6 +895,8 @@ void WMSetColorWellColor(WMColorWell *cPtr, WMColor *color);
|
||||
|
||||
WMColor *WMGetColorWellColor(WMColorWell *cPtr);
|
||||
|
||||
void WSetColorWellBordered(WMColorWell *cPtr, Bool flag);
|
||||
|
||||
/* ...................................................................... */
|
||||
|
||||
WMScrollView *WMCreateScrollView(WMWidget *parent);
|
||||
@@ -929,6 +942,10 @@ void WMSetSliderContinuous(WMSlider *slider, Bool flag);
|
||||
|
||||
void WMSetSliderAction(WMSlider *slider, WMAction *action, void *data);
|
||||
|
||||
void WMSetSliderKnobThickness(WMSlider *sPtr, int thickness);
|
||||
|
||||
void WMSetSliderImage(WMSlider *sPtr, WMPixmap *pixmap);
|
||||
|
||||
/* ....................................................................... */
|
||||
|
||||
/* only supports 2 subviews */
|
||||
@@ -995,6 +1012,11 @@ int WMRunModalOpenPanelForDirectory(WMFilePanel *panel, WMWindow *owner,
|
||||
int WMRunModalSavePanelForDirectory(WMFilePanel *panel, WMWindow *owner,
|
||||
char *path, char *name);
|
||||
|
||||
void WMSetFilePanelAccessoryView(WMFilePanel *panel, WMView *view);
|
||||
|
||||
WMView *WMGetFilePanelAccessoryView(WMFilePanel *panel);
|
||||
|
||||
|
||||
/* ...................................................................... */
|
||||
|
||||
/* only 1 instance per WMScreen */
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "WINGs.h"
|
||||
#include "WUtil.h"
|
||||
|
||||
#if WINGS_H_VERSION < 980930
|
||||
#if WINGS_H_VERSION < 981220
|
||||
#error There_is_an_old_WINGs.h_file_somewhere_in_your_system._Please_remove_it.
|
||||
#endif
|
||||
|
||||
@@ -173,7 +173,9 @@ typedef struct W_Screen {
|
||||
|
||||
struct W_Pixmap *pullDownIndicator;
|
||||
struct W_Pixmap *popUpIndicator;
|
||||
|
||||
|
||||
struct W_Pixmap *checkMark;
|
||||
|
||||
struct W_Pixmap *homeIcon;
|
||||
|
||||
struct W_Pixmap *defaultObjectIcon;
|
||||
@@ -308,7 +310,8 @@ _WINGsConfiguration WINGsConfiguration;
|
||||
|
||||
#define W_FONTID(f) (f)->font->fid
|
||||
|
||||
#define W_DRAWABLE(scr) (scr)->rootWin
|
||||
#define W_DRAWABLE(scr) (scr)->rcontext->drawable
|
||||
|
||||
|
||||
|
||||
W_View *W_GetViewForXWindow(Display *display, Window window);
|
||||
|
||||
@@ -29,6 +29,37 @@
|
||||
#endif
|
||||
|
||||
|
||||
#if (!defined (__GNUC__) || __GNUC__ < 2 || \
|
||||
__GNUC_MINOR__ < (defined (__cplusplus) ? 6 : 4))
|
||||
#define __ASSERT_FUNCTION ((__const char *) 0)
|
||||
#else
|
||||
#define __ASSERT_FUNCTION __PRETTY_FUNCTION__
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef NDEBUG
|
||||
|
||||
#define wassertr(expr, val) ((void)0)
|
||||
|
||||
#else /* !NDEBUG */
|
||||
|
||||
#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 /* !NDEBUG */
|
||||
|
||||
|
||||
|
||||
typedef enum {
|
||||
WMPostWhenIdle = 1,
|
||||
|
||||
@@ -189,12 +189,12 @@ wfindfile(char *paths, char *file)
|
||||
return NULL;
|
||||
|
||||
if (*file=='/' || *file=='~' || *file=='$' || !paths) {
|
||||
if (access(file, R_OK)<0) {
|
||||
if (access(file, F_OK)<0) {
|
||||
fullpath = wexpandpath(file);
|
||||
if (!fullpath)
|
||||
return NULL;
|
||||
|
||||
if (access(fullpath, R_OK)<0) {
|
||||
if (access(fullpath, F_OK)<0) {
|
||||
free(fullpath);
|
||||
return NULL;
|
||||
} else {
|
||||
@@ -219,7 +219,7 @@ wfindfile(char *paths, char *file)
|
||||
fullpath = wexpandpath(path);
|
||||
free(path);
|
||||
if (fullpath) {
|
||||
if (access(fullpath, R_OK)==0) {
|
||||
if (access(fullpath, F_OK)==0) {
|
||||
return fullpath;
|
||||
}
|
||||
free(fullpath);
|
||||
@@ -243,12 +243,12 @@ wfindfileinlist(char **path_list, char *file)
|
||||
return NULL;
|
||||
|
||||
if (*file=='/' || *file=='~' || !path_list) {
|
||||
if (access(file, R_OK)<0) {
|
||||
if (access(file, F_OK)<0) {
|
||||
fullpath = wexpandpath(file);
|
||||
if (!fullpath)
|
||||
return NULL;
|
||||
|
||||
if (access(fullpath, R_OK)<0) {
|
||||
if (access(fullpath, F_OK)<0) {
|
||||
free(fullpath);
|
||||
return NULL;
|
||||
} else {
|
||||
@@ -271,8 +271,8 @@ wfindfileinlist(char **path_list, char *file)
|
||||
fullpath = wexpandpath(path);
|
||||
free(path);
|
||||
if (fullpath) {
|
||||
/* check if file is readable */
|
||||
if (access(fullpath, R_OK)==0) {
|
||||
/* check if file exists */
|
||||
if (access(fullpath, F_OK)==0) {
|
||||
return fullpath;
|
||||
}
|
||||
free(fullpath);
|
||||
|
||||
@@ -23,8 +23,6 @@
|
||||
|
||||
|
||||
|
||||
extern void W_ReadConfigurations(void);
|
||||
|
||||
extern void W_InitNotificationCenter(void);
|
||||
|
||||
|
||||
@@ -72,9 +70,6 @@ WMInitializeApplication(char *applicationName, int *argc, char **argv)
|
||||
|
||||
/* initialize notification center */
|
||||
W_InitNotificationCenter();
|
||||
|
||||
/* read general configuration data for WINGs */
|
||||
W_ReadConfigurations();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -72,8 +72,8 @@ static void setupScroller(WMBrowser *bPtr);
|
||||
|
||||
static void scrollToColumn(WMBrowser *bPtr, int column);
|
||||
|
||||
static void paintItem(WMList *lPtr, Drawable d, char *text, int state,
|
||||
WMRect *rect);
|
||||
static void paintItem(WMList *lPtr, int index, Drawable d, char *text,
|
||||
int state, WMRect *rect);
|
||||
|
||||
static void loadColumn(WMBrowser *bPtr, int column);
|
||||
|
||||
@@ -189,7 +189,7 @@ drawTitleOfColumn(WMBrowser *bPtr, int column)
|
||||
|
||||
if (column < bPtr->usedColumnCount && bPtr->titles[column])
|
||||
W_PaintText(bPtr->view, bPtr->view->window, scr->boldFont, x,
|
||||
(bPtr->titleHeight-scr->boldFont->height)/2,
|
||||
(bPtr->titleHeight-WMFontHeight(scr->boldFont))/2,
|
||||
bPtr->columnSize.width, WACenter, W_GC(scr->white),
|
||||
False, bPtr->titles[column], strlen(bPtr->titles[column]));
|
||||
}
|
||||
@@ -248,6 +248,23 @@ removeColumn(WMBrowser *bPtr, int column)
|
||||
|
||||
if (column < bPtr->maxVisibleColumns) {
|
||||
int tmp;
|
||||
#if 1
|
||||
int limit;
|
||||
|
||||
if(bPtr->usedColumnCount < bPtr->maxVisibleColumns)
|
||||
limit = bPtr->usedColumnCount;
|
||||
else
|
||||
limit = bPtr->maxVisibleColumns;
|
||||
|
||||
for (i=column; i < limit; i++) {
|
||||
if (bPtr->titles[i])
|
||||
free(bPtr->titles[i]);
|
||||
bPtr->titles[i] = NULL;
|
||||
|
||||
WMClearList(bPtr->columns[i]);
|
||||
bPtr->usedColumnCount--;
|
||||
}
|
||||
#else
|
||||
for (i=column; i < bPtr->maxVisibleColumns; i++) {
|
||||
if (bPtr->titles[i])
|
||||
free(bPtr->titles[i]);
|
||||
@@ -267,6 +284,7 @@ removeColumn(WMBrowser *bPtr, int column)
|
||||
bPtr->columnCount--;
|
||||
bPtr->usedColumnCount--;
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
int tmp = bPtr->columnCount;
|
||||
for (i=column; i < tmp; i++) {
|
||||
@@ -443,7 +461,8 @@ resizeBrowser(WMWidget *w, unsigned int width, unsigned int height)
|
||||
|
||||
|
||||
static void
|
||||
paintItem(WMList *lPtr, Drawable d, char *text, int state, WMRect *rect)
|
||||
paintItem(WMList *lPtr, int index, Drawable d, char *text, int state,
|
||||
WMRect *rect)
|
||||
{
|
||||
WMView *view = W_VIEW(lPtr);
|
||||
W_Screen *scr = view->screen;
|
||||
|
||||
@@ -29,9 +29,9 @@ static void destroyColorWell(ColorWell *cPtr);
|
||||
static void paintColorWell(ColorWell *cPtr);
|
||||
|
||||
static void handleEvents(XEvent *event, void *data);
|
||||
#if 0
|
||||
|
||||
static void handleDragEvents(XEvent *event, void *data);
|
||||
#endif
|
||||
|
||||
static void handleActionEvents(XEvent *event, void *data);
|
||||
|
||||
static void resizeColorWell();
|
||||
@@ -73,6 +73,7 @@ WMCreateColorWell(WMWidget *parent)
|
||||
free(cPtr);
|
||||
return NULL;
|
||||
}
|
||||
cPtr->view->self = cPtr;
|
||||
|
||||
cPtr->colorView = W_CreateView(cPtr->view);
|
||||
if (!cPtr->colorView) {
|
||||
@@ -80,19 +81,22 @@ WMCreateColorWell(WMWidget *parent)
|
||||
free(cPtr);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
cPtr->colorView->self = cPtr;
|
||||
|
||||
WMCreateEventHandler(cPtr->view, ExposureMask|StructureNotifyMask
|
||||
|ClientMessageMask, handleEvents, cPtr);
|
||||
|
||||
WMCreateEventHandler(cPtr->colorView, ExposureMask, handleEvents, cPtr);
|
||||
#if 0
|
||||
WMCreateEventHandler(cPtr->colorView, ButtonPressMask|Button1MotionMask,
|
||||
handleDragEvents, cPtr);
|
||||
#endif
|
||||
|
||||
WMCreateEventHandler(cPtr->colorView, ButtonPressMask|ButtonMotionMask
|
||||
|EnterWindowMask, handleDragEvents, cPtr);
|
||||
|
||||
WMCreateEventHandler(cPtr->view, ButtonPressMask, handleActionEvents,
|
||||
cPtr);
|
||||
|
||||
cPtr->colorView->flags.mapWhenRealized = 1;
|
||||
|
||||
cPtr->flags.bordered = 1;
|
||||
|
||||
resizeColorWell(cPtr, DEFAULT_WIDTH, DEFAULT_HEIGHT);
|
||||
|
||||
@@ -119,6 +123,17 @@ WMGetColorWellColor(WMColorWell *cPtr)
|
||||
return cPtr->color;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WSetColorWellBordered(WMColorWell *cPtr, Bool flag)
|
||||
{
|
||||
if (cPtr->flags.bordered != flag) {
|
||||
cPtr->flags.bordered = flag;
|
||||
resizeColorWell(cPtr, cPtr->view->size.width, cPtr->view->size.height);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#define MIN(a,b) ((a) > (b) ? (b) : (a))
|
||||
|
||||
static void
|
||||
@@ -126,19 +141,28 @@ resizeColorWell(WMColorWell *cPtr, unsigned int width, unsigned int height)
|
||||
{
|
||||
int bw;
|
||||
|
||||
if (width < MIN_WIDTH)
|
||||
width = MIN_WIDTH;
|
||||
if (height < MIN_HEIGHT)
|
||||
height = MIN_HEIGHT;
|
||||
if (cPtr->flags.bordered) {
|
||||
|
||||
bw = (int)((float)MIN(width, height)*0.24);
|
||||
|
||||
W_ResizeView(cPtr->view, width, height);
|
||||
|
||||
W_ResizeView(cPtr->colorView, width-2*bw, height-2*bw);
|
||||
if (width < MIN_WIDTH)
|
||||
width = MIN_WIDTH;
|
||||
if (height < MIN_HEIGHT)
|
||||
height = MIN_HEIGHT;
|
||||
|
||||
if (cPtr->colorView->pos.x!=bw || cPtr->colorView->pos.y!=bw)
|
||||
W_MoveView(cPtr->colorView, bw, bw);
|
||||
bw = (int)((float)MIN(width, height)*0.24);
|
||||
|
||||
W_ResizeView(cPtr->view, width, height);
|
||||
|
||||
W_ResizeView(cPtr->colorView, width-2*bw, height-2*bw);
|
||||
|
||||
if (cPtr->colorView->pos.x!=bw || cPtr->colorView->pos.y!=bw)
|
||||
W_MoveView(cPtr->colorView, bw, bw);
|
||||
} else {
|
||||
W_ResizeView(cPtr->view, width, height);
|
||||
|
||||
W_ResizeView(cPtr->colorView, width, height);
|
||||
|
||||
W_MoveView(cPtr->colorView, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -184,7 +208,7 @@ handleEvents(XEvent *event, void *data)
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
static WMPixmap*
|
||||
makeDragPixmap(WMColorWell *cPtr)
|
||||
{
|
||||
@@ -201,6 +225,116 @@ makeDragPixmap(WMColorWell *cPtr)
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
slideView(WMView *view, int srcX, int srcY, int dstX, int dstY)
|
||||
{
|
||||
double x, y, dx, dy;
|
||||
int i;
|
||||
|
||||
srcX -= 8;
|
||||
srcY -= 8;
|
||||
dstX -= 8;
|
||||
dstY -= 8;
|
||||
|
||||
x = srcX;
|
||||
y = srcY;
|
||||
|
||||
dx = (double)(dstX-srcX)/20.0;
|
||||
dy = (double)(dstY-srcY)/20.0;
|
||||
|
||||
for (i = 0; i < 20; i++) {
|
||||
W_MoveView(view, x, y);
|
||||
XFlush(view->screen->display);
|
||||
|
||||
x += dx;
|
||||
y += dy;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
dragColor(ColorWell *cPtr, XEvent *event, WMPixmap *image)
|
||||
{
|
||||
WMView *dragView;
|
||||
WMScreen *scr = cPtr->view->screen;
|
||||
Display *dpy = scr->display;
|
||||
XColor black = {0, 0,0,0, DoRed|DoGreen|DoBlue};
|
||||
XColor green = {0, 0x4500,0xb000,0x4500, DoRed|DoGreen|DoBlue};
|
||||
XColor back = {0, 0xffff,0xffff,0xffff, DoRed|DoGreen|DoBlue};
|
||||
Bool done = False;
|
||||
WMColorWell *activeWell = NULL;
|
||||
|
||||
dragView = W_CreateTopView(scr);
|
||||
|
||||
W_ResizeView(dragView, 16, 16);
|
||||
dragView->attribFlags |= CWOverrideRedirect | CWSaveUnder;
|
||||
dragView->attribs.event_mask = StructureNotifyMask;
|
||||
dragView->attribs.override_redirect = True;
|
||||
dragView->attribs.save_under = True;
|
||||
|
||||
W_MoveView(dragView, event->xmotion.x_root-8, event->xmotion.y_root-8);
|
||||
|
||||
W_RealizeView(dragView);
|
||||
|
||||
W_MapView(dragView);
|
||||
|
||||
XSetWindowBackgroundPixmap(dpy, dragView->window, WMGetPixmapXID(image));
|
||||
XClearWindow(dpy, dragView->window);
|
||||
|
||||
|
||||
XGrabPointer(dpy, dragView->window, True,
|
||||
ButtonMotionMask|ButtonReleaseMask|EnterWindowMask,
|
||||
GrabModeSync, GrabModeAsync,
|
||||
scr->rootWin, scr->defaultCursor, CurrentTime);
|
||||
|
||||
while (!done) {
|
||||
XEvent ev;
|
||||
WMView *view;
|
||||
|
||||
XAllowEvents(dpy, SyncPointer, CurrentTime);
|
||||
WMNextEvent(dpy, &ev);
|
||||
|
||||
switch (ev.type) {
|
||||
case ButtonRelease:
|
||||
if (activeWell != NULL) {
|
||||
WMSetColorWellColor(activeWell, cPtr->color);
|
||||
} else {
|
||||
slideView(dragView, ev.xbutton.x_root, ev.xbutton.y_root,
|
||||
event->xmotion.x_root, event->xmotion.y_root);
|
||||
}
|
||||
|
||||
done = True;
|
||||
break;
|
||||
|
||||
case EnterNotify:
|
||||
view = W_GetViewForXWindow(dpy, ev.xcrossing.window);
|
||||
|
||||
if (view && view->self && W_CLASS(view->self) == WC_ColorWell
|
||||
&& view->self != activeWell && view->self != cPtr) {
|
||||
|
||||
activeWell = view->self;
|
||||
XRecolorCursor(dpy, scr->defaultCursor, &green, &back);
|
||||
} else if (view->self!=NULL && view->self != activeWell) {
|
||||
XRecolorCursor(dpy, scr->defaultCursor, &black, &back);
|
||||
activeWell = NULL;
|
||||
}
|
||||
break;
|
||||
|
||||
case MotionNotify:
|
||||
W_MoveView(dragView, ev.xmotion.x_root-8, ev.xmotion.y_root-8);
|
||||
break;
|
||||
|
||||
default:
|
||||
WMHandleEvent(&ev);
|
||||
break;
|
||||
}
|
||||
}
|
||||
XUngrabPointer(dpy, CurrentTime);
|
||||
XRecolorCursor(dpy, scr->defaultCursor, &black, &back);
|
||||
|
||||
W_DestroyView(dragView);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
handleDragEvents(XEvent *event, void *data)
|
||||
@@ -214,20 +348,24 @@ handleDragEvents(XEvent *event, void *data)
|
||||
cPtr->ipoint.y = event->xbutton.y;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case MotionNotify:
|
||||
if (event->xmotion.state & Button1Mask) {
|
||||
if (abs(cPtr->ipoint.x - event->xmotion.x) > 4
|
||||
|| abs(cPtr->ipoint.y - event->xmotion.y) > 4) {
|
||||
WMSize offs;
|
||||
WMPixmap *pixmap;
|
||||
|
||||
|
||||
offs.width = 2;
|
||||
offs.height = 2;
|
||||
pixmap = makeDragPixmap(cPtr);
|
||||
|
||||
|
||||
/*
|
||||
WMDragImageFromView(cPtr->view, pixmap, cPtr->view->pos,
|
||||
offs, event, True);
|
||||
* */
|
||||
|
||||
dragColor(cPtr, event, pixmap);
|
||||
|
||||
WMReleasePixmap(pixmap);
|
||||
}
|
||||
@@ -235,7 +373,7 @@ handleDragEvents(XEvent *event, void *data)
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
static void
|
||||
|
||||
101
WINGs/wevent.c
101
WINGs/wevent.c
@@ -11,6 +11,11 @@
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef HAVE_POLL_H
|
||||
#include <poll.h>
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef HAVE_SYS_SELECT_H
|
||||
# include <sys/select.h>
|
||||
#endif
|
||||
@@ -708,9 +713,93 @@ WMIsDoubleClick(XEvent *event)
|
||||
Bool
|
||||
W_WaitForEvent(Display *dpy, unsigned long xeventmask)
|
||||
{
|
||||
#ifndef HAVE_SELECT
|
||||
#error This_system_does_not_have_select(2)_and_is_not_supported
|
||||
#if defined(HAVE_POLL) && defined(HAVE_POLL_H) && !defined(HAVE_SELECT)
|
||||
struct pollfd *fds;
|
||||
InputHandler *handler;
|
||||
int count, timeout, nfds, k, retval;
|
||||
|
||||
for (nfds = 1, handler = inputHandler;
|
||||
handler != 0; handler = handler->next) nfds++;
|
||||
|
||||
fds = wmalloc(nfds * sizeof(struct pollfd));
|
||||
fds[0].fd = ConnectionNumber(dpy);
|
||||
fds[0].events = POLLIN;
|
||||
|
||||
for (k = 1, handler = inputHandler;
|
||||
handler;
|
||||
handler = handler->next, k++) {
|
||||
fds[k].fd = handler->fd;
|
||||
fds[k].events = 0;
|
||||
if (handler->mask & WIReadMask)
|
||||
fds[k].events |= POLLIN;
|
||||
|
||||
if (handler->mask & WIWriteMask)
|
||||
fds[k].events |= POLLOUT;
|
||||
|
||||
#if 0 /* FIXME */
|
||||
if (handler->mask & WIExceptMask)
|
||||
FD_SET(handler->fd, &eset);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Setup the select() timeout to the estimated time until the
|
||||
* next timer expires.
|
||||
*/
|
||||
if (timerPending()) {
|
||||
struct timeval tv;
|
||||
delayUntilNextTimerEvent(&tv);
|
||||
timeout = tv.tv_sec * 1000 + tv.tv_usec / 1000;
|
||||
} else {
|
||||
timeout = -1;
|
||||
}
|
||||
|
||||
if (xeventmask==0) {
|
||||
if (XPending(dpy))
|
||||
return True;
|
||||
} else {
|
||||
XEvent ev;
|
||||
if (XCheckMaskEvent(dpy, xeventmask, &ev)) {
|
||||
XPutBackEvent(dpy, &ev);
|
||||
return True;
|
||||
}
|
||||
}
|
||||
|
||||
count = poll(fds, nfds, timeout);
|
||||
|
||||
if (count > 0) {
|
||||
handler = inputHandler;
|
||||
k = 1;
|
||||
while (handler) {
|
||||
int mask;
|
||||
|
||||
mask = 0;
|
||||
|
||||
if (fds[k].revents & (POLLIN|POLLRDNORM|POLLRDBAND|POLLPRI))
|
||||
mask |= WIReadMask;
|
||||
|
||||
if (fds[k].revents & (POLLOUT | POLLWRBAND))
|
||||
mask |= WIWriteMask;
|
||||
|
||||
if (fds[k].revents & (POLLHUP | POLLNVAL | POLLERR))
|
||||
mask |= WIExceptMask;
|
||||
|
||||
if (mask!=0 && handler->callback) {
|
||||
(*handler->callback)(handler->fd, mask,
|
||||
handler->clientData);
|
||||
}
|
||||
|
||||
handler = handler->next;
|
||||
k++;
|
||||
}
|
||||
}
|
||||
|
||||
retval = fds[0].revents & (POLLIN|POLLRDNORM|POLLRDBAND|POLLPRI);
|
||||
free(fds);
|
||||
|
||||
return retval;
|
||||
#else /* not HAVE_POLL */
|
||||
#ifdef HAVE_SELECT
|
||||
struct timeval timeout;
|
||||
struct timeval *timeoutPtr;
|
||||
fd_set rset, wset, eset;
|
||||
@@ -764,7 +853,7 @@ W_WaitForEvent(Display *dpy, unsigned long xeventmask)
|
||||
return True;
|
||||
}
|
||||
}
|
||||
/* TODO: port to poll() */
|
||||
|
||||
count = select(1 + maxfd, &rset, &wset, &eset, timeoutPtr);
|
||||
|
||||
if (count > 0) {
|
||||
@@ -794,10 +883,12 @@ W_WaitForEvent(Display *dpy, unsigned long xeventmask)
|
||||
}
|
||||
|
||||
return FD_ISSET(ConnectionNumber(dpy), &rset);
|
||||
#else /* not HAVE_SELECT, not HAVE_POLL */
|
||||
Neither select nor poll. You lose.
|
||||
#endif /* HAVE_SELECT */
|
||||
#endif /* HAVE_POLL */
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
WMNextEvent(Display *dpy, XEvent *event)
|
||||
{
|
||||
|
||||
@@ -30,6 +30,8 @@ typedef struct W_FilePanel {
|
||||
|
||||
WMButton *homeButton;
|
||||
|
||||
WMView *accessoryView;
|
||||
|
||||
WMTextField *fileField;
|
||||
|
||||
char **fileTypes;
|
||||
@@ -358,6 +360,28 @@ WMGetFilePanelFileName(WMFilePanel *panel)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WMSetFilePanelAccessoryView(WMFilePanel *panel, WMView *view)
|
||||
{
|
||||
WMView *v;
|
||||
|
||||
panel->accessoryView = view;
|
||||
|
||||
v = WMWidgetView(panel->win);
|
||||
|
||||
W_ReparentView(view, v);
|
||||
|
||||
W_MoveView(view, (v->size.width - v->size.width)/2, 300);
|
||||
}
|
||||
|
||||
|
||||
WMView*
|
||||
WMGetFilePanelAccessoryView(WMFilePanel *panel)
|
||||
{
|
||||
return panel->accessoryView;
|
||||
}
|
||||
|
||||
|
||||
static char*
|
||||
get_name_from_path(char *path)
|
||||
{
|
||||
@@ -564,3 +588,5 @@ buttonClick(WMButton *bPtr, WMFilePanel *panel)
|
||||
|
||||
panel->flags.done = 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ WMCreateFontInDefaultEncoding(WMScreen *scrPtr, char *fontName)
|
||||
WMFont*
|
||||
WMRetainFont(WMFont *font)
|
||||
{
|
||||
assert(font!=NULL);
|
||||
wassertrv(font!=NULL, NULL);
|
||||
|
||||
font->refCount++;
|
||||
|
||||
@@ -102,7 +102,8 @@ WMRetainFont(WMFont *font)
|
||||
void
|
||||
WMReleaseFont(WMFont *font)
|
||||
{
|
||||
assert(font!=NULL);
|
||||
wassertr(font!=NULL);
|
||||
|
||||
font->refCount--;
|
||||
if (font->refCount < 1) {
|
||||
if (font->notFontSet)
|
||||
@@ -118,8 +119,8 @@ WMReleaseFont(WMFont *font)
|
||||
unsigned int
|
||||
WMFontHeight(WMFont *font)
|
||||
{
|
||||
assert(font!=NULL);
|
||||
|
||||
wassertrv(font!=NULL, 0);
|
||||
|
||||
return font->height;
|
||||
}
|
||||
|
||||
@@ -179,6 +180,8 @@ WMBoldSystemFontOfSize(WMScreen *scrPtr, int size)
|
||||
XFontSet
|
||||
WMGetFontFontSet(WMFont *font)
|
||||
{
|
||||
wassertrv(font!=NULL, NULL);
|
||||
|
||||
if (font->notFontSet)
|
||||
return NULL;
|
||||
else
|
||||
@@ -189,8 +192,8 @@ WMGetFontFontSet(WMFont *font)
|
||||
int
|
||||
WMWidthOfString(WMFont *font, char *text, int length)
|
||||
{
|
||||
assert(font!=NULL);
|
||||
assert(text!=NULL);
|
||||
wassertrv(font!=NULL, 0);
|
||||
wassertrv(text!=NULL, 0);
|
||||
|
||||
if (font->notFontSet)
|
||||
return XTextWidth(font->font.normal, text, length);
|
||||
@@ -210,6 +213,8 @@ void
|
||||
WMDrawString(WMScreen *scr, Drawable d, GC gc, WMFont *font, int x, int y,
|
||||
char *text, int length)
|
||||
{
|
||||
wassertr(font!=NULL);
|
||||
|
||||
if (font->notFontSet) {
|
||||
XSetFont(scr->display, gc, font->font.normal->fid);
|
||||
XDrawString(scr->display, d, gc, x, y + font->y, text, length);
|
||||
@@ -224,6 +229,8 @@ void
|
||||
WMDrawImageString(WMScreen *scr, Drawable d, GC gc, WMFont *font, int x, int y,
|
||||
char *text, int length)
|
||||
{
|
||||
wassertr(font != NULL);
|
||||
|
||||
if (font->notFontSet) {
|
||||
XSetFont(scr->display, gc, font->font.normal->fid);
|
||||
XDrawImageString(scr->display, d, gc, x, y + font->y, text, length);
|
||||
|
||||
@@ -82,7 +82,7 @@ paintFrame(Frame *fPtr)
|
||||
int fy, fh;
|
||||
|
||||
if (fPtr->caption!=NULL)
|
||||
th = scrPtr->normalFont->height;
|
||||
th = WMFontHeight(scrPtr->normalFont);
|
||||
else {
|
||||
th = 0;
|
||||
}
|
||||
|
||||
@@ -281,12 +281,30 @@ static char *PULLDOWN_INDICATOR[] = {
|
||||
#define PULLDOWN_INDICATOR_HEIGHT 7
|
||||
|
||||
|
||||
#define CHECK_MARK_WIDTH 8
|
||||
#define CHECK_MARK_HEIGHT 10
|
||||
|
||||
static char *CHECK_MARK[] = {
|
||||
"======== ",
|
||||
"======= #",
|
||||
"====== #%",
|
||||
"===== #%=",
|
||||
" #== #%==",
|
||||
" #% #%===",
|
||||
" % #%====",
|
||||
" #%=====",
|
||||
" #%======",
|
||||
"#%======="};
|
||||
|
||||
|
||||
#define STIPPLE_WIDTH 8
|
||||
#define STIPPLE_HEIGHT 8
|
||||
static unsigned char STIPPLE_BITS[] = {
|
||||
0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa};
|
||||
|
||||
|
||||
extern void W_ReadConfigurations(void);
|
||||
|
||||
|
||||
extern W_ViewProcedureTable _WindowViewProcedures;
|
||||
extern W_ViewProcedureTable _FrameViewProcedures;
|
||||
@@ -489,6 +507,8 @@ WMCreateScreenWithRContext(Display *display, int screen, RContext *context)
|
||||
|
||||
initProcedureTable();
|
||||
|
||||
W_ReadConfigurations();
|
||||
|
||||
assert(W_ApplicationInitialized());
|
||||
}
|
||||
|
||||
@@ -567,6 +587,16 @@ WMCreateScreenWithRContext(Display *display, int screen, RContext *context)
|
||||
|
||||
scrPtr->boldFont = WMBoldSystemFontOfSize(scrPtr, 12);
|
||||
|
||||
if (!scrPtr->boldFont)
|
||||
scrPtr->boldFont = scrPtr->normalFont;
|
||||
|
||||
if (!scrPtr->normalFont) {
|
||||
wwarning("could not load any fonts. Make sure your font installation"
|
||||
"and locale settings are correct.");
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
scrPtr->checkButtonImageOn = makePixmap(scrPtr, CHECK_BUTTON_ON,
|
||||
CHECK_BUTTON_ON_WIDTH,
|
||||
CHECK_BUTTON_ON_HEIGHT, False);
|
||||
@@ -636,6 +666,11 @@ WMCreateScreenWithRContext(Display *display, int screen, RContext *context)
|
||||
scrPtr->pullDownIndicator = makePixmap(scrPtr, PULLDOWN_INDICATOR,
|
||||
PULLDOWN_INDICATOR_WIDTH,
|
||||
PULLDOWN_INDICATOR_HEIGHT, True);
|
||||
|
||||
scrPtr->checkMark = makePixmap(scrPtr, CHECK_MARK,
|
||||
CHECK_MARK_WIDTH,
|
||||
CHECK_MARK_HEIGHT, True);
|
||||
|
||||
loadPixmaps(scrPtr);
|
||||
|
||||
scrPtr->defaultCursor = XCreateFontCursor(display, XC_left_ptr);
|
||||
|
||||
@@ -99,6 +99,13 @@ WMSetLabelImage(WMLabel *lPtr, WMPixmap *image)
|
||||
}
|
||||
|
||||
|
||||
WMPixmap*
|
||||
WMGetLabelImage(WMLabel *lPtr)
|
||||
{
|
||||
return lPtr->image;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WMSetLabelImagePosition(WMLabel *lPtr, WMImagePosition position)
|
||||
{
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
#include "WINGsP.h"
|
||||
|
||||
char *WMListDidScrollNotification = "WMListDidScrollNotification";
|
||||
|
||||
|
||||
typedef struct W_List {
|
||||
W_Class widgetClass;
|
||||
@@ -99,7 +101,7 @@ WMCreateList(WMWidget *parent)
|
||||
|EnterWindowMask|LeaveWindowMask|ButtonMotionMask,
|
||||
handleActionEvents, lPtr);
|
||||
|
||||
lPtr->itemHeight = scrPtr->normalFont->height + 1;
|
||||
lPtr->itemHeight = WMFontHeight(scrPtr->normalFont) + 1;
|
||||
|
||||
/* create the vertical scroller */
|
||||
lPtr->vScroller = WMCreateScroller(lPtr);
|
||||
@@ -224,6 +226,7 @@ WMRemoveListItem(WMList *lPtr, int row)
|
||||
{
|
||||
WMListItem *llist;
|
||||
WMListItem *tmp;
|
||||
int topItem = lPtr->topItem;
|
||||
|
||||
CHECK_CLASS(lPtr, WC_List);
|
||||
|
||||
@@ -266,6 +269,8 @@ WMRemoveListItem(WMList *lPtr, int row)
|
||||
if (!lPtr->idleID) {
|
||||
lPtr->idleID = WMAddIdleHandler((WMCallback*)updateScroller, lPtr);
|
||||
}
|
||||
if (lPtr->topItem != topItem)
|
||||
WMPostNotificationName(WMListDidScrollNotification, lPtr, NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -370,6 +375,13 @@ WMGetListSelectedItemRow(WMList *lPtr)
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
WMGetListItemHeight(WMList *lPtr)
|
||||
{
|
||||
return lPtr->itemHeight;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WMSetListPosition(WMList *lPtr, int row)
|
||||
{
|
||||
@@ -417,6 +429,7 @@ vScrollCallBack(WMWidget *scroller, void *self)
|
||||
WMList *lPtr = (WMList*)self;
|
||||
WMScroller *sPtr = (WMScroller*)scroller;
|
||||
int height;
|
||||
int topItem = lPtr->topItem;
|
||||
|
||||
height = lPtr->view->size.height - 4;
|
||||
|
||||
@@ -476,6 +489,9 @@ vScrollCallBack(WMWidget *scroller, void *self)
|
||||
/* do nothing */
|
||||
break;
|
||||
}
|
||||
|
||||
if (lPtr->topItem != topItem)
|
||||
WMPostNotificationName(WMListDidScrollNotification, lPtr, NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -516,8 +532,8 @@ paintItem(List *lPtr, int index)
|
||||
flags |= WLDSIsBranch;
|
||||
|
||||
if (lPtr->draw)
|
||||
(*lPtr->draw)(lPtr, view->window, itemPtr->text, flags, &rect);
|
||||
|
||||
(*lPtr->draw)(lPtr, index, view->window, itemPtr->text, flags,
|
||||
&rect);
|
||||
} else {
|
||||
if (itemPtr->selected)
|
||||
XFillRectangle(scr->display, view->window, W_GC(scr->white), x, y,
|
||||
@@ -706,6 +722,7 @@ handleActionEvents(XEvent *event, void *data)
|
||||
{
|
||||
List *lPtr = (List*)data;
|
||||
int tmp;
|
||||
int topItem = lPtr->topItem;
|
||||
|
||||
CHECK_CLASS(data, WC_List);
|
||||
|
||||
@@ -713,14 +730,11 @@ handleActionEvents(XEvent *event, void *data)
|
||||
case ButtonRelease:
|
||||
lPtr->flags.buttonPressed = 0;
|
||||
tmp = getItemIndexAt(lPtr, event->xbutton.y);
|
||||
|
||||
if (tmp == lPtr->selectedItem && tmp >= 0) {
|
||||
if (WMIsDoubleClick(event)) {
|
||||
if (lPtr->doubleAction)
|
||||
(*lPtr->doubleAction)(lPtr, lPtr->doubleClientData);
|
||||
} else {
|
||||
if (lPtr->action)
|
||||
(*lPtr->action)(lPtr, lPtr->clientData);
|
||||
}
|
||||
|
||||
if (lPtr->action)
|
||||
(*lPtr->action)(lPtr, lPtr->clientData);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -728,7 +742,7 @@ handleActionEvents(XEvent *event, void *data)
|
||||
lPtr->flags.buttonPressed = lPtr->flags.buttonWasPressed;
|
||||
lPtr->flags.buttonWasPressed = 0;
|
||||
break;
|
||||
|
||||
|
||||
case LeaveNotify:
|
||||
lPtr->flags.buttonWasPressed = lPtr->flags.buttonPressed;
|
||||
lPtr->flags.buttonPressed = 0;
|
||||
@@ -743,6 +757,11 @@ handleActionEvents(XEvent *event, void *data)
|
||||
lPtr->selectedItem = tmp;
|
||||
}
|
||||
lPtr->flags.buttonPressed = 1;
|
||||
|
||||
if (WMIsDoubleClick(event)) {
|
||||
if (lPtr->doubleAction)
|
||||
(*lPtr->doubleAction)(lPtr, lPtr->doubleClientData);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -756,6 +775,8 @@ handleActionEvents(XEvent *event, void *data)
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (lPtr->topItem != topItem)
|
||||
WMPostNotificationName(WMListDidScrollNotification, lPtr, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ W_DrawRelief(W_Screen *scr, Drawable d, int x, int y, unsigned int width,
|
||||
|
||||
XDrawLine(dpy, d, bgc, x+width-1, y, x+width-1, y+height-1);
|
||||
if (height > 2 && relief!=WRPushed) {
|
||||
XDrawLine(dpy, d, dgc, x+width-2, y+2, x+width-2, y+height-3);
|
||||
XDrawLine(dpy, d, dgc, x+width-2, y+1, x+width-2, y+height-2);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,12 +116,13 @@ W_GetTextHeight(WMFont *font, char *text, int width, int wrap)
|
||||
int count;
|
||||
int length = strlen(text);
|
||||
int h;
|
||||
int fheight = WMFontHeight(font);
|
||||
|
||||
h = 0;
|
||||
while (length > 0) {
|
||||
count = fitText(ptr, font, width, wrap);
|
||||
|
||||
h += font->height;
|
||||
h += fheight;
|
||||
|
||||
if (isspace(ptr[count]))
|
||||
count++;
|
||||
@@ -142,6 +143,7 @@ W_PaintText(W_View *view, Drawable d, WMFont *font, int x, int y,
|
||||
int line_width;
|
||||
int line_x;
|
||||
int count;
|
||||
int fheight = WMFontHeight(font);
|
||||
|
||||
while (length > 0) {
|
||||
count = fitText(ptr, font, width, wrap);
|
||||
@@ -156,7 +158,7 @@ W_PaintText(W_View *view, Drawable d, WMFont *font, int x, int y,
|
||||
|
||||
WMDrawString(view->screen, d, gc, font, line_x, y, ptr, count);
|
||||
|
||||
y += font->height;
|
||||
y += fheight;
|
||||
|
||||
if (isspace(ptr[count]))
|
||||
count++;
|
||||
|
||||
@@ -113,8 +113,8 @@ WMCreateAlertPanel(WMScreen *scrPtr, WMWindow *owner,
|
||||
largeFont = WMBoldSystemFontOfSize(scrPtr, 24);
|
||||
|
||||
panel->tLbl = WMCreateLabel(panel->win);
|
||||
WMMoveWidget(panel->tLbl, 80, (80 - largeFont->height)/2);
|
||||
WMResizeWidget(panel->tLbl, 400 - 70, largeFont->height+4);
|
||||
WMMoveWidget(panel->tLbl, 80, (80 - WMFontHeight(largeFont))/2);
|
||||
WMResizeWidget(panel->tLbl, 400 - 70, WMFontHeight(largeFont)+4);
|
||||
WMSetLabelText(panel->tLbl, title);
|
||||
WMSetLabelTextAlignment(panel->tLbl, WALeft);
|
||||
WMSetLabelFont(panel->tLbl, largeFont);
|
||||
@@ -126,7 +126,7 @@ WMCreateAlertPanel(WMScreen *scrPtr, WMWindow *owner,
|
||||
if (msg) {
|
||||
panel->mLbl = WMCreateLabel(panel->win);
|
||||
WMMoveWidget(panel->mLbl, 10, 83);
|
||||
WMResizeWidget(panel->mLbl, 380, scrPtr->normalFont->height*4);
|
||||
WMResizeWidget(panel->mLbl, 380, WMFontHeight(scrPtr->normalFont)*4);
|
||||
WMSetLabelText(panel->mLbl, msg);
|
||||
WMSetLabelTextAlignment(panel->mLbl, WACenter);
|
||||
}
|
||||
@@ -317,7 +317,7 @@ WMCreateInputPanel(WMScreen *scrPtr, WMWindow *owner, char *title, char *msg,
|
||||
|
||||
panel->tLbl = WMCreateLabel(panel->win);
|
||||
WMMoveWidget(panel->tLbl, 20, 16);
|
||||
WMResizeWidget(panel->tLbl, 320 - 40, largeFont->height+4);
|
||||
WMResizeWidget(panel->tLbl, 320 - 40, WMFontHeight(largeFont)+4);
|
||||
WMSetLabelText(panel->tLbl, title);
|
||||
WMSetLabelTextAlignment(panel->tLbl, WALeft);
|
||||
WMSetLabelFont(panel->tLbl, largeFont);
|
||||
@@ -329,7 +329,8 @@ WMCreateInputPanel(WMScreen *scrPtr, WMWindow *owner, char *title, char *msg,
|
||||
if (msg) {
|
||||
panel->mLbl = WMCreateLabel(panel->win);
|
||||
WMMoveWidget(panel->mLbl, 20, 50);
|
||||
WMResizeWidget(panel->mLbl, 320 - 40,scrPtr->normalFont->height*2);
|
||||
WMResizeWidget(panel->mLbl, 320 - 40,
|
||||
WMFontHeight(scrPtr->normalFont)*2);
|
||||
WMSetLabelText(panel->mLbl, msg);
|
||||
WMSetLabelTextAlignment(panel->mLbl, WALeft);
|
||||
}
|
||||
|
||||
@@ -17,6 +17,8 @@ WMRetainPixmap(WMPixmap *pixmap)
|
||||
void
|
||||
WMReleasePixmap(WMPixmap *pixmap)
|
||||
{
|
||||
wassertr(pixmap!=NULL);
|
||||
|
||||
pixmap->refCount--;
|
||||
|
||||
if (pixmap->refCount<1) {
|
||||
@@ -139,12 +141,17 @@ WMCreatePixmapFromXPMData(WMScreen *scrPtr, char **data)
|
||||
Pixmap
|
||||
WMGetPixmapXID(WMPixmap *pixmap)
|
||||
{
|
||||
wassertrv(pixmap != NULL, None);
|
||||
|
||||
return pixmap->pixmap;
|
||||
}
|
||||
|
||||
|
||||
Pixmap
|
||||
WMGetPixmapMaskXID(WMPixmap *pixmap)
|
||||
{
|
||||
wassertrv(pixmap != NULL, None);
|
||||
|
||||
return pixmap->mask;
|
||||
}
|
||||
|
||||
@@ -152,11 +159,13 @@ WMGetPixmapMaskXID(WMPixmap *pixmap)
|
||||
WMSize
|
||||
WMGetPixmapSize(WMPixmap *pixmap)
|
||||
{
|
||||
WMSize size;
|
||||
WMSize size = {0,0};
|
||||
|
||||
wassertrv(pixmap != NULL, size);
|
||||
|
||||
size.width = pixmap->width;
|
||||
size.height = pixmap->height;
|
||||
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
@@ -197,9 +206,25 @@ WMGetSystemPixmap(WMScreen *scr, int image)
|
||||
|
||||
case WSIHighlightedArrowDown:
|
||||
return WMRetainPixmap(scr->hiDownArrow);
|
||||
|
||||
|
||||
case WSICheckMark:
|
||||
return WMRetainPixmap(scr->checkMark);
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
WMDrawPixmap(WMPixmap *pixmap, Drawable d, int x, int y)
|
||||
{
|
||||
WMScreen *scr = pixmap->screen;
|
||||
|
||||
XSetClipMask(scr->display, scr->clipGC, pixmap->mask);
|
||||
XSetClipOrigin(scr->display, scr->clipGC, x, y);
|
||||
|
||||
XCopyArea(scr->display, pixmap->pixmap, d, scr->clipGC, 0, 0,
|
||||
pixmap->width, pixmap->height, x, y);
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ typedef struct ItemList {
|
||||
unsigned int disabled:1;
|
||||
} ItemList;
|
||||
|
||||
|
||||
typedef struct W_PopUpButton {
|
||||
W_Class widgetClass;
|
||||
WMView *view;
|
||||
@@ -30,12 +31,20 @@ typedef struct W_PopUpButton {
|
||||
|
||||
WMView *menuView; /* override redirect popup menu */
|
||||
|
||||
WMHandlerID timer; /* for autoscroll */
|
||||
|
||||
/**/
|
||||
int scrollStartY; /* for autoscroll */
|
||||
|
||||
struct {
|
||||
unsigned int pullsDown:1;
|
||||
|
||||
unsigned int configured:1;
|
||||
|
||||
unsigned int insideMenu:1;
|
||||
|
||||
unsigned int enabled:1;
|
||||
|
||||
} flags;
|
||||
} PopUpButton;
|
||||
|
||||
@@ -43,6 +52,8 @@ typedef struct W_PopUpButton {
|
||||
#define MENU_BLINK_DELAY 60000
|
||||
#define MENU_BLINK_COUNT 2
|
||||
|
||||
#define SCROLL_DELAY 30
|
||||
|
||||
|
||||
W_ViewProcedureTable _PopUpButtonViewProcedures = {
|
||||
NULL,
|
||||
@@ -94,6 +105,8 @@ WMCreatePopUpButton(WMWidget *parent)
|
||||
WMCreateEventHandler(bPtr->view, ButtonPressMask|ButtonReleaseMask,
|
||||
handleActionEvents, bPtr);
|
||||
|
||||
bPtr->flags.enabled = 1;
|
||||
|
||||
bPtr->menuView = W_CreateTopView(scr);
|
||||
bPtr->menuView->attribs.override_redirect = True;
|
||||
bPtr->menuView->attribFlags |= CWOverrideRedirect;
|
||||
@@ -101,8 +114,8 @@ WMCreatePopUpButton(WMWidget *parent)
|
||||
W_ResizeView(bPtr->menuView, bPtr->view->size.width, 1);
|
||||
|
||||
WMCreateEventHandler(bPtr->menuView, ButtonPressMask|ButtonReleaseMask
|
||||
|EnterWindowMask|LeaveWindowMask|ButtonMotionMask,
|
||||
handleActionEvents, bPtr);
|
||||
|EnterWindowMask|LeaveWindowMask|ButtonMotionMask
|
||||
|ExposureMask, handleActionEvents, bPtr);
|
||||
|
||||
return bPtr;
|
||||
}
|
||||
@@ -244,6 +257,15 @@ WMRemovePopUpButtonItem(WMPopUpButton *bPtr, int index)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WMSetPopUpButtonEnabled(WMPopUpButton *bPtr, Bool flag)
|
||||
{
|
||||
bPtr->flags.enabled = flag;
|
||||
if (bPtr->view->flags.mapped)
|
||||
paintPopUpButton(bPtr);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WMSetPopUpButtonSelectedItem(WMPopUpButton *bPtr, int index)
|
||||
{
|
||||
@@ -380,10 +402,11 @@ paintPopUpButton(PopUpButton *bPtr)
|
||||
bPtr->view->size.height, WRRaised);
|
||||
|
||||
if (caption) {
|
||||
W_PaintText(bPtr->view, pixmap, scr->normalFont,
|
||||
6, (bPtr->view->size.height-scr->normalFont->height)/2,
|
||||
bPtr->view->size.width, WALeft, W_GC(scr->black), False,
|
||||
caption, strlen(caption));
|
||||
W_PaintText(bPtr->view, pixmap, scr->normalFont, 6,
|
||||
(bPtr->view->size.height-WMFontHeight(scr->normalFont))/2,
|
||||
bPtr->view->size.width, WALeft,
|
||||
bPtr->flags.enabled ? W_GC(scr->black) : W_GC(scr->darkGray),
|
||||
False, caption, strlen(caption));
|
||||
}
|
||||
|
||||
if (bPtr->flags.pullsDown) {
|
||||
@@ -448,7 +471,7 @@ paintMenuEntry(PopUpButton *bPtr, int index, int highlight)
|
||||
itemHeight = bPtr->view->size.height;
|
||||
width = bPtr->view->size.width;
|
||||
height = itemHeight * bPtr->itemCount;
|
||||
yo = (itemHeight - scr->normalFont->height)/2;
|
||||
yo = (itemHeight - WMFontHeight(scr->normalFont))/2;
|
||||
|
||||
if (!highlight) {
|
||||
XClearArea(scr->display, bPtr->menuView->window, 0, index*itemHeight,
|
||||
@@ -495,7 +518,7 @@ makeMenuPixmap(PopUpButton *bPtr)
|
||||
itemHeight = bPtr->view->size.height;
|
||||
width = bPtr->view->size.width;
|
||||
height = itemHeight * bPtr->itemCount;
|
||||
yo = (itemHeight - scr->normalFont->height)/2;
|
||||
yo = (itemHeight - WMFontHeight(scr->normalFont))/2;
|
||||
|
||||
pixmap = XCreatePixmap(scr->display, bPtr->view->window, width, height,
|
||||
scr->depth);
|
||||
@@ -595,17 +618,71 @@ itemIsEnabled(PopUpButton *bPtr, int index)
|
||||
{
|
||||
ItemList *item = bPtr->items;
|
||||
|
||||
while (index-- > 0)
|
||||
while (index-- > 0 && item)
|
||||
item = item->nextPtr;
|
||||
|
||||
return !item->disabled;
|
||||
return item ? !item->disabled : False;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
autoScroll(void *data)
|
||||
{
|
||||
PopUpButton *bPtr = (PopUpButton*)data;
|
||||
int scrHeight = WMWidgetScreen(bPtr)->rootView->size.height;
|
||||
int repeat = 0;
|
||||
int dy = 0;
|
||||
|
||||
|
||||
if (bPtr->scrollStartY >= scrHeight-1
|
||||
&& bPtr->menuView->pos.y+bPtr->menuView->size.height >= scrHeight-1) {
|
||||
repeat = 1;
|
||||
|
||||
if (bPtr->menuView->pos.y+bPtr->menuView->size.height-5
|
||||
<= scrHeight - 1) {
|
||||
dy = scrHeight - 1
|
||||
- (bPtr->menuView->pos.y+bPtr->menuView->size.height);
|
||||
} else
|
||||
dy = -5;
|
||||
|
||||
} else if (bPtr->scrollStartY <= 1 && bPtr->menuView->pos.y < 1) {
|
||||
repeat = 1;
|
||||
|
||||
if (bPtr->menuView->pos.y+5 > 1)
|
||||
dy = 1 - bPtr->menuView->pos.y;
|
||||
else
|
||||
dy = 5;
|
||||
}
|
||||
|
||||
if (repeat) {
|
||||
int oldItem;
|
||||
|
||||
W_MoveView(bPtr->menuView, bPtr->menuView->pos.x,
|
||||
bPtr->menuView->pos.y + dy);
|
||||
|
||||
oldItem = bPtr->highlightedItem;
|
||||
bPtr->highlightedItem = (bPtr->scrollStartY - bPtr->menuView->pos.y)
|
||||
/ bPtr->view->size.height;
|
||||
|
||||
if (oldItem!=bPtr->highlightedItem) {
|
||||
paintMenuEntry(bPtr, oldItem, False);
|
||||
paintMenuEntry(bPtr, bPtr->highlightedItem,
|
||||
itemIsEnabled(bPtr, bPtr->highlightedItem));
|
||||
}
|
||||
|
||||
bPtr->timer = WMAddTimerHandler(SCROLL_DELAY, autoScroll, bPtr);
|
||||
} else {
|
||||
bPtr->timer = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
handleActionEvents(XEvent *event, void *data)
|
||||
{
|
||||
PopUpButton *bPtr = (PopUpButton*)data;
|
||||
int oldItem;
|
||||
int scrHeight = WMWidgetScreen(bPtr)->rootView->size.height;
|
||||
|
||||
CHECK_CLASS(data, WC_PopUpButton);
|
||||
|
||||
@@ -614,6 +691,11 @@ handleActionEvents(XEvent *event, void *data)
|
||||
|
||||
switch (event->type) {
|
||||
/* called for menuView */
|
||||
case Expose:
|
||||
paintMenuEntry(bPtr, bPtr->highlightedItem,
|
||||
itemIsEnabled(bPtr, bPtr->highlightedItem));
|
||||
break;
|
||||
|
||||
case LeaveNotify:
|
||||
bPtr->flags.insideMenu = 0;
|
||||
if (bPtr->menuView->flags.mapped)
|
||||
@@ -624,7 +706,7 @@ handleActionEvents(XEvent *event, void *data)
|
||||
case EnterNotify:
|
||||
bPtr->flags.insideMenu = 1;
|
||||
break;
|
||||
|
||||
|
||||
case MotionNotify:
|
||||
if (bPtr->flags.insideMenu) {
|
||||
oldItem = bPtr->highlightedItem;
|
||||
@@ -634,11 +716,24 @@ handleActionEvents(XEvent *event, void *data)
|
||||
paintMenuEntry(bPtr, bPtr->highlightedItem,
|
||||
itemIsEnabled(bPtr, bPtr->highlightedItem));
|
||||
}
|
||||
|
||||
if (event->xmotion.y_root >= scrHeight-1
|
||||
|| event->xmotion.y_root <= 1) {
|
||||
bPtr->scrollStartY = event->xmotion.y_root;
|
||||
if (!bPtr->timer)
|
||||
autoScroll(bPtr);
|
||||
} else if (bPtr->timer) {
|
||||
WMDeleteTimerHandler(bPtr->timer);
|
||||
bPtr->timer = NULL;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
/* called for bPtr->view */
|
||||
case ButtonPress:
|
||||
if (!bPtr->flags.enabled)
|
||||
break;
|
||||
|
||||
popUpMenu(bPtr);
|
||||
if (!bPtr->flags.pullsDown) {
|
||||
bPtr->highlightedItem = bPtr->selectedItemIndex;
|
||||
@@ -657,6 +752,12 @@ handleActionEvents(XEvent *event, void *data)
|
||||
XUngrabPointer(bPtr->view->screen->display, event->xbutton.time);
|
||||
if (!bPtr->flags.pullsDown)
|
||||
popDownMenu(bPtr);
|
||||
|
||||
if (bPtr->timer) {
|
||||
WMDeleteTimerHandler(bPtr->timer);
|
||||
bPtr->timer = NULL;
|
||||
}
|
||||
|
||||
if (bPtr->flags.insideMenu && bPtr->highlightedItem>=0) {
|
||||
if (itemIsEnabled(bPtr, bPtr->highlightedItem)) {
|
||||
int i;
|
||||
@@ -690,6 +791,10 @@ static void
|
||||
destroyPopUpButton(PopUpButton *bPtr)
|
||||
{
|
||||
ItemList *itemPtr, *tmp;
|
||||
|
||||
if (bPtr->timer) {
|
||||
WMDeleteTimerHandler(bPtr->timer);
|
||||
}
|
||||
|
||||
itemPtr = bPtr->items;
|
||||
while (itemPtr!=NULL) {
|
||||
|
||||
110
WINGs/wslider.c
110
WINGs/wslider.c
@@ -18,10 +18,13 @@ typedef struct W_Slider {
|
||||
int value;
|
||||
|
||||
Pixmap knobPixmap;
|
||||
WMPixmap *backPixmap;
|
||||
|
||||
WMAction *action;
|
||||
void *clientData;
|
||||
|
||||
int knobThickness;
|
||||
|
||||
struct {
|
||||
unsigned int continuous:1;
|
||||
|
||||
@@ -33,8 +36,6 @@ typedef struct W_Slider {
|
||||
|
||||
|
||||
|
||||
#define SLIDER_LENGTH 20
|
||||
|
||||
|
||||
static void resizeSlider();
|
||||
|
||||
@@ -54,6 +55,7 @@ static void realizeSlider(Slider *sPtr);
|
||||
static void handleEvents(XEvent *event, void *data);
|
||||
static void handleActionEvents(XEvent *event, void *data);
|
||||
|
||||
static void makeKnobPixmap(Slider *sPtr);
|
||||
|
||||
static void
|
||||
realizeObserver(void *self, WMNotification *not)
|
||||
@@ -93,7 +95,9 @@ WMCreateSlider(WMWidget *parent)
|
||||
sPtr->minValue = 0;
|
||||
sPtr->maxValue = 100;
|
||||
sPtr->value = 50;
|
||||
|
||||
|
||||
sPtr->knobThickness = 20;
|
||||
|
||||
sPtr->flags.continuous = 1;
|
||||
|
||||
WMAddNotificationObserver(realizeObserver, sPtr,
|
||||
@@ -103,6 +107,36 @@ WMCreateSlider(WMWidget *parent)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WMSetSliderImage(WMSlider *sPtr, WMPixmap *pixmap)
|
||||
{
|
||||
if (sPtr->backPixmap)
|
||||
WMReleasePixmap(sPtr->backPixmap);
|
||||
|
||||
sPtr->backPixmap = WMRetainPixmap(pixmap);
|
||||
|
||||
if (sPtr->view->flags.mapped) {
|
||||
paintSlider(sPtr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
WMSetSliderKnobThickness(WMSlider *sPtr, int thickness)
|
||||
{
|
||||
assert(thickness > 0);
|
||||
|
||||
sPtr->knobThickness = thickness;
|
||||
|
||||
if (sPtr->knobPixmap) {
|
||||
makeKnobPixmap(sPtr);
|
||||
}
|
||||
|
||||
if (sPtr->view->flags.mapped) {
|
||||
paintSlider(sPtr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
WMGetSliderMinValue(WMSlider *slider)
|
||||
@@ -204,16 +238,18 @@ makeKnobPixmap(Slider *sPtr)
|
||||
|
||||
if (sPtr->flags.vertical) {
|
||||
w = sPtr->view->size.width-2;
|
||||
h = SLIDER_LENGTH;
|
||||
h = sPtr->knobThickness;
|
||||
} else {
|
||||
w = SLIDER_LENGTH;
|
||||
w = sPtr->knobThickness;
|
||||
h = sPtr->view->size.height-2;
|
||||
}
|
||||
|
||||
pix = XCreatePixmap(scr->display, sPtr->view->window, w, h, scr->depth);
|
||||
XFillRectangle(scr->display, pix, W_GC(scr->gray), 0, 0, w, h);
|
||||
|
||||
if (sPtr->flags.vertical) {
|
||||
if (sPtr->knobThickness < 10) {
|
||||
W_DrawRelief(scr, pix, 0, 0, w, h, WRRaised);
|
||||
} else if (sPtr->flags.vertical) {
|
||||
XDrawLine(scr->display, pix, W_GC(scr->white), 0, 0, 0, h-3);
|
||||
XDrawLine(scr->display, pix, W_GC(scr->white), 1, 0, 1, h-3);
|
||||
XDrawLine(scr->display, pix, W_GC(scr->darkGray), w-2, 1, w-2, h/2-2);
|
||||
@@ -222,8 +258,9 @@ makeKnobPixmap(Slider *sPtr)
|
||||
XDrawLine(scr->display, pix, W_GC(scr->white), 0, 0, w-2, 0);
|
||||
XDrawLine(scr->display, pix, W_GC(scr->darkGray), 1, h/2-2, w-3, h/2-2);
|
||||
XDrawLine(scr->display, pix, W_GC(scr->white), 0, h/2-1, w-3, h/2-1);
|
||||
|
||||
XDrawLine(scr->display, pix, W_GC(scr->black), w-1, 0, w-1, h-2);
|
||||
|
||||
|
||||
XDrawLine(scr->display, pix, W_GC(scr->darkGray), 0, h-3, w-2, h-3);
|
||||
XDrawLine(scr->display, pix, W_GC(scr->black), 0, h-2, w-1, h-2);
|
||||
XDrawLine(scr->display, pix, W_GC(scr->darkGray), 0, h-1, w-1,h-1);
|
||||
@@ -231,16 +268,19 @@ makeKnobPixmap(Slider *sPtr)
|
||||
XDrawLine(scr->display, pix, W_GC(scr->white), 0, 0, w-3, 0);
|
||||
|
||||
XDrawLine(scr->display, pix, W_GC(scr->white), 0, 0, 0, h-2);
|
||||
|
||||
XDrawLine(scr->display, pix, W_GC(scr->white), 1, 0, 1, h-3);
|
||||
XDrawLine(scr->display, pix, W_GC(scr->darkGray), w/2-2, 1, w/2-2, h-3);
|
||||
XDrawLine(scr->display, pix, W_GC(scr->white), w/2-1, 0, w/2-1, h-3);
|
||||
|
||||
XDrawLine(scr->display, pix, W_GC(scr->darkGray), w-3, 0, w-3, h-2);
|
||||
XDrawLine(scr->display, pix, W_GC(scr->black), w-2, 0, w-2, h-2);
|
||||
XDrawLine(scr->display, pix, W_GC(scr->darkGray), w-1, 0, w-1, h-1);
|
||||
|
||||
|
||||
XDrawLine(scr->display, pix, W_GC(scr->black), 1, h-1, w/2+1, h-1);
|
||||
XDrawLine(scr->display, pix, W_GC(scr->darkGray), 1, h-2, w/2-2, h-2);
|
||||
XDrawLine(scr->display, pix, W_GC(scr->darkGray), w/2, h-2, w-3,h-2);
|
||||
|
||||
XDrawLine(scr->display, pix, W_GC(scr->black), 0, h-1, w-2, h-1);
|
||||
}
|
||||
|
||||
@@ -305,20 +345,30 @@ paintSlider(Slider *sPtr)
|
||||
|
||||
buffer = XCreatePixmap(scr->display, sPtr->view->window,
|
||||
size.width, size.height, scr->depth);
|
||||
XFillRectangle(scr->display, buffer, lgc, 0, 0, size.width, size.height);
|
||||
XFillRectangle(scr->display, buffer, scr->stippleGC, 0, 0, size.width,
|
||||
size.height);
|
||||
|
||||
if (sPtr->backPixmap) {
|
||||
WMSize size = WMGetPixmapSize(sPtr->backPixmap);
|
||||
|
||||
XCopyArea(scr->display, WMGetPixmapXID(sPtr->backPixmap),
|
||||
buffer, scr->copyGC, 0, 0, size.width, size.height, 1, 1);
|
||||
} else {
|
||||
XFillRectangle(scr->display, buffer, lgc, 0, 0, size.width,
|
||||
size.height);
|
||||
XFillRectangle(scr->display, buffer, scr->stippleGC, 0, 0, size.width,
|
||||
size.height);
|
||||
}
|
||||
|
||||
if (sPtr->flags.vertical) {
|
||||
pos = (size.height-2-SLIDER_LENGTH)*(POSV-MINV)/(MAXV-MINV)+1;
|
||||
pos = (size.height-2-sPtr->knobThickness)*(POSV-MINV)/(MAXV-MINV)+1;
|
||||
/* draw knob */
|
||||
XCopyArea(scr->display, sPtr->knobPixmap, buffer,
|
||||
scr->copyGC, 0, 0, size.width-2, SLIDER_LENGTH, 1, pos);
|
||||
scr->copyGC, 0, 0, size.width-2, sPtr->knobThickness,
|
||||
1, pos);
|
||||
} else {
|
||||
pos = (size.width-2-SLIDER_LENGTH)*(POSV-MINV)/(MAXV-MINV)+1;
|
||||
pos = (size.width-2-sPtr->knobThickness)*(POSV-MINV)/(MAXV-MINV)+1;
|
||||
/* draw knob */
|
||||
XCopyArea(scr->display, sPtr->knobPixmap, buffer,
|
||||
scr->copyGC, 0, 0, SLIDER_LENGTH, size.height, pos, 1);
|
||||
scr->copyGC, 0, 0, sPtr->knobThickness, size.height, pos, 1);
|
||||
}
|
||||
|
||||
XDrawLine(scr->display, buffer, bgc, 0, 0, 0, size.height-1);
|
||||
@@ -373,18 +423,18 @@ getSliderPart(Slider *sPtr, int x, int y)
|
||||
|
||||
if (sPtr->flags.vertical) {
|
||||
p = y;
|
||||
pos = (size.height-2-SLIDER_LENGTH)*(POSV-MINV)/(MAXV-MINV);
|
||||
pos = (size.height-2-sPtr->knobThickness)*(POSV-MINV)/(MAXV-MINV);
|
||||
if (p < pos)
|
||||
return INCR_PART;
|
||||
if (p > pos + SLIDER_LENGTH)
|
||||
if (p > pos + sPtr->knobThickness)
|
||||
return DECR_PART;
|
||||
return KNOB_PART;
|
||||
} else {
|
||||
p = x;
|
||||
pos = (size.width-2-SLIDER_LENGTH)*(POSV-MINV)/(MAXV-MINV);
|
||||
pos = (size.width-2-sPtr->knobThickness)*(POSV-MINV)/(MAXV-MINV);
|
||||
if (p < pos)
|
||||
return DECR_PART;
|
||||
if (p > pos + SLIDER_LENGTH)
|
||||
if (p > pos + sPtr->knobThickness)
|
||||
return INCR_PART;
|
||||
return KNOB_PART;
|
||||
}
|
||||
@@ -396,11 +446,13 @@ valueForMousePoint(Slider *sPtr, int x, int y)
|
||||
{
|
||||
WMSize size = sPtr->view->size;
|
||||
int f;
|
||||
|
||||
|
||||
if (sPtr->flags.vertical) {
|
||||
f = (y-SLIDER_LENGTH/2)*(MAXV-MINV)/((int)size.height-2-SLIDER_LENGTH);
|
||||
f = (y-sPtr->knobThickness/2)*(MAXV-MINV)
|
||||
/ ((int)size.height-2-sPtr->knobThickness);
|
||||
} else {
|
||||
f = (x-SLIDER_LENGTH/2)*(MAXV-MINV)/((int)size.width-2-SLIDER_LENGTH);
|
||||
f = (x-sPtr->knobThickness/2)*(MAXV-MINV)
|
||||
/ ((int)size.width-2-sPtr->knobThickness);
|
||||
}
|
||||
|
||||
f += sPtr->minValue;
|
||||
@@ -408,6 +460,7 @@ valueForMousePoint(Slider *sPtr, int x, int y)
|
||||
f = sPtr->minValue;
|
||||
else if (f > sPtr->maxValue)
|
||||
f = sPtr->maxValue;
|
||||
|
||||
return f;
|
||||
}
|
||||
|
||||
@@ -427,13 +480,13 @@ handleActionEvents(XEvent *event, void *data)
|
||||
else {
|
||||
#ifdef STRICT_NEXT_BEHAVIOUR
|
||||
sPtr->flags.dragging = 1;
|
||||
|
||||
|
||||
sPtr->value = valueForMousePoint(sPtr, event->xmotion.x,
|
||||
event->xmotion.y);
|
||||
paintSlider(sPtr);
|
||||
#else
|
||||
int tmp;
|
||||
|
||||
|
||||
tmp = valueForMousePoint(sPtr, event->xmotion.x, event->xmotion.y);
|
||||
if (tmp < sPtr->value)
|
||||
tmp = sPtr->value-1;
|
||||
@@ -447,14 +500,14 @@ handleActionEvents(XEvent *event, void *data)
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case ButtonRelease:
|
||||
if (!sPtr->flags.continuous && sPtr->flags.dragging && sPtr->action) {
|
||||
(*sPtr->action)(sPtr, sPtr->clientData);
|
||||
}
|
||||
sPtr->flags.dragging = 0;
|
||||
break;
|
||||
|
||||
|
||||
case MotionNotify:
|
||||
if (sPtr->flags.dragging) {
|
||||
sPtr->value = valueForMousePoint(sPtr, event->xmotion.x,
|
||||
@@ -476,7 +529,10 @@ destroySlider(Slider *sPtr)
|
||||
{
|
||||
if (sPtr->knobPixmap)
|
||||
XFreePixmap(sPtr->view->screen->display, sPtr->knobPixmap);
|
||||
|
||||
|
||||
if (sPtr->backPixmap)
|
||||
WMReleasePixmap(sPtr->backPixmap);
|
||||
|
||||
free(sPtr);
|
||||
}
|
||||
|
||||
|
||||
@@ -273,41 +273,18 @@ testSlider(WMScreen *scr)
|
||||
s = WMCreateSlider(win);
|
||||
WMResizeWidget(s, 16, 100);
|
||||
WMMoveWidget(s, 100, 100);
|
||||
WMSetSliderKnobThickness(s, 8);
|
||||
|
||||
s = WMCreateSlider(win);
|
||||
WMResizeWidget(s, 100, 16);
|
||||
WMMoveWidget(s, 100, 10);
|
||||
WMSetSliderKnobThickness(s, 8);
|
||||
|
||||
WMRealizeWidget(win);
|
||||
WMMapSubwidgets(win);
|
||||
WMMapWidget(win);
|
||||
}
|
||||
|
||||
#if 0
|
||||
void
|
||||
testText(WMScreen *scr)
|
||||
{
|
||||
WMWindow *win;
|
||||
WMSimpleText *text;
|
||||
|
||||
windowCount++;
|
||||
|
||||
win = WMCreateWindow(scr, "testText");
|
||||
WMResizeWidget(win, 300, 300);
|
||||
WMSetWindowTitle(win, "Text");
|
||||
|
||||
WMSetWindowCloseAction(win, closeAction, NULL);
|
||||
|
||||
text = WMCreateSimpleText(win);
|
||||
WMResizeWidget(text, 280, 280);
|
||||
WMMoveWidget(text, 10, 10);
|
||||
|
||||
WMRealizeWidget(win);
|
||||
WMMapSubwidgets(win);
|
||||
WMMapWidget(win);
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
testTextField(WMScreen *scr)
|
||||
{
|
||||
@@ -424,13 +401,15 @@ int main(int argc, char **argv)
|
||||
*
|
||||
* Put the testSomething() function you want to test here.
|
||||
*/
|
||||
#if 1
|
||||
#if 0
|
||||
testOpenFilePanel(scr);
|
||||
testFontPanel(scr);
|
||||
testList(scr);
|
||||
testGradientButtons(scr);
|
||||
testScrollView(scr);
|
||||
#endif
|
||||
testColorWell(scr);
|
||||
#if 1
|
||||
testSlider(scr);
|
||||
testTextField(scr);
|
||||
testPullDown(scr);
|
||||
|
||||
@@ -36,6 +36,8 @@ typedef struct W_TextField {
|
||||
short usableWidth;
|
||||
short offsetWidth; /* offset of text from border */
|
||||
|
||||
WMRange selection;
|
||||
|
||||
#if 0
|
||||
WMHandlerID timerID; /* for cursor blinking */
|
||||
#endif
|
||||
@@ -191,7 +193,7 @@ WMCreateTextField(WMWidget *parent)
|
||||
WMSetTextFieldBordered(tPtr, DEFAULT_BORDERED);
|
||||
tPtr->flags.alignment = DEFAULT_ALIGNMENT;
|
||||
tPtr->offsetWidth = (tPtr->view->size.height
|
||||
- tPtr->view->screen->normalFont->height)/2;
|
||||
- WMFontHeight(tPtr->view->screen->normalFont))/2;
|
||||
|
||||
WMCreateEventHandler(tPtr->view, EnterWindowMask|LeaveWindowMask
|
||||
|ButtonPressMask|KeyPressMask|Button1MotionMask,
|
||||
@@ -307,8 +309,12 @@ WMSetTextFieldText(WMTextField *tPtr, char *text)
|
||||
}
|
||||
strcpy(tPtr->text, text);
|
||||
}
|
||||
/*
|
||||
if (tPtr->textLen < tPtr->cursorPosition)
|
||||
tPtr->cursorPosition = tPtr->textLen;
|
||||
*/
|
||||
tPtr->cursorPosition = 0;
|
||||
tPtr->viewPosition = 0;
|
||||
|
||||
if (tPtr->view->flags.realized)
|
||||
paintTextField(tPtr);
|
||||
@@ -370,7 +376,7 @@ resizeTextField(WMTextField *tPtr, unsigned int width, unsigned int height)
|
||||
W_ResizeView(tPtr->view, width, height);
|
||||
|
||||
tPtr->offsetWidth = (tPtr->view->size.height
|
||||
- tPtr->view->screen->normalFont->height)/2;
|
||||
- WMFontHeight(tPtr->view->screen->normalFont))/2;
|
||||
|
||||
tPtr->usableWidth = tPtr->view->size.width - 2*tPtr->offsetWidth;
|
||||
}
|
||||
@@ -477,7 +483,7 @@ paintTextField(TextField *tPtr)
|
||||
&(tPtr->text[tPtr->viewPosition]),
|
||||
tPtr->textLen - tPtr->viewPosition);
|
||||
|
||||
th = screen->normalFont->height;
|
||||
th = WMFontHeight(screen->normalFont);
|
||||
|
||||
ty = tPtr->offsetWidth;
|
||||
switch (tPtr->flags.alignment) {
|
||||
|
||||
@@ -144,8 +144,9 @@ createView(W_Screen *screen, W_View *parent)
|
||||
view->attribFlags = CWEventMask|CWBitGravity;
|
||||
view->attribs = defAtts;
|
||||
|
||||
view->attribFlags |= CWBackPixel|CWColormap;
|
||||
view->attribFlags |= CWBackPixel|CWColormap|CWBorderPixel;
|
||||
view->attribs.background_pixel = W_PIXEL(screen->gray);
|
||||
view->attribs.border_pixel = W_PIXEL(screen->black);
|
||||
view->attribs.colormap = screen->colormap;
|
||||
|
||||
adoptChildView(parent, view);
|
||||
|
||||
236
WPrefs.app/Appearance.c
Normal file
236
WPrefs.app/Appearance.c
Normal file
@@ -0,0 +1,236 @@
|
||||
/* TextureAndColor.c- color/texture for titlebar etc.
|
||||
*
|
||||
* WPrefs - Window Maker Preferences Program
|
||||
*
|
||||
* Copyright (c) 1999 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 "WPrefs.h"
|
||||
|
||||
#include "TexturePanel.h"
|
||||
|
||||
typedef struct _Panel {
|
||||
WMFrame *frame;
|
||||
char *sectionName;
|
||||
|
||||
CallbackRec callbacks;
|
||||
|
||||
WMWindow *win;
|
||||
|
||||
WMLabel *prevL;
|
||||
|
||||
WMPopUpButton *secP;
|
||||
|
||||
/* texture list */
|
||||
WMLabel *texL;
|
||||
WMList *texLs;
|
||||
|
||||
WMPopUpButton *cmdP;
|
||||
WMTextField *texT;
|
||||
|
||||
WMButton *editB;
|
||||
|
||||
/* for preview shit */
|
||||
Pixmap preview;
|
||||
Pixmap ftitle;
|
||||
Pixmap utitle;
|
||||
Pixmap otitle;
|
||||
Pixmap icon;
|
||||
Pixmap back;
|
||||
Pixmap mtitle;
|
||||
Pixmap mitem;
|
||||
} _Panel;
|
||||
|
||||
|
||||
|
||||
|
||||
#define ICON_FILE "appearance"
|
||||
|
||||
|
||||
#define FTITLE (1<<0)
|
||||
#define UTITLE (1<<1)
|
||||
#define OTITLE (1<<2)
|
||||
#define ICON (1<<3)
|
||||
#define BACK (1<<4)
|
||||
#define MTITLE (1<<5)
|
||||
#define MITEM (1<<6)
|
||||
#define EVERYTHING 0xff
|
||||
|
||||
|
||||
static Pixmap
|
||||
renderTexture(_Panel *panel, char *texture, int width, int height,
|
||||
Bool bordered)
|
||||
{
|
||||
return None;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
updatePreviewBox(_Panel *panel, int elements)
|
||||
{
|
||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
||||
Display *dpy = WMScreenDisplay(scr);
|
||||
/* RContext *rc = WMScreenRContext(scr);*/
|
||||
int refresh = 0;
|
||||
char *tmp;
|
||||
|
||||
if (!panel->preview) {
|
||||
panel->preview = XCreatePixmap(dpy, WMWidgetXID(panel->win),
|
||||
220-4, 185-4, WMScreenDepth(scr));
|
||||
|
||||
refresh = -1;
|
||||
}
|
||||
|
||||
if (elements & FTITLE) {
|
||||
if (panel->ftitle)
|
||||
XFreePixmap(dpy, panel->ftitle);
|
||||
|
||||
panel->ftitle = renderTexture(panel, tmp, 180, 20, True);
|
||||
free(tmp);
|
||||
}
|
||||
|
||||
/* have to repaint everything to make things simple, eliminating
|
||||
* clipping stuff */
|
||||
if (refresh) {
|
||||
|
||||
}
|
||||
|
||||
if (refresh<0) {
|
||||
WMPixmap *pix;
|
||||
pix = WMCreatePixmapFromXPixmaps(scr, panel->preview, None,
|
||||
220-4, 185-4, WMScreenDepth(scr));
|
||||
|
||||
WMSetLabelImage(panel->prevL, pix);
|
||||
WMReleasePixmap(pix);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
static char*
|
||||
getStrArrayForKey(char *key)
|
||||
{
|
||||
proplist_t v;
|
||||
|
||||
v = GetObjectForKey(key);
|
||||
if (!v)
|
||||
return NULL;
|
||||
|
||||
return PLGetDescription(v);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
createPanel(Panel *p)
|
||||
{
|
||||
_Panel *panel = (_Panel*)p;
|
||||
WMColor *color;
|
||||
WMFont *boldFont;
|
||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
||||
|
||||
panel->frame = WMCreateFrame(panel->win);
|
||||
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
|
||||
WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP);
|
||||
|
||||
/* preview box */
|
||||
panel->prevL = WMCreateLabel(panel->frame);
|
||||
WMResizeWidget(panel->prevL, 260, 190);
|
||||
WMMoveWidget(panel->prevL, 10, 10);
|
||||
WMSetLabelRelief(panel->prevL, WRSunken);
|
||||
|
||||
panel->secP = WMCreatePopUpButton(panel->frame);
|
||||
WMResizeWidget(panel->secP, 242, 20);
|
||||
WMMoveWidget(panel->secP, 10, 207);
|
||||
// WMSetPopUpButtonAction(panel->secP, changePage, panel);
|
||||
|
||||
|
||||
/* texture list */
|
||||
boldFont = WMBoldSystemFontOfSize(scr, 12);
|
||||
|
||||
panel->texL = WMCreateLabel(panel->frame);
|
||||
WMResizeWidget(panel->texL, 225, 18);
|
||||
WMMoveWidget(panel->texL, 285, 10);
|
||||
WMSetLabelFont(panel->texL, boldFont);
|
||||
WMSetLabelText(panel->texL, _("Textures"));
|
||||
WMSetLabelRelief(panel->texL, WRSunken);
|
||||
WMSetLabelTextAlignment(panel->texL, WACenter);
|
||||
color = WMDarkGrayColor(scr);
|
||||
WMSetWidgetBackgroundColor(panel->texL, color);
|
||||
WMReleaseColor(color);
|
||||
color = WMWhiteColor(scr);
|
||||
WMSetLabelTextColor(panel->texL, color);
|
||||
WMReleaseColor(color);
|
||||
|
||||
WMReleaseFont(boldFont);
|
||||
|
||||
|
||||
panel->texLs = WMCreateList(panel->frame);
|
||||
WMResizeWidget(panel->texLs, 225, 144);
|
||||
WMMoveWidget(panel->texLs, 285, 30);
|
||||
|
||||
panel->cmdP = WMCreatePopUpButton(panel->frame);
|
||||
WMResizeWidget(panel->cmdP, 225, 20);
|
||||
WMMoveWidget(panel->cmdP, 285, 180);
|
||||
WMSetPopUpButtonPullsDown(panel->cmdP, True);
|
||||
WMSetPopUpButtonText(panel->cmdP, _("Texture Commands"));
|
||||
WMAddPopUpButtonItem(panel->cmdP, _("Create New"));
|
||||
WMAddPopUpButtonItem(panel->cmdP, _("Add From Text Field"));
|
||||
WMAddPopUpButtonItem(panel->cmdP, _("Remove Selected"));
|
||||
WMAddPopUpButtonItem(panel->cmdP, _("Extract From File"));
|
||||
|
||||
panel->editB = WMCreateCommandButton(panel->frame);
|
||||
WMResizeWidget(panel->editB, 64, 20);
|
||||
WMMoveWidget(panel->editB, 260, 207);
|
||||
WMSetButtonText(panel->editB, _("Browse..."));
|
||||
|
||||
panel->texT = WMCreateTextField(panel->frame);
|
||||
WMResizeWidget(panel->texT, 176, 20);
|
||||
WMMoveWidget(panel->texT, 330, 207);
|
||||
|
||||
/**/
|
||||
|
||||
WMRealizeWidget(panel->frame);
|
||||
WMMapSubwidgets(panel->frame);
|
||||
|
||||
WMSetPopUpButtonSelectedItem(panel->secP, 0);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Panel*
|
||||
InitAppearance(WMScreen *scr, WMWindow *win)
|
||||
{
|
||||
_Panel *panel;
|
||||
|
||||
panel = wmalloc(sizeof(_Panel));
|
||||
memset(panel, 0, sizeof(_Panel));
|
||||
|
||||
panel->sectionName = _("Appearance Preferences");
|
||||
|
||||
panel->win = win;
|
||||
|
||||
panel->callbacks.createWidgets = createPanel;
|
||||
|
||||
AddSection(panel, ICON_FILE);
|
||||
|
||||
return panel;
|
||||
}
|
||||
@@ -355,7 +355,7 @@ createPanel(Panel *p)
|
||||
panel->ignB = WMCreateSwitchButton(panel->optF);
|
||||
WMResizeWidget(panel->ignB, 210, 50);
|
||||
WMMoveWidget(panel->ignB, 15, 10);
|
||||
WMSetButtonText(panel->ignB, _("Do not let aplications receive the "\
|
||||
WMSetButtonText(panel->ignB, _("Do not let applications receive the "\
|
||||
"click used to focus windows."));
|
||||
|
||||
panel->newB = WMCreateSwitchButton(panel->optF);
|
||||
|
||||
@@ -45,7 +45,11 @@ typedef struct _Panel {
|
||||
WMButton *defB;
|
||||
|
||||
WMLabel *instructionsL;
|
||||
|
||||
|
||||
WMColor *white;
|
||||
WMColor *black;
|
||||
WMFont *font;
|
||||
|
||||
/**/
|
||||
char capturing;
|
||||
char **shortcuts;
|
||||
@@ -71,6 +75,7 @@ static char *keyOptions[] = {
|
||||
"LowerKey",
|
||||
"RaiseLowerKey",
|
||||
"ShadeKey",
|
||||
"MoveResizeKey",
|
||||
"SelectKey",
|
||||
"FocusNextKey",
|
||||
"FocusPrevKey",
|
||||
@@ -92,6 +97,14 @@ static char *keyOptions[] = {
|
||||
"WindowShortcut2Key",
|
||||
"WindowShortcut3Key",
|
||||
"WindowShortcut4Key",
|
||||
#ifdef EXTEND_WINDOWSHORTCUT
|
||||
"WindowShortcut5Key",
|
||||
"WindowShortcut6Key",
|
||||
"WindowShortcut7Key",
|
||||
"WindowShortcut8Key",
|
||||
"WindowShortcut9Key",
|
||||
"WindowShortcut10Key",
|
||||
#endif
|
||||
"ClipRaiseKey",
|
||||
"ClipLowerKey",
|
||||
#ifndef XKB_MODELOCK
|
||||
@@ -180,6 +193,8 @@ captureClick(WMWidget *w, void *data)
|
||||
if (panel->shortcuts[row])
|
||||
free(panel->shortcuts[row]);
|
||||
panel->shortcuts[row] = shortcut;
|
||||
|
||||
WMRedisplayWidget(panel->actLs);
|
||||
} else {
|
||||
free(shortcut);
|
||||
}
|
||||
@@ -205,6 +220,7 @@ clearShortcut(WMWidget *w, void *data)
|
||||
if (panel->shortcuts[row])
|
||||
free(panel->shortcuts[row]);
|
||||
panel->shortcuts[row]=NULL;
|
||||
WMRedisplayWidget(panel->actLs);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -226,6 +242,7 @@ typedKeys(void *observerData, WMNotification *notification)
|
||||
free(panel->shortcuts[row]);
|
||||
panel->shortcuts[row] = NULL;
|
||||
}
|
||||
WMRedisplayWidget(panel->actLs);
|
||||
}
|
||||
|
||||
|
||||
@@ -281,6 +298,40 @@ showData(_Panel *panel)
|
||||
panel->shortcuts[i] = NULL;
|
||||
}
|
||||
}
|
||||
WMRedisplayWidget(panel->actLs);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
paintItem(WMList *lPtr, int index, Drawable d, char *text, int state,
|
||||
WMRect *rect)
|
||||
{
|
||||
int width, height, x, y;
|
||||
_Panel *panel = (_Panel*)WMGetHangedData(lPtr);
|
||||
WMScreen *scr = WMWidgetScreen(lPtr);
|
||||
Display *dpy = WMScreenDisplay(scr);
|
||||
|
||||
width = rect->size.width;
|
||||
height = rect->size.height;
|
||||
x = rect->pos.x;
|
||||
y = rect->pos.y;
|
||||
|
||||
if (state & WLDSSelected)
|
||||
XFillRectangle(dpy, d, WMColorGC(panel->white), x, y, width,
|
||||
height);
|
||||
else
|
||||
XClearArea(dpy, d, x, y, width, height, False);
|
||||
|
||||
if (panel->shortcuts[index]) {
|
||||
WMPixmap *pix = WMGetSystemPixmap(scr, WSICheckMark);
|
||||
WMSize size = WMGetPixmapSize(pix);
|
||||
|
||||
WMDrawPixmap(pix, d, x+(20-size.width)/2, (height-size.height)/2+y);
|
||||
WMReleasePixmap(pix);
|
||||
}
|
||||
|
||||
WMDrawString(scr, d, WMColorGC(panel->black), panel->font, x+20, y,
|
||||
text, strlen(text));
|
||||
}
|
||||
|
||||
|
||||
@@ -318,6 +369,8 @@ createPanel(Panel *p)
|
||||
panel->actLs = WMCreateList(panel->frame);
|
||||
WMResizeWidget(panel->actLs, 280, 190);
|
||||
WMMoveWidget(panel->actLs, 20, 32);
|
||||
WMSetListUserDrawProc(panel->actLs, paintItem);
|
||||
WMHangData(panel->actLs, panel);
|
||||
|
||||
WMAddListItem(panel->actLs, _("Open applications menu"));
|
||||
WMAddListItem(panel->actLs, _("Open window list menu"));
|
||||
@@ -332,6 +385,7 @@ createPanel(Panel *p)
|
||||
WMAddListItem(panel->actLs, _("Raise/Lower window under mouse pointer"));
|
||||
WMAddListItem(panel->actLs, _("Shade active window"));
|
||||
WMAddListItem(panel->actLs, _("Select active window"));
|
||||
WMAddListItem(panel->actLs, _("Move/Resize active window"));
|
||||
WMAddListItem(panel->actLs, _("Focus next window"));
|
||||
WMAddListItem(panel->actLs, _("Focus previous window"));
|
||||
WMAddListItem(panel->actLs, _("Switch to next workspace"));
|
||||
@@ -448,7 +502,11 @@ InitKeyboardShortcuts(WMScreen *scr, WMWindow *win)
|
||||
|
||||
panel->callbacks.createWidgets = createPanel;
|
||||
panel->callbacks.updateDomain = storeData;
|
||||
|
||||
|
||||
panel->white = WMWhiteColor(scr);
|
||||
panel->black = WMBlackColor(scr);
|
||||
panel->font = WMSystemFontOfSize(scr, 12);
|
||||
|
||||
AddSection(panel, ICON_FILE);
|
||||
|
||||
return panel;
|
||||
|
||||
@@ -18,6 +18,7 @@ WPrefs_SOURCES = \
|
||||
main.c \
|
||||
WPrefs.c \
|
||||
WPrefs.h \
|
||||
Appearance.c \
|
||||
Configurations.c \
|
||||
Expert.c \
|
||||
Focus.c \
|
||||
@@ -33,6 +34,7 @@ WPrefs_SOURCES = \
|
||||
TextureAndColor.c \
|
||||
TexturePanel.c \
|
||||
TexturePanel.h \
|
||||
Themes.c \
|
||||
WindowHandling.c \
|
||||
Workspace.c \
|
||||
double.c \
|
||||
@@ -56,8 +58,8 @@ WPrefs_DEPENDENCIES = $(top_builddir)/WINGs/libWINGs.a
|
||||
|
||||
WPrefs_LDADD = \
|
||||
$(top_builddir)/WINGs/libWINGs.a\
|
||||
$(top_builddir)/wrlib/libwraster.a \
|
||||
$(top_builddir)/libPropList/libPropList.a \
|
||||
$(top_builddir)/wrlib/libwraster.la \
|
||||
$(top_builddir)/libPropList/libPropList.la \
|
||||
@GFXLFLAGS@ \
|
||||
@XLFLAGS@ \
|
||||
@GFXLIBS@ \
|
||||
|
||||
@@ -69,6 +69,9 @@ I18N = @I18N@
|
||||
I18N_MB = @I18N_MB@
|
||||
ICONEXT = @ICONEXT@
|
||||
INTLIBS = @INTLIBS@
|
||||
LD = @LD@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LITE = @LITE@
|
||||
LN_S = @LN_S@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MOFILES = @MOFILES@
|
||||
@@ -110,6 +113,7 @@ WPrefs_SOURCES = \
|
||||
main.c \
|
||||
WPrefs.c \
|
||||
WPrefs.h \
|
||||
Appearance.c \
|
||||
Configurations.c \
|
||||
Expert.c \
|
||||
Focus.c \
|
||||
@@ -125,6 +129,7 @@ WPrefs_SOURCES = \
|
||||
TextureAndColor.c \
|
||||
TexturePanel.c \
|
||||
TexturePanel.h \
|
||||
Themes.c \
|
||||
WindowHandling.c \
|
||||
Workspace.c \
|
||||
double.c \
|
||||
@@ -147,8 +152,8 @@ WPrefs_DEPENDENCIES = $(top_builddir)/WINGs/libWINGs.a
|
||||
|
||||
WPrefs_LDADD = \
|
||||
$(top_builddir)/WINGs/libWINGs.a\
|
||||
$(top_builddir)/wrlib/libwraster.a \
|
||||
$(top_builddir)/libPropList/libPropList.a \
|
||||
$(top_builddir)/wrlib/libwraster.la \
|
||||
$(top_builddir)/libPropList/libPropList.la \
|
||||
@GFXLFLAGS@ \
|
||||
@XLFLAGS@ \
|
||||
@GFXLIBS@ \
|
||||
@@ -168,15 +173,16 @@ LIBS = @LIBS@
|
||||
X_CFLAGS = @X_CFLAGS@
|
||||
X_LIBS = @X_LIBS@
|
||||
X_PRE_LIBS = @X_PRE_LIBS@
|
||||
WPrefs_OBJECTS = main.o WPrefs.o Configurations.o Expert.o Focus.o \
|
||||
Icons.o KeyboardSettings.o KeyboardShortcuts.o Menu.o MenuPreferences.o \
|
||||
MouseSettings.o Paths.o Preferences.o Text.o TextureAndColor.o \
|
||||
TexturePanel.o WindowHandling.o Workspace.o double.o MenuGuru.o \
|
||||
xmodifier.o
|
||||
WPrefs_OBJECTS = main.o WPrefs.o Appearance.o Configurations.o Expert.o \
|
||||
Focus.o Icons.o KeyboardSettings.o KeyboardShortcuts.o Menu.o \
|
||||
MenuPreferences.o MouseSettings.o Paths.o Preferences.o Text.o \
|
||||
TextureAndColor.o TexturePanel.o Themes.o WindowHandling.o Workspace.o \
|
||||
double.o MenuGuru.o xmodifier.o
|
||||
WPrefs_LDFLAGS =
|
||||
CFLAGS = @CFLAGS@
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
||||
LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
||||
LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
DATA = $(wpdata_DATA)
|
||||
|
||||
DIST_COMMON = README Makefile.am Makefile.in
|
||||
@@ -192,7 +198,7 @@ OBJECTS = $(WPrefs_OBJECTS)
|
||||
all: all-recursive all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .o .s
|
||||
.SUFFIXES: .S .c .lo .o .s
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu WPrefs.app/Makefile
|
||||
|
||||
@@ -215,8 +221,8 @@ install-wpexecbinPROGRAMS: $(wpexecbin_PROGRAMS)
|
||||
$(mkinstalldirs) $(DESTDIR)$(wpexecbindir)
|
||||
@list='$(wpexecbin_PROGRAMS)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(wpexecbindir)/`echo $$p|sed '$(transform)'`"; \
|
||||
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(wpexecbindir)/`echo $$p|sed '$(transform)'`; \
|
||||
echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(wpexecbindir)/`echo $$p|sed '$(transform)'`"; \
|
||||
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(wpexecbindir)/`echo $$p|sed '$(transform)'`; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
@@ -245,6 +251,25 @@ distclean-compile:
|
||||
|
||||
maintainer-clean-compile:
|
||||
|
||||
.c.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
|
||||
.s.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
|
||||
.S.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
|
||||
maintainer-clean-libtool:
|
||||
|
||||
WPrefs: $(WPrefs_OBJECTS) $(WPrefs_DEPENDENCIES)
|
||||
@rm -f WPrefs
|
||||
$(LINK) $(WPrefs_LDFLAGS) $(WPrefs_OBJECTS) $(WPrefs_LDADD) $(LIBS)
|
||||
@@ -397,17 +422,20 @@ maintainer-clean-generic:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean-am: mostlyclean-wpexecbinPROGRAMS mostlyclean-compile \
|
||||
mostlyclean-tags mostlyclean-generic
|
||||
mostlyclean-libtool mostlyclean-tags \
|
||||
mostlyclean-generic
|
||||
|
||||
clean-am: clean-wpexecbinPROGRAMS clean-compile clean-tags \
|
||||
clean-generic mostlyclean-am
|
||||
clean-am: clean-wpexecbinPROGRAMS clean-compile clean-libtool \
|
||||
clean-tags clean-generic mostlyclean-am
|
||||
|
||||
distclean-am: distclean-wpexecbinPROGRAMS distclean-compile \
|
||||
distclean-tags distclean-generic clean-am
|
||||
distclean-libtool distclean-tags distclean-generic \
|
||||
clean-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-wpexecbinPROGRAMS \
|
||||
maintainer-clean-compile maintainer-clean-tags \
|
||||
maintainer-clean-generic distclean-am
|
||||
maintainer-clean-compile maintainer-clean-libtool \
|
||||
maintainer-clean-tags maintainer-clean-generic \
|
||||
distclean-am
|
||||
|
||||
mostlyclean: mostlyclean-recursive mostlyclean-am
|
||||
|
||||
@@ -415,6 +443,7 @@ clean: clean-recursive clean-am
|
||||
|
||||
distclean: distclean-recursive distclean-am
|
||||
-rm -f config.status
|
||||
-rm -f libtool
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive maintainer-clean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@@ -424,11 +453,13 @@ maintainer-clean: maintainer-clean-recursive maintainer-clean-am
|
||||
clean-wpexecbinPROGRAMS maintainer-clean-wpexecbinPROGRAMS \
|
||||
uninstall-wpexecbinPROGRAMS install-wpexecbinPROGRAMS \
|
||||
mostlyclean-compile distclean-compile clean-compile \
|
||||
maintainer-clean-compile uninstall-wpdataDATA install-wpdataDATA \
|
||||
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-compile mostlyclean-libtool distclean-libtool \
|
||||
clean-libtool maintainer-clean-libtool uninstall-wpdataDATA \
|
||||
install-wpdataDATA 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 dvi \
|
||||
installcheck all-am install-exec-am install-data-am uninstall-am \
|
||||
|
||||
@@ -546,15 +546,24 @@ browserClick(WMWidget *w, void *data)
|
||||
|
||||
if (isMenu(item)) {
|
||||
updateForItemType(panel, TNothing);
|
||||
|
||||
WMSetPopUpButtonEnabled(panel->cmd2P, True);
|
||||
return;
|
||||
} else {
|
||||
int column = WMGetBrowserSelectedColumn(panel->browser);
|
||||
|
||||
if (column == WMGetBrowserNumberOfColumns(panel->browser)-1
|
||||
&& column > 0)
|
||||
WMSetPopUpButtonEnabled(panel->cmd2P, True);
|
||||
else
|
||||
WMSetPopUpButtonEnabled(panel->cmd2P, False);
|
||||
|
||||
if (column==WMGetBrowserFirstVisibleColumn(panel->browser)) {
|
||||
/* second column is empty, because selected item is not a submenu */
|
||||
WMSetTextFieldText(panel->tit2T, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
if (WMGetBrowserSelectedColumn(panel->browser)==
|
||||
WMGetBrowserFirstVisibleColumn(panel->browser)) {
|
||||
/* second column is empty, because selected item is not a submenu */
|
||||
WMSetTextFieldText(panel->tit2T, NULL);
|
||||
}
|
||||
|
||||
command = getItemCommand(item);
|
||||
|
||||
WMSetTextFieldText(panel->shoT, getItemShortcut(item));
|
||||
|
||||
@@ -633,8 +633,8 @@ createPanel(Panel *p)
|
||||
WMSetFrameTitle(panel->menuF, _("Workspace Mouse Actions"));
|
||||
|
||||
panel->disaB = WMCreateSwitchButton(panel->menuF);
|
||||
WMResizeWidget(panel->disaB, 185, 19);
|
||||
WMMoveWidget(panel->disaB, 20, 20);
|
||||
WMResizeWidget(panel->disaB, 205, 18);
|
||||
WMMoveWidget(panel->disaB, 10, 20);
|
||||
WMSetButtonText(panel->disaB, _("Disable mouse actions"));
|
||||
|
||||
panel->mblL = WMCreateLabel(panel->menuF);
|
||||
|
||||
@@ -223,7 +223,8 @@ listClick(WMWidget *w, void *data)
|
||||
|
||||
|
||||
static void
|
||||
paintItem(WMList *lPtr, Drawable d, char *text, int state, WMRect *rect)
|
||||
paintItem(WMList *lPtr, int index, Drawable d, char *text, int state,
|
||||
WMRect *rect)
|
||||
{
|
||||
int width, height, x, y;
|
||||
_Panel *panel = (_Panel*)WMGetHangedData(lPtr);
|
||||
|
||||
@@ -33,6 +33,17 @@ the contents of the ~/GNUstep/Defaults directory before using it.
|
||||
|
||||
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
Like Window Maker, WPrefs is distributed with through the General Public
|
||||
License (as stated in the file COPYING). As an exception, the icons and
|
||||
original graphical artwork included with WPrefs has the additional
|
||||
restriction that they must not be redistributed without the rest of the
|
||||
Window Maker distribution. In other words, you can use and distribute the
|
||||
WPrefs icons freely, as long as they are distributed for use with Window
|
||||
Maker (ripping the icons and putting them in your program is prohibited).
|
||||
|
||||
|
||||
Notes
|
||||
-----
|
||||
|
||||
@@ -114,7 +114,7 @@ char *WMGetColorWellRGBString(WMColorWell *cPtr) {
|
||||
*/
|
||||
static void buttonCallback(WMWidget *self, void *data);
|
||||
static void renderTextureButtons (_TexturePanel *panel);
|
||||
static void paintListItem(WMList *lPtr, Drawable d, char *text, int state, WMRect *rect);
|
||||
static void paintListItem(WMList *lPtr, int index, Drawable d, char *text, int state, WMRect *rect);
|
||||
static void notificationObserver(void *self, WMNotification *notif);
|
||||
|
||||
static void
|
||||
@@ -139,7 +139,7 @@ notificationObserver(void *self, WMNotification *notif)
|
||||
|
||||
|
||||
static void
|
||||
paintListItem(WMList *lPtr, Drawable d, char *text, int state, WMRect *rect)
|
||||
paintListItem(WMList *lPtr, int index, Drawable d, char *text, int state, WMRect *rect)
|
||||
{
|
||||
WMScreen *scr;
|
||||
int width, height, x, y;
|
||||
|
||||
262
WPrefs.app/Themes.c
Normal file
262
WPrefs.app/Themes.c
Normal file
@@ -0,0 +1,262 @@
|
||||
/* Themes.c- Theme stuff
|
||||
*
|
||||
* WPrefs - Window Maker Preferences Program
|
||||
*
|
||||
* 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 "WPrefs.h"
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
typedef struct _Panel {
|
||||
WMFrame *frame;
|
||||
|
||||
char *sectionName;
|
||||
|
||||
CallbackRec callbacks;
|
||||
|
||||
WMWindow *win;
|
||||
|
||||
WMButton *saveB;
|
||||
WMList *list;
|
||||
WMButton *loadB;
|
||||
WMButton *instB;
|
||||
|
||||
WMFrame *totF;
|
||||
WMButton *totB;
|
||||
WMLabel *totL;
|
||||
|
||||
WMFrame *botF;
|
||||
WMButton *botB;
|
||||
WMLabel *botL;
|
||||
|
||||
pid_t tilePID;
|
||||
pid_t barPID;
|
||||
} _Panel;
|
||||
|
||||
|
||||
|
||||
#define ICON_FILE "theme"
|
||||
|
||||
|
||||
static void
|
||||
showData(_Panel *panel)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
finishedTileDownload(void *data)
|
||||
{
|
||||
_Panel *panel = (_Panel*)data;
|
||||
|
||||
WMSetButtonText(panel->totB, _("Set"));
|
||||
panel->tilePID = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
finishedBarDownload(void *data)
|
||||
{
|
||||
_Panel *panel = (_Panel*)data;
|
||||
|
||||
WMSetButtonText(panel->botB, _("Set"));
|
||||
panel->barPID = 0;
|
||||
}
|
||||
|
||||
|
||||
static pid_t
|
||||
downloadFile(WMScreen *scr, _Panel *panel, char *file)
|
||||
{
|
||||
pid_t pid;
|
||||
|
||||
pid = fork();
|
||||
if (pid < 0) {
|
||||
wsyserror("could not fork() process");
|
||||
|
||||
WMRunAlertPanel(scr, panel->win, _("Error"),
|
||||
"Could not start download. fork() failed",
|
||||
_("OK"), NULL, NULL);
|
||||
return -1;
|
||||
}
|
||||
if (pid != 0) {
|
||||
return pid;
|
||||
}
|
||||
|
||||
close(ConnectionNumber(WMScreenDisplay(scr)));
|
||||
|
||||
|
||||
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
downloadCallback(WMWidget *w, void *data)
|
||||
{
|
||||
_Panel *panel = (_Panel*)data;
|
||||
pid_t newPid;
|
||||
WMButton *button = (WMButton*)w;
|
||||
pid_t *pid;
|
||||
|
||||
if (button == panel->totB) {
|
||||
pid = &panel->tilePID;
|
||||
} else {
|
||||
pid = &panel->barPID;
|
||||
}
|
||||
|
||||
if (*pid == 0) {
|
||||
newPid = downloadFile(WMWidgetScreen(w), panel, NULL);
|
||||
if (newPid < 0) {
|
||||
return;
|
||||
}
|
||||
WMSetButtonText(button, _("Stop"));
|
||||
|
||||
if (button == panel->totB) {
|
||||
AddDeadChildHandler(newPid, finishedTileDownload, data);
|
||||
} else {
|
||||
AddDeadChildHandler(newPid, finishedBarDownload, data);
|
||||
}
|
||||
*pid = newPid;
|
||||
} else {
|
||||
*pid = 0;
|
||||
|
||||
WMSetButtonText(button, _("Download"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
updateThemeList(_Panel *panel)
|
||||
{
|
||||
WMClearList(panel->list);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
createPanel(Panel *p)
|
||||
{
|
||||
_Panel *panel = (_Panel*)p;
|
||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
||||
|
||||
panel->frame = WMCreateFrame(panel->win);
|
||||
WMResizeWidget(panel->frame, FRAME_WIDTH, FRAME_HEIGHT);
|
||||
WMMoveWidget(panel->frame, FRAME_LEFT, FRAME_TOP);
|
||||
|
||||
panel->saveB = WMCreateCommandButton(panel->frame);
|
||||
WMResizeWidget(panel->saveB, 154, 24);
|
||||
WMMoveWidget(panel->saveB, 15, 10);
|
||||
WMSetButtonText(panel->saveB, _("Save Current Theme"));
|
||||
|
||||
panel->list = WMCreateList(panel->frame);
|
||||
WMResizeWidget(panel->list, 154, 150);
|
||||
WMMoveWidget(panel->list, 15, 40);
|
||||
|
||||
panel->loadB = WMCreateCommandButton(panel->frame);
|
||||
WMResizeWidget(panel->loadB, 74, 24);
|
||||
WMMoveWidget(panel->loadB, 15, 200);
|
||||
WMSetButtonText(panel->loadB, _("Load"));
|
||||
|
||||
panel->instB = WMCreateCommandButton(panel->frame);
|
||||
WMResizeWidget(panel->instB, 74, 24);
|
||||
WMMoveWidget(panel->instB, 95, 200);
|
||||
WMSetButtonText(panel->instB, _("Install"));
|
||||
|
||||
|
||||
/**************** Tile of the day ****************/
|
||||
|
||||
panel->totF = WMCreateFrame(panel->frame);
|
||||
WMResizeWidget(panel->totF, 210, 105);
|
||||
WMMoveWidget(panel->totF, 240, 10);
|
||||
WMSetFrameTitle(panel->totF, _("Tile of The Day"));
|
||||
|
||||
panel->totL = WMCreateLabel(panel->totF);
|
||||
WMResizeWidget(panel->totL, 67, 67);
|
||||
WMMoveWidget(panel->totL, 25, 25);
|
||||
WMSetLabelRelief(panel->totL, WRSunken);
|
||||
|
||||
panel->totB = WMCreateCommandButton(panel->totF);
|
||||
WMResizeWidget(panel->totB, 86, 24);
|
||||
WMMoveWidget(panel->totB, 105, 45);
|
||||
WMSetButtonText(panel->totB, _("Download"));
|
||||
WMSetButtonAction(panel->totB, downloadCallback, panel);
|
||||
|
||||
WMMapSubwidgets(panel->totF);
|
||||
|
||||
/**************** Bar of the day ****************/
|
||||
|
||||
panel->botF = WMCreateFrame(panel->frame);
|
||||
WMResizeWidget(panel->botF, 315, 95);
|
||||
WMMoveWidget(panel->botF, 190, 125);
|
||||
WMSetFrameTitle(panel->botF, _("Bar of The Day"));
|
||||
|
||||
panel->botL = WMCreateLabel(panel->botF);
|
||||
WMResizeWidget(panel->botL, 285, 32);
|
||||
WMMoveWidget(panel->botL, 15, 20);
|
||||
WMSetLabelRelief(panel->botL, WRSunken);
|
||||
|
||||
panel->botB = WMCreateCommandButton(panel->botF);
|
||||
WMResizeWidget(panel->botB, 86, 24);
|
||||
WMMoveWidget(panel->botB, 110, 60);
|
||||
WMSetButtonText(panel->botB, _("Download"));
|
||||
WMSetButtonAction(panel->botB, downloadCallback, panel);
|
||||
|
||||
WMMapSubwidgets(panel->botF);
|
||||
|
||||
WMRealizeWidget(panel->frame);
|
||||
WMMapSubwidgets(panel->frame);
|
||||
|
||||
showData(panel);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
storeData(_Panel *panel)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
Panel*
|
||||
InitThemes(WMScreen *scr, WMWindow *win)
|
||||
{
|
||||
_Panel *panel;
|
||||
|
||||
panel = wmalloc(sizeof(_Panel));
|
||||
memset(panel, 0, sizeof(_Panel));
|
||||
|
||||
panel->sectionName = _("Themes");
|
||||
|
||||
panel->win = win;
|
||||
|
||||
panel->callbacks.createWidgets = createPanel;
|
||||
panel->callbacks.updateDomain = storeData;
|
||||
|
||||
AddSection(panel, ICON_FILE);
|
||||
|
||||
return panel;
|
||||
}
|
||||
@@ -39,8 +39,6 @@ extern Panel *InitFocus(WMScreen *scr, WMWindow *win);
|
||||
|
||||
extern Panel *InitPreferences(WMScreen *scr, WMWindow *win);
|
||||
|
||||
extern Panel *InitTextureAndColor(WMScreen *scr, WMWindow *win);
|
||||
|
||||
extern Panel *InitText(WMScreen *scr, WMWindow *win);
|
||||
|
||||
extern Panel *InitConfigurations(WMScreen *scr, WMWindow *win);
|
||||
@@ -55,6 +53,13 @@ extern Panel *InitMenuPreferences(WMScreen *scr, WMWindow *win);
|
||||
|
||||
extern Panel *InitIcons(WMScreen *scr, WMWindow *win);
|
||||
|
||||
extern Panel *InitThemes(WMScreen *scr, WMWindow *win);
|
||||
|
||||
extern Panel *InitTextureAndColor(WMScreen *scr, WMWindow *win);
|
||||
|
||||
extern Panel *InitAppearance(WMScreen *scr, WMWindow *win);
|
||||
|
||||
|
||||
|
||||
#define MAX_SECTIONS 16
|
||||
|
||||
@@ -506,15 +511,21 @@ Initialize(WMScreen *scr)
|
||||
#endif
|
||||
InitKeyboardShortcuts(scr, WPrefs.win);
|
||||
InitMouseSettings(scr, WPrefs.win);
|
||||
|
||||
#ifdef not_yet_fully_implemented
|
||||
InitTextureAndColor(scr, WPrefs.win);
|
||||
InitAppearance(scr, WPrefs.win);
|
||||
InitText(scr, WPrefs.win);
|
||||
InitThemes(scr, WPrefs.win);
|
||||
#endif
|
||||
InitExpert(scr, WPrefs.win);
|
||||
|
||||
WMRealizeWidget(WPrefs.scrollV);
|
||||
|
||||
WMSetLabelText(WPrefs.statusL, "This program is still under development. Backup your ~/GNUstep/Defaults directory, before using it.");
|
||||
WMSetLabelText(WPrefs.statusL,
|
||||
"WPrefs is free software and is distributed WITHOUT ANY "
|
||||
"WARRANTY under the terms of the GNU General Public License."
|
||||
"Redistribution of the icons in this program separately from the program itself is prohibited.");
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -555,7 +566,7 @@ loadConfigurations(WMScreen *scr, WMWindow *mainw)
|
||||
file = popen("wmaker -version", "r");
|
||||
if (!file || !fgets(buffer, 1023, file)) {
|
||||
wsyserror(_("could not extract version information from Window Maker"));
|
||||
wfatal(_("Make sure Window Maker is in your search path."));
|
||||
wfatal(_("Make sure wmaker is in your search path."));
|
||||
|
||||
WMRunAlertPanel(scr, mainw, _("Error"),
|
||||
_("Could not extract version from Window Maker. Make sure it is correctly installed and is in your PATH environment variable."),
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
@@ -36,8 +37,12 @@
|
||||
#include <WINGs.h>
|
||||
#include <WUtil.h>
|
||||
|
||||
/** some config options **/
|
||||
#undef EXTEND_WINDOWSHORTCUT
|
||||
|
||||
#define WVERSION "0.8"
|
||||
/****/
|
||||
|
||||
#define WVERSION "0.9"
|
||||
#define WMVERSION "0.20.x"
|
||||
|
||||
|
||||
@@ -63,6 +68,7 @@ typedef struct PanelRec {
|
||||
} PanelRec;
|
||||
|
||||
|
||||
|
||||
void AddSection(Panel *panel, char *iconFile);
|
||||
|
||||
char *LocateImage(char *name);
|
||||
@@ -93,6 +99,11 @@ void SetBoolForKey(Bool value, char *defaultName);
|
||||
|
||||
void SetSpeedForKey(int speed, char *defaultName);
|
||||
|
||||
|
||||
|
||||
void AddDeadChildHandler(pid_t pid, void (*handler)(void*), void *data);
|
||||
|
||||
|
||||
#define FRAME_TOP 105
|
||||
#define FRAME_LEFT -2
|
||||
#define FRAME_WIDTH 524
|
||||
|
||||
@@ -21,11 +21,27 @@
|
||||
|
||||
#include "WPrefs.h"
|
||||
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <X11/Xlocale.h>
|
||||
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
|
||||
extern void Initialize(WMScreen *scr);
|
||||
|
||||
#define MAX_DEATHS 64
|
||||
|
||||
struct {
|
||||
pid_t pid;
|
||||
void *data;
|
||||
void (*handler)(void*);
|
||||
} DeadHandlers[MAX_DEATHS];
|
||||
|
||||
|
||||
static pid_t DeadChildren[MAX_DEATHS];
|
||||
static int DeadChildrenCount = 0;
|
||||
|
||||
|
||||
void
|
||||
@@ -60,6 +76,38 @@ print_help(char *progname)
|
||||
}
|
||||
|
||||
|
||||
|
||||
static RETSIGTYPE
|
||||
handleDeadChild(int sig)
|
||||
{
|
||||
pid_t pid;
|
||||
int status;
|
||||
|
||||
pid = waitpid(-1, &status, WNOHANG);
|
||||
if (pid > 0) {
|
||||
DeadChildren[DeadChildrenCount++] = pid;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AddDeadChildHandler(pid_t pid, void (*handler)(void*), void *data)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < MAX_DEATHS; i++) {
|
||||
if (DeadHandlers[i].pid == 0) {
|
||||
DeadHandlers[i].pid = pid;
|
||||
DeadHandlers[i].handler = handler;
|
||||
DeadHandlers[i].data = data;
|
||||
break;
|
||||
}
|
||||
}
|
||||
assert(i!=MAX_DEATHS);
|
||||
}
|
||||
|
||||
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
@@ -69,6 +117,8 @@ main(int argc, char **argv)
|
||||
int i;
|
||||
char *display_name="";
|
||||
|
||||
memset(DeadHandlers, 0, sizeof(DeadHandlers));
|
||||
|
||||
WMInitializeApplication("WPrefs", &argc, argv);
|
||||
|
||||
if (argc>1) {
|
||||
@@ -128,8 +178,20 @@ main(int argc, char **argv)
|
||||
|
||||
while (1) {
|
||||
XEvent event;
|
||||
|
||||
|
||||
WMNextEvent(dpy, &event);
|
||||
|
||||
while (DeadChildrenCount-- > 0) {
|
||||
int i;
|
||||
|
||||
for (i=0; i<MAX_DEATHS; i++) {
|
||||
if (DeadChildren[i] == DeadHandlers[i].pid) {
|
||||
(*DeadHandlers[i].handler)(DeadHandlers[i].data);
|
||||
DeadHandlers[i].pid = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
WMHandleEvent(&event);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ POTFILES = \
|
||||
$(top_builddir)/WPrefs/Configurations.c \
|
||||
$(top_builddir)/WPrefs/Expert.c \
|
||||
$(top_builddir)/WPrefs/Focus.c \
|
||||
$(top_builddir)/WPrefs/Icons.c \
|
||||
$(top_builddir)/WPrefs/KeyboardSettings.c \
|
||||
$(top_builddir)/WPrefs/KeyboardShortcuts.c \
|
||||
$(top_builddir)/WPrefs/Menu.c \
|
||||
@@ -20,6 +21,7 @@ POTFILES = \
|
||||
$(top_builddir)/WPrefs/Preferences.c \
|
||||
$(top_builddir)/WPrefs/Text.c \
|
||||
$(top_builddir)/WPrefs/TextureAndColor.c \
|
||||
$(top_builddir)/WPrefs/Themes.c \
|
||||
$(top_builddir)/WPrefs/WPrefs.c \
|
||||
$(top_builddir)/WPrefs/WindowHandling.c \
|
||||
$(top_builddir)/WPrefs/Workspace.c \
|
||||
|
||||
@@ -69,6 +69,9 @@ I18N = @I18N@
|
||||
I18N_MB = @I18N_MB@
|
||||
ICONEXT = @ICONEXT@
|
||||
INTLIBS = @INTLIBS@
|
||||
LD = @LD@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LITE = @LITE@
|
||||
LN_S = @LN_S@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MOFILES = @MOFILES@
|
||||
@@ -102,6 +105,7 @@ POTFILES = \
|
||||
$(top_builddir)/WPrefs/Configurations.c \
|
||||
$(top_builddir)/WPrefs/Expert.c \
|
||||
$(top_builddir)/WPrefs/Focus.c \
|
||||
$(top_builddir)/WPrefs/Icons.c \
|
||||
$(top_builddir)/WPrefs/KeyboardSettings.c \
|
||||
$(top_builddir)/WPrefs/KeyboardShortcuts.c \
|
||||
$(top_builddir)/WPrefs/Menu.c \
|
||||
@@ -112,6 +116,7 @@ POTFILES = \
|
||||
$(top_builddir)/WPrefs/Preferences.c \
|
||||
$(top_builddir)/WPrefs/Text.c \
|
||||
$(top_builddir)/WPrefs/TextureAndColor.c \
|
||||
$(top_builddir)/WPrefs/Themes.c \
|
||||
$(top_builddir)/WPrefs/WPrefs.c \
|
||||
$(top_builddir)/WPrefs/WindowHandling.c \
|
||||
$(top_builddir)/WPrefs/Workspace.c \
|
||||
@@ -196,6 +201,7 @@ clean: clean-generic mostlyclean
|
||||
|
||||
distclean: distclean-generic clean
|
||||
-rm -f config.status
|
||||
-rm -f libtool
|
||||
|
||||
maintainer-clean: maintainer-clean-generic distclean
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
|
||||
1027
WPrefs.app/po/cs.po
1027
WPrefs.app/po/cs.po
File diff suppressed because it is too large
Load Diff
2542
WPrefs.app/po/hr.po
2542
WPrefs.app/po/hr.po
File diff suppressed because it is too large
Load Diff
2538
WPrefs.app/po/ko.po
2538
WPrefs.app/po/ko.po
File diff suppressed because it is too large
Load Diff
@@ -69,6 +69,9 @@ I18N = @I18N@
|
||||
I18N_MB = @I18N_MB@
|
||||
ICONEXT = @ICONEXT@
|
||||
INTLIBS = @INTLIBS@
|
||||
LD = @LD@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LITE = @LITE@
|
||||
LN_S = @LN_S@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MOFILES = @MOFILES@
|
||||
@@ -250,6 +253,7 @@ clean: clean-generic mostlyclean
|
||||
|
||||
distclean: distclean-generic clean
|
||||
-rm -f config.status
|
||||
-rm -f libtool
|
||||
|
||||
maintainer-clean: maintainer-clean-generic distclean
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
|
||||
@@ -69,6 +69,9 @@ I18N = @I18N@
|
||||
I18N_MB = @I18N_MB@
|
||||
ICONEXT = @ICONEXT@
|
||||
INTLIBS = @INTLIBS@
|
||||
LD = @LD@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LITE = @LITE@
|
||||
LN_S = @LN_S@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MOFILES = @MOFILES@
|
||||
@@ -250,6 +253,7 @@ clean: clean-generic mostlyclean
|
||||
|
||||
distclean: distclean-generic clean
|
||||
-rm -f config.status
|
||||
-rm -f libtool
|
||||
|
||||
maintainer-clean: maintainer-clean-generic distclean
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 18 KiB |
@@ -1,6 +1,6 @@
|
||||
|
||||
defsdatadir = $(pkgdatadir)/Backgrounds
|
||||
|
||||
defsdata_DATA = BlueImage.jpeg SeaNight.jpeg BlueWaves.jpeg
|
||||
defsdata_DATA = BlueImage.jpeg
|
||||
|
||||
EXTRA_DIST = $(defsdata_DATA)
|
||||
|
||||
@@ -69,6 +69,9 @@ I18N = @I18N@
|
||||
I18N_MB = @I18N_MB@
|
||||
ICONEXT = @ICONEXT@
|
||||
INTLIBS = @INTLIBS@
|
||||
LD = @LD@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LITE = @LITE@
|
||||
LN_S = @LN_S@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MOFILES = @MOFILES@
|
||||
@@ -92,7 +95,7 @@ wprefsdir = @wprefsdir@
|
||||
|
||||
defsdatadir = $(pkgdatadir)/Backgrounds
|
||||
|
||||
defsdata_DATA = BlueImage.jpeg SeaNight.jpeg BlueWaves.jpeg
|
||||
defsdata_DATA = BlueImage.jpeg
|
||||
|
||||
EXTRA_DIST = $(defsdata_DATA)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
@@ -193,6 +196,7 @@ clean: clean-generic mostlyclean
|
||||
|
||||
distclean: distclean-generic clean
|
||||
-rm -f config.status
|
||||
-rm -f libtool
|
||||
|
||||
maintainer-clean: maintainer-clean-generic distclean
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
|
||||
@@ -69,6 +69,9 @@ I18N = @I18N@
|
||||
I18N_MB = @I18N_MB@
|
||||
ICONEXT = @ICONEXT@
|
||||
INTLIBS = @INTLIBS@
|
||||
LD = @LD@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LITE = @LITE@
|
||||
LN_S = @LN_S@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MOFILES = @MOFILES@
|
||||
@@ -195,6 +198,7 @@ clean: clean-generic mostlyclean
|
||||
|
||||
distclean: distclean-generic clean
|
||||
-rm -f config.status
|
||||
-rm -f libtool
|
||||
|
||||
maintainer-clean: maintainer-clean-generic distclean
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Dock = {
|
||||
Applications = (
|
||||
{
|
||||
Command = "";
|
||||
Command = "-";
|
||||
Name = Logo.WMDock;
|
||||
AutoLaunch = No;
|
||||
Forced = No;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Dock = {
|
||||
Applications = (
|
||||
{
|
||||
Command = "";
|
||||
Command = "-";
|
||||
Name = Logo.WMDock;
|
||||
AutoLaunch = No;
|
||||
Forced = No;
|
||||
|
||||
@@ -6,6 +6,13 @@
|
||||
WMSoundServer = {Icon = Sound.tiff;};
|
||||
XTerm = {Icon = GNUterm.tiff;};
|
||||
NXTerm = {Icon = GNUterm.tiff;};
|
||||
ScilabGraphic0.Xscilab = {KeepInsideScreen=YES;};
|
||||
ScilabGraphic1.Xscilab = {KeepInsideScreen=YES;};
|
||||
ScilabGraphic2.Xscilab = {KeepInsideScreen=YES;};
|
||||
ScilabGraphic3.Xscilab = {KeepInsideScreen=YES;};
|
||||
ScilabGraphic4.Xscilab = {KeepInsideScreen=YES;};
|
||||
ScilabGraphic5.Xscilab = {KeepInsideScreen=YES;};
|
||||
ScilabGraphic6.Xscilab = {KeepInsideScreen=YES;};
|
||||
xcalc = {AlwaysUserIcon = Yes;Icon = "HP-16C-48.xpm";};
|
||||
Netscape = {Icon = Netscape.xpm;};
|
||||
Emacs = {Icon = ColorGNU.xpm;};
|
||||
|
||||
@@ -6,6 +6,13 @@
|
||||
WMSoundServer = {Icon = Sound.#extension#;};
|
||||
XTerm = {Icon = GNUterm.#extension#;};
|
||||
NXTerm = {Icon = GNUterm.#extension#;};
|
||||
ScilabGraphic0.Xscilab = {KeepInsideScreen=YES;};
|
||||
ScilabGraphic1.Xscilab = {KeepInsideScreen=YES;};
|
||||
ScilabGraphic2.Xscilab = {KeepInsideScreen=YES;};
|
||||
ScilabGraphic3.Xscilab = {KeepInsideScreen=YES;};
|
||||
ScilabGraphic4.Xscilab = {KeepInsideScreen=YES;};
|
||||
ScilabGraphic5.Xscilab = {KeepInsideScreen=YES;};
|
||||
ScilabGraphic6.Xscilab = {KeepInsideScreen=YES;};
|
||||
xcalc = {AlwaysUserIcon = Yes;Icon = "HP-16C-48.xpm";};
|
||||
Netscape = {Icon = Netscape.xpm;};
|
||||
Emacs = {Icon = ColorGNU.xpm;};
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
|
||||
defsdatadir = $(pkgdatadir)/IconSets
|
||||
|
||||
defsdata_DATA = Default
|
||||
defsdata_DATA = Default.iconset
|
||||
|
||||
EXTRA_DIST =
|
||||
|
||||
CLEANFILES = Default
|
||||
CLEANFILES = Default.iconset
|
||||
|
||||
Default: $(top_srcdir)/WindowMaker/Defaults/WMWindowAttributes ./Makefile
|
||||
-rm -f Default
|
||||
cp $(top_srcdir)/WindowMaker/Defaults/WMWindowAttributes Default
|
||||
chmod 644 Default
|
||||
Default.iconset: $(top_srcdir)/WindowMaker/Defaults/WMWindowAttributes ./Makefile
|
||||
-rm -f Default.iconset
|
||||
cp $(top_srcdir)/WindowMaker/Defaults/WMWindowAttributes Default.iconset
|
||||
chmod 644 Default.iconset
|
||||
|
||||
|
||||
|
||||
@@ -69,6 +69,9 @@ I18N = @I18N@
|
||||
I18N_MB = @I18N_MB@
|
||||
ICONEXT = @ICONEXT@
|
||||
INTLIBS = @INTLIBS@
|
||||
LD = @LD@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LITE = @LITE@
|
||||
LN_S = @LN_S@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MOFILES = @MOFILES@
|
||||
@@ -92,11 +95,11 @@ wprefsdir = @wprefsdir@
|
||||
|
||||
defsdatadir = $(pkgdatadir)/IconSets
|
||||
|
||||
defsdata_DATA = Default
|
||||
defsdata_DATA = Default.iconset
|
||||
|
||||
EXTRA_DIST =
|
||||
|
||||
CLEANFILES = Default
|
||||
CLEANFILES = Default.iconset
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../../src/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
@@ -195,6 +198,7 @@ clean: clean-generic mostlyclean
|
||||
|
||||
distclean: distclean-generic clean
|
||||
-rm -f config.status
|
||||
-rm -f libtool
|
||||
|
||||
maintainer-clean: maintainer-clean-generic distclean
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@@ -206,10 +210,10 @@ installdirs mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
Default: $(top_srcdir)/WindowMaker/Defaults/WMWindowAttributes ./Makefile
|
||||
-rm -f Default
|
||||
cp $(top_srcdir)/WindowMaker/Defaults/WMWindowAttributes Default
|
||||
chmod 644 Default
|
||||
Default.iconset: $(top_srcdir)/WindowMaker/Defaults/WMWindowAttributes ./Makefile
|
||||
-rm -f Default.iconset
|
||||
cp $(top_srcdir)/WindowMaker/Defaults/WMWindowAttributes Default.iconset
|
||||
chmod 644 Default.iconset
|
||||
|
||||
# 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.
|
||||
|
||||
@@ -69,6 +69,9 @@ I18N = @I18N@
|
||||
I18N_MB = @I18N_MB@
|
||||
ICONEXT = @ICONEXT@
|
||||
INTLIBS = @INTLIBS@
|
||||
LD = @LD@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LITE = @LITE@
|
||||
LN_S = @LN_S@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MOFILES = @MOFILES@
|
||||
@@ -202,6 +205,7 @@ clean: clean-generic mostlyclean
|
||||
|
||||
distclean: distclean-generic clean
|
||||
-rm -f config.status
|
||||
-rm -f libtool
|
||||
|
||||
maintainer-clean: maintainer-clean-generic distclean
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
|
||||
@@ -1,14 +1,37 @@
|
||||
SUBDIRS = Defaults Styles Themes Icons Pixmaps Backgrounds IconSets
|
||||
SUBDIRS = Backgrounds Defaults IconSets Icons Pixmaps Styles Themes
|
||||
|
||||
prefsdatadir = $(pkgdatadir)
|
||||
|
||||
prefsdata_DATA = wmmacros README menu plmenu autostart.sh exitscript.sh \
|
||||
menu.cz menu.de menu.fr menu.gl menu.ja menu.ko menu.nl menu.pt \
|
||||
menu.it menu.no menu.he menu.es menu.ru menu.tr menu.el menu.se \
|
||||
menu.fi menu.hr menu.dk menu.sl
|
||||
prefsdata_DATA =\
|
||||
README\
|
||||
README.themes\
|
||||
autostart.sh\
|
||||
exitscript.sh\
|
||||
menu\
|
||||
menu.cz\
|
||||
menu.de\
|
||||
menu.dk\
|
||||
menu.el\
|
||||
menu.es\
|
||||
menu.fi\
|
||||
menu.fr\
|
||||
menu.gl\
|
||||
menu.he\
|
||||
menu.hr\
|
||||
menu.hu\
|
||||
menu.it\
|
||||
menu.ja\
|
||||
menu.ko\
|
||||
menu.nl\
|
||||
menu.no\
|
||||
menu.pt\
|
||||
menu.ru\
|
||||
menu.se\
|
||||
menu.sl\
|
||||
menu.tr
|
||||
|
||||
|
||||
EXTRA_DIST = $(prefsdata_DATA) wmmacros.in plmenu.in plmenu.fr.in plmenu.hr.in
|
||||
EXTRA_DIST = $(prefsdata_DATA) mkMakefile wmmacros.in plmenu.in\
|
||||
plmenu.fr.in plmenu.hr.in
|
||||
|
||||
CLEANFILES = wmmacros plmenu
|
||||
|
||||
@@ -19,7 +42,6 @@ wmmacros: $(srcdir)/wmmacros.in ./Makefile
|
||||
$(srcdir)/wmmacros.in > wmmacros; \
|
||||
chmod 644 wmmacros
|
||||
|
||||
|
||||
plmenu: $(srcdir)/plmenu.in ./Makefile
|
||||
-rm -f plmenu
|
||||
|
||||
|
||||
@@ -69,6 +69,9 @@ I18N = @I18N@
|
||||
I18N_MB = @I18N_MB@
|
||||
ICONEXT = @ICONEXT@
|
||||
INTLIBS = @INTLIBS@
|
||||
LD = @LD@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LITE = @LITE@
|
||||
LN_S = @LN_S@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MOFILES = @MOFILES@
|
||||
@@ -90,16 +93,40 @@ X_LOCALE = @X_LOCALE@
|
||||
pixmapdir = @pixmapdir@
|
||||
wprefsdir = @wprefsdir@
|
||||
|
||||
SUBDIRS = Defaults Styles Themes Icons Pixmaps Backgrounds IconSets
|
||||
SUBDIRS = Backgrounds Defaults IconSets Icons Pixmaps Styles Themes
|
||||
|
||||
prefsdatadir = $(pkgdatadir)
|
||||
|
||||
prefsdata_DATA = wmmacros README menu plmenu autostart.sh exitscript.sh \
|
||||
menu.cz menu.de menu.fr menu.gl menu.ja menu.ko menu.nl menu.pt \
|
||||
menu.it menu.no menu.he menu.es menu.ru menu.tr menu.el menu.se \
|
||||
menu.fi menu.hr menu.dk menu.sl
|
||||
prefsdata_DATA =\
|
||||
README\
|
||||
README.themes\
|
||||
autostart.sh\
|
||||
exitscript.sh\
|
||||
menu\
|
||||
menu.cz\
|
||||
menu.de\
|
||||
menu.dk\
|
||||
menu.el\
|
||||
menu.es\
|
||||
menu.fi\
|
||||
menu.fr\
|
||||
menu.gl\
|
||||
menu.he\
|
||||
menu.hr\
|
||||
menu.hu\
|
||||
menu.it\
|
||||
menu.ja\
|
||||
menu.ko\
|
||||
menu.nl\
|
||||
menu.no\
|
||||
menu.pt\
|
||||
menu.ru\
|
||||
menu.se\
|
||||
menu.sl\
|
||||
menu.tr
|
||||
|
||||
EXTRA_DIST = $(prefsdata_DATA) wmmacros.in plmenu.in plmenu.fr.in plmenu.hr.in
|
||||
EXTRA_DIST = $(prefsdata_DATA) mkMakefile wmmacros.in plmenu.in\
|
||||
plmenu.fr.in plmenu.hr.in
|
||||
|
||||
CLEANFILES = wmmacros plmenu
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
@@ -285,6 +312,7 @@ clean: clean-recursive clean-am
|
||||
|
||||
distclean: distclean-recursive distclean-am
|
||||
-rm -f config.status
|
||||
-rm -f libtool
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive maintainer-clean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
|
||||
@@ -69,6 +69,9 @@ I18N = @I18N@
|
||||
I18N_MB = @I18N_MB@
|
||||
ICONEXT = @ICONEXT@
|
||||
INTLIBS = @INTLIBS@
|
||||
LD = @LD@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LITE = @LITE@
|
||||
LN_S = @LN_S@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MOFILES = @MOFILES@
|
||||
@@ -194,6 +197,7 @@ clean: clean-generic mostlyclean
|
||||
|
||||
distclean: distclean-generic clean
|
||||
-rm -f config.status
|
||||
-rm -f libtool
|
||||
|
||||
maintainer-clean: maintainer-clean-generic distclean
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
|
||||
85
WindowMaker/README.themes
Normal file
85
WindowMaker/README.themes
Normal file
@@ -0,0 +1,85 @@
|
||||
|
||||
|
||||
|
||||
Themes For Window Maker
|
||||
=======================
|
||||
|
||||
Note: the information contained in this file is only valid for themes
|
||||
in the .themed (for theme directory) format, supported in
|
||||
Window Maker 0.20.4 or newer.
|
||||
|
||||
|
||||
How To Install a Theme Pack
|
||||
===========================
|
||||
|
||||
To install a theme, unpack your theme into your theme directory,
|
||||
usually ~/GNUstep/Library/WindowMaker/Themes
|
||||
|
||||
cd ~/GNUstep/Library/WindowMaker/Themes
|
||||
gunzip -c xyztheme.tar.gz | tar xf -
|
||||
|
||||
|
||||
How To Load a Theme
|
||||
===================
|
||||
|
||||
Use the setstyle command to load a theme. Example:
|
||||
|
||||
setstyle xyztheme.themed
|
||||
|
||||
Note that if you move the directory of the theme (for example, from
|
||||
~/GNUstep/Library/WindowMaker/Themes to /usr/local/share/WindowMaker/Themes)
|
||||
you will have to reload that theme so that path information is updated.
|
||||
|
||||
|
||||
How To Make a Theme Pack
|
||||
========================
|
||||
|
||||
To create a theme pack from your current configuration, use the getstyle
|
||||
utility with the -p flag. Example:
|
||||
|
||||
getstyle -p MyTheme
|
||||
|
||||
This will create a theme pack named MyTheme.themed, containing everything
|
||||
it requires, including all pixmap files.
|
||||
|
||||
Additionally, you can put a text file named MyTheme.lsm in the MyTheme.themed
|
||||
directory. This file can contain info like copyrights, credits or whatever.
|
||||
|
||||
To distribute your theme, just make a .tar.gz of the .themed directory.
|
||||
|
||||
Example:
|
||||
|
||||
tar cf MyTheme.tar MyTheme.themed
|
||||
gzip MyTheme.tar
|
||||
|
||||
|
||||
How To Delete a Theme Pack
|
||||
==========================
|
||||
|
||||
Just remove the .themed directory. Example:
|
||||
|
||||
cd ~/GNUstep/Library/WindowMaker/Themes
|
||||
rm -fr themename.themed
|
||||
|
||||
|
||||
How To Save Disk Space
|
||||
======================
|
||||
|
||||
If you have more than 1 theme that use the same huge background image,
|
||||
you can delete all the duplicated files and then create hard links in
|
||||
place of them. For example, if you have:
|
||||
|
||||
theme1.themed/back.jpg
|
||||
|
||||
theme2.themed/backimage.jpg
|
||||
|
||||
theme3.themed/back.jpg
|
||||
|
||||
and all three files contain the same image, you can do:
|
||||
|
||||
rm theme2.themed/backimage.jpg
|
||||
rm theme3.themed/back.jpg
|
||||
ln theme1.themed/back.jpg theme2.themed/backimage.jpg
|
||||
ln theme1.themed/back.jpg theme3.themed/back.jpg
|
||||
|
||||
|
||||
0
WindowMaker/Styles/Autumn → WindowMaker/Styles/Autumn.style
Executable file → Normal file
0
WindowMaker/Styles/Autumn → WindowMaker/Styles/Autumn.style
Executable file → Normal file
0
WindowMaker/Styles/Black → WindowMaker/Styles/Black.style
Executable file → Normal file
0
WindowMaker/Styles/Black → WindowMaker/Styles/Black.style
Executable file → Normal file
19
WindowMaker/Styles/BlackTexture.style
Normal file
19
WindowMaker/Styles/BlackTexture.style
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
TitleJustify = center;
|
||||
HighlightColor = white;
|
||||
HighlightTextColor = black;
|
||||
ClipTitleColor = white;
|
||||
CClipTitleColor = gray60;
|
||||
FTitleColor = white;
|
||||
PTitleColor = white;
|
||||
UTitleColor = gray20;
|
||||
FTitleBack = (thgradient, "BlueImage.jpeg", 140, "rgb:30/32/3e", black);
|
||||
PTitleBack = (thgradient,"BlueImage.jpeg",140,"rgb:70/72/7e","rgb:45/47/4e");
|
||||
UTitleBack = (thgradient,"BlueImage.jpeg", 100,white,"rgb:9e/94/80");
|
||||
MenuTitleColor = white;
|
||||
MenuTextColor = white;
|
||||
MenuDisabledColor = gray60;
|
||||
MenuTitleBack = (thgradient, "BlueImage.jpeg", 140, "rgb:30/32/3e", black);
|
||||
MenuTextBack = (thgradient,"BlueImage.jpeg",140,"rgb:50/5a/5e","rgb:20/2a/2e");
|
||||
IconBack = (tdgradient, "BlueImage.jpeg", 140, "rgb:30/32/3e", black);
|
||||
}
|
||||
2
WindowMaker/Styles/Blue → WindowMaker/Styles/Blue.style
Executable file → Normal file
2
WindowMaker/Styles/Blue → WindowMaker/Styles/Blue.style
Executable file → Normal file
@@ -10,4 +10,6 @@ UTitleBack = (hgradient, "rgb:90/90/90", "rgb:c0/c0/c0");
|
||||
PTitleBack = (hgradient, "rgb:50/50/50", "rgb:80/80/80");
|
||||
MenuTitleBack = (hgradient, "rgb:20/20/70", "rgb:00/00/20");
|
||||
MenuTextBack = (hgradient, "rgb:c0/c0/c0", "rgb:90/90/90");
|
||||
IconTitleBack = "#101040";
|
||||
IconTitleColor = white;
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
{
|
||||
HighlightColor = white;
|
||||
HighlightTextColor = black;
|
||||
|
||||
FTitleColor = "white";
|
||||
PTitleColor = "white";
|
||||
UTitleColor = "gray";
|
||||
MenuTitleColor = "white";
|
||||
MenuDisabledColor = "gray50";
|
||||
MenuTextColor = "white";
|
||||
FTitleBack = (hgradient, "rgb:20/24/40","rgb:69/a6/e7");
|
||||
UTitleBack = (hgradient, "rgb:00/04/20","rgb:37/57/79");
|
||||
PTitleBack = (hgradient, "rgb:10/10/30","rgb:49/86/c7");
|
||||
MenuTitleBack = (hgradient, "rgb:20/24/40","rgb:69/a6/e7");
|
||||
MenuTextBack = (hgradient, "rgb:00/00/10","rgb:59/96/d7");
|
||||
}
|
||||
2
WindowMaker/Styles/BlueDawn → WindowMaker/Styles/BlueDawn.style
Executable file → Normal file
2
WindowMaker/Styles/BlueDawn → WindowMaker/Styles/BlueDawn.style
Executable file → Normal file
@@ -42,4 +42,4 @@
|
||||
"rgb:96/d7/e7"
|
||||
);
|
||||
IconBack = (mdgradient, "rgb:18/34/54", "rgb:28/45/69", "rgb:08/24/20");
|
||||
}
|
||||
}
|
||||
0
WindowMaker/Styles/BlueishGreen → WindowMaker/Styles/BlueishGreen.style
Executable file → Normal file
0
WindowMaker/Styles/BlueishGreen → WindowMaker/Styles/BlueishGreen.style
Executable file → Normal file
0
WindowMaker/Styles/Brown → WindowMaker/Styles/Brown.style
Executable file → Normal file
0
WindowMaker/Styles/Brown → WindowMaker/Styles/Brown.style
Executable file → Normal file
0
WindowMaker/Styles/Chumbo → WindowMaker/Styles/Chumbo.style
Executable file → Normal file
0
WindowMaker/Styles/Chumbo → WindowMaker/Styles/Chumbo.style
Executable file → Normal file
0
WindowMaker/Styles/Copper → WindowMaker/Styles/Copper.style
Executable file → Normal file
0
WindowMaker/Styles/Copper → WindowMaker/Styles/Copper.style
Executable file → Normal file
0
WindowMaker/Styles/DarkBlue → WindowMaker/Styles/DarkBlue.style
Executable file → Normal file
0
WindowMaker/Styles/DarkBlue → WindowMaker/Styles/DarkBlue.style
Executable file → Normal file
0
WindowMaker/Styles/DarkRed → WindowMaker/Styles/DarkRed.style
Executable file → Normal file
0
WindowMaker/Styles/DarkRed → WindowMaker/Styles/DarkRed.style
Executable file → Normal file
0
WindowMaker/Styles/Fire → WindowMaker/Styles/Fire.style
Executable file → Normal file
0
WindowMaker/Styles/Fire → WindowMaker/Styles/Fire.style
Executable file → Normal file
0
WindowMaker/Styles/Food → WindowMaker/Styles/Food.style
Executable file → Normal file
0
WindowMaker/Styles/Food → WindowMaker/Styles/Food.style
Executable file → Normal file
0
WindowMaker/Styles/Golden → WindowMaker/Styles/Golden.style
Executable file → Normal file
0
WindowMaker/Styles/Golden → WindowMaker/Styles/Golden.style
Executable file → Normal file
0
WindowMaker/Styles/Green → WindowMaker/Styles/Green.style
Executable file → Normal file
0
WindowMaker/Styles/Green → WindowMaker/Styles/Green.style
Executable file → Normal file
0
WindowMaker/Styles/GreyBlue → WindowMaker/Styles/GreyBlue.style
Executable file → Normal file
0
WindowMaker/Styles/GreyBlue → WindowMaker/Styles/GreyBlue.style
Executable file → Normal file
0
WindowMaker/Styles/Gtk → WindowMaker/Styles/Gtk.style
Executable file → Normal file
0
WindowMaker/Styles/Gtk → WindowMaker/Styles/Gtk.style
Executable file → Normal file
0
WindowMaker/Styles/LightBlue → WindowMaker/Styles/LightBlue.style
Executable file → Normal file
0
WindowMaker/Styles/LightBlue → WindowMaker/Styles/LightBlue.style
Executable file → Normal file
@@ -1,33 +1,33 @@
|
||||
defsdatadir = $(pkgdatadir)/Styles
|
||||
|
||||
defsdata_DATA = \
|
||||
Autumn\
|
||||
Black\
|
||||
Blue\
|
||||
BlueAluminum\
|
||||
BlueDawn\
|
||||
BlueishGreen\
|
||||
Brown\
|
||||
Chumbo\
|
||||
Copper\
|
||||
DarkBlue\
|
||||
DarkRed\
|
||||
Fire\
|
||||
Food\
|
||||
Golden\
|
||||
Green\
|
||||
GreyBlue\
|
||||
Gtk\
|
||||
LightBlue\
|
||||
Pastel\
|
||||
Pink\
|
||||
Pumpkin\
|
||||
Purple\
|
||||
Red\
|
||||
RednBlue\
|
||||
ShinyBrown\
|
||||
Summer\
|
||||
Traditional\
|
||||
VioletBlue
|
||||
prefsdatadir = $(pkgdatadir)/Styles
|
||||
|
||||
prefsdata_DATA =\
|
||||
Autumn.style\
|
||||
Black.style\
|
||||
BlackTexture.style\
|
||||
Blue.style\
|
||||
BlueDawn.style\
|
||||
BlueishGreen.style\
|
||||
Brown.style\
|
||||
Chumbo.style\
|
||||
Copper.style\
|
||||
DarkBlue.style\
|
||||
DarkRed.style\
|
||||
Fire.style\
|
||||
Food.style\
|
||||
Golden.style\
|
||||
Green.style\
|
||||
GreyBlue.style\
|
||||
Gtk.style\
|
||||
LightBlue.style\
|
||||
Pastel.style\
|
||||
Purple.style\
|
||||
Red.style\
|
||||
RednBlue.style\
|
||||
Summer.style\
|
||||
Traditional.style\
|
||||
VioletBlue.style
|
||||
|
||||
EXTRA_DIST = $(prefsdata_DATA)
|
||||
|
||||
|
||||
EXTRA_DIST = $(defsdata_DATA)
|
||||
|
||||
@@ -69,6 +69,9 @@ I18N = @I18N@
|
||||
I18N_MB = @I18N_MB@
|
||||
ICONEXT = @ICONEXT@
|
||||
INTLIBS = @INTLIBS@
|
||||
LD = @LD@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LITE = @LITE@
|
||||
LN_S = @LN_S@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MOFILES = @MOFILES@
|
||||
@@ -90,43 +93,40 @@ X_LOCALE = @X_LOCALE@
|
||||
pixmapdir = @pixmapdir@
|
||||
wprefsdir = @wprefsdir@
|
||||
|
||||
defsdatadir = $(pkgdatadir)/Styles
|
||||
prefsdatadir = $(pkgdatadir)/Styles
|
||||
|
||||
defsdata_DATA = \
|
||||
Autumn\
|
||||
Black\
|
||||
Blue\
|
||||
BlueAluminum\
|
||||
BlueDawn\
|
||||
BlueishGreen\
|
||||
Brown\
|
||||
Chumbo\
|
||||
Copper\
|
||||
DarkBlue\
|
||||
DarkRed\
|
||||
Fire\
|
||||
Food\
|
||||
Golden\
|
||||
Green\
|
||||
GreyBlue\
|
||||
Gtk\
|
||||
LightBlue\
|
||||
Pastel\
|
||||
Pink\
|
||||
Pumpkin\
|
||||
Purple\
|
||||
Red\
|
||||
RednBlue\
|
||||
ShinyBrown\
|
||||
Summer\
|
||||
Traditional\
|
||||
VioletBlue
|
||||
prefsdata_DATA =\
|
||||
Autumn.style\
|
||||
Black.style\
|
||||
BlackTexture.style\
|
||||
Blue.style\
|
||||
BlueDawn.style\
|
||||
BlueishGreen.style\
|
||||
Brown.style\
|
||||
Chumbo.style\
|
||||
Copper.style\
|
||||
DarkBlue.style\
|
||||
DarkRed.style\
|
||||
Fire.style\
|
||||
Food.style\
|
||||
Golden.style\
|
||||
Green.style\
|
||||
GreyBlue.style\
|
||||
Gtk.style\
|
||||
LightBlue.style\
|
||||
Pastel.style\
|
||||
Purple.style\
|
||||
Red.style\
|
||||
RednBlue.style\
|
||||
Summer.style\
|
||||
Traditional.style\
|
||||
VioletBlue.style
|
||||
|
||||
EXTRA_DIST = $(defsdata_DATA)
|
||||
EXTRA_DIST = $(prefsdata_DATA)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../../src/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
DATA = $(defsdata_DATA)
|
||||
DATA = $(prefsdata_DATA)
|
||||
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
|
||||
@@ -146,23 +146,23 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
|
||||
install-defsdataDATA: $(defsdata_DATA)
|
||||
install-prefsdataDATA: $(prefsdata_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(defsdatadir)
|
||||
@list='$(defsdata_DATA)'; for p in $$list; do \
|
||||
$(mkinstalldirs) $(DESTDIR)$(prefsdatadir)
|
||||
@list='$(prefsdata_DATA)'; for p in $$list; do \
|
||||
if test -f $(srcdir)/$$p; then \
|
||||
echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(defsdatadir)/$$p"; \
|
||||
$(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(defsdatadir)/$$p; \
|
||||
echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(prefsdatadir)/$$p"; \
|
||||
$(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(prefsdatadir)/$$p; \
|
||||
else if test -f $$p; then \
|
||||
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(defsdatadir)/$$p"; \
|
||||
$(INSTALL_DATA) $$p $(DESTDIR)$(defsdatadir)/$$p; \
|
||||
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(prefsdatadir)/$$p"; \
|
||||
$(INSTALL_DATA) $$p $(DESTDIR)$(prefsdatadir)/$$p; \
|
||||
fi; fi; \
|
||||
done
|
||||
|
||||
uninstall-defsdataDATA:
|
||||
uninstall-prefsdataDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(defsdata_DATA)'; for p in $$list; do \
|
||||
rm -f $(DESTDIR)$(defsdatadir)/$$p; \
|
||||
list='$(prefsdata_DATA)'; for p in $$list; do \
|
||||
rm -f $(DESTDIR)$(prefsdatadir)/$$p; \
|
||||
done
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
@@ -187,18 +187,18 @@ installcheck:
|
||||
install-exec:
|
||||
@$(NORMAL_INSTALL)
|
||||
|
||||
install-data: install-defsdataDATA
|
||||
install-data: install-prefsdataDATA
|
||||
@$(NORMAL_INSTALL)
|
||||
|
||||
install: install-exec install-data all
|
||||
@:
|
||||
|
||||
uninstall: uninstall-defsdataDATA
|
||||
uninstall: uninstall-prefsdataDATA
|
||||
|
||||
install-strip:
|
||||
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DATADIR)$(defsdatadir)
|
||||
$(mkinstalldirs) $(DATADIR)$(prefsdatadir)
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
@@ -221,12 +221,13 @@ clean: clean-generic mostlyclean
|
||||
|
||||
distclean: distclean-generic clean
|
||||
-rm -f config.status
|
||||
-rm -f libtool
|
||||
|
||||
maintainer-clean: maintainer-clean-generic distclean
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
.PHONY: uninstall-defsdataDATA install-defsdataDATA tags distdir info \
|
||||
.PHONY: uninstall-prefsdataDATA install-prefsdataDATA tags distdir info \
|
||||
dvi installcheck install-exec install-data install uninstall all \
|
||||
installdirs mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
0
WindowMaker/Styles/Pastel → WindowMaker/Styles/Pastel.style
Executable file → Normal file
0
WindowMaker/Styles/Pastel → WindowMaker/Styles/Pastel.style
Executable file → Normal file
@@ -1,16 +0,0 @@
|
||||
{
|
||||
HighlightColor = white;
|
||||
HighlightTextColor = black;
|
||||
TitleJustify = center;
|
||||
FTitleColor = gray40;
|
||||
PTitleColor = gray;
|
||||
UTitleColor = gray;
|
||||
FTitleBack = (hgradient, white, pink);
|
||||
PTitleBack = (hgradient, pink, pink2);
|
||||
UTitleBack = (hgradient, pink3, pink4);
|
||||
MenuTitleColor = white;
|
||||
MenuTextColor = white;
|
||||
MenuDisabledColor = gray60;
|
||||
MenuTitleBack = (hgradient, pink2, pink4);
|
||||
MenuTextBack = (hgradient, pink4, black);
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
TitleJustify = center;
|
||||
HighlightColor = white;
|
||||
HighlightTextColor = black;
|
||||
ClipTitleColor = white;
|
||||
CClipTitleColor = gray20;
|
||||
FTitleColor = white;
|
||||
PTitleColor = gray60;
|
||||
UTitleColor = gray60;
|
||||
FTitleBack = (hgradient, orange2, orange4);
|
||||
PTitleBack = (hgradient, orange4, black);
|
||||
UTitleBack = (hgradient, "rgb:18/38/59", black);
|
||||
MenuTitleColor = white;
|
||||
MenuTextColor = white;
|
||||
MenuDisabledColor = gray60;
|
||||
MenuTitleBack = (hgradient, orange2, orange4);
|
||||
MenuTextBack = (hgradient, "rgb:18/38/59", "rgb:00/14/28");
|
||||
IconBack = (dgradient, "rgb:a6/a6/b6", "rgb:51/55/61");
|
||||
}
|
||||
0
WindowMaker/Styles/Purple → WindowMaker/Styles/Purple.style
Executable file → Normal file
0
WindowMaker/Styles/Purple → WindowMaker/Styles/Purple.style
Executable file → Normal file
0
WindowMaker/Styles/Red → WindowMaker/Styles/Red.style
Executable file → Normal file
0
WindowMaker/Styles/Red → WindowMaker/Styles/Red.style
Executable file → Normal file
0
WindowMaker/Styles/RednBlue → WindowMaker/Styles/RednBlue.style
Executable file → Normal file
0
WindowMaker/Styles/RednBlue → WindowMaker/Styles/RednBlue.style
Executable file → Normal file
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user