1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 12:28:22 +01:00
Commit Graph

248 Commits

Author SHA1 Message Date
Christophe CURIS
80a59696e5 Fixed improper variables definition in header file
Some header were creating variable, this is a bad practice which
is likely to not behave as expected. This creates one distinct
variable in each object file that used the header, and:

 - on well behaved compiler, this ends up in a link error (see
commit 39fdb451ba for an example)

 - on bad behaving compiler, this can be linked as multiple local
variable, thus having strange effects when running program

 - on insouciant compiler (who said gcc?) the variables are
silently merged, hiding portability issues
2013-05-11 00:17:27 +01:00
Christophe CURIS
90d24a1648 Unified usage of the 'inline' attribute for functions
Autoconf provides the necessary stuff to detect if inline keyword
is supported, and to detect special syntaxes, so let's use this
and remove the multiple local definitions, this makes code simpler.
2013-05-11 00:17:27 +01:00
Christophe CURIS
7f6699ffca Changed formula for getting the number of elements in a static array
When using the formula [sizeof(array) / sizeof( x )] to get the number
of element in a static array, it is better to use array[0] for 'x'
instead of the base type of array:
 - in case the base type would change someday;
 - if the compiler were deciding to insert padding somewhere
2013-05-11 00:17:27 +01:00
Christophe CURIS
7c320447fb Added missing include guards in a few headers
Considering the number of headers we have, it is a good idea to
avoid possible problems. For details, you may read:
  http://en.wikipedia.org/wiki/Include_guard

