WPrefs: WINGs font configuration

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.
WINGs: Option for decimal or hexadecimal RGB colors

The RGB panel of the WINGs color panel lists the red, green, and blue values as
base 10 numbers.  However, hexadecimal numbers are very common when dealing with
RGB colors.  This patch adds two radio buttons at the bottom of the RGB panel
to allow users to choose their preferred number system.

For version 2 of the patch:

Based on Cristophe's suggestions regarding the new decimal/hexadecimal RGB color
feature introduced in commit 83d8ad6, this patch changes rgbState from an int
to an enum, converts some if statements to switches, and changes from atoi to
strtol for the base 10 string conversion.

In addition, the "hexadecimal" text was too wide for the default size of its
radio button for some fonts, so both radio buttons are now resized to fit the
width of the panel.
WPrefs: Set workspace background

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.
util/wmiv: an image viewer using wrlib

This patch brings wmiv, a fast image viewer using wrlib.
clean wDockFindFreeSlot function

it appears that a sx var is set but not used
wrlib: Potential leak of memory pointed to by 'tmpp'

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
wmlib: Potential leak of memory pointed to by 'entry'

two similar ones, if we return then free allocated memory

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
wmlib: remove wrong free highlighted by commit 65dc99d805

It is really unlikely that the free(menu) was the correct thing, it is more
likely that it was a typo instead of the appropriate 'free(menu)':
It would be excessive behaviour to free the complete menu only because an
entry cannot be added, and even if it were the case that would not be the
right way to do it because it would leak all the entries already allocated
for it.
(This fixes Coverity #50154 and #50155)

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
wrlib: potentially incorrect sizeof in malloc

Result of 'malloc' is converted to a pointer of type 'unsigned char',
which is incompatible with sizeof operand type 'char'

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
wrlib: wrong type in sizeof

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
wrlib: wrong type in sizeof

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
WINGs: Called function pointer is null (null dereference)

make sure that we have function to call

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
WINGs: Value stored to 'scroll' is never read

it is assigned after doing switch() {}
so values assigned in switch() are dropped anyway

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
WINGs: Value stored to 'pos'|'_w'|'done' is never read

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
WINGs: actually assign variable

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
WPrefs: fix segfault when image not found

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.
add util/wmiv to .gitignore
WPrefs: Value stored to 'timage' is never read

three times in a row

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
WPrefs: remove unfinished background tab from appearances panel code

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.
WPrefs: new enum in Appearances.c for tab identifiers to increase readability