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'.
As reported in Debian bug #922284 [1]:
As evident from the prefix, GNUSTEP_USER_ROOT is a GNUstep variable and
Window Maker should not set it. Furthemore, it has been deprecated for
12 years already. As of gnustep-make/2.7.0-4 the GNUstep build system
is configured in strict v2 mode which makes it impossible to compile
GNUstep software. In a terminal started from a Window Maker session:
yavor@aneto:/tmp/gorm.app-1.2.24$ make
This is gnustep-make 2.7.0. Type 'make print-gnustep-make-help' for help.
Running in gnustep-make version 2 strict mode.
rm -f InterfaceBuilder; \
ln -s GormLib InterfaceBuilder
/usr/share/GNUstep/Makefiles/config-noarch.make:121: *** GNUSTEP_USER_ROOT
is obsolete. Stop.
It is also impossible to build gnustep-make from pristine upstream
source:
yavor@aneto:/tmp$ wget -q
ftp://ftp.gnustep.org/pub/gnustep/core/gnustep-make-2.7.0.tar.gz
yavor@aneto:/tmp$ tar xzf gnustep-make-2.7.0.tar.gz
yavor@aneto:/tmp$ cd gnustep-make-2.7.0/
yavor@aneto:/tmp/gnustep-make-2.7.0$ ./configure
...
yavor@aneto:/tmp/gnustep-make-2.7.0$ make
config-noarch.make:121: *** GNUSTEP_USER_ROOT is obsolete. Stop.
Note that the majority of GNUstep users use Window Maker as their window
manager and many of them build GNUstep software from source, mostly
because of the GNUstep Objective-C runtime which depends on Clang
(Debian packages use GCC and the GCC/GNU runtime).
Our solution is to replace the GNUSTEP_USER_ROOT environment variable with our
own environment variable, WMAKER_USER_ROOT. This is documented in NEWS.
[1] https://bugs.debian.org/922284
The "documentation" of the function claims to check for the resource in a
number of path, but factually if the application did provide its argument
list when creating the WINGs App structure (which is likely) then the
search would stop before checking all paths.
The code now continues as expectable if the resource was not found in the
path. Took opportunity to avoid a temporary allocation that participated in
memory fragmentation.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The function would not behave correctly if called twice, and the
library may re-use de-allocated pointers if calling WINGs functions
after calling this function.
The goal is for our library to behave as cleanly as possible, so
that users may have a clearer hint in case of misuse on their side
to debug the problem.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Recent patches has introduced the ability to exit cleanly from the WINGs
library, but this introduced some side effects because a function is
registered with 'atexit' to save user config on exit, which may not work
anymore because WMReleaseApplication frees some stuff needed for that task.
This patch handles this so that both method works, in case user of the lib
would forget to call the clean exit function.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
WUtil.h:212: warning: function declaration isn’t a prototype
WUtil.h:259: warning: function declaration isn’t a prototype
WUtil.h:300: warning: function declaration isn’t a prototype
WINGsP.h:593: warning: function declaration isn’t a prototype
WINGsP.h:599: warning: function declaration isn’t a prototype
WINGs.h:616: warning: function declaration isn’t a prototype
raster.c:295: warning: no previous prototype for ‘calculateCombineArea’
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 :-)
marked not to be synchronized.
- WMGLOBAL options can now be set in the WindowMaker configuration files
to overwrite values in WMGLOBAL.
- You can now pass "SystemFont", "BoldSystemFont", "SystemFont-##" or
"BoldSystemFont-##", with ## being the font size to any font creating
function to create a font with the (bold) system font font specification.
- Replaced AA with Anitialiased in WINGs font creation function names
- Added WMCreateFontWithFlags(), WMHasAntialiasingSupport() and
WMIsAntialiasingEnabled()
- Created a separate font cacahe for antialiased fonts
- Added test at startup if Xft supports rendering antialiased fonts (in case
the application was compiled with Xft support, but is run on an X server
without support for xft rendering (RENDER extension missing). If no Xft
support antialiasing will be disabled even if it is enabled in the
configuration file.
- Finished the Info Panel to work with antialiased fonts.
- Code cleanup in dialog.c. Remade part of Info Panel drawing the Window Maker
logo.
- Fixed technical style drawing of window resizing.