1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 04:48:06 +01:00
Commit Graph

2925 Commits

Author SHA1 Message Date
Tamas TEVESZ
444de5e6b6 Make asm code readable 2010-04-01 11:24:25 +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
7b9b7de172 Fix png 1.4+ builds
- png_check_sig was removed from png 1.4, use replacement fun, which is
  already present in 1.2.0 (cca. 2001)
2010-03-29 21:18:37 +02:00
Carlos R. Mafra
0c2d2c69b9 Use 'long' instead of 'CARD32' in wClientSetState() and wWindowSaveState()
The rationale is the same as in commit c7f2a189c4
("Fix the call to XChangeProperty() in 64-bit mode"), because we are
calling XChangeProperty() with format 32, which requires the type of
'data' to be 'long'.
2010-03-29 00:17:02 +02:00
Carlos R. Mafra
13ba5d5f5b Remove uncompiled code from src/window.c 2010-03-29 00:17:02 +02:00
Carlos R. Mafra
828cb7a147 Remove GRADIENT_CLIP_ARROWS from wconfig.h.in
...as it appears nowhere else in the source code.
2010-03-28 14:34:11 +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
Tamas TEVESZ
ea4645bc09 Add Cygwin to GCFB() (it is just like linux)
+ make stub give some clue
2010-03-26 21:08:17 +01:00
Tamas TEVESZ
28cbda550a Remove dead code from wrlib 2010-03-26 21:08:17 +01:00
Tamas TEVESZ
7d905787d2 Remove old unused Red Hat-specific configure checks 2010-03-26 21:08:17 +01:00
Tamas TEVESZ
0e12a076aa Remove looking for libxpg4 on FreeBSD 2010-03-26 21:08:17 +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
1f2b9999b9 Remove network support from WINGs
- nobody used it

Amend network stuff removal

still more wings network removals

[crmafra: squashed together three patches]
2010-03-26 21:08:17 +01:00
Tamas TEVESZ
55959b4f7e Half-assed fix to make autoconf bend
- this should make platform detection automagic
- also fixes debian builds that broke in the meantime
- fix osdep_darwin.c
2010-03-26 21:08:17 +01:00
Tamas TEVESZ
67a8a82670 Remove wmlib
was this ever used for anything? i checked a couple hundred dockapps,
no joy; there's nothing in debian (afaict) that build-depends on it,
so let's try doing away with it.
2010-03-26 21:08:17 +01:00
Tamas TEVESZ
83774951b7 Remove some dead weight from configure.ac and debian/rules 2010-03-26 21:08:17 +01:00
Tamas TEVESZ
298338c111 GetCommandForPid() for darwin/osx 2010-03-26 21:08:17 +01:00
Tamas TEVESZ
ab9c85a11d Add the BSD version of GetCommandForPid()
- tested on Net, Free, Open and DragonFly

- fix up the linux version (terminate argv with a null ptr)
- add error handling to file ops in the linux version
- add a stub version for platforms not supported
2010-03-26 21:08:17 +01:00
Tamas TEVESZ
294ea56d84 Introduce OS-dependent stuff
- move GetCommandForPid() into a separate file
- slightly rewrite it to be more readable along the way
2010-03-26 21:08:17 +01:00
Carlos R. Mafra
eee6551aff Remove python support from WINGs
As the README used to say, it was a unfinished work. If someone
wants to finish it after all these years it can be recovered
from the logs. But meanwhile let's not carry dead code around.
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
61a96e79c4 Trivial format string fixes 2010-03-26 21:08:16 +01:00
Martin Dietze
ef7c45df53 rebase in git pull for nightly build 2010-03-26 21:08:16 +01:00
Tamas TEVESZ
c7868fa405 Make inotify optional
This time keeping the ability to fall back to the old polling method.
2010-03-23 21:50:17 +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
9dadfe7a68 Sensible defaults
In the wmaker-dev list, Iain noted that:

  "I can see the benefit of this.  I know of at least two
   applications[1] which don't bother to set a class and instance.  Early
   versions of my OS X cycling patch for Window Maker caused a crash when
   faced with such windows because I forgot to check that these
   properties existed.  Nowadays it just refuses to do the cycling.

   Also Window Maker won't let you save attributes on such windows from
   the Inspector.

   [1] Interestingly they are competiting commercial applications: No
   Machine and Exceed onDemand."

[crmafra: edit commit log]
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
Martin Dietze
66bd06b5d5 Nightly build script with more robust handling of debian patches. 2010-03-23 14:32:25 +01:00
Tamas TEVESZ
43b1914f37 Remove long-dead plugins. 2010-03-20 18:42:56 +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
2ad40e0734 Maximus: Cleanup the code
By defining a struct containing the coordinates of the
windows (top, bottom, left, right, width, height) and
using a helper function to set up these coordinates, the
whole function becomes much cleaner and easier to read.
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
cef4fbb422 Remove unreferenced files 2010-03-17 16:48:24 +01:00
Tamas TEVESZ
9911ecd985 make wtrimspace() use internal api
make wtrimspace() use wings' own function for a task

semantics change: it used to segfault given null, now it returns null.
this doesn't affect any current use (there's exactly one..), and i see
no harm in this behaviour, and perceive this to be more natural.
2010-03-17 16:39:53 +01:00
Tamas TEVESZ
109e504262 Fold many functions into one
The result is not much more convoluted than the original was, but much shorter.
Several vararg macros were added -- no idea what !gcc compilers make of this.

