Recently added/changed msgid's were translated, plus a few
improvements. Kept some entries for last stable release. Removed
abbreviated forms from menu comment.
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
The original code assumed that the sizeof returns a long int type, which is
true on 64 bits platform but not on 32 bits platforms, as pointed by gcc.
The new code does an explicit conversions to 'int' (which should be enough
for that case) so the format specifier in printf will always be ok,
whatever platform Window Maker is compiled for.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As reported by Martin Dietze, when switching workspace (mainly with
keyboard shortcut) while the focus was set on a sticky note from the
GNUstep application "Affiche.app" would cause Window Maker to crash.
This crash was due to the application creating its menu with an Omnipresent
state; Window Maker tried to be smart by smartly setting the focus to this
window after the workspace change, unfortunately when removing the window
of the note from the screen the application would decide to remove also the
omnipresent menu (because it is not necessary anymore).
Because we kept a pointer to an outdated WWindow, we would silently corrupt
memory, which would later cause a crash in an unrelated place (fortunately
in this case it happened quite soon).
This patch adds a check to make sure the window we want to focus is still
a valid one, and if it is not we just ignore it to fall back on another
mechanism already in place for picking the window to focus.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
There are some risks associated with the way arguments are used in macros,
and using a function also allows check on the type of arguments and leaves
more room to the compiler for making the best optimisation choice; it also
allows writing easier to read code (and thus, to maintain).
As a side effect, this should also help Coverity in avoiding false positive
bug reports (like #109605 and #109607).
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As pointed by Coverity, the variable 'path_dst' was first free'd, then it
was used in the 'unlink' function.
This patch fixes the call order to de-allocate the string only when it is
no more needed.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As reported by Coverity, the function 'customSetPalette' is making a call
to 'WMGetPopUpButtonSelectedItem', but this function does nothing to the
widget but only return a value, which is not used at all, so this patch
removes the call to the function.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As pointed by Coverity, the pointer in wwin->frame have already been
dereferenced many times in the function, so it is useless to include a
check later; removing it makes the code smaller thus easier to maintain.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As pointed by Coverity, there was a memory leak because the buffer used to
create the wmsetbg command is allocated twice.
Because it is not really necessary to call 'wmalloc' for such a small case
(it is not efficient and participates to memory fragmentation), this patch
replaces the dynamic memory allocation by a buffer on the stack, which also
solves to de-allocation issue.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As pointed by Coverity, there is a safety check on the number of workspace
which aborts the function, but the storage memory have already been
allocated so it would leak this buffer.
The case where the number of workspace is 0 is probably not supposed to
happen (there should always be at least 1 workspace, the current one), but
it is better to keep safety checks, so this patch is moving the check at
the beginning so no leak will occur.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As pointed by Coverity, when increasing the size of the array allocated to
store the pointers to menus in a cascaded menu, the incorrect value was
used in argument to the sizeof which lead to over-allocating memory.
This patch replaces the name of the structure (which should have been the
pointer type) by the variable actually being used, fixing the size issue
and making maintainability easier by tracking the type of the variable
which is less prone to bugs in case of change.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As pointed by Coverity, a temporary proplist is created with the list of
keys to be removed from the source proplist, but this temporary proplist
was not released at the end, leaking memory.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As pointed by Coverity, in the "Configuration" panel of WPrefs there are
some images loaded, but if the images cannot be loaded correctly then the
returned NULL pointer can crash the application as it is dereferenced in
further function calls.
To solve this case, this patch is adding a NULL pointer check in the
functions RScaleImage (wrlib) and WMCreatePixmapFromRImage (WINGs), so both
can accept that NULL pointer to also return NULL, which means the existing
check for "icon == NULL" in the WPrefs code will be useful.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As reported by Coverity, the return value for XGetWindowAttributes is
usually checked in many places, because it is a good practice to ensure
that it did work, but it was not checked when called in the function
'wClientCheckProperty'.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As reported by Douglas Torrance, the script that generates the plain text
documentation from the texinfo source would crash due to the cross-
references when the version of awk used is "mawk".
This is actually a known bug in mawk:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=172774
It looks like the bug have been fixed in mawk, but Debian is still
providing a broken version. To avoid problems, this patch is introducing a
workaround in the matching pattern that causes the issue every time it is
being used.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As pointed by Douglas Torrance, there are some case where the 2 docs
INSTALL-WMAKER and README.i18n are not re-generated properly, one of the
cases being if the user grabs the sources from Git to make a source package
only (ie, without compiling anything).
This patch adds a hook to "make dist" so it will re-generate the docs if
needed. Because the "dist-hook" is run after Automake has copied the files
to the temporary directory (distdir) then we also include an explicit copy
of the files there to have the latest version.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The usual way to define a macro in is to name macro with 'USE_xxx' when
they are used to enable a feature 'xxx'.
As the feature concerns the Dock and not DnD in general (WINGs support is
not disabled), make it a bit more clear in the macro name and document the
configure flag in the Installation Manual.
Took opportunity to compile the corresponding file only when the feature is
not disabled.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The old behaviour was to expect the user to go modify manually a source
file which is not a great idea because that's typically the kind of things
in charge of the configure script.
As a side effect, we can now use an automake conditional to avoid compiling
the source file in charge of the feature when not used, instead of trying
to compile an empty-looking file.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The usual way to define a macro in is to name macro with 'USE_xxx' when
they are used to enable a feature 'xxx'.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
There are a few rare cases where some options listed in the program's
built-in help page may not be documented for a valid reason. This patch
provides an option to the checking script to not complain about them, but:
- the listed options must include a comment about why, to ensure that the
user thinks twice about it and because it is better for maintainability;
- the listed option must be part of the options listed by the application
to ensure the command line invocation of the script will remain up to date.
This new option is then used for the check of the "configure" options
because for a few of them the right place to document them is in the
INSTALL file provided by Autoconf and not in our Window Maker specific doc.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As there are many options, they have been split into 5 sections; added
documentation for all the legacy Window Maker options that were missing and
for the new ones; added documentation for a few of the "autotools" standard
options that can be considered interesting.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
In order to ease the job of keeping the documentation aligned against the
sources, this patch adds a check of the list of options returned by
"configure --help" against the options that are listed in the
INSTALL-WMAKER file.
The check is ran as part of "make check", which also implies it will break
a "make distcheck" operation when not in line.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Setting LANG/LINGUAS to en_RN should not be a problem with the current
configure script, so don't mention it;
Removed the section about the "WindowMaker-extra" package, because this
things looks to be deprecated;
Removed the 2 errors related to configure, because as the Autotool versions
is now specified in the configure.ac this situation should not arise.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
- update the list of supported platforms according to current known status;
- updated URL links to all dependencies to the current known URL;
- moved the dependency on Autotools to a dedicated section, because it is
not supposed to be necessary for people compiling from the distributed
source archive, and updated the version according to current status;
- extended the chapter on getting the sources to contain all info that
could be needed;
- added a note about compiler requirement to ease understanding the actual
requirements;
- documented some long-time known dependancies (libbsd, inotify, boehm gc);
- fixed a few strings here and there;
- made an appropriate reference to the README.i18n for the troubleshooting
of NLS.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The source of the documentation is in Texinfo format to have the
possibility someday to distribute in more format that just plain text;
The INSTALL-WMAKER original file will now be generated automatically when
running the 'autogen.sh' script (for those who made a git-checkout) and
when running 'make' (for the people who create the distribution archive).
The current document have seen these changes:
- added all the texinfo header (including the copyright notice);
- texinfo formatting command in place everywhere applicable;
- re-ordering of the content to try to get a consistent document.
Apart from this, the document should not have seen any change on the
content, because this deserves dedicated patches to show the evolution.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The texinfo format provides 3 commands @ref, @xref and @pxref to make cross
references to existing @nodes in the document; it also provides a command
@anchor to place arbitrary targets for cross-reference.
Because these will be handy for the Installation Manual that already does
some references, this patch implements the 4 commands:
- change the '@node' command, that did nothing, to now track potential
reference points;
- add the '@anchor' command to register a new target for x-ref;
- implement the 3 '@*ref' commands with similar behaviour as the texinfo
format states, with support for all arguments, generating a temporary
"@x##@" pattern for the line target;
- generate a new file (*.xrf, a sed script) at the end with the
replacement for x-ref patterns with the correct line number, and perform
a few consistency checks;
- during the final search-and-replace used to insert the Table of Content,
include the x-ref replacement.
The current script has some limitations:
- because we cannot know in advance the target line number for the x-ref,
we insert it with a constant size of 5 characters to avoid breaking the
justification alignment when doing the replace;
- there is a strict order to respect between @node and @chapter/@section,
which is needed because we have to include a line offset to get it right
when using the order given in the texinfo manual.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The texinfo format provides a command '@table' which is useful to provide
a list of object (function, variables, options, ...) with their associated
description.
As this will be very handy for the Installation Manual, this patch
implements the command in the script.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The texinfo format provides a command to generate list of item which are
prefixed by an auto-incremented number or letter.
This command was not implemented but as it will be used by the Installation
Manual of Window Maker, this patch implements it, reusing much of the code
that was handling the unordered lists.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
There are some cases where it can be useful to embed a list of item into
another list; the script was almost ready to handle this case, this patch
brings the missing stuff to get it to work properly.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Because the tool's help page changes whether Xinerama support was compiled
or not, its man page have to reflect this, so instead of being simply
copied the file is processed with the 'replace-ac-keywords' script.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This patch perform simple fixes to the man pages and tool help page:
- minor style updates, to get cleaner pages
- option re-ordering, to have them in alphabetic order (easier to search for)
- consistency updates for descriptions and number of dash
- spell-checking
The biggest changes are:
- wmagnify: the option 'vdisplay' was not documented at all;
- getstyle: the list of attributes that are taken for the Style are now
described in their own section to clarify the page;
- setstyle: the help page left thinking that the file argument was
optional, which is not the case;
- wdread: as the Exit Code may be useful, and it is not unusable, it is
now documented;
- wmgenmenu: added information about how the content of the menu is
generated;
- wmsetbg: added a section about dithering/best-match because as nowadays
most screens are in True Color, the reason for the option may not be clear.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The program WPrefs and most of the programs in the util/ directory have a
man page, this patch adds the appropriate call to the checking script when
"make check" is used.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
All the man pages for our tools that interact with Window Maker are placed
in the "1x" section, but the "wdread" page was an exception for no known
reason.
For consistency, this patch renames the file to the same "1x" section.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Because the man page references some stuff that are dependant on the
configure options, it is a good idea to update the man page accordingly, so
the user will not be puzzled later.
There is now a script which takes care of replacing '@var@' in the same way
autoconf does, but also which can handle conditional '@def@' removal (for
the case of feature dependant command line options).
The man page for Window Maker is now processed this way so user will always
see accurate information.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
There were 2 options that were not documented at all, which are now listed
in the 'wmaker --help';
The man page have been updated according to the 'check-cmdline-opts' script
feedback, including:
- adding 2 options that were missing (global_def_path, no-drawer);
- removed 2 options that do not exist anymore (no-cpp, create-stdcmap);
- sorting the options, to make them easier to search for.
In addition, took opportunity to:
- remove the double description for 'visual-id';
- improve a number of descriptions to make them clearer;
- fix minor stuff (typo, spaces at end of lines).
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
In order to ease the job of keeping the documentations up to date, there is
a new script 'check-cmdline-options' that checks a program's options (with
the '--help' option) and compare them with its documentation (the manual
page) to make sure everything is aligned.
This is triggered with "make check" for wmaker.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This script should have been removed a long time ago, in favour of
pkg-config which has to be present anyway to compile Window Maker.
This patch makes the script print a warning about it, and now calls itself
pkg-config, instead of being generated; the man page was also updated
accordingly (and spell-checked).
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This script should have been removed a long time ago, in favour of
pkg-config which has to be present anyway to compile Window Maker.
This patch makes the script print a warning about it, and now calls itself
pkg-config, instead of being generated; the man page was also updated
accordingly (and spell-checked).
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This script should have been removed a long time ago, in favour of
pkg-config which has to be present anyway to compile Window Maker.
This patch makes the script print a warning about it, and now calls itself
pkg-config, instead of being generated; the man page was also updated
accordingly (and spell-checked).
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As reported by Juan Giordana, the autocomplete/history feature which is
available to Run dialogs brought up by the root menu is not available to Run
dialogs brought up by a keyboard shortcut. This patch enables this
behavior.
The command in 'autogen.sh' was using an invalid syntax to call the script,
so the file was not generated; this patch fixes the invocation.
The test in the makefile was not correct because it would not generate the
file if it was deleted; now the check works whether the file exists or not,
and properly skips generation if it is read-only (for make distcheck).
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This 'switch' control statement is actually a GNU extension, so it is not
portable to other awk implementations.
This patch replace them with the traditional 'if...else' sequence which
will work everywhere.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As reported by Doug Torrance, the 3rd argument to the 'match' function is
actually a GNU extension, so it breaks compatibility when run with another
version of awk, for instance mawk.
This script changes the code to stuck to the 2 arguments version which is
posix.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Apparently, automake does not like when there are multiple .PHONY
definitions and some of them are conditionals, it generates a warning:
Makefile.am:84: warning: .PHONY was already defined in condition USE_LCOV, which is included in condition TRUE ...
Makefile.am:58: ... '.PHONY' previously defined here
This is probably a false message, because in the end, conditional or not,
the result will not be significantly different, so this patch just moves
the .PHONY definition outside the conditional so Automake will not print
the warning.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
With the new target, it is now easy to update all translations in the
project for a language against latest code with the simple command, run
from the top directory:
make update-lang PO=<lang>
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Removed the information dispatched in the many po/README files and created
a more elaborate chapter in the README.i18n file to explain the process
involved to participate.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The support for variables in the text-from-texi script is used to
automatically insert the current version of Window Maker, inherited from
the definition in the AC_INIT command, so it will be always correctly
updated without the need for hand work.
Having this version information is recommended by GNU texinfo because if
the document happens to get distributed outside a package it can help user
avoid problems.
The second use is to define a variable 'emailsupport' which contains the
email address of the development team, so we can also inherit it from the
AC_INIT setting.
The third use is for a special variable 'cctexi2txt' to differentiate
between texi2any and our script, because when using texi2any the title
page is not generated, so we need to duplicate some information in the
source, but we do not want it to appear twice in our generated doc.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
When support for translated languages was enabled, the localisation files
were installed, but make uninstall did not take care to remove them. This
patch fixes this by properly removing them.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>