1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-18 20:10:29 +01:00

31 Commits

Author SHA1 Message Date
Christophe CURIS
26491867a3 WINGs: Fix incomplete prototypes for functions that take no argument 2021-08-10 09:42:43 +01:00
Christophe CURIS
43f0474013 WINGs: Properly mark 'const' more 'char*' in the public API
Because the previous patch brought a (welcome) change in the public API,
seize the opportunity to go further in the improvement.
2021-08-10 09:42:43 +01:00
John D Pell
bfab769065 WINGs: Improve search path logic in WMPathForResourceOfType
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'.
2021-08-10 09:42:43 +01:00
Doug Torrance
738a78b3e2 Replace GNUSTEP_USER_ROOT environment variable with WMAKER_USER_ROOT
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
2019-02-17 18:44:33 +00:00
Christophe CURIS
b80118fb41 WINGs: fix WMPathForResourceOfType to check for all the paths it claims to check
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>
2014-11-29 18:44:47 +00:00
Christophe CURIS
546c148ac0 WINGs: safer cleanup in the 'WMReleaseApplication' function
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>
2014-05-09 20:42:34 +01:00
Christophe CURIS
a2328d9842 WINGs: Fix crash on exit while trying to save user config changes
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>
2014-05-09 09:47:42 +01:00
David Maciejak
588e04dda7 WINGs: Add functions to release application memory 2014-04-24 10:56:25 +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
e7c8ac76ea WINGs: Added 'const' attribute to functions in wapplication, wappresource, wcolor, wfont, wpixmap
This makes both the API and local function const-correct on their
input parameters.
2013-05-09 16:56:28 +01:00
Christophe CURIS
a18fd7cd69 Fixed const correctness in functions using 'wusergnusteppath'
The change introduced in previous commit for const correctness has
a small impact on WindowMaker's code, this patch fixes all the new
warnings.
2013-05-04 16:25:44 +01:00
Tamas TEVESZ
7859e2d59f Silence a few warnings
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:31 +02:00
Tamas TEVESZ
14863cd3b1 WINGs: Bounded string ops
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:31 +02:00
Tamas TEVESZ
0d32a6d3b7 WINGs: Simplify WMPathForResourceOfType()
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:29 +02:00
Tamas TEVESZ
553464d965 WINGs: Return NULL on NULL input in checkFile()
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:29 +02:00
Carlos R. Mafra
b17077ede0 Avoid more gcc warnings
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’
2010-08-29 14:55:14 +02:00
Carlos R. Mafra
688a56e8ab Change to the linux kernel coding style
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 :-)
2009-08-20 00:59:40 +02:00
dan
d26f18505a Fixed WPrefs.app to find its icons when not installed under GNUstep paths 2005-07-17 19:16:46 +00:00
dan
67a9ea74a3 - Fixed wrong call to XChangeProperty() when setting _NET_WM_ICON
- Changed the WPrefs icons with Largo's version
- Replaced Apps with Application in the docs
2004-10-24 03:20:29 +00:00
dan
193a63511d - Fixed all // comments
- Final cleanups
2004-10-23 03:30:03 +00:00
dan
59d2a5cbe5 - Use Applications instead of Apps for the application's path 2004-10-19 03:50:41 +00:00
dan
737328566f Tell gettext that we want to have the messages in the UTF-8 encoding, to
avoid the extra conversion that gettext would otherwise perform (from the
message encoding which is UTF-8 to the current locale encoding).
2004-10-17 07:17:03 +00:00
dan
6830b05716 changed indentation to use spaces only 2004-10-12 21:28:27 +00:00
dan
c2ec1cfe8a - Fixed userdefaults in WINGs not to synchronize on exit a domain that is
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.
2002-11-13 15:13:48 +00:00
kojima
882b9a8e1c - s/sprintf/snprintf
- updated some po's
- fixed crash bug when removing WINDOWS_MENU or WORKSPACE_MENU from rootmenu
- some other stuff i forgot
2001-07-23 20:31:32 +00:00
kojima
80fb09a74e replaced free() with wfree() everywhere
fixed bug in wlist that caused colorpanel to crash
1999-10-09 20:07:23 +00:00
dan
d214a2ca98 Started to make modifications to support libWUtil 1999-09-09 13:46:59 +00:00
dan
088c0ac230 Update for 0.51.2-pre2 1999-03-09 14:58:01 +00:00
dan
416e3a82be Update for 0.51.0 1999-01-25 19:06:50 +00:00
dan
0261c32636 Code update for Window Maker version 0.50.0
Read changes in ChangeLog and NEWS
1999-01-06 15:22:33 +00:00
scottc
9d2e6ef9f1 Initial revision 1998-09-29 22:36:29 +00:00