The messages sent to these functions are inconsistent across the source tree.
I have now decided that the logging function will add the final newline -
messages will need to be modified accordingly.

I have no idea why the original implementation was as complicated and ugly as
it was. My guess is that it was anticipated that these are be called from
sighandlers, but why no snprintf when they are all stuffed up with vsnprintf...

Still, the result is not worse in this regard either.
2010-03-17 13:34:24 +01:00
Tamas TEVESZ
63e4338284 Remove unused WINGs/international.c 2010-03-17 13:34:24 +01:00
Carlos R. Mafra
8018da8149 Constify WMMatchDataProc and fix fallout
It addresses this warning

dialog.c: In function ‘LoadHistory’:
dialog.c:209: warning: passing argument 2 of ‘WMFindInArray’ from incompatible pointer type
../WINGs/WINGs/WUtil.h:455: note: expected ‘int (*)(void *, void *)’ but argument is of type ‘int (*)(const void *, const void *)’

but induces others in other places. One of them was this one

window.c: In function ‘wManageWindow’:
window.c:782: warning: passing argument 2 of ‘WMFindInArray’ from incompatible pointer type
../WINGs/WINGs/WUtil.h:455: note: expected ‘int (*)(const void *, const void *)’ but argument is of type ‘int (*)(void *, void *)’

which is fixed by constifying the arguments of matchIdentifier(). The other warnings are
fixed similarly.
2010-03-17 13:34:24 +01:00
Carlos R. Mafra
034339320f Constify the argument of wstrdup() 2010-03-17 11:12:54 +01:00
Tamas TEVESZ
de881d9c03 Kill redundant function 2010-03-17 11:12:53 +01:00
Carlos R. Mafra
e1d5ce7a51 Cleanup includes of wcore.h, defaults.h and pixmap.h
Several files were including others for no reason, and this slows
down the build time (but probably not measurable on a fast machine).
2010-03-17 11:12:53 +01:00
Carlos R. Mafra
b4b25fdf6a Remove redundant 'if defined' check
WindowMaker.h already #includes wconfig.h, which checks exactly
the same thing. So remove it from WindowMaker.h.

However, it would be better if WindowMaker.h didn't include
wconfig.h at all. The only reason I see for the inclusion is
the check for KEEP_XKB_LOCK_STATUS, defined in wconfig.h.
But that can be probably cleaned up too (I guess modern X's
enable XKB stuff that by default, by I haven't checked)

But anyway.
2010-03-17 11:12:53 +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
833128385f Add a new helper function, WMMkDirHier()
...which creates directory hierarchies under $GNUSTEP_USER_ROOT

- make WMWritePropListToFile() use this

readily solves the "run dialog history vs nonexistent state dir" case.

if other consumers are found for this, just de-static and move the
prototype to WUtil.h or some other appropriate place.
2010-03-17 11:12:53 +01:00
Carlos R. Mafra
9a2dbc5a5f Fix typos, remove commented out code etc 2010-03-15 19:55:52 +01:00
Carlos R. Mafra
939f46b870 Maximus: Simplify the +/- border width madness
Taking the border width into account was making it hard to follow the
algorithm, and complicating things usually lead to mistakes.

In fact, in trying to account for this +/- 1 pixel issue the maximus
geometry for the requested window would sometimes overlap another window
by one or two pixels (depending if it was on the right or left). Therefore,
applying the maximus geometry to this other window in sequence would
maximize it completely instead of finding the correct tiled geometry.

So that always bugged me. Now I got tired of it and decided to kill the
whole consideration of the border width, and simply put some "+ 1"
inconditionally to be on the safe side.

Now it can happen that the windows will stay away one or two pixels,
but trying to be 'good enough' is better than trying to be 'perfect'
and getting it wrong for corner cases.

And the matter is worse because the size of xterms are 'quantized', so
changing the position of the other windows by a few pixels result sometimes
in a overlap of +1 pixel, or a distance of 1 or 2 pixels. Furthermore,
the bottom of xcalc behaves differently from the bottom of a xterm or
xjed (for xcalc the ad hoc correction for bottom_0 must be -8 in total).

But now my tests show that things are OK, and I can use maximus
for all the windows in the screen and no overlap will occur (except
if one of the windows is a xcalc, I don't know why).
2010-03-15 19:49:32 +01:00
Carlos R. Mafra
ee569220df Remove NEWAPPICON #ifdefs
It wasn't defined anywhere and when I defined it, the compilation
did not finish:

appicon.c: In function drawCorner:
appicon.c:206: error: WScreen has no member named focused_texture
appicon.c:208: error: WScreen has no member named unfocused_texture
appicon.c: At top level:
appicon.c:214: error: conflicting types for drawCorner
appicon.c:193: note: previous definition of drawCorner was here
make[2]: *** [appicon.o] Fehler 1
make[1]: *** [all] Fehler 2
make: *** [all-recursive] Fehler 1

So let's simply remove those #ifdefs.
2010-03-15 17:50:17 +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
Tamas TEVESZ
8d0020cf9a Unused wsmap, begone!
- held only reference to wnew0, which was the only consumer
of wmalloc0, safe trip both of them.
2010-03-15 16:56:06 +01:00