1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-07-12 00:46:38 +02:00

Compare commits

...

107 Commits

Author SHA1 Message Date
David Maciejak 6d6f9f6ff5 Info Panel: Fix uninitialized posn variable 2023-02-16 11:34:54 +00:00
David Maciejak 370adc94e7 Ignore WM_NORMAL_HINTS resize increment for maximized windows
If you are trying to maximize old apps that are setting a resize increment
in term of WM_NORMAL_HINTS notion the window will not be maximized fully (by a few pixels).
It's easy to reproduce with xterm, ctrl double click on the title bar.
xprop extract sample is giving:
program specified resize increment: 6 by 13

For those maximized windows the patch is just ignoring the resize increment.
Seems the same issue happened on that project
https://github.com/paperwm/PaperWM/issues/106
2023-02-16 01:21:25 +00:00
David Maciejak 532acdc443 WRaster: Avoid types deprecated with libtiff 4.3
This patch is fixing compiler warnings like:

load_tiff.c:42:9: warning: 'uint16' is deprecated [-Wdeprecated-declarations]
load_tiff.c:43:9: warning: 'uint32' is deprecated [-Wdeprecated-declarations]

As starting from libtiff 4.3, released in April 2021, types were moved
from uint16 to uint16_t and uint32 to uint32_t respectively.

