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

1844 Commits

Author SHA1 Message Date
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
Carlos R. Mafra
4688e1b568 Add more info to the NEWS file etc
...and remove MIRRORS file, update INSTALL and README.
2010-03-15 16:55:19 +01:00
Johann Haarhoff
484b19ba89 Add info about Resize, Maximus and LR Maximize to NEWS
Added information about new functionality added to wmaker between
0.92 and 0.94-crm.
2010-03-14 22:24:46 +01:00
Johann Haarhoff
0db4d7885b Make CTRL+Wheel less intrusive
This patch only calls XGrabButton for CTRL+Button4 and CTRL+Button5.
This leaves CTRL+Button1-3 to the application.

This then removes the functionality of moving a window between
workspaces with CTRL+Button1 and CTRL+Button3
2010-03-14 22:19:08 +01:00
Johann Haarhoff
744ccb85d2 CTRL+Wheel Horizontal Resize + extras
This patch constrains MOD+Wheel to vertical resize, and adds
CTRL+Wheel horizontal resize. Two resize in both directions, you
have to use CTRL+MOD+Wheel.

To enable this functionality I have to grab all CTRL+Mousebutton
events in wmaker, which stops them from reaching the application.
This definitely hurts application functionality in some apps, for
example the "VT Fonts" (CTRL+Button3) menu in xterm is no longer
accessible. To stop this from happening use the "Do not bind mouse
clicks" window attribute for the apps in which you want to disable
this.

Because wmaker now controls all CTRL+Mousebutton events, I also
added CTRL+Button1 and CTRL+Button3 shortcuts that will move a
window back and forth through your workspaces without changing its
position or size.
2010-03-14 22:10:24 +01:00
Carlos R. Mafra
e37db24efe Remove reference to sound support from README.* 2010-03-12 10:44:24 +01:00
Carlos R. Mafra
3473a11787 Remove COPYING.OPL
The only (old) reference to it was from Marco's artwork in
WPrefs, but that was later changed to the GPL.
2010-03-12 10:35:03 +01:00
Carlos R. Mafra
6d6d53a350 Delete reference to non-gpl license in README.pt
The icons from Marco are licensed under the GPL (see
Changelog in commit f65c549814)
2010-03-12 10:34:54 +01:00
Carlos R. Mafra
51885365a6 Convert README.pt to UTF-8 2010-03-12 10:34:54 +01:00
Carlos R. Mafra
0049b5bc8c Remove references to non-gpl artwork license
The non-gpl warnings in WPrefs.app/tiff/README
and WPrefs.app/README were misleading, because
they were refering to Marco van Hylckama Vlieg's
work which was licensed with OpenContent License.

But as Alfredo Kojima wrote in the Changelog in
commit f65c549814 from 30.03.2010,
Marco's icons were licensed with the GPL.

Furthermore, in an email to wmaker-dev on 10.03.2010,
Marco confirmed:

  "Anyway, I have no problem with the artwork being
  licensed under GPL or whatsoever."
2010-03-12 10:33:01 +01:00
Carlos R. Mafra
2901a153ce Remove ancient 'DBase 3' data file
Pointed out by Tamas TEVESZ.
2010-03-09 22:50:52 +01:00
Johann Haarhoff
6b791d8a89 Add a trailing "/" to dirs in dialog autocomplete
The autocomplete feature in the "Run" dialog now adds a trailing "/"
when autocompleting directory names. This does three things:

1) shows you that you are completing a directory and not a filename,
2) saves one character of typing, and
3) makes it behave more consistent with shell (bash) autocompletion
2010-03-09 10:24:33 +01:00
Martin Frydl
1f3adb0ea5 Patch for WINGs buffer overflow
I've found a buffer overflow problem in RSmoothScaleImage. There are
some scaling calculations involving floats which are finally converted
to integers. Since such conversion does not round the number, just
truncates the decimal part, sometimes the number is smaller than it
should be. As a result, smaller buffer is allocated for picture
scaling and thus buffer overflow occurs.

Strange thing is that this bug has not appeared earlier so it probably
has something to do with newer gcc or glibc (I switch from
"prehistoric" Fedora Core 5 to Fedora 12).

<What about the symptoms?>

