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

248 Commits

Author SHA1 Message Date
Brad Jorsch
060ba6a9cd Fix path substitutions
Autoconf uses multiple levels of variables when defining paths. For
example, ${datadir} by default is ${datarootdir}, which by default is
${prefix}/share, which by default is /usr/local. Substituting from
./configure, as is done by AC_DEFINE or AC_DEFINE_UNQUOTED, does not
expand all these variables. This was causing some of our defines to have
garbage like "${prefix}/share/pixmaps" rather than the intended
"/usr/local/share/pixmaps".

The solution is to generate the files needing these paths from the
Makefile rather than from ./configure, because make does fully expand
all those levels.

Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-10-07 12:04:31 +02:00
Tamas TEVESZ
94a0c7b42f Fix some double newlines
Just a couple that woud now print double (or several more) newlines.

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:30 +02:00
Tamas TEVESZ
1f21919809 Remove wsyserrorwithcode, rename wsyserror to werror
wsyserrorwithcode - Not used, no point either.
wsyserror->werror - qualifying "error" with a "type" hardly makes
sense if there are not at least two "type"s. There are not. Safe trip.

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:30 +02:00
Andreas Metzler
be8a5d4a45 Do not mark product names as translatable
There is no point in trying to translate trademarks/product names like
Window Maker or OpenSUSE, stop marking these strings as translatable.
2010-10-07 12:04:29 +02:00
Brad Jorsch
f38aa69e40 Clean up library linking
On the one hand, libWINGs wasn't linking against -lX11 when it should
have been. And on the other, only libWINGs needs Xft, only wmaker needs
Xrandr, only wmaker and wmsetbg need Xinerama, only libwraster needs
Xmu, and -lpng may not need -lz.

Cleaning this up can help distributions get their dependencies correct,
and might even avoid loading the unused libraries at runtime, so we may
as well do it.

Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-10-07 12:04:29 +02:00
Tamas TEVESZ
ae8937e152 Fix some off-by-ones
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
2010-10-07 12:04:29 +02:00
Brad Jorsch
844bf1b4e3 Fix compilation with LDFLAGS=-Wl,--no-add-needed
If you link against a library A that itself links against a library B,
it may or may not work to use symbols from library B in your executable;
this is known as "indirect linking". GNU ld does indirect linking by
default (but it can be disabled using --no-add-needed), but the new
experimental GNU gold linker does not do this. It's an easy fix for us,
as the tests are all already done in ./configure, we just need to tell
the Makefile.ams to use the results.

This should fix Debian bug #556677, if they ever start using this
branch.

[crmafra: Folded Andreas Metzler patch to update debian/changelog]

Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
2010-10-07 12:04:28 +02:00
Brad Jorsch
5afe745c01 Automake dependency tracking
I just spent an hour trying to find out why the latest wmaker-crm was
ignoring a number of the preferences in my configuration file. It turns
out the problem was that commit f41db5 added a value into the middle of
the enum in src/keybind.h, and the setting of
AUTOMAKE_OPTIONS = no-dependencies in all the Makefile.ams meant that
make wasn't smart enough to rebuild the files depending on it.

Would anyone mind if we just remove no-dependencies from
AUTOMAKE_OPTIONS? People can still run ./configure with
--disable-dependency-tracking to disable it at configure time.
2010-09-15 20:37:48 +02:00
Carlos R. Mafra
5c8eb580b3 configure: Remove --disable-verbose-compile hack
Instead of using the --disable-verbose-compile hack, let's
use the standard option --enable-silent-rules (or 'make V=0' directly)
available with autoconf 1.11 and higher.

This is enabled in autoconf by using 'silent-rules' in AM_INIT_AUTOMAKE.
The verbosity of compilation is reduced in a similar manner as using
the --disable-verbose-compile option, so we can remove all that ugly
hackery.
2010-08-29 14:55:14 +02:00
Carlos R. Mafra
be065e3bf4 Add /usr/local/share/WindowMaker dir to wmgenmenu 2010-08-29 14:55:14 +02:00
Tamas TEVESZ
4247ac9f82 Add i18n labels to wmgenmenu 2010-04-12 09:58:37 +02:00
Carlos R. Mafra
6002ce0cbc Add more pretty names for wmgenmenu apps 2010-04-12 09:58:37 +02:00
Tamas TEVESZ
22978af5a6 Add nice labels to wmgenmenu 2010-04-12 09:58:37 +02:00
Brad Jorsch
bbe55ba242 Fix "make dist"
The "make dist" command can be used to generate the release tarball, but
only if the Makefile.am correctly specifies EXTRA_DIST, specifies
headers in foo_SOURCES, and so on.
2010-04-12 09:58:37 +02:00
Brad Jorsch
12de2f319e Fix uninitialized vars
Initialized variables that are conditionally set. In particular, this
construct is dangerous:
  void *p;
  if (something) p = couldReturnNull();
  if (!p) p = fallbackFunction();
