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

114 Commits

Author SHA1 Message Date
Christophe CURIS
f29fba2c83 InfoPanel: Added display of memory fragmentation information
This information is displayed only when debug mode was enabled to
avoid confusing users.
2013-05-10 15:48:33 +01:00
Christophe CURIS
c253c5a7c7 InfoPanel: Use a more user-friendly separator to display supported image formats 2013-05-10 15:48:33 +01:00
Christophe CURIS
441145cfc0 InfoPanel: Minor fixes for what must be translated and what does not need to 2013-05-10 15:48:33 +01:00
Rodolfo García Peñas (kix)
aa5be46e94 InfoPanel: Added info about XRandR in the info dialog
This patch includes info about XRandR extension in the info panel
dialog. If wmaker was compiled with xrandr support, then the dialog
show the XRandR info. The info includes if the X-Server supports or not
XRandR (wmaker could be compiled with XRandR support, but the X Server
may not include XRandR extension).

The string was separated in two by Christophe Curis to allow translation,
as suggested by Alexey I. Froloff.
2013-05-10 15:48:33 +01:00
Christophe CURIS
af403073f0 Fixed memory leak due to non-freed property list structure
The history is actually loaded from a file into a property list that
is then converted to an array. The intermediate property list was
not freed, which led to memory leak.

It looks like it was a tentative of optimisation to avoid duplicating
an already allocated string and re-use the pointer instead, but this
means it is not possible to free the original container as it would
free the string too.

There is a better way to do this, but it requires an API change on the
WUtil library so it is left for a future improvment.
2013-05-08 15:05:00 +01:00
Christophe CURIS
5a5216ffb9 Changed method to limit the number of History entries loaded
The previous code limited the number of entries that were read into
the history array, but the user is expecting a maximum on the
number of entries displayed. This can make a little difference in
two cases:
 - if there are duplicate entries (dups are checked for and removed)
 - if some entries are not strings (unlikely, but not impossible)

The new code just stops adding history entries when the user
specified count is reached.
2013-05-08 15:05:00 +01:00
Christophe CURIS
bcee010082 Added a few 'const' to filename parameters for History functions
Name of file is, as usual, a read-only parameter.
2013-05-08 15:05:00 +01:00
Rodolfo García Peñas (kix)
41da1b30db New file misc.h
This is the new file misc.h, with the function prototypes for misc.c.
This file is created using misc.c and removing the prototypes from funcs.h
2013-04-17 10:13:25 +01:00
Rodolfo García Peñas (kix)
c3a1c76b44 get_default_icon_filename rewritten
The function get_default_icon_filename(), now get_icon_filename(),
was working in a bad way. Before this patch, the function always
searched the default icon in the second search:

-     file_name = wDefaultGetIconFile(winstance, wclass, True);
+     file_name = wDefaultGetIconFile(winstance, wclass, False);

For this reason, the argument default_icon didn't work.

