1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 12:58:08 +01:00
Commit Graph

867 Commits

Author SHA1 Message Date
Doug Torrance
139382380f Added missing files to distribution tarball.
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.
2014-05-03 23:24:37 +01:00
Doug Torrance
058e0a0ebd Added pkg-config file for WUtil.
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.
2014-04-29 10:15:27 +01:00
Christophe CURIS
b6ffe90ec4 WINGs: Changed algorithm to resize a pixmap while keeping aspect ratio
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>
2014-04-29 10:15:27 +01:00
Christophe CURIS
36159c614f wmaker: Scale image to make them fit in the preview panel
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2014-04-29 10:15:27 +01:00
David Maciejak
588e04dda7 WINGs: Add functions to release application memory 2014-04-24 10:56:25 +01:00
Christophe CURIS
36c3f7edf4 WUtil: Added missing const attribute to function arguments
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-04-24 10:47:45 +01:00
Christophe CURIS
e8feda5414 WUtil: Fixed incorrect header being included
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>
2014-04-24 10:47:45 +01:00
David Maciejak
a3ce005980 WINGs: Add support for syslog messaging
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.
2014-04-24 10:47:45 +01:00
Alwin
afc900a7c3 New translation into Dutch for Window Maker
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.
2014-04-24 10:47:45 +01:00
BALATON Zoltan
329bcca763 Updated Hungarian translation
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
2014-04-24 09:27:15 +01:00
BALATON Zoltan
ae0cc1427f Updated Hungarian translations
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
2014-04-24 09:27:15 +01:00
BALATON Zoltan
7a10bcb51e Fix out of source build for i18n pot files
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
2014-04-24 09:27:15 +01:00
David Maciejak
2c5dbae444 WINGs/Examples: Removed refs to connect and server examples 2014-02-13 08:58:25 +00:00
Rodolfo García Peñas (kix)
3b97d33d0a WINGS: removed compiler warnings.
This patch removes compiler warnings.
2014-02-13 08:55:47 +00:00
Christophe CURIS
5770e53c50 Fixed a few improper macro usages
Added compiler checks for some improper macro usage and fixed the problems
pointed by gcc.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:13:33 +00:00
Christophe CURIS
895a6e97e1 WINGs: Added 'const' attribute to function 'WMCreateHashTable'
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>
2013-12-30 18:11:07 +00:00
Christophe CURIS
26c64933e0 WINGs: Added a few missing const attributes
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:06 +00:00
Christophe CURIS
6184c955e7 Code refactoring: replaced macro 'SHAPE' by 'USE_XSHAPE' for consistency
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>
2013-12-30 18:11:06 +00:00
Christophe CURIS
cd501741a1 WINGs: Removed unnecessary type conversion
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:05 +00:00
Christophe CURIS
330fc85e56 Remove some unnecessary code related to XShape usage
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-12-30 18:11:05 +00:00
Christophe CURIS
bf64058020 WINGs: Do not create variables for trivial things
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>
2013-12-30 18:11:05 +00:00
Christophe CURIS
4976d48b6f WINGs: Added attribute 'noreturn' to public function 'WMScreenMainLoop'
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>
2013-12-30 18:11:05 +00:00
Christophe CURIS
62565b42f6 WINGs: Do not allocate memory for a fixed-size short-lived buffer
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>
2013-12-30 18:11:04 +00:00
Christophe CURIS
d25631016e WINGs: Minor improvments in 'closestListItem' function
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>
2013-12-30 18:11:04 +00:00
Christophe CURIS
a3b6b62049 WINGs: Use the macro 'wlengthof' to get the number of element in an array
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>
2013-12-30 18:11:03 +00:00
Christophe CURIS
fd47650717 WUtil: New macro 'wlengthof' in the public API to get number of elements in an array
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>
2013-12-30 18:11:03 +00:00
Doug Torrance
0d45deff07 Remove default Microsoft fonts.
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.
2013-11-02 08:55:31 -02:00
Christophe CURIS
e4664c6492 WINGs: Removed unused argument to function 'W_SetXdndAwareProperty'
The two arguments 'types' and 'typeCount' are not needed by that function,
so remove them.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-11-01 15:27:11 -02:00
Christophe CURIS
ca658beeb5 WINGs: Removed unused argument in function 'checkDropAllowed'
The function does not use the event argument, so remove it.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-11-01 15:27:11 -02:00
Christophe CURIS
9f1207342a WINGs: Marked args as unused for compiler in WINGs API code
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>
2013-10-19 18:01:36 -03:00
Christophe CURIS
bd58625a3f WINGs: Marked args as unused for compiler in a few more callback functions
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>
2013-10-19 18:01:36 -03:00
Christophe CURIS
ea74fe8871 WINGs: Marked args as unused for compiler in event callback code
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>
2013-10-19 18:01:36 -03:00
Christophe CURIS
237c386fdc WINGs: Marked args as unused for compiler in X Error handlers
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>
2013-10-19 18:01:36 -03:00
Christophe CURIS
702764a7b0 WINGs: Marked args as unused for compiler in widget resize callback code
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>
2013-10-19 18:01:36 -03:00
Christophe CURIS
0d8a530bc3 WINGs: Marked args as unused for compiler in XDND callback code
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>
2013-10-19 18:01:36 -03:00
Christophe CURIS
fed1bf4de3 WINGs: Marked args as unused for compiler in Notification callback code
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>
2013-10-19 18:01:36 -03:00
Christophe CURIS
58961dce72 WUtil: Removed unused argument in internal function 2013-10-19 18:01:36 -03:00
Christophe CURIS
2dd4a34961 WUtil: Marked args as unused for compiler in WUtil's API code
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>
2013-10-19 18:01:36 -03:00
Christophe CURIS
6dba612d58 WUtil: Marked args as unused for compiler in a callback functions
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>
2013-10-19 18:01:36 -03:00
Gabriel VLASIU
75654cf43c Proper fix for array == NULL in WMPopFromArray() function. 2013-07-06 11:36:50 +01:00
Gabriel VLASIU
527f5f1730 Fix segfault when SwitchPanelImages = None and user press Alt+tab. 2013-06-19 14:45:18 +01:00
Christophe CURIS
1e76a78604 Fixed structure declaration syntax
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>
2013-06-10 22:34:59 +01:00
Christophe CURIS
3c2fc82b6e WUtil: Avoid memory leak and misbehaviour on internal function 'getuserhomedir'
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>
2013-06-09 16:51:16 +01:00
Christophe CURIS
4b89104aca WINGs: Added a few missing 'static' attributes to functions
Some functions are not meant to be visible by user; the use of the
attribute avoid risk of name clash with user functions at link
time.
2013-05-12 01:01:20 +01:00
Christophe CURIS
140249ad0c WINGs: Added include for header defining the funcion provided by the file
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.
2013-05-12 01:01:20 +01:00
Christophe CURIS
8a58c8b568 WINGs: Moved declaration of extern variable to the global header
Having local extern declaration is dangerous because the compiler
is not able to cross-check if the type of the variable was defined
consistently.
2013-05-12 01:01:20 +01:00
Christophe CURIS
5c2a1ae1a1 WINGs: Place prototype of functions in WINGsP.h instead of local definition
It is a bad idea to declare the prototype of an external function
in a file as it won't allow the compiler to cross-check it.
2013-05-12 01:01:20 +01:00
Christophe CURIS
367d1f938d WINGs: Reorganised the private header
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
2013-05-12 01:01:20 +01:00
Christophe CURIS
e2d816c7a2 WINGs: Removed cast to change function prototype
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.
2013-05-12 01:01:20 +01:00
Christophe CURIS
bab90b2168 WINGs: Added explicit parameter list to function prototypes (Complex case)
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.
2013-05-12 01:01:20 +01:00