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

414 Commits

Author SHA1 Message Date
Christophe CURIS
b5101fc8ae WPrefs: Added 'const' attribute to function parameters 2013-05-12 01:01:19 +01:00
Christophe CURIS
eb14bca73b WPrefs: Moved content of 'double.h' into 'WPrefs.h'
It is not a good idea to multiply the number of header files,
specially in this case where 'double.h' defined so few things
(and lacked the usual copyright notice / include guards).
2013-05-12 01:01:19 +01:00
Christophe CURIS
8238e4681a WPrefs: Move declaration of function into the common header
It is a bad idea to declare the prototype of an external function
in a file as it won't allow the compiler to cross-check it.
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
f73ccae798 Removed temporary allocation to build a path that is actually a constant
This allocation was certainly participating to memory fragmentation.
2013-05-11 00:17:27 +01:00
Christophe CURIS
fc262124cd WPrefs: Added a few comments in header file
Nothing really interresting, just separators to group definitions
by theme, using the same syntax that can be found in other headers.
2013-05-10 19:37:47 +01:00
Christophe CURIS
a4395c5764 WPrefs.app: Added const attribute to local string
Now that the WINGs functions are const-correct, it is possible to
set the attribute on the strings to help the compiler.
2013-05-09 16:56:28 +01:00
Christophe CURIS
0004d38ef8 WPrefs: Added const attribute to statically stored strings
Now that the function handling the configuration dictionnary are
const correct, the key stored in static array can be given the const
attribute.
2013-05-08 15:05:00 +01:00
Christophe CURIS
8517f3dcef WPrefs: Added the proper 'const' attribute to the dictionnary functions
A common argument to all these functions is the name of the key to
operate on, and this name is never modified by the functions. Marking
it as const reflects this, and can allow compiler to generate better
results thanks to this info.
2013-05-08 15:05:00 +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
Christophe CURIS
cacc04d4a2 Move the list of keyboard shortcut texts into the array of their config keyword
The config-file-keyword was defined in an array, but the user displayed
string was defined at another place, thus requiring special care when
modifying the list, to keep the same number of entries, in the same
order, ...

This was an open call for subtle bugs, so the keyword and user string
are now at a single place, making updates on the list easier and the
GUI generation code smaller.
2013-05-02 20:48:10 +01:00
Renan Traba
729886ef52 WPrefs: fix missing drawer image in Makefile.am 2013-04-12 09:54:58 +01:00
Carlos R. Mafra
f863dafef1 WPrefs: Avoid crash when config file does not contain wmdrawer settings
When first using the wmdrawer panel of WPrefs the settings

ClipAutoexpandDelay
ClipAutocollapseDelay
ClipAutoraiseDelay
ClipAutolowerDelay

are not yet saved in the user's config file and 'value' ends up
being undefined in showData() leading to a crash in adjustButtonSelectionBasedOnValue().

This patch is a workaround to make it possible to choose the config values for the
first time using WPrefs.
2013-04-12 02:52:41 +01:00
Carlos R. Mafra
311255a646 Fix compilation from merge conflict 2013-04-12 02:20:54 +01:00
Carlos R. Mafra
529ee0bd21 Merge branch 'wmdrawer' into next 2013-04-12 02:14:41 +01:00
Daniel Déchelotte
cf5fdca63d WPrefs: adds possibility to disable drawers from Docks panel 2013-04-12 02:14:10 +01:00
Daniel Déchelotte
5a6e1653ac WPrefs: new Docks pannel, to change auto-expand/collapse/etc delays 2013-04-12 02:14:10 +01:00
Daniel Déchelotte
4b44020488 WPrefs: consolidate the 2 createImages static functions into a global one 2013-04-12 02:14:09 +01:00
Iain Patterson
124442a811 Allow WPrefs to configure workspace switching keys.
Added MoveToWorkspace*Key, MoveToNextWorkspaceKey,
MoveToPrevWorkspaceKey, MoveToLastWorkspaceKey,
MoveToNextWorkspaceLayerKey and MoveToPrevWorkspaceLayerKey to the
keyboard shortcut panel of WPrefs.
2013-03-28 19:04:03 +00:00
Iain Patterson
cfdf1e92fe Allow WPrefs to configure the last used workspace key.
Added LastWorkspaceKey to the keyboard shortcut panel of WPrefs.
2013-03-28 18:58:23 +00:00
Andreas Bierfert
066de301df Teach WPrefs about OPEN_PLMENU
From 35f19d77874d1b50de5505b6b1cb31531e1c055a Mon Sep 17 00:00:00 2001
From: Andreas Bierfert <andreas.bierfert@lowlatency.de>
Date: Thu, 31 Jan 2013 22:35:42 +0100
Subject: [PATCH 3/3] Teach WPrefs about OPEN_PLMENU

