This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project wmaker-crm.git.
The branch, next has been updated
via 9a895dcda5121a7934a9e17470ea666b7b2219ff (commit)
via 9e4253f6706fe3fdf7007de23c024149d716deaa (commit)
via 0bf6297a32666e551870146acd1984377162a179 (commit)
via 8f7d4b7751a0b93fb9fcc6609b0ddbd047fcc3af (commit)
via d1e1c13fa3bd60ba6c33011f58bbeb664e175198 (commit)
via 225c99a6ca953a3c073a74adf269b3dd4cc0d804 (commit)
via 268ead4eca7174ea81c183d0f463ac892893234d (commit)
via 883cda48e326326004a04944198e2b10e25e6db3 (commit)
via cacc04d4a265a1a900f32289213ed7e4211cd914 (commit)
from 94777b97156db1a2bcdfcc8fd486fcc79b0bd7f7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://repo.or.cz/w/wmaker-crm.git/commit/9a895dcda5121a7934a9e17470ea666b7b2219ff
commit 9a895dcda5121a7934a9e17470ea666b7b2219ff
Author: Christophe CURIS <[email protected]>
Date: Wed May 1 20:26:36 2013 +0200
Increased library's revision to reflect API updates
The addition of 'const' to parameters of library's functions is an
API change, although this will break neither the binary interface
nor the compilation of program using the library; the other changes
also have no impact on the compiled library object.
diff --git a/configure.ac b/configure.ac
index 734851a..3479a4b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,7 +41,7 @@ dnl public release, then set age to 0.
dnl
dnl libwraster
WRASTER_CURRENT=4
-WRASTER_REVISION=0
+WRASTER_REVISION=1
WRASTER_AGE=1
WRASTER_VERSION=$WRASTER_CURRENT:$WRASTER_REVISION:$WRASTER_AGE
AC_SUBST(WRASTER_VERSION)
http://repo.or.cz/w/wmaker-crm.git/commit/9e4253f6706fe3fdf7007de23c024149d716deaa
commit 9e4253f6706fe3fdf7007de23c024149d716deaa
Author: Christophe CURIS <[email protected]>
Date: Wed May 1 20:26:35 2013 +0200
Added the last missing 'const' attributes to function parameters
diff --git a/wrlib/context.c b/wrlib/context.c
index 6a4f04e..fa4bf40 100644
--- a/wrlib/context.c
+++ b/wrlib/context.c
@@ -558,7 +558,7 @@ static int count_offset(unsigned long mask)
return i;
}
-RContext *RCreateContext(Display * dpy, int screen_number, RContextAttributes
* attribs)
+RContext *RCreateContext(Display * dpy, int screen_number, const
RContextAttributes * attribs)
{
RContext *context;
XGCValues gcv;
diff --git a/wrlib/gradient.c b/wrlib/gradient.c
index 718f879..930d122 100644
--- a/wrlib/gradient.c
+++ b/wrlib/gradient.c
@@ -65,7 +65,7 @@ RImage *RRenderMultiGradient(unsigned width, unsigned height,
RColor ** colors,
return NULL;
}
-RImage *RRenderGradient(unsigned width, unsigned height, RColor * from, RColor
* to, int style)
+RImage *RRenderGradient(unsigned width, unsigned height, const RColor * from,
const RColor * to, int style)
{
switch (style) {
case RHorizontalGradient:
diff --git a/wrlib/misc.c b/wrlib/misc.c
index 399aa6f..5b0bac4 100644
--- a/wrlib/misc.c
+++ b/wrlib/misc.c
@@ -166,7 +166,7 @@ static __inline__ unsigned char clip(int c)
return (unsigned char)c;
}
-void RLightImage(RImage *image, RColor *color)
+void RLightImage(RImage *image, const RColor *color)
{
unsigned char *d = image->data;
unsigned char *dd;
diff --git a/wrlib/raster.c b/wrlib/raster.c
index fbc73a7..e2a2d99 100644
--- a/wrlib/raster.c
+++ b/wrlib/raster.c
@@ -529,7 +529,7 @@ RCombineAreaWithOpaqueness(RImage * image, RImage * src,
int sx, int sy,
#undef COP
}
-void RCombineImageWithColor(RImage * image, RColor * color)
+void RCombineImageWithColor(RImage * image, const RColor * color)
{
register int i;
unsigned char *d;
@@ -602,7 +602,7 @@ RImage *RMakeTiledImage(RImage * tile, unsigned width,
unsigned height)
return image;
}
-RImage *RMakeCenteredImage(RImage * image, unsigned width, unsigned height,
RColor * color)
+RImage *RMakeCenteredImage(RImage * image, unsigned width, unsigned height,
const RColor * color)
{
int x, y, w, h, sx, sy;
RImage *tmp;
diff --git a/wrlib/wraster.h b/wrlib/wraster.h
index 30dfe92..b5e360e 100644
--- a/wrlib/wraster.h
+++ b/wrlib/wraster.h
@@ -304,7 +304,7 @@ char *RGetImageFileFormat(const char *file);
* Xlib contexts
*/
RContext *RCreateContext(Display *dpy, int screen_number,
- RContextAttributes *attribs);
+ const RContextAttributes *attribs);
void RDestroyContext(RContext *context);
@@ -341,7 +341,7 @@ RImage *RCloneImage(RImage *image);
RImage *RGetSubImage(RImage *image, int x, int y, unsigned width,
unsigned height);
-void RCombineImageWithColor(RImage *image, RColor *color);
+void RCombineImageWithColor(RImage *image, const RColor *color);
void RCombineImages(RImage *image, RImage *src);
@@ -371,7 +371,7 @@ RImage *RRotateImage(RImage *image, float angle);
RImage *RMakeTiledImage(RImage *tile, unsigned width, unsigned height);
RImage* RMakeCenteredImage(RImage *image, unsigned width, unsigned height,
- RColor *color);
+ const RColor *color);
/*
* Drawing
@@ -415,14 +415,14 @@ void RHSVtoRGB(const RHSVColor *hsv, RColor *rgb);
*/
void RClearImage(RImage *image, const RColor *color);
-void RLightImage(RImage *image, RColor *color);
+void RLightImage(RImage *image, const RColor *color);
void RFillImage(RImage *image, const RColor *color);
void RBevelImage(RImage *image, int bevel_type);
-RImage *RRenderGradient(unsigned width, unsigned height, RColor *from,
- RColor *to, int style);
+RImage *RRenderGradient(unsigned width, unsigned height, const RColor *from,
+ const RColor *to, int style);
RImage *RRenderMultiGradient(unsigned width, unsigned height, RColor **colors,
http://repo.or.cz/w/wmaker-crm.git/commit/0bf6297a32666e551870146acd1984377162a179
commit 0bf6297a32666e551870146acd1984377162a179
Author: Christophe CURIS <[email protected]>
Date: Wed May 1 20:26:34 2013 +0200
Added 'const' attribute on non-modified arguments for color handling
functions
These functions have both an input and an output color, marked the
input color as const to help distinguish.
diff --git a/wrlib/color.c b/wrlib/color.c
index c0c7719..085c461 100644
--- a/wrlib/color.c
+++ b/wrlib/color.c
@@ -37,7 +37,7 @@
#define MIN3(a,b,c) MIN(MIN(a,b), c)
#define MAX3(a,b,c) MAX(MAX(a,b), c)
-void RHSVtoRGB(RHSVColor * hsv, RColor * rgb)
+void RHSVtoRGB(const RHSVColor * hsv, RColor * rgb)
{
int h = hsv->hue % 360;
int s = hsv->saturation;
@@ -89,7 +89,7 @@ void RHSVtoRGB(RHSVColor * hsv, RColor * rgb)
}
}
-void RRGBtoHSV(RColor * rgb, RHSVColor * hsv)
+void RRGBtoHSV(const RColor * rgb, RHSVColor * hsv)
{
int h, s, v;
int max = MAX3(rgb->red, rgb->green, rgb->blue);
diff --git a/wrlib/convert.c b/wrlib/convert.c
index 2b0d415..f690e1f 100644
--- a/wrlib/convert.c
+++ b/wrlib/convert.c
@@ -921,7 +921,7 @@ int RConvertImageMask(RContext * context, RImage * image,
Pixmap * pixmap, Pixma
return True;
}
-Bool RGetClosestXColor(RContext * context, RColor * color, XColor * retColor)
+Bool RGetClosestXColor(RContext * context, const RColor * color, XColor *
retColor)
{
if (context->vclass == TrueColor) {
unsigned short rmask, gmask, bmask;
diff --git a/wrlib/wraster.h b/wrlib/wraster.h
index f01f33d..30dfe92 100644
--- a/wrlib/wraster.h
+++ b/wrlib/wraster.h
@@ -308,7 +308,7 @@ RContext *RCreateContext(Display *dpy, int screen_number,
void RDestroyContext(RContext *context);
-Bool RGetClosestXColor(RContext *context, RColor *color, XColor *retColor);
+Bool RGetClosestXColor(RContext *context, const RColor *color, XColor
*retColor);
/*
* RImage creation
@@ -407,8 +407,8 @@ void ROperateSegments(RImage *image, int operation, const
RSegment *segs, int ns
/*
* Color convertion
*/
-void RRGBtoHSV(RColor *color, RHSVColor *hsv);
-void RHSVtoRGB(RHSVColor *hsv, RColor *rgb);
+void RRGBtoHSV(const RColor *color, RHSVColor *hsv);
+void RHSVtoRGB(const RHSVColor *hsv, RColor *rgb);
/*
* Painting
http://repo.or.cz/w/wmaker-crm.git/commit/8f7d4b7751a0b93fb9fcc6609b0ddbd047fcc3af
commit 8f7d4b7751a0b93fb9fcc6609b0ddbd047fcc3af
Author: Christophe CURIS <[email protected]>
Date: Wed May 1 20:26:33 2013 +0200
Added 'const' attribute on non-modified arguments for drawing functions
All these functions expects agruments like color or list-of-points
that should not be modified (and are not) by the function; added
the corresponding qualifier to reflect that.
diff --git a/wrlib/draw.c b/wrlib/draw.c
index 7f54c7a..350837c 100644
--- a/wrlib/draw.c
+++ b/wrlib/draw.c
@@ -61,7 +61,7 @@ Bool RGetPixel(RImage * image, int x, int y, RColor * color)
return True;
}
-void RPutPixel(RImage * image, int x, int y, RColor * color)
+void RPutPixel(RImage *image, int x, int y, const RColor *color)
{
unsigned char *ptr;
@@ -104,7 +104,7 @@ void RPutPixel(RImage * image, int x, int y, RColor * color)
}
}
-static void operatePixel(RImage * image, int ofs, int operation, RColor *
color)
+static void operatePixel(RImage * image, int ofs, int operation, const RColor
* color)
{
unsigned char *sr, *sg, *sb, *sa;
register int alpha, nalpha, tmp;
@@ -170,7 +170,7 @@ static void operatePixel(RImage * image, int ofs, int
operation, RColor * color)
}
}
-void ROperatePixel(RImage * image, int operation, int x, int y, RColor * color)
+void ROperatePixel(RImage * image, int operation, int x, int y, const RColor *
color)
{
int ofs;
@@ -184,7 +184,7 @@ void ROperatePixel(RImage * image, int operation, int x,
int y, RColor * color)
operatePixel(image, ofs, operation, color);
}
-void RPutPixels(RImage * image, RPoint * points, int npoints, int mode, RColor
* color)
+void RPutPixels(RImage * image, const RPoint * points, int npoints, int mode,
const RColor * color)
{
register int x, y, i;
@@ -205,7 +205,7 @@ void RPutPixels(RImage * image, RPoint * points, int
npoints, int mode, RColor *
}
}
-void ROperatePixels(RImage * image, int operation, RPoint * points, int
npoints, int mode, RColor * color)
+void ROperatePixels(RImage * image, int operation, const RPoint * points, int
npoints, int mode, const RColor * color)
{
register int x, y, i;
@@ -287,7 +287,7 @@ static Bool clipLineInRectangle(int xmin, int ymin, int
xmax, int ymax, int *x1,
* This routine is a generic drawing routine, based on Bresenham's line
* drawing algorithm.
*/
-static int genericLine(RImage * image, int x0, int y0, int x1, int y1, RColor
* color, int operation, int polyline)
+static int genericLine(RImage * image, int x0, int y0, int x1, int y1, const
RColor * color, int operation, int polyline)
{
int i, err, du, dv, du2, dv2, uofs, vofs, last;
@@ -377,17 +377,17 @@ static int genericLine(RImage * image, int x0, int y0,
int x1, int y1, RColor *
return True;
}
-int RDrawLine(RImage * image, int x0, int y0, int x1, int y1, RColor * color)
+int RDrawLine(RImage * image, int x0, int y0, int x1, int y1, const RColor *
color)
{
return genericLine(image, x0, y0, x1, y1, color, RNormalOperation,
False);
}
-int ROperateLine(RImage * image, int operation, int x0, int y0, int x1, int
y1, RColor * color)
+int ROperateLine(RImage * image, int operation, int x0, int y0, int x1, int
y1, const RColor * color)
{
return genericLine(image, x0, y0, x1, y1, color, operation, False);
}
-void RDrawLines(RImage * image, RPoint * points, int npoints, int mode, RColor
* color)
+void RDrawLines(RImage * image, const RPoint * points, int npoints, int mode,
const RColor * color)
{
register int x1, y1, x2, y2, i;
@@ -425,7 +425,7 @@ void RDrawLines(RImage * image, RPoint * points, int
npoints, int mode, RColor *
genericLine(image, x1, y1, x2, y2, color, RNormalOperation, i);
}
-void ROperateLines(RImage * image, int operation, RPoint * points, int
npoints, int mode, RColor * color)
+void ROperateLines(RImage * image, int operation, const RPoint * points, int
npoints, int mode, const RColor * color)
{
register int x1, y1, x2, y2, i;
@@ -463,7 +463,7 @@ void ROperateLines(RImage * image, int operation, RPoint *
points, int npoints,
genericLine(image, x1, y1, x2, y2, color, operation, i);
}
-void RDrawSegments(RImage * image, RSegment * segs, int nsegs, RColor * color)
+void RDrawSegments(RImage * image, const RSegment * segs, int nsegs, const
RColor * color)
{
register int i;
@@ -475,7 +475,7 @@ void RDrawSegments(RImage * image, RSegment * segs, int
nsegs, RColor * color)
}
}
-void ROperateSegments(RImage * image, int operation, RSegment * segs, int
nsegs, RColor * color)
+void ROperateSegments(RImage * image, int operation, const RSegment * segs,
int nsegs, const RColor * color)
{
register int i;
diff --git a/wrlib/misc.c b/wrlib/misc.c
index bbebee3..399aa6f 100644
--- a/wrlib/misc.c
+++ b/wrlib/misc.c
@@ -80,7 +80,7 @@ void RBevelImage(RImage * image, int bevel_type)
}
}
-void RFillImage(RImage * image, RColor * color)
+void RFillImage(RImage * image, const RColor * color)
{
unsigned char *d = image->data;
unsigned lineSize;
@@ -110,7 +110,7 @@ void RFillImage(RImage * image, RColor * color)
}
}
-void RClearImage(RImage * image, RColor * color)
+void RClearImage(RImage * image, const RColor * color)
{
unsigned char *d = image->data;
unsigned lineSize;
diff --git a/wrlib/wraster.h b/wrlib/wraster.h
index 8a144e2..f01f33d 100644
--- a/wrlib/wraster.h
+++ b/wrlib/wraster.h
@@ -378,31 +378,31 @@ RImage* RMakeCenteredImage(RImage *image, unsigned width,
unsigned height,
*/
Bool RGetPixel(RImage *image, int x, int y, RColor *color);
-void RPutPixel(RImage *image, int x, int y, RColor *color);
+void RPutPixel(RImage *image, int x, int y, const RColor *color);
-void ROperatePixel(RImage *image, int operation, int x, int y, RColor *color);
+void ROperatePixel(RImage *image, int operation, int x, int y, const RColor
*color);
-void RPutPixels(RImage *image, RPoint *points, int npoints, int mode,
- RColor *color);
+void RPutPixels(RImage *image, const RPoint *points, int npoints, int mode,
+ const RColor *color);
-void ROperatePixels(RImage *image, int operation, RPoint *points,
- int npoints, int mode, RColor *color);
+void ROperatePixels(RImage *image, int operation, const RPoint *points,
+ int npoints, int mode, const RColor *color);
-int RDrawLine(RImage *image, int x0, int y0, int x1, int y1, RColor *color);
+int RDrawLine(RImage *image, int x0, int y0, int x1, int y1, const RColor
*color);
int ROperateLine(RImage *image, int operation, int x0, int y0, int x1, int y1,
- RColor *color);
+ const RColor *color);
-void RDrawLines(RImage *image, RPoint *points, int npoints, int mode,
- RColor *color);
+void RDrawLines(RImage *image, const RPoint *points, int npoints, int mode,
+ const RColor *color);
-void ROperateLines(RImage *image, int operation, RPoint *points, int npoints,
- int mode, RColor *color);
+void ROperateLines(RImage *image, int operation, const RPoint *points, int
npoints,
+ int mode, const RColor *color);
-void RDrawSegments(RImage *image, RSegment *segs, int nsegs, RColor *color);
+void RDrawSegments(RImage *image, const RSegment *segs, int nsegs, const
RColor *color);
-void ROperateSegments(RImage *image, int operation, RSegment *segs, int nsegs,
- RColor *color);
+void ROperateSegments(RImage *image, int operation, const RSegment *segs, int
nsegs,
+ const RColor *color);
/*
* Color convertion
@@ -413,11 +413,11 @@ void RHSVtoRGB(RHSVColor *hsv, RColor *rgb);
/*
* Painting
*/
-void RClearImage(RImage *image, RColor *color);
+void RClearImage(RImage *image, const RColor *color);
void RLightImage(RImage *image, RColor *color);
-void RFillImage(RImage *image, RColor *color);
+void RFillImage(RImage *image, const RColor *color);
void RBevelImage(RImage *image, int bevel_type);
http://repo.or.cz/w/wmaker-crm.git/commit/d1e1c13fa3bd60ba6c33011f58bbeb664e175198
commit d1e1c13fa3bd60ba6c33011f58bbeb664e175198
Author: Christophe CURIS <[email protected]>
Date: Wed May 1 20:26:32 2013 +0200
Added 'const' attribute to the file name parameter to load/save
This name is not modified by the callee functions (and it should
not be anyway), so let's make it official in the internal functions
diff --git a/wrlib/imgformat.h b/wrlib/imgformat.h
index eee0f81..c7e4024 100644
--- a/wrlib/imgformat.h
+++ b/wrlib/imgformat.h
@@ -48,30 +48,30 @@ typedef enum {
/*
* Function for Loading in a specific format
*/
-RImage *RLoadPPM(char *file_name);
+RImage *RLoadPPM(const char *file);
-RImage *RLoadXPM(RContext *context, char *file);
+RImage *RLoadXPM(RContext *context, const char *file);
#ifdef USE_TIFF
-RImage *RLoadTIFF(char *file, int index);
+RImage *RLoadTIFF(const char *file, int index);
#endif
#ifdef USE_PNG
-RImage *RLoadPNG(RContext *context, char *file);
+RImage *RLoadPNG(RContext *context, const char *file);
#endif
#ifdef USE_JPEG
-RImage *RLoadJPEG(RContext *context, char *file);
+RImage *RLoadJPEG(RContext *context, const char *file);
#endif
#ifdef USE_GIF
-RImage *RLoadGIF(char *file, int index);
+RImage *RLoadGIF(const char *file, int index);
#endif
/*
* Function for Saving in a specific format
*/
-Bool RSaveXPM(RImage * image, char *filename);
+Bool RSaveXPM(RImage *image, const char *file);
#endif
diff --git a/wrlib/jpeg.c b/wrlib/jpeg.c
index 2864277..2339f51 100644
--- a/wrlib/jpeg.c
+++ b/wrlib/jpeg.c
@@ -91,7 +91,7 @@ static void my_error_exit(j_common_ptr cinfo)
longjmp(myerr->setjmp_buffer, 1);
}
-RImage *RLoadJPEG(RContext * context, char *file_name)
+RImage *RLoadJPEG(RContext * context, const char *file_name)
{
RImage *image = NULL;
struct jpeg_decompress_struct cinfo;
diff --git a/wrlib/load.c b/wrlib/load.c
index dc17c26..554e2b4 100644
--- a/wrlib/load.c
+++ b/wrlib/load.c
@@ -68,7 +68,7 @@ static int RImageCacheMaxImage = -1; /* 0 = any size */
static RCachedImage *RImageCache;
-static WRImgFormat identFile(char *path);
+static WRImgFormat identFile(const char *path);
char **RSupportedFileFormats(void)
@@ -123,7 +123,7 @@ static void init_cache()
}
}
-RImage *RLoadImage(RContext * context, char *file, int index)
+RImage *RLoadImage(RContext * context, const char *file, int index)
{
RImage *image = NULL;
int i;
@@ -238,7 +238,7 @@ RImage *RLoadImage(RContext * context, char *file, int
index)
return image;
}
-char *RGetImageFileFormat(char *file)
+char *RGetImageFileFormat(const char *file)
{
switch (identFile(file)) {
case IM_XPM:
@@ -272,7 +272,7 @@ char *RGetImageFileFormat(char *file)
}
}
-static WRImgFormat identFile(char *path)
+static WRImgFormat identFile(const char *path)
{
FILE *file;
unsigned char buffer[32];
diff --git a/wrlib/nxpm.c b/wrlib/nxpm.c
index 5d9d270..0574fd9 100644
--- a/wrlib/nxpm.c
+++ b/wrlib/nxpm.c
@@ -551,7 +551,7 @@ static void freecolormap(XPMColor * colormap)
}
/* save routine is common to internal support and library support */
-Bool RSaveXPM(RImage * image, char *filename)
+Bool RSaveXPM(RImage * image, const char *filename)
{
FILE *file;
int x, y;
diff --git a/wrlib/png.c b/wrlib/png.c
index 41736a9..fed178e 100644
--- a/wrlib/png.c
+++ b/wrlib/png.c
@@ -33,7 +33,7 @@
#include "wraster.h"
#include "imgformat.h"
-RImage *RLoadPNG(RContext * context, char *file)
+RImage *RLoadPNG(RContext *context, const char *file)
{
char *tmp;
RImage *image = NULL;
diff --git a/wrlib/ppm.c b/wrlib/ppm.c
index c386363..63b7bcf 100644
--- a/wrlib/ppm.c
+++ b/wrlib/ppm.c
@@ -113,7 +113,7 @@ static RImage *load_pixmap(FILE * file, int w, int h, int
max, int raw)
return NULL;
}
-RImage *RLoadPPM(char *file_name)
+RImage *RLoadPPM(const char *file_name)
{
FILE *file;
RImage *image = NULL;
diff --git a/wrlib/save.c b/wrlib/save.c
index 949af1a..86a66c6 100644
--- a/wrlib/save.c
+++ b/wrlib/save.c
@@ -35,7 +35,7 @@
#include "imgformat.h"
-Bool RSaveImage(RImage * image, char *filename, char *format)
+Bool RSaveImage(RImage * image, const char *filename, const char *format)
{
if (strcmp(format, "XPM") != 0) {
RErrorCode = RERR_BADFORMAT;
diff --git a/wrlib/tiff.c b/wrlib/tiff.c
index 979cb5f..a54596d 100644
--- a/wrlib/tiff.c
+++ b/wrlib/tiff.c
@@ -34,7 +34,7 @@
#include "wraster.h"
#include "imgformat.h"
-RImage *RLoadTIFF(char *file, int index)
+RImage *RLoadTIFF(const char *file, int index)
{
RImage *image = NULL;
TIFF *tif;
diff --git a/wrlib/wraster.h b/wrlib/wraster.h
index 40f031b..8a144e2 100644
--- a/wrlib/wraster.h
+++ b/wrlib/wraster.h
@@ -298,7 +298,7 @@ enum {
char **RSupportedFileFormats(void);
-char *RGetImageFileFormat(char *file);
+char *RGetImageFileFormat(const char *file);
/*
* Xlib contexts
@@ -320,7 +320,7 @@ RImage *RCreateImageFromXImage(RContext *context, XImage
*image, XImage *mask);
RImage *RCreateImageFromDrawable(RContext *context, Drawable drawable,
Pixmap mask);
-RImage *RLoadImage(RContext *context, char *file, int index);
+RImage *RLoadImage(RContext *context, const char *file, int index);
RImage* RRetainImage(RImage *image);
@@ -331,7 +331,7 @@ RImage *RGetImageFromXPMData(RContext *context, char
**xpmData);
/*
* RImage storing
*/
-Bool RSaveImage(RImage *image, char *filename, char *format);
+Bool RSaveImage(RImage *image, const char *filename, const char *format);
/*
* Area manipulation
diff --git a/wrlib/xpm.c b/wrlib/xpm.c
index 04307e3..12aadc6 100644
--- a/wrlib/xpm.c
+++ b/wrlib/xpm.c
@@ -153,7 +153,7 @@ RImage *RGetImageFromXPMData(RContext * context, char
**xpmData)
return image;
}
-RImage *RLoadXPM(RContext * context, char *file)
+RImage *RLoadXPM(RContext * context, const char *file)
{
Display *dpy = context->dpy;
Colormap cmap = context->cmap;
@@ -164,7 +164,7 @@ RImage *RLoadXPM(RContext * context, char *file)
int *p;
int i;
- i = XpmReadFileToXpmImage(file, &xpm, (XpmInfo *) NULL);
+ i = XpmReadFileToXpmImage((char *)file, &xpm, (XpmInfo *) NULL);
if (i != XpmSuccess) {
switch (i) {
case XpmOpenFailed:
http://repo.or.cz/w/wmaker-crm.git/commit/225c99a6ca953a3c073a74adf269b3dd4cc0d804
commit 225c99a6ca953a3c073a74adf269b3dd4cc0d804
Author: Christophe CURIS <[email protected]>
Date: Wed May 1 20:26:31 2013 +0200
Converted #define into an Enum for image format number
An enum is always a better idea as it allows the compiler to do
some checks, and as this info is internal only to the WRLib it
will not change the API.
diff --git a/wrlib/imgformat.h b/wrlib/imgformat.h
index 1b655ee..eee0f81 100644
--- a/wrlib/imgformat.h
+++ b/wrlib/imgformat.h
@@ -30,14 +30,16 @@
#define IMGFORMAT_INTERNAL_H
-#define IM_ERROR -1
-#define IM_UNKNOWN 0
-#define IM_XPM 1
-#define IM_TIFF 2
-#define IM_PNG 3
-#define IM_PPM 4
-#define IM_JPEG 5
-#define IM_GIF 6
+typedef enum {
+ IM_ERROR = -1,
+ IM_UNKNOWN = 0,
+ IM_XPM = 1,
+ IM_TIFF = 2,
+ IM_PNG = 3,
+ IM_PPM = 4,
+ IM_JPEG = 5,
+ IM_GIF = 6
+} WRImgFormat;
/* How many image types we have. */
/* Increase this when adding new image types! */
diff --git a/wrlib/load.c b/wrlib/load.c
index dc30873..dc17c26 100644
--- a/wrlib/load.c
+++ b/wrlib/load.c
@@ -68,7 +68,7 @@ static int RImageCacheMaxImage = -1; /* 0 = any size */
static RCachedImage *RImageCache;
-static int identFile(char *path);
+static WRImgFormat identFile(char *path);
char **RSupportedFileFormats(void)
@@ -272,7 +272,7 @@ char *RGetImageFileFormat(char *file)
}
}
-static int identFile(char *path)
+static WRImgFormat identFile(char *path)
{
FILE *file;
unsigned char buffer[32];
http://repo.or.cz/w/wmaker-crm.git/commit/268ead4eca7174ea81c183d0f463ac892893234d
commit 268ead4eca7174ea81c183d0f463ac892893234d
Author: Christophe CURIS <[email protected]>
Date: Wed May 1 20:26:30 2013 +0200
Moved the function to Save image also into the internal header
diff --git a/wrlib/imgformat.h b/wrlib/imgformat.h
index f6e5b88..1b655ee 100644
--- a/wrlib/imgformat.h
+++ b/wrlib/imgformat.h
@@ -66,5 +66,10 @@ RImage *RLoadJPEG(RContext *context, char *file);
RImage *RLoadGIF(char *file, int index);
#endif
+/*
+ * Function for Saving in a specific format
+ */
+Bool RSaveXPM(RImage * image, char *filename);
+
#endif
diff --git a/wrlib/save.c b/wrlib/save.c
index 1c8b78b..949af1a 100644
--- a/wrlib/save.c
+++ b/wrlib/save.c
@@ -32,8 +32,8 @@
#include <time.h>
#include "wraster.h"
+#include "imgformat.h"
-extern Bool RSaveXPM(RImage * image, char *filename);
Bool RSaveImage(RImage * image, char *filename, char *format)
{
http://repo.or.cz/w/wmaker-crm.git/commit/883cda48e326326004a04944198e2b10e25e6db3
commit 883cda48e326326004a04944198e2b10e25e6db3
Author: Christophe CURIS <[email protected]>
Date: Wed May 1 20:26:29 2013 +0200
Moved declaration of format-specific image Load functions to dedicated
header
The functions are declared in different files but they were called
in another file which re-declared the prototypes. This is dangerous
as it can lead to misaligned prototypes when functions changes.
They are now grouped in the library internal header 'imgformat.h'
diff --git a/wrlib/Makefile.am b/wrlib/Makefile.am
index 0aa8db2..c98a60f 100644
--- a/wrlib/Makefile.am
+++ b/wrlib/Makefile.am
@@ -19,6 +19,7 @@ bin_SCRIPTS = get-wraster-flags
include_HEADERS = wraster.h
libwraster_la_SOURCES = + imgformat.h raster.c
alpha_combine.c draw.c diff --git a/wrlib/gif.c
b/wrlib/gif.c
index 081f1ee..1ad638a 100644
--- a/wrlib/gif.c
+++ b/wrlib/gif.c
@@ -31,6 +31,7 @@
#include <gif_lib.h>
#include "wraster.h"
+#include "imgformat.h"
static int InterlacedOffset[] = { 0, 4, 2, 1 };
static int InterlacedJumps[] = { 8, 8, 4, 2 };
diff --git a/wrlib/imgformat.h b/wrlib/imgformat.h
new file mode 100644
index 0000000..f6e5b88
--- /dev/null
+++ b/wrlib/imgformat.h
@@ -0,0 +1,70 @@
+/*
+ * Raster graphics library
+ *
+ * Copyright (c) 1997-2003 Alfredo K. Kojima
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+/*
+ * Functions to load and save RImage from/to file in a specific file format
+ *
+ * These functions are for WRaster library's internal use only, please use
+ * the RLoadImage function defined in 'wraster.h'
+ */
+
+#ifndef IMGFORMAT_INTERNAL_H
+#define IMGFORMAT_INTERNAL_H
+
+
+#define IM_ERROR -1
+#define IM_UNKNOWN 0
+#define IM_XPM 1
+#define IM_TIFF 2
+#define IM_PNG 3
+#define IM_PPM 4
+#define IM_JPEG 5
+#define IM_GIF 6
+
+/* How many image types we have. */
+/* Increase this when adding new image types! */
+#define IM_TYPES 6
+
+/*
+ * Function for Loading in a specific format
+ */
+RImage *RLoadPPM(char *file_name);
+
+RImage *RLoadXPM(RContext *context, char *file);
+
+#ifdef USE_TIFF
+RImage *RLoadTIFF(char *file, int index);
+#endif
+
+#ifdef USE_PNG
+RImage *RLoadPNG(RContext *context, char *file);
+#endif
+
+#ifdef USE_JPEG
+RImage *RLoadJPEG(RContext *context, char *file);
+#endif
+
+#ifdef USE_GIF
+RImage *RLoadGIF(char *file, int index);
+#endif
+
+
+#endif
diff --git a/wrlib/jpeg.c b/wrlib/jpeg.c
index 68f4e02..2864277 100644
--- a/wrlib/jpeg.c
+++ b/wrlib/jpeg.c
@@ -34,6 +34,7 @@
#include <jpeglib.h>
#include "wraster.h"
+#include "imgformat.h"
/*
* <setjmp.h> is used for the optional error recovery mechanism shown in
diff --git a/wrlib/load.c b/wrlib/load.c
index d3ae8ad..dc30873 100644
--- a/wrlib/load.c
+++ b/wrlib/load.c
@@ -38,6 +38,7 @@
#endif
#include "wraster.h"
+#include "imgformat.h"
#define RETRY( x ) do {
x; @@ -66,36 +67,9 @@ static int
RImageCacheMaxImage = -1; /* 0 = any size */
static RCachedImage *RImageCache;
-#define IM_ERROR -1
-#define IM_UNKNOWN 0
-#define IM_XPM 1
-#define IM_TIFF 2
-#define IM_PNG 3
-#define IM_PPM 4
-#define IM_JPEG 5
-#define IM_GIF 6
-/* How many image types do we have. */
-/* Increase this when adding new image types! */
-#define IM_TYPES 6
static int identFile(char *path);
-extern RImage *RLoadPPM(char *file_name);
-
-extern RImage *RLoadXPM(RContext * context, char *file);
-
-#ifdef USE_TIFF
-extern RImage *RLoadTIFF(char *file, int index);
-#endif
-#ifdef USE_PNG
-extern RImage *RLoadPNG(RContext * context, char *file);
-#endif
-#ifdef USE_JPEG
-extern RImage *RLoadJPEG(RContext * context, char *file_name);
-#endif
-#ifdef USE_GIF
-extern RImage *RLoadGIF(char *file_name, int index);
-#endif
char **RSupportedFileFormats(void)
{
diff --git a/wrlib/nxpm.c b/wrlib/nxpm.c
index 45ace0d..5d9d270 100644
--- a/wrlib/nxpm.c
+++ b/wrlib/nxpm.c
@@ -29,6 +29,7 @@
#include <errno.h>
#include "wraster.h"
+#include "imgformat.h"
/*
* Restricted support for XPM images.
diff --git a/wrlib/png.c b/wrlib/png.c
index e28d730..41736a9 100644
--- a/wrlib/png.c
+++ b/wrlib/png.c
@@ -31,6 +31,7 @@
#include <png.h>
#include "wraster.h"
+#include "imgformat.h"
RImage *RLoadPNG(RContext * context, char *file)
{
diff --git a/wrlib/ppm.c b/wrlib/ppm.c
index e4bd758..c386363 100644
--- a/wrlib/ppm.c
+++ b/wrlib/ppm.c
@@ -28,6 +28,7 @@
#include <string.h>
#include "wraster.h"
+#include "imgformat.h"
static RImage *load_graymap(FILE * file, int w, int h, int max, int raw)
{
diff --git a/wrlib/tiff.c b/wrlib/tiff.c
index accdfbe..979cb5f 100644
--- a/wrlib/tiff.c
+++ b/wrlib/tiff.c
@@ -32,6 +32,7 @@
#include <tiffio.h>
#include "wraster.h"
+#include "imgformat.h"
RImage *RLoadTIFF(char *file, int index)
{
diff --git a/wrlib/xpm.c b/wrlib/xpm.c
index 5ce1ea1..04307e3 100644
--- a/wrlib/xpm.c
+++ b/wrlib/xpm.c
@@ -31,6 +31,7 @@
#include <X11/xpm.h>
#include "wraster.h"
+#include "imgformat.h"
RImage *RGetImageFromXPMData(RContext * context, char **xpmData)
{
http://repo.or.cz/w/wmaker-crm.git/commit/cacc04d4a265a1a900f32289213ed7e4211cd914
commit cacc04d4a265a1a900f32289213ed7e4211cd914
Author: Christophe CURIS <[email protected]>
Date: Sun Apr 28 15:37:53 2013 +0200
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.
diff --git a/WPrefs.app/KeyboardShortcuts.c b/WPrefs.app/KeyboardShortcuts.c
index 61a49a1..d5b2ce1 100644
--- a/WPrefs.app/KeyboardShortcuts.c
+++ b/WPrefs.app/KeyboardShortcuts.c
@@ -61,82 +61,94 @@ typedef struct _Panel {
#define ICON_FILE "keyshortcuts"
/*
- * Must be in the same order as the corresponding items in
- * "actions list" in createPanel()
+ * List of user definable shortcut keys
+ * First parameter is the internal keyword known by WMaker
+ * Second is the text displayed to the user
*/
-static char *keyOptions[] = {
- "RootMenuKey",
- "WindowListKey",
- "WindowMenuKey",
- "HideKey",
- "HideOthersKey",
- "MiniaturizeKey",
- "MinimizeAllKey",
- "CloseKey",
- "MaximizeKey",
- "VMaximizeKey",
- "HMaximizeKey",
- "LHMaximizeKey",
- "RHMaximizeKey",
- "MaximusKey",
- "RaiseKey",
- "LowerKey",
- "RaiseLowerKey",
- "ShadeKey",
- "MoveResizeKey",
- "SelectKey",
- "FocusNextKey",
- "FocusPrevKey",
- "GroupNextKey",
- "GroupPrevKey",
- "NextWorkspaceKey",
- "PrevWorkspaceKey",
- "LastWorkspaceKey",
- "NextWorkspaceLayerKey",
- "PrevWorkspaceLayerKey",
- "Workspace1Key",
- "Workspace2Key",
- "Workspace3Key",
- "Workspace4Key",
- "Workspace5Key",
- "Workspace6Key",
- "Workspace7Key",
- "Workspace8Key",
- "Workspace9Key",
- "Workspace10Key",
- "MoveToNextWorkspaceKey",
- "MoveToPrevWorkspaceKey",
- "MoveToLastWorkspaceKey",
- "MoveToNextWorkspaceLayerKey",
- "MoveToPrevWorkspaceLayerKey",
- "MoveToWorkspace1Key",
- "MoveToWorkspace2Key",
- "MoveToWorkspace3Key",
- "MoveToWorkspace4Key",
- "MoveToWorkspace5Key",
- "MoveToWorkspace6Key",
- "MoveToWorkspace7Key",
- "MoveToWorkspace8Key",
- "MoveToWorkspace9Key",
- "MoveToWorkspace10Key",
- "WindowShortcut1Key",
- "WindowShortcut2Key",
- "WindowShortcut3Key",
- "WindowShortcut4Key",
- "WindowShortcut5Key",
- "WindowShortcut6Key",
- "WindowShortcut7Key",
- "WindowShortcut8Key",
- "WindowShortcut9Key",
- "WindowShortcut10Key",
- "WindowRelaunchKey",
- "ScreenSwitchKey",
- "DockRaiseLowerKey",
-#ifndef XKB_MODELOCK
- "ClipRaiseLowerKey"
-#else
- "ClipRaiseLowerKey",
- "ToggleKbdModeKey"
+static const struct {
+ /*
+ * Fixme: these strings should be 'const', but 'GetStringForKey'
+ * and 'WMAddListItem' do not allow us to do so
+ */
+ char *key;
+ char *title;
+} keyOptions[] = {
+ { "RootMenuKey", N_("Open applications menu") },
+ { "WindowListKey", N_("Open window list menu") },
+ { "WindowMenuKey", N_("Open window commands menu") },
+ { "HideKey", N_("Hide active application") },
+ { "HideOthersKey", N_("Hide other applications") },
+ { "MiniaturizeKey", N_("Miniaturize active window") },
+ { "MinimizeAllKey", N_("Miniaturize all windows") },
+ { "CloseKey", N_("Close active window") },
+ { "MaximizeKey", N_("Maximize active window") },
+ { "VMaximizeKey", N_("Maximize active window vertically") },
+ { "HMaximizeKey", N_("Maximize active window horizontally") },
+ { "LHMaximizeKey", N_("Maximize active window left half") },
+ { "RHMaximizeKey", N_("Maximize active window right half") },
+ { "MaximusKey", N_("Maximus: Tiled maximization ") },
+ { "RaiseKey", N_("Raise active window") },
+ { "LowerKey", N_("Lower active window") },
+ { "RaiseLowerKey", N_("Raise/Lower window under mouse pointer") },
+ { "ShadeKey", N_("Shade active window") },
+ { "MoveResizeKey", N_("Move/Resize active window") },
+ { "SelectKey", N_("Select active window") },
+ { "FocusNextKey", N_("Focus next window") },
+ { "FocusPrevKey", N_("Focus previous window") },
+ { "GroupNextKey", N_("Focus next group window") },
+ { "GroupPrevKey", N_("Focus previous group window") },
+
+ /* Workspace Related */
+ { "NextWorkspaceKey", N_("Switch to next workspace") },
+ { "PrevWorkspaceKey", N_("Switch to previous workspace") },
+ { "LastWorkspaceKey", N_("Switch to last used workspace") },
+ { "NextWorkspaceLayerKey", N_("Switch to next ten workspaces") },
+ { "PrevWorkspaceLayerKey", N_("Switch to previous ten workspaces") },
+ { "Workspace1Key", N_("Switch to workspace 1") },
+ { "Workspace2Key", N_("Switch to workspace 2") },
+ { "Workspace3Key", N_("Switch to workspace 3") },
+ { "Workspace4Key", N_("Switch to workspace 4") },
+ { "Workspace5Key", N_("Switch to workspace 5") },
+ { "Workspace6Key", N_("Switch to workspace 6") },
+ { "Workspace7Key", N_("Switch to workspace 7") },
+ { "Workspace8Key", N_("Switch to workspace 8") },
+ { "Workspace9Key", N_("Switch to workspace 9") },
+ { "Workspace10Key", N_("Switch to workspace 10") },
+ { "MoveToNextWorkspaceKey", N_("Move window to next workspace") },
+ { "MoveToPrevWorkspaceKey", N_("Move window to previous
workspace") },
+ { "MoveToLastWorkspaceKey", N_("Move window to last used
workspace") },
+ { "MoveToNextWorkspaceLayerKey", N_("Move window to next ten
workspaces") },
+ { "MoveToPrevWorkspaceLayerKey", N_("Move window to previous ten
workspaces") },
+ { "MoveToWorkspace1Key", N_("Move window to workspace 1") },
+ { "MoveToWorkspace2Key", N_("Move window to workspace 2") },
+ { "MoveToWorkspace3Key", N_("Move window to workspace 3") },
+ { "MoveToWorkspace4Key", N_("Move window to workspace 4") },
+ { "MoveToWorkspace5Key", N_("Move window to workspace 5") },
+ { "MoveToWorkspace6Key", N_("Move window to workspace 6") },
+ { "MoveToWorkspace7Key", N_("Move window to workspace 7") },
+ { "MoveToWorkspace8Key", N_("Move window to workspace 8") },
+ { "MoveToWorkspace9Key", N_("Move window to workspace 9") },
+ { "MoveToWorkspace10Key", N_("Move window to workspace 10") },
+
+ /* Window Selection */
+ { "WindowShortcut1Key", N_("Shortcut for window 1") },
+ { "WindowShortcut2Key", N_("Shortcut for window 2") },
+ { "WindowShortcut3Key", N_("Shortcut for window 3") },
+ { "WindowShortcut4Key", N_("Shortcut for window 4") },
+ { "WindowShortcut5Key", N_("Shortcut for window 5") },
+ { "WindowShortcut6Key", N_("Shortcut for window 6") },
+ { "WindowShortcut7Key", N_("Shortcut for window 7") },
+ { "WindowShortcut8Key", N_("Shortcut for window 8") },
+ { "WindowShortcut9Key", N_("Shortcut for window 9") },
+ { "WindowShortcut10Key", N_("Shortcut for window 10") },
+
+ /* Misc. */
+ { "WindowRelaunchKey", N_("Launch new instance of application") },
+ { "ScreenSwitchKey", N_("Switch to Next Screen/Monitor") },
+ { "DockRaiseLowerKey", N_("Raise/Lower Dock") },
+ { "ClipRaiseLowerKey", N_("Raise/Lower Clip") }
+#ifdef XKB_MODELOCK
+ ,{ "ToggleKbdModeKey", N_("Toggle keyboard language") }
#endif /* XKB_MODELOCK */
};
@@ -388,7 +400,7 @@ static void showData(_Panel * panel)
for (i = 0; i < panel->actionCount; i++) {
- str = GetStringForKey(keyOptions[i]);
+ str = GetStringForKey(keyOptions[i].key);
if (panel->shortcuts[i])
wfree(panel->shortcuts[i]);
if (str)
@@ -437,6 +449,7 @@ static void createPanel(Panel * p)
WMScreen *scr = WMWidgetScreen(panel->parent);
WMColor *color;
WMFont *boldFont;
+ int i;
panel->capturing = 0;
@@ -469,78 +482,9 @@ static void createPanel(Panel * p)
WMSetListUserDrawProc(panel->actLs, paintItem);
WMHangData(panel->actLs, panel);
- WMAddListItem(panel->actLs, _("Open applications menu"));
- WMAddListItem(panel->actLs, _("Open window list menu"));
- WMAddListItem(panel->actLs, _("Open window commands menu"));
- WMAddListItem(panel->actLs, _("Hide active application"));
- WMAddListItem(panel->actLs, _("Hide other applications"));
- WMAddListItem(panel->actLs, _("Miniaturize active window"));
- WMAddListItem(panel->actLs, _("Miniaturize all windows"));
- WMAddListItem(panel->actLs, _("Close active window"));
- WMAddListItem(panel->actLs, _("Maximize active window"));
- WMAddListItem(panel->actLs, _("Maximize active window vertically"));
- WMAddListItem(panel->actLs, _("Maximize active window horizontally"));
- WMAddListItem(panel->actLs, _("Maximize active window left half"));
- WMAddListItem(panel->actLs, _("Maximize active window right half"));
- WMAddListItem(panel->actLs, _("Maximus: Tiled maximization "));
- WMAddListItem(panel->actLs, _("Raise active window"));
- WMAddListItem(panel->actLs, _("Lower active window"));
- WMAddListItem(panel->actLs, _("Raise/Lower window under mouse
pointer"));
- WMAddListItem(panel->actLs, _("Shade active window"));
- WMAddListItem(panel->actLs, _("Move/Resize active window"));
- WMAddListItem(panel->actLs, _("Select active window"));
- WMAddListItem(panel->actLs, _("Focus next window"));
- WMAddListItem(panel->actLs, _("Focus previous window"));
- WMAddListItem(panel->actLs, _("Focus next group window"));
- WMAddListItem(panel->actLs, _("Focus previous group window"));
- WMAddListItem(panel->actLs, _("Switch to next workspace"));
- WMAddListItem(panel->actLs, _("Switch to previous workspace"));
- WMAddListItem(panel->actLs, _("Switch to last used workspace"));
- WMAddListItem(panel->actLs, _("Switch to next ten workspaces"));
- WMAddListItem(panel->actLs, _("Switch to previous ten workspaces"));
- WMAddListItem(panel->actLs, _("Switch to workspace 1"));
- WMAddListItem(panel->actLs, _("Switch to workspace 2"));
- WMAddListItem(panel->actLs, _("Switch to workspace 3"));
- WMAddListItem(panel->actLs, _("Switch to workspace 4"));
- WMAddListItem(panel->actLs, _("Switch to workspace 5"));
- WMAddListItem(panel->actLs, _("Switch to workspace 6"));
- WMAddListItem(panel->actLs, _("Switch to workspace 7"));
- WMAddListItem(panel->actLs, _("Switch to workspace 8"));
- WMAddListItem(panel->actLs, _("Switch to workspace 9"));
- WMAddListItem(panel->actLs, _("Switch to workspace 10"));
- WMAddListItem(panel->actLs, _("Move window to next workspace"));
- WMAddListItem(panel->actLs, _("Move window to previous workspace"));
- WMAddListItem(panel->actLs, _("Move window to last used workspace"));
- WMAddListItem(panel->actLs, _("Move window to next ten workspaces"));
- WMAddListItem(panel->actLs, _("Move window to previous ten
workspaces"));
- WMAddListItem(panel->actLs, _("Move window to workspace 1"));
- WMAddListItem(panel->actLs, _("Move window to workspace 2"));
- WMAddListItem(panel->actLs, _("Move window to workspace 3"));
- WMAddListItem(panel->actLs, _("Move window to workspace 4"));
- WMAddListItem(panel->actLs, _("Move window to workspace 5"));
- WMAddListItem(panel->actLs, _("Move window to workspace 6"));
- WMAddListItem(panel->actLs, _("Move window to workspace 7"));
- WMAddListItem(panel->actLs, _("Move window to workspace 8"));
- WMAddListItem(panel->actLs, _("Move window to workspace 9"));
- WMAddListItem(panel->actLs, _("Move window to workspace 10"));
- WMAddListItem(panel->actLs, _("Shortcut for window 1"));
- WMAddListItem(panel->actLs, _("Shortcut for window 2"));
- WMAddListItem(panel->actLs, _("Shortcut for window 3"));
- WMAddListItem(panel->actLs, _("Shortcut for window 4"));
- WMAddListItem(panel->actLs, _("Shortcut for window 5"));
- WMAddListItem(panel->actLs, _("Shortcut for window 6"));
- WMAddListItem(panel->actLs, _("Shortcut for window 7"));
- WMAddListItem(panel->actLs, _("Shortcut for window 8"));
- WMAddListItem(panel->actLs, _("Shortcut for window 9"));
- WMAddListItem(panel->actLs, _("Shortcut for window 10"));
- WMAddListItem(panel->actLs, _("Launch new instance of application"));
- WMAddListItem(panel->actLs, _("Switch to Next Screen/Monitor"));
- WMAddListItem(panel->actLs, _("Raise/Lower Dock"));
- WMAddListItem(panel->actLs, _("Raise/Lower Clip"));
-#ifdef XKB_MODELOCK
- WMAddListItem(panel->actLs, _("Toggle keyboard language"));
-#endif /* XKB_MODELOCK */
-
+ for (i = 0; i < sizeof(keyOptions)/sizeof(keyOptions[0]); i++) {
+ WMAddListItem(panel->actLs, _(keyOptions[i].title));
+ }
WMSetListAction(panel->actLs, listClick, panel);
panel->actionCount = WMGetListNumberOfRows(panel->actLs);
@@ -602,10 +546,10 @@ static void storeData(_Panel * panel)
}
}
if (str) {
- SetStringForKey(str, keyOptions[i]);
+ SetStringForKey(str, keyOptions[i].key);
wfree(str);
} else {
- SetStringForKey("None", keyOptions[i]);
+ SetStringForKey("None", keyOptions[i].key);
}
}
}
-----------------------------------------------------------------------
Summary of changes:
WPrefs.app/KeyboardShortcuts.c | 244 +++++++++++++++------------------------
configure.ac | 2 +-
wrlib/Makefile.am | 1 +
wrlib/color.c | 4 +-
wrlib/context.c | 2 +-
wrlib/convert.c | 2 +-
wrlib/draw.c | 24 ++--
wrlib/gif.c | 1 +
wrlib/gradient.c | 2 +-
wrlib/imgformat.h | 77 +++++++++++++
wrlib/jpeg.c | 3 +-
wrlib/load.c | 36 +-----
wrlib/misc.c | 6 +-
wrlib/nxpm.c | 3 +-
wrlib/png.c | 3 +-
wrlib/ppm.c | 3 +-
wrlib/raster.c | 4 +-
wrlib/save.c | 4 +-
wrlib/tiff.c | 3 +-
wrlib/wraster.h | 58 +++++-----
wrlib/xpm.c | 5 +-
21 files changed, 245 insertions(+), 242 deletions(-)
create mode 100644 wrlib/imgformat.h
repo.or.cz automatic notification. Contact project admin [email protected]
if you want to unsubscribe, or site admin [email protected] if you receive
no reply.
--
wmaker-crm.git ("The Window Maker window manager")
--
To unsubscribe, send mail to [email protected].