2010-04-12 09:58:36 +02:00
Tamas TEVESZ
6b5cfc887a Fix out-of-tree builds
- The throwing out of autogen.sh in favor of autoreconf comes from
  http://www.gnu.org/software/automake/manual/autoconf/autoreconf-Invocation.html#autoreconf-Invocation
- 'think that instead of the exit, some better way should be put in
  to control whether or not to automatically run configure. Or maybe
  just don't even run it.
2010-04-09 15:16:31 +02:00
Carlos R. Mafra
08f990a946 Use int instead of size_t to silence warning
gcc-4.4.1 was complaining:

fontconv.c: In function ‘mapWeightToName’:
fontconv.c:114: warning: field precision should have type ‘int’, but argument 4 has type ‘size_t’
fontconv.c:114: warning: field precision should have type ‘int’, but argument 4 has type ‘size_t’
fontconv.c: In function ‘xlfdToFc’:
fontconv.c:157: warning: field precision should have type ‘int’, but argument 4 has type ‘size_t’
fontconv.c:157: warning: field precision should have type ‘int’, but argument 4 has type ‘size_t’
2010-04-08 17:11:41 +02:00
Carlos R. Mafra
3f8248f534 wmgenmenu: Change the app order in terminals list
Because the terminal detection stuff by Tamas was choosing 'mrxvt' for
me, but I want it to be 'xterm'.
2010-04-08 15:53:50 +02:00
Tamas TEVESZ
68a55be998 Poke wmgenmenu some more
- change some variable names to better reflect their purpose, do a little
  write-up how a menu is built
- auto-detect what terminal to use for apps in need of a terminal
- fix the chunk that adds the terminal-based apps
2010-04-08 15:53:50 +02:00
Carlos R. Mafra
68f70da310 Regenerate wmgenmenu German translation 2010-04-08 15:53:50 +02:00
Tamas TEVESZ
c165beeb4b Poke wmgenmenu, part 2
- Convert to using WINGs PropList functions
- Add mwm to other_wm, remove ee from Graphics while here
2010-04-02 10:15:58 +02:00
Tamas TEVESZ
daad5ed828 Poke wmgenmenu
- add help and usage, to bring it in line with other tools
- if no item in any particular group was found, don't write an
  empty group
2010-04-02 10:13:15 +02:00
Tamas TEVESZ
e7a46d5cdf Attach utils versions to WM version 2010-04-02 08:38:39 +02:00
Tamas TEVESZ
7dc767ae78 Convert to getopt, continued
plus some assorted fixes:
 - sort headers, remove some unneeded ones
 - small bits of formatting and the like