There were several ones, probably depending on application version and
compilation flags. First, it just stopped responding. Looking at the
process with strace I saw it locked in some FUTEX wait (unfortunately
I don't have the logs). Second, it just crashed. And last I got
complaint from glibc about double free or corrupted heap before
malloc. I've found the bug through wmweather+ dockapp, versions 2.9
and 2.11 (http://sourceforge.net/projects/wmweatherplus/), I've never
encountered it in WindowMaker itself.
2010-02-26 13:15:18 +01:00
Nicolas Bonifas
ad853b386e Removed unused version of RScaleImage() in wrlib/scale.c
... as the "broken_code" preprocessor symbol appears nowhere else.
2010-02-26 13:08:42 +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
6367bf5234 Remove HEARTBEAT #ifdef's 2010-02-11 10:29:26 +01:00
Carlos R. Mafra
708cf2d2a2 Remove unused stuff from src/defaults.c 2010-02-11 10:29:14 +01:00
Carlos R. Mafra
6723aa55aa Remove old backward compatibility code
Once upon a time (< 2005) the CachedPixmaps directory was located
at ~/GNUstep/.AppInfo/ and that was later moved to
~/GNUstep/Library/WindowMaker. So Dan Pascu introduced this function
in 24519b6292 to make the convertion
automatically to users back then.

As it is highly unlikely that there is an old-timer wmaker user still
running a pre-2005 wmaker which suddenly decides to switch to wmaker-crm
and runs into trouble with his CachedPixmaps folder, let's simply remove it
to make defaults.o 1.8% smaller (596 bytes).
2010-02-11 10:29:14 +01:00
Martin Dietze
e54f763f14 Changed runtime dependency libjpeg62-dev to libjpeg-dev
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=569245
2010-02-11 10:29:05 +01:00
Carlos R. Mafra
914d984422 Add new WPrefs German strings
With thanks to Martin Dietze!
2010-02-02 11:05:46 +01:00
Carlos R. Mafra
ba4c4bd61a Regenerate WPrefs German translation file
No new translations were added. The .po file was recreated with

make WPrefs.pot
msgmerge de.po WPrefs.pot > de.po.new
(remove old strings from it)
mv de.po.new de.po
2010-02-02 10:56:01 +01:00
Carlos R. Mafra
585307ba39 Add new German translated strings
It was fun trying to translate them, but even after several
minutes of deep thoughts about the different cases etc I managed
to translate them wrongly.

So I thank Martin Dietze for kindly fixing them!
2010-01-22 19:24:04 +01:00
Carlos R. Mafra
f1980ce1f1 Re-create German translation file
I wanted to learn some German and got curious to read the Window Maker
translations. After noticing that some strings with translations
were already removed from the main source I decided to recreate the
German .po file to get rid of those messages.
2010-01-22 19:21:51 +01:00
Carlos R. Mafra
23a790da1d Add new style 2010-01-22 18:22:53 +01:00
Alexey I. Froloff
7793bb9d67 Turn anti-aliasing on by default. 2010-01-22 01:51:24 +01:00
Carlos R. Mafra
366cb8367b Add a few instructions to the WPrefs.app/po/README
Just in case someone wants to help.
2010-01-21 19:32:15 +01:00
Carlos R. Mafra
422fedbc4b Remove mkpatch script
I don't need it, git should handle everything.
2010-01-16 17:09:34 +01:00
Martin Dietze
c89cb142ba Small fix for wmaker nightly build script 2 2010-01-12 14:59:35 +01:00
Carlos R. Mafra
72dfe4aa89 Remove VIRTUAL_DESKTOP code
Even the option to enable "virtual desktop" in configure.ac was
commented out...and I would never intend to use it anyway.

So let's just remove the ~800 lines of #ifdef'ed code to have a
cleaner code base to read when bored.
2010-01-09 13:48:06 +01:00
Martin Dietze
4e90a87b14 Small fix for wmaker nightly build script 2010-01-09 13:48:06 +01:00
Carlos R. Mafra
f55eef413f wmaker-0.94.0-crm
I am calling it -crm so that people won't confuse its non-official status.
wmaker-0.94.0-crm
2010-01-09 13:48:06 +01:00
Carlos R. Mafra
643e49f190 Remove [raise,lower]clip shortcut keys
The raising and lowering of the clip is already taken care of
by the "ClipRaiseLowerKey" shortcut.

wmaker gets a bit smaller for free:
   text    data     bss     dec     hex filename
 449483   17384    8208  475075   73fc3 src/.libs/wmaker.old
 449307   17256    8192  474755   73e83 src/.libs/wmaker.new
2010-01-09 13:47:57 +01:00