Add option to WPrefs to read, add and edit OPEN_PLMENU menu entries
2013-02-10 11:26:33 +00:00
BALATON Zoltan
a657fafcce WPrefs: Fix single click activation button in Icon preferences
Forgot to connect the button to the corresponding defaults key so it
was not working properly.
2013-02-08 17:55:54 +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
Martin Frydl
914d4e06ef Added option to ignore minimized windows during cycling.
Added CycleIgnoreMinimized configuration option settable on Expert page in WPrefs.
When option is set, switch panel cycling ignores minimized (grayed) windows. They
are still visible and can be selected using left/right arrows or mouse click.
2012-11-28 00:07:13 +01:00
Christophe CURIS
8b6e96ab74 Moved parameters of WPrefs's expert check-buttons to a single place
The list of options in the Expert tab of WPrefs.app was filled using
hard-coded list of commands with static indexes and the related
usage were spread accross procedures. This was dangerous because
it could lead to mismatched indexes, the list length being also
variable, so it was hard to update.

This patch proposes to group all the options in a single place (a
static const array), so it is easy to add/remove/reorder the options,
and the code just parses this array based on its auto-calculated
size.
2012-11-18 17:23:20 +01:00
BALATON Zoltan
faa74a14b1 WPrefs: Fixed handling of options which default to true
Two problems caused Boolean options which default to true to be shown
incorrectly when the option was not already present in the defaults database.
First a typo (Enabled instead of Selected) caused the switch button to stay
off then because GetBoolForKey key returns False also when the option
is not set it would have been turned off while it should stay on to
reflect the default value of the option.
2012-11-17 20:32:11 +01:00
BALATON Zoltan
c7e3666e62 Made highlighting the AppIcon of the active app configurable at run time 2012-11-17 20:32:10 +01:00
BALATON Zoltan
2a025b2edd WPrefs: More moving around of options and tweaks to layout
Managed to squeeze two more options from the expert page to the
corresponding pages and also reorganised some widgets to avoid large
now unused spaces in one place and clipped text in the other.
2012-11-15 12:41:44 +00:00
BALATON Zoltan
92d52523c4 WPrefs: Move around some options between pages
Move bounce options from expert prefs to its own box on ergonomic
prefs to have them at one place which makes them somewhat more clear.
The options previously occupying this place have been moved to other
pages where they better belong.
2012-11-14 01:11:43 +00:00
BALATON Zoltan
eb51844fa8 WPrefs: Update translations 2012-11-13 21:16:57 +00:00
Carlos R. Mafra
2dc97e4f15 WPrefs: Remove pointless 'this is annoying' warning
Is it annoying to whom?
2012-11-12 22:50:49 +00:00
Rodolfo García Peñas (kix)
43c3526d21 WPrefs: XKeycodeToKeysym deprecated function
The function XKeycodeToKeysym is deprecated and should be replaced
by XkbKeycodeToKeysym.
2012-07-15 13:34:37 +02:00
Yuri Karaban
9d3d34599f Add "Center" window placement strategy
Center strategy: try to put window at the center of the usable area. If
window would overlap with existing windows, fall back to "Auto"
placement strategy.

It's very useful for fresh workplaces.
2012-06-10 18:25:47 +01:00
Tobias Stoeckmann
72546aab81 Get rid of NEW definition.
The NEW definition merely calls wmalloc now, therefore it is not needed
anymore.  Pointed out and requested by Carlos R. Mafra.
2012-05-07 20:36:10 -03: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
Iain Patterson
8352c9ef60 Allow relaunch with shortcut key.
Use the WindowRelaunchKey shortcut to examine the WM_COMMAND property of
the active application's main window and launch a new instance of the
application using the retrieved command line.
2012-04-04 12:12:12 +01:00
Takeo Hashimoto
ebe9a27e8d Japanese translation updated 2012-03-11 02:41:53 +01:00
Giuseppe Gatta
a97699c513 Enable toggling of AppIcons bouncing
I have noticed that in WindowMaker 0.95.2 application icons bounce
when some actions are done, like starting a program, etc.