All headers should be ok now.
2013-05-10 19:37:47 +01:00
Christophe CURIS
7c98f7cfc4 Added proper legal notice at beginning of header files
Some header were missing the notice; used git blame to find the
original date and author (without guarantee.
2013-05-10 19:37:47 +01:00
Christophe CURIS
e7c2a3dc69 util: removed deprecated file 'directjpeg.c'
The content is not used anywhere, and this is probably mostly due
to the fact that the behaviour is provided by the WRaster library
in a better way.
2013-05-10 19:37:47 +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
Iain Patterson
2affd6d484 Make window border size configurable.
Use the new preference FrameBorderWidth to configure the width of frame
window borders.
2013-03-26 23:19:39 +00:00
Iain Patterson
dee30d06ac Make window border colours configurable.
Use the new preferences FrameBorderColor and FrameSelectedBorderColor to
set the border colour of frame windows and selected frame windows
respectively.
2013-03-26 23:19:39 +00:00
Carlos R. Mafra
a23e42639a wmgenmenu: Add XBMC entry 2013-01-31 01:00:42 +00:00
Andreas Bierfert
085224973a Fix incorrect FSF address 2013-01-07 21:19:40 +00:00
Kamil Rytarowski
0706471a10 Fix build with automake-1.13 and modernize .am files.
The following macro: AM_CONFIG_HEADER is deprecated and replaced with AC_CONFIG_HEADERS. INCLUDES is an old version of AM_CPPLAGS.
2013-01-03 23:27:31 +00:00
Carlos R. Mafra
5795bb5638 wmaker.inst: Remove test for LITE and KDE message
LITE was removed in fe736e849c ("Remove LITE config option"), but
the check for it in wmaker.inst was missed.

Furthermore, remove confusing message about wmaker being configured for KDE.
2012-06-24 23:07:39 +01:00
Alexey I. Froloff
d53b43608a wmmenugen: properly skip NoDispaly entries
Last group from a desktop file is always added to menu regardless of
NoDisplay property.  Properly handle the NoDisplay and Hidden properties
at the end of file.

Signed-off-by: Alexey I. Froloff <raorn@raorn.name>
2012-06-18 23:34:46 +01:00
Amadeusz Sławiński
fc5c0fe1a4 Add fill screen scale to wmsetbg
I noticed that I can have different background with wmmsetbg for each
desktop and wanted to use it, but it was missing option to fill the
screen with proportionally scaled image, so here it is.
2012-06-03 17:02:30 +01:00
Tobias Stoeckmann
cc30444dda No need to call memset after wmalloc
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.
2012-05-04 18:41:01 -03:00
Christoph Soehngen
42a78ee73f wmgenmenu: Add more apps to our nice menu 2012-04-02 17:52:14 +01:00
Carlos R. Mafra
99aad55425 wmgenmenu: Fix name for FSViewer 2012-02-27 02:11:14 +00:00
Leandro Vital
e46f2b3e79 wmgenmenu: Add Portuguese translation 2012-02-22 08:11:12 +00:00
Carlos R. Mafra
9e8e4625ab Small update on wmgenmenu list of apps 2012-02-19 14:08:18 +00:00
Rodolfo García Peñas (kix)
f2585dc1f7 utils: Include the SHEXEC in the wm-oldmenu2new script
The script wm-oldmenu2new can now convert the SHEXEC lines.

Requested-by: Doug Barton <dougb@FreeBSD.org>
2012-02-18 15:56:16 +00:00
Carlos R. Mafra
119507d541 wmgenmenu: Update mrxvt options
The old mrxvt I had in my previous distro is gone. The options
need to be updated.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2012-02-12 20:08:33 +00:00
Carlos R. Mafra
3bc2535968 Fix getstyle, again
As reported by Paul Seelig, it used to be the case that

getstyle -t ~/GNUstep/Library/WindowMaker/Themes/somefile

would save the current theme, and all old menus (WMRootMenu) were
relying on this.

The problem was that the following piece (from commit 6bf79945)

	if (style_file && !make_pack)
		print_help(0, 1);

would allow a style_file to be specified and saved to only with the
option -p (which implies make_pack), therefore saving a theme with
-t like the root menu used to do no longer worked.

Now things work fine:

[mafra@Pilar:~]$ ls GNUstep/
Applications/  Apps/  Defaults/  Library/
[mafra@Pilar:~]$ getstyle -t ~/GNUstep/theme
[mafra@Pilar:~]$ ls GNUstep/
Applications/  Apps/  Defaults/  Library/  theme

But also note that trying to save a theme outside of GNUstep/
is not allowed and it prints no error message - perhaps it should...
2012-02-03 01:42:17 +00:00
Carlos R. Mafra
85b4dba721 Revert "getstyle: Remove dead code"
This reverts commit e06b3005e8.
2012-02-02 23:47:54 +00:00
Carlos R. Mafra
e1453087f5 WINGs: Rename copy_file() to wcopy_file()
...in order to avoid clashes that happen during compilation of
wmakerconf.

This is a new function in WINGs, so renaming it at this point is
not a big deal.

Thanks to Rodolfo García for the heads up.
2012-01-31 12:23:54 +00:00
Carlos R. Mafra
e06b3005e8 getstyle: Remove dead code
The statement under "if (style_file)" in the else branch of
"if (make_pack)" will never be executed because getstyle already
prints out a help message and exits before that.

So remove that code.
2012-01-16 00:09:14 +00:00
Carlos R. Mafra
e4d0ea5373 getstyle: Get rid of abortar()
Instead of using a temporary buffer to store a "reason" string
which is later printf()'ed by abortar(), use wwarning() directly
and do the small cleanup done by abortar() on the spot.

As this was the only call site for abortar() it can now be removed.
The resulting object code gets smaller as a side effect.

Thanks to Christophe <christophe.curis@free.fr> for finding a mistake
in the first version of this patch.
2012-01-16 00:09:14 +00:00
Carlos R. Mafra
7e4a3ae57f getstyle: Use new copy_file() from libWUtil and delete copyFile()
Now both getstyle.c and wcolorpanel.c use the same copy_file() function
from libWUtil, and their similar private copies are gone.
2012-01-15 14:33:11 +00:00
Carlos R. Mafra
6bf5f947a9 wmgenmenu: Fix "Save Theme"
Dario Niedermann reported on 27.11.2011:

       Selecting "Save Theme" from WMaker's root menu results in dialog box
       asking for theme name, but then nothing is saved.

       This feature used to work in 0.92.0.

and the reason for it (if he uses a WMRootMenu generated by wmgenmenu) is
the incorrect use of the option "-t" instead of "-p" to getstyle.

Furthermore, let the invocation of getstyle reflect the new default location
for the themes.
2012-01-15 04:12:14 +00:00
Carlos R. Mafra
ac8a493ed9 getstyle: Save theme pack in Themes dir
When invoked as

getstyle -p NewTheme

Instead of saving the theme inside the topdir ~/GNUstep let's save it
insinde their proper directory ~/GNUstep/Library/WindowMaker/Themes.
2012-01-15 04:12:14 +00:00
Carlos R. Mafra
5ef03b2a3a getstyle: Fix output to stdout
There is a problem with getstyle invoked with no arguments:

[mafra@Pilar:util]$ ./getstyle
Usage: getstyle [-t] [-p] [-h] [-v] [file]

or with -t:

[mafra@Pilar:util]$ ./getstyle -t
Usage: getstyle [-t] [-p] [-h] [-v] [file]

In both cases it is supposed to write to the standard output:

[mafra@Pilar:wmaker.git]$ getstyle -h
Usage: getstyle [-t] [-p] [-h] [-v] [file]
Retrieves style/theme configuration and output to FILE or to stdout

This regression was caused by commit 6bf7994520 ("style Stuff up").
When that commit did

       argc -= optind;

       if (argc != 1)
               print_help(0,1);

it excluded the output to stdout as valid, because in this case
argc - optind is zero (see the manpage of getopt(3)).

The correct handling is to set the style_file only when there is
one non-option ARGV-element (argc - optind == 1) and print the
help message when there are more than one non-option element.
2012-01-15 02:45:00 +00:00
Rodolfo García Peñas (kix)
a9e136ec41 util: po files reports warning with fuzzy 2011-10-28 15:57:07 +01:00
Brad Jorsch
a06b0673d8 Fix some "'var' may be used uninitialized" warnings
The one in WPrefs.app/Appearance.c is indirect: the function might
be inlined and might return an uninitialized value, which causes gcc to
complain that the caller might use that uninitialized return value.
2011-08-09 23:45:34 +02:00
Brad Jorsch
d9296ff9a4 Remove warning in wmagnify.c (correctly)
The problem with f65b99e615 was that it removed the call to
newWindow() along with the unused variable, without considering that
newWindow() has side effects that need to happen even if the return
value is ignored. So as long as we keep the newWindow() call, we can
safely remove the (unused) variable.
2011-08-09 23:45:34 +02:00
Carlos R. Mafra
8fe18de926 Use wmgenmenu to create WMRootMenu during installation
Instead of using _old_ and hard-coded predefined menus as the
source for the user's WMRootMenu during installation, generate
the menu automatically using wmgenmenu.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2011-08-08 19:11:22 +02:00
Carlos R. Mafra
e95f886e06 util: Fix wmagnify
wmagnify stopped working after f65b99e615 ("Remove warnings").
So revert that change in util/wmagnify.c, as it turns out that the
gcc warning was bogus there.
2011-08-01 22:40:55 +02:00
Tamas TEVESZ
5fa8b979b9 Amend recent wmgenmenu changes
Raise MAX_NR_APPS to account for the more menu entries
2011-04-10 22:13:29 -07:00
Christoph Soehngen
cbbc1fc9ac wmgenmenu: Update German translation 2011-04-09 14:47:58 -07:00
Christoph Soehngen
18de6b8c96 wmgenmenu: Add more apps 2011-04-09 14:40:03 -07:00
Tamas TEVESZ
f65b99e615 Remove warnings
* Remove assigned but not used variables (GCC 4.6)
* Bump _XOPEN_SOURCE to 600, ridding of FreeBSD warnings (this probably need
  to be tweaked on a per-implementation basis as problems arise)
2011-03-24 16:19:52 +01:00
Camille d'Alméras
077a2eaa71 wmgenmenu: Add French and Spanish translations
[crm: edits in configure.ac and Makefile.am]
Signed-off-by: Camille d'Alméras <camilledalmeras@yahoo.com>
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2011-02-13 18:08:46 +01:00
Carlos R. Mafra
7036890288 wmgenmenu: Add more apps
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2011-01-31 10:52:07 +01:00
Tamas TEVESZ
4f853ce3b6 wmmenugen: Finish the XDG parser
Recognize the freedesktop.org-mandated Main Categories in .desktop files
and put menu entries in the appropriate categories.

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-10 19:38:14 +02:00
Tamas TEVESZ
a23b72c32a wmmenugen: Add file name validator function
Add optional interface parsers may choose to implement that, when
a directory is being scanned for files to parse, may, based on
the file name, decide whether or not said file should be parsed.

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-10 19:36:34 +02:00
Tamas TEVESZ
5377ec8fba wmmenugen: Add executable detection, make Wmconfig use it
Add fileInPath, which determines whether or not a given file exists
in $PATH (some heuristics apply).

Make the Wconfig parser use it.

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-10 19:34:45 +02:00
Tamas TEVESZ
0451160f7d wmmenugen: Finish Wmconfig parser, touch up PropList writer
As far as i can tell this finishes the Wmconfig parser (all bits we are
interested in/can use are parsed and converted).

The PropList writer gained ability to properly react to and handle various
flags passed by parsers.

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-10 10:04:32 +02:00
Alexey I. Froloff
51134d2438 wmaker.inst: quote shell variables
Signed-off-by: Alexey I. Froloff <raorn@altlinux.org>
2010-10-08 18:13:56 +02:00
Alexey I. Froloff
ba5fceb21c wmaker.inst: better locale check
Signed-off-by: Alexey I. Froloff <raorn@altlinux.org>
2010-10-08 18:13:56 +02:00
Tamas TEVESZ
3c408fa179 Update local copy of GPLv2 and FSF address in copyrights
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-08 18:13:56 +02:00
Tamas TEVESZ
8b68042b30 Add wmmenugen, an extensible PropList-format menu generator
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-08 18:13:56 +02:00