This patch is used to fix the Debian bug #140181
It updates the NumLockMask function to report the mask and
call XFreeModifiermap when needed.
It also modifies capture_shortcut function to be able to use Super keys
and report numeric keypad when pressed (aka now detects correctly
if the numlock is enabled or not).
This patch is adding miniwindow apercu when the mouse
is over the miniwindows.
To enable it you have to run WPref, in Miscellaneous Ergonomic
Preferences, check miniwindow apercus.
Then, you will be able to see a screenshot of the app when the mouse
is over the miniwindow.
Having all these information spread in different places makes it error
prone when wanting to add/remove/change something in the list are there are
many unrelated places to keep in sync.
By merging everything in a single struct array it is a lot easier to
maintain this list.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Having all these information spread in different places makes it error
prone when wanting to add/remove/change something in the list are there are
many unrelated places to keep in sync.
By merging everything in a single struct array it is a lot easier to
maintain this list.
Took the opportunity to properly document a little hack which is used to
avoid complex handling for a special case.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
When a list has a fixed size, it is better to use the size of the list
instead of an end-of-list mark because it avoid unnecessary memory usage
and ease compiler's optimisation task.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
When defining enums as types instead of simple enums allows to use these
types at the places where the corresponding enum values are expected, then
allowing the compiler to check that, potentially reporting incorrect use
of values to the user.
This patch adds the type for the gradient style for RRender*Gradient.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This patch adds the ability to set the colors for IconTitleColor, IconTitleBack,
ClipTitleColor, and CClipTitleColor, the only four colors set by setstyle which
previously were not configurable using WPrefs.
The icon in the preview window appears as a miniwindow if IconTitleColor or
IconTitleBack are being configured and as the clip if ClipTitleColor or
CClipTitleColor are being configured.
Having the warning displayed will help devs to understand what is going
on and where to look at for a fix.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As pointed by Coverity, the allocated value returned by XGetModifierMapping
is assumed to be non-NULL everywhere except when releasing it.
Removed this last check (useless) and added a little check at the beginning
to avoid an (improbable) crash.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As pointed by Coverity, the functions WMCreatePLString return a newly
allocated WMPropList, which must be released when not needed anymore.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As reported by Coverity, the return string of WMGetTextFieldText is
malloced so it needs to be freed.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As pointed by Coverity, the string returned by 'WMGetTextFieldText' is
allocated dynamically, so it must be freed when not needed anymore.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As pointed by Coverity, the function 'WMGetTextFieldText' already allocates
memory for its return string, so it is not necessary to wstrdup it.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As pointed by Coverity, if there is a problem when reading the binary data
of an RImage from a file, the area allocated to store it would not be
freed.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As pointed by Coverity, the PLArray that is created to store the return
value of the function 'processData' can be left allocated if some case
handling decide to return NULL instead.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As pointed by Coverity, there is a possible NULL pointer dereference in the
code that extracts the selected modifier (from a popup button list).
The code assumes that there is always a space between the core name of the
modifier (which is used for saving) and the more user friendly name. This
is true if the list could be successfully generated in fillModifierPopUp,
but it may not be the case if that function has to fall-back to the
default list (XGetModifierMaping failure).
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As pointed by Coverity, it is possible to dereference the NULL pointer in
the function 'browseForFile'.
This should have been reported by the compiler ("possible use of
uninitialised variable") but the assignation of a default value to the
variable 'lPtr' hides this, but as the default value is not a good one then
the code could crash.
This patch removes the default value, so we may have some info from the
compiler and handles the case smoothly.
It also fixes a potential memory leak pointed also by Coverity in the
case where the string returned by WMGetFilePanelFileName would be a 0
length non-null string.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
As pointed by Coverity, the return value of 'sscanf' is not checked, which
may not be a problem because the fall-back value for 'i' is provided before.
However, if sscanf fails there is no guarantee that all implementation would
leave 'i' untouched in case of parsing error, and for convenience it is more
logical to write the code is such a way that the value assignment looks like
the fall-back value it is.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Long time ago I added this option so I could have wallpaper filling my
screen while preserving aspect ratio.
Seems like I didn't add it to WPrefs
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
As raised by Carlos R. Mafra and Doug Torrance, when an image is used in a
texture but the image cannot be loaded, there are some case where WPrefs
misbehaves.
This patch display a warning in every case where the image could not be
loaded, and always switch to black texture as a fallback, which was not the
case previously.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
In response to Amadeusz's comments regarding my patch "WPrefs: Add ability to
edit FrameBorderColor/FrameSelectedBorderColor", this new patch attempts to
reduce the confusion between focused and selected windows. In particular,
only the frame border color for non-selected windows appears in the preview.
The frame border color for selected window colors can still be changed, but it
does not appear in the preview. In addition, the hand icon has been removed
from the preview for these two options.
I also looked into the possibility of adding a new border color for focused
windows. This appears to be nontrivial, as the border color belongs to
WFrameWindow, but the state of being focused belongs to WWindow.
As part of the process, some #defines were turned into enums. Also, the *_COL
when needed.
This brings the code for colors in line with the code for textures, and
allows us to use them as array indices to improve readability, e.g.,
colorOptions[MTITLE_COL] instead of colorOptions[3].
WPrefs.app/Appearances.c contained code for an unfinished feature
in the appearances panel of WPrefs, a tab for setting the background.
Since this feature has now been implemented as part of the texture
tab (see commit c2aca1a ("WPrefs: Set workspace background")), there
is no reason to keep this code.
Previously, when an image could not be loaded by WPrefs when rendering textures
for the Appearances panel, a segfault would occur. This could happen, e.g., if
a user moved or deleted an image file without editing their ~/GNUstep/Defaults/
WindowMaker file.
This patch first checks if a texture contains an image, and if it does, it
checks to see if that image can be loaded. If it can't, a solid black texture
is loaded instead.
The patch also has the added benefit of combining some of the code used for
rendering both pixmap and textured gradient textures.
This patch enables users to set the workspace background (WorkspaceBack) in the
Appearance Preferences section of WPrefs. It appears as a new item in the
popup menu in the Texture tab, in the list of textures below, and a preview
appears in the background of the preview panel on the left.
This patch allows users to edit the two fonts (SystemFont and BoldSystemFont)
used in WINGs widgets using WPrefs. Note that changes will not take effect for
WINGs applications which are currently running.
A common feature in several desktop environments is the ability to bring up
a "run application" dialog via a keyboard shortcut (frequently Mod1+F2). This
feature has been available to Window Maker users only through the root menu.
This patch adds the ability for a user to set up a keyboard shortcut to
accomplish this, either via WPrefs or by editing ~/GNUstep/Defaults/WindowMaker,
e.g., with
RunKey = "Mod1+F2";
Code from the execCommand function in rootmenu.c has been copied almost directly
into the handleKeyPress function in misc.c to accomplish this.
Some strings have been changed in the source code, this patch is updating
the corresponding 'msgid' in the 'po' files so that the translated words
will be found, and will not be lost in case of an automatic update on the
file.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The icons were too tightly packed into their buttons and were not even
fully displayed, and the label of the checkbox could be split on 2 lines
unnecessarily.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
A number of files have been added to the Window Maker source tree but are not
included in the tarball produced by "make dist" because they have not been added
to EXTRA_DIST in the appropriate Makefile.am. They are:
- Dutch translation files (commit afc90)
- email-clients.txt (commit 385db)
- WPrefs source files removed from WPrefs_SOURCES (commit 21dfd)
This patch adds these missing files.
Because the existing nl locale files are ancient and obsolete,
the user interface stays mainly in English with hardly Dutch text
showing up.
This is a complete translation in 6 parts from scratch, using the
current (pl)menus and Makefile generated .pot files. These files
provide a very good, and thoroughly checked user interface in the
Dutch language.
Adding me as a maintainer in related README files; removing previous
maintainer (e-mail bounced).
Removing unnecessary executable bit from pt.po on the fly.
This explicit \n caused a bad line split in the displayed text; without it
the natural line splitting keeps the text on 2 lines instead of 3.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Some labels were truncated because the frame containing them was a bit
short; now the frames on the left have been shrunk (they had too much
margin) so the frames on the right can be expanded to have the labels fully
visible.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
The arguments for SetButtonAlphaImage() are not used, so can be removed to
avoid compiler warnings.
This patch removes these arguments, so the code in SetButtonAlphaImage(), not
used, can be removed too.
A label was truncated because the widget next to it was too close for
historical reasons; now that the frame is wide enough the Pop-up Button
widget at its left is pushed further apart so the label for the position
of the workspace name can be fully visible.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>