Previously, only the user's WMGLOBAL file would be read to determine the
current WINGs fonts (System Font and Bold System Font) in the Font
Configuration panel. It is quite possible that this information would
not be in the user's WMGLOBAL file, but instead in the system WMGLOBAL
file.
We instead use the WMDefaultSystemFont and WMBoldDefaultSystemFont
functions to get this information.
When a list has a fixed size, it is better to use the size of the list
instead of an end-of-list mark because it avoid unnecessary memory usage
and ease compiler's optimisation task.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This patch allows users to edit the two fonts (SystemFont and BoldSystemFont)
used in WINGs widgets using WPrefs. Note that changes will not take effect for
WINGs applications which are currently running.
The functions that create the different configuration panels were taking
the screen structure as argument, but it turns out that none of them
actually need it.
We just remove the argument to make code simpler and easier to maintain.
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>
memset is the last function call in wmalloc, just before it returns the
newly allocated memory. Therefore it is not needed to call it again
after wmalloc call. Although I would prefer to switch wmalloc to a
calloc-based wcalloc function, the compatibility of WINGs for old apps
should be kept.
for arq in `git ls-files *.c`; do
echo $arq;
indent -linux -l115 $arq;
done
The different line break at 115 columns is because
I use a widescreen monitor :-)
fix the 2 problems mentioend below:
- Fixed buggy handling of UTF8 characters in textfields in WINGs.
- Fixed segfault in WPrefs when some font description is missing from the
configuration file.
in the font selection panel
- Added code to get the closest match font between the font in the WindowMaker
domain and the one in the font list of the font panel in WPrefs.app.
This fixes issues with not selecting the correct font because the weight
or slant names are slightly different.
- Fixed convertfonts to account for $LANG
- Fixed convertfonts logic a bit and no longer output slant and weight if
they are the default ones (medium and roman)
- Applied Pascal's fix for GNUstep menus (modified to also include submenus)
Still this is not the proper fix, as it can't differentiate between
submenus and other windows at the floating window level. Correct fix needs
some extra hints to be set by GNUstep on menus.