A number of files have been added to the Window Maker source tree but are not
included in the tarball produced by "make dist" because they have not been added
to EXTRA_DIST in the appropriate Makefile.am. They are:
- Dutch translation files (commit afc90)
- email-clients.txt (commit 385db)
- WPrefs source files removed from WPrefs_SOURCES (commit 21dfd)
This patch adds these missing files.
Currently, there is no WUtil.pc file so that WINGs developers can use
pkg-config to compile programs using the WINGs utility library. This patch
fixes this, and such a file is created by make, just like WINGs.pc and
wrlib.pc.
In addition, the WUtil.pc file has been added to .gitignore and included in
the debian libwings-dev package.
The original code would not provide correctly sized images in some cases
of ratios on the original image and on the requested size.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
WUtil's file misc.c was including the private header for WINGs, where it
should have been using WUtil's public header instead.
Took opportunity to include the appropriate copyright header.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This patch is used to add support for syslog messaging implemented in
WINGs lib directly, so available from the lib itself and wmaker too.
I believe it will in a first time help to get some logging info
centralized in one point, and in a second time maybe add some info
level messages like wmaker is starting, stopping, restarting and else.
For now, it's built by default when the syslog support is found, maybe
we could also disable it by default.
Because the existing nl locale files are ancient and obsolete,
the user interface stays mainly in English with hardly Dutch text
showing up.
This is a complete translation in 6 parts from scratch, using the
current (pl)menus and Makefile generated .pot files. These files
provide a very good, and thoroughly checked user interface in the
Dutch language.
Adding me as a maintainer in related README files; removing previous
maintainer (e-mail bounced).
Removing unnecessary executable bit from pt.po on the fly.
Although this is a modification of the public API, this patch does not
change the binary interface, and the attribute does not add a constraint
on the parameter for the caller so we do not break the source compatibility
either.
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>
In the present case, it just led to a compiler warning on unused variable
when the XShape extension is disabled, but in general case it just adds
complexity by duplicating things; this should be reserved for complex
cases.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As suggested by GCC, this function is a good candidate. There is a little
constraint on how to do it however, as it is part of the public API so we
have to do it in a portable fashion (We can't rely on our "config.h" when
the file will have been installed).
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Allocating memory with 'malloc' has a cost and participate to memory
fragmentation, so for a temporary buffer that has a fixed size let's
prefer allocating it on the stack.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The check on length of string before comparing is not necessary
because this will be checked as part of strcmp; the check won't
save time and may actually cost.
As the number of element in the array is not going to change during
the loop, took the call to 'WMGetArrayItemCount' outside the loop
to be faster (and ease compiler's optimisation work).
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The new macro 'wlengthof' from WUtil makes code easier to read than the
previous [sizeof() / sizeof([0]) ] construct.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The new macro 'wlengthof' returns the number of elements for which a local
array have been defined, which makes code easier to read than the
previous [sizeof() / sizeof([0]) ] construct.
The macro includes a static assertion to stop compilation if it is being
used on a pointer, for which we cannot know the size of the array, to
avoid generating dummy result. This can work only with C11 which
standardised the static assertions.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
In keeping with the spirit of free software, this patch removes several
Microsoft fonts (Trebuchet, Arial, and Verdana) from being the default fonts for
Window Maker and WINGs.
This patch has the added advantage of allowing users some control over the
appearance of WINGs widgets. Formerly, there was no way to control the font if
the Trebuchet MS font was installed. Now the WINGs font can be changed by
setting the sans-serif alias in fonts.conf.
There are a few function in WING's API that take parameter for consistency
reason and for possible future evolution, but actually do not need the
argument.
As they are case we know about, this patch adds the appropriate stuff to
tell the compiler we are ok with this to avoid a false report.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As callback have a fixed prototype, it is correct to not use all the
arguments, so this patch adds the appropriate stuff to avoid a false
report from compiler.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The WINGs toolkit dispatch events on widgets using callbacks, which means
having a fixed argument list for the handling function.
It is then correct to not use all the arguments, so this patch adds the
appropriate stuff to avoid a false report from compiler.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
When an error occurs in X, the Xlib is using a callback mechanism to
execute application code to handle the problem, which means having a
fixed argument list for that application function.
It is then correct to not use all the arguments, so this patch adds the
appropriate stuff to avoid a false report from compiler.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
WINGs dispatches window resize events using callback functions, which
means having a fixed argument list for that function.
It is then correct to not use all the arguments, so this patch adds the
appropriate stuff to avoid a false report from compiler.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The drag-n-drop mechanism is managed by WINGs through callbacks, which
means having a fixed argument list for the handling function.
It is then correct to not use all the arguments, so this patch adds the
appropriate stuff to avoid a false report from compiler.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The mechanism of Notifications in the WINGs toolkit is relying on
callbacks to dispatch notifications, which means having a fixed argument
list for the handling function.
It is then correct to not use all the arguments, so this patch adds the
appropriate stuff to avoid a false report from compiler.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
There is a function in WUtil's API that take a parameter for consistency
reason, but actually does not need the argument.
As it is a case we know about, this patch adds the appropriate stuff to
tell the compiler we are ok with this to avoid a false report.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As callback have a fixed prototype, it can be correct to not use all the
arguments, so this patch adds the appropriate stuff to avoid a false
report from compiler.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As reported by Iain Patterson, the clang compiler is (by default)
strictier on having clean C syntax. A few structure definition
did not comply, now they do.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
If the function was called more than once with different usernames
it would always return the path for the user on the first call,
which is not what would be expected.
Furthermore, if the function succeeds it allocated memory to save
this path but it was never freed.
The good thing is that the use case for this function is so rare
that it is improbable it was ever called, which explains why it
was never seen.
The new code always behaves as expected, and does not allocate
memory anymore to avoid wasting time and memory for such small
things, which is acceptable because this function is local.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This allows the compiler to warn if the definition in the file is
no in line with what is exposed to the users of the function through
the header definition.
The declarations have been split by source file, adding the usual
separation mark. Removed these 2 prototypes:
- W_SetFocusOfToplevel: case typo, the correct prototype already existed
in the file;
- W_TextWidth: function is not defined anywhere
When a function is used as a call-back, it is dangerous to have
arguments with a type different than what is expected by the
call-back definition.
This patch sets the argument list to match what is expected by
the call-back prototype and inserts an explicit type conversion
at the beginning of the function.
It is dangerous to let the compiler know about a function without
letting him know the arguments because he won't be able to report
invalid calls.
This patch concern the cases where adding the arguments led to
problems because the functions were used as call-back. As it is
dangerous to have parameter mismatchs in call-back, setup the
args as expected by prototype and added explicit conversion inside
the concerned function, so the compiler will know and be able to
do what may be necessary.