This patch change it. Now, if the default_icon is false, the function
can return NULL, then other functions can do the correct work. For
example, now wDefaultGetImage() doesn't need do nothing, because the
default_icon is set to True. get_icon_filename() checks if the
icon exists in the disk before returning it (except for default icon
in get_default_image_path(scr).
2012-11-10 19:42:24 +00:00
Rodolfo García Peñas (kix)
bef6555b6a noDefault changed to default_icon
The functions wDefaultGetIconFile(), get_default_icon_filename() and
get_generic_value() use the argument noDefault in order to avoid searching the
default icon. This double negation is difficult to read though. This patch
changes it to be True if the default icon should be included or false if not.

This patch changes the noDefault argument to default_icon, then the
True is now False and False is True.

The main change is at get_generic_value():

-       /* Search the default icon name - See noDefault argument! */
-       if (!value && !noDefault) {
+       /* Search the default icon name - See default_icon argument! */
+       if (!value && default_icon) {

Because the functions wDefaultGetIconFile() and get_default_icon_filename()
mainly forwards the noDefault argument to get_generic_value().
2012-07-18 11:12:01 +01:00
Rodolfo García Peñas (kix)
39fa6d9e2c Remove dup code from getWindowMakerIconImage()
The code to find the icon in the function getWindowMakerIconImage()
is duplicated, because it is the same code as in get_default_icon_filename()

This patch includes the prototypes of get_default_icon_filename()
and get_default_icon_rimage() in defaults.h, so these functions
can be used in other files.
2012-07-04 21:20:18 +02: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
Carlos R. Mafra
799134f59b Remove wShowGNUstepPanel() etc
The only place where this function is called is from a double click
in the first icon of the dock, and only if there's no program already
associated with it.

This is a bit superfluous and most people have defined the first
icon to call WPrefs instead and end up never seeing that panel.
And since the last commit ("Change behaviour of the GNUstep dockapp"),
this is now also the default behaviour of Window Maker.

Furthermore, the panel itself is not accurate. Window Maker is not part
of the GNUstep project.
2012-02-19 10:05:31 +00:00
Carlos R. Mafra
3bc48f0893 Info panel: Shorten memory line and simplify code a bit
With the fonts I use here, the memory information line in the "Info panel"
did not fit inside the window. So make that line a bit shorter by displaying

	Total memory allocated: 2600 kB (in use: 2182 kB)

instead of

	Total allocated memory: 2600 kB. Total memory in use: 2182 kB.

Furthermore, the surrounding code was a bit convoluted to display either

"Additional support for: WMSPEC"

or

"Additional support for: WMSPEC and MW"

As WMSPEC is always present and it doesn't seem we are adding more stuff
to support, one can do the same with a shorter code which reads a little
bit better.
2012-01-25 17:40:18 +00: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
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
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
4de3d69934 Fix typo enviroment
s/enviroment/environment/ both in the .c file and in all .po files that
already contain a translation for the string. The latter prevents
wrongly marking the translation as fuzzy.
2010-10-07 12:04:30 +02:00
Carlos R. Mafra
4041278f48 Address some sparse warnings
Plain integer as NULL pointer, non-ANSI function declaration etc.
2010-04-14 18:39:17 +02: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
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
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
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
Carlos R. Mafra
f9792a042a Remove SILLYNESS
This code makes wmaker a little bit bigger for no gain at all. I could
undefine SILLYNESS and forget it, but I actually also want a clean
source code to read. And the less code the better.

So now I won't get a different Info dialog on Christmas, but
my wmaker will also not carry around that code in the other 364 days
of the year.

As a result, wmaker gets ~1.7 % smaller

   text	   data	    bss	    dec	    hex	filename
 448043	  17424	   8200	 473667	  73a43	wmaker.new
 455340	  18360	   8328	 482028	  75aec	wmaker.old
2009-10-17 01:38:53 +02:00
Carlos R. Mafra
96b9b22cb2 Remove #ifdef SYS_SIGLIST_DECLARED constructs
SYS_SIGLIST_DECLARED was defined nowhere and it was
clearly some dead code.
2009-10-17 01:05:28 +02:00
Carlos R. Mafra
15e37ff942 Remove #ifdef NETWM_HINTS constructs
NETWM_HINT is always defined in src/wconfig.h.in, so
let's remove it from there too.
2009-10-12 01:00:19 +02:00
Carlos R. Mafra
2765bec3e4 Remove sound support
Two reasons for removing it:

    1) I won't ever want to hear useless sounds

    2) The sound support is a bit of a joke. The code is there but you have
       to hunt it somewhere else (not in any repository that I know of).
       In my 10 years of using wmaker, I never used it for this reason.
       Now I consider having no sound in Window Maker a feature, and I like
       it that way. So there is no point in carrying useless code around.

PS: There is still the code in WPrefs to be removed.
2009-10-09 20:04:47 +02:00
Alexey Voinov
05720d9707 Add history to some dialog boxes
This patch adds history to some dialog boxes. To use it replace %a with
%A in menu file (like in "Run..." menu item). You can specify third
parameter to %A to use different histories for differen dialogs.

All history files is kept in ~/GNUstep/.AppInfo/WindowMaker/ and the number of
history lines controlled by DialogHistoryLines parameter (one for
all dialogs) defaults to 500 lines.

It also adds Tab completion.

Origin: ALT/Sisyphus Linux, Alexey Voinov <voins@altlinux.ru>
2009-09-03 15:44:11 +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
59fc927dc9 Make drawIconProc() static
It is used only inside src/dialog.c
2009-08-20 00:57:03 +02:00
dan
90c0e656f1 replaced windowmaker.org with windowmaker.info everywhere 2006-04-25 19:35:14 +00:00
dan
42191340fd - Improved Info panel display.
- Fixed missing library paths when linking some binaries on certain
  platforms with a recent pkg-config
2006-04-25 18:59:24 +00:00
dan
880880162b Fixed bug that caused wmaker to crash when kplayer was switched back from
fullscreen mode to windowed mode.
2005-03-22 23:15:11 +00:00
dan
2f56373cc2 fixed issue with window being moved by 1 pixel up and left when the window
move was initiated by the client
2005-03-13 00:15:13 +00:00
dan
0d9b73cd74 - Fixed issues with crashing dialog not working
- Keep menu and title text at 12px since there is not constrained by width
- Removed some obsoleted options from wconfig.h
- Added a lighter image for the switch panel
2004-10-25 02:23:41 +00:00
dan
e3c67d55de - replaced VirtualEdgeThickness option with EnableVirtualDesktop (boolean)
- some code cleanups in the virtual desktop.
2004-10-24 22:45:06 +00:00
dan
08e811aae7 - If fonts are specified as xlfd, convert to fc names before creating them.
This was we internally only deal with fc names and properties. It will
  incur a small performance hit as the font needs to be parsed/unparsed,
  but this is only for backward-compatibility to support old xlfd names.
  People are encouraged to swtich to fontconfig names.
- WINGs no longer adds sans as a fallback for internal fonts. It is
  automatically done by fontconfig (if it can't find the requested font
  it will use the closest match which is the default font: sans-serif)
- Added code to honor the AntialiasesText global option
- Fixed style names for WMCopyFontWithStyle()
- Added fonts in style files where they were missing. Also changed some
  fonts to better defaults.
2004-10-22 00:21:51 +00:00
dan
27b9e27ae0 - Moved fullscreen level back above menus
- Small changes to the info panel messages
- Different geomview
- Fixed problem with waitpid returning <0 in monitor
2004-10-18 01:30:02 +00:00
dan
6cfad0b10f - Removed obsoleted options from WMGLOBAL and from the WINGs internal
structures (no longer needed with xft)
- Fixed default system font names (converted from xlfd to fontconfig names)
- A bit of code cleanups related to xft
- Replaced harcoded xlfd font names in wmaker and WPrefs with fontconfig
  names.
2004-10-17 06:27:51 +00:00
dan
0c09179f01 - Removed support for legacy systems: OpenLook, KDE-2.x, Gnome-1.x
- Removed #define and #ifdef XFT constructs, as XFT is on all the time
2004-10-14 23:05:20 +00:00
dan
6830b05716 changed indentation to use spaces only 2004-10-12 21:28:27 +00:00
dan
9aca0d5f6e - Check whether libXft is at least version 2.1.2 else refuse to compile.
- Fixed bug in icon chooser dialog that could cause a segmentation fault
  in some cases (Pascal Hofstee <caelian@gmail.com>)
- Fixed crash in asm code in wrlib, with new versions of gcc.
- Fixed bug in the x86_PseudoColor_32_to_8() function which incorrectly
  used the r, g, b fields in the conversion.
- Fixed x86 ASM code in wrlib to work on 64 bit architectures.
- Fixed the focus flicker seen with some apps (notably gtk2)
  (Alexey Spiridonov <snarkmaster@gmail.com>)
- Fixed all crashing bugs that were generated by wmaker starting with the
  WMState file missing.
- Added NetWM support (a modified version of the patch originaly written
  by Peter Zijlstra <a.p.zijlstra@chello.nl>)
- Applied patch to enhance the Virtual Desktop behaviour, and to integrate
  it with the NetWM code (Peter Zijlstra <a.p.zijlstra@chello.nl>)
- Applied a few xinerama and placement fixes (Peter Zijlstra
    <a.p.zijlstra@chello.nl>)
- Fixed memory leak in dock code.
- Fixed and enhanced the text wrapping in WINGs.
- Fixed the layout of some elements in WPrefs.app
- Added workaround for aplications that don't set the required hints on the
  client leader window, but they set them on normal windows (observer with
  KDE 3.3.0 mainly). This will allow these apps to get an appicon again.
  (they should be fixed still)
- Added workaround for applications that do not set a command with
  XSetCommand(), but instead they set the _NET_WM_PID property. This works
  with operating systems that offer a /proc interface similar to what linux
  has. (This also is to fix problems with KDE 3.3.0 apps, but not only them).
- Fixed bug with autostart and exit scripts not being executed if user
  GNUstep path was different from ~/GNUstep (when setting GNUSTEP_USER_ROOT)
- Added utf8 support in WINGs (removed old X core font code)
- Added utility to convert old font names to new font names in style files
2004-10-12 01:34:32 +00:00
kojima
57869b667b minor dumb bug.. 2004-08-22 03:55:59 +00:00
kojima
0445dd5c18 changed encoding of (c) thing in about panel to utf-8
changed techdraw style size display to use X core fonts
2004-08-21 21:29:44 +00:00
dan
474c4caf94 reverted the last test commit (duh) 2004-07-16 18:50:58 +00:00
dan
109bb540ec another test for cvs notifications 2004-07-16 18:18:36 +00:00
dan
e7d0c5d9e9 - Added xdnd v3 support in WINGs (Sylvain Reynal <sreynal@nerim.net>)
- CVS should compile again
2004-04-07 02:50:52 +00:00
dan
b0d72a3db2 - Fixed aspect of window list menu (window name was too close to workspace
indicator)
- Fixed menu panel in WPrefs.app. Explanatory text did not fit into the label
2003-07-01 23:00:25 +00:00
kojima
8904783aee show whether aa text is enabled in info panel 2003-06-09 05:37:38 +00:00