See https://libtiff.gitlab.io/libtiff/releases/v4.3.0.html
2023-02-15 11:24:09 +00:00
David Maciejak d7d38aa443 Info Panel: display more OS details
Rely on old utsname and os-release (http://0pointer.de/blog/projects/os-release) when available
to display more underlying OS details in the Info panel.
The idea is when someone creates a bug entry we can request them to copy/paste that screen
to give more info about the context that could help us debug the issue.
For example, on my current system it's displaying:
"Running on: Ubuntu 22.10 (x86_64)"
2023-02-15 09:37:06 +00:00
David Maciejak a6209cc89b Set a better exit panel message
Replace the exit window manager generic message with Window Maker term instead.
2023-02-15 09:37:06 +00:00
David Maciejak 01bd523cee WINGs: allow keypad enter key to validate button
This patch allows the keypad enter key to validate the button click action.
2023-02-15 09:37:06 +00:00
David Maciejak 45ab72a78a InfoPanel: fix out of display text
When debug is enabled, the memory allocated details is supposed to display the free chunks
but as the text length is too long it's getting out of the display area.
This patch is increasing the window width to handle such case.
2023-02-13 13:10:14 +00:00
David Maciejak 437b76812d Info Panel: mallinfo is deprecated use mallinfo2 instead
Replacing mallinfo with mallinfo2.

The fields of the mallinfo structure that is returned by the
older mallinfo() function are typed as int.  However, because
some internal bookkeeping values may be of type long, the
reported values may wrap around zero and thus be inaccurate.
2023-02-11 10:35:23 +00:00
David Maciejak e3ee459a78 Info Panel: use system time to get the current year
Use the system date to get the current year to insert inside the copyright line.
So no need to update that string anymore.
2023-02-11 10:33:22 +00:00
David Maciejak d70b546f2e Fix wrong XKeycodeToKeysym index value
XKeycodeToKeysym was deprecated some time ago and wmaker code was patched to use the definition from XKBlib instead.
(https://repo.or.cz/wmaker-crm.git?a=commit;h=0382dd5dd7ecae2112a0c6366eaf9e6ab68ad354)

Before being deprecated,  XKeycodeToKeysym was prototyped at X11/Xlib.h as
KeySym XKeycodeToKeysym(display, keycode, index)

Now it's available in X11/XKBlib.h as
KeySym XkbKeycodeToKeysym(display, keycode, group, level)

Basically level now which is the 4th parameter is our old index variable (3rd parameter).

On systems which don't have xkb supported the value set for index is wrong.
As seen in old patch at https://repo.or.cz/wmaker-crm.git/blobdiff/139f912e618870cc7fd908099f203450547eb658..43c3526d2120712f72579398b73ef92283d9078b:/WPrefs.app/MouseSettings.c
we should pass the l value to old XKeycodeToKeysym function and not the 0 value which is used for the group in the new XkbKeycodeToKeysym definition.
2023-02-11 10:30:52 +00:00
David Maciejak 812930b7cd Fix icon.c unused variable compiler warning
Just to please the compiler as it's reporting:
icon.c: In function 'get_icon_cache_path':
icon.c:425:13: warning: unused variable 'len' [-Wunused-variable]
2023-02-11 10:30:02 +00:00
David Maciejak 2a14004fc3 SwitchPanel: make sure WMRetainColor and WMReleaseColor calls are even
The number of calls to WMRetainColor for a color in use should the same as the number of calls to WMReleaseColor
to free that color. In case of discrepancy, random crashes can happen and memory is not freed properly.
To debug that issue I checked the retained colors when the switchpanel is opened and then checked if those colors are properly released once the panel is closed.

This patch fixes the issue mentioned at https://github.com/window-maker/wmaker/issues/22
2023-02-10 11:24:55 +00:00
David Maciejak 04e9f33437 WINGs: Fix incorrect findCloseColor exact flag value
In case the color cannot be allocated exactly by createRGBAColor function,
the findCloseColor function is used as a failover function to find a color close to the requested color.
By definition that color is then not exact.
createRGBAColor exact flag should be 1 while findCloseColor exact flag should be 0
2023-02-10 11:24:44 +00:00
David Maciejak 150816c687 Fix missing linefeed on the error message
Just to display the error message properly in case there is no display.
2023-02-08 00:14:48 +00:00
Torrance, Douglas ddacfa5d63 Include screen.h in dialog.h for definition of WScreen 2023-01-26 10:15:58 +00:00
Torrance, Douglas 0718297e9a Correctly draw window snapping hints on multi-head systems
Previously, the transparent frames that were drawn prior to snapping a
window assumed that there was only one head, i.e., that the new
position and dimensions of the window would be based on the dimensions
of the entire screen.

However, this is not the case on multi-head systems, and so we now
base the transparent frame's position and dimensions on the current
head of the window.

We also refactor the code so that the new dimensions are computed in
the switch statement and finish with one final call to
drawTransparentFrame.
2023-01-20 11:54:07 +00:00
Torrance, Douglas 9cc16182d3 Use dock to determine whether drawer is on right side when swapping
Previously, we assumed that it always switched from left to right or
vice versa when calling swapDrawer.  However, now we may also call
swapDrawer when changing the value of "KeepDockOnPrimaryHead", which
wouldn't actually switch which side of the screen it's on.

So instead, we determine which side of the screen it should be on
based on the dock.
2023-01-20 10:34:36 +00:00
Torrance, Douglas f6165d6e80 Use actual x position of dock when saving state
Previously, we either saved it as 0 or -ICON_SIZE, and then adjusted
it depending on the screen width when restoring the state.

But since the introduction of the "KeepDockOnPrimaryHead" option, the
state-restoring code has changed so that the dock will go on the left if the
x-coordinate of the position in WMState is to the left of the midpoint
of the screen and on the right otherwise.  But previously (unless the
user manually set the value in WMState) this would always send the
dock to the left, even if it had been on the right, since the x-coordinate
automatically saved to WMState in this case was negative.

We simplify things by saving the actual x position of the dock to WMState.
2023-01-20 10:34:36 +00:00
Torrance, Douglas 10c36d244e Use dock's position to determine position of dock menu
Previously, we assumed that if the dock was on the right, then the
menu should be on the far right of the entire screen, but this is no
longer the case with "KeepDockOnPrimaryHead" set to "YES".
2023-01-20 10:34:36 +00:00
Torrance, Douglas 515eb652c7 Update the dock position when "KeepDockOnPrimaryHead" is changed 2023-01-18 12:18:03 +00:00
Torrance, Douglas 8ed92efa3c Rename swapDock to wDockSwap and add to dock.h
We'll be calling it from defaults.c.
2023-01-18 12:18:03 +00:00
Torrance, Douglas cc839f8bc5 Add default value of "KeepDockOnPrimaryHead" to Defaults/WindowMaker 2023-01-18 12:18:03 +00:00
Torrance, Douglas 48d4820dee Support "KeepDockOnPrimaryHead" when restoring state
We use the new helper function getDockXPosition to determine where
to put the dock.  If WMState gives an x-coordinate less than the
center of the screen, we put it on the left, and otherwise we put it
on the right.
2023-01-18 12:18:03 +00:00
Torrance, Douglas d4f5f3ec7f Support "KeepDockOnPrimaryHead" when initially creating dock
We use the new "getDockXPosition" helper function to find the x
position of the main icon, whose position is used in "wDockCreate" to
get the position of the entire dock.

Previously, "KeepDockOnPrimaryHead" was only taken into account
when *moving* the dock and not when creating it.
2023-01-18 12:18:03 +00:00
Torrance, Douglas 83f7fa43ce Add helper function for computing the dock's x position
Avoid code duplication since we'll need to make this computation in
several places.
2023-01-18 12:18:03 +00:00
Torrance, Douglas 55a816bdbc Keep dock on primary head if KeepDockOnPrimaryHead is YES
This implements a feature request [1] to allow the possibility of
keeping the dock on the primary head on a multi-head system.

In particular, if the new KeepDockOnPrimaryHead option is set to YES,
the dock will either be on the left- or right-hand side of the primary
screen.  If it is NO, then we get the current behavior, i.e., the dock
will either be on the left-hand side of the leftmost head or the
right-hand side of the rightmost head.

[1] https://github.com/window-maker/wmaker/issues/24

Closes: #24
2023-01-15 00:18:34 +00:00
Torrance, Douglas 7639fa1c15 Add "KeepDockOnPrimaryHead" checkbox to WPrefs experts panel 2023-01-15 00:18:34 +00:00
Torrance, Douglas 93b411f258 Document "KeepDockOnPrimaryHead" option in NEWS 2023-01-15 00:18:34 +00:00
Torrance, Douglas 326a67e18f Add new "KeepDockOnPrimaryHead" option
Once implemented, this will keep the dock on the primary head (when
there are multiple heads) when YES.  The default value is NO, the
current behavior, i.e., treat all monitors together as one large screen.
2023-01-15 00:18:34 +00:00
Petre Rodan c089c6aea4 Fix segfault on right-click sweep of menu
bug description: after menu is displayed I get a segfault when trying to hover over the last menu
entry. it looks like under some circumstances menu->entries[] gets accessed past the last valid
value (off by one).

how to reproduce:
right-click desktop to show menu and keep right mouse button pressed
sweep mouse up-down the menu a few times - it crashes all the time between 1-5 sweeps

this commit fixes the unwanted behaviour, in active use since december 2021.
2023-01-06 12:47:22 +00:00
Torrance, Douglas 66b0ee3c4d Add WPrefs to XDG desktop menu
We include a desktop entry file for WPrefs so that it will be included
in XDG-compatible menus.  See the specifications at:

https://specifications.freedesktop.org/menu-spec/menu-spec-latest.html
https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html
2022-02-17 22:31:18 +00:00
Torrance, Douglas a6c8577eb4 Include wmaker.desktop in distribution tarball
This fixes a bug where building from a tarball generated by "make
dist" would fail due to the absence of this file.
2022-02-17 22:31:18 +00:00
Doug Torrance 094001a53d Convert Slovak language manpages from ISO-8859-2 to UTF-8 2021-10-10 11:53:29 +01:00
Doug Torrance deba131857 Convert Czech language manpages from ISO-8859-2 to UTF-8 2021-10-10 11:53:11 +01:00
Doug Torrance a9bc9751a2 Use quotes around "Window Maker" in translated manpage title headers
This matches the English manpage and also prevents
wrong-manual-section Lintian warnings in the Debian package, as "Maker"
was being interpreted as the section of these manpages.
2021-10-09 13:53:34 +01:00
Torrance, Douglas 58b6728743 Add desktop file for display manager session configuration
Files in /usr/share/xsessions are used by some display managers (e.g.,
LightDM and GDM) to detect available sessions.  Such a file has been
shipped in the Debian Window Maker package for years.
2021-10-09 09:55:40 +01:00
Christophe CURIS 894d096d6e WINGs: in WText, do not re-query Atom value every time they are used
It is resource-consuming to query the server for an Atom, yet the protocol
ensures the values will stay unique, so we'd better ask them once and
retain the values for further use.
2021-09-04 19:03:53 +01:00
Christophe CURIS a41b0aa21d WINGs: Simplify function wstrconcat
Because we have allocated enough space, it is a waste of time to check the
size after copy and cat; beside the use of plain strxxx functions may allow
compiler to make a better job.
2021-09-04 19:03:53 +01:00
Christophe CURIS d4cc033379 Util: Rewrite error message generation to avoid potential problem
The call to 'snprintf' may change the value of 'errno', which means that
the 'perror' call would print a wrong error message, not the one from
'fopen'.
2021-09-04 19:03:53 +01:00
Christophe CURIS 308b9f4975 Configure: Fix non-working libbsd usage when explicitly requested
Due to a missing comma, in the AS_IF the action run-if-false is actually
merged with run-if-true action, which means that with_libbsd is always
empty when user provides --with[out]-libbsd.
2021-09-04 19:03:53 +01:00
Christophe CURIS 1d1c904126 Configure: Place the argument checks at the beginning of execution
The autotool provides a simple mechanism which allows us to move ("divert")
the checks we do on the user arguments to the beginning of the script, yet
without needing to scatter the code.

This is good because we can raise errors very fast, user do not have to
wait until many other checks have passed before knowing he has to correct
his argument list; yet on our side we can keep related things together.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-09-04 19:03:53 +01:00
Christophe CURIS ca4ae5068b WINGs: Simplify wglobaldefaultspathfordomain
The original code was over-complicated, it can be reduced to a one-line
call to a function that does the same thing, with the bonus that it will
behave better in the case where domain == NULL.
2021-08-10 09:42:43 +01:00
Christophe CURIS 26491867a3 WINGs: Fix incomplete prototypes for functions that take no argument 2021-08-10 09:42:43 +01:00
John D Pell dce34e926b wmaker.inst: remove all modification to ~/.xinitrc
I cannot imagine that modifying an existing ~/.xinitrc is ever wanted, and creating an ~/.xinitrc when none exists is much worse.

If a user created their own ~/.xinitrc, then don't modify it.
The user will modify it if they like.

If the user did not create their own ~/.xinitrc, then creating one will short-circuit X startup as `startx` will *replace* the system's version with the user's version.
Literally ~/.Xresources won't be loaded.
There's no way this is expected behavior.
2021-08-10 09:42:43 +01:00
John D Pell a0b283a60f WUtil: Be more strict about base directory for wmkdirhier()
The original code refused to create anything not in $WMAKER_USER_ROOT, now
we go one step further and limit creation inside its 'Library' or
'Defaults' sub-directories.
2021-08-10 09:42:43 +01:00
John D Pell 671db45007 WUtil: Be more strict about base directory for wrmdirhier()
The original code refused to delete anything not in $WMAKER_USER_ROOT, now
we go one step further and limit deletion inside 'Library' or 'Defaults'.
2021-08-10 09:42:43 +01:00
John D Pell 0c6ad643c8 Change generation of Data Dir in the global header
It has become common practice in previous patches to use PACKAGE_TARNAME
instead of hard-coding "WindowMaker" when working with paths, so let's be
as consistent in the generated header.
2021-08-10 09:42:43 +01:00
John D Pell 5076b6f496 Default Files: Replace misleading variables 'defsdatadir' in Makefiles
The parameter name 'defsdatadir' was copied in to many sub-Makefiles; for
all of them give a unique name for clarity.
2021-08-10 09:42:43 +01:00
Christophe CURIS 54c8535365 Configure: Add an error message when using deprecated "--with-defsdatadir" 2021-08-10 09:42:43 +01:00
John D Pell 24f5b32469 Configure: Rename setting DEFSDATADIR to PKGCONFDIR
Directory /etc/WindowMaker is for global defaults configuration, it is not
a "data" folder which is $PREFIX/share/WindowMaker.

The name change make it more consistent with other names.
2021-08-10 09:42:43 +01:00
John D Pell 85169642ca WMaker: Store history in $XDG_STATE_HOME if defined
The FreeDesktop XDG standard suggests storing history in the directory
pointed by $XDG_STATE_HOME; so if we find it is defined we prefer to use
it over the default path. If undefined, keep the old behaviour.

This may introduce a loss of history for users that had some in the legacy
place but have the variable, we consider this very unlikely to be a problem
but if user complains we can suggest them to move the legacy file over the
empty new one.
2021-08-10 09:42:43 +01:00
Christophe CURIS 9f9ef6417e Utils: Use the constants added in config-paths.h for paths
Replace hard-coded directory names by the constants that have been
previously added to the common header.
2021-08-10 09:42:43 +01:00
Christophe CURIS fb2a6d2e61 WPrefs: Use the constants added in config-paths.h for paths
Replace hard-coded directory names by the constants that have been
previously added to the common header.
2021-08-10 09:42:43 +01:00
John D Pell 8219c36488 WINGs: Use the constants added in config-paths.h for paths
Replace hard-coded directory names by the constants that have been
previously added to the common header.
2021-08-10 09:42:43 +01:00
John D Pell bd38778bef Use wuserdatapath() everytime it is applicable
Replace calls to wusergnusteppath() which just append "/Library" by calls
to wuserdatapath().
Take opportunity to replace hardcoded "/WindowMaker" directories with
the existing PACKAGE_TARNAME macro (which comes from autotools).

The choice of 'TARNAME' is because it meant to be used in filename, thus
less likely to have problematic characters than PACKAGE_NAME (meant for
display purpose) and PACKAGE which is there for historical reason.
2021-08-10 09:42:43 +01:00
John D Pell 1e45ff2305 WUtil: New function wuserdatapath() to get path for application data
Returns the path in the user's GNUstep library: ~/GNUstep/Library
2021-08-10 09:42:43 +01:00
John D Pell 7e1cdf2d59 Add definition of directory names used for building paths in common header
The organisation of the file tree for storing application files depends on
a number of directories with a specific name.
This patch puts these names in the generated "config-paths.h" so they can
be shared between WINGs and WindowMaker, and could be user-configured in
the future.
2021-08-10 09:42:43 +01:00
Christophe CURIS 43f0474013 WINGs: Properly mark 'const' more 'char*' in the public API
Because the previous patch brought a (welcome) change in the public API,
seize the opportunity to go further in the improvement.
2021-08-10 09:42:43 +01:00
John D Pell a079544647 WINGs: Properly mark 'const' some 'char*' in the public API
Update all the callers in our code to deal with the const qualifier
where the compiler reports an issue.
2021-08-10 09:42:43 +01:00
John D Pell 03ec24502d WMaker: Fix logical-not operator in framewin.c
As reported by clang, (!wPreferences.new_style == TS_NEW) inverts the
"wPreferences.new_style" and not the whole expression. Use the appropriate
comparison operator to avoid misunderstanding.
2021-08-10 09:42:43 +01:00
John D Pell 5c90ed9d2d WPrefs: Use wdefaultspathfordomain() to build path to the root menu file
For the Menu edition tab, when building the path to the file that contains
the menu data, rely on wdefaultspathfordomain instead of constructing the
path with many hard-coded names.
2021-08-10 09:42:43 +01:00
John D Pell 735651df55 WMaker: Use wdefaultspathfordomain() to get path for Defaults directory
Instead of constructing path to user's defaults directory with hard-coded
names, just query wdefaultspathfordomain with a blank domain: this returns
the equivalent of "~/GNUstep/Defaults/", yet avoiding problems related to
duplicating strings.
2021-08-10 09:42:43 +01:00
John D Pell bfab769065 WINGs: Improve search path logic in WMPathForResourceOfType
The man page says environment variables are used, and if they don't exist
it falls back to defaults, yet this was not true in WINGS.

This changes implements the checks for the default paths used when the env
variables are not defined; these default paths have been fixed (+lib) to
match the GNUstep layout ('fhs'), expect for the very last path which keeps
the legacy layout.

For the user Apps folder, rely on wusergnusteppath() (~/GNUstep) to build
the path.

The previous code was only partially functional as the hard-coded paths
did not exist in any of GNUstep standard file system layout and the
GNUSTEP_*_ROOT environment variables were not provided by GNUstep for a
while. This means it would never work no matter how environment variables
were set when using layouts: 'debian', 'fhs', 'next', 'Apple', 'mac',
'fhs-system', or 'standalone'.
2021-08-10 09:42:43 +01:00
John D Pell c060477d57 WINGs: Simplify use of HAVE_SECURE_GETENV
Define the macro GETENV(x) instead of sprinkling code with #ifdef HAVE_SECURE_GETENV
everytime we want to use it.
2021-08-10 09:42:43 +01:00
Torrance, Douglas 75f133285f Fix segfault in color picker
Previously, we released the color well's color even if it was the same
as the new color.  This eventually resulted in a segfault when calling
WMPaintColorSwatch because we tried calling XFillRectangle with no
display.

We fix this by only releasing/updating the color well's if it differs
from the new color.
2021-06-29 22:32:31 +01:00
Torrance, Douglas a6ec6a30a3 Use wmkdirhier instead of mkdir to create color config directory
Otherwise, if ~/GNUstep/Library doesn't already exist, then creating
~/GNUstep/Library/Colors will fail.
2021-06-29 22:32:31 +01:00
Christophe CURIS 6afa419b01 Website: Create script to update the list of man pages in the index
It is a good idea to have an Index web page with the list of the man pages
available, but there is a risk to have it outdated, so there is a script to
take care of this for us.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-06-20 22:28:19 +01:00
Christophe CURIS a2bf67f54c Website: Create script to generate the HTML version of the man pages
When running the 'make website' command, it will call groff to convert the
man pages into HTML and post-process them to get them in the style of the
site, then place them in the Website Git Repository.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-06-20 22:28:19 +01:00
Christophe CURIS 351e05dca9 Configure: Add a maintainer option to prepare generation of HTML for the website
When the new configure option '--with-web-repo' is used, the new target
'make website' becomes available and will generate HTML pages to be placed
in the Homepage Repository.

This patch does not generate any content yet but it prepares the skeleton
to handle everything.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-06-05 23:54:15 +01:00
Christophe CURIS ae78e88eef Repair compilation when Pango support is enabled
It seems there have been changes in the way Pango's header files are
installed in recent versions, probably to allow having multiple versions
together on a system.

Because one public header from WINGs has to include Pango's header, we must
include the search path provided by Pango into our WINGs search path that
are returned by pkg-config (the .pc file).

They are then also added to WindowMaker and WPrefs which use the header but
can't rely on the path from the .pc file which has not been installed yet.

Reported-by: Carlos R. Mafra <crmafra@gmail.com>
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-05-29 23:55:10 +01:00
Christophe CURIS f049635fa5 Configure: Rewrite the detection for Pango library
Make use of the standard macro for PKG_CONFIG; the default behaviour is now
to use Pango if present, instead of requiring explicit user request, yet
still not making it mandatory.

The detection code was moved to a macro to keep the configure.ac script
(relatively) small, and consistent with what is done for most other libs.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-05-29 20:15:09 +01:00
Doug Torrance 4221e30bd2 Convert WPrefs.app/po/README from iso-8859-1 to utf-8 2021-05-25 22:12:23 -04:00
Doug Torrance 71558f4ce3 Convert WindowMaker/README from iso-8859-1 to utf-8 2021-05-25 22:10:15 -04:00
Doug Torrance 4b61081353 Convert po/README from iso-8859-1 to utf-8 2021-05-25 22:05:30 -04:00
Christophe CURIS 4138c57631 Configure: Rewrite the macro for checking Xft2 version
The original macro used over-complicated things, like:
 - useless uses of 'eval',
 - split AC_CACHE_CHECK construct (AC_MSG_CHECKING + AC_CACHE_VAL +
AC_MSG_RESULT)
 - dubious variable name (CPPFLAGS_old, which is not the "old" value but
the "saved" value for a temporary change)
 - variable CPPFLAGS was changed at wrong hierarchy level
 - calculate the integer value for XFT_VERSION in m4 instead generating
shell commands that had to do it on user side
 - indentation was missing

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-05-22 20:00:41 +01:00
Christophe CURIS 0bbb122b94 Configure: Rewrite detection for Xft2 to properly use PKG_CONFIG macro
The goal is to use standard macros, which make code easier to maintain
(smaller, more consistent). We still keep the legacy "xfg-config" method
because we don't want to drop support for old hardware/software.

A side effect is the change in the name of the variables for the makefile,
but this goes in favour of consistency.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-05-22 20:00:41 +01:00
Christophe CURIS 0e274dc979 WRaster: Fix incorrect use of macro USE_XSHM in installed header
The header "wraster.h" needs different behaviour depending on whether the
support for X Shared Memory extension was enabled or not; but the related
macro USE_XSHM is defined by WindowMaker's configure. After this header
have been installed, the macro is no more useable.

This patch makes the "wraster.h" a generated file, so it will be different
depending on USE_XSHM, but will not make use of the macro itself.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-05-18 17:50:43 +01:00
Christophe CURIS 4dfb0dd059 WRaster: Create french translation to have at least one
The translation check would complain because it does not find any '.po'
files, so I am providing one translation.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-05-18 17:49:17 +01:00
Christophe CURIS bcb53700d6 WRaster: Improve error messages to provide useful information to user
The original error messages tended to be a bit sparse, now they try to be
a little bit more helpful, and translatable in user's language.

In xutil.c:122, took opportunity fix a problem because calling 'perror'
after other function which are likely to have changed the errno is likely
to provide a wrong error string.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-05-18 17:49:17 +01:00
Christophe CURIS e5f7ef23a6 WRaster: Made a few messages translatable
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-05-18 17:49:17 +01:00
Christophe CURIS 70f89fd9c5 WRaster: Add initialisation for locale support
Because the library does not have an initialisation function, we need to
rely on an automatic called-on-load mechanism, which is provided through
a compiler attribute 'constructor'.

However, as the project aims to still compile on old hard/software, we
include a check in 'configure' to ensure it works, and if not use the
legacy solution.

Note: Because we introduce a new DEFINE, the 'config.h.in' needs to be
regenerated, otherwise you may get a compilation error in wrlib. This is
done by re-running './autogen.sh'

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-05-18 17:49:17 +01:00
Christophe CURIS 19202fd2db WRaster: Create header for i18n helper functions
This patch is just adding a single header, but because it also modifies
all the C files to add the #include, it was made as a patch on its own to
ease review.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-05-18 17:49:17 +01:00
Christophe CURIS aadd694a6b WRaster: Create structure to make the library translatable
The library did not propose the mechanisms to be translated, this patch is
creating the structure in autoconf/automake and the translation directory
so its messages can be also translated.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-05-18 17:49:17 +01:00
Christophe CURIS fbec3a728f wmaker: Do not allocate memory for a temporary string for the Window Shortcut menu
When creating the list of possible shortcut for windows to populate the
window menu, a temporary buffer was allocated to hold that string.

As this allocation participates to memory fragmentation, this patch makes
use of storage on the stack instead which is also faster.

Took opportunity to include the shortcut number (%i) in the string to be
translated, because it is unlikely that adding that number at the end of
the string is right in all languages. Updated french translation because
it is the only one I am confident with.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-05-18 17:49:17 +01:00
Christophe CURIS 944bb49997 wrlib: Add compiler attributes to the API functions
With proper attributes, the compiler is able to do some extra checks on
user side to make code safer and/or better optimised.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-05-18 17:49:17 +01:00
Christophe CURIS 0ac6827a9b wmmenugen: Fix memory leaks when parsing menu in wmconfig format
As reported by Coverity (CID #50181, #50182 and #50183) the strings allocated by parse_wmconfig_line were not freed after use.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-05-18 17:49:17 +01:00
Christophe CURIS f030ab7664 wmmenugen: Fix memory leaks in XDG menu generation when getting locale-dependant name
As reported by Coverity as CID #50142, #50143, #50144 and #50145, all the
strings allocated by 'parse_locale' were never freed.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-05-18 17:49:17 +01:00
Christophe CURIS 2a8fc1df9a wmmenugen: Fix memory leak when parsing names for menus in XDG format
As reported by Coverity (CID #50146), if the function getLocalizedStringValue
returns without matching the entry, the storage for the entry's locale was
leaked.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-05-18 17:49:17 +01:00
Christophe CURIS 296456f361 wmmenugen: Fix memory leak when parsing categories in an XDG menu
Reported by Coverity (CID #50147)

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-05-18 17:49:17 +01:00
Christophe CURIS f2cd2c9f03 WRaster: Properly set file's mtime in the cache when loading an image
The library maintains a cache to not reload a file that was previously
loaded. In order to still reload an image in case its file would have
changed in the meantime, the cache saves the file's modification time.

As reported by Coverity (CID #331576) the 'stat' function was not on the
execution path the first time an image is loaded, which means the cache
information is populated with junk data. This could lead to an image not
being reloaded for example.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-05-18 17:49:17 +01:00
Christophe CURIS d125f80dee WRaster: Stop parsing number in PPM file if invalid syntax is found
When the function 'pm_getuint' is reading a number, it prints an error
message if it encounters a non-digit number, yet it still enters the
processing loop which will cause an invalid number to be calculated.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-05-18 17:49:17 +01:00
Christophe CURIS 8e47ca8e62 WPrefs: Add check for invalid OPEN_MENU/EXEC in PL-Menu to avoid potential crash
As reported by Coverity (CID #50047, #50048), if the proplist is incorrect
and has an OPEN_MENU or (SH)EXEC command without its arguments, we did
dereference a NULL pointer.
Now we simply return the NULL value, appropriate to have the caller of the
function issue a message.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-05-18 17:49:17 +01:00
Christophe CURIS 29cf48b934 WPrefs: Provide fall-back colour in the case of colour name not found
As reported by Coverity (CID #331571), we did not check the return value of
the call to XParseColor. If the function is given a colour name that it
does not know, we would return an uninitialised colour.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-05-18 17:49:17 +01:00
Christophe CURIS 816fa00625 WUtil: Make sure wmalloc/wrealloc won't fail because of the abort handler
As pointed by Coverity (#50074), despite the expected behaviour that
'wmalloc' should never return NULL, it may still happen if an abort handler
set by user (with wsetabort) does not call exit() as expected. In such
case we make sure the NULL pointer dereference does not happen inside
WINGs code because we assume it is a known user choice.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-05-18 17:49:17 +01:00
Christophe CURIS 6ebec0bb9f WUtil: Fix non-closed file handle in WMWritePropListToFile
As reported by Coverity (CID #50129), in case of error during the write
operation, the failure path does include close of the file handle. In
addition to the resource leak, this may be a problem if the application
were to make a second try on the same file.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-05-18 17:49:17 +01:00
Christophe CURIS 7c50721747 WPrefs: Fix memory leak in Expert tab
As reported by Coverity (CID #331553), we leak the allocated string
returned by 'WMGetTextFieldText'

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-05-18 17:49:17 +01:00
Christophe CURIS 4559cbbccc WPrefs: Fix memory leak in the Menu tab
As reported by Coverity (CID #331559), the call to 'wfindfile' replaces
the value for variable 'path' but we did not free its previous content.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-05-18 17:49:17 +01:00
Christophe CURIS e828e1c074 Fix use-after-free error in wIconStore reported by Coverity
The function always returns the filename where the icon have been saved,
but in the case where the save operation failed we would free the memory
for that file name, yet still return this pointer like if it were valid.

Took opportunity to remove redundant free(path) which is done a couple
lines later, because redundancy is a source of problem for code
maintenance.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-05-18 17:49:17 +01:00
Christophe CURIS 97a9300aa4 Fix memory leak reported by Coverity
As reported in CID #331577, we re-use the variable 'tmp' without freeing
the previously allocated pointer.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-05-18 17:49:17 +01:00
Christophe CURIS fd56152202 WPrefs: fix memory leak and potential buffer overflow
Coverity pointed that the "text" returned by WMGetTextFieldText was never
freed (CID #331578, because WMSetTextFieldText does its own copy, it does
not take the pointer as-is).

By looking at the code, there is also a potential buffer overflow because
the buffer alloc'd for "value" is sized for the exact number of digits
before increase, but the +delta can make the number use more digits so we
may write past the end of original buffer.
We write to a stack-allocated one, so it does not cost anything and does
not participates to memory fragmentation.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-05-18 17:49:17 +01:00
Christophe CURIS 58862300f9 WINGs: Fix invalid handling of Blue in the HSV conversion in ColorPanel widget
Because of a minor bug, when pure blue was chosen in RGB in the ColorPanel,
the conversion to HSV would mistreat it as white and resets its hue,
leading to possible user annoyance.
2021-05-18 17:49:17 +01:00
Christophe CURIS 1612d2f345 WINGs: increase temporary buffer to silence a gcc warning
The code limits the integer number to 0..359 so we need 4 bytes to store
that, but that require too complex flow processing for compilers to deduce
it.

It does not cost to increase the temporary buffer to the minimum size
requested by GCC, so let's do this, because spurious warnings can
potentially divert us from more important ones.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-05-18 17:49:17 +01:00
Christophe CURIS 920c6d16b1 wraster: Remove duplicate code
Duplicating things makes maintenance error-prone, which is not a good idea.
In case the abort procedure would need an update, it would be easy then
to forget some place, leading to leaks, if not worse.

Beside, goto is not as bad as academics would like people to believe, when
it is used correctly (and this case is one of them).
The name for the label was given an explicit meaning to make code easy to
understand.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-05-18 17:49:17 +01:00
Christophe CURIS 8aecba27d1 Fix usage of float constant reported by gcc
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-05-18 17:49:17 +01:00
Christophe CURIS fc63d72032 WINGs: Fix incorrect use of macro USE_PANGO in installed header
The header "WINGsP.h" needs different behaviour depending on whether the
support for Pango was enabled or not. But the related macro USE_PANGO is
defined by WindowMaker's configure, and after this header have been
installed the macro is no more valid.

This patch makes the "WINGsP.h" a generated file, so it will be different
depending on USE_PANGO, but will not make use of the macro itself.

As a side effect of being now generated, the include paths in the makefile
have been updated to include build-dir too, because for users doing an
out-of-tree build the generated file (that is used during compilation) is
placed in the build-dir.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-05-18 17:49:17 +01:00
Xander eb2a9d97a2 Make dock dots scalable
This patch makes the three dots in the dock change their size when bigger icon size is used.
The logic here is such that the dots are scaled only when a certain icon size is reached;
for instance, the dots will remain unchanged if icon size is less than 128x128 px, and will
be twice as big if it's set to a value from 128x128 to 184x184 px. The get_dot_mult() func
calculates and returns the scale multiplier. In the draw_dot() func, XDrawLine() and
XDrawPoint() were replaced with XFillRectangle() because those funcs do not allow their
result to be scalable. This patch does not require additional icon size values (those bigger
than 96x96 px) to exist, but makes no use without them.
2021-05-07 18:03:19 +01:00
Xander 9abe4165d1 Add icon sizes
The classic WindowMaker allows tile icon size up to 96x96 px. This patch rises this value
to 256x256 px. It also sets the max number of visible items in the corresponding pref list
to 29 (instead of 9), so the new values show up in the list. This patch makes it possible
to use dockapps that allow changing their size to bigger than 64x64 px, see
https://gitlab.com/xander1988/dockapps for more info.
2021-05-07 18:02:03 +01:00
141 changed files with 2690 additions and 1022 deletions
+2
View File
@@ -120,6 +120,8 @@ WindowMaker/Defaults/WMWindowAttributes
WindowMaker/Defaults/WindowMaker
WindowMaker/IconSets/Default.iconset
WPrefs.app/WPrefs.desktop
# These files are generated by the i18n process
/po/WindowMaker.pot
/po/*.mo
+40 -4
View File
@@ -19,10 +19,19 @@ config-paths.h: Makefile
@echo '#define PIXMAPDIR "$(pixmapdir)"' >> $@
@echo '' >> $@
@echo '/* where shared data is stored */' >> $@
@echo '#define PKGDATADIR "$(datadir)/WindowMaker"' >> $@
@echo '#define PKGDATADIR "$(datadir)/$(PACKAGE_TARNAME)"' >> $@
@echo '' >> $@
@echo '/* where the global defaults are stored */' >> $@
@echo '#define DEFSDATADIR "$(defsdatadir)"' >> $@
@echo '#define PKGCONFDIR "$(pkgconfdir)"' >> $@
@echo '' >> $@
@echo '/* where the user data root is located */' >> $@
@echo '#define GSUSER_SUBDIR "GNUstep"' >> $@
@echo '' >> $@
@echo '/* where the user defaults are stored */' >> $@
@echo '#define DEFAULTS_SUBDIR "Defaults"' >> $@
@echo '' >> $@
@echo '/* where the user data are stored */' >> $@
@echo '#define USERDATA_SUBDIR "Library"' >> $@
ACLOCAL_AMFLAGS = -I m4
@@ -41,11 +50,13 @@ EXTRA_DIST = TODO BUGS BUGFORM FAQ INSTALL \
script/check-cmdline-options-doc.sh \
script/check-translation-sources.sh \
script/check-wmaker-loaddef-callbacks.sh \
script/generate-html-from-man.sh \
script/generate-mapfile-from-header.sh \
script/generate-po-from-template.sh \
script/generate-txt-from-texi.sh \
script/nested-func-to-macro.sh \
script/replace-ac-keywords.sh
script/replace-ac-keywords.sh \
script/replace-generated-content.sh
.PHONY: coverage-reset coverage
@@ -62,6 +73,10 @@ coverage:
genhtml --output-directory @lcov_output_directory@ coverage/coverage.info
endif
################################################################################
# Section for the I18N processing
################################################################################
# make update-lang PO=<lang>
# ==========================
# Update the PO files against the POT file in all the translation sub-directories
@@ -80,13 +95,34 @@ if HAVE_XGETTEXT
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) update-lang || exit $$?); \
done
SUBDIRS_PO = WINGs/po po util/po WPrefs.app/po
SUBDIRS_PO = wrlib/po WINGs/po po util/po WPrefs.app/po
else
@echo "Error: the program 'xgettext' was not found by configure, it is mandatory for this operation" >&2 ; exit 1
endif
.PHONY: update-lang
################################################################################
# Section related to generating HTML content for the website
################################################################################
if WITH_WEB_REPO
SUBDIRS_WEB = doc
website:
@for subdir in $(SUBDIRS_WEB); do \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) website || exit $$?); \
done
endif
.PHONY: website
################################################################################
# Section for the automated checks
################################################################################
# Create a 'silent-rule' for our make check the same way automake does
AM_V_CHKOPTS = $(am__v_CHKOPTS_$(V))
am__v_CHKOPTS_ = $(am__v_CHKOPTS_$(AM_DEFAULT_VERBOSITY))
+9
View File
@@ -1,6 +1,15 @@
NEWS for veteran Window Maker users
-----------------------------------
-- 0.95.10
Keep dock on primary head
-------------------------
To keep the dock on the primary head in a multi-head setup, set the option
"KeepDockOnPrimaryHead" in ~/GNUstep/Defaults/WindowMaker to "YES" or click
"Keep dock on primary head" under the WPrefs "Expert User Preferences" tab.
-- 0.95.9
Configurable SwitchPanel
+1 -1
View File
@@ -8,7 +8,7 @@ noinst_PROGRAMS = fontl puzzle colorpick
LDADD= $(top_builddir)/WINGs/libWINGs.la $(top_builddir)/wrlib/libwraster.la \
$(top_builddir)/WINGs/libWUtil.la \
@XFTLIBS@ @INTLIBS@ @XLIBS@
@XFT_LIBS@ @INTLIBS@ @XLIBS@
colorpick_DEPENDENCIES = $(top_builddir)/WINGs/libWINGs.la
+1 -1
View File
@@ -25,6 +25,6 @@ AM_CPPFLAGS = -I$(top_srcdir)/wrlib -I$(top_srcdir)/WINGs \
LDADD= $(top_builddir)/WINGs/libWINGs.la $(top_builddir)/wrlib/libwraster.la \
$(top_builddir)/WINGs/libWUtil.la \
@XFTLIBS@ @INTLIBS@
@XFT_LIBS@ @INTLIBS@
test_LDADD = wtableview.o wtabledelegates.o $(LDADD)
+7 -6
View File
@@ -12,7 +12,7 @@ lib_LTLIBRARIES = libWUtil.la libWINGs.la
LDADD= libWUtil.la libWINGs.la $(top_builddir)/wrlib/libwraster.la @INTLIBS@
libWINGs_la_LIBADD = libWUtil.la $(top_builddir)/wrlib/libwraster.la @XLIBS@ @XFTLIBS@ @FCLIBS@ @LIBM@ @PANGOLIBS@
libWINGs_la_LIBADD = libWUtil.la $(top_builddir)/wrlib/libwraster.la @XLIBS@ @XFT_LIBS@ @FCLIBS@ @LIBM@ @PANGO_LIBS@
libWUtil_la_LIBADD = @LIBBSD@
EXTRA_DIST = BUGS make-rgb Examples Extras Tests
@@ -87,11 +87,12 @@ libWUtil_la_SOURCES = \
wutil.c
AM_CFLAGS =
AM_CFLAGS = @PANGO_CFLAGS@
AM_CPPFLAGS = -DRESOURCE_PATH=\"$(datadir)/WINGs\" \
-I$(top_srcdir)/WINGs/WINGs -I$(top_srcdir)/wrlib -I$(top_srcdir)/src \
@XFTFLAGS@ @HEADER_SEARCH_PATH@
-I$(top_srcdir)/WINGs/WINGs -I$(top_builddir)/WINGs/WINGs \
-I$(top_builddir)/wrlib -I$(top_srcdir)/src \
@XFT_CFLAGS@ @HEADER_SEARCH_PATH@
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = WINGs.pc WUtil.pc
@@ -105,8 +106,8 @@ WINGs.pc: Makefile
@echo 'Version: $(VERSION)' >> $@
@echo 'Requires: wrlib WUtil' >> $@
@echo 'Libs: $(lib_search_path) -lWINGs' >> $@
@echo 'Libs.private: $(XFTLIBS) $(PANGOLIBS) $(XLIBS) -lm $(INTLIBS)' >> $@
@echo 'Cflags: $(inc_search_path)' >> $@
@echo 'Libs.private: $(XFT_LIBS) $(PANGOLIBS) $(XLIBS) -lm $(INTLIBS)' >> $@
@echo 'Cflags: $(inc_search_path) @PANGO_CFLAGS@' >> $@
WUtil.pc: Makefile
@echo "Generating $@"
+2 -2
View File
@@ -6,7 +6,7 @@ noinst_PROGRAMS = wtest wmquery wmfile testmywidget
LDADD= $(top_builddir)/WINGs/libWINGs.la $(top_builddir)/wrlib/libwraster.la \
$(top_builddir)/WINGs/libWUtil.la \
@XFTLIBS@ @INTLIBS@ @XLIBS@
@XFT_LIBS@ @INTLIBS@ @XLIBS@
testmywidget_SOURCES = testmywidget.c mywidget.c mywidget.h
@@ -17,4 +17,4 @@ wtest_DEPENDENCIES = $(top_builddir)/WINGs/libWINGs.la
EXTRA_DIST = logo.xpm upbtn.xpm wm.html wm.png
AM_CPPFLAGS = -I$(top_srcdir)/WINGs -I$(top_srcdir)/wrlib -I$(top_srcdir)/src \
-DRESOURCE_PATH=\"$(datadir)/WINGs\" @XFTFLAGS@ @HEADER_SEARCH_PATH@
-DRESOURCE_PATH=\"$(datadir)/WINGs\" @XFT_CFLAGS@ @HEADER_SEARCH_PATH@
+11 -1
View File
@@ -5,4 +5,14 @@ AUTOMAKE_OPTIONS =
# is this a kluge? if so, how should i do it?
includedir = @includedir@/WINGs
include_HEADERS = WINGs.h WUtil.h WINGsP.h
BUILT_SOURCES = WINGsP.h
CLEANFILES = WINGsP.h
include_HEADERS = WINGs.h WUtil.h
nodist_include_HEADERS = WINGsP.h
EXTRA_DIST = WINGsP.h.in
WINGsP.h: WINGsP.h.in $(top_builddir)/config.h
$(AM_V_GEN)$(top_srcdir)/script/replace-ac-keywords.sh \
--header "$(top_builddir)/config.h" \
--filter "USE_PANGO" \
-o $@ $<
+16 -16
View File
@@ -26,7 +26,7 @@
#include <WINGs/WUtil.h>
#include <X11/Xlib.h>
#define WINGS_H_VERSION 20150508
#define WINGS_H_VERSION 20210726
#ifdef __cplusplus
@@ -736,7 +736,7 @@ Bool WMRequestSelection(WMView *view, Atom selection, Atom target,
void *cdata);
extern char *WMSelectionOwnerDidChangeNotification;
extern const char *WMSelectionOwnerDidChangeNotification;
/* ---[ WINGs/dragcommon.c ]---------------------------------------------- */
@@ -977,11 +977,11 @@ WMPoint WMGetViewScreenPosition(WMView *view);
WMWidget* WMWidgetOfView(WMView *view);
/* notifications */
extern char *WMViewSizeDidChangeNotification;
extern const char *WMViewSizeDidChangeNotification;
extern char *WMViewFocusDidChangeNotification;
extern const char *WMViewFocusDidChangeNotification;
extern char *WMViewRealizedNotification;
extern const char *WMViewRealizedNotification;
/* ---[ WINGs/wballoon.c ]------------------------------------------------ */
@@ -1190,9 +1190,9 @@ void WMSetTextFieldDelegate(WMTextField *tPtr, WMTextFieldDelegate *delegate);
WMTextFieldDelegate* WMGetTextFieldDelegate(WMTextField *tPtr);
extern char *WMTextDidChangeNotification;
extern char *WMTextDidBeginEditingNotification;
extern char *WMTextDidEndEditingNotification;
extern const char *WMTextDidChangeNotification;
extern const char *WMTextDidBeginEditingNotification;
extern const char *WMTextDidEndEditingNotification;
/* ---[ WINGs/wscroller.c ]----------------------------------------------- */
@@ -1212,7 +1212,7 @@ void WMSetScrollerAction(WMScroller *sPtr, WMAction *action, void *clientData);
void WMSetScrollerArrowsPosition(WMScroller *sPtr,
WMScrollArrowPosition position);
extern char *WMScrollerDidScrollNotification;
extern const char *WMScrollerDidScrollNotification;
/* ---[ WINGs/wlist.c ]--------------------------------------------------- */
@@ -1291,8 +1291,8 @@ Bool WMListAllowsMultipleSelection(WMList *lPtr);
Bool WMListAllowsEmptySelection(WMList *lPtr);
extern char *WMListDidScrollNotification;
extern char *WMListSelectionDidChangeNotification;
extern const char *WMListDidScrollNotification;
extern const char *WMListSelectionDidChangeNotification;
/* ---[ WINGs/wbrowser.c ]------------------------------------------------ */
@@ -1324,7 +1324,7 @@ void WMSortBrowserColumnWithComparer(WMBrowser *bPtr, int column,
WMCompareDataProc *func);
/* Don't free the returned string. */
char* WMSetBrowserPath(WMBrowser *bPtr, char *path);
const char* WMSetBrowserPath(WMBrowser *bPtr, const char *path);
/* free the returned string */
char* WMGetBrowserPath(WMBrowser *bPtr);
@@ -1496,7 +1496,7 @@ void WMSetColorPanelPickerMode(WMColorPanel *panel, WMColorPanelMode mode);
void WMSetColorPanelAction(WMColorPanel *panel, WMAction2 *action, void *data);
extern char *WMColorPanelColorChangedNotification;
extern const char *WMColorPanelColorChangedNotification;
/* ---[ WINGs/wcolorwell.c ]---------------------------------------------- */
@@ -1509,7 +1509,7 @@ WMColor* WMGetColorWellColor(WMColorWell *cPtr);
void WSetColorWellBordered(WMColorWell *cPtr, Bool flag);
extern char *WMColorWellDidChangeNotification;
extern const char *WMColorWellDidChangeNotification;
/* ---[ WINGs/wscrollview.c ]--------------------------------------------- */
@@ -1876,7 +1876,7 @@ void WMSetFilePanelCanChooseFiles(WMFilePanel *panel, Bool flag);
void WMSetFilePanelAutoCompletion(WMFilePanel *panel, Bool flag);
void WMSetFilePanelDirectory(WMFilePanel *panel, char *path);
void WMSetFilePanelDirectory(WMFilePanel *panel, const char *path);
/* you can free the returned string */
char* WMGetFilePanelFileName(WMFilePanel *panel);
@@ -1884,7 +1884,7 @@ char* WMGetFilePanelFileName(WMFilePanel *panel);
void WMFreeFilePanel(WMFilePanel *panel);
int WMRunModalFilePanelForDirectory(WMFilePanel *panel, WMWindow *owner,
char *path, const char *name, char **fileTypes);
const char *path, const char *name, char **fileTypes);
void WMSetFilePanelAccessoryView(WMFilePanel *panel, WMView *view);
@@ -5,9 +5,7 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#ifdef USE_PANGO
#include <pango/pango.h>
#endif
@USE_PANGO@#include <pango/pango.h>
#include <WINGs/WINGs.h>
@@ -43,7 +41,7 @@ typedef struct _WINGsConfiguration {
unsigned mouseWheelDown;
} _WINGsConfiguration;
extern char *_WINGS_progname;
extern const char *_WINGS_progname;
extern _WINGsConfiguration WINGsConfiguration;
extern struct W_Application WMApplication;
@@ -459,9 +457,7 @@ typedef struct W_Font {
short refCount;
char *name;
#ifdef USE_PANGO
PangoLayout *layout;
#endif
@USE_PANGO@ PangoLayout *layout;
} W_Font;
#define W_FONTID(f) (f)->font->fid
+2 -1
View File
@@ -249,7 +249,7 @@ char* wexpandpath(const char *path);
int wcopy_file(const char *toPath, const char *srcFile, const char *destFile);
/* don't free the returned string */
char* wgethomedir(void);
const char* wgethomedir(void);
/* ---[ WINGs/proplist.c ]------------------------------------------------ */
@@ -864,6 +864,7 @@ Bool WMWritePropListToFile(WMPropList *plist, const char *path);
/* don't free the returned string */
const char* wusergnusteppath(void);
const char* wuserdatapath(void);
/* Free the returned string when you no longer need it */
char* wdefaultspathfordomain(const char *domain);
+1 -1
View File
@@ -599,7 +599,7 @@ static void dragSourceResponseTimeOut(void *destView)
W_DragDestinationInfoClear(info);
}
void W_DragDestinationStopTimer()
void W_DragDestinationStopTimer(void)
{
if (dndDestinationTimer != NULL) {
WMDeleteTimerHandler(dndDestinationTimer);
+1 -1
View File
@@ -1080,7 +1080,7 @@ static void dragSourceResponseTimeOut(void *source)
}
}
void W_DragSourceStopTimer()
void W_DragSourceStopTimer(void)
{
if (dndSourceTimer != NULL) {
WMDeleteTimerHandler(dndSourceTimer);
+2 -6
View File
@@ -39,7 +39,7 @@
#endif
char *wgethomedir()
const char *wgethomedir(void)
{
static char *home = NULL;
char *tmp;
@@ -48,11 +48,7 @@ char *wgethomedir()
if (home)
return home;
#ifdef HAVE_SECURE_GETENV
tmp = secure_getenv("HOME");
#else
tmp = getenv("HOME");
#endif
tmp = GETENV("HOME");
if (tmp) {
home = wstrdup(tmp);
return home;
+2 -1
View File
@@ -107,7 +107,8 @@ void *wmalloc(size_t size)
}
}
}
memset(tmp, 0, size);
if (tmp != NULL)
memset(tmp, 0, size);
return tmp;
}
+1 -1
View File
@@ -536,7 +536,7 @@ found_end_define_fname:
while (*src != '\0') {
idx = 0;
if (*src == '~') {
char *home = wgethomedir();
const char *home = wgethomedir();
while (*home != '\0') {
if (idx < sizeof(buffer) - 2)
buffer[idx++] = *home;
+41 -16
View File
@@ -1695,6 +1695,7 @@ Bool WMWritePropListToFile(WMPropList * plist, const char *path)
if (fprintf(theFile, "%s\n", desc) != strlen(desc) + 1) {
werror(_("writing to file: %s failed"), thePath);
wfree(desc);
fclose(theFile);
goto failure;
}
@@ -1731,23 +1732,36 @@ Bool WMWritePropListToFile(WMPropList * plist, const char *path)
* file, and the last component is stripped off. the rest is the
* the hierarchy to be created.
*
* refuses to create anything outside $WMAKER_USER_ROOT
* refuses to create anything outside $WMAKER_USER_ROOT/Defaults or $WMAKER_USER_ROOT/Library
*
* returns 1 on success, 0 on failure
*/
int wmkdirhier(const char *path)
{
const char *t;
const char *libpath;
char *udefpath;
int cmp;
char *thePath = NULL, buf[1024];
size_t p, plen;
struct stat st;
/* Only create directories under $WMAKER_USER_ROOT */
if ((t = wusergnusteppath()) == NULL)
return 0;
if (strncmp(path, t, strlen(t)) != 0)
return 0;
/* Only create directories under $WMAKER_USER_ROOT/Defaults or $WMAKER_USER_ROOT/Library */
libpath = wuserdatapath();
if (strncmp(path, libpath, strlen(libpath)) == 0)
if (path[strlen(libpath)] == '/')
goto path_in_valid_tree;
udefpath = wdefaultspathfordomain("");
cmp = strncmp(path, udefpath, strlen(udefpath));
wfree(udefpath);
if (cmp == 0)
/* Note: by side effect, 'udefpath' already contains a final '/' */
goto path_in_valid_tree;
/* If we reach this point, the path is outside the allowed tree */
return 0;
path_in_valid_tree:
thePath = wstrdup(path);
/* Strip the trailing component if it is a file */
p = strlen(thePath);
@@ -1770,7 +1784,6 @@ int wmkdirhier(const char *path)
}
memset(buf, 0, sizeof(buf));
strncpy(buf, t, sizeof(buf) - 1);
p = strlen(buf);
plen = strlen(thePath);
@@ -1781,7 +1794,7 @@ int wmkdirhier(const char *path)
strncpy(buf, thePath, p);
if (mkdir(buf, 0777) == -1 && errno == EEXIST &&
stat(buf, &st) == 0 && !S_ISDIR(st.st_mode)) {
werror(_("Could not create component %s"), buf);
werror(_("Could not create path component %s"), buf);
wfree(thePath);
return 0;
}
@@ -1823,7 +1836,7 @@ static int wrmdirhier_fn(const char *path, const struct stat *st,
/*
* remove a directory hierarchy
*
* refuses to remove anything outside $WMAKER_USER_ROOT
* refuses to remove anything outside $WMAKER_USER_ROOT/Defaults or $WMAKER_USER_ROOT/Library
*
* returns 1 on success, 0 on failure
*
@@ -1833,15 +1846,27 @@ static int wrmdirhier_fn(const char *path, const struct stat *st,
*/
int wrmdirhier(const char *path)
{
const char *libpath;
char *udefpath = NULL;
struct stat st;
int error;
const char *t;
/* Only remove directories under $WMAKER_USER_ROOT */
if ((t = wusergnusteppath()) == NULL)
return EPERM;
if (strncmp(path, t, strlen(t)) != 0)
return EPERM;
/* Only remove directories under $WMAKER_USER_ROOT/Defaults or $WMAKER_USER_ROOT/Library */
libpath = wuserdatapath();
if (strncmp(path, libpath, strlen(libpath)) == 0)
if (path[strlen(libpath)] == '/')
goto path_in_valid_tree;
udefpath = wdefaultspathfordomain("");
if (strncmp(path, udefpath, strlen(udefpath)) == 0)
/* Note: by side effect, 'udefpath' already contains a final '/' */
goto path_in_valid_tree;
wfree(udefpath);
return EPERM;
path_in_valid_tree:
wfree(udefpath);
/* Shortcut if it doesn't exist to begin with */
if (stat(path, &st) == -1)
+1 -1
View File
@@ -7,7 +7,7 @@
#define MAX_PROPERTY_SIZE 8*1024
char *WMSelectionOwnerDidChangeNotification = "WMSelectionOwnerDidChange";
const char *WMSelectionOwnerDidChangeNotification = "WMSelectionOwnerDidChange";
typedef struct SelectionHandler {
WMView *view;
+5 -7
View File
@@ -204,7 +204,7 @@ char *wstrndup(const char *str, size_t len)
char *wstrconcat(const char *str1, const char *str2)
{
char *str;
size_t slen;
size_t slen, slen1;
if (!str1 && str2)
return wstrdup(str2);
@@ -213,13 +213,11 @@ char *wstrconcat(const char *str1, const char *str2)
else if (!str1 && !str2)
return NULL;
slen = strlen(str1) + strlen(str2) + 1;
slen1 = strlen(str1);
slen = slen1 + strlen(str2) + 1;
str = wmalloc(slen);
if (wstrlcpy(str, str1, slen) >= slen ||
wstrlcat(str, str2, slen) >= slen) {
wfree(str);
return NULL;
}
strcpy(str, str1);
strcpy(str + slen1, str2);
return str;
}
+21 -20
View File
@@ -40,29 +40,25 @@ char *WMUserDefaultsDidChangeNotification = "WMUserDefaultsDidChangeNotification
static void synchronizeUserDefaults(void *foo);
#define DEFAULTS_DIR "/Defaults"
#ifndef HAVE_INOTIFY
/* Check defaults database for changes every this many milliseconds */
/* XXX: this is shared with src/ stuff, put it in some common header */
#define UD_SYNC_INTERVAL 2000
#endif
const char *wusergnusteppath()
const char *wusergnusteppath(void)
{
static const char subdir[] = "/GNUstep";
static const char subdir[] = "/" GSUSER_SUBDIR;
static char *path = NULL;
char *gspath, *h;
char *gspath;
const char *h;
int pathlen;
if (path)
/* Value have been already computed, re-use it */
return path;
#ifdef HAVE_SECURE_GETENV
gspath = secure_getenv("WMAKER_USER_ROOT");
#else
gspath = getenv("WMAKER_USER_ROOT");
#endif
gspath = GETENV("WMAKER_USER_ROOT");
if (gspath) {
gspath = wexpandpath(gspath);
if (gspath) {
@@ -84,6 +80,19 @@ const char *wusergnusteppath()
return path;
}
const char *wuserdatapath(void)
{
static char *path = NULL;
if (path)
/* Value have been already computed, re-use it */
return path;
path = wstrconcat(wusergnusteppath(), "/" USERDATA_SUBDIR);
return path;
}
char *wdefaultspathfordomain(const char *domain)
{
char *path;
@@ -91,12 +100,11 @@ char *wdefaultspathfordomain(const char *domain)
size_t slen;
gspath = wusergnusteppath();
slen = strlen(gspath) + strlen(DEFAULTS_DIR) + strlen(domain) + 4;
slen = strlen(gspath) + strlen("/" DEFAULTS_SUBDIR "/") + strlen(domain) + 1;
path = wmalloc(slen);
strcpy(path, gspath);
strcat(path, DEFAULTS_DIR);
strcat(path, "/");
strcat(path, "/" DEFAULTS_SUBDIR "/");
strcat(path, domain);
return path;
@@ -105,14 +113,7 @@ char *wdefaultspathfordomain(const char *domain)
/* XXX: doesn't quite belong to *user*defaults.c */
char *wglobaldefaultspathfordomain(const char *domain)
{
char *t = NULL;
size_t len;
len = strlen(DEFSDATADIR) + strlen(domain) + 2;
t = wmalloc(len);
snprintf(t, len, "%s/%s", DEFSDATADIR, domain);
return t;
return wstrconcat(PKGCONFDIR "/", domain);
}
void w_save_defaults_changes(void)
+31 -21
View File
@@ -9,7 +9,7 @@
struct W_Application WMApplication;
char *_WINGS_progname = NULL;
const char *_WINGS_progname = NULL;
Bool W_ApplicationInitialized(void)
{
@@ -83,7 +83,7 @@ void WMSetResourcePath(const char *path)
WMApplication.resourcePath = wstrdup(path);
}
char *WMGetApplicationName()
char *WMGetApplicationName(void)
{
return WMApplication.applicationName;
}
@@ -131,7 +131,9 @@ error:
char *WMPathForResourceOfType(const char *resource, const char *ext)
{
const char *gslocapps, *gssysapps, *gsuserapps;
char *path, *appdir;
char buffer[PATH_MAX];
size_t slen;
path = appdir = NULL;
@@ -141,11 +143,11 @@ char *WMPathForResourceOfType(const char *resource, const char *ext)
* - resourcePath/ext
* - dirname(argv[0])/ext
* - WMAKER_USER_ROOT/Applications/ApplicationName.app/ext
* - ~/GNUstep/Applications/ApplicationName.app/ext
* - GNUSTEP_LOCAL_ROOT/Applications/ApplicationName.app/ext
* - /usr/local/GNUstep/Applications/ApplicationName.app/ext
* - GNUSTEP_SYSTEM_ROOT/Applications/ApplicationName.app/ext
* - /usr/GNUstep/Applications/ApplicationName.app/ext
* - GNUSTEP_USER_APPS/ApplicationName.app/ext
* - GNUSTEP_LOCAL_APPS/ApplicationName.app/ext
* - /usr/local/lib/GNUstep/Applications/ApplicationName.app/ext
* - GNUSTEP_SYSTEM_APPS/ApplicationName.app/ext
* - /usr/lib/GNUstep/Applications/ApplicationName.app/ext
*/
if (WMApplication.resourcePath) {
@@ -170,32 +172,40 @@ char *WMPathForResourceOfType(const char *resource, const char *ext)
}
}
slen = strlen(WMApplication.applicationName) + sizeof("Applications/.app");
snprintf(buffer, sizeof(buffer), "Applications/%s.app", WMApplication.applicationName);
path = checkFile(GETENV("WMAKER_USER_ROOT"), buffer, ext, resource);
if (path)
goto out;
slen = strlen(WMApplication.applicationName) + sizeof("/.app");
appdir = wmalloc(slen);
if (snprintf(appdir, slen, "Applications/%s.app", WMApplication.applicationName) >= slen)
if (snprintf(appdir, slen, "/%s.app", WMApplication.applicationName) >= slen)
goto out;
path = checkFile(getenv("WMAKER_USER_ROOT"), appdir, ext, resource);
gsuserapps = GETENV("GNUSTEP_USER_APPS");
if (!gsuserapps) {
snprintf(buffer, sizeof(buffer), "%s/Applications", wusergnusteppath());
gsuserapps = buffer;
}
path = checkFile(gsuserapps, appdir, ext, resource);
if (path)
goto out;
path = checkFile(wusergnusteppath(), appdir, ext, resource);
gslocapps = GETENV("GNUSTEP_LOCAL_APPS");
if (!gslocapps)
gslocapps = "/usr/local/lib/GNUstep/Applications";
path = checkFile(gslocapps, appdir, ext, resource);
if (path)
goto out;
path = checkFile(getenv("GNUSTEP_LOCAL_ROOT"), appdir, ext, resource);
gssysapps = GETENV("GNUSTEP_SYSTEM_APPS");
if (!gssysapps)
gssysapps = "/usr/lib/GNUstep/Applications";
path = checkFile(gssysapps, appdir, ext, resource);
if (path)
goto out;
path = checkFile("/usr/local/GNUstep", appdir, ext, resource);
if (path)
goto out;
path = checkFile(getenv("GNUSTEP_SYSTEM_ROOT"), appdir, ext, resource);
if (path)
goto out;
path = checkFile("/usr/GNUstep", appdir, ext, resource); /* falls through */
path = checkFile("/usr/GNUstep/System/Applications", appdir, ext, resource); /* falls through */
out:
if (appdir)
+3 -2
View File
@@ -619,11 +619,12 @@ void WMSetBrowserHasScroller(WMBrowser * bPtr, int hasScroller)
bPtr->flags.hasScroller = hasScroller;
}
char *WMSetBrowserPath(WMBrowser * bPtr, char *path)
const char *WMSetBrowserPath(WMBrowser * bPtr, const char *path)
{
int i;
char *str;
char *tmp, *retPtr = NULL;
char *tmp;
const char *retPtr = NULL;
int item;
WMListItem *listItem;
+3 -3
View File
@@ -51,7 +51,7 @@ static WMColor *findCloseColor(WMScreen * scr, unsigned short red, unsigned shor
color->refCount = 1;
color->color = xcolor;
color->alpha = alpha;
color->flags.exact = 1;
color->flags.exact = 0;
color->gc = NULL;
return color;
@@ -91,7 +91,7 @@ WMColor *WMCreateRGBColor(WMScreen * scr, unsigned short red, unsigned short gre
color = findCloseColor(scr, red, green, blue, 0xffff);
}
if (!color)
color = WMBlackColor(scr);
color = scr->black;
return color;
}
@@ -117,7 +117,7 @@ WMColor *WMCreateRGBAColor(WMScreen * scr, unsigned short red, unsigned short gr
color = findCloseColor(scr, red, green, blue, alpha);
}
if (!color)
color = WMBlackColor(scr);
color = scr->black;
return color;
}
+24 -23
View File
@@ -44,7 +44,7 @@
# include <X11/extensions/shape.h>
#endif
char *WMColorPanelColorChangedNotification = "WMColorPanelColorChangedNotification";
const char *WMColorPanelColorChangedNotification = "WMColorPanelColorChangedNotification";
/*
* Bitmaps for magnifying glass cursor
@@ -394,7 +394,7 @@ static WMColorPanel *makeColorPanel(WMScreen * scrPtr, const char *name)
panel->mode = WMWheelModeColorPanel;
panel->lastChanged = 0;
panel->slidersmode = WMRGBModeColorPanel;
panel->configurationPath = wstrconcat(wusergnusteppath(), "/Library/Colors/");
panel->configurationPath = wstrconcat(wuserdatapath(), "/Colors/");
/* Some General Purpose Widgets */
panel->colorWell = WMCreateColorWell(panel->win);
@@ -1159,21 +1159,18 @@ static void readConfiguration(W_ColorPanel * panel)
DIR *dPtr;
struct dirent *dp;
struct stat stat_buf;
int item;
if (stat(panel->configurationPath, &stat_buf) != 0) {
if (mkdir(panel->configurationPath, S_IRWXU | S_IRGRP | S_IROTH | S_IXGRP | S_IXOTH) != 0) {
werror(_("Color Panel: Could not create directory %s needed"
" to store configurations"), panel->configurationPath);
WMSetPopUpButtonEnabled(panel->customPaletteMenuBtn, False);
WMSetPopUpButtonEnabled(panel->colorListColorMenuBtn, False);
WMSetPopUpButtonEnabled(panel->colorListListMenuBtn, False);
WMRunAlertPanel(WMWidgetScreen(panel->win), panel->win,
_("File Error"),
_("Could not create ColorPanel configuration directory"),
_("OK"), NULL, NULL);
}
if (!wmkdirhier(panel->configurationPath)) {
werror(_("Color Panel: Could not create directory %s needed"
" to store configurations"), panel->configurationPath);
WMSetPopUpButtonEnabled(panel->customPaletteMenuBtn, False);
WMSetPopUpButtonEnabled(panel->colorListColorMenuBtn, False);
WMSetPopUpButtonEnabled(panel->colorListListMenuBtn, False);
WMRunAlertPanel(WMWidgetScreen(panel->win), panel->win,
_("File Error"),
_("Could not create ColorPanel configuration directory"),
_("OK"), NULL, NULL);
return;
}
@@ -2645,7 +2642,7 @@ static void hsbTextFieldCallback(void *observerData, WMNotification * notificati
{
CPColor cpColor;
int value[3];
char tmp[4];
char tmp[12]; /* We only 4 bytes needed, but compilers cannot know that */
int n;
W_ColorPanel *panel = (W_ColorPanel *) observerData;
@@ -3504,13 +3501,17 @@ static void convertCPColor(CPColor * color)
old_hue = color->hsv.hue;
RRGBtoHSV(&(color->rgb), &(color->hsv));
/* In black the hue is undefined, and may change by conversion
* Same for white. */
if (((color->rgb.red == 0) &&
(color->rgb.green == 0) &&
(color->rgb.blue == 0)) ||
((color->rgb.red == 0) && (color->rgb.green == 0) && (color->rgb.blue == 255))
)
/*
* For pure grey colors, the Hue is generally calculated
* as 0, but in reality the Hue does not matter.
*
* But in an interactive GUI it is interresting to remember
* the previous Hue because if user moves away from perfect
* grey then he could be interrested in finding back his
* previous tint
*/
if ((color->rgb.red == color->rgb.green) &&
(color->rgb.red == color->rgb.blue) )
color->hsv.hue = old_hue;
break;
case cpHSV:
+4 -4
View File
@@ -3,7 +3,7 @@
#define XDND_COLOR_DATA_TYPE "application/X-color"
char *WMColorWellDidChangeNotification = "WMColorWellDidChangeNotification";
const char *WMColorWellDidChangeNotification = "WMColorWellDidChangeNotification";
typedef struct W_ColorWell {
W_Class widgetClass;
@@ -173,10 +173,10 @@ WMColorWell *WMCreateColorWell(WMWidget * parent)
void WMSetColorWellColor(WMColorWell * cPtr, WMColor * color)
{
if (cPtr->color)
if (cPtr->color && cPtr->color != color) {
WMReleaseColor(cPtr->color);
cPtr->color = WMRetainColor(color);
cPtr->color = WMRetainColor(color);
}
if (cPtr->colorView->flags.realized && cPtr->colorView->flags.mapped)
paintColorWell(cPtr);
+6
View File
@@ -29,6 +29,12 @@
# define _(text) (text)
#endif
#ifdef HAVE_SECURE_GETENV
#define GETENV(x) secure_getenv((x))
#else
#define GETENV(x) getenv((x))
#endif
#endif /* WINGS_CONFIG_H_ */
+4 -4
View File
@@ -343,7 +343,7 @@ void WMFreeFilePanel(WMFilePanel * panel)
}
int
WMRunModalFilePanelForDirectory(WMFilePanel * panel, WMWindow * owner, char *path, const char *name, char **fileTypes)
WMRunModalFilePanelForDirectory(WMFilePanel * panel, WMWindow * owner, const char *path, const char *name, char **fileTypes)
{
WMScreen *scr = WMWidgetScreen(panel->win);
@@ -387,12 +387,12 @@ WMRunModalFilePanelForDirectory(WMFilePanel * panel, WMWindow * owner, char *pat
return (panel->flags.canceled ? False : True);
}
void WMSetFilePanelDirectory(WMFilePanel * panel, char *path)
void WMSetFilePanelDirectory(WMFilePanel * panel, const char *path)
{
WMList *list;
WMListItem *item;
int col;
char *rest;
const char *rest;
rest = WMSetBrowserPath(panel->browser, path);
if (strcmp(path, "/") == 0)
@@ -761,7 +761,7 @@ static void goFloppy(WMWidget *widget, void *p_panel)
static void goHome(WMWidget *widget, void *p_panel)
{
WMFilePanel *panel = p_panel;
char *home;
const char *home;
/* Parameter not used, but tell the compiler that it is ok */
(void) widget;
+3
View File
@@ -253,6 +253,9 @@ WMFrame *WMCreateFrame(WMWidget * parent)
static void destroyFrame(Frame * fPtr)
{
if (fPtr->textColor)
WMReleaseColor(fPtr->textColor);
if (fPtr->caption)
wfree(fPtr->caption);
+2 -2
View File
@@ -1,8 +1,8 @@
#include "WINGsP.h"
char *WMListDidScrollNotification = "WMListDidScrollNotification";
char *WMListSelectionDidChangeNotification = "WMListSelectionDidChangeNotification";
const char *WMListDidScrollNotification = "WMListDidScrollNotification";
const char *WMListSelectionDidChangeNotification = "WMListSelectionDidChangeNotification";
typedef struct W_List {
W_Class widgetClass;
+3 -3
View File
@@ -25,7 +25,7 @@ static void handleKeyPress(XEvent * event, void *clientData)
XLookupString(&event->xkey, NULL, 0, &ksym, NULL);
if (ksym == XK_Return && panel->defBtn) {
if ((ksym == XK_Return || ksym == XK_KP_Enter) && panel->defBtn) {
WMPerformButtonClick(panel->defBtn);
} else if (ksym == XK_Escape) {
if (panel->altBtn || panel->othBtn) {
@@ -421,7 +421,7 @@ static void handleKeyPress2(XEvent * event, void *clientData)
XLookupString(&event->xkey, NULL, 0, &ksym, NULL);
if (ksym == XK_Return && panel->defBtn) {
if ((ksym == XK_Return || ksym == XK_KP_Enter) && panel->defBtn) {
WMPerformButtonClick(panel->defBtn);
} else if (ksym == XK_Escape) {
if (panel->altBtn) {
@@ -709,7 +709,7 @@ static void handleKeyPress3(XEvent * event, void *clientData)
XLookupString(&event->xkey, NULL, 0, &ksym, NULL);
if (ksym == XK_Return && panel->defBtn) {
if ((ksym == XK_Return || ksym == XK_KP_Enter) && panel->defBtn) {
WMPerformButtonClick(panel->defBtn);
} else if (ksym == XK_Escape) {
if (panel->altBtn) {
+1 -1
View File
@@ -20,7 +20,7 @@
#define AUTOSCROLL_DELAY 40
char *WMScrollerDidScrollNotification = "WMScrollerDidScrollNotification";
const char *WMScrollerDidScrollNotification = "WMScrollerDidScrollNotification";
typedef struct W_Scroller {
W_Class widgetClass;
+21 -10
View File
@@ -215,6 +215,11 @@ static char *default_bullet[] = {
" ooo "
};
/* These id are used when sharing the selected text between applications */
static Atom XA_Targets = None;
static Atom XA_Format_Text = None;
static Atom XA_Format_Compound_Text = None;
static void handleEvents(XEvent * event, void *data);
static void layOutDocument(Text * tPtr);
static void updateScrollers(Text * tPtr);
@@ -2036,17 +2041,13 @@ static void releaseSelection(Text * tPtr)
static WMData *requestHandler(WMView * view, Atom selection, Atom target, void *cdata, Atom * type)
{
Text *tPtr = view->self;
Display *dpy = tPtr->view->screen->display;
Atom _TARGETS;
Atom TEXT = XInternAtom(dpy, "TEXT", False);
Atom COMPOUND_TEXT = XInternAtom(dpy, "COMPOUND_TEXT", False);
WMData *data = NULL;
/* Parameter not used, but tell the compiler that it is ok */
(void) selection;
(void) cdata;
if (target == XA_STRING || target == TEXT || target == COMPOUND_TEXT) {
if (target == XA_STRING || target == XA_Format_Text || target == XA_Format_Compound_Text) {
char *text = WMGetTextSelectedStream(tPtr);
if (text) {
@@ -2059,14 +2060,13 @@ static WMData *requestHandler(WMView * view, Atom selection, Atom target, void *
} else
printf("didn't get it\n");
_TARGETS = XInternAtom(dpy, "TARGETS", False);
if (target == _TARGETS) {
if (target == XA_Targets) {
Atom array[4];
array[0] = _TARGETS;
array[0] = XA_Targets;
array[1] = XA_STRING;
array[2] = TEXT;
array[3] = COMPOUND_TEXT;
array[2] = XA_Format_Text;
array[3] = XA_Format_Compound_Text;
data = WMCreateDataWithBytes(&array, sizeof(array));
WMSetDataFormat(data, 32);
@@ -2974,6 +2974,17 @@ WMText *WMCreateTextForDocumentType(WMWidget * parent, WMAction * parser, WMActi
dpy = tPtr->view->screen->display;
scr = tPtr->view->screen;
if (XA_Targets == None) {
/*
* Because the X protocol guaranties that the value will never change in
* the lifespan of the server, we query the values only the first time a
* widget is created
*/
XA_Targets = XInternAtom(dpy, "TARGETS", False);
XA_Format_Text = XInternAtom(dpy, "TEXT", False);
XA_Format_Compound_Text = XInternAtom(dpy, "COMPOUND_TEXT", False);
}
tPtr->view->self = tPtr;
tPtr->view->attribs.cursor = scr->textCursor;
tPtr->view->attribFlags |= CWOverrideRedirect | CWCursor;
+4 -4
View File
@@ -10,9 +10,9 @@
#define CURSOR_BLINK_ON_DELAY 600
#define CURSOR_BLINK_OFF_DELAY 300
char *WMTextDidChangeNotification = "WMTextDidChangeNotification";
char *WMTextDidBeginEditingNotification = "WMTextDidBeginEditingNotification";
char *WMTextDidEndEditingNotification = "WMTextDidEndEditingNotification";
const char *WMTextDidChangeNotification = "WMTextDidChangeNotification";
const char *WMTextDidBeginEditingNotification = "WMTextDidBeginEditingNotification";
const char *WMTextDidEndEditingNotification = "WMTextDidEndEditingNotification";
typedef struct W_TextField {
W_Class widgetClass;
@@ -942,7 +942,7 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event)
{
char buffer[64];
KeySym ksym;
char *textEvent = NULL;
const char *textEvent = NULL;
void *data = NULL;
int count, refresh = 0;
int control_pressed = 0;
+1 -1
View File
@@ -5,7 +5,7 @@
#include "WINGsP.h"
void WHandleEvents()
void WHandleEvents(void)
{
/* Check any expired timers */
W_CheckTimerHandlers();
+3 -3
View File
@@ -5,9 +5,9 @@
/* the notifications about views */
char *WMViewSizeDidChangeNotification = "WMViewSizeDidChangeNotification";
char *WMViewFocusDidChangeNotification = "WMViewFocusDidChangeNotification";
char *WMViewRealizedNotification = "WMViewRealizedNotification";
const char *WMViewSizeDidChangeNotification = "WMViewSizeDidChangeNotification";
const char *WMViewFocusDidChangeNotification = "WMViewFocusDidChangeNotification";
const char *WMViewRealizedNotification = "WMViewRealizedNotification";
#define EVENT_MASK \
KeyPressMask|KeyReleaseMask|ButtonPressMask|ButtonReleaseMask| \
+13 -7
View File
@@ -446,12 +446,18 @@ static void str2rcolor(RContext * rc, const char *name, RColor * color)
{
XColor xcolor;
XParseColor(rc->dpy, rc->cmap, name, &xcolor);
color->alpha = 255;
color->red = xcolor.red >> 8;
color->green = xcolor.green >> 8;
color->blue = xcolor.blue >> 8;
if (XParseColor(rc->dpy, rc->cmap, name, &xcolor) != 0) {
color->alpha = 255;
color->red = xcolor.red >> 8;
color->green = xcolor.green >> 8;
color->blue = xcolor.blue >> 8;
} else {
/* Color Name was not found - Return white instead */
color->alpha = 255;
color->red = 255;
color->green = 255;
color->blue = 255;
}
}
static void dumpRImage(const char *path, RImage * image)
@@ -1822,7 +1828,7 @@ static void createPanel(Panel * p)
char *tmp;
Bool ok = True;
panel->fprefix = wstrconcat(wusergnusteppath(), "/Library/WindowMaker");
panel->fprefix = wstrconcat(wuserdatapath(), "/" PACKAGE_TARNAME);
if (access(panel->fprefix, F_OK) != 0) {
if (mkdir(panel->fprefix, 0755) < 0) {
+8 -4
View File
@@ -119,7 +119,9 @@ static const struct {
/* default: */ False, OPTION_WMAKER, "DbClickFullScreen" },
{ N_("Close rootmenu when mouse (left or right) is clicked outside focus."),
/* default: */ False, OPTION_WMAKER, "CloseRootMenuByLeftOrRightMouseClick" }
/* default: */ False, OPTION_WMAKER, "CloseRootMenuByLeftOrRightMouseClick" },
{ N_("Keep dock on primary head."),
/* default: */ False, OPTION_WMAKER, "KeepDockOnPrimaryHead"},
};
@@ -146,15 +148,16 @@ typedef struct _Panel {
static void changeIntTextfield(void *data, int delta)
{
WMTextField *textfield;
char *text;
char *text, buffer[12];
int value;
textfield = (WMTextField *)data;
text = WMGetTextFieldText(textfield);
value = atoi(text);
wfree(text);
value += delta;
sprintf(text, "%d", value);
WMSetTextFieldText(textfield, text);
sprintf(buffer, "%d", value);
WMSetTextFieldText(textfield, buffer);
}
static void downButtonCallback(WMWidget *self, void *data)
@@ -314,6 +317,7 @@ static void storeDefaults(_Panel *panel)
text = WMGetTextFieldText(panel->textfield[i]);
value = atoi(text);
wfree(text);
SetIntegerForKey(value, expert_options[i].op_name);
break;
+3 -3
View File
@@ -195,8 +195,8 @@ static void showData(_Panel * panel)
if (i < 0)
i = 0;
else if (i > 9)
i = 9;
else if (i > 29)
i = 29;
WMSetPopUpButtonSelectedItem(panel->sizeP, i);
/* Mini-Previews for Icons */
@@ -339,7 +339,7 @@ static void createPanel(Panel * p)
panel->sizeP = WMCreatePopUpButton(panel->sizeF);
WMResizeWidget(panel->sizeP, 80, 20);
WMMoveWidget(panel->sizeP, 10, 19);
for (i = 24; i <= 96; i += 8) {
for (i = 24; i <= 256; i += 8) {
sprintf(buf, "%ix%i", i, i);
WMAddPopUpButtonItem(panel->sizeP, buf);
}
+1 -1
View File
@@ -320,7 +320,7 @@ char *capture_shortcut(Display *dpy, Bool *capturing, Bool convert_case)
/* conditional mask check to get numeric keypad keys */
ksym = XkbKeycodeToKeysym(dpy, ev.xkey.keycode, 0, ev.xkey.state & numlock_mask?1:0);
else
ksym = XKeycodeToKeysym(dpy, ev.xkey.keycode, 0);
ksym = XKeycodeToKeysym(dpy, ev.xkey.keycode, ev.xkey.state & numlock_mask?1:0);
if (!IsModifierKey(ksym)) {
if (convert_case) {
+15 -3
View File
@@ -10,9 +10,20 @@ wpdatadir = @wprefs_datadir@
wpdata_DATA = WPrefs.tiff WPrefs.xpm
applicationsdir = @datadir@/applications
applications_DATA = WPrefs.desktop
WPrefs.desktop: WPrefs.desktop.in
$(AM_V_GEN)sed -e "s:#wprefs_bindir#:${wprefs_bindir}:" \
-e "s:#wprefs_datadir#:${wprefs_datadir}:" $< > $@
EXTRA_DIST = $(wpdata_DATA) \
KeyboardSettings.c \
Themes.c
Themes.c \
WPrefs.desktop.in
DISTCLEANFILES = WPrefs.desktop
WPrefs_SOURCES = \
main.c \
@@ -45,10 +56,11 @@ WPrefs_SOURCES = \
# KeyboardSettings.c \
# Themes.c
AM_CFLAGS =
AM_CFLAGS = @PANGO_CFLAGS@
AM_CPPFLAGS = -DRESOURCE_PATH=\"$(wpdatadir)\" -DWMAKER_RESOURCE_PATH=\"$(pkgdatadir)\" \
-I$(top_srcdir)/wrlib -I$(top_srcdir)/WINGs @HEADER_SEARCH_PATH@
-I$(top_builddir)/wrlib -I$(top_srcdir)/WINGs -I$(top_builddir)/WINGs \
@HEADER_SEARCH_PATH@
WPrefs_DEPENDENCIES = $(top_builddir)/WINGs/libWINGs.la
+29 -12
View File
@@ -507,7 +507,7 @@ static void createPanel(_Panel * p)
WMSetScrollViewContentView(sview, WMWidgetView(pad));
data = putNewItem(panel, pad, ExternalInfo, _("Debian Menu"));
data->param.pipe.command = "/etc/GNUstep/Defaults/menu.hook";
data->param.pipe.command = "/etc/" GSUSER_SUBDIR "/" DEFAULTS_SUBDIR "/menu.hook";
data = putNewItem(panel, pad, PipeInfo, _("RedHat Menu"));
data->param.pipe.command = "wmconfig --output wmaker";
@@ -518,19 +518,25 @@ static void createPanel(_Panel * p)
data = putNewItem(panel, pad, DirectoryInfo, _("Themes"));
data->param.directory.command = "setstyle";
data->param.directory.directory =
"/usr/share/WindowMaker/Themes /usr/local/share/WindowMaker/Themes $HOME/GNUstep/Library/WindowMaker/Themes";
"/usr/share/" PACKAGE_TARNAME "/Themes"
" /usr/local/share/" PACKAGE_TARNAME "/Themes"
" $HOME/" GSUSER_SUBDIR "/" USERDATA_SUBDIR "/" PACKAGE_TARNAME "/Themes";
data->param.directory.stripExt = 1;
data = putNewItem(panel, pad, DirectoryInfo, _("Bg Images (scale)"));
data->param.directory.command = "wmsetbg -u -s";
data->param.directory.directory =
"/opt/kde2/share/wallpapers /usr/share/WindowMaker/Backgrounds $HOME/GNUstep/Library/WindowMaker/Backgrounds";
"/opt/kde2/share/wallpapers"
" /usr/share/" PACKAGE_TARNAME "/Backgrounds"
" $HOME/" GSUSER_SUBDIR "/" USERDATA_SUBDIR "/" PACKAGE_TARNAME "/Backgrounds";
data->param.directory.stripExt = 1;
data = putNewItem(panel, pad, DirectoryInfo, _("Bg Images (tile)"));
data->param.directory.command = "wmsetbg -u -t";
data->param.directory.directory =
"/opt/kde2/share/wallpapers /usr/share/WindowMaker/Backgrounds $HOME/GNUstep/Library/WindowMaker/Backgrounds";
"/opt/kde2/share/wallpapers"
" /usr/share/" PACKAGE_TARNAME "/Backgrounds"
" $HOME/" GSUSER_SUBDIR "/" USERDATA_SUBDIR "/" PACKAGE_TARNAME "/Backgrounds";
data->param.directory.stripExt = 1;
smenu = putNewSubmenu(pad, _("Assorted XTerms"));
@@ -619,7 +625,8 @@ static void createPanel(_Panel * p)
WMSetLabelText(label, _("Enter the path for a file containing a menu\n"
"or a list of directories with the programs you\n"
"want to have listed in the menu. Ex:\n"
"~/GNUstep/Library/WindowMaker/menu\n" "or\n" "/usr/bin ~/xbin"));
"~/" GSUSER_SUBDIR "/" USERDATA_SUBDIR "/" PACKAGE_TARNAME "/menu\n"
"or\n" "/usr/bin ~/xbin"));
WMMapSubwidgets(panel->pathF);
@@ -914,6 +921,11 @@ static ItemData *parseCommand(WMPropList * item)
data->type = ExecInfo;
if (parameter == NULL) {
wfree(data);
return NULL;
}
data->param.exec.command = wstrdup(parameter);
if (shortcut)
data->param.exec.shortcut = wstrdup(shortcut);
@@ -926,6 +938,12 @@ static ItemData *parseCommand(WMPropList * item)
* |pipe
*/
p = parameter;
if (p == NULL) {
wfree(data);
return NULL;
}
while (isspace(*p) && *p)
p++;
if (*p == '|') {
@@ -1482,16 +1500,11 @@ static WMPropList *getDefaultMenu(_Panel * panel)
static void showData(_Panel * panel)
{
const char *gspath;
char *menuPath, *labelText;
char buf[1024];
WMPropList *pmenu;
gspath = wusergnusteppath();
menuPath = wmalloc(strlen(gspath) + 32);
strcpy(menuPath, gspath);
strcat(menuPath, "/Defaults/WMRootMenu");
menuPath = wdefaultspathfordomain("WMRootMenu");
pmenu = WMReadPropListFromFile(menuPath);
@@ -1502,8 +1515,12 @@ static void showData(_Panel * panel)
path = wexpandpath(WMGetFromPLString(pmenu));
if (access(path, F_OK) < 0)
if (access(path, F_OK) < 0) {
char *old_path = path;
path = wfindfile(DEF_CONFIG_PATHS, path);
wfree(old_path);
}
/* TODO: if needed, concatenate locale suffix to path.
See getLocalizedMenuFile() in src/rootmenu.c. */
+3 -3
View File
@@ -384,7 +384,7 @@ static void fillModifierPopUp(WMPopUpButton * pop)
if (xext_xkb_supported)
ksym = XkbKeycodeToKeysym(dpy, mapping->modifiermap[idx], 0, l);
else
ksym = XKeycodeToKeysym(dpy, mapping->modifiermap[idx], 0);
ksym = XKeycodeToKeysym(dpy, mapping->modifiermap[idx], l);
if (ksym != NoSymbol)
break;
}
@@ -650,7 +650,7 @@ static void storeCommandInScript(const char *cmd, const char *line)
umask(permissions);
permissions = (S_IRWXU | S_IRWXG | S_IRWXO) & (~permissions);
path = wstrconcat(wusergnusteppath(), "/Library/WindowMaker/autostart");
path = wstrconcat(wuserdatapath(), "/" PACKAGE_TARNAME "/autostart");
f = fopen(path, "rb");
if (!f) {
@@ -668,7 +668,7 @@ static void storeCommandInScript(const char *cmd, const char *line)
char *tmppath;
FILE *fo;
tmppath = wstrconcat(wusergnusteppath(), "/Library/WindowMaker/autostart.tmp");
tmppath = wstrconcat(wuserdatapath(), "/" PACKAGE_TARNAME "/autostart.tmp");
fo = fopen(tmppath, "wb");
if (!fo) {
werror(_("could not create temporary file %s"), tmppath);
+6 -6
View File
@@ -77,11 +77,11 @@ static void showData(_Panel * panel)
if (array)
wwarning(_("bad value in option IconPath. Using default path list"));
addPathToList(panel->icoL, -1, "~/pixmaps");
addPathToList(panel->icoL, -1, "~/GNUstep/Library/Icons");
addPathToList(panel->icoL, -1, "~/" GSUSER_SUBDIR "/" USERDATA_SUBDIR "/Icons");
addPathToList(panel->icoL, -1, "/usr/include/X11/pixmaps");
addPathToList(panel->icoL, -1, "/usr/local/share/WindowMaker/Icons");
addPathToList(panel->icoL, -1, "/usr/local/share/WindowMaker/Pixmaps");
addPathToList(panel->icoL, -1, "/usr/share/WindowMaker/Icons");
addPathToList(panel->icoL, -1, "/usr/local/share/" PACKAGE_TARNAME "/Icons");
addPathToList(panel->icoL, -1, "/usr/local/share/" PACKAGE_TARNAME "/Pixmaps");
addPathToList(panel->icoL, -1, "/usr/share/" PACKAGE_TARNAME "/Icons");
} else {
for (i = 0; i < WMGetPropListItemCount(array); i++) {
val = WMGetFromPLArray(array, i);
@@ -94,8 +94,8 @@ static void showData(_Panel * panel)
if (array)
wwarning(_("bad value in option PixmapPath. Using default path list"));
addPathToList(panel->pixL, -1, "~/pixmaps");
addPathToList(panel->pixL, -1, "~/GNUstep/Library/WindowMaker/Pixmaps");
addPathToList(panel->pixL, -1, "/usr/local/share/WindowMaker/Pixmaps");
addPathToList(panel->pixL, -1, "~/" GSUSER_SUBDIR "/" USERDATA_SUBDIR "/" PACKAGE_TARNAME "/Pixmaps");
addPathToList(panel->pixL, -1, "/usr/local/share/" PACKAGE_TARNAME "/Pixmaps");
} else {
for (i = 0; i < WMGetPropListItemCount(array); i++) {
val = WMGetFromPLArray(array, i);
+9
View File
@@ -0,0 +1,9 @@
[Desktop Entry]
Version=1.5
Type=Application
Name=WPrefs
Comment=Window Maker Preferences
TryExec=#wprefs_bindir#/WPrefs
Exec=WPrefs
Icon=#wprefs_datadir#/WPrefs.xpm
Categories=Settings;DesktopSettings;
+2 -2
View File
@@ -1,7 +1,7 @@
File Language Current Maintainer
------------------------------------------------------------------------------
pt.po Portuguese Eliphas Levy Theodoro <eliphas@conectiva.com.br>
hr.po Croatian Toni Biliæ <tbilic@oliver.efos.hr>
hr.po Croatian Toni Biliæ <tbilic@oliver.efos.hr>
fr.po French Bastien NOCERA <hadess@writeme.com>
Hadess <hadess@infonie.fr>
Antoine Hulin <antoine@origan.fdn.org>
@@ -23,6 +23,6 @@ bg.po Bulgarian Slavei Karadjov <slaff@exco.net>
Anton Zinoviev <zinoviev@debian.org>
sk.po Slovak Jan 'judas' Tomka <judas@linux.sk>
et.po Estonian Ivar Smolin <okul@linux.ee>
ca.po Catalan Ernest Adrogué <eadrogue@gmx.net>
ca.po Catalan Ernest Adrogué <eadrogue@gmx.net>
nl.po Dutch Alwin <translations@ziggo.nl>
fy.po Frisian Alwin <translations@ziggo.nl>
+3 -3
View File
@@ -1,6 +1,6 @@
defsdatadir = $(pkgdatadir)/Backgrounds
bgdatadir = $(pkgdatadir)/Backgrounds
defsdata_DATA = BlueImage.jpeg
bgdata_DATA = BlueImage.jpeg
EXTRA_DIST = $(defsdata_DATA)
EXTRA_DIST = $(bgdata_DATA)
+1 -1
View File
@@ -1,4 +1,4 @@
defsdata_DATA = WMRootMenu WMWindowAttributes WindowMaker WMState WMGLOBAL
pkgconf_DATA = WMRootMenu WMWindowAttributes WindowMaker WMState WMGLOBAL
wpexecbindir = @wprefs_bindir@
+1
View File
@@ -106,6 +106,7 @@
SwitchPanelOnlyOpen = NO;
MiniPreviewSize = 128;
IgnoreGtkHints = NO;
KeepDockOnPrimaryHead = NO;
MenuStyle = normal;
WidgetColor = (solid, gray);
WorkspaceSpecificBack = ();
+2 -2
View File
@@ -1,7 +1,7 @@
defsdatadir = $(pkgdatadir)/IconSets
iconsetdatadir = $(pkgdatadir)/IconSets
defsdata_DATA = Default.iconset
iconsetdata_DATA = Default.iconset
EXTRA_DIST =
+3 -3
View File
@@ -1,8 +1,8 @@
defsdatadir = $(pkgdatadir)/Icons
icondatadir = $(pkgdatadir)/Icons
defsdata_DATA = \
icondata_DATA = \
BitchX.tiff\
BitchX.xpm\
clip.tiff\
@@ -74,5 +74,5 @@ defsdata_DATA = \
xv.xpm
EXTRA_DIST = $(defsdata_DATA)
EXTRA_DIST = $(icondata_DATA)
+4 -1
View File
@@ -74,7 +74,10 @@ dist_prefsdata_DATA =\
nodist_prefsdata_DATA = $(GENERATED_MENUS)
EXTRA_DIST = $(addsuffix .in, $(GENERATED_MENUS))
xsessionsdir = @datadir@/xsessions
xsessions_DATA = wmaker.desktop
EXTRA_DIST = $(addsuffix .in, $(GENERATED_MENUS)) wmaker.desktop
CLEANFILES = $(GENERATED_MENUS)
+3 -3
View File
@@ -1,10 +1,10 @@
defsdatadir = $(pkgdatadir)/Pixmaps
pixmapdatadir = $(pkgdatadir)/Pixmaps
defsdata_DATA = tile.tiff \
pixmapdata_DATA = tile.tiff \
tile.xpm \
swtile.png \
swback.png \
swback2.png
EXTRA_DIST = $(defsdata_DATA)
EXTRA_DIST = $(pixmapdata_DATA)
+3 -3
View File
@@ -36,7 +36,7 @@ menu.ja Japanese MANOME Tomonori <manome@itlb.te.noda.sut.ac.jp>
ABE Shige <sabe@ibm.net>
menu.pt Portuguese Alfredo K. Kojima <kojima@inf.ufrgs.br>
menu.de German Carsten Schaar <nhadcasc@fs-maphy.uni-hannover.de>
menu.cz Czech David ©auer <xsauer@hwlab.felk.cvut.cz>
menu.cz Czech David ©auer <xsauer@hwlab.felk.cvut.cz>
menu.ko Korean Chae-Yong Chong <cychong@metro.telecom.samsung.co.kr>
Byeong-Chan Kim <redhands@linux.sarang.net>
menu.gl Galician Xose Vazquez <xose@arrakis.es>
@@ -44,7 +44,7 @@ menu.fr French ObiTuarY <obituary@freshmeat.net>
menu.it Italian Roberto Checozzo <croberto@aerre.it>
menu.ru Russian August S.Sigov <freedomain@actor.ru>
menu.es Spanish Rodrigo Hornos Prados <tnetrhp@ctv.es>
José Luis Rivas López <jrivas@ares.ipf.uvigo.es>
José Luis Rivas López <jrivas@ares.ipf.uvigo.es>
menu.he Hebrew Please send me your name/email if you wrote this
We unfortunately lost that info :(
menu.tr Turkish F. Kagan Gurkaynak <kgf@wpi.edu>
@@ -56,7 +56,7 @@ menu.dk Danish John M. Lockard <jlockard@math.lsa.umich.edu>
Jacob Sparre Andersen <sparre@cats.nbi.dk>
menu.sl Slovene Alen Salamun <snowman@hal9000.medinet.si>
menu.hu Hungarian Csanaki Csaba <prew@mail.matav.hu>
menu.ca Català Carles Amig<F3> dj_fr3nd@hotmail.com
menu.ca Català Carles Amig<F3> dj_fr3nd@hotmail.com
menu.zh_TW.Big5 Chinese Li Wei Jih <lwj83@cs.ccu.edu.tw>
menu.zh_CN Chinese Wang Jian <wangjian2@asiainfo.com>
menu.pl Polish Maciej Friedel <tytus@tytus.itma.pwr.wroc.pl>
+3 -3
View File
@@ -1,7 +1,7 @@
prefsdatadir = $(pkgdatadir)/Styles
styledatadir = $(pkgdatadir)/Styles
prefsdata_DATA =\
styledata_DATA =\
Adwaita.style\
Autumn.style\
Black.style\
@@ -39,6 +39,6 @@ prefsdata_DATA =\
Traditional.style\
VioletBlue.style
EXTRA_DIST = $(prefsdata_DATA)
EXTRA_DIST = $(styledata_DATA)
+3 -3
View File
@@ -1,6 +1,6 @@
defsdatadir = $(pkgdatadir)/Themes
themesdatadir = $(pkgdatadir)/Themes
defsdata_DATA = Default.style OpenStep.style Pastel.style SteelBlueSilk.style Blau.style
themesdata_DATA = Default.style OpenStep.style Pastel.style SteelBlueSilk.style Blau.style
EXTRA_DIST = $(defsdata_DATA)
EXTRA_DIST = $(themesdata_DATA)
+7
View File
@@ -0,0 +1,7 @@
[Desktop Entry]
Name=Window Maker
Comment=This session logs you into Window Maker
Exec=wmaker
TryExec=wmaker
DesktopNames=WindowMaker
X-GDM-SessionRegisters=true
+131 -76
View File
@@ -103,6 +103,7 @@ LT_INIT
dnl Debugging Options
dnl =================
m4_divert_push([INIT_PREPARE])dnl
AC_ARG_ENABLE([debug],
[AS_HELP_STRING([--enable-debug], [enable debugging options, @<:@default=no@:>@])],
[AS_CASE(["$enableval"],
@@ -110,6 +111,7 @@ AC_ARG_ENABLE([debug],
[no], [debug=no],
[AC_MSG_ERROR([bad value $enableval for --enable-debug])] )],
[debug=no])
m4_divert_pop([INIT_PREPARE])dnl
AS_IF([test "x$debug" = "xyes"],
[dnl This flag should have already been detected and added, but if user
dnl provided an explicit CFLAGS it may not be the case
@@ -232,6 +234,20 @@ AS_IF([test "x$debug" = "xyes"],
])
dnl To upload documentation to the Website
dnl ======================================
m4_divert_push([INIT_PREPARE])dnl
AC_ARG_WITH([web-repo],
[AS_HELP_STRING([--with-web-repo=PATH], [path to your git repository for the Web home page (maintainer stuff)])],
[AS_CASE([$withval],
[yes], [AC_MSG_ERROR([bad value '$withval' for --with-web-repo, expected a path]) ],
[no], [WEB_REPO_ROOT=""],
[WEB_REPO_ROOT=$withval])],
[WEB_REPO_ROOT=""])
m4_divert_pop([INIT_PREPARE])dnl
WM_CHECK_WEBREPODIR
dnl Support for Nested Functions by the compiler
dnl ============================================
WM_PROG_CC_NESTEDFUNC
@@ -296,24 +312,30 @@ AC_ARG_WITH(incs-from, AS_HELP_STRING([--with-incs-from], [pass compiler flags t
dnl Features Configuration
dnl ======================
m4_divert_push([INIT_PREPARE])dnl
AC_ARG_ENABLE([animations],
[AS_HELP_STRING([--disable-animations], [disable permanently animations @<:@default=enabled@:>@])],
[AS_CASE(["$enableval"],
[yes|no], [],
[AC_MSG_ERROR([bad value $enableval for --enable-animations])])],
[enable_animations="yes"])
m4_divert_pop([INIT_PREPARE])dnl
AS_IF([test "x$enable_animations" = "xno"],
[unsupported="$unsupported Animations"],
[AC_DEFINE([USE_ANIMATIONS], [1], [Defined when user did not request to disable animations])
supported_core="$supported_core Animations"])
m4_divert_push([INIT_PREPARE])dnl
AC_ARG_ENABLE([mwm-hints],
[AS_HELP_STRING([--disable-mwm-hints], [disable support for Motif WM hints @<:@default=enabled@:>@])],
[AS_CASE(["$enableval"],
[yes|no], [],
[AC_MSG_ERROR([bad value $enableval for --enable-mwm-hints])])],
[enable_mwm_hints="yes"])
m4_divert_pop([INIT_PREPARE])dnl
AS_IF([test "x$enable_mwm_hints" = "xno"],
[unsupported="$unsupported MWMHints"],
[AC_DEFINE([USE_MWM_HINTS], [1], [Defined when used did not request to disable Motif WM hints])
@@ -323,6 +345,7 @@ AM_CONDITIONAL([USE_MWM_HINTS], [test "x$enable_mwm_hints" != "xno"])
dnl Boehm GC
dnl ========
m4_divert_push([INIT_PREPARE])dnl
AC_ARG_ENABLE([boehm-gc],
[AS_HELP_STRING([--enable-boehm-gc], [use Boehm GC instead of the default libc malloc() [default=no]])],
[AS_CASE(["$enableval"],
@@ -330,6 +353,8 @@ AC_ARG_ENABLE([boehm-gc],
[no], [with_boehm_gc=no],
[AC_MSG_ERROR([bad value $enableval for --enable-boehm-gc])] )],
[with_boehm_gc=no])
m4_divert_pop([INIT_PREPARE])dnl
AS_IF([test "x$with_boehm_gc" = "xyes"],
AC_SEARCH_LIBS([GC_malloc], [gc],
[AC_DEFINE(USE_BOEHM_GC, 1, [Define if Boehm GC is to be used])],
@@ -338,10 +363,12 @@ AS_IF([test "x$with_boehm_gc" = "xyes"],
dnl LCOV
dnl ====
m4_divert_push([INIT_PREPARE])dnl
AC_ARG_ENABLE([lcov],
[AS_HELP_STRING([--enable-lcov[=output-directory]], [enable coverage data generation using LCOV (GCC only) [default=no]])],
[],
[enable_lcov=no])
m4_divert_pop([INIT_PREPARE])dnl
AS_IF([test "x$enable_lcov" != "xno"],
[AX_CFLAGS_GCC_OPTION(-fprofile-arcs -ftest-coverage)
@@ -360,7 +387,7 @@ AC_FUNC_MEMCMP
AC_FUNC_VPRINTF
WM_FUNC_SECURE_GETENV
AC_CHECK_FUNCS(gethostname select poll strcasecmp strncasecmp \
setsid mallinfo mkstemp sysconf)
setsid mallinfo2 mkstemp sysconf)
AC_SEARCH_LIBS([strerror], [cposix])
dnl nanosleep is generally available in standard libc, although not always the
@@ -374,13 +401,15 @@ WM_FUNC_OPEN_NOFOLLOW
dnl Check for strlcat/strlcpy
dnl =========================
m4_divert_push([INIT_PREPARE])dnl
AC_ARG_WITH([libbsd],
[AS_HELP_STRING([--without-libbsd], [do not use libbsd for strlcat and strlcpy [default=check]])],
[AS_IF([test "x$with_libbsd" != "xno"],
[with_libbsd=bsd]
[with_libbsd=bsd],
[with_libbsd=]
)],
[with_libbsd=bsd])
m4_divert_pop([INIT_PREPARE])dnl
tmp_libs=$LIBS
AC_SEARCH_LIBS([strlcat],[$with_libbsd],
@@ -455,6 +484,7 @@ dnl that the gettext environment works
WM_I18N_LANGUAGES
WM_I18N_XGETTEXT
WM_I18N_MENUTEXTDOMAIN
WM_LIBRARY_CONSTRUCTORS
dnl ===========================================
dnl Stuff that uses X
@@ -503,24 +533,30 @@ AC_CHECK_LIB([X11], [XConvertCase],
dnl XKB keyboard language status
dnl ============================
m4_divert_push([INIT_PREPARE])dnl
AC_ARG_ENABLE([modelock],
[AS_HELP_STRING([--enable-modelock], [XKB keyboard language status support])],
[AS_CASE([$enableval],
[yes|no], [],
[AC_MSG_ERROR([bad value '$enableval' for --enable-modelock])])],
[enable_modelock=no])
m4_divert_pop([INIT_PREPARE])dnl
AS_IF([test "x$enable_modelock" = "xyes"],
[AC_DEFINE([XKB_MODELOCK], [1], [whether XKB language MODELOCK should be enabled]) ])
dnl XDND Drag-nd-Drop support
dnl =========================
m4_divert_push([INIT_PREPARE])dnl
AC_ARG_ENABLE([xdnd],
[AS_HELP_STRING([--disable-xdnd], [disable support for Drag-and-Drop on the dock @<:@default=enabled@:>@])],
[AS_CASE(["$enableval"],
[yes|no], [],
[AC_MSG_ERROR([bad value $enableval for --disable-xdnd]) ]) ],
[enable_xdnd=yes])
m4_divert_pop([INIT_PREPARE])dnl
AS_IF([test "x$enable_xdnd" = "xyes"],
[supported_core="$supported_core XDnD"
AC_DEFINE([USE_DOCK_XDND], [1], [whether Drag-and-Drop on the dock should be enabled])],
@@ -530,12 +566,15 @@ AM_CONDITIONAL([USE_DOCK_XDND], [test "x$enable_xdnd" != "xno"])
dnl Support for ICCCM 2.0 Window Manager replacement
dnl ================================================
m4_divert_push([INIT_PREPARE])dnl
AC_ARG_ENABLE([wmreplace],
[AS_HELP_STRING([--enable-wmreplace], [support for ICCCM window manager replacement])],
[AS_CASE([$enableval],
[yes|no], [],
[AC_MSG_ERROR([bad value '$enableval' for --enable-wmreplace])])],
[enable_wmreplace=no])
m4_divert_pop([INIT_PREPARE])dnl
AS_IF([test "x$enable_wmreplace" = "xyes"],
[AC_DEFINE([USE_ICCCM_WMREPLACE], [1],
[define to support ICCCM protocol for window manager replacement])
@@ -544,23 +583,28 @@ AS_IF([test "x$enable_wmreplace" = "xyes"],
dnl XShape support
dnl ==============
m4_divert_push([INIT_PREPARE])dnl
AC_ARG_ENABLE([shape],
[AS_HELP_STRING([--disable-shape], [disable shaped window extension support])],
[AS_CASE(["$enableval"],
[yes|no], [],
[AC_MSG_ERROR([bad value $enableval for --enable-shape]) ]) ],
[enable_shape=auto])
m4_divert_pop([INIT_PREPARE])dnl
WM_XEXT_CHECK_XSHAPE
dnl MIT-SHM support
dnl ===============
m4_divert_push([INIT_PREPARE])dnl
AC_ARG_ENABLE([shm],
[AS_HELP_STRING([--disable-shm], [disable usage of MIT-SHM extension])],
[AS_CASE(["$enableval"],
[yes|no], [],
[AC_MSG_ERROR([bad value $enableval for --enable-shm]) ]) ],
[enable_shm=auto])
m4_divert_pop([INIT_PREPARE])dnl
WM_XEXT_CHECK_XSHM
@@ -572,23 +616,27 @@ WM_EXT_CHECK_XMU
dnl XINERAMA support
dnl ================
m4_divert_push([INIT_PREPARE])dnl
AC_ARG_ENABLE([xinerama],
[AS_HELP_STRING([--enable-xinerama], [enable Xinerama extension support])],
[AS_CASE(["$enableval"],
[yes|no], [],
[AC_MSG_ERROR([bad value $enableval for --enable-xinerama]) ]) ],
[enable_xinerama=auto])
m4_divert_pop([INIT_PREPARE])dnl
WM_XEXT_CHECK_XINERAMA
dnl RandR support
dnl =============
m4_divert_push([INIT_PREPARE])dnl
AC_ARG_ENABLE([randr],
[AS_HELP_STRING([--enable-randr], [enable RandR extension support (NOT recommended, buggy)])],
[AS_CASE(["$enableval"],
[yes|no], [],
[AC_MSG_ERROR([bad value $enableval for --enable-randr]) ]) ],
[enable_randr=no])
m4_divert_pop([INIT_PREPARE])dnl
WM_XEXT_CHECK_XRANDR
@@ -614,72 +662,38 @@ AC_SUBST(FCLIBS)
dnl Xft2 antialiased font support
dnl =============================
m4_define([XFT_MIN_VERSION], [2.1.0])
PKG_CHECK_MODULES([XFT], [xft >= ]XFT_MIN_VERSION,
[], dnl Module found, nothing to do
[XFT_CFLAGS=failed])
AS_IF([test "x$XFT_CFLAGS" = "xfailed"],
[dnl pkg-config did not find it, try the legacy method
AC_CHECK_PROG([XFTCONFIG], [xft-config], [xft-config])
AS_IF([test -z "$XFTCONFIG"],
[AC_MSG_ERROR([libXft2 is not installed, is too old or could not be found -- $XFT_PKG_ERRORS]) ])
XFT_LIBS=`$XFTCONFIG --libs`
XFT_CFLAGS=`$XFTCONFIG --cflags`
WM_CHECK_XFT_VERSION(XFT_MIN_VERSION,
[], dnl Version is ok, nothing to do
[AC_MSG_ERROR([Version of libXft is too old, consider upgrading to] XFT_MIN_VERSION [or newer]) ])
])
AC_SUBST(XFT_CFLAGS)
AC_SUBST(XFT_LIBS)
xft=yes
XFTLIBS=""
if test "x$PKG_CONFIG" != x -a "`$PKG_CONFIG xft; echo $?`" = 0; then
XFTCONFIG="$PKG_CONFIG xft"
pkgconfig_xft=yes
else
AC_CHECK_PROG(XFTCONFIG, xft-config, xft-config)
fi
AC_MSG_CHECKING([for the Xft2 library])
if test "x$XFTCONFIG" != x; then
XFTLIBS=`$XFTCONFIG --libs`
XFTFLAGS=`$XFTCONFIG --cflags`
AC_MSG_RESULT([found])
else
AC_MSG_RESULT([not found])
echo
echo "ERROR!!! libXft2 is not installed or could not be found."
echo " Xft2 is a requirement for building Window Maker."
echo " Please install it (along with fontconfig) before continuing."
echo
exit 1
fi
minXFT="2.1.0"
goodxft="no"
dnl
dnl The macro below will use $XFTFLAGS (defined above) to find Xft.h
dnl
WM_CHECK_XFT_VERSION($minXFT, goodxft=yes, goodxft=no)
if test "$goodxft" = no; then
echo
echo "ERROR!!! libXft on this system is an old version."
echo " Please consider upgrading to at least version ${minXFT}."
echo
exit 1
fi
AC_SUBST(XFTFLAGS)
AC_SUBST(XFTLIBS)
dnl PANGO support
dnl =============
pango=no
AC_ARG_ENABLE(pango, AS_HELP_STRING([--enable-pango], [enable Pango text layout support]),
pango=$enableval, pango=no)
dnl The libray can be used by WINGs to get better support on UTF-8 for i18n
m4_divert_push([INIT_PREPARE])dnl
AC_ARG_ENABLE([pango],
[AS_HELP_STRING([--disable-pango], [disable Pango text layout support @<:@default=auto@:>@])],
[AS_CASE([$enableval],
[yes|no], [],
[AC_MSG_ERROR([bad value $enableval for --disable-pango])] )],
[enable_pango=auto])
m4_divert_pop([INIT_PREPARE])dnl
WM_CHECK_LIBPANGO
PANGOFLAGS=
PANGOLIBS=
if test "$pango" = yes; then
PANGOLIBS=`$PKG_CONFIG pangoxft --libs`
PANGOFLAGS=`$PKG_CONFIG pangoxft --cflags`
if test "x$PANGOLIBS" = "x" ; then
AC_MSG_RESULT([not found])
else
AC_DEFINE(USE_PANGO, 1, [Define if Pango is to be used])
AC_MSG_RESULT([found])
fi
fi
inc_search_path="$inc_search_path $PANGOFLAGS"
AC_SUBST(PANGOLIBS)
dnl ==============================================
dnl Graphic Format Libraries
@@ -687,12 +701,14 @@ dnl ==============================================
dnl XPM Support
dnl ===========
m4_divert_push([INIT_PREPARE])dnl
AC_ARG_ENABLE([xpm],
[AS_HELP_STRING([--disable-xpm], [disable use of XPM pixmaps through libXpm])],
[AS_CASE(["$enableval"],
[yes|no], [],
[AC_MSG_ERROR([bad value $enableval for --enable-xpm])] )],
[enable_xpm=auto])
m4_divert_pop([INIT_PREPARE])dnl
WM_IMGFMT_CHECK_XPM
@@ -716,67 +732,79 @@ AS_IF([test "x$LIBEXIF" != "x"],
dnl PNG Support
dnl ===========
m4_divert_push([INIT_PREPARE])dnl
AC_ARG_ENABLE([png],
[AS_HELP_STRING([--disable-png], [disable PNG support through libpng])],
[AS_CASE(["$enableval"],
[yes|no], [],
[AC_MSG_ERROR([bad value $enableval for --enable-png])] )],
[enable_png=auto])
m4_divert_pop([INIT_PREPARE])dnl
WM_IMGFMT_CHECK_PNG
dnl JPEG Support
dnl ============
m4_divert_push([INIT_PREPARE])dnl
AC_ARG_ENABLE([jpeg],
[AS_HELP_STRING([--disable-jpeg], [disable JPEG support through libjpeg])],
[AS_CASE(["$enableval"],
[yes|no], [],
[AC_MSG_ERROR([bad value $enableval for --enable-jpeg])] )],
[enable_jpeg=auto])
m4_divert_pop([INIT_PREPARE])dnl
WM_IMGFMT_CHECK_JPEG
dnl GIF Support
dnl ============
m4_divert_push([INIT_PREPARE])dnl
AC_ARG_ENABLE(gif,
[AS_HELP_STRING([--disable-gif], [disable GIF support through libgif or libungif])],
[AS_CASE(["$enableval"],
[yes|no], [],
[AC_MSG_ERROR([bad value $enableval for --enable-gif])] )],
[enable_gif=auto])
m4_divert_pop([INIT_PREPARE])dnl
WM_IMGFMT_CHECK_GIF
dnl TIFF Support
dnl ============
m4_divert_push([INIT_PREPARE])dnl
AC_ARG_ENABLE([tiff],
[AS_HELP_STRING([--disable-tiff], [disable use of TIFF images through libtiff])],
[AS_CASE(["$enableval"],
[yes|no], [],
[AC_MSG_ERROR([bad value $enableval for --enable-tiff])] )],
[enable_tiff=auto])
m4_divert_pop([INIT_PREPARE])dnl
WM_IMGFMT_CHECK_TIFF
dnl WEBP Support
dnl ============
m4_divert_push([INIT_PREPARE])dnl
AC_ARG_ENABLE([webp],
[AS_HELP_STRING([--disable-webp], [disable WEBP support through libwebp])],
[AS_CASE(["$enableval"],
[yes|no], [],
[AC_MSG_ERROR([bad value $enableval for --enable-webp])] )],
[enable_webp=auto])
m4_divert_pop([INIT_PREPARE])dnl
WM_IMGFMT_CHECK_WEBP
dnl MagicK Support
dnl ==============
m4_divert_push([INIT_PREPARE])dnl
AC_ARG_ENABLE([magick],
[AS_HELP_STRING([--disable-magick], [disable MAGICK support through libMagickWand])],
[AS_CASE(["$enableval"],
[yes|no], [],
[AC_MSG_ERROR([bad value $enableval for --enable-magick])] )],
[enable_magick=auto])
m4_divert_pop([INIT_PREPARE])dnl
WM_IMGFMT_CHECK_MAGICK
@@ -818,6 +846,7 @@ AC_CHECK_HEADERS(stdlib.h)
dnl Support for PIXMAPDIR option
dnl ============================
m4_divert_push([INIT_PREPARE])dnl
AC_ARG_WITH([pixmapdir],
[AS_HELP_STRING([--with-pixmapdir=PATH], [specify where pixmaps are located [DATADIR/pixmaps]])],
[AS_CASE([$withval],
@@ -826,6 +855,7 @@ AC_ARG_WITH([pixmapdir],
[\$*], [], dnl Assumes it starts with a reference to $prefix or a similar variable, ok
[AC_MSG_ERROR([bad path '$withval' for pixmapdir, expecting an absolute path])])],
[with_pixmapdir=""])
m4_divert_pop([INIT_PREPARE])dnl
AS_IF([test "x$with_pixmapdir" != "x"],
[pixmapdir="$with_pixmapdir"],
@@ -835,6 +865,7 @@ AC_SUBST([pixmapdir])dnl
dnl Support for GNUSTEP_LOCAL_ROOT, for WPrefs.app
dnl ==============================================
m4_divert_push([INIT_PREPARE])dnl
AC_ARG_WITH([gnustepdir],
[AS_HELP_STRING([--with-gnustepdir=PATH], [specify the directory for GNUstep applications])],
[AS_CASE([$withval],
@@ -844,6 +875,7 @@ AC_ARG_WITH([gnustepdir],
[AC_MSG_ERROR([bad path '$withval' for gnustepdir, expecting an absolute path])])],
[dnl If no command-line option was given, we use $GNUSTEP_LOCAL_ROOT if it was set
with_gnustepdir="$GNUSTEP_LOCAL_ROOT"])
m4_divert_pop([INIT_PREPARE])dnl
AS_IF([test "x$with_gnustepdir" = "x"],
[dnl No path specified, use default
@@ -857,30 +889,43 @@ AS_IF([test "x$with_gnustepdir" = "x"],
AC_SUBST([wprefs_datadir])dnl
AC_SUBST([wprefs_bindir])dnl
dnl Support for DEFSDATADIR option
dnl ============================
AC_ARG_WITH([defsdatadir],
[AS_HELP_STRING([--with-defsdatadir=PATH], [specify where global defaults are located [SYSCONFDIR/WindowMaker]])],
dnl Support for PKGCONFDIR option
dnl =============================
m4_divert_push([INIT_PREPARE])dnl
AC_ARG_WITH([pkgconfdir],
[AS_HELP_STRING([--with-pkgconfdir=PATH], [specify where global defaults are located [SYSCONFDIR/WindowMaker]])],
[AS_CASE([$withval],
[yes|no], [AC_MSG_ERROR([bad value '$withval' for --with-defsdatadir, expected a path]) ],
[yes|no], [AC_MSG_ERROR([bad value '$withval' for --with-pkgconfdir, expected a path]) ],
[/*], [], dnl Absolute path, ok
[\$*], [], dnl Assumes it starts with a reference to $prefix or a similar variable, ok
[AC_MSG_ERROR([bad path '$withval' for defsdatadir, expecting an absolute path])])],
[with_defsdatadir=""])
[AC_MSG_ERROR([bad path '$withval' for pkgconfdir, expecting an absolute path])])],
[with_pkgconfdir=""])
m4_divert_pop([INIT_PREPARE])dnl
dnl Provide a message when trying to use "--with-defsdatadir" so that user can update its
dnl arguments. Otherwise only a warning is issued, which is likely to be missed, which will
dnl lead to perceived misbehaviour much later (and hard to debug).
WM_DENY_ARG_WITH([defsdatadir],
[AC_MSG_ERROR([option "--with-defsdatadir" have been replaced by "--with-pkgconfdir"])])
AS_IF([test "x$with_pkgconfdir" != "x"],
[pkgconfdir="$with_pkgconfdir"],
[pkgconfdir='${sysconfdir}/${PACKAGE_TARNAME}'])
AC_SUBST([pkgconfdir])dnl
AS_IF([test "x$with_defsdatadir" != "x"],
[defsdatadir="$with_defsdatadir"],
[defsdatadir='${sysconfdir}/WindowMaker'])
AC_SUBST([defsdatadir])dnl
dnl Enable User Defined Menu thing
dnl ==============================
m4_divert_push([INIT_PREPARE])dnl
AC_ARG_ENABLE([usermenu],
[AS_HELP_STRING([--enable-usermenu], [user defined menus for applications])],
[AS_CASE([$enableval],
[yes|no], [],
[AC_MSG_ERROR([bad value '$enableval' for --enable-usermenu])])],
[enable_usermenu=no])
m4_divert_pop([INIT_PREPARE])dnl
AS_IF([test "x$enable_usermenu" = "xyes"],
[AC_DEFINE([USER_MENU], [1],
[define if you want user defined menus for applications])])
@@ -906,7 +951,7 @@ AC_CONFIG_FILES(
Makefile
dnl WRaster Library
wrlib/Makefile
wrlib/Makefile wrlib/po/Makefile
wrlib/tests/Makefile
dnl WINGs toolkit
@@ -951,9 +996,10 @@ echo "Supported core features: :$supported_core"
echo "Supported X extensions: :$supported_xext"
echo "Supported graphic format libraries :$supported_gfx"
echo "Unsupported features :$unsupported"
echo "Antialiased text support in WINGs : $xft"
echo "Pango text layout support in WINGs : $pango"
echo "Translated languages to support :$supported_locales"
AS_IF([test "x$WEB_REPO_ROOT" != "x"],
[AS_ECHO(["Git repository for WMaker's Website : $WEB_REPO_ROOT"]) ])
AS_IF([test "x$debug" = "xyes"],
[AS_ECHO(["Debug enabled: CFLAGS = $CFLAGS"]) ])
echo
@@ -978,6 +1024,15 @@ AS_IF([test "x$enable_jpeg" = xno], [dnl
AS_ECHO(["WARNING WARNING WARNING WARNING WARNING WARNING WARNING"])dnl
])
AS_IF([test "x$LINGUAS" != "x"],
[AS_IF([test "X$wm_cv_library_constructors" = "Xlegacy"],
[AC_MSG_WARN([I18N is enabled, but library constructor attribute is not supported])
AS_ECHO([" If you have translation problems in lib WRaster, yet you know that the translation"])
AS_ECHO([" file (po) is valid, this could be a cause."])
AS_ECHO([])dnl
])dnl
])
dnl This is for Emacs. I'm lazy, I know... (nicolai)
dnl ================================================
+47 -1
View File
@@ -27,12 +27,17 @@ MOSTLYCLEANFILES = wmaker.1 wmsetbg.1
EXTRA_DIST = wmaker.in wmsetbg.in
################################################################################
# Generation of man pages that need processing
################################################################################
wmaker.1: wmaker.in Makefile $(top_builddir)/config.h
$(AM_V_GEN)$(top_srcdir)/script/replace-ac-keywords.sh \
--header "$(top_builddir)/config.h" --filter "HAVE_INOTIFY" \
--filter "USE_ICCCM_WMREPLACE" \
-D"pkgdatadir=$(pkgdatadir)" --replace "pkgdatadir" \
-D"defsdatadir=$(defsdatadir)" --replace "defsdatadir" \
-D"pkgconfdir=$(pkgconfdir)" --replace "pkgconfdir" \
-o "wmaker.1" "$(srcdir)/wmaker.in"
wmsetbg.1: wmsetbg.in Makefile $(top_builddir)/config.h
@@ -40,6 +45,11 @@ wmsetbg.1: wmsetbg.in Makefile $(top_builddir)/config.h
--header "$(top_builddir)/config.h" --filter "USE_XINERAMA" \
-o "wmsetbg.1" "$(srcdir)/wmsetbg.in"
################################################################################
# Section for checking the man pages against the program's --help text
################################################################################
# Create a 'silent rule' for our make check the same way automake does
AM_V_CHKOPTS = $(am__v_CHKOPTS_$(V))
am__v_CHKOPTS_ = $(am__v_CHKOPTS_$(AM_DEFAULT_VERBOSITY))
@@ -111,3 +121,39 @@ wxpaste-args:
.PHONY: wmaker-args WPrefs-args wmagnify-args geticonset-args getstyle-args seticons-args setstyle-args \
wdread-args wdwrite-args wmgenmenu-args wmiv-args wmmenugen-args wmsetbg-args wxcopy-args wxpaste-args
################################################################################
# Section related to generating HTML version of man pages for the website
################################################################################
if WITH_WEB_REPO
# We convert all man pages except those that are a link to other man page (.so command)
website: $(MANS) website.menu
@local_pages=`echo "$^" | sed -e 's/ [^ ]*\.menu$$// ; s,[^ /]*/,,g' `; \
generated_pages=""; \
for man in $^; do \
[ "$$man" = "website.menu" ] && continue; \
grep -i '^\.so[ \t]' "$$man" > /dev/null && continue; \
echo " MAN2HTML $$man"; \
$(top_srcdir)/script/generate-html-from-man.sh --groff $(GROFF) \
--output $(WEB_REPO_ROOT)/docs/manpages/`echo "$$man" | sed -e 's,[^ /]*/,,g ; s/\.[^.]*$$//' `.html \
--local-pages "$$local_pages" --external-url 'http://linux.die.net/man/%s/%l' \
--with-menu "website.menu" --package '$(PACKAGE_STRING)' \
$$man || exit $$?; \
generated_pages="$$generated_pages $$man"; \
done; \
echo " UPDATE index.md"; \
$(top_srcdir)/script/replace-generated-content.sh --man-pages "$$generated_pages" \
--template '<tr><td class="name"><a href="\1">\2</a></td><td class="section">\3</td><td>\4</td></tr>' \
--marker LIST_MANPAGES_COMMANDS $(WEB_REPO_ROOT)/docs/manpages/index.md
MOSTLYCLEANFILES += website.menu
# This menu is the icon bar to navigate on the website, which we want to keep on all man pages
# We extract it from the Template defined for all pages of the site
website.menu: $(WEB_REPO_ROOT)/_layouts/default.html
$(AM_V_GEN)sed -n -e '/<aside>/,/<\/aside>/ { s/{{ site.baseurl }}// ; s/^ // ; p }' $< > $@
endif
.PHONY: website
+12 -4
View File
@@ -224,7 +224,7 @@ Get the @emph{GNU} version from @uref{http://www.gnu.org/software/gettext/}
This library can be used by the @emph{WINGs} toolkit to improve support for @emph{UTF-8} and for
languages written in right-to-left direction, in some widgets.
You have to explicitly ask for its support through (@pxref{Configure Options}).
If detected, it will be automatically used; you may request explicit support/ignore through (@pxref{Configure Options}).
You can get it from @uref{http://www.pango.org/Download}
@item @emph{libbsd}
@@ -449,7 +449,7 @@ Specific to @sc{Window Maker}, this option defines an additional path where @emp
searched. Nothing will be installed there; the default path taken is @file{@emph{DATADIR}/pixmaps},
where @var{DATADIR} is the path defined from @option{--datadir}.
@item --with-defsdatadir=@i{DIR}
@item --with-pkgconfdir=@i{DIR}
Specific to @sc{Window Maker}, defines the directory where system configuration
files, e.g., @file{WindowMaker}, @file{WMRootMenu}, etc., are installed. The
default value is @file{@emph{SYSCONFDIR}/WindowMaker}, where @var{SYSCONFDIR} is
@@ -484,8 +484,8 @@ even if your system provides it.
@item --disable-magick
Disable @emph{ImageMagick's MagickWand} support in @emph{WRaster}, used to support for image formats.
@item --enable-pango
Disabled by default, enable @emph{Pango} text layout support in @emph{WINGs}.
@item --disable-pango
Disable @emph{Pango} text layout support in @emph{WINGs}.
@item --disable-png
Disable PNG support in @emph{WRaster}; when enabled use @file{libpng}.
@@ -639,6 +639,14 @@ appropriate requirements and works with this.
Despite all this, if you think there's a use for it and feel in the mood to help, do not hesitate to
discuss on the mailing list @value{emailsupport} to get it working.
@item --with-web-repo=@i{PATH}
Enable generation of HTML documentation to be uploaded to @sc{Window Maker}'s website.
The @file{@i{PATH}} is the directory where you have cloned the homepage's repository.
When enabled, the command @command{make website} generates a few HTML pages
and copy them into the specified directory, then you can commit them to publish on the web site.
You should not do that, it is handled by the development team.
@end table
+4 -3
View File
@@ -419,23 +419,24 @@ submit your contribution to the project:
this is done with @command{git}.
@end itemize
In @sc{Window Maker}, you have actually 4 @code{po} files to take care of:
In @sc{Window Maker}, you have actually 5 @code{po} files to take care of:
@itemize @minus
@item @file{po/@emph{<lang>}.po}: for @sc{Window Maker} itself
@item @file{WPrefs.app/po/@emph{<lang>}.po}: for the Preference Editor program
@item @file{WINGs/po/@emph{<lang>}.po}: for the graphic toolkit library
@item @file{wrlib/po/@emph{<lang>}.po}: for the image processing library
@item @file{util/po/@emph{<lang>}.po}: for the command-line tools of @sc{Window Maker}
@end itemize
As stated previously, there is a @command{make} target that can help you to automatically generate
the POT and update the PO for these 4 cases:
the POT and update the PO for these 5 cases:
@example
make update-lang PO=<lang>
@end example
Once run, it will have updated as needed the 4 @code{po} files against the latest source code.
Once run, it will have updated as needed the 5 @code{po} files against the latest source code.
You may wish to use the command @command{git gui} to view the changes;
you can now edit the files to complete the translation, correct them, remove deprecated stuff, ...
Please note that the encoding should be set to @emph{UTF-8} as this is now the standard.
+14 -14
View File
@@ -1,36 +1,36 @@
.\" Hey, Emacs! This is an -*- nroff -*- source file.
.TH geticonset 1 "Leden 1999"
.SH JMÉNO
geticonset \- extrahuje aktuální sadu ikon Window Makera
.SH JMÉNO
geticonset \- extrahuje aktuální sadu ikon Window Makera
.SH SYNTAXE
.B geticonset
.I [volby] [soubor]
.SH POPIS
.B geticonset
načíta doménu WMWindowAttributes a zapíše sadu nalezených ikon
buď na standardtní výstup nebo do
načíta doménu WMWindowAttributes a zapíše sadu nalezených ikon
buď na standardtní výstup nebo do
.I souboru.
.SH VOLBY
.TP
.B \-\-help
vypíše nápovědu
vypíše nápovědu
.TP
.B \-\-version
vypíše číslo verze
.SH PROMĚNNÉ PROSTŘEDÍ
vypíše číslo verze
.SH PROMĚNNÉ PROSTŘEDÍ
.IP WMAKER_USER_ROOT
specifikuje cestu k adresáři Defaults. Řetězec "Defaults/" je přidán k této
proměnné, čímž se určí umístění databází. Jakmile proměnná není nastavená,
tak její implicitní hodnota je "~/GNUstep"
specifikuje cestu k adresáři Defaults. Řetězec "Defaults/" je přidán k této
proměnné, čímž se určí umístění databází. Jakmile proměnná není nastavená,
tak její implicitní hodnota je "~/GNUstep"
.SH SOUBORY
.IP WMAKER_USER_ROOT/Defaults/WMWindowAttributes
Toto je soubor, který se zapíše.
.SH PODÍVEJTE SE TAKÉ
Toto je soubor, který se zapíše.
.SH PODÍVEJTE SE TAKÉ
.BR seticons (1),
.BR wmaker (1)
.SH AUTOR
Autorem Window Makera je Alfredo K. Kojima <kojima@windowmaker.info>.
.PP
Tuto manuálovou stránku napsal Marcelo Magallon <mmagallo@debian.org>.
Tuto manuálovou stránku napsal Marcelo Magallon <mmagallo@debian.org>.
.PP
Do češtiny přeložil Jiří Hnídek <jiri.hnidek@vslib.cz>.
Do češtiny přeložil Jiří Hnídek <jiri.hnidek@vslib.cz>.
+16 -16
View File
@@ -1,38 +1,38 @@
.\" Hey, Emacs! This is an -*- nroff -*- source file.
.TH seticons 1 "Březen 1998"
.SH JMÉNO
seticons \- nastaví ikony pro Window Maker
.TH seticons 1 "Březen 1998"
.SH JMÉNO
seticons \- nastaví ikony pro Window Maker
.SH SYNTAXe
.B seticons
.I soubor
.SH POPIS
.B seticons
načíta
načíta
.I soubor
a zapíše jeho obsah do domény WMWindowAttributes, čímž se nastaví ikony,
které používá Window Maker pro dané třídy (například XTerm, "xterm.XTerm",
a zapíše jeho obsah do domény WMWindowAttributes, čímž se nastaví ikony,
které používá Window Maker pro dané třídy (například XTerm, "xterm.XTerm",
"pine.XTerm", atd.)
.SH VOLBY
.TP
.B \-\-help
vypíše nápovědu
vypíše nápovědu
.TP
.B \-\-version
vypíše číslo verze
.SH PROMĚNNÉ PROSTŘEDÍ
vypíše číslo verze
.SH PROMĚNNÉ PROSTŘEDÍ
.IP WMAKER_USER_ROOT
specifikuje cestu k adresáři Defaults. Řetězec "Defaults/" je přidán k této
proměnné, čímž se určí umístění databází. Jakmile proměnná není nastavená,
tak její implicitní hodnota je "~/GNUstep"
specifikuje cestu k adresáři Defaults. Řetězec "Defaults/" je přidán k této
proměnné, čímž se určí umístění databází. Jakmile proměnná není nastavená,
tak její implicitní hodnota je "~/GNUstep"
.SH SOUBORY
.IP WMAKER_USER_ROOT/Defaults/WMWindowAttributes
Toto je soubor, který se zapíše.
.SH PODÍVEJTE SE TAKÉ
Toto je soubor, který se zapíše.
.SH PODÍVEJTE SE TAKÉ
.BR geticonset (1),
.BR wmaker (1)
.SH AUTOR
Autorem Window Makera je Alfredo K. Kojima <kojima@windowmaker.info>.
.PP
Tuto manuálovou stránku napsal Marcelo Magallon <mmagallo@debian.org>.
Tuto manuálovou stránku napsal Marcelo Magallon <mmagallo@debian.org>.
.PP
Do češtiny přeložil Jiří Hnídek <jiri.hnidek@vslib.cz>.
Do češtiny přeložil Jiří Hnídek <jiri.hnidek@vslib.cz>.
+16 -16
View File
@@ -1,39 +1,39 @@
.\" Hey, Emacs! This is an -*- nroff -*- source file.
.TH wdwrite 1 "Leden 1999"
.SH JMÉNO
wdwrite \- zapíše klíče a hodnoty do databáze standardních nastavení
.SH JMÉNO
wdwrite \- zapíše klíče a hodnoty do databáze standardních nastavení
.SH SYNTAXE
.B wdwrite
.I doména
.I doména
.I volba
.I hodnota
.SH POPIS
.B wdwrite
zapíše
zapíše
.I volbu
a
.I hodnotu
do dané
.I domény.
do dané
.I domény.
.SH VOLBY
.TP
.B \-\-help
vypíše nápovědu
vypíše nápovědu
.TP
.B \-\-version
vypíše číslo verze
.SH PROMĚNNÉ PROSTŘEDÍ
vypíše číslo verze
.SH PROMĚNNÉ PROSTŘEDÍ
.IP WMAKER_USER_ROOT
specifikuje cestu k adresáři Defaults. Řetězec "Defaults/" je přidán k této
proměnné, čímž se určí umístění databází. Jakmile proměnná není nastavená,
tak její implicitní hodnota je "~/GNUstep"
specifikuje cestu k adresáři Defaults. Řetězec "Defaults/" je přidán k této
proměnné, čímž se určí umístění databází. Jakmile proměnná není nastavená,
tak její implicitní hodnota je "~/GNUstep"
.SH SOUBORY
Domény se nacházejí v WMAKER_USER_ROOT/Defaults/
.SH PODÍVEJTE SE TAKÉ
Domény se nacházejí v WMAKER_USER_ROOT/Defaults/
.SH PODÍVEJTE SE TAKÉ
.BR wmaker (1)
.SH AUTOR
Autorem Window Makera je Alfredo K. Kojima <kojima@windowmaker.info>.
.PP
Tuto manuálovou stránku napsal Marcelo Magallon <mmagallo@debian.org>.
Tuto manuálovou stránku napsal Marcelo Magallon <mmagallo@debian.org>.
.PP
Do češtiny přeložil Jiří Hnídek <jiri.hnidek@vslib.cz>
Do češtiny přeložil Jiří Hnídek <jiri.hnidek@vslib.cz>
+64 -64
View File
@@ -1,133 +1,133 @@
.\" Hey, Emacs! This is an -*- nroff -*- source file.
.TH Window\ Maker 1 "Srpen 1998"
.SH JMÉNO
wmaker \- okenní manažer pro X11 se vzhledem NEXTSTEPu
.TH "Window Maker" 1 "Srpen 1998"
.SH JMÉNO
wmaker \- okenní manažer pro X11 se vzhledem NEXTSTEPu
.SH SYNTAXE
.B wmaker
.I "[-volby]"
.SH "POPIS"
Window Maker je okenní manažer pro X11 se vzhledem NEXTSTEPu. Snaží se
napodobit vzhled NeXTu jak jen to je možné, ale v případě potřeby tento
trend nedodržuje.
Window Maker je okenní manažer pro X11 se vzhledem NEXTSTEPu. Snaží se
napodobit vzhled NeXTu jak jen to je možné, ale v případě potřeby tento
trend nedodržuje.
.SH "VOLBY"
.TP
.B \-\-no\-cpp
zakázat preprocessing konfiguračních souborů
zakázat preprocessing konfiguračních souborů
.TP
.B \-\-no\-dock
neotvírat Dok aplikací
neotvírat Dok aplikací
.TP
.B \-\-no\-clip
neotvírat Sponku pracovních ploch
neotvírat Sponku pracovních ploch
.TP
.B \-display host:display.screen
použít danou obrazovku.
Na strojích s více obrazovkami bude Window Maker automaticky spravovat
všechny obrazovky. Pokud chcete, aby Window Maker spravoval jen specifickou
obrazovku, musíte zadat číslo obrazovky pomocí argumentu příkazové řádky
použít danou obrazovku.
Na strojích s více obrazovkami bude Window Maker automaticky spravovat
všechny obrazovky. Pokud chcete, aby Window Maker spravoval jen specifickou
obrazovku, musíte zadat číslo obrazovky pomocí argumentu příkazové řádky
.B \-display.
Například, pokud chcete, aby Window Maker spravoval jen obrazovku 1, spusťte ho
Například, pokud chcete, aby Window Maker spravoval jen obrazovku 1, spusťte ho
takto:
.B wmaker -display :0.1
.TP
.B \-\-version
vypíše verzi a ukončí se
vypíše verzi a ukončí se
.TP
.B \-\-visual\-id
určí čísla obrazového režimu. Spusťte
určí čísla obrazového režimu. Spusťte
.BR xdpyinfo (1)
pro seznam obrazových režimů dostupných na vašem displeji.
pro seznam obrazových režimů dostupných na vašem displeji.
.TP
.B \-\-help
vypíše krátký pomocný text
vypíše krátký pomocný text
.PP
.SH SOUBORY
.TP
.B ~/GNUstep/Defaults/WindowMaker
všeobecné nastavení Window Makera.
všeobecné nastavení Window Makera.
.TP
.B ~/GNUstep/Defaults/WMState
informace o Doku a Sponce. Neditujte za běhu Window Makera. Bude
přepsaný.
informace o Doku a Sponce. Neditujte za běhu Window Makera. Bude
přepsaný.
.TP
.B ~/GNUstep/Defaults/WMRootMenu
Obsahuje jméno souboru, z kterého se má načíst hlavní menu nebo
menu samotné ve formátu proplist.
Obsahuje jméno souboru, z kterého se má načíst hlavní menu nebo
menu samotné ve formátu proplist.
.TP
.B ~/GNUstep/Defaults/WMWindowAttributes
Atributy pro různé třídy a instance aplikací. Použijte editor nastavení
(stiskněte pravé tlačítko myši na horní liště aplikace, zvolte Atributy)
namísto přímého editování tohoto souboru. Je jen málo nastavení, která
nejsou dostupná z editora nastavení.
Atributy pro různé třídy a instance aplikací. Použijte editor nastavení
(stiskněte pravé tlačítko myši na horní liště aplikace, zvolte Atributy)
namísto přímého editování tohoto souboru. Je jen málo nastavení, která
nejsou dostupná z editora nastavení.
.TP
.B /usr/share/WindowMaker/Defaults/
Všechny výše uvedené soubory se NAčÍTAJÍ odtud. Pokud se je nepodaří
najít, kromě WMState, který se odtud ZKOPÍRUJE. Nezáleží na tom, odkud
jsou načítané. Pokud je potřeba zapsat změnu konfigurace zpět do těchto
souborů, zapíšou se do uživatelských souborů.
Všechny výše uvedené soubory se NAčÍTAJÍ odtud. Pokud se je nepodaří
najít, kromě WMState, který se odtud ZKOPÍRUJE. Nezáleží na tom, odkud
jsou načítané. Pokud je potřeba zapsat změnu konfigurace zpět do těchto
souborů, zapíšou se do uživatelských souborů.
.TP
.B ~/GNUstep/Library/WindowMaker/autostart
Tento skript se automaticky vykoná pri startu Window Makera.
Tento skript se automaticky vykoná pri startu Window Makera.
.TP
.B ~/GNUstep/Library/WindowMaker/exitscript
Tento skript se automaticky vykoná bezprostředně před ukončením Window Makera.
.B Poznámka:
Když potřebujete spustit z tohoto skriptu něco, co vyžaduje spuštěný X server,
tak nepoužívejte na ukončení Window Makera příkaz
Tento skript se automaticky vykoná bezprostředně před ukončením Window Makera.
.B Poznámka:
Když potřebujete spustit z tohoto skriptu něco, co vyžaduje spuštěný X server,
tak nepoužívejte na ukončení Window Makera příkaz
.I SHUTDOWN
z hlavního menu. Jinak se může stát, že X server se ukončí dřív než se vykoná
z hlavního menu. Jinak se může stát, že X server se ukončí dřív než se vykoná
tento skript.
.TP
.B ~/GNUstep/Library/WindowMaker/
Soubor menu, jehož název je uveden v souboru WMRootMenu, se hledá zde...
Soubor menu, jehož název je uveden v souboru WMRootMenu, se hledá zde...
.TP
.B /etc/X11/WindowMaker/
a zde, v tomto pořadí, pokud název není absolutní cesta.
a zde, v tomto pořadí, pokud název není absolutní cesta.
.TP
.B ~/GNUstep/Library/WindowMaker/Pixmaps/
Zde hledá Window Maker obrázky
Zde hledá Window Maker obrázky
.TP
.B ~/GNUstep/Library/WindowMaker/Backgrounds/
Zde hledá Window Maker pozadí
Zde hledá Window Maker pozadí
.TP
.B ~/GNUstep/Library/WindowMaker/Styles/
Zde hledá Window Maker soubory se styly (ne úplně... vypadá to tak, ale
i tak musíte zadat úplnou cestu. Je to jen vyhrazené místo, aby byly
věci pěkně uspořádané)
Zde hledá Window Maker soubory se styly (ne úplně... vypadá to tak, ale
i tak musíte zadat úplnou cestu. Je to jen vyhrazené místo, aby byly
věci pěkně uspořádané)
.TP
.B ~/GNUstep/Library/WindowMaker/Themes/
Zde hledá Window Maker soubory s tématy (viz. výše)
Zde hledá Window Maker soubory s tématy (viz. výše)
.TP
.B /usr/share/WindowMaker/Pixmaps/
Obrázky spoločné pro celý systém se nacházejí zde...
Obrázky spoločné pro celý systém se nacházejí zde...
.TP
.B /usr/share/WindowMaker/Pixmaps/
a zde.
.TP
.B /usr/share/WindowMaker/Styles/
Styly spoločné pro celý systém se nacházejí zde
Styly spoločné pro celý systém se nacházejí zde
.TP
.B /usr/share/WindowMaker/Themes/
A teď to zkuste sami... ;-)
.SH PROMĚNNÉ PROSŘEDÍ
A teď to zkuste sami... ;-)
.SH PROMĚNNÉ PROSŘEDÍ
.IP WMAKER_USER_ROOT
specifikuje cestu k adresáři Defaults. "Defaults/" je přidán k této
proměnné, čímž se určí umístění databází. Pokud proměnná není nastavená,
ta její implicitní hodnota je "~/GNUstep"
specifikuje cestu k adresáři Defaults. "Defaults/" je přidán k této
proměnné, čímž se určí umístění databází. Pokud proměnná není nastavená,
ta její implicitní hodnota je "~/GNUstep"
.IP GNUSTEP_LOCAL_ROOT
specifikuje umístění systémového \fBlokálního\fP GNUstep adresáře (to
je užitečné v případě, že umístění adresáře společného pro celý systém je
ve skutečnosti společné pro celou síť). Když je tato proměnná prázdna, použije
specifikuje umístění systémového \fBlokálního\fP GNUstep adresáře (to
je užitečné v případě, že umístění adresáře společného pro celý systém je
ve skutečnosti společné pro celou síť). Když je tato proměnná prázdna, použije
se GNUSTEP_SYSTEM_ROOT.
.IP GNUSTEP_SYSTEM_ROOT
specifikuje umístění systémového GNUstep adresáře. Pokud je tato proměnná
prázdna, tak její implicitní hodnota je /etc/GNUstep
.SH PODÍVEJTE SE TAKÉ
specifikuje umístění systémového GNUstep adresáře. Pokud je tato proměnná
prázdna, tak její implicitní hodnota je /etc/GNUstep
.SH PODÍVEJTE SE TAKÉ
The Window Maker User Guide
(Uživatelská příručka Window Makera)
(Uživatelská příručka Window Makera)
.PP
The Window Maker FAQ
(Často kladené dotazy)
(Často kladené dotazy)
.PP
.BR X (7),
.BR wdwrite (1),
@@ -140,9 +140,9 @@ The Window Maker FAQ
.BR setstyle (1),
.BR wmsetbg (1)
.SH AUTOR
Autoři Window Makera jsou Alfredo K. Kojima <kojima@windowmaker.info>,
Dan Pascu <dan@windowmaker.info> a mnoho dalších lidí z celého světa.
Autoři Window Makera jsou Alfredo K. Kojima <kojima@windowmaker.info>,
Dan Pascu <dan@windowmaker.info> a mnoho dalších lidí z celého světa.
.PP
Tuto manuálovou stránku napsal Marcelo E. Magallon, <mmagallo@debian.org>.
Tuto manuálovou stránku napsal Marcelo E. Magallon, <mmagallo@debian.org>.
.PP
Do češtiny přeložil Jiří Hnídek <jiri.hnidek@vslib.cz>
Do češtiny přeložil Jiří Hnídek <jiri.hnidek@vslib.cz>
+24 -24
View File
@@ -1,67 +1,67 @@
.\" Hey, Emacs! This is an -*- nroff -*- source file.
.TH wmsetbg 1 "Leden 1999"
.SH JMÉNO
wmsetbg \- nastaví pozadí hlavního okna v X11
.SH JMÉNO
wmsetbg \- nastaví pozadí hlavního okna v X11
.SH SYNTAXE
.B wmsetbg
[\-display] [\-\-version] [\-\-help] [{\-b|\-\-back\-color} \fIbarva\fP]
[{\-t|\-\-tile}|{\-e|\-\-center}|{\-s|\-\-scale}|{\-a|\-\-maxscale} \fIobrázek\fP]
[{\-t|\-\-tile}|{\-e|\-\-center}|{\-s|\-\-scale}|{\-a|\-\-maxscale} \fIobrázek\fP]
[{\-d|\-\-dither}|{\-m|\-\-match}] [\-u|\-\-update\-wmaker]
[{\-D|\-\-update\-domain} \fIdoména\fP] [{\-c|\-\-colors} \fIcpc\fP]
[{\-p|\-\-parse} \fItextura\fP] [{\-w|\-\-workspace} \fIpracovní plocha\fP]
[{\-D|\-\-update\-domain} \fIdoména\fP] [{\-c|\-\-colors} \fIcpc\fP]
[{\-p|\-\-parse} \fItextura\fP] [{\-w|\-\-workspace} \fIpracovní plocha\fP]
.SH POPIS
.B wmsetbg
načítá daný
.I obrázek
(XPM, PNG, jpeg, Tiff, raw PPM) a vloží ho do hlavního okna. Obrázek je možné
zvětšit, nebo ho opakovat aby vyplnil hlavní okno. Window Maker používa
tento příkaz interně na nastavení pozadí při startu.
načítá daný
.I obrázek
(XPM, PNG, jpeg, Tiff, raw PPM) a vloží ho do hlavního okna. Obrázek je možné
zvětšit, nebo ho opakovat aby vyplnil hlavní okno. Window Maker používa
tento příkaz interně na nastavení pozadí při startu.
.SH VOLBY
.TP
.B \-a|\-\-maxscale
zvětší daný \fIobrázek\fP při dodržení poměru stran
zvětší daný \fIobrázek\fP při dodržení poměru stran
.TP
.B \-e|\-\-center
vloží \fIobrázek\fP do středu okna
vloží \fIobrázek\fP do středu okna
.TP
.B \-t|\-\-tile
vytvoří z \fIobrázku\fP dlaždice
vytvoří z \fIobrázku\fP dlaždice
.TP
.B \-s|\-\-scale
roztáhne daný \fIobrázek\fP (standartně)
roztáhne daný \fIobrázek\fP (standartně)
.TP
.B \-d|\-\-dither
rezervuje barvy
.TP
.B \-m|\-\-match
shodné barvy
shodné barvy
.TP
.B \-u|\-\-update\-wmaker
zapíše změnu do databáze nastavení Window Makera
zapíše změnu do databáze nastavení Window Makera
.TP
.B \-D|\-\-update\-domain
zapíše změnu do databáze \fIdomény\fP
zapíše změnu do databáze \fIdomény\fP
.TP
.B \-c|\-\-colors
použíje určitý počet barev na kanál
použíje určitý počet barev na kanál
.TP
.B \-p|\-\-parse
parsuje danou \fItexturu\fP jako \fIproplist stylu textur\fP
.TP
.B \-w|\-\-workspace
nastaví pozadí jen na dané \fIpracovní ploše\fP
nastaví pozadí jen na dané \fIpracovní ploše\fP
.TP
.B \-\-help
vypíše nápovědu
vypíše nápovědu
.TP
.B \-\-version
vypíše číslo verze
.SH PODÍVEJTE SE TAKÉ
vypíše číslo verze
.SH PODÍVEJTE SE TAKÉ
.BR wmaker (1)
.SH AUTOR
Autorem Window Makera je Alfredo K. Kojima <kojima@windowmaker.info>.
wmsetbg napsal Dan Pascu <dan@windowmaker.info>
.PP
Tuto manuálovou stránku napsal Marcelo Magallon <mmagallo@debian.org>.
Tuto manuálovou stránku napsal Marcelo Magallon <mmagallo@debian.org>.
.PP
Do češtiny přeložil Jiří Hnídek <jiri.hnidek@vslib.cz>.
Do češtiny přeložil Jiří Hnídek <jiri.hnidek@vslib.cz>.
+20 -20
View File
@@ -1,45 +1,45 @@
.\" Hey, Emacs! This is an -*- nroff -*- source file.
.TH wxcopy 1 "Září 1998"
.SH JMÉNO
wxcopy \- kopíruje standartní vstup do vyrovnávací paměti
.TH wxcopy 1 "Září 1998"
.SH JMÉNO
wxcopy \- kopíruje standartní vstup do vyrovnávací paměti
.SH SYNOPSIS
.B wxcopy
[volby]
[soubor]
.SH POPIS
.B wxcopy
kopíruje standartní vstup nebo
kopíruje standartní vstup nebo
.I soubor
do vyrovnávací paměti. Jakmile není dáná nějaká vyrovnávací paměť, tak se
data kopírují do vyrovnávací paměti 0 a ostaní vyrovnávací paměti rotují,
jestliže ovšem existují. Pokud je dáná vyrovnávací paměť, tak se data
kopírují do ní a nevykoná se žádné rotování.
do vyrovnávací paměti. Jakmile není dáná nějaká vyrovnávací paměť, tak se
data kopírují do vyrovnávací paměti 0 a ostaní vyrovnávací paměti rotují,
jestliže ovšem existují. Pokud je dáná vyrovnávací paměť, tak se data
kopírují do ní a nevykoná se žádné rotování.
.SH VOLBY
.TP
.B \-cutbuffer číslo
Specifikuje číslo vyrovnávací paměti, do které se budou kopírovat data.
.B \-cutbuffer číslo
Specifikuje číslo vyrovnávací paměti, do které se budou kopírovat data.
.TP
.B \-display displej
Data se budou kopírovat do vyrovnávací paměti daného displeje/obrazovky.
Data se budou kopírovat do vyrovnávací paměti daného displeje/obrazovky.
.TP
.B \-nolimit
Vypne normální limit velikosti dat 64kb, čímž se umožní zvětšování vyrovnávací
paměti podla potřeby.
Vypne normální limit velikosti dat 64kb, čímž se umožní zvětšování vyrovnávací
paměti podla potřeby.
.TP
.B \-clearselection
Vyprázdní vlastníka PRIMARY selekce. V praxi to znamená, že když se pokusíte
vložit data prostředním tlačítkem (například), tak vloží se data z vyrovnávací
paměti 0, namísto případného spuštění selelekce myši.
Vyprázdní vlastníka PRIMARY selekce. V praxi to znamená, že když se pokusíte
vložit data prostředním tlačítkem (například), tak vloží se data z vyrovnávací
paměti 0, namísto případného spuštění selelekce myši.
.PP
.SH PODÍVEJTE SE TAKÉ
.SH PODÍVEJTE SE TAKÉ
.BR wxpaste (1),
.BR wmaker (1)
.SH AUTOR
Autorem Window Makera je Alfredo K. Kojima <kojima@windowmaker.info>.
.PP
Tuto manuálovou stránku napsal Marcelo Magallon <mmagallo@debian.org>.
Tuto manuálovou stránku napsal Marcelo Magallon <mmagallo@debian.org>.
.PP
Do češtiny přeložil Jiří Hnídek <jiri.hnidek@vslib.cz>.
Do češtiny přeložil Jiří Hnídek <jiri.hnidek@vslib.cz>.
.PP
Kompatibilitu s binárními daty a \-nolimit implementoval Luke Kendall
Kompatibilitu s binárními daty a \-nolimit implementoval Luke Kendall
<luke@research.canon.com.au>.
+18 -18
View File
@@ -1,40 +1,40 @@
.\" Hey, Emacs! This is an -*- nroff -*- source file.
.TH wxpaste 1 "Březen 1998"
.SH JMÉNO
wxpaste \- zapíše vyrovnávací paměť na standardní výstup
.TH wxpaste 1 "Březen 1998"
.SH JMÉNO
wxpaste \- zapíše vyrovnávací paměť na standardní výstup
.SH SYNTAXE
.B wxpaste
[volby]
.SH POPIS
.B wxpaste
vypíše obsah dané vyrovnávací paměti na standardní výstup. Jakmile není
zadána žádná vyrovnávací paměť, tak se použije vyrovnávací paměť 0.
vypíše obsah dané vyrovnávací paměti na standardní výstup. Jakmile není
zadána žádná vyrovnávací paměť, tak se použije vyrovnávací paměť 0.
.PP
.SH VOLBY
.TP
.B \-cutbuffer číslo
Data budou vložena z dané vyrovnávací paměti namísto standardní 0.
.B \-cutbuffer číslo
Data budou vložena z dané vyrovnávací paměti namísto standardní 0.
.TP
.B \-display displej
Data se budou kopírovat z vyrovnávací paměti daného displeje/obrazovky.
Data se budou kopírovat z vyrovnávací paměti daného displeje/obrazovky.
.TP
.B \-selection [selekcia]
Data budou kopírované z dané selekce. Jakmile se výběr ze selekce nepodaří,
tak se použije vyrovnávací paměť. Implicitní hodnota pro selekci je PRIMARY.
Data budou kopírované z dané selekce. Jakmile se výběr ze selekce nepodaří,
tak se použije vyrovnávací paměť. Implicitní hodnota pro selekci je PRIMARY.
.PP
.SH CHYBY
\-selection musí být poslední volba. Syntaxe může být upravená, ale
brání tomu špatná kompatibilita.
\-selection musí být poslední volba. Syntaxe může být upravená, ale
brání tomu špatná kompatibilita.
Typy selekcí INCR a MULTIPLE nejsou podporované. Ve skutečnosti je
podporovaný jen jednoduchý text, což by mělo stačit pro většinu uživatelů
takovéto jednoduché utilitky.
.SH PODÍVEJTE SE TAKÉ
Typy selekcí INCR a MULTIPLE nejsou podporované. Ve skutečnosti je
podporovaný jen jednoduchý text, což by mělo stačit pro většinu uživatelů
takovéto jednoduché utilitky.
.SH PODÍVEJTE SE TAKÉ
.BR wxcopy (1),
.BR wmaker (1)
.SH AUTOR
Autorem Window Makera je Alfredo K. Kojima <kojima@windowmaker.info>.
.PP
Tuto manuálovou stránku napsal Marcelo Magallon <mmagallo@debian.org>.
Tuto manuálovou stránku napsal Marcelo Magallon <mmagallo@debian.org>.
.PP
Do češtiny přeložil Jiří Hnídek <jiri.hnidek@vslib.cz>.
Do češtiny přeložil Jiří Hnídek <jiri.hnidek@vslib.cz>.
+1 -1
View File
@@ -1,5 +1,5 @@
.\" Hey, Emacs! This is an -*- nroff -*- source file.
.TH Window\ Maker 1 "August 1998"
.TH "Window Maker" 1 "August 1998"
.SH "НАИМЕНОВАНИЕ"
wmaker \- оконный менеджер для X11 эмулирующий интерфейс NEXTSTEP.
.SH "СИНТАКСИС"
+16 -16
View File
@@ -1,34 +1,34 @@
.\" Hey, Emacs! This is an -*- nroff -*- source file.
.TH geticonset 1 "January 1999"
.SH MENO
geticonset \- extrahuje aktuálnu sadu ikon Window Makera
geticonset \- extrahuje aktuálnu sadu ikon Window Makera
.SH SYNTAX
.B geticonset
.I [voľby] [súbor]
.I [voľby] [súbor]
.SH POPIS
.B geticonset
načíta doménu WMWindowAttributes a zapíše sadu nájdených ikon
buď na štandardný výstup alebo do
.I súboru.
.SH VOĽBY
načíta doménu WMWindowAttributes a zapíše sadu nájdených ikon
buď na štandardný výstup alebo do
.I súboru.
.SH VOĽBY
.TP
.B \-\-help
vypíše pomocný text
vypíše pomocný text
.TP
.B \-\-version
vypíše číslo verzie
.SH PREMENNÉ PROSTREDIA
vypíše číslo verzie
.SH PREMENNÉ PROSTREDIA
.IP WMAKER_USER_ROOT
špecifikuje cestu k adresáru Defaults. "Defaults/" je pridané k tejto
premennej, čím sa určí umiestnenie databáz. Ak premenná nie je nastavená,
jej implicitná hodnota je "~/GNUstep"
.SH SÚBORY
špecifikuje cestu k adresáru Defaults. "Defaults/" je pridané k tejto
premennej, čím sa určí umiestnenie databáz. Ak premenná nie je nastavená,
jej implicitná hodnota je "~/GNUstep"
.SH SÚBORY
.IP WMAKER_USER_ROOT/Defaults/WMWindowAttributes
Toto je súbor, ktorý sa zapíše.
.SH POZRI TIEŽ
Toto je súbor, ktorý sa zapíše.
.SH POZRI TIEŽ
.BR seticons (1),
.BR wmaker (1)
.SH AUTOR
Autorom Window Makera je Alfredo K. Kojima <kojima@windowmaker.info>.
.PP
Túto manuálovú stránku napísal Marcelo Magallon <mmagallo@debian.org>.
Túto manuálovú stránku napísal Marcelo Magallon <mmagallo@debian.org>.
+18 -18
View File
@@ -1,36 +1,36 @@
.\" Hey, Emacs! This is an -*- nroff -*- source file.
.TH seticons 1 "March 1998"
.SH MENO
seticons \- nastaví obrázky ikon pre Window Maker
seticons \- nastaví obrázky ikon pre Window Maker
.SH SYNTAX
.B seticons
.I súbor
.I súbor
.SH POPIS
.B seticons
načíta
.I súbor
a zapíše jeho obsah do domény WMWindowAttributes, čím sa nastavia ikony,
ktoré používa Window Maker pre dané triedy (napríklad XTerm, "xterm.XTerm",
"pine.XTerm", atď.)
.SH VOĽBY
načíta
.I súbor
a zapíše jeho obsah do domény WMWindowAttributes, čím sa nastavia ikony,
ktoré používa Window Maker pre dané triedy (napríklad XTerm, "xterm.XTerm",
"pine.XTerm", atď.)
.SH VOĽBY
.TP
.B \-\-help
vypíše pomocný text
vypíše pomocný text
.TP
.B \-\-version
vypíše číslo verzie
.SH PREMENNÉ PROSTREDIA
vypíše číslo verzie
.SH PREMENNÉ PROSTREDIA
.IP WMAKER_USER_ROOT
špecifikuje cestu k adresáru Defaults. "Defaults/" je pridané k tejto
premennej, čím sa určí umiestnenie databáz. Ak premenná nie je nastavená,
jej implicitná hodnota je "~/GNUstep"
.SH SÚBORY
špecifikuje cestu k adresáru Defaults. "Defaults/" je pridané k tejto
premennej, čím sa určí umiestnenie databáz. Ak premenná nie je nastavená,
jej implicitná hodnota je "~/GNUstep"
.SH SÚBORY
.IP WMAKER_USER_ROOT/Defaults/WMWindowAttributes
Toto je súbor, ktorý sa zapíše.
.SH POZRI TIEŽ
Toto je súbor, ktorý sa zapíše.
.SH POZRI TIEŽ
.BR geticonset (1),
.BR wmaker (1)
.SH AUTOR
Autorom Window Makera je Alfredo K. Kojima <kojima@windowmaker.info>.
.PP
Túto manuálovú stránku napísal Marcelo Magallon <mmagallo@debian.org>.
Túto manuálovú stránku napísal Marcelo Magallon <mmagallo@debian.org>.
+17 -17
View File
@@ -1,37 +1,37 @@
.\" Hey, Emacs! This is an -*- nroff -*- source file.
.TH wdwrite 1 "January 1999"
.SH MENO
wdwrite \- zapíše kľúče a hodnoty do databázy štandardných nastavení
wdwrite \- zapíše kľúče a hodnoty do databázy štandardných nastavení
.SH SYNTAX
.B wdwrite
.I doména
.I voľba
.I doména
.I voľba
.I hodnota
.SH POPIS
.B wdwrite
zapíše
.I voľbu
zapíše
.I voľbu
a
.I hodnotu
do danej
.I domény.
.SH VOĽBY
.I domény.
.SH VOĽBY
.TP
.B \-\-help
vypíše pomocný text
vypíše pomocný text
.TP
.B \-\-version
vypíše číslo verzie
.SH PREMENNÉ PROSTREDIA
vypíše číslo verzie
.SH PREMENNÉ PROSTREDIA
.IP WMAKER_USER_ROOT
špecifikuje cestu k adresáru Defaults. "Defaults/" je pridané k tejto
premennej, čím sa určí umiestnenie databáz. Ak premenná nie je nastavená,
jej implicitná hodnota je "~/GNUstep"
.SH SÚBORY
Domény sa nachádzajú v WMAKER_USER_ROOT/Defaults/
.SH POZRI TIEŽ
špecifikuje cestu k adresáru Defaults. "Defaults/" je pridané k tejto
premennej, čím sa určí umiestnenie databáz. Ak premenná nie je nastavená,
jej implicitná hodnota je "~/GNUstep"
.SH SÚBORY
Domény sa nachádzajú v WMAKER_USER_ROOT/Defaults/
.SH POZRI TIEŽ
.BR wmaker (1)
.SH AUTOR
Autorom Window Makera je Alfredo K. Kojima <kojima@windowmaker.info>.
.PP
Túto manuálovú stránku napísal Marcelo Magallon <mmagallo@debian.org>.
Túto manuálovú stránku napísal Marcelo Magallon <mmagallo@debian.org>.
+63 -63
View File
@@ -1,128 +1,128 @@
.\" Hey, Emacs! This is an -*- nroff -*- source file.
.TH Window\ Maker 1 "August 1998"
.TH "Window Maker" 1 "August 1998"
.SH MENO
wmaker \- manažér okien pre X11 so vzhľadom NEXTSTEP
wmaker \- manažér okien pre X11 so vzhľadom NEXTSTEP
.SH SYNTAX
.B wmaker
.I "[-voľby]"
.I "[-voľby]"
.SH "POPIS"
Window Maker je manažér okien pre X11 so vzhľadom NEXTSTEP. Snaží sa
napodobniť vzhľad NeXT ako je to len možné, ale v prípade potreby tento
trend nedodržuje.
.SH "VOĽBY"
Window Maker je manažér okien pre X11 so vzhľadom NEXTSTEP. Snaží sa
napodobniť vzhľad NeXT ako je to len možné, ale v prípade potreby tento
trend nedodržuje.
.SH "VOĽBY"
.TP
.B \-\-no\-cpp
zakázať preprocessing konfiguračných súborov
zakázať preprocessing konfiguračných súborov
.TP
.B \-\-no\-dock
neotvárať Dok aplikácií
neotvárať Dok aplikácií
.TP
.B \-\-no\-clip
neotvárať Spinku pracovných plôch
neotvárať Spinku pracovných plôch
.TP
.B \-display host:display.screen
použiť daný display.
Na strojoch s viacerými obrazovkami bude Window Maker automaticky spravovať
všetky obrazovky. Ak chcete, aby Window Maker spravoval len špecifickú
obrazovku, musíte zadať číslo obrazovky pomocou argumentu príkazového riadku
použiť daný display.
Na strojoch s viacerými obrazovkami bude Window Maker automaticky spravovať
všetky obrazovky. Ak chcete, aby Window Maker spravoval len špecifickú
obrazovku, musíte zadať číslo obrazovky pomocou argumentu príkazového riadku
.B \-display.
Napríklad, ak chcete, aby Window Maker spravoval len obrazovku 1, spustite ho
Napríklad, ak chcete, aby Window Maker spravoval len obrazovku 1, spustite ho
takto:
.B wmaker -display :0.1
.TP
.B \-\-version
vypíše verziu a ukončí sa
vypíše verziu a ukončí sa
.TP
.B \-\-visual\-id
určenie čísla obrazového režimu. Viď
určenie čísla obrazového režimu. Viď
.BR xdpyinfo (1)
pre zoznam obrazových režimov dostupných na vašom display-i.
pre zoznam obrazových režimov dostupných na vašom display-i.
.TP
.B \-\-help
vypíše krátky pomocný text
vypíše krátky pomocný text
.PP
.SH SÚBORY
.SH SÚBORY
.TP
.B ~/GNUstep/Defaults/WindowMaker
všeobecné nastavenia Window Makera.
všeobecné nastavenia Window Makera.
.TP
.B ~/GNUstep/Defaults/WMState
informácie o Doku a Spinke. NEeditujte za behu Window Makeru. Bude
prepísaný.
informácie o Doku a Spinke. NEeditujte za behu Window Makeru. Bude
prepísaný.
.TP
.B ~/GNUstep/Defaults/WMRootMenu
Obsahuje meno súboru, z ktorého sa má načítať hlavné menu alebo
menu samotné vo formáte proplist.
Obsahuje meno súboru, z ktorého sa má načítať hlavné menu alebo
menu samotné vo formáte proplist.
.TP
.B ~/GNUstep/Defaults/WMWindowAttributes
Atribúty pre rôzne triedy a inštancie aplikácií. Použite editor nastavení
(ťahajte pravé tlačítko na hornej lište aplikácie, zvoľte Nastavenia)
namiesto priameho editovania tohto súboru. Je len málo nastavení, ktoré
nie sú dostupné z editora nastavení.
Atribúty pre rôzne triedy a inštancie aplikácií. Použite editor nastavení
(ťahajte pravé tlačítko na hornej lište aplikácie, zvoľte Nastavenia)
namiesto priameho editovania tohto súboru. Je len málo nastavení, ktoré
nie sú dostupné z editora nastavení.
.TP
.B /usr/share/WindowMaker/Defaults/
Všetky spomenuté súbory sa NAČÍTAJÚ odtiaľto ak sa nepodarí nájsť ich,
okrem WMState, ktorý sa odtiaľto SKOPÍRUJE. Nezáleží na tom, odkiaľ
sú načítané, ak je potrebné zapísať zmenu konfigurácie späť do týchto
súborov, zapíšu sa do užívateľských súborov.
Všetky spomenuté súbory sa NAČÍTAJÚ odtiaľto ak sa nepodarí nájsť ich,
okrem WMState, ktorý sa odtiaľto SKOPÍRUJE. Nezáleží na tom, odkiaľ
sú načítané, ak je potrebné zapísať zmenu konfigurácie späť do týchto
súborov, zapíšu sa do užívateľských súborov.
.TP
.B ~/GNUstep/Library/WindowMaker/autostart
Tento skript sa automaticky vykoná pri štarte Window Makera.
Tento skript sa automaticky vykoná pri štarte Window Makera.
.TP
.B ~/GNUstep/Library/WindowMaker/exitscript
Tento skript sa automaticky vykoná bezprostredne pred ukončením Window Makera.
.B Poznámka:
Ak potrebujete spustiť z tohto skriptu niečo, čo vyžaduje spustený X server,
nepoužívajte na ukončenie Window Makera príkaz
Tento skript sa automaticky vykoná bezprostredne pred ukončením Window Makera.
.B Poznámka:
Ak potrebujete spustiť z tohto skriptu niečo, čo vyžaduje spustený X server,
nepoužívajte na ukončenie Window Makera príkaz
.I SHUTDOWN
z hlavného menu. Inak sa môže stať, že X server sa ukončí skôr než sa vykoná
z hlavného menu. Inak sa môže stať, že X server sa ukončí skôr než sa vykoná
skript.
.TP
.B ~/GNUstep/Library/WindowMaker/
Súbor menu, ktorého názov je vo WMRootMenu, sa hľadá tu...
Súbor menu, ktorého názov je vo WMRootMenu, sa hľadá tu...
.TP
.B /etc/X11/WindowMaker/
a tu, v tomto poradí, pokiaľ nie je názov absolútna cesta.
a tu, v tomto poradí, pokiaľ nie je názov absolútna cesta.
.TP
.B ~/GNUstep/Library/WindowMaker/Pixmaps/
Tu hľadá Window Maker obrázky
Tu hľadá Window Maker obrázky
.TP
.B ~/GNUstep/Library/WindowMaker/Backgrounds/
Tu hľadá Window Maker pozadia
Tu hľadá Window Maker pozadia
.TP
.B ~/GNUstep/Library/WindowMaker/Styles/
Tu hľadá Window Maker súbory so štýlmi (nie celkom... vyzerá to tak, ale
aj tak musíte zadať úplnú cestu. Je to len vyhradené miesto, aby boli
veci pekne usporiadané)
Tu hľadá Window Maker súbory so štýlmi (nie celkom... vyzerá to tak, ale
aj tak musíte zadať úplnú cestu. Je to len vyhradené miesto, aby boli
veci pekne usporiadané)
.TP
.B ~/GNUstep/Library/WindowMaker/Themes/
Tu hľadá Window Maker súbory s témami (viď vyššie)
Tu hľadá Window Maker súbory s témami (viď vyššie)
.TP
.B /usr/share/WindowMaker/Pixmaps/
Obrázky spoločné pre celý systém sa nachádzajú tu...
Obrázky spoločné pre celý systém sa nachádzajú tu...
.TP
.B /usr/share/WindowMaker/Pixmaps/
a tu.
.TP
.B /usr/share/WindowMaker/Styles/
Štýly spoločné pre celý systém sa nachádzajú tu
Štýly spoločné pre celý systém sa nachádzajú tu
.TP
.B /usr/share/WindowMaker/Themes/
Teraz to skús sám... ;-)
.SH PREMENNÉ PROSTREDIA
Teraz to skús sám... ;-)
.SH PREMENNÉ PROSTREDIA
.IP WMAKER_USER_ROOT
špecifikuje cestu k adresáru Defaults. "Defaults/" je pridané k tejto
premennej, čím sa určí umiestnenie databáz. Ak premenná nie je nastavená,
jej implicitná hodnota je "~/GNUstep"
špecifikuje cestu k adresáru Defaults. "Defaults/" je pridané k tejto
premennej, čím sa určí umiestnenie databáz. Ak premenná nie je nastavená,
jej implicitná hodnota je "~/GNUstep"
.IP GNUSTEP_LOCAL_ROOT
špecifikuje umiestnenie systémového \fBlokálneho\fP GNUstep adresára (toto
je užitočné v prípade, že umiestnenie adresára spoločného pre celý systém je
v skutočnosti spoločné pre celú sieť). Ak je táto premenná prázdna, použije
špecifikuje umiestnenie systémového \fBlokálneho\fP GNUstep adresára (toto
je užitočné v prípade, že umiestnenie adresára spoločného pre celý systém je
v skutočnosti spoločné pre celú sieť). Ak je táto premenná prázdna, použije
sa GNUSTEP_SYSTEM_ROOT.
.IP GNUSTEP_SYSTEM_ROOT
špecifikuje umiestnenie systémového GNUstep adresára. Ak je táto premenná
prázdna, jej implicitná hodnota je /etc/GNUstep
.SH POZRI TIEŽ
špecifikuje umiestnenie systémového GNUstep adresára. Ak je táto premenná
prázdna, jej implicitná hodnota je /etc/GNUstep
.SH POZRI TIEŽ
The Window Maker User Guide
.PP
The Window Maker FAQ
@@ -138,9 +138,9 @@ The Window Maker FAQ
.BR setstyle (1),
.BR wmsetbg (1)
.SH AUTOR
Autormi Window Makera sú Alfredo K. Kojima <kojima@windowmaker.info>,
Dan Pascu <dan@windowmaker.info> s pomocou mnohých ľudí z celého Internetu.
Autormi Window Makera sú Alfredo K. Kojima <kojima@windowmaker.info>,
Dan Pascu <dan@windowmaker.info> s pomocou mnohých ľudí z celého Internetu.
.PP
Túto manuálovú stránku napísal Marcelo E. Magallon, <mmagallo@debian.org>.
Túto manuálovú stránku napísal Marcelo E. Magallon, <mmagallo@debian.org>.
+25 -25
View File
@@ -1,66 +1,66 @@
.\" Hey, Emacs! This is an -*- nroff -*- source file.
.TH wmsetbg 1 "January 1999"
.SH MENO
wmsetbg \- nastaví pozadie hlavného okna v X11
wmsetbg \- nastaví pozadie hlavného okna v X11
.SH SYNTAX
.B wmsetbg
[\-display] [\-\-version] [\-\-help] [{\-b|\-\-back\-color} \fIfarba\fP]
[{\-t|\-\-tile}|{\-e|\-\-center}|{\-s|\-\-scale}|{\-a|\-\-maxscale} \fIobrázok\fP]
[{\-t|\-\-tile}|{\-e|\-\-center}|{\-s|\-\-scale}|{\-a|\-\-maxscale} \fIobrázok\fP]
[{\-d|\-\-dither}|{\-m|\-\-match}] [\-u|\-\-update\-wmaker]
[{\-D|\-\-update\-domain} \fIdoména\fP] [{\-c|\-\-colors} \fIcpc\fP]
[{\-p|\-\-parse} \fItextúra\fP] [{\-w|\-\-workspace} \fIpracovná plocha\fP]
[{\-D|\-\-update\-domain} \fIdoména\fP] [{\-c|\-\-colors} \fIcpc\fP]
[{\-p|\-\-parse} \fItextúra\fP] [{\-w|\-\-workspace} \fIpracovná plocha\fP]
.SH POPIS
.B wmsetbg
načíta daný
.I obrázok
(XPM, PNG, jpeg, Tiff, raw PPM) a vloží ho do hlavného okna. Obrázok možno
zväčšiť, alebo ho opakovať aby vyplnil hlavné okno. Window Maker používa
tento príkaz interne na nastavenie pozadia pri štarte.
.SH VOĽBY
načíta daný
.I obrázok
(XPM, PNG, jpeg, Tiff, raw PPM) a vloží ho do hlavného okna. Obrázok možno
zväčšiť, alebo ho opakovať aby vyplnil hlavné okno. Window Maker používa
tento príkaz interne na nastavenie pozadia pri štarte.
.SH VOĽBY
.TP
.B \-a|\-\-maxscale
zväčší daný \fIobrázok\fP pri dodržaní pomeru strán
zväčší daný \fIobrázok\fP pri dodržaní pomeru strán
.TP
.B \-e|\-\-center
vloží \fIobrázok\fP do stredu okna
vloží \fIobrázok\fP do stredu okna
.TP
.B \-t|\-\-tile
vytvára z \fIobrázku\fP dlaždice
vytvára z \fIobrázku\fP dlaždice
.TP
.B \-s|\-\-scale
roztiahne daný \fIobrázok\fP (štandardne)
roztiahne daný \fIobrázok\fP (štandardne)
.TP
.B \-d|\-\-dither
rezervuje farby
.TP
.B \-m|\-\-match
zhodné farby
zhodné farby
.TP
.B \-u|\-\-update\-wmaker
zapíše zmenu do databázy nastavení Window Makera
zapíše zmenu do databázy nastavení Window Makera
.TP
.B \-D|\-\-update\-domain
zapíše zmenu do databázy \fIdoména\fP
zapíše zmenu do databázy \fIdoména\fP
.TP
.B \-c|\-\-colors
použiť počet farieb na kanál
použiť počet farieb na kanál
.TP
.B \-p|\-\-parse
parsuje danú \fItextúru\fP ako \fIproplist style textúru\fP
parsuje danú \fItextúru\fP ako \fIproplist style textúru\fP
.TP
.B \-w|\-\-workspace
nastaví pozadie len na danej \fIpracovnej ploche\fP
nastaví pozadie len na danej \fIpracovnej ploche\fP
.TP
.B \-\-help
vypíše pomocný text
vypíše pomocný text
.TP
.B \-\-version
vypíše číslo verzie
.SH POZRI TIEŽ
vypíše číslo verzie
.SH POZRI TIEŽ
.BR wmaker (1)
.SH AUTOR
Autorom Window Makera je Alfredo K. Kojima <kojima@windowmaker.info>.
wmsetbg napísal Dan Pascu <dan@windowmaker.info>
wmsetbg napísal Dan Pascu <dan@windowmaker.info>
.PP
Túto manuálovú stránku napísal Marcelo Magallon <mmagallo@debian.org>.
Túto manuálovú stránku napísal Marcelo Magallon <mmagallo@debian.org>.
+20 -20
View File
@@ -1,42 +1,42 @@
.\" Hey, Emacs! This is an -*- nroff -*- source file.
.TH wxcopy 1 "September 1998"
.SH NAME
wxcopy \- kopíruje ¹tandardný vstup do cutbuffera
wxcopy \- kopíruje štandardný vstup do cutbuffera
.SH SYNOPSIS
.B wxcopy
[voµby]
[súbor]
[voľby]
[súbor]
.SH DESCRIPTION
.B wxcopy
kopíruje ¹tandardný vstup alebo
.I súbor
do cutbuffera. Ak nie je daný cutbuffer, dáta sa kopírujú do cutbuffera 0
a ostané cutbuffery rotujú, ak existujú. Ak je daný cutbuffer, dáta sa
kopírujú do toho cutbuffera a nevykoná sa ¾iadne rotovanie.
.SH VO¥BY
kopíruje štandardný vstup alebo
.I súbor
do cutbuffera. Ak nie je daný cutbuffer, dáta sa kopírujú do cutbuffera 0
a ostané cutbuffery rotujú, ak existujú. Ak je daný cutbuffer, dáta sa
kopírujú do toho cutbuffera a nevykoná sa žiadne rotovanie.
.SH VOĽBY
.TP
.B \-cutbuffer èíslo
©pecifikuje èíslo cutbuffera, do ktorého sa budú kopírova» dáta.
.B \-cutbuffer číslo
Špecifikuje číslo cutbuffera, do ktorého sa budú kopírovať dáta.
.TP
.B \-display displej
Dáta sa budú kopírova» do cutbufferov daného displeja/obrazovky.
Dáta sa budú kopírovať do cutbufferov daného displeja/obrazovky.
.TP
.B \-nolimit
Vypne normálny limit veµkosti dát 64kb, èím sa umo¾ní zväè¹ovanie buffera
podµa potreby.
Vypne normálny limit veľkosti dát 64kb, čím sa umožní zväčšovanie buffera
podľa potreby.
.TP
.B \-clearselection
Vyprázdni vlastníka PRIMARY selekcie. V praxi to znamená, ¾e keï sa pokúsite
vlo¾i» dáta stredným tlaèítkom (napríklad), vlo¾ia sa dáta z cutbuffera 0,
namiesto prípadnej existujúcej selelekcie my¹i.
Vyprázdni vlastníka PRIMARY selekcie. V praxi to znamená, že keď sa pokúsite
vložiť dáta stredným tlačítkom (napríklad), vložia sa dáta z cutbuffera 0,
namiesto prípadnej existujúcej selelekcie myši.
.PP
.SH POZRI TIE®
.SH POZRI TIEŽ
.BR wxpaste (1),
.BR wmaker (1)
.SH AUTOR
Autorom Window Makera je Alfredo K. Kojima <kojima@windowmaker.info>.
.PP
Túto manuálovú stránku napísal Marcelo Magallon <mmagallo@debian.org>.
Túto manuálovú stránku napísal Marcelo Magallon <mmagallo@debian.org>.
Kompatibilitu s binárnymi dátami a \-nolimit implementoval Luke Kendall
Kompatibilitu s binárnymi dátami a \-nolimit implementoval Luke Kendall
<luke@research.canon.com.au>.
+16 -16
View File
@@ -1,39 +1,39 @@
.\" Hey, Emacs! This is an -*- nroff -*- source file.
.TH wxpaste 1 "March 1998"
.SH MENO
wxpaste \- zapíše cutbuffer na štandardný výstup
wxpaste \- zapíše cutbuffer na štandardný výstup
.SH SYNTAX
.B wxpaste
[voľby]
[voľby]
.SH POPIS
.B wxpaste
vypíše obsah daného cutbuffera na štandardný výstup. Ak nie je daný žiadny
cutbuffer, použije sa cutbuffer 0.
vypíše obsah daného cutbuffera na štandardný výstup. Ak nie je daný žiadny
cutbuffer, použije sa cutbuffer 0.
.PP
.SH VOĽBY
.SH VOĽBY
.TP
.B \-cutbuffer číslo
Dáta budú vložené do daného cutbuffera namiesto štandardného 0.
.B \-cutbuffer číslo
Dáta budú vložené do daného cutbuffera namiesto štandardného 0.
.TP
.B \-display displej
Dáta sa budú kopírovať do cutbufferov daného displeja/obrazovky.
Dáta sa budú kopírovať do cutbufferov daného displeja/obrazovky.
.TP
.B \-selection [selekcia]
Dáta budú kopírované z danej selekcie. Ak sa výber zo selekcie nepodarí,
použije sa cutbuffer. Implicitná hodnota pre selekciu je PRIMARY.
Dáta budú kopírované z danej selekcie. Ak sa výber zo selekcie nepodarí,
použije sa cutbuffer. Implicitná hodnota pre selekciu je PRIMARY.
.PP
.SH CHYBY
.TP
\-selection musí byť posledá voľba. Syntax môže byť upravená, ale
bráni tomu spätná kompatibilita.
\-selection musí byť posledá voľba. Syntax môže byť upravená, ale
bráni tomu spätná kompatibilita.
Typy selekcií INCR a MULTIPLE nie sú podporované. V skutočnosti je
podporovaný len jednoduchý text, čo by malo stačiť pre väčšinu užívateľov
Typy selekcií INCR a MULTIPLE nie sú podporované. V skutočnosti je
podporovaný len jednoduchý text, čo by malo stačiť pre väčšinu užívateľov
takejto jednoduchej utilitky.
.SH POZRI TIEŽ
.SH POZRI TIEŽ
.BR wxcopy (1),
.BR wmaker (1)
.SH AUTOR
Autorom Window Makera je Alfredo K. Kojima <kojima@windowmaker.info>.
.PP
Túto manuálovú stránku napísal Marcelo Magallon <mmagallo@debian.org>.
Túto manuálovú stránku napísal Marcelo Magallon <mmagallo@debian.org>.
+10 -7
View File
@@ -85,7 +85,7 @@ Attribute Editor (right drag the application's title bar, select
Attributes) instead of modifying this file directly. There are just a
few options not available using the Attributes Editor.
.TP
.B @defsdatadir@/
.B @pkgconfdir@/
All the above-mentioned files are READ from here if not found except
for WMState, which is COPIED from here. No matter where they are read
from, if it's necessary to write configuration changes back into this
@@ -140,14 +140,17 @@ Guess... ;-)
specifies the initial path for the Defaults directory. "Defaults/" is
appended to this variable to determine the actual location of the
databases. If the variable is not set, it defaults to "~/GNUstep"
.IP GNUSTEP_LOCAL_ROOT
specifies the location of the system-wide \fBlocal\fP GNUstep
.IP GNUSTEP_USER_APPS
specifies the location of the user's GNUstep Apps directory. If this
variable is empty, it defaults to ~/GNUstep/Applications.
.IP GNUSTEP_LOCAL_APPS
specifies the location of the system-wide \fBlocal\fP GNUstep Apps
directory (this is useful, for example, in those cases where the
system-wide location is really a network wide location). If this
variable is empty, GNUSTEP_SYSTEM_ROOT is looked for.
.IP GNUSTEP_SYSTEM_ROOT
specifies the location of the system-wide GNUstep directory. If this
variable is empty, it defaults to /etc/GNUstep
variable is empty, it defaults to /usr/local/GNUstep/Local/Applications.
.IP GNUSTEP_SYSTEM_APPS
specifies the location of the system-wide GNUstep Apps directory. If this
variable is empty, it defaults to /usr/GNUstep/System/Applications.
.SH SEE ALSO
The Window Maker User Guide
.PP
+77 -24
View File
@@ -24,39 +24,61 @@ m4_pattern_forbid([^_?WM_])
m4_pattern_allow([^WM_OSDEP(_[A-Z]*)?$])
# WM_DENY_ARG_WITH(PACKAGE, ACTION-IF-GIVEN)
#
# Check if the argument "--with-PACKAGE" was used, and if it is the case
# execute ACTION-IF-GIVEN which is supposed to call AC_MSG_ERROR to
# stop any further processing and tell the user its arguments are bad
AC_DEFUN([WM_DENY_ARG_WITH],
[m4_divert_push([INIT_PREPARE])dnl
AS_IF([test "${[with_]m4_translit([$1], [-+.], [___])+set}" = set], [$2])
m4_divert_pop([INIT_PREPARE])])
# WM_CHECK_XFT_VERSION(MIN_VERSION, [ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]])
#
# $XFTFLAGS should be defined before calling this macro,
# $XFT_CFLAGS should be defined before calling this macro,
# else it will not be able to find Xft.h
#
AC_DEFUN([WM_CHECK_XFT_VERSION],
[
CPPFLAGS_old="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $XFTFLAGS $inc_search_path"
xft_major_version=`echo $1 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
xft_minor_version=`echo $1 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
xft_micro_version=`echo $1 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
AC_MSG_CHECKING([whether libXft is at least version $1])
AC_CACHE_VAL(ac_cv_lib_xft_version_ok,
[AC_TRY_LINK(
[/* Test version of libXft we have */
[m4_define([XFT_REQUIRED_VERSION],
m4_eval(m4_bregexp($1, [^\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)],
[\1 * 10000 + \2 * 100 + \3]) ) )dnl
AC_CACHE_CHECK([whether libXft is at least version $1], [ac_cv_lib_xft_version_ok],
[CPPFLAGS_save="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $XFT_CFLAGS $inc_search_path"
AC_TRY_LINK([
#include <X11/Xlib.h>
#include <X11/Xft/Xft.h>
#if !defined(XFT_VERSION) || XFT_VERSION < $xft_major_version*10000 + $xft_minor_version*100 + $xft_micro_version
], [
#if !defined(XFT_VERSION) || XFT_VERSION < ]XFT_REQUIRED_VERSION[
#error libXft on this system is too old. Consider upgrading to at least $1
#endif
], [],
eval "ac_cv_lib_xft_version_ok=yes",
eval "ac_cv_lib_xft_version_ok=no")])
if eval "test \"`echo '$ac_cv_lib_xft_version_ok'`\" = yes"; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
ifelse([$3], , , [$3])
fi
CPPFLAGS="$CPPFLAGS_old"
], [ac_cv_lib_xft_version_ok=yes], [ac_cv_lib_xft_version_ok=no])
CPPFLAGS="$CPPFLAGS_save"])
m4_undefine([XFT_REQUIRED_VERSION])dnl
AS_IF([test "x$ac_cv_lib_xft_version_ok" != "xyes"], [$3], [$2])dnl
])
# WM_CHECK_LIBPANGO
# -----------------
#
# If the support was not disabled by user, check for the pango library using
# pkg-config, and if found place the appropriate stuff in the variables
# PANGO_CFLAGS (for compiler) and PANGO_LIBS (for linker)
AC_DEFUN([WM_CHECK_LIBPANGO],
[AS_IF([test "x$enable_pango" != "xno"],
[PKG_CHECK_MODULES([PANGO], [pangoxft],
[AC_DEFINE([USE_PANGO], [1], [defined when the pango library is used in WINGs])
pango="yes"],
[pango="no"])
AS_IF([test "x$enable_pango$pango" == "xyesno"],
[AC_MSG_ERROR([Pango library was not found - $PANGO_PKG_ERRORS])])
],
[pango="no"])
AC_SUBST([PANGO_CFLAGS])dnl
AC_SUBST([PANGO_LIBS])dnl
])
@@ -183,6 +205,37 @@ m4_popdef([USEVAR])dnl
])
# WM_CHECK_WEBREPODIR
# -------------------
#
# If the maintainer's option --with-web-repo was specified, check that the path provided is a valid
# existing directory and that it is a GIT repository that looks like Window Maker's Website repo.
AC_DEFUN_ONCE([WM_CHECK_WEBREPODIR],
[AS_IF([test "x$WEB_REPO_ROOT" != "x"],
[AS_IF([test ! -d "$WEB_REPO_ROOT"],
[AC_MSG_ERROR([The path "$with_web_repo" is not a directory, for --with-web-repo])])
# Convert to an Absolute path in the case it is not
WEB_REPO_ROOT=`cd "$WEB_REPO_ROOT" ; pwd`
AS_IF([test ! -d "$WEB_REPO_ROOT/.git"],
[AC_MSG_ERROR([The path "$WEB_REPO_ROOT" is not a GIT repository, for --with-web-repo])])
AS_IF([test ! -f "$WEB_REPO_ROOT/_config.yml"],
[AC_MSG_ERROR([The path "$WEB_REPO_ROOT" does not look like Window Maker's website repository, for --with-web-repo])])
# This is used to convert MAN pages into HTML pages
AC_CACHE_CHECK([how to convert man to html], [ac_cv_path_GROFF],
[AC_PATH_PROGS_FEATURE_CHECK([GROFF], [groff],
[echo '.TH dummy 0' | $ac_path_GROFF -man -Dutf8 -Thtml > /dev/null 2> /dev/null
test $? -eq 0 && ac_cv_path_GROFF=$ac_path_GROFF ac_path_GROFF_found=:],
[AC_MSG_ERROR([no working "groff" found -- If you have "groff-base" it is not enough for HTML support])]) ])
AC_SUBST([GROFF], [$ac_cv_path_GROFF])
])
AM_CONDITIONAL([WITH_WEB_REPO], [test "x$WEB_REPO_ROOT" != "x"])
AC_SUBST([WEB_REPO_ROOT])
])
# WM_FUNC_SECURE_GETENV
# ---------------------
#
+11 -4
View File
@@ -37,7 +37,7 @@ AC_DEFUN_ONCE([WM_I18N_LANGUAGES],
[AC_ARG_VAR([LINGUAS],
[list of language translations to support (I18N), use 'list' to get the list of supported languages, default: none])dnl
AC_DEFUN([WM_ALL_LANGUAGES],
[m4_esyscmd([( ls WINGs/po/ ; ls po/ ; ls WPrefs.app/po/ ; ls util/po/ ) | sed -n -e '/po$/{s,\.po,,;p}' | sort -u | tr '\n' ' '])])dnl
[m4_esyscmd([( ls wrlib/po/ ; ls WINGs/po/ ; ls po/ ; ls WPrefs.app/po/ ; ls util/po/ ) | sed -n -e '/po$/{s,\.po,,;p}' | sort -u | tr '\n' ' '])])dnl
dnl We 'divert' the macro to have it executed as soon as the option list have
dnl been processed, so the list of locales will be printed after the configure
dnl options have been parsed, but before any test have been run
@@ -66,6 +66,7 @@ AS_IF([test "x$LINGUAS" != "x"],
supported_locales=""
# This is the list of locales that our archive currently supports
wraster_locales=" m4_esyscmd([ls wrlib/po/ | sed -n '/po$/{s,.po,,;p}' | tr '\n' ' '])"
wings_locales=" m4_esyscmd([ls WINGs/po/ | sed -n '/po$/{s,.po,,;p}' | tr '\n' ' '])"
wmaker_locales=" m4_esyscmd([ls po/ | sed -n '/po$/{s,.po,,;p}' | tr '\n' ' '])"
wprefs_locales=" m4_esyscmd([ls WPrefs.app/po/ | sed -n '/po$/{s,.po,,;p}' | tr '\n' ' '])"
@@ -81,7 +82,7 @@ AS_IF([test "x$LINGUAS" != "x"],
for lang in $LINGUAS; do
found=0
wm_missing=""
m4_foreach([REGION], [WINGs, wmaker, WPrefs, util, man],
m4_foreach([REGION], [WRaster, WINGs, wmaker, WPrefs, util, man],
[AS_IF([echo "$[]m4_tolower(REGION)[]_locales" | grep " $lang " > /dev/null],
[m4_toupper(REGION)MOFILES="$[]m4_toupper(REGION)MOFILES $lang.mo"
found=1],
@@ -103,6 +104,7 @@ AS_IF([test "x$LINGUAS" != "x"],
MANLANGDIRS="`echo $MANMOFILES | sed -e 's,\.mo,,g' `"
],
[INTLIBS=""
WRASTERMOFILES=""
WINGSMOFILES=""
WMAKERMOFILES=""
WPREFSMOFILES=""
@@ -112,6 +114,7 @@ AS_IF([test "x$LINGUAS" != "x"],
dnl
dnl The variables that are used in the Makefiles:
AC_SUBST([INTLIBS])dnl
AC_SUBST([WRASTERMOFILES])dnl
AC_SUBST([WINGSMOFILES])dnl
AC_SUBST([WMAKERMOFILES])dnl
AC_SUBST([WPREFSMOFILES])dnl
@@ -144,7 +147,8 @@ AM_CONDITIONAL([HAVE_XGETTEXT], [test "x$XGETTEXT" != "x"])dnl
# wish to customize the menus, and thus can make them translatable
# with their own po/mo files without having to touch WMaker's stuff.
AC_DEFUN_ONCE([WM_I18N_MENUTEXTDOMAIN],
[AC_ARG_WITH([menu-textdomain],
[m4_divert_push([INIT_PREPARE])dnl
AC_ARG_WITH([menu-textdomain],
[AS_HELP_STRING([--with-menu-textdomain=DOMAIN],
[specify gettext domain used for menu translations])],
[AS_CASE([$withval],
@@ -152,6 +156,7 @@ AC_DEFUN_ONCE([WM_I18N_MENUTEXTDOMAIN],
[no], [menutextdomain=""],
[menutextdomain="$withval"])],
[menutextdomain=""])
m4_divert_pop([INIT_PREPARE])dnl
AS_IF([test "x$menutextdomain" != "x"],
[AC_DEFINE_UNQUOTED([MENU_TEXTDOMAIN], ["$menutextdomain"],
[gettext domain to be used for menu translations]) ])
@@ -164,13 +169,15 @@ dnl
dnl X11 needs to redefine the function 'setlocale' to properly initialize itself,
dnl we check if user wants to disable this behaviour or if it is not supported
AC_DEFUN_ONCE([WM_I18N_XLOCALE],
[AC_ARG_ENABLE([xlocale],
[m4_divert_push([INIT_PREPARE])dnl
AC_ARG_ENABLE([xlocale],
[AS_HELP_STRING([--disable-xlocale],
[disable initialization of locale for X])],
[AS_CASE([$enableval],
[yes|no], [],
[AC_MSG_ERROR([bad value '$enableval' for --disable-xlocale])])],
[enable_xlocale=auto])
m4_divert_pop([INIT_PREPARE])dnl
AS_IF([test "x$enable_xlocale" != "xno"],
[AC_CHECK_LIB([X11], [_Xsetlocale],
[AC_DEFINE([X_LOCALE], [1],
+67
View File
@@ -0,0 +1,67 @@
# wm_library_constructors.m4 - Macros to see if compiler supports attributes "constructors" for libraries
#
# Copyright (c) 2021 Christophe CURIS
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# WM_LIBRARY_CONSTRUCTORS
# -----------------------
#
# GCC introduced the attribute 'constructor' which says that a function must be
# called when a library is loaded (needed for C++ support). However this may not
# be totally portable, so we may use the old method "_init" as a fall-back
# solution, which is considered Obsolete/Dangerous.
#
# This is explained here:
# https://tldp.org/HOWTO/Program-Library-HOWTO/miscellaneous.html#INIT-AND-CLEANUP
#
# This macro is making sure that the compiler supports the attribute, because we
# need it for the WRaster library (see RStartup in wrlib/misc.c to see why).
AC_DEFUN_ONCE([WM_LIBRARY_CONSTRUCTORS],
[AC_CACHE_CHECK([how to declare a library constructor], [wm_cv_library_constructors],
[save_CFLAGS="$CFLAGS"
dnl We need this to cause a detectable failure in case of unsupported attribute name
dnl if we don't do this, we just get a warning and AC_COMPILE suppose it was ok.
CFLAGS="$CFLAGS -Werror"
AC_COMPILE_IFELSE(
[AC_LANG_SOURCE([[
static int is_initialised = 0;
void __attribute__ ((constructor)) special_function(void)
{
is_initialised = 1;
}
int main(int argc, char **argv)
{
/* To avoid warning on unused parameters, they could cause a false failure */
(void) argc;
(void) argv;
return (is_initialised)?0:1;
}
]]) ],
[wm_cv_library_constructors=attribute],
[wm_cv_library_constructors=legacy])
CFLAGS="$save_CFLAGS"])
dnl In a perfect world we should also make sure that the feature works, but that implies
dnl to be able to actually build and run a program, which is not compatible with a
dnl cross-compiling user setup
AS_IF([test "X$wm_cv_library_constructors" = "Xattribute"],
[AC_DEFINE([WLIB_CONSTRUCTOR(func_name)], [__attribute__ ((constructor)) func_name],
[Method for defining a library initialisation function])],
[AC_DEFINE([WLIB_CONSTRUCTOR(func_name)], [_init],
[Method for defining a library initialisation function])] )
])
+2 -2
View File
@@ -27,7 +27,7 @@ fi.po Finnish Ville Hautamaki <villeh@cs.joensuu.fi>
Tomi Kajala <tomi@iki.fi>
hr.po Croatian 3 Toni Bilic <tbilic@efos.hr>
el.po Greek Nikolaos Papagrigoriou <papanikos@usa.net>
pl.po Polish Piotr Dembiñski <pdemb@aurora.put.poznan.pl>
pl.po Polish Piotr Dembiñski <pdemb@aurora.put.poznan.pl>
ro.po Romanian Andrei Vuta <gigi_man@manag.pub.ro>
da.po Danish Birger Langkjer <langkjer@post3.tele.dk>
zh_TW.Big5.po Chinese Li Wei Jih <lwj@manufacture.com.tw>
@@ -40,7 +40,7 @@ hu.po Hungarian HORVATH Szabolcs <horvaths@inf.elte.hu>
et.po Estonian Ivar Smolin <okul@trenet.ee>
ms.po Malay Hasbullah Bin Pit (sebol) <sebol@ikhlas.com>
be.po Belarusian Ihar Viarheichyk <iverg@mail.ru>
ca.po Catalan Ernest Adrogué <eadrogue@gmx.net>
ca.po Catalan Ernest Adrogué <eadrogue@gmx.net>
bs.po Bosnian Ahmet Mulalic <am@lugzdk.ba>
hy.po Armenian Norayr Chilignaryan <chnorik@gmail.com>
nl.po Dutch Alwin <translations@ziggo.nl>
+2 -2
View File
@@ -1522,8 +1522,8 @@ msgstr ""
"Confirmez-vous ?"
#: ../src/winmenu.c:274 ../src/winmenu.c:283
msgid "Set Shortcut"
msgstr "Attribuer le raccourci"
msgid "Set Shortcut %i"
msgstr "Attribuer le raccourci n°%i"
#: ../src/winmenu.c:361 ../src/winmenu.c:406
msgid "could not create submenu for window menu"
+313
View File
@@ -0,0 +1,313 @@
#!/bin/sh
###########################################################################
#
# Window Maker window manager
#
# Copyright (c) 2021 Christophe CURIS
# Copyright (c) 2021 Window Maker Team
#
# 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, see <http://www.gnu.org/licenses/>.
#
###########################################################################
#
# generate-html-from-man.sh:
# Convert a man page into HTML using Groff, then post-process it to make
# it fit the Window Maker site's theme and install it into the website
# Git repository.
#
# The pages are generated as xhtml because that's the most convenient
# format at current time that Groff can provide. The post-processing of the
# page includes:
#
# - the basic style sheet included by groff is replaced by a call to "manpage.css";
#
# - if a menu list is provided with "--with-menu", then it is added at the
# beginning of the <body> inside an "ul" with class="menu";
#
# - the list of sections at the beginning is enclosed in a div with class="toc";
#
# - emails addresses in the form "<name@example.com>" are obfuscated (to
# not help spambots) and a mailto: link is added;
#
# - a link is added when an url of the form "http://..." is encountered;
#
# - when a man-page reference is found, in the form "name(section)", a link
# is added, either to a local page if in the "--local-pages" list or to the
# external url provided in "--external-url";
#
# - if the package name and version is provided with "--package", then a div with
# class="footer" is added at the end of the <body>.
#
###########################################################################
#
# For portability, we stick to the same sh+awk constraint as Autotools to
# limit problems, see for example:
# http://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Portable-Shell.html
#
###########################################################################
# Report an error on stderr and exit with status 2 to tell make that we could
# not do what we were asked
arg_error() {
echo "`basename $0`: $@" >&2
exit 2
}
# print help and exit with success status
print_help() {
echo "$0: convert man page into HTML"
echo "Usage: $0 options... man-page-file"
echo "valid options are:"
echo " --external-url tmpl : use tmpl as URL template for non-local man pages"
echo " --groff name : name of groff binary to use"
echo " --local-pages names : list of man pages that are available locally"
echo " --output filename : name of the HTML file to generate"
echo " --with-menu code : insert the specified code to add a navigation menu"
echo " --package name : name of package, added in the footer of page"
exit 0
}
# Sets the default values
GROFF=groff
# Extract command line arguments
while [ $# -gt 0 ]; do
case $1 in
--external-url)
shift
[ "x$external_template" = "x" ] || arg_error "only 1 template for URL can be specified (option: --external-url)"
external_template=$1
;;
--groff)
shift
GROFF=$1
;;
--local-pages)
shift
local_pages="$local_pages $1 "
;;
--output)
shift
[ -z "$output_file" ] || arg_error "only 1 target file can be specified (option: --output)"
output_file="$1"
;;
--with-menu)
shift
[ -z "$menu_line" ] || arg_error "only 1 code for the menu can be specified (option: --with-menu)"
menu_line=`echo "$1" | sed -e 's/"/\\\"/g' `
;;
--package)
shift
[ -z "$package_line" ] || arg_error "package name can be specified only once (option: --package)"
package_line="$1"
;;
-h|-help|--help) print_help ;;
-*) arg_error "unknow option '$1'" ;;
*)
[ -z "$input_file" ] || arg_error "only 1 man page can be specified"
input_file=$1
;;
esac
shift
done
# Check consistency of command-line
[ -z "$input_file" ] && arg_error "no source man page given"
[ -f "$input_file" ] || arg_error "man page \"$input_file\" cannot be read"
if [ -n "$external_template" ]; then
echo "$external_template" | grep '%[plu]' > /dev/null \
|| arg_error "no marker %p, %l or %u for the page name in the URL template (option: --external-url)"
fi
# Generate the name of the output file from the man page file name
if [ -z "$output_file" ]; then
output_file=`echo "$input_file" | sed 's,^.*/,,g ; s/\.[^.]*$//' `.html
fi
###########################################################################
# Pass the configuration to the AWK script; remove the path information
awk_init="BEGIN {
external_template = \"$external_template\";
known_pages = \" $local_pages \";
menu_code = \"$menu_line\";
package_line = \"$package_line\";
source_name = \"`basename "$input_file" `\";
}"
# This AWK script is post-processing the HTML generated by Groff
awk_process_html='
/<html>/ {
print;
$0 = "<!-- This file is generated automatically by a script, do not edit -->";
}
# Groff is generating a title with the name of the command, followed by a table of content
# We detect all this and embed it into a <div> section for presentation purpose
/<h1/ {
header = gensub(/<h1[^>]*>([^<]*)<\/h1>/, "\\1", 1);
print " <div class=\"toc\">";
print " <label for=\"toc-checkbutton\">" header "</label>";
print " <input type=\"checkbox\" id=\"toc-checkbutton\" checked=\"true\">";
print " <div id=\"toc-list\">";
getline;
while (!/<hr>/) {
if (length($0) > 0) {
print " " $0;
}
getline;
}
print " <hr>";
print " <a href=\".\" class=\"return\">Return to list</a><br>";
print " </div>";
print " </div>";
print "";
$0 = "<article>";
}
# Groff is adding an horizontal line at the end of the page, we remove it;
# we take the opportunity to close the <article> that we opened after the toc
/<hr>/ {
$0 = "</article>"
}
# Groff includes a basic CSS style, we want to replace it with our own to be consitent with
# the general website style
/<style/ {
while (!/<\/style>/) {
getline;
}
print "<link rel=\"stylesheet\" type=\"text/css\" href=\"/style.css\">";
$0 = "<link rel=\"stylesheet\" type=\"text/css\" href=\"/manpage.css\">"
}
# Detect the email address and add a link; take the opportunity to conceal it the same way it is
# done for the mailing list, to make spammers work less easy
/&lt;[^@ ]*@[^<@> ]*&gt;/ && inside_body {
line = "";
while (1) {
idx_start = match($0, /&lt;[^@ ]*@[^<@> ]*&gt;/);
if (idx_start == 0) break;
email = substr($0, idx_start + 4, RLENGTH - 8);
gsub(/@/, " (at) ", email);
gsub(/\./, " (dot) ", email);
line = line substr($0, 1, idx_start - 1) "&lt;";
line = line "<a href=\"mailto:" email "\">" email "</a>&gt;";
$0 = substr($0, idx_start + RLENGTH);
}
$0 = line $0;
}
# Detect urls and add a link
/http:\/\// && inside_body {
line = "";
while (1) {
idx_start = index($0, "http://");
if (idx_start == 0) break;
line = line substr($0, 1, idx_start - 1);
$0 = substr($0, idx_start);
idx_end = match($0, /[ \t&]/);
if (idx_end == 0) idx_end = length($0) + 1;
line = line "<a href=\"" substr($0, 1, idx_end - 1) "\">";
line = line substr($0, 1, idx_end - 1) "</a>";
$0 = substr($0, idx_end);
}
$0 = line $0;
}
# Detect references to other man pages and add a link
/<b>[A-Za-z_0-9]*<\/b>\([1-9][a-z]*\)/ {
line = "";
while (1) {
idx_start = match($0, /<b>[A-Za-z_0-9]*<\/b>\([1-9][a-z]*\)/);
if (idx_start == 0) break;
line = line substr($0, 1, idx_start - 1);
split(substr($0, idx_start + 3), elements, /<\/b>\(|\)/);
# elements[1] contains the name of the man-page
# elements[2] contains the section
$0 = substr($0, idx_start + RLENGTH);
idx_known = match(known_pages, " ([^ ]*/)*" elements[1] "\\." elements[2]);
if (idx_known == 0) {
if (external_template == "") {
print "Error: no URL provided for external man page, needed for \"" elements[1] "(" elements[2] ")\" at line " NR > "/dev/stderr";
exit(2);
}
url = gensub(/%s/, elements[2], "g", external_template);
url = gensub(/%p/, elements[1], "g", url);
url = gensub(/%l/, tolower(elements[1]), "g", url);
url = gensub(/%u/, toupper(elements[1]), "g", url);
} else {
# When it is a known page, use the data from known_pages to have possible path information
url = substr(known_pages, idx_known + 1, RLENGTH - length(elements[2]) - 2) ".html";
}
line = line "<a href=\"" url "\"><tt>" elements[1] "</tt>(" elements[2] ")</a>";
}
$0 = line $0;
}
# Detect the start of the page to insert the navigation menu code
/<body>/ {
inside_body = 1;
print;
print "<div id=\"wrapper\">";
if (menu_code) {
while (getline < menu_code) {
print;
}
}
next;
}
/<\/body>/ {
if (package_line) {
print "<div class=\"footer\">"
print " This man page is part of <div id=\"pkgname\">" package_line "</div>";
print "</div>"
}
print " <div id=\"titlebar\">";
print " <div id=\"minimize\"></div>";
print " <div id=\"titlebar-inner\">Window Maker Manual: " gensub(/\.(.*)$/, "(\\1)", 1, source_name) "</div>";
print " <div id=\"close\"></div>";
print " </div>";
print " <div id=\"resizebar\">";
print " <div id=\"resizel\"></div>";
print " <div id=\"resizebar-inner\"></div>";
print " <div id=\"resizer\"></div>";
print " </div>";
print "</div>"; # close "wrapper"
inside_body = 0;
}
{ print }
'
###########################################################################
$GROFF -man -Dutf8 -Thtml < "$input_file" | \
awk "$awk_init$awk_process_html" > "$TARGET/$output_file" \
|| exit $?
+218
View File
@@ -0,0 +1,218 @@
#!/bin/sh
###########################################################################
#
# Window Maker window manager
#
# Copyright (c) 2021 Christophe CURIS
# Copyright (c) 2021 Window Maker Team
#
# 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, see <http://www.gnu.org/licenses/>.
#
###########################################################################
#
# replace-generated-content.sh:
# Re-generate some list of things and replace it in an existing file
#
# The script can generate these kind of information:
#
# - a list of man pages (--man-pages), in which case the following fields
# are available for the template replacement:
# \1: file for the man page, with directories removed, with '.html' extension
# \2: name of the man page, taken from the file name
# \3: section of the page, taken from the file name
# \4: one line description, taken from the man page's NAME section
#
# The 'template' argument provides the template on how to generate one line
# with the new content, the '\n' being replaced with the values explained
# above.
#
# The 'marker' arguments tells the script where the content is to be placed
# in the edited file:
# - the beginning of generated content is located from the line containing
# the pattern 'start ' + the marker text
# - the end is marked by 'end ' + marker
# No content outside the start/end is modified. When inserting the content
# the script is re-using the indentation that was found in the line with the
# start marker.
#
###########################################################################
#
# For portability, we stick to the same sh+awk constraint as Autotools to
# limit problems, see for example:
# http://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Portable-Shell.html
#
###########################################################################
# Report an error on stderr and exit with status 2 to tell make that we could
# not do what we were asked
arg_error() {
echo "`basename $0`: $@" >&2
exit 2
}
# print help and exit with success status
print_help() {
echo "$0: replace lines by new content"
echo "Usage: $0 options... file"
echo "valid options are:"
echo " --template string : template text for generating the data"
echo " --man-pages list : content from the list of these man pages"
echo " --marker mark : comment mark surrounding the data to update"
exit 0
}
# Extract command line arguments
while [ $# -gt 0 ]; do
case $1 in
--man-pages)
shift
man_pages="$man_pages $1 "
;;
--marker)
shift
[ "x$mark" = "x" ] || arg_error "only 1 marker can be specified (option: --marker)"
mark=$1
;;
--template)
shift
[ "x$template" = "x" ] || arg_error "only 1 template can be specified (option: --template)"
template="$1"
;;
-h|-help|--help) print_help ;;
-*) arg_error "unknow option '$1'" ;;
*)
[ -z "$edit_file" ] || arg_error "only 1 file to modify can be specified"
edit_file=$1
;;
esac
shift
done
# Check consistency of command-line
[ -z "$edit_file" ] && arg_error "no file to update was specified"
[ -f "$edit_file" ] || arg_error "file \"$edit_file\" cannot be read"
[ -z "$template" ] && arg_error "Template for generation not specified"
[ -z "$mark" ] && arg_error "No content mark specified"
[ -z "$man_pages" ] && arg_error "No input list provided"
# Make sure the file to edit contains the appropriate marks
grep "start $mark" "$edit_file" > /dev/null || arg_error "Start mark \"start $mark\" not found in \"$edit_file\" (option: --marker)"
grep "end $mark" "$edit_file" > /dev/null || arg_error "End mark \"end $mark\" not found in \"$edit_file\""
###########################################################################
# Generate the content from the list of man pages provided
###########################################################################
if [ -n "$man_pages" ]; then
parse_man_page() {
# Build the name of the HTML file from the man page name
target=`echo $1 | sed 's,[^/]*/,,g ; s/\.[^.]*$//' `.html
section=`echo $1 | sed 's/^.*\.\([^.]*\)$/\1/' `
# Extract the name and the description from the .SH NAME
sed -n '/^\.SH "*NAME"*$/ {
n
s/^\([^ ]*\) *\\- */'$target':\1:'$section':/
:append_next_line
N
/\n\./ b end_section_found
s/[ \t]*\n[ \t]*/ /
b append_next_line
:end_section_found
s/[ \t]*\n\..*$//
s/\\f[BIPR]//g
p
}' $1
}
content=`
for file in $man_pages ; do
parse_man_page $file
done
`
nb_fields=4
fi
###########################################################################
# Convert the content to the specified format
###########################################################################
for i in `seq 2 $nb_fields`; do
sed_from="$sed_from\\([^:]*\\):"
done
sed_from="^$sed_from\\(.*\\)\$"
content=`echo "$content" | sed -e "s,$sed_from,$template," `
###########################################################################
# Replace the content in the file
###########################################################################
# We are working in 2 steps because we cannot edit in place
# In step one we remove the existing content from the file
purged_file=`sed -e "/start $mark/ {
p
:search_end
N
s/^.*\n//
/end $mark/! b search_end
}" "$edit_file"
`
# Convert the content to an AWK array
awk_start=`echo "$content" | awk '
BEGIN {
print "BEGIN {";
}
{
# Add a backslash before the double-quotes
line = "";
while (1) {
idx = index($0, "\"");
if (idx == 0) break;
line = line substr($0, 1, idx - 1) "\\\\\"";
$0 = substr($0, idx + 1);
}
print " content[" NR "] = \"" line $0 "\";";
}
END {
print " nb_content = " NR ";";
print "}";
}
' `
# In step two we insert the generated content between the marks
awk_cmd='
# When the start mark is found, insert the generated content
/start '"$mark"'/ {
print;
# Isolate the indentation so it can be applied to all generated lines
sub(/[^ \t].*$/, "");
for (i = 1; i <= nb_content; i++) {
print $0 content[i];
}
# Thanks to the pre-processing done, the next line will be the end mark
next;
}
# All the rest of the file is kept as-is
{ print }
'
echo "$purged_file" | awk "$awk_start$awk_cmd" > "$edit_file" || exit $?
+4 -3
View File
@@ -148,11 +148,12 @@ xmodifier.hack_nf.c: xmodifier.c $(top_srcdir)/script/nested-func-to-macro.sh
endif
AM_CFLAGS =
AM_CFLAGS = @PANGO_CFLAGS@
AM_CPPFLAGS = $(DFLAGS) \
-I$(top_srcdir)/wrlib \
-I$(top_srcdir)/WINGs @HEADER_SEARCH_PATH@
-I$(top_builddir)/wrlib \
-I$(top_srcdir)/WINGs -I$(top_builddir)/WINGs \
@HEADER_SEARCH_PATH@
wmaker_LDADD = \
+1
View File
@@ -405,6 +405,7 @@ extern struct WPreferences {
char ignore_gtk_decoration_hints;
char dont_blink; /* do not blink icon selection */
char keep_dock_on_primary_head; /* keep dock on primary head */
/* Appearance options */
char new_style; /* Use newstyle buttons */
+19 -3
View File
@@ -154,6 +154,7 @@ static WDECallbackUpdate setModifierKeyLabels;
static WDECallbackConvert getCursor;
static WDECallbackUpdate setCursor;
static WDECallbackUpdate updateDock ;
/*
* Tables to convert strings to enumeration values.
@@ -521,6 +522,9 @@ WDefaultEntry optionList[] = {
&wPreferences.minipreview_size, getInt, NULL, NULL, NULL},
{"IgnoreGtkHints", "NO", NULL,
&wPreferences.ignore_gtk_decoration_hints, getBool, NULL, NULL, NULL},
{"KeepDockOnPrimaryHead", "NO", NULL,
&wPreferences.keep_dock_on_primary_head, getBool, updateDock,
NULL, NULL},
/* style options */
@@ -866,7 +870,7 @@ static WMPropList *readGlobalDomain(const char *domainName, Bool requireDictiona
char path[PATH_MAX];
struct stat stbuf;
snprintf(path, sizeof(path), "%s/%s", DEFSDATADIR, domainName);
snprintf(path, sizeof(path), "%s/%s", PKGCONFDIR, domainName);
if (stat(path, &stbuf) >= 0) {
globalDict = WMReadPropListFromFile(path);
if (globalDict && requireDictionary && !WMIsPLDictionary(globalDict)) {
@@ -916,7 +920,7 @@ void wDefaultsMergeGlobalMenus(WDDomain * menuDomain)
return;
#ifdef GLOBAL_PREAMBLE_MENU_FILE
submenu = WMReadPropListFromFile(DEFSDATADIR "/" GLOBAL_PREAMBLE_MENU_FILE);
submenu = WMReadPropListFromFile(PKGCONFDIR "/" GLOBAL_PREAMBLE_MENU_FILE);
if (submenu && !WMIsPLArray(submenu)) {
wwarning(_("invalid global menu file %s"), GLOBAL_PREAMBLE_MENU_FILE);
@@ -930,7 +934,7 @@ void wDefaultsMergeGlobalMenus(WDDomain * menuDomain)
#endif
#ifdef GLOBAL_EPILOGUE_MENU_FILE
submenu = WMReadPropListFromFile(DEFSDATADIR "/" GLOBAL_EPILOGUE_MENU_FILE);
submenu = WMReadPropListFromFile(PKGCONFDIR "/" GLOBAL_EPILOGUE_MENU_FILE);
if (submenu && !WMIsPLArray(submenu)) {
wwarning(_("invalid global menu file %s"), GLOBAL_EPILOGUE_MENU_FILE);
@@ -3483,3 +3487,15 @@ static int setCursor(WScreen * scr, WDefaultEntry * entry, void *tdata, void *ex
return 0;
}
static int updateDock(WScreen * scr, WDefaultEntry * entry,
void *tdata, void *extra_data) {
(void) entry;
(void) tdata;
(void) extra_data;
if (scr->dock)
wDockSwap(scr->dock);
return 0;
}
Regular → Executable
+101 -14
View File
@@ -36,6 +36,8 @@
#include <dirent.h>
#include <limits.h>
#include <errno.h>
#include <time.h>
#include <sys/utsname.h>
#ifdef HAVE_MALLOC_H
#include <malloc.h>
@@ -182,8 +184,12 @@ static char *HistoryFileName(const char *name)
{
char *filename = NULL;
filename = wstrdup(wusergnusteppath());
filename = wstrappend(filename, "/.AppInfo/WindowMaker/History");
filename = getenv("XDG_STATE_HOME");
if (filename)
filename = wstrappend(wexpandpath(filename), "/" PACKAGE_TARNAME "/History");
else
filename = wstrconcat(wusergnusteppath(), "/.AppInfo/" PACKAGE_TARNAME "/History");
if (name && strlen(name)) {
filename = wstrappend(filename, ".");
filename = wstrappend(filename, name);
@@ -1149,7 +1155,7 @@ typedef struct {
#define COPYRIGHT_TEXT \
"Copyright \xc2\xa9 1997-2006 Alfredo K. Kojima\n"\
"Copyright \xc2\xa9 1998-2006 Dan Pascu\n"\
"Copyright \xc2\xa9 2013-2020 Window Maker Developers Team"
"Copyright \xc2\xa9 2013-%hu Window Maker Developers Team"
static InfoPanel *infoPanel = NULL;
@@ -1167,6 +1173,57 @@ static void destroyInfoPanel(WCoreWindow *foo, void *data, XEvent *event)
infoPanel = NULL;
}
char *getPrettyOSName(void)
{
char line[200];
char *token;
char *posn = NULL;
const char s[2] = "=";
FILE *fp;
fp = fopen("/etc/os-release", "r");
if (!fp) {
fp = fopen("/usr/lib/os-release", "r");
if (!fp) {
wwarning(_("no os-release file on the system"));
return NULL;
}
}
while (fgets(line, sizeof(line), fp) != NULL) {
if (strncmp(line, "PRETTY_NAME", strlen("PRETTY_NAME")) == 0) {
line[strcspn(line, "\r\n")] = 0;
token = strtok(line, s);
if (token) {
//get straight to the second part of the line
token = strtok(NULL, s);
if (token) {
//removing potential quotes
char *dst = token;
char *src = token;
char c;
while ((c = *src++) != '\0') {
if (c == '\\') {
*dst++ = c;
if ((c = *src++) == '\0')
break;
*dst++ = c;
} else if (c != '"' && c != '\'')
*dst++ = c;
}
*dst = '\0';
posn = wmalloc(strlen(token) + 1);
strcpy(posn, token);
}
}
break;
}
}
fclose(fp);
return posn;
}
void wShowInfoPanel(WScreen *scr)
{
InfoPanel *panel;
@@ -1190,6 +1247,17 @@ void wShowInfoPanel(WScreen *scr)
};
int wmScaleWidth, wmScaleHeight;
int pwidth, pheight;
int current_year = 2020;
time_t s;
struct tm *current_time;
struct utsname uts;
s = time(NULL);
if (s) {
current_time = localtime(&s);
if (current_time->tm_year > (current_year - 1900))
current_year = current_time->tm_year + 1900;
}
if (infoPanel) {
if (infoPanel->scr == scr) {
@@ -1205,8 +1273,12 @@ void wShowInfoPanel(WScreen *scr)
panel->win = WMCreateWindow(scr->wmscreen, "info");
WMGetScaleBaseFromSystemFont(scr->wmscreen, &wmScaleWidth, &wmScaleHeight);
#if defined(HAVE_MALLOC_H) && defined(HAVE_MALLINFO2) && defined(DEBUG)
pwidth = WMScaleX(412);
#else
pwidth = WMScaleX(382);
pheight = WMScaleY(250);
#endif
pheight = WMScaleY(270);
WMResizeWidget(panel->win, pwidth, pheight);
logo = WMCreateApplicationIconBlendedPixmap(scr->wmscreen, (RColor *) NULL);
@@ -1270,9 +1342,11 @@ void wShowInfoPanel(WScreen *scr)
panel->copyrL = WMCreateLabel(panel->win);
WMResizeWidget(panel->copyrL, WMScaleX(360), WMScaleY(60));
WMMoveWidget(panel->copyrL, WMScaleX(15), WMScaleY(190));
WMMoveWidget(panel->copyrL, WMScaleX(15), WMScaleY(210));
WMSetLabelTextAlignment(panel->copyrL, WALeft);
WMSetLabelText(panel->copyrL, COPYRIGHT_TEXT);
snprintf(buffer, sizeof(buffer), COPYRIGHT_TEXT, current_year);
WMSetLabelText(panel->copyrL, buffer);
font = WMSystemFontOfSize(scr->wmscreen, WMScaleY(11));
if (font) {
WMSetLabelFont(panel->copyrL, font);
@@ -1281,9 +1355,19 @@ void wShowInfoPanel(WScreen *scr)
}
strbuf = NULL;
if (uname(&uts) != -1) {
char *posn = getPrettyOSName();
if (posn) {
snprintf(buffer, sizeof(buffer), _("Running on: %s (%s)\n"), posn, uts.machine);
free(posn);
}
else
snprintf(buffer, sizeof(buffer), _("Running on: %s (%s)\n"), uts.sysname, uts.machine);
strbuf = wstrappend(strbuf, buffer);
}
snprintf(buffer, sizeof(buffer), _("Using visual 0x%x: %s %ibpp "),
(unsigned)scr->w_visual->visualid, visuals[scr->w_visual->class], scr->w_depth);
strbuf = wstrappend(strbuf, buffer);
switch (scr->w_depth) {
@@ -1303,14 +1387,14 @@ void wShowInfoPanel(WScreen *scr)
break;
}
#if defined(HAVE_MALLOC_H) && defined(HAVE_MALLINFO)
#if defined(HAVE_MALLOC_H) && defined(HAVE_MALLINFO2)
{
struct mallinfo ma = mallinfo();
struct mallinfo2 ma = mallinfo2();
snprintf(buffer, sizeof(buffer),
#ifdef DEBUG
_("Total memory allocated: %i kB (in use: %i kB, %d free chunks).\n"),
_("Total memory allocated: %lu kB (in use: %lu kB, %lu free chunks)\n"),
#else
_("Total memory allocated: %i kB (in use: %i kB).\n"),
_("Total memory allocated: %lu kB (in use: %lu kB)\n"),
#endif
(ma.arena + ma.hblkhd) / 1024,
(ma.uordblks + ma.hblkhd) / 1024
@@ -1361,7 +1445,7 @@ void wShowInfoPanel(WScreen *scr)
strbuf = wstrappend(strbuf, _("Xinerama: "));
{
char tmp[128];
snprintf(tmp, sizeof(tmp) - 1, _("%d head(s) found."), scr->xine_info.count);
snprintf(tmp, sizeof(tmp) - 1, _("%d head(s) found"), scr->xine_info.count);
strbuf = wstrappend(strbuf, tmp);
}
#endif
@@ -1373,11 +1457,14 @@ void wShowInfoPanel(WScreen *scr)
strbuf = wstrappend(strbuf, _("supported"));
else
strbuf = wstrappend(strbuf, _("unsupported"));
strbuf = wstrappend(strbuf, ".");
#endif
panel->infoL = WMCreateLabel(panel->win);
WMResizeWidget(panel->infoL, WMScaleX(350), WMScaleY(80));
#if defined(HAVE_MALLOC_H) && defined(HAVE_MALLINFO2) && defined(DEBUG)
WMResizeWidget(panel->infoL, WMScaleX(380), WMScaleY(100));
#else
WMResizeWidget(panel->infoL, WMScaleX(350), WMScaleY(100));
#endif
WMMoveWidget(panel->infoL, WMScaleX(15), WMScaleY(115));
WMSetLabelText(panel->infoL, strbuf);
font = WMSystemFontOfSize(scr->wmscreen, WMScaleY(11));
+1
View File
@@ -22,6 +22,7 @@
#ifndef WMDIALOG_H_
#define WMDIALOG_H_
#include "screen.h"
enum {
WMAbort=0,
+43 -13
View File
@@ -814,6 +814,29 @@ static void unhideHereCallback(WMenu *menu, WMenuEntry *entry)
wUnhideApplication(wapp, False, True);
}
static int getDockXPosition(WScreen *scr, Bool on_right_side)
{
int x;
if (wPreferences.keep_dock_on_primary_head) {
WMRect rect;
rect = wGetRectForHead(scr, scr->xine_info.primary_head);
x = rect.pos.x;
if (on_right_side)
x += rect.size.width - ICON_SIZE - DOCK_EXTRA_SPACE;
else
x += DOCK_EXTRA_SPACE;
} else {
if (on_right_side)
x = scr->scr_width - ICON_SIZE - DOCK_EXTRA_SPACE;
else
x = DOCK_EXTRA_SPACE;
}
return x;
}
/* Name is only used when type == WM_DRAWER and when restoring a specific
* drawer, with a specific name. When creating a drawer, leave name to NULL
* and mainIconCreate will find the first unused unique name */
@@ -836,7 +859,7 @@ static WAppIcon *mainIconCreate(WScreen *scr, int type, const char *name)
btn = wAppIconCreateForDock(scr, NULL, "Logo", "WMDock", TILE_NORMAL);
if (wPreferences.flags.clip_merged_in_dock)
btn->icon->core->descriptor.handle_expose = clipIconExpose;
x_pos = scr->scr_width - ICON_SIZE - DOCK_EXTRA_SPACE;
x_pos = getDockXPosition(scr, True);
break;
case WM_DRAWER:
if (name == NULL)
@@ -1545,7 +1568,7 @@ static WMPropList *dockSaveState(WDock *dock)
WMPutInPLDictionary(dock_state, key, list);
WMReleasePropList(key);
snprintf(buffer, sizeof(buffer), "%i,%i", (dock->on_right_side ? -ICON_SIZE : 0), dock->y_pos);
snprintf(buffer, sizeof(buffer), "%i,%i", dock->x_pos, dock->y_pos);
value = WMCreatePLString(buffer);
WMPutInPLDictionary(dock_state, dPosition, value);
WMReleasePropList(value);
@@ -1823,11 +1846,17 @@ WDock *wDockRestoreState(WScreen *scr, WMPropList *dock_state, int type)
dock->x_pos = scr->scr_width - ICON_SIZE;
}
} else {
if (dock->x_pos >= 0) {
dock->x_pos = DOCK_EXTRA_SPACE;
int left, right, midpoint;
left = getDockXPosition(scr, False);
right = getDockXPosition(scr, True);
midpoint = (left + right) / 2;
if (dock->x_pos < midpoint) {
dock->x_pos = left;
dock->on_right_side = 0;
} else {
dock->x_pos = scr->scr_width - DOCK_EXTRA_SPACE - ICON_SIZE;
dock->x_pos = right;
dock->on_right_side = 1;
}
}
@@ -3003,18 +3032,16 @@ static void moveDock(WDock *dock, int new_x, int new_y)
}
}
static void swapDock(WDock *dock)
void wDockSwap(WDock *dock)
{
WScreen *scr = dock->screen_ptr;
WAppIcon *btn;
int x, i;
if (dock->on_right_side)
x = dock->x_pos = scr->scr_width - ICON_SIZE - DOCK_EXTRA_SPACE;
else
x = dock->x_pos = DOCK_EXTRA_SPACE;
x = getDockXPosition(scr, dock->on_right_side);
swapDrawers(scr, x);
dock->x_pos = x;
for (i = 0; i < dock->max_icons; i++) {
btn = dock->icon_array[i];
@@ -3595,7 +3622,10 @@ static void openDockMenu(WDock *dock, WAppIcon *aicon, XEvent *event)
x_pos = scr->scr_width - dock->menu->frame->core->width - 4;
}
} else {
x_pos = dock->on_right_side ? scr->scr_width - dock->menu->frame->core->width - 3 : 0;
x_pos = dock->x_pos;
if (dock->on_right_side)
x_pos += ICON_SIZE + DOCK_EXTRA_SPACE
- dock->menu->frame->core->width - 3;
}
wMenuMapAt(dock->menu, x_pos, event->xbutton.y_root + 2, False);
@@ -3751,7 +3781,7 @@ static void handleDockMove(WDock *dock, WAppIcon *aicon, XEvent *event)
if (now_on_right != dock->on_right_side)
{
dock->on_right_side = now_on_right;
swapDock(dock);
wDockSwap(dock);
wArrangeIcons(scr, False);
}
// Also perform the vertical move
@@ -4580,7 +4610,7 @@ static void swapDrawer(WDock *drawer, int new_x)
{
int i;
drawer->on_right_side = !drawer->on_right_side;
drawer->on_right_side = drawer->screen_ptr->dock->on_right_side;
drawer->x_pos = new_x;
for (i = 0; i < drawer->max_icons; i++) {
+1
View File
@@ -91,6 +91,7 @@ void wDockTrackWindowLaunch(WDock *dock, Window window);
WAppIcon *wDockFindIconForWindow(WDock *dock, Window window);
void wDockDoAutoLaunch(WDock *dock, int workspace);
void wDockLaunchWithState(WAppIcon *btn, WSavedState *state);
void wDockSwap(WDock *dock);
#ifdef USE_DOCK_XDND
int wDockReceiveDNDDrop(WScreen *scr, XEvent *event);
+3 -3
View File
@@ -1003,7 +1003,7 @@ void wFrameWindowPaint(WFrameWindow * fwin)
int titlelen;
int allButtons = 1;
if (!wPreferences.new_style == TS_NEW) {
if (wPreferences.new_style != TS_NEW) {
if (fwin->left_button && !fwin->flags.hide_left_button && !fwin->flags.lbutton_dont_fit)
lofs += fwin->left_button->width + 3;
else
@@ -1266,7 +1266,7 @@ static void checkTitleSize(WFrameWindow * fwin)
width = fwin->titlebar->width - 6 - 6;
}
if (!wPreferences.new_style == TS_NEW) {
if (wPreferences.new_style != TS_NEW) {
if (fwin->left_button && !fwin->flags.hide_left_button && !fwin->flags.lbutton_dont_fit)
width -= fwin->left_button->width + 3;
@@ -1352,7 +1352,7 @@ static void paintButton(WCoreWindow * button, WTexture * texture, unsigned long
x = (button->width - width) / 2 + d;
y = (button->height - image->height) / 2 + d;
XSetClipOrigin(dpy, copy_gc, x - left, y);
if (!wPreferences.new_style == TS_NEW) {
if (wPreferences.new_style != TS_NEW) {
XSetForeground(dpy, copy_gc, scr->black_pixel);
if (!pushed) {
if (image->depth == 1)
+6 -9
View File
@@ -51,7 +51,7 @@
/**** Global varianebles ****/
#define MOD_MASK wPreferences.modifier_mask
#define CACHE_ICON_PATH "/Library/WindowMaker/CachedPixmaps"
#define CACHE_ICON_PATH "/" PACKAGE_TARNAME "/CachedPixmaps"
#define ICON_BORDER 3
static void miniwindowExpose(WObjDescriptor *desc, XEvent *event);
@@ -422,19 +422,17 @@ static char *get_icon_cache_path(void)
{
const char *prefix;
char *path;
int len, ret;
int ret;
prefix = wusergnusteppath();
len = strlen(prefix) + strlen(CACHE_ICON_PATH) + 2;
path = wmalloc(len);
snprintf(path, len, "%s%s/", prefix, CACHE_ICON_PATH);
prefix = wuserdatapath();
path = wstrconcat(prefix, CACHE_ICON_PATH "/");
/* If the folder exists, exit */
if (access(path, F_OK) == 0)
return path;
/* Create the folder */
ret = wmkdirhier((const char *) path);
ret = wmkdirhier(path);
/* Exit 1 on success, 0 on failure */
if (ret == 1)
@@ -518,9 +516,8 @@ char *wIconStore(WIcon *icon)
}
if (!RSaveImage(image, path, "XPM")) {
wfree(path);
wfree(filename);
path = NULL;
filename = NULL;
}
wfree(path);
+4 -4
View File
@@ -488,7 +488,7 @@ static void inotifyWatchConfig(void)
" Changes to the defaults database will require"
" a restart to take effect. Check your kernel!"));
} else {
watchPath = wstrconcat(wusergnusteppath(), "/Defaults");
watchPath = wdefaultspathfordomain("");
/* Add the watch; really we are only looking for modify events
* but we might want more in the future so check all events for now.
* The individual events are checked for in event.c.
@@ -510,7 +510,7 @@ static void execInitScript(void)
{
char *file, *paths;
paths = wstrconcat(wusergnusteppath(), "/Library/WindowMaker");
paths = wstrconcat(wuserdatapath(), "/" PACKAGE_TARNAME);
paths = wstrappend(paths, ":" DEF_CONFIG_PATHS);
file = wfindfile(paths, DEF_INIT_SCRIPT);
@@ -528,7 +528,7 @@ void ExecExitScript(void)
{
char *file, *paths;
paths = wstrconcat(wusergnusteppath(), "/Library/WindowMaker");
paths = wstrconcat(wuserdatapath(), "/" PACKAGE_TARNAME);
paths = wstrappend(paths, ":" DEF_CONFIG_PATHS);
file = wfindfile(paths, DEF_EXIT_SCRIPT);
@@ -658,7 +658,7 @@ static int real_main(int argc, char **argv)
printf("Window Maker %s\n", VERSION);
exit(0);
} else if (strcmp(argv[i], "--global_defaults_path") == 0) {
printf("%s\n", DEFSDATADIR);
printf("%s\n", PKGCONFDIR);
exit(0);
} else if (strcmp(argv[i], "-locale") == 0 || strcmp(argv[i], "--locale") == 0) {
i++;
+2 -2
View File
@@ -1764,7 +1764,7 @@ static void menuMouseDown(WObjDescriptor * desc, XEvent * event)
goto byebye;
}
entry_no = getEntryAt(menu, x, y);
if (entry_no >= 0) {
if ((entry_no >= 0) && (entry_no < menu->entry_no)) {
entry = menu->entries[entry_no];
if (!close_on_exit && (bev->state & ControlMask) && smenu && entry->flags.editable) {
@@ -1940,7 +1940,7 @@ static void menuMouseDown(WObjDescriptor * desc, XEvent * event)
if (!delayed_select) {
entry_no = getEntryAt(menu, x, y);
if (entry_no >= 0) {
if ((entry_no >= 0) && (entry_no < menu->entry_no)) {
entry = menu->entries[entry_no];
if (entry->flags.enabled && entry->cascade >= 0 && menu->cascades) {
WMenu *submenu = menu->cascades[entry->cascade];
+1 -1
View File
@@ -1017,7 +1017,7 @@ Bool UpdateDomainFile(WDDomain * domain)
dict = domain->dictionary;
if (WMIsPLDictionary(domain->dictionary)) {
/* retrieve global system dictionary */
snprintf(path, sizeof(path), "%s/%s", DEFSDATADIR, domain->domain_name);
snprintf(path, sizeof(path), "%s/%s", PKGCONFDIR, domain->domain_name);
if (stat(path, &stbuf) >= 0) {
shared_dict = WMReadPropListFromFile(path);
if (shared_dict) {
+31 -12
View File
@@ -1199,46 +1199,65 @@ updateWindowPosition(WWindow * wwin, MoveData * data, Bool doResistance,
static void draw_snap_frame(WWindow *wwin, int direction)
{
WScreen *scr;
int head, x, y;
unsigned int width, height;
WMRect rect;
scr = wwin->screen_ptr;
head = wGetHeadForWindow(wwin);
rect = wGetRectForHead(scr, head);
x = rect.pos.x;
y = rect.pos.y;
width = rect.size.width;
height = rect.size.height;
switch (direction) {
case SNAP_LEFT:
drawTransparentFrame(wwin, 0, 0, scr->scr_width/2, scr->scr_height);
width /= 2;
break;
case SNAP_RIGHT:
drawTransparentFrame(wwin, scr->scr_width/2, 0, scr->scr_width/2, scr->scr_height);
width /= 2;
x += width;
break;
case SNAP_TOP:
if (wPreferences.snap_to_top_maximizes_fullscreen)
drawTransparentFrame(wwin, 0, 0, scr->scr_width, scr->scr_height);
else
drawTransparentFrame(wwin, 0, 0, scr->scr_width, scr->scr_height/2);
if (!wPreferences.snap_to_top_maximizes_fullscreen)
height /= 2;
break;
case SNAP_BOTTOM:
drawTransparentFrame(wwin, 0, scr->scr_height/2, scr->scr_width, scr->scr_height/2);
height /= 2;
y += height;
break;
case SNAP_TOPLEFT:
drawTransparentFrame(wwin, 0, 0, scr->scr_width/2, scr->scr_height/2);
width /= 2;
height /= 2;
break;
case SNAP_TOPRIGHT:
drawTransparentFrame(wwin, scr->scr_width/2, 0, scr->scr_width/2, scr->scr_height/2);
width /= 2;
height /= 2;
x += width;
break;
case SNAP_BOTTOMLEFT:
drawTransparentFrame(wwin, 0, scr->scr_height/2, scr->scr_width/2, scr->scr_height/2);
width /= 2;
height /= 2;
y += height;
break;
case SNAP_BOTTOMRIGHT:
drawTransparentFrame(wwin, scr->scr_width/2, scr->scr_height/2,
scr->scr_width/2, scr->scr_height/2);
width /= 2;
height /= 2;
x += width;
y += height;
break;
}
drawTransparentFrame(wwin, x, y, width, height);
}
static int get_snap_direction(WScreen *scr, int x, int y)
+6 -2
View File
@@ -186,7 +186,7 @@ static void exitCommand(WMenu * menu, WMenuEntry * entry)
oldSaveSessionFlag = wPreferences.save_session_on_exit;
r = wExitDialog(menu->frame->screen_ptr, _("Exit"),
_("Exit window manager?"), _("Exit"), _("Cancel"), NULL);
_("Are you sure you want to quit Window Maker?"), _("Exit"), _("Cancel"), NULL);
if (r == WAPRDefault) {
result = R_EXIT;
@@ -673,9 +673,13 @@ static void constructMenu(WMenu * menu, WMenuEntry * entry)
tmp = wexpandpath(path[i]);
if (strstr(tmp, "#usergnusteppath#") == tmp)
if (strstr(tmp, "#usergnusteppath#") == tmp) {
char *old_tmp = tmp;
tmp = wstrconcat(wusergnusteppath(),
tmp + 17);
wfree(old_tmp);
}
wfree(path[i]);
lpath = getLocalizedMenuFile(tmp);
+32 -10
View File
@@ -313,14 +313,34 @@ static void allocButtonPixmaps(WScreen * scr)
scr->b_pixmaps[WBUT_KILL] = pix;
}
static int get_dot_mult(void)
{
int dot_mult;
/*
* Since it's an int, the multiplier will grow only when
* a certain icon size is reached (1 for 64, 2 for 128,
* 3 for 192, and so on).
*/
dot_mult = wPreferences.icon_size / 64;
if (dot_mult < 1)
dot_mult = 1;
return dot_mult;
}
static void draw_dot(WScreen * scr, Drawable d, int x, int y, GC gc)
{
int dot_mult;
dot_mult = get_dot_mult();
XSetForeground(dpy, gc, scr->black_pixel);
XDrawLine(dpy, d, gc, x, y, x + 1, y);
XDrawPoint(dpy, d, gc, x, y + 1);
XFillRectangle(dpy, d, gc, x, y, x + (2 * dot_mult), y + (1 * dot_mult));
XFillRectangle(dpy, d, gc, x, y + (1 * dot_mult), x + (1 * dot_mult), y + (2 * dot_mult));
XSetForeground(dpy, gc, scr->white_pixel);
XDrawLine(dpy, d, gc, x + 2, y, x + 2, y + 1);
XDrawPoint(dpy, d, gc, x + 1, y + 1);
XFillRectangle(dpy, d, gc, x + (2 * dot_mult), y, x + (3 * dot_mult), y + (2 * dot_mult));
XFillRectangle(dpy, d, gc, x + (1 * dot_mult), y + (1 * dot_mult), x + (2 * dot_mult), y + (2 * dot_mult));
}
static WPixmap *make3Dots(WScreen * scr)
@@ -329,15 +349,17 @@ static WPixmap *make3Dots(WScreen * scr)
GC gc2, gc;
XGCValues gcv;
Pixmap pix, mask;
int dot_mult;
dot_mult = get_dot_mult();
gc = scr->copy_gc;
pix = XCreatePixmap(dpy, scr->w_win, wPreferences.icon_size, wPreferences.icon_size, scr->w_depth);
XSetForeground(dpy, gc, scr->black_pixel);
XFillRectangle(dpy, pix, gc, 0, 0, wPreferences.icon_size, wPreferences.icon_size);
XSetForeground(dpy, gc, scr->white_pixel);
draw_dot(scr, pix, 4, wPreferences.icon_size - 6, gc);
draw_dot(scr, pix, 9, wPreferences.icon_size - 6, gc);
draw_dot(scr, pix, 14, wPreferences.icon_size - 6, gc);
draw_dot(scr, pix, 4 * dot_mult, wPreferences.icon_size - (6 * dot_mult), gc);
draw_dot(scr, pix, 9 * dot_mult, wPreferences.icon_size - (6 * dot_mult), gc);
draw_dot(scr, pix, 14 * dot_mult, wPreferences.icon_size - (6 * dot_mult), gc);
mask = XCreatePixmap(dpy, scr->w_win, wPreferences.icon_size, wPreferences.icon_size, 1);
gcv.foreground = 0;
@@ -345,9 +367,9 @@ static WPixmap *make3Dots(WScreen * scr)
gc2 = XCreateGC(dpy, mask, GCForeground | GCGraphicsExposures, &gcv);
XFillRectangle(dpy, mask, gc2, 0, 0, wPreferences.icon_size, wPreferences.icon_size);
XSetForeground(dpy, gc2, 1);
XFillRectangle(dpy, mask, gc2, 4, wPreferences.icon_size - 6, 3, 2);
XFillRectangle(dpy, mask, gc2, 9, wPreferences.icon_size - 6, 3, 2);
XFillRectangle(dpy, mask, gc2, 14, wPreferences.icon_size - 6, 3, 2);
XFillRectangle(dpy, mask, gc2, 4 * dot_mult, wPreferences.icon_size - (6 * dot_mult), 3 * dot_mult, 2 * dot_mult);
XFillRectangle(dpy, mask, gc2, 9 * dot_mult, wPreferences.icon_size - (6 * dot_mult), 3 * dot_mult, 2 * dot_mult);
XFillRectangle(dpy, mask, gc2, 14 * dot_mult, wPreferences.icon_size - (6 * dot_mult), 3 * dot_mult, 2 * dot_mult);
XFreeGC(dpy, gc2);
+9 -6
View File
@@ -61,6 +61,7 @@ struct SwitchPanel {
WMFont *font;
WMColor *white;
WMColor *gray;
};
/* these values will be updated whenever the switch panel
@@ -154,11 +155,9 @@ static void changeImage(WSwitchPanel *panel, int idecks, int selected, Bool dim,
border_space + pos.y, back->width, back->height, 0, 0);
} else {
RColor color;
WMScreen *wscr = WMWidgetScreen(icon);
color.red = 255;
color.red = WMRedComponentOfColor(WMGrayColor(wscr)) >> 8;
color.green = WMGreenComponentOfColor(WMGrayColor(wscr)) >> 8;
color.blue = WMBlueComponentOfColor(WMGrayColor(wscr)) >> 8;
color.red = WMRedComponentOfColor(panel->gray) >> 8;
color.green = WMGreenComponentOfColor(panel->gray) >> 8;
color.blue = WMBlueComponentOfColor(panel->gray) >> 8;
RFillImage(back, &color);
}
@@ -399,7 +398,7 @@ WSwitchPanel *wInitSwitchPanel(WScreen *scr, WWindow *curwin, Bool class_only)
WMGetScaleBaseFromSystemFont(scr->wmscreen, &wmScaleWidth, &wmScaleHeight);
icon_size = wPreferences.switch_panel_icon_size;
icon_tile_size = (short int)(((float)icon_size * (float)1.2) + 0.5);
icon_tile_size = (short int)(((float)icon_size * 1.2F) + 0.5F);
border_space = WMScaleY(10);
label_height = WMScaleY(25);
@@ -454,6 +453,7 @@ WSwitchPanel *wInitSwitchPanel(WScreen *scr, WWindow *curwin, Bool class_only)
}
panel->white = WMWhiteColor(scr->wmscreen);
panel->gray = WMGrayColor(scr->wmscreen);
panel->font = WMBoldSystemFontOfSize(scr->wmscreen, WMScaleY(12));
panel->icons = WMCreateArray(count);
panel->images = WMCreateArray(count);
@@ -589,6 +589,9 @@ void wSwitchPanelDestroy(WSwitchPanel *panel)
if (panel->white)
WMReleaseColor(panel->white);
if (panel->gray)
WMReleaseColor(panel->gray);
wfree(panel);
}
-1
View File
@@ -122,7 +122,6 @@
/* name of the script to execute at startup */
#define DEF_INIT_SCRIPT "autostart"
#define DEF_EXIT_SCRIPT "exitscript"
#define DEFAULTS_DIR "Defaults"
#ifdef USE_TIFF
#define DEF_BUTTON_IMAGES PKGDATADIR"/buttons.tiff"

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