Disabling Superfluous or Animations also disabled the minimizing
animation which I am used to, so doing that didn't do the job.
Everyone has got his or her own tastes, but I did not like the new
behavior and didn't find any way to disable it without affecting other
things.

So I made a patch to fix just that. It adds a new option in WPrefs.app's
Expert Tab called "Do not make AppIcons bounce" which when enabled,
disables any type of bouncing for Application Icons, restoring the
old behavior.

Bouncing stays the new default behavior.
2012-02-23 11:58:57 +00:00
Kamil Rytarowski
7d11577a82 Stop using old /usr/X11R6 directory
...it's replaced in xorg-x11 by standard /usr

Switch from /usr/X11R6 to /usr in all files except debian and FAQ.
2012-02-17 10:50:12 +00:00
Iain Patterson
8d7c725b7b Made ARROWLESS_KBD a preference.
Replace the ARROWLESS_KBD #define with the ViKeyMenus preference.

When ViKeyMenus is TRUE, users can type h/j/k/l to scroll around menus.

Since ARROWLESS_KBD was previously undefined by default, ViKeyMenus is
FALSE by default.
2012-02-10 12:39:24 +00:00
Rodolfo García Peñas (kix)
edeca34be9 WPrefs: Remove extra include of src/wconfig.h
The file ../src/wconfig.h is included twice, remove one entry.
2012-01-22 10:19:05 +00:00
Rodolfo García Peñas (kix)
3ae34b958c WPrefs: Remove duplicated function captureShortcut()
The function captureShortcut() is implemented in both files KeyboardShortcuts.c
and Menu.c, with just a minor difference regarding the conversion to upper case.

To unify them, define a new function which includes a new boolean paramenter to
dictate whether the upper case conversion should be done or not.
2012-01-20 21:50:12 +00:00
Carlos R. Mafra
69d2e51876 WPrefs: Remove trimstr() and use wtrimspace() from WINGs
There's no need to have a private function while there's one in WINGs.

Besides that, it does not remove trailing whitespaces appropriately as I
just tested by adding trailing space in the shortcut captured by WPrefs.
It is not trimmed before saving it:

[mafra@Pilar:Defaults]$ grep CloseKey WindowMaker
  CloseKey = "Mod1+C    ";

Using wtrimspace() fixes that and even saves 208 bytes of code:

[mafra@Pilar:WPrefs.app]$ size KeyboardShortcuts.o.*
   text    data     bss     dec     hex filename
   7703       0       0    7703    1e17 KeyboardShortcuts.o.new
   7911       0       0    7911    1ee7 KeyboardShortcuts.o.old

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2012-01-20 21:43:13 +00:00
Rodolfo Garc??a Pe??as (kix)
6ae01b9d90 WPrefs: Fetch default menu from system path
If you delete the file ~GNUStep/Defaults/WMRootMenu and run WMPrefs
and go to the Menu Edit tab, it will show a dialog about keeping the menu or
discarding it. If you discard it then WPrefs shows an error:

"Could not open default menu from
'/home/user/GNUStep/Library/WindowMaker/plmenu"

The problem is at WPrefs.app/Menu.c:1424, and it happens because it tries
to load the default menu from the user's GNUstep home, but plmenu is not
copied there during the installation.

Of course, the file doesn't need to be copied to the users home, so
WPrefs should try to read it from /usr/share/WindowMaker/plmenu (Debian)
or /usr/local/share/WindowMaker/plmenu (upstream).
2012-01-12 22:07:01 +00: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
Ambrus Szabo
a750fe03f4 opaque resize
WPrefs:
 WindowHandling page: Mouse opaque resize
 Expert page: Opaque move and resize with keyboard
2011-03-30 23:32:37 +02: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
Carlos R. Mafra
751b6e7938 WPrefs: Update ballon text for "Window Focus Preferences"
Thanks to Camille d'Alméras for pointing it out.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2011-01-31 12:25:20 +01:00
Carlos R. Mafra
bbaa42240f WPrefs: Update po/Makefile.am to reflect file deletion
Otherwise 'make WPrefs.pot' inside WPrefs.app/po fails.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2011-01-31 12:10:24 +01:00