2010-04-02 08:38:23 +02:00
Tamas TEVESZ
859338fd83 Spice up setstyle
- convert to getopt
- tidy xsendevent
- modify hackPathInTexture() so that:
  - it properly figures where the style file is
  - if it's under the user's home directory, that part of the path
    is changed to `~' - this makes your wm configuration usable on
    systems with a network home, used on systems where home is /home,
    or /u, or /export/home, or whatever.

XXX: there's a note WINGs/findfile.c:wexpandpath() stating that
`too many functions handle a return value of NULL incorrectly'. this is
so true. so if anyone is looking for a small project to sink their
teeth in...
2010-04-02 08:37:16 +02:00
Tamas TEVESZ
6bf7994520 Style stuff up
- convert hand-rolled arg parsers to getopt_long
- sort headers, get rid of some duplicates in the process
- in fontconv, replace magic numbers with constants (there's
  little practical value to this here, but it's much nicer)
- slightly redo fontconv.c:strToInt()
2010-04-01 11:24:46 +02:00
Tamas TEVESZ
4078af654b An XLFD has exactly 15 fields, not "at least" 15 fields. 2010-03-29 21:18:37 +02:00
Tamas TEVESZ
71aa4f2884 Switch file ops to stdio
- Does away with the O_BINARY abomination
- as a byproduct, plugs an fd leak in wcolorpanel.c:fetchFile()
- sprinkle some fsync()s to files that have been written to (this
  needs to be done everywhere)

+ fix brown paper bag thinko in configure.ac
2010-03-27 10:31:13 +01:00
Renato Botelho
0f5c36a67e Fix non-I18N build
* Remove directly include of <libintl.h> and include src/wconfig.h, that
already include libintl.h and declare _() function
* Replace some gettext() calls to _()

These changes fixes build with LINGUAS is unset, and removes I18N
support in this case.
2010-03-26 21:08:17 +01:00
Tamas TEVESZ
1a0c8afa80 Remove texture plugins
- leave a note for the unlikely case of such configuration being found,
  the user is notified properly
2010-03-26 21:08:16 +01:00
Tamas TEVESZ
118a93808a Idle fixes
- add new wglobaldefaultspathfordomain() to wings (replaces several
  hand-rolled individual implementations in utils/)
- make all of 'em handle -h|--help, -v|--version
- try making them not to nothing silently
- change various ways of knowing thyselves to using __progname
- generally try to make them feel similar (NOT right, similar --
  right is a completely different matter)
2010-03-23 21:50:17 +01:00
Tamas TEVESZ
d51bbe6626 Collect low-hanging fruits 2010-03-23 21:50:17 +01:00
Tamas TEVESZ
5f02b1b5f4 Feet protector for getstyle
Since getstyle now saves the theme pack in $GUR instead of
the cwd, there's a slight possibility you can specify a theme
pack name that will do Bad Things to your existing stuff.

To that end, specified theme pack name is "sanitised" a bit, as in
forward slashes in it are replaced by an underscore.

Oh yes, i forgot to mention. getstyle now saves the theme pack
in $GNUSTEP_USER_ROOT, not in cwd.
2010-03-23 21:50:17 +01:00
Tamas TEVESZ
9f7aaa8aed Some rework on getstyle
- make it use wings functions, remove duplicated code from getstyle
- de-static necessary functions in wings
- add new wrmdirhier to wings
- rename WMMkDirHier to wmkdirhier (fits better)
- remove calling shell from getstyle (what were they thinking?)

i couldn't quite test getstyle (no idea about themes), but it still
basically works.

do back your ~/G dir up... wrmdirhier might eat it!

definitely needs testing, especially by people who have any idea
how themes work.

Some more getstyle

- missed a shell invocation
- maybe copyFile should be in wutils too...?

[crmafra: Folded second patch into the first]
2010-03-23 21:50:17 +01:00
Tamas TEVESZ
2a52ce3544 Remove unneeded files
WINGs/puzzle.c is an example, and is actually also in WINGs/Examples/

wmsetup was actually equivalent to a slightly braindead true(1)
2010-03-20 18:42:56 +01:00
Carlos R. Mafra
5178465bb6 Remove DEBUG statements, #if 0 etc
...and some other cleanups.
2010-03-20 18:42:56 +01:00
Tamas TEVESZ
badecc244b simplify WMWritePropListToFile()
remove the choice of atomic/non-atomic writes. firstly, the only users
of non-atomic writes were getstyle and geticonset; secondly, who in their
right minds would ever want non-atomic writes; thirdly, the file system
will screw you anyway *G*.
2010-03-17 11:12:53 +01:00
Tamas TEVESZ
baac5ead1e wmgenmenu: Add 'mc' to file managers list
i'd say it's rather unfair to leave grandpa out ;))
2010-03-15 16:56:06 +01:00
Carlos R. Mafra
1861880239 wmgenmenu: A Window Maker menu generator
The inspiration comes from Geir T. Kristiansen's 'genmenu' shell script
(http://gtk.no/genmenu) which I have been hapilly using for
the last 9 years or so.

That script generates the Window Maker menu by asking a few questions
and checks whether the applications in a predefined list exist in
the user's $PATH, so that the menu contains only the applications
which are guaranteed to exist and which the user cares about.

However I always thought it was a bit slow to finish, even
when having a file containing the answers to the questions to
be piped in.

And as Kristiansen states in his webpage, his script does not
support internationalization:

   "If you want internationalization I really suggest you rewrite
    genmenu from scratch anyway in a more sensible language and remove
    other limitations while you are at it."

so I decided to rewrite in C and make it support internationalization
(only English and German so far). While I am not sure yet if I removed
"other limitations while you are at it" I definitely made it finish faster.
This C program does not make you questions though.

But in the same spirit as the author of 'genmenu', who says:

    "Genmenu is a hack, deal with it, it just happens to serve my needs."

I present you 'wmgenmenu', which you can use like this:

wmgenmenu > /home/mafra/GNUstep/Defaults/WMRootMenu

and the menu is automatically generated from the list of
predefined apps which are contained in the C sources (wmgenmenu.h).

And when you generate the WMRootMenu as above, wmaker will automatically
load the new menu for you (due to the 'inotify' mechanism in wmaker-crm).

As for 'wmgenmenu' being faster than 'genmenu':

[mafra@Pilar:~]$ time ./genmenu.sh < answers.txt &> /dev/null

real    0m3.626s
user    0m0.968s
sys     0m1.830s

[mafra@Pilar:~]$ time wmgenmenu &> /dev/null

real    0m0.020s
user    0m0.006s
sys     0m0.013s
2010-02-21 11:51:00 +01:00
Carlos R. Mafra
a3246cfe3b Remove remaining sound stuff from WPrefs etc
Let's remove the configuration options about "sound" from
WPrefs (as it was never fully functionall anyway) and from
configuration files.

Remove also the xpm and tiff icons.
2009-10-12 03:02:24 +02:00
Carlos R. Mafra
7a86f48f73 Fix --disable-verbose-compile
Remove an extra $(QUIET), as that was causing a few annoying
messages during the compilation of libraries.
2009-09-19 16:06:18 +02:00
Alexey Voinov
3953f53680 WINGs shared library generation
This patch modifies the linking of the WINGs libraries
to create a shared library. wmaker used to do this, but
it was dropped around wmaker-0.90/0.91.
The shared .so library is needed when compiling and running
the wdm display manager and any other programs which link
to libWINGs.

Submitted by: Gilbert Ashley
Origin: ALT/Sisyphus Linux
2009-09-19 16:06:05 +02:00
Iain Patterson
5c46f48898 Support Xinerama in wmsetbg.
Allow wmsetbg to revert to pre-0.90.0 behaviour when choosing a
background image that is large enough to span several heads in a
Xinerama setup.  If the -X flag is passed to wmsetbg, the background
image will be stretched to fill the logical screen (as it would be by
default in older versions of wmsetbg) instead of being tiled across
screens.
2009-09-14 16:51:26 +02:00
Carlos R. Mafra
18c7a20136 Delete stale .cvsignore files 2009-09-13 12:59:25 +02:00
Vladimir Nadvornik
108127f0b5 Miscellaneous fixes from OpenSuse
These are some of the fixes sent to the wmaker-dev list by
Vladimir Nadvornik, with minor modifications to address Dan
Pascu's concerns.

Original-post: http://lists.windowmaker.info/dev/msg00293.html
2009-08-27 16:34:44 +02:00
Martin Dietze
3f6ae395ce Add GLOBAL_DEFAULTS_SUBDIR and fix a syntax error in wmlib/Makefile.am 2009-08-24 11:55:20 +02:00
Carlos R. Mafra
fe736e849c Remove LITE config option
Why?

     1. The reason for its existence is to "Disable some stuff that are
        duplicated in kde", and I don't think I will ever need that.
        Furthermore, even the description in the configure script reads
        "disable some stuff (dont use it)".

     2. It makes the code uglier at some places, e.g.,

         #ifdef LITE
                {
         #if 0
                }
         #endif
         #else

                if (!wRootMenuPerformShortcut(event)) {
         #endif

        which by the way is the ugliness which motivated this patch.

     3. Does not even compile anymore. It fails with

          CC dockedapp.o
          CC event.o
       event.c: In function 'executeButtonAction:
       event.c:711: error: WScreen has no member named root_menu
       event.c:712: error: WScreen has no member named root_menu
       event.c:713: error: WScreen has no member named root_menu
       event.c:715: error: WScreen has no member named root_menu
       event.c:720: error: WScreen has no member named switch_menu
       event.c:721: error: WScreen has no member named switch_menu
       event.c:722: error: WScreen has no member named switch_menu
       event.c:724: error: WScreen has no member named switch_menu
       make[2]: *** [event.o] Error 1
       make[1]: *** [all] Error 2
       make: *** [all-recursive] Error 1

       But instead of fixing this (it would be trivial), let's get
       rid of the whole ugliness altogether.
2009-08-23 18:45:30 +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
Carlos R. Mafra
09a8911b6f Remove unused variables
GCC -Wall complains about them.
2009-08-17 17:35:48 +02:00
Carlos R. Mafra
72689513a3 Makefile: Beautify compilation messages
This patch adds the --disable-verbose-compile switch to the
configure script.

When this option is used it reduces the verbosity of compilation
messages to the essential. However compiler warnings are not affected
and thus gain visibility by not standing in the middle of a storm
of other messages.

In summary, the compilation messages are reduced to a stream of

CC array.o
CC bagtree.o
CC configuration.o
CC connection.o
CC data.o
[...]

instead of a mind-boggling flux of

gcc -DHAVE_CONFIG_H -I. -I../src -I../WINGs/WINGs -I../wrlib -I../src
-I/usr/include/freetype2   -I/usr/local/include
-DLOCALEDIR=\"/usr/local/lib/loca\"/usr/local/share/WINGs\"
-DDEBUG  -fno-strict-aliasing -g -O2 -c array.c
gcc -DHAVE_CONFIG_H -I. -I../src -I../WINGs/WINGs
-I../wrlib -I../src -I/usr/include/freetype2   -I/usr/local/include
-DLOCALEDIR=\"/usr/local/lib/loca\"/usr/local/share/WINGs\"
-DDEBUG  -fno-strict-aliasing -g -O2 -c bagtree.c
[...]
2008-11-05 18:03:07 +01:00