diff --git a/cross-compiling-TDE-for-the-RPi3.html b/cross-compiling-TDE-for-the-RPi3.html
index 0b4c71d..539fa95 100755
--- a/cross-compiling-TDE-for-the-RPi3.html
+++ b/cross-compiling-TDE-for-the-RPi3.html
@@ -133,6 +133,8 @@ Builds have been done for the RPi3 running systems based on Slackware-arm-curren
The packages listed on this page have been built on an x86_64 machine and installed and tested OK on an RPi3.
+[Edit: builds for R14.0.9 have been verified for 64-bit arm only].
+
For any problems, questions, etc please open an issue at tde-slackbuilds.
Why cross-compile?
@@ -956,30 +958,30 @@ mv ../linux-g++ mkspecs/
echo $'--- mkspecs/linux-g++/qmake.conf
+++ mkspecs/linux-g++/qmake.conf
@@ -11 +11 @@
--QMAKE_CC\t\t= gcc
-+QMAKE_CC\t\t= $(COMPILER)
+-QMAKE_CC\t\t= gcc
++QMAKE_CC\t\t= $(COMPILER)
@@ -29 +29 @@
--QMAKE_CXX\t\t= g++
-+QMAKE_CXX\t\t= $(COMPILER_CXX)
+-QMAKE_CXX\t\t= g++
++QMAKE_CXX\t\t= $(COMPILER_CXX)
@@ -42,2 +42,2 @@
--QMAKE_INCDIR_X11\t= /usr/X11R6/include
--QMAKE_LIBDIR_X11\t= /usr/X11R6/lib
-+QMAKE_INCDIR_X11\t= /usr/include/X11
-+QMAKE_LIBDIR_X11\t= /usr/lib$(LIBDIRSUFFIX)
+-QMAKE_INCDIR_X11\t= /usr/X11R6/include
+-QMAKE_LIBDIR_X11\t= /usr/X11R6/lib
++QMAKE_INCDIR_X11\t= /usr/include/X11
++QMAKE_LIBDIR_X11\t= /usr/lib$(LIBDIRSUFFIX)
@@ -45,3 +45,3 @@
--QMAKE_LIBDIR_QT\t\t= $(QTDIR)/lib
--QMAKE_INCDIR_OPENGL\t= /usr/X11R6/include
--QMAKE_LIBDIR_OPENGL\t= /usr/X11R6/lib
-+QMAKE_LIBDIR_QT\t\t= $(QTDIR)/lib$(LIBDIRSUFFIX)
-+QMAKE_INCDIR_OPENGL\t= /usr/include/GL
-+QMAKE_LIBDIR_OPENGL\t= /usr/lib$(LIBDIRSUFFIX)
+-QMAKE_LIBDIR_QT\t\t= $(QTDIR)/lib
+-QMAKE_INCDIR_OPENGL\t= /usr/X11R6/include
+-QMAKE_LIBDIR_OPENGL\t= /usr/X11R6/lib
++QMAKE_LIBDIR_QT\t\t= $(QTDIR)/lib$(LIBDIRSUFFIX)
++QMAKE_INCDIR_OPENGL\t= /usr/include/GL
++QMAKE_LIBDIR_OPENGL\t= /usr/lib$(LIBDIRSUFFIX)
@@ -49,2 +49,2 @@
--QMAKE_LINK\t\t= g++
--QMAKE_LINK_SHLIB\t= g++
-+QMAKE_LINK\t\t= $(COMPILER_CXX)
-+QMAKE_LINK_SHLIB\t= $(COMPILER_CXX)
+-QMAKE_LINK\t\t= g++
+-QMAKE_LINK_SHLIB\t= g++
++QMAKE_LINK\t\t= $(COMPILER_CXX)
++QMAKE_LINK_SHLIB\t= $(COMPILER_CXX)
@@ -58 +58 @@
--QMAKE_RPATH\t\t= -Wl,-rpath,
+-QMAKE_RPATH\t\t= -Wl,-rpath,
+QMAKE_RPATH =' | while read line
do
patch -p0
@@ -1001,15 +1003,15 @@ sed -i "s|/usr|$SYSROOT&|" config.tests/unix/checkavail
echo $'--- mkspecs/linux-arm-g++/qmake.conf
+++ mkspecs/linux-arm-g++/qmake.conf
@@ -42,2 +42,2 @@
--QMAKE_INCDIR_X11\t= /usr/include/X11
--QMAKE_LIBDIR_X11\t= /usr/lib$(LIBDIRSUFFIX)
-+QMAKE_INCDIR_X11\t= $(SYSROOT)/usr/include/X11
-+QMAKE_LIBDIR_X11\t= $(SYSROOT)/usr/lib$(LIBDIRSUFFIX)
+-QMAKE_INCDIR_X11\t= /usr/include/X11
+-QMAKE_LIBDIR_X11\t= /usr/lib$(LIBDIRSUFFIX)
++QMAKE_INCDIR_X11\t= $(SYSROOT)/usr/include/X11
++QMAKE_LIBDIR_X11\t= $(SYSROOT)/usr/lib$(LIBDIRSUFFIX)
@@ -46,2 +46,2 @@
--QMAKE_INCDIR_OPENGL\t= /usr/include/GL
--QMAKE_LIBDIR_OPENGL\t= /usr/lib$(LIBDIRSUFFIX)
-+QMAKE_INCDIR_OPENGL\t= $(SYSROOT)/usr/include/GL
-+QMAKE_LIBDIR_OPENGL\t= $(SYSROOT)/usr/lib$(LIBDIRSUFFIX)' | while read line
+-QMAKE_INCDIR_OPENGL\t= /usr/include/GL
+-QMAKE_LIBDIR_OPENGL\t= /usr/lib$(LIBDIRSUFFIX)
++QMAKE_INCDIR_OPENGL\t= $(SYSROOT)/usr/include/GL
++QMAKE_LIBDIR_OPENGL\t= $(SYSROOT)/usr/lib$(LIBDIRSUFFIX)' | while read line
do
patch -p0
done
@@ -1764,30 +1766,30 @@ sed -i '20s|^|#include <linux/limits.h>|' kdesktop/lock/lockprocess.cc
--- tdm/kfrontend/themes/o2_enterprise/enterprise.xml
+++ tdm/kfrontend/themes/o2_enterprise/enterprise.xml
@@ -12 +12 @@
--\t\t\t<normal color="#000000" font="Sans 10" />
-+\t\t\t<normal color="#ffff74" font="Sans 10" />
+-\t\t\t<normal color="#000000" font="Sans 10" />
++\t\t\t<normal color="#ffff74" font="Sans 10" />
@@ -39 +39 @@
--\t\t\t<pos width="box" x="540" y="188" anchor="c" height="box" />
-+\t\t\t<pos width="38" x="540" y="188" anchor="c" height="box" />
+-\t\t\t<pos width="box" x="540" y="188" anchor="c" height="box" />
++\t\t\t<pos width="38" x="540" y="188" anchor="c" height="box" />
@@ -42 +42 @@
--\t\t\t\t\t<pos x="90%" y="50%" anchor="c" />
-+\t\t\t\t\t<pos x="40%" y="50%" anchor="c" />
+-\t\t\t\t\t<pos x="90%" y="50%" anchor="c" />
++\t\t\t\t\t<pos x="40%" y="50%" anchor="c" />
@@ -59 +59 @@
--\t\t\t\t\t\t\t\t<normal color="#000000" font="Sans Condensed 10" />
-+\t\t\t\t\t\t\t\t<normal color="#ffff74" font="Sans Condensed 10" />
+-\t\t\t\t\t\t\t\t<normal color="#000000" font="Sans Condensed 10" />
++\t\t\t\t\t\t\t\t<normal color="#ffff74" font="Sans Condensed 10" />
@@ -64 +64 @@
--\t\t\t\t\t\t\t\t<normal color="#000000" font="Sans Condensed 10" />
-+\t\t\t\t\t\t\t\t<normal color="#ffff74" font="Sans Condensed 10" />
+-\t\t\t\t\t\t\t\t<normal color="#000000" font="Sans Condensed 10" />
++\t\t\t\t\t\t\t\t<normal color="#ffff74" font="Sans Condensed 10" />
@@ -86,2 +86,2 @@
--\t\t\t\t<pos x="435" y="293" anchor="s" />
--\t\t\t\t<normal color="#CD0000" font="Sans 10" />
-+\t\t\t\t<pos x="435" y="240" anchor="s" />
-+\t\t\t\t<normal color="#ff0000" font="Sans 11" />
+-\t\t\t\t<pos x="435" y="293" anchor="s" />
+-\t\t\t\t<normal color="#CD0000" font="Sans 10" />
++\t\t\t\t<pos x="435" y="240" anchor="s" />
++\t\t\t\t<normal color="#ff0000" font="Sans 11" />
@@ -93,2 +93,2 @@
--\t\t\t\t<normal color="#CD0000" font="Sans 10" />
--\t\t\t\t<pos x="435" y="323" anchor="s" />
-+\t\t\t\t<normal color="#ff0000" font="Sans 11" />
-+\t\t\t\t<pos x="435" y="260" anchor="s" />
+-\t\t\t\t<normal color="#CD0000" font="Sans 10" />
+-\t\t\t\t<pos x="435" y="323" anchor="s" />
++\t\t\t\t<normal color="#ff0000" font="Sans 11" />
++\t\t\t\t<pos x="435" y="260" anchor="s" />
' | while read line
do
patch -p0
@@ -2599,34 +2601,34 @@ untar_fn
+#endif
@@ -453,0 +469,3 @@
+#ifdef GIFLIB_MAJOR
-+\t fprintf(stderr, "giflib error: %s\\n", GifErrorString(gif->Error));
++\t fprintf(stderr, "giflib error: %s\\n", GifErrorString(gif->Error));
+#else
@@ -454,0 +473 @@
+#endif
@@ -460,0 +480,3 @@
+#ifdef GIFLIB_MAJOR
-+\t fprintf(stderr, "giflib error: %s\\n", GifErrorString(gif->Error));
++\t fprintf(stderr, "giflib error: %s\\n", GifErrorString(gif->Error));
+#else
@@ -461,0 +484 @@
+#endif
@@ -466 +489 @@
--\t if (*h > 32767 || *w > 32767)
-+\t if (*h <= 0 || *h > 32767 || *w <= 0 || *w > 32767)
+-\t if (*h > 32767 || *w > 32767)
++\t if (*h <= 0 || *h > 32767 || *w <= 0 || *w > 32767)
@@ -472,0 +496,3 @@
+#ifdef GIFLIB_MAJOR
-+\t DGifCloseFile(gif, NULL);
++\t DGifCloseFile(gif, NULL);
+#else
@@ -473,0 +500 @@
+#endif
@@ -478,0 +506,3 @@
+#ifdef GIFLIB_MAJOR
-+\t DGifCloseFile(gif, NULL);
++\t DGifCloseFile(gif, NULL);
+#else
@@ -479,0 +510 @@
+#endif
@@ -489,0 +521,3 @@
+#ifdef GIFLIB_MAJOR
-+\t\t DGifCloseFile(gif, NULL);
++\t\t DGifCloseFile(gif, NULL);
+#else
@@ -490,0 +525 @@
+#endif
@@ -2650,47 +2652,47 @@ untar_fn
- if (ncolors > 32766)
+ if (ncolors <= 0 || ncolors > 32766)
@@ -1038 +1082 @@
--\t\t if (cpp > 5)
-+\t\t if (cpp <= 0 || cpp > 5)
+-\t\t if (cpp > 5)
++\t\t if (cpp <= 0 || cpp > 5)
@@ -1044 +1088 @@
--\t\t if (*w > 32767)
-+\t\t if (*w <= 0 || *w > 32767)
+-\t\t if (*w > 32767)
++\t\t if (*w <= 0 || *w > 32767)
@@ -1050 +1094 @@
--\t\t if (*h > 32767)
-+\t\t if (*h <= 0 || *h > 32767)
+-\t\t if (*h > 32767)
++\t\t if (*h <= 0 || *h > 32767)
@@ -1082,0 +1127 @@
-+\t\t int space;
++\t\t int space;
@@ -1087,0 +1133 @@
-+\t\t space = sizeof(col) - 1;
++\t\t space = sizeof(col) - 1;
@@ -1110,4 +1156,4 @@
--\t\t\t\t if (col[0])
--\t\t\t\t\tstrcat(col, " ");
+-\t\t\t\t if (col[0])
+-\t\t\t\t\tstrcat(col, " ");
- if (strlen(col) + strlen(s) < sizeof(col))
--\t\t\t\t\tstrcat(col, s);
-+\t\t\t\t if (col[0] && space > 0)
-+\t\t\t\t\tstrcat(col, " "), space -= 1;
+-\t\t\t\t\tstrcat(col, s);
++\t\t\t\t if (col[0] && space > 0)
++\t\t\t\t\tstrcat(col, " "), space -= 1;
+ if (slen <= space)
-+\t\t\t\t\tstrcat(col, s), space -= slen;
++\t\t\t\t\tstrcat(col, s), space -= slen;
@@ -1143 +1189,2 @@
--\t\t\t\t strcpy(tok, s);
-+\t\t\t\t if (slen < sizeof(tok));
-+\t\t\t\t strcpy(tok, s);
+-\t\t\t\t strcpy(tok, s);
++\t\t\t\t if (slen < sizeof(tok));
++\t\t\t\t strcpy(tok, s);
@@ -1144,0 +1192 @@
-+\t\t\t\t space = sizeof(col) - 1;
++\t\t\t\t space = sizeof(col) - 1;
@@ -1148,3 +1196,4 @@
--\t\t\t\t if (col[0])
--\t\t\t\t strcat(col, " ");
--\t\t\t\t strcat(col, s);
-+\t\t\t\t if (col[0] && space > 0)
-+\t\t\t\t strcat(col, " "), space -=1;
-+\t\t\t\t if (slen <= space)
-+\t\t\t\t strcat(col, s), space -= slen;
+-\t\t\t\t if (col[0])
+-\t\t\t\t strcat(col, " ");
+-\t\t\t\t strcat(col, s);
++\t\t\t\t if (col[0] && space > 0)
++\t\t\t\t strcat(col, " "), space -=1;
++\t\t\t\t if (slen <= space)
++\t\t\t\t strcat(col, s), space -= slen;
@@ -1379 +1428 @@
--\t if (a > 32767)
-+\t if (a <= 0 || a > 32767)
+-\t if (a > 32767)
++\t if (a <= 0 || a > 32767)
@@ -1384 +1433 @@
--\t if (b > 32767)
-+\t if (b <= 0 || b > 32767)
+-\t if (b > 32767)
++\t if (b <= 0 || b > 32767)
--- Imlib/misc.c
+++ Imlib/misc.c
@@ -677,0 +678,4 @@
@@ -2699,9 +2701,9 @@ untar_fn
+ id->x.shmp = 0;
+ id->max_shm = 0;
@@ -693 +697,2 @@
--\t if (XShmPixmapFormat(id->x.disp) == ZPixmap)
-+\t if ((XShmPixmapFormat(id->x.disp) == ZPixmap &&
-+\t\t (pm == True)))
+-\t if (XShmPixmapFormat(id->x.disp) == ZPixmap)
++\t if ((XShmPixmapFormat(id->x.disp) == ZPixmap &&
++\t\t (pm == True)))
@@ -698 +702,0 @@
- else
@@ -700,4 +704 @@
@@ -2711,59 +2713,59 @@ untar_fn
- }
+
@@ -955,2 +956,2 @@
--\t if (id->x.shm)
--\t id->x.shmp = p->sharedpixmaps;
-+\t if (!p->sharedpixmaps)
-+\t id->x.shmp = 0;
+-\t if (id->x.shm)
+-\t id->x.shmp = p->sharedpixmaps;
++\t if (!p->sharedpixmaps)
++\t id->x.shmp = 0;
--- Imlib/save.c
+++ Imlib/save.c
@@ -345 +345 @@
--\t if (setjmp(png_ptr->jmpbuf))
-+\t if (setjmp(png_jmpbuf(png_ptr)))
+-\t if (setjmp(png_ptr->jmpbuf))
++\t if (setjmp(png_jmpbuf(png_ptr)))
--- Imlib/utils.c
+++ Imlib/utils.c
@@ -1498,0 +1499 @@
+ memset(lookup, 0, sizeof(lookup));
@@ -1502,0 +1504,15 @@
+ if (!line)
-+\tbreak;
++\tbreak;
+ line = strdup(line);
+ if (!line)
-+\tbreak;
++\tbreak;
+ len = strlen(line);
+ for (i = 0; i < len; ++i)
-+\t{
-+\t c = line[i];
-+\t if (c < 32)
-+\t line[i] = 32;
-+\t else if (c > 127)
-+\t line[i] = 127;
-+\t}
++\t{
++\t c = line[i];
++\t if (c < 32)
++\t line[i] = 32;
++\t else if (c > 127)
++\t line[i] = 127;
++\t}
+
@@ -1507 +1523 @@
--\t if (ncolors > 32766)
-+\t if (ncolors <= 0 || ncolors > 32766)
+-\t if (ncolors > 32766)
++\t if (ncolors <= 0 || ncolors > 32766)
@@ -1510,0 +1527 @@
-+\t free(line);
++\t free(line);
@@ -1513 +1530 @@
--\t if (cpp > 5)
-+\t if (cpp <= 0 || cpp > 5)
+-\t if (cpp > 5)
++\t if (cpp <= 0 || cpp > 5)
@@ -1516,0 +1534 @@
-+\t free(line);
++\t free(line);
@@ -1519 +1537 @@
--\t if (w > 32767)
-+\t if (w <= 0 || w > 32767)
+-\t if (w > 32767)
++\t if (w <= 0 || w > 32767)
@@ -1522,0 +1541 @@
-+\t free(line);
++\t free(line);
@@ -1525 +1544 @@
--\t if (h > 32767)
-+\t if (h <= 0 || h > 32767)
+-\t if (h > 32767)
++\t if (h <= 0 || h > 32767)
@@ -1528,0 +1548 @@
-+\t free(line);
++\t free(line);
@@ -1535,0 +1556 @@
-+\t free(line);
++\t free(line);
@@ -1544,0 +1566 @@
-+\t free(line);
++\t free(line);
@@ -1819,0 +1842 @@
+ free(line);
@@ -1961,2 +1984 @@
@@ -2793,34 +2795,34 @@ untar_fn
+#endif
@@ -45,0 +50,3 @@
+#ifdef GIFLIB_MAJOR
-+\t fprintf(stderr, "giflib error: %s\\n", GifErrorString(gif->Error));
++\t fprintf(stderr, "giflib error: %s\\n", GifErrorString(gif->Error));
+#else
@@ -46,0 +54 @@
+#endif
@@ -52,0 +61,3 @@
+#ifdef GIFLIB_MAJOR
-+\t fprintf(stderr, "giflib error: %s\\n", GifErrorString(gif->Error));
++\t fprintf(stderr, "giflib error: %s\\n", GifErrorString(gif->Error));
+#else
@@ -53,0 +65 @@
+#endif
@@ -58 +70 @@
--\t if(*h > 32767 || *w > 32767)
-+\t if(*h <= 0 || *h > 32767 || *w <= 0 || *w > 32767)
+-\t if(*h > 32767 || *w > 32767)
++\t if(*h <= 0 || *h > 32767 || *w <= 0 || *w > 32767)
@@ -64,0 +77,3 @@
+#ifdef GIFLIB_MAJOR
-+\t DGifCloseFile(gif, NULL);
++\t DGifCloseFile(gif, NULL);
+#else
@@ -65,0 +81 @@
+#endif
@@ -70,0 +87,3 @@
+#ifdef GIFLIB_MAJOR
-+\t DGifCloseFile(gif, NULL);
++\t DGifCloseFile(gif, NULL);
+#else
@@ -71,0 +91 @@
+#endif
@@ -81,0 +102,3 @@
+#ifdef GIFLIB_MAJOR
-+\t\t DGifCloseFile(gif, NULL);
++\t\t DGifCloseFile(gif, NULL);
+#else
@@ -82,0 +106 @@
+#endif
@@ -2849,22 +2851,22 @@ untar_fn
+ png_set_expand(png_ptr);
+
@@ -443 +446 @@
--\tif (setjmp(png_ptr->jmpbuf))
-+\tif (setjmp(png_jmpbuf(png_ptr)))
+-\tif (setjmp(png_ptr->jmpbuf))
++\tif (setjmp(png_jmpbuf(png_ptr)))
@@ -449 +452 @@
--\tif (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
-+\tif (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB_ALPHA)
+-\tif (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
++\tif (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB_ALPHA)
@@ -638 +641 @@
--\t if (setjmp(png_ptr->jmpbuf))
-+\t if (setjmp(png_jmpbuf(png_ptr)))
+-\t if (setjmp(png_ptr->jmpbuf))
++\t if (setjmp(png_jmpbuf(png_ptr)))
--- gdk_imlib/io-ppm.c
+++ gdk_imlib/io-ppm.c
@@ -56 +56 @@
--\t if (a > 32767)
-+\t if (a <= 0 || a > 32767)
+-\t if (a > 32767)
++\t if (a <= 0 || a > 32767)
@@ -61 +61 @@
--\t if (b > 32767)
-+\t if (b <= 0 || b > 32767)
+-\t if (b > 32767)
++\t if (b <= 0 || b > 32767)
--- gdk_imlib/io-tiff.c
+++ gdk_imlib/io-tiff.c
@@ -39 +39,3 @@
@@ -2881,44 +2883,44 @@ untar_fn
+ return NULL;
+
@@ -73 +77 @@
--\t\t if (ncolors > 32766)
-+\t\t if (ncolors <= 0 || ncolors > 32766)
+-\t\t if (ncolors > 32766)
++\t\t if (ncolors <= 0 || ncolors > 32766)
@@ -79 +83 @@
--\t\t if (cpp > 5)
-+\t\t if (cpp <= 0 || cpp > 5)
+-\t\t if (cpp > 5)
++\t\t if (cpp <= 0 || cpp > 5)
@@ -85 +89 @@
--\t\t if (*w > 32767)
-+\t\t if (*w <= 0 || *w > 32767)
+-\t\t if (*w > 32767)
++\t\t if (*w <= 0 || *w > 32767)
@@ -91 +95 @@
--\t\t if (*h > 32767)
-+\t\t if (*h <= 0 || *h > 32767)
+-\t\t if (*h > 32767)
++\t\t if (*h <= 0 || *h > 32767)
@@ -122,0 +127 @@
-+\t\t int space;
++\t\t int space;
@@ -127,0 +133 @@
-+\t\t space = sizeof(col) - 1;
++\t\t space = sizeof(col) - 1;
@@ -150,4 +156,4 @@
--\t\t\t\t if (col[0])
--\t\t\t\t\tstrcat(col, " ");
--\t\t\t\t if (strlen(col) + strlen(s) < sizeof(col))
--\t\t\t\t\tstrcat(col, s);
-+\t\t\t\t if (col[0] && space > 0)
-+\t\t\t\t\tstrncat(col, " ", space), space -= 1;
-+\t\t\t\t if (slen <= space)
-+\t\t\t\t\tstrcat(col, s), space -= slen;
+-\t\t\t\t if (col[0])
+-\t\t\t\t\tstrcat(col, " ");
+-\t\t\t\t if (strlen(col) + strlen(s) < sizeof(col))
+-\t\t\t\t\tstrcat(col, s);
++\t\t\t\t if (col[0] && space > 0)
++\t\t\t\t\tstrncat(col, " ", space), space -= 1;
++\t\t\t\t if (slen <= space)
++\t\t\t\t\tstrcat(col, s), space -= slen;
@@ -183 +189,2 @@
--\t\t\t\t strcpy(tok, s);
-+\t\t\t\t if (slen < sizeof(tok))
-+\t\t\t\t strcpy(tok, s);
+-\t\t\t\t strcpy(tok, s);
++\t\t\t\t if (slen < sizeof(tok))
++\t\t\t\t strcpy(tok, s);
@@ -184,0 +192 @@
-+\t\t\t\t space = sizeof(col) - 1;
++\t\t\t\t space = sizeof(col) - 1;
@@ -188,3 +196,4 @@
--\t\t\t\t if (col[0])
--\t\t\t\t strcat(col, " ");
--\t\t\t\t strcat(col, s);
-+\t\t\t\t if (col[0] && space > 0)
-+\t\t\t\t strcat(col, " "), space -= 1;
-+\t\t\t\t if (slen <= space)
-+\t\t\t\t strcat(col, s), space -= slen;
+-\t\t\t\t if (col[0])
+-\t\t\t\t strcat(col, " ");
+-\t\t\t\t strcat(col, s);
++\t\t\t\t if (col[0] && space > 0)
++\t\t\t\t strcat(col, " "), space -= 1;
++\t\t\t\t if (slen <= space)
++\t\t\t\t strcat(col, s), space -= slen;
--- gdk_imlib/misc.c
+++ gdk_imlib/misc.c
@@ -676,0 +677,4 @@
@@ -2927,9 +2929,9 @@ untar_fn
+ id->x.shmp = 0;
+ id->max_shm = 0;
@@ -692 +696,2 @@
--\t if (XShmPixmapFormat(id->x.disp) == ZPixmap)
-+\t if ((XShmPixmapFormat(id->x.disp) == ZPixmap) &&
-+\t\t (pm == True))
+-\t if (XShmPixmapFormat(id->x.disp) == ZPixmap)
++\t if ((XShmPixmapFormat(id->x.disp) == ZPixmap) &&
++\t\t (pm == True))
@@ -697 +701,0 @@
- else
@@ -699,4 +703 @@
@@ -2939,21 +2941,21 @@ untar_fn
- }
+
@@ -938,2 +939,2 @@
--\t if (id->x.shm)
--\t id->x.shmp = p->sharedpixmaps;
-+\t if (!p->sharedpixmaps)
-+\t id->x.shmp = 0;
+-\t if (id->x.shm)
+-\t id->x.shmp = p->sharedpixmaps;
++\t if (!p->sharedpixmaps)
++\t id->x.shmp = 0;
@@ -1357,0 +1359,2 @@
-+ *\twe check G_MAX_INT/4 because rend.c malloc\'s w * h * bpp
-+ *\t+ 3 is safety margin
++ *\twe check G_MAX_INT/4 because rend.c malloc\'s w * h * bpp
++ *\t+ 3 is safety margin
@@ -1362 +1365,3 @@
--\tif( w > 32767 || h > 32767)
-+\tif (w <= 0 || w > 32767 ||
-+\t h <= 0 || h > 32767 ||
-+\t h >= (G_MAXINT/4 - 1) / w)
+-\tif( w > 32767 || h > 32767)
++\tif (w <= 0 || w > 32767 ||
++\t h <= 0 || h > 32767 ||
++\t h >= (G_MAXINT/4 - 1) / w)
@@ -1364 +1369 @@
--\treturn malloc(w * h * 3);
-+\treturn malloc(w * h * 3 + 3);
+-\treturn malloc(w * h * 3);
++\treturn malloc(w * h * 3 + 3);
@@ -1365,0 +1371 @@
+
--- gdk_imlib/utils.c
@@ -2962,47 +2964,47 @@ untar_fn
+ memset(lookup, 0, sizeof(lookup));
@@ -1242,0 +1244,15 @@
+ if (!line)
-+\tbreak;
++\tbreak;
+ line = strdup(line);
+ if (!line)
-+\tbreak;
++\tbreak;
+ len = strlen(line);
+ for (i = 0; i < len; ++i)
+ {
-+\t c = line[i];
-+\t if (c < 32)
-+\t line[i] = 32;
-+\t else if (c > 127)
-+\t line[i] = 127;
-+\t}
++\t c = line[i];
++\t if (c < 32)
++\t line[i] = 32;
++\t else if (c > 127)
++\t line[i] = 127;
++\t}
+
@@ -1247 +1263 @@
--\t if (ncolors > 32766)
-+\t if (ncolors <= 0 || ncolors > 32766)
+-\t if (ncolors > 32766)
++\t if (ncolors <= 0 || ncolors > 32766)
@@ -1250,0 +1267 @@
-+\t free(line);
++\t free(line);
@@ -1253 +1270 @@
--\t if (cpp > 5)
-+\t if (cpp <= 0 || cpp > 5)
+-\t if (cpp > 5)
++\t if (cpp <= 0 || cpp > 5)
@@ -1256,0 +1274 @@
-+\t free(line);
++\t free(line);
@@ -1259 +1277 @@
--\t if (w > 32767)
-+\t if (w <= 0 || w > 32767)
+-\t if (w > 32767)
++\t if (w <= 0 || w > 32767)
@@ -1262,0 +1281 @@
-+\t free(line);
++\t free(line);
@@ -1265 +1284 @@
--\t if (h > 32767)
-+\t if (h <= 0 || h > 32767)
+-\t if (h > 32767)
++\t if (h <= 0 || h > 32767)
@@ -1268,0 +1288 @@
-+\t free(line);
++\t free(line);
@@ -1275,0 +1296 @@
-+\t free(line);
++\t free(line);
@@ -1284,0 +1306 @@
-+\t free(line);
++\t free(line);
@@ -1358 +1380 @@
--\t\t\t if (colptr + ls <= sizeof(col))
-+\t\t\t if (colptr + ls < sizeof(col))
+-\t\t\t if (colptr + ls <= sizeof(col))
++\t\t\t if (colptr + ls < sizeof(col))
@@ -1560,0 +1583 @@
+ free(line);
' | while read line
@@ -3454,70 +3456,155 @@ mkdir $TMP/tmp-$PRGNAM
untar_fn
These patches are to build Kvkbd to
-• add a LSGT key for non-US keyboards
+• add a LSGT key, which is required for non-US keyboards
• add a RWIN key
-• add 'Lock on screen' feature
• support evdev key mapping
• support dead keys
• fix num pad keycodes
• show & and shift characters
-• set user choice of background colour
- change "antiquewhite3" to the colour of your choice - the double quotes are required
- alternative forms of the same colour are "#cdc0b0", or 205,192,176.
-echo $'--- src-orig/MainWidget.cpp
+• add 'Lock on screen' feature
+• add i18n support
+• add ColorDialog for user to set keyboard and keys colours
+• add tooltips
+
Kvkbd can be run with a different style than the system style, for example kvkbd --style plastik:
+
+## Add a key, LSGT, between 'left shift' and 'z' for non-US keyboards.
+## This duplicates '<' and '>' characters for US keyboards, but otherwise leaves the US keyboard fully functional.
+## The key which is normally lower left of Enter on non-US keyboards is above the Enter key.
+echo $'--- src/MainWidget.cpp
+++ src/MainWidget.cpp
-@@ -45,3 +45,3 @@
- #define R3LEN 9
+#
+## add a key[code] to row 4
+@@ -46 +46 @@
-#define R4LEN 7
+#define R4LEN 8
-
-@@ -71,7 +71,7 @@
-
+#
+## add keycode 94 key between l-shift and z key
+## gb=\| fr=<> de=<>| [us=<>] etc
+@@ -72,3 +72,3 @@
-\t//TQString k4="zxcvbnm"; //,./";
-\t//TQString k4s="ZXCVBNM";
-\tunsigned int kc4[R4LEN] = {52,53,54,55,56,57,58};//59,60,61};
+\t//TQString k4="<zxcvbnm"; //,./";
+\t//TQString k4s=">ZXCVBNM";
+\tunsigned int kc4[R4LEN] = {94,52,53,54,55,56,57,58};//59,60,61};
+#
+## reduce width of left shift key
+@@ -249 +249 @@
+-\tlshft->resize ( 80,30 );
++\tlshft->resize ( 45,30 );
+#
+## remove one key space after left shift
+## and fix spacing
+@@ -262 +262 @@
+-\t\tv->move ( stx+35+16+35+ ( 35*a ),sty+ ( 4*35 ) );
++\t\tv->move ( stx+lshft->width() +5+ ( 35*a ),sty+ ( 4*35 ) );
+' | patch -N -p0
+#
-This patch sets the background colour of the keys/buttons, but is not suitable for running Kvkbd with the plastik or keramik styles.
-They have a button outline within the 30x30 key footprint and the background colour shows around the edges of the outline.
-Kvkbd can be run with a different style than the system style, and kvkbd --style cde looks reasonable:
-
+## add RWin key
+echo $'--- src/MainWidget.h
++++ src/MainWidget.h
+@@ -96,2 +96,3 @@
+\tVButton *win;
++\tVButton *rwin;
+\tVButton *mnu;
+--- src/MainWidget.cpp
++++ src/MainWidget.cpp
+@@ -353,2 +354,11 @@
--\tint stx=15;
-+\tint stx=16;
- \tint sty=15;
-@@ -96,3 +96,3 @@
- \t\tf->setText ( "F"+TQString ( "%1" ).arg ( a+1 ) );
++\trwin = new VButton ( this,"" );
++\trwin->resize ( 50,30 );
++\trwin->move ( ralt->x() +ralt->width() +5, sty+ ( 5*35 ) );
++\trwin->setText ( "RWin" );
++\trwin->setKeyCode ( 134 );
++\trwin->setToggleButton ( true );
++\tmod_keys.append( rwin );
++\trwin->res();
++
+
+@@ -355,4 +364,4 @@
+ \tmnu = new VButton ( this,"" );
+-\tmnu->resize ( 45,30 );
+-\tmnu->move ( 5+ralt->x() +ralt->width(), sty+ ( 5*35 ) );
++\tmnu->resize ( 50,30 );
++\tmnu->move ( rwin->x() +rwin->width() +5, sty+ ( 5*35 ) );
+ \tmnu->setText ( "Menu" );
+' | patch -N -p0
+#
+## Fix keycodes for evdev mapping:
+## Right shift, LWin, AltGr, Menu, Right Ctrl, Num pad divide, Num pad Enter
+echo $'--- src/MainWidget.cpp
++++ src/MainWidget.cpp
+@@ -296 +296 @@
+-\trshft->setKeyCode ( 50 );
++\trshft->setKeyCode ( 62 );
+@@ -321 +321 @@
+-\twin->setKeyCode ( 115 );
++\twin->setKeyCode ( 133 );
+@@ -349 +349 @@
+-\tralt->setKeyCode ( 113 );
++\tralt->setKeyCode ( 108 );
+@@ -368 +368 @@
+-\tmnu->setKeyCode ( 117 );
++\tmnu->setKeyCode ( 135 );
+@@ -379 +379 @@
+-\trctrl->setKeyCode ( 37 );
++\trctrl->setKeyCode ( 105 );
+@@ -468 +468 @@
+-\tdiv->setKeyCode(112);
++\tdiv->setKeyCode(106);
+@@ -485 +485 @@
+-\tent->setKeyCode(36);
++\tent->setKeyCode(104);
+' | patch -N -p0
+#
+## Cosmetic changes:
+## Set F4-F5 spacing as per F8-F9
+echo $'--- src/MainWidget.cpp
++++ src/MainWidget.cpp
+@@ -97 +97 @@
-\t\tf->move ( stx+esc->width() + ( 35*a ) +20,sty );
+\t\tf->move ( stx+esc->width() +30 + ( 35*a ),sty );
- \t\tf->res();
-@@ -106,3 +106,3 @@
- \t\tf->setText ( "F"+TQString ( "%1" ).arg ( a+5 ) );
+@@ -107 +107 @@
-\t\tf->move ( stx+esc->width() + ( 35*a ) +40+ ( 4*35 ),sty );
+\t\tf->move ( stx+esc->width() +30 + ( 4*35 ) +14 + ( 35*a ),sty );
- \t\tf->res();
-@@ -117,3 +117,3 @@
- \t\tf->setText ( "F"+TQString ( "%1" ).arg ( a+9 ) );
+@@ -118 +118 @@
-\t\tf->move ( stx+esc->width() + ( 35*a ) +45+ ( 8*35 ) +10,sty );
+\t\tf->move ( stx+esc->width() +30 + ( 8*35 ) +28 + ( 35*a ),sty );
- \t\tf->res();
-@@ -138,3 +138,3 @@
- \tbksp->move ( stx+ ( R1LEN *35 ),sty+35 );
+#
+## resize keys for alignment on right side of keyboard
+@@ -139 +139 @@
-\tbksp->resize ( 46,30 );
+\tbksp->resize ( 48,30 );
- \tbksp->setText ( "Bksp" );
-@@ -148,3 +148,3 @@
- \ttab->move ( stx,sty+35+35 );
+@@ -149 +149 @@
-\ttab->resize ( 47,30 );
+\ttab->resize ( 48,30 );
- \ttab->setText ( "Tab" );
-@@ -248,3 +248,3 @@
- \tlshft->move ( stx,sty+ ( 4*35 ) );
--\tlshft->resize ( 80,30 );
-+\tlshft->resize ( 45,30 );
- \tlshft->setText ( "Shift" );
-@@ -261,3 +261,3 @@
- \t\t//v->setShiftText ( k4s.mid ( a,1 ) );
--\t\tv->move ( stx+35+16+35+ ( 35*a ),sty+ ( 4*35 ) );
-+\t\tv->move ( stx+lshft->width() +5+ ( 35*a ),sty+ ( 4*35 ) );
- \t\tbtns.append ( v );
+## reduce size of Dock image
+@@ -938 +938 @@
+-\tresize ( 96,47 );
++\tresize ( 64,31 );
+' | patch -N -p0
+#
+## Revise positions of keys and reformat code to represent the calculations left-to-right
+echo $'--- src/MainWidget.cpp
++++ src/MainWidget.cpp
+@@ -219,3 +219,3 @@
+ \tsmcl->setKeyCode ( 47 );
+-\tsmcl->move ( stx+ ( R3LEN *35 ) +caps->width() +5,sty+ ( 3*35 ) );
++\tsmcl->move ( stx+caps->width() +5+ ( R3LEN *35 ) ,sty+ ( 3*35 ) );
+ \t//smcl->setText ( ";" );
+@@ -228,3 +228,3 @@
+ \tsngq->setKeyCode ( 48 );
+-\tsngq->move ( stx+ ( ( R3LEN +1 ) *35 ) +caps->width() +5,sty+ ( 3*35 ) );
++\tsngq->move ( stx+caps->width() +5+ ( ( R3LEN +1 ) *35 ) ,sty+ ( 3*35 ) );
+ \t//sngq->setText ( "\'" );
+@@ -237,3 +237,3 @@
+ \tenter->setKeyCode ( 36 );
+-\tenter->move ( stx+ ( ( R3LEN +2 ) *35 ) +caps->width() +5,sty+ ( 3*35 ) );
++\tenter->move ( stx+caps->width() +5+ ( ( R3LEN +2 ) *35 ) ,sty+ ( 3*35 ) );
+ \tenter->resize ( 50,30 );
@@ -269,3 +269,3 @@
\tsm->setKeyCode ( 59 );
-\tsm->move ( stx+ ( R4LEN *35 ) +lshft->width() +5,sty+ ( 4*35 ) );
@@ -3533,193 +3620,301 @@ These patches are to build Kvkbd to
-\tsl->move ( stx+ ( ( R4LEN +2 ) *35 ) +lshft->width() +5,sty+ ( 4*35 ) );
+\tsl->move ( stx+lshft->width() +5+ ( ( R4LEN +2 ) *35 ) ,sty+ ( 4*35 ) );
\t//sl->setText ( "/" );
-@@ -295,4 +295,4 @@
- \trshft = new VButton ( this,"" );
--\trshft->setKeyCode ( 50 );
+@@ -296,3 +296,3 @@
+ \trshft->setKeyCode ( 62 );
-\trshft->move ( stx+ ( ( R4LEN +3 ) *35 ) +lshft->width() +5,sty+ ( 4*35 ) );
-+\trshft->setKeyCode ( 62 );
+\trshft->move ( stx+lshft->width() +5+ ( ( R4LEN +3 ) *35 ) ,sty+ ( 4*35 ) );
\trshft->resize ( 68,30 );
-@@ -318,7 +318,8 @@
- \twin->resize ( 45,30 );
+@@ -305,3 +305,3 @@
+ \t
+-
++\t//ROW 5
+ \tlctrl = new VButton ( this,"" );
+@@ -317,5 +317,5 @@
+ \twin = new VButton ( this,"" );
+-\twin->resize ( 45,30 );
-\twin->move ( 5+lctrl->x() +lctrl->width(), sty+ ( 5*35 ) );
-\twin->setText ( "Win" );
--\twin->setKeyCode ( 115 );
--\twin->setToggleButton ( true );
--\tmod_keys.append ( win );
++\twin->resize ( 50,30 );
+\twin->move ( lctrl->x() +lctrl->width() +5, sty+ ( 5*35 ) );
+\twin->setText ( "LWin" );
-+\twin->setKeyCode ( 133 );
-+\twin->setToggleButton ( false );
-+\tconnect ( win, TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) );
-+\tother_keys.append( win );
- \twin->res();
-@@ -328,3 +329,3 @@
+\twin->setKeyCode ( 133 );
+@@ -328,3 +328,3 @@
\tlalt->resize ( 45,30 );
-\tlalt->move ( 5+win->x() +win->width(), sty+ ( 5*35 ) );
+\tlalt->move ( win->x() +win->width() +5, sty+ ( 5*35 ) );
\tlalt->setText ( "Alt" );
-@@ -338,4 +339,4 @@
+@@ -338,4 +338,4 @@
\tspace->setKeyCode ( 65 );
-\tspace->resize ( 5*35+28,30 );
-\tspace->move ( 5+lalt->x() +lalt->width(),sty+ ( 5*35 ) );
-+\tspace->resize ( 153,30 );
++\tspace->resize ( 133,30 );
+\tspace->move ( lalt->x() +lalt->width() +5, sty+ ( 5*35 ) );
\tconnect ( space, TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) );
-@@ -346,5 +347,5 @@
- \tralt->resize ( 45,30 );
+@@ -345,4 +345,4 @@
+ \tralt = new VButton ( this,"" );
+-\tralt->resize ( 45,30 );
-\tralt->move ( 5+space->x() +space->width(), sty+ ( 5*35 ) );
++\tralt->resize ( 50,30 );
+\tralt->move ( space->x() +space->width() +5, sty+ ( 5*35 ) );
\tralt->setText ( "AltGr" );
--\tralt->setKeyCode ( 113 );
-+\tralt->setKeyCode ( 108 );
- \tralt->setToggleButton ( true );
-@@ -353,2 +354,12 @@
-
-+\trwin = new VButton ( this,"" );
-+\trwin->resize ( 45,30 );
-+\trwin->move ( ralt->x() +ralt->width() +5, sty+ ( 5*35 ) );
-+\trwin->setText ( "RWin" );
-+\trwin->setKeyCode ( 134 );
-+\trwin->setToggleButton ( false );
-+\tconnect ( rwin, TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) );
-+\tother_keys.append( rwin );
-+\trwin->res();
-+
-
-@@ -356,5 +367,5 @@
- \tmnu->resize ( 45,30 );
--\tmnu->move ( 5+ralt->x() +ralt->width(), sty+ ( 5*35 ) );
-+\tmnu->move ( rwin->x() +rwin->width() +5, sty+ ( 5*35 ) );
- \tmnu->setText ( "Menu" );
--\tmnu->setKeyCode ( 117 );
-+\tmnu->setKeyCode ( 135 );
- \tmnu->setToggleButton ( false );
-@@ -367,5 +378,5 @@
+@@ -376,3 +376,3 @@
\trctrl->resize ( 45,30 );
-\trctrl->move ( 5+mnu->x() +mnu->width(), sty+ ( 5*35 ) );
+\trctrl->move ( mnu->x() +mnu->width() +5, sty+ ( 5*35 ) );
\trctrl->setText ( "Ctrl" );
--\trctrl->setKeyCode ( 37 );
-+\trctrl->setKeyCode ( 105 );
- \trctrl->setToggleButton ( true );
-@@ -377,5 +388,5 @@
- \tquit = new VButton ( this,"quit" );
--\tquit->resize ( 15,30 );
--\tquit->move ( 525,15 );
--\tquit->setPaletteBackgroundColor ( TQt::red );
-+\tquit->resize ( 20,30 );
-+\tquit->move ( 526,15 );
-+\tquit->setPixmap(TQIconSet(SmallIcon("application-exit")).pixmap());
- \tquit->res();
-@@ -385,5 +396,5 @@
- \textent = new VButton(this,"extent");
--\textent->resize( 15,65 );
--\textent->move(525, 85 );
--\textent->setText(">>");
-+\textent->resize ( 20,65 );
-+\textent->move(526, 85 );
-+\textent->setPixmap(TQIconSet(SmallIcon("media-seek-forward")).pixmap());
- \textent->res();
-@@ -396,13 +407,13 @@
-
--\tsetPaletteBackgroundColor ( TQt::black );
- \tsetFocusPolicy ( TQ_NoFocus );
-+\tsetPaletteBackgroundColor ( TQColor("antiquewhite3") );
-
-
--\tint padx= 550;
+' | patch -N -p0
+#
+## Replace text on Num pad keys for a better fit
+echo $'--- src/MainWidget.cpp
++++ src/MainWidget.cpp
+@@ -411 +411 @@
-\tTQString txt[9] = { "Ho\\nme", TQString::fromUtf8("▲"), "Pg\\nUp",
-+\tint padx= 553;
+\tTQString txt[9] = { TQString::fromUtf8("H\\u2190"), TQString::fromUtf8("▲"), TQString::fromUtf8("P\\u2191"),
- \t\tTQString::fromUtf8("◄"), " ", TQString::fromUtf8("►"),
+@@ -413 +413 @@
-\t\t"End", TQString::fromUtf8("▼"), "Pg\\nDn" };
+\t\tTQString::fromUtf8("E\\u2192"), TQString::fromUtf8("▼"), TQString::fromUtf8("P\\u2193") };
- \tTQString nump[9] = {"7","8","9","4","5","6","1","2","3"};
- \tint val=0;
+@@ -457 +457 @@
+-\tnuml->setText("Num\\nLock");
++\tnuml->setText(TQString::fromUtf8("\\u2116"));
+' | patch -N -p0
+#
+## dead_* characters don't display on keys, so add single click printable character equivalents
+## to display on keys - the printed character remains as dead_<whatever>
+## Only needed for levels 0 and 1 - higher levels don't show on keys
+## NoSymbol shows as an outline square [.notdef] on keys - replace with space=blank
+## Re: MainWidget.cpp "* therefore keysymtab[] must remain SORTED by keysym value."
+echo $'--- src/MainWidget.cpp
++++ src/MainWidget.cpp
+@@ -1008,2 +1030,3 @@
+ } keysymtab[] = {
++ { 0x0000, 0x0020 }, /* NoSymbol -> <- space */
+ { 0x01a1, 0x0104 }, /* Aogonek Ą LATIN CAPITAL LETTER A WITH OGONEK */
+@@ -1781,2 +1782,18 @@
+ { 0x20ac, 0x20ac }, /* EuroSign € EURO SIGN */
++ { 0xfe50, 0x0060 }, /* dead_grave ` */
++ { 0xfe51, 0x00b4 }, /* dead_acute ´ */
++ { 0xfe52, 0x02c6 }, /* dead_circumflex ˆ */
++ { 0xfe53, 0x02dc }, /* dead_tilde ˜ small tilde */
++ { 0xfe54, 0x00af }, /* dead_macron ¯ */
++ { 0xfe55, 0x02d8 }, /* dead_breve ˘ */
++ { 0xfe56, 0x02d9 }, /* dead_abovedot ˙ */
++ { 0xfe57, 0x00a8 }, /* dead_diaeresis ¨ */
++ { 0xfe58, 0x02da }, /* dead_abovering ° */
++ { 0xfe59, 0x02dd }, /* dead_doubleacute ˝ */
++ { 0xfe5a, 0x02c7 }, /* dead_caron ˇ */
++ { 0xfe5b, 0x00b8 }, /* dead_cedilla ¸ */
++ { 0xfe5c, 0x02db }, /* dead_ogonek ˛ */
++ { 0xfe5d, 0x0269 }, /* dead_iota ɩ Latin small iota */
++ { 0xfe64, 0x1fbf }, /* dead_abovecomma ᾽ Greek Psili */
++ { 0xfe65, 0x1ffe }, /* dead_abovereversedcomma ῾ Greek Dasia */
+ };
+' | patch -N -p0
+#
+## add a tooltip for the panel icon
+echo $'--- src/MainWidget.cpp
++++ src/MainWidget.cpp
+@@ -1834,3 +1834,3 @@
+ {
+-
++\tTQToolTip::add ( this, "Virtual keyboard" );
+ }
+' | patch -N -p0
+#
+## Fix Num pad numbers where 0-9 aren't the non-shift characters on the keyboard
+## E.g. for fr, the num pad '1' [KP_1 keycode 87] appears as '&' [keycode 10] when Num Lock is on
+## And fix Del keycode so that KP_Separator prints correctly, eg for gr = comma
+## This is a quick-and-dirty fix because it effectively means that this routine is redundant.
+echo $'--- src/MainWidget.cpp
++++ src/MainWidget.cpp
+@@ -416 +416 @@
-\tint nval[9] = {16,17,18,13,14,15,10,11,12};
+\tint nval[9] = {79,80,81,83,84,85,87,88,89};
- \tint cval[9] = {79,80,81,83,84,85,87,88,89};
-@@ -426,3 +437,3 @@
- \tins->setText("Ins");
+@@ -436 +436 @@
-\tins->setKeyCode(19,90);
+\tins->setKeyCode(90,90);
- \tins->setShiftText("0");
-@@ -438,3 +449,3 @@
- \tdel->setShiftText(".");
+@@ -448 +448 @@
-\tdel->setKeyCode(60,91);
+\tdel->setKeyCode(91,91);
- \tnuml_keys.append(del);
-@@ -447,3 +458,3 @@
- \tnuml->res();
--\tnuml->setText("Num\\nLock");
-+\tnuml->setText(TQString::fromUtf8("\\u2116"));
- \tnuml->setToggleButton ( true );
-@@ -458,3 +469,3 @@
- \tdiv->setText("/");
--\tdiv->setKeyCode(112);
-+\tdiv->setKeyCode(106);
- \tother_keys.append(div);
-@@ -475,3 +486,3 @@
- \tent->setText("Ent");
--\tent->setKeyCode(36);
-+\tent->setKeyCode(104);
- \tother_keys.append(ent);
-@@ -519,2 +530,6 @@
- \t\t
-+\t\tmnu_lock = m->insertItem("Lock on screen", this, TQT_SLOT(toggleLock()));
-+\t\tbool is_locked = cfg->readBoolEntry("locked",false);
-+\t\tm->setItemChecked(mnu_lock,is_locked);
-+\t\t
- \t\t//m->insertItem("Configure", this, TQT_SLOT(config()));
-@@ -541,4 +556,4 @@
- \t\tpopup_menu = new VButton ( this,"popupmenu" );
+' | patch -N -p0
+#
+## Set a default keyboard background colour
+## - changeable from configuration menu with a later patch
+## For the plastik and keramik styles which have a key boundary within the key 30x30 footprint,
+## setting the button/key background colour will bleed through outside that boundary
+## except for the configuration button and the num pad keys, which follow these two lines.
+## Moving these settings to the beginning of MainWidget::MainWidget enables all keys to be displayed correctly.
+#
+echo $'--- src/MainWidget.cpp
++++ src/MainWidget.cpp
+@@ -79,2 +79,5 @@
+
++\tsetPaletteBackgroundColor ( TQColor("#cdc0b0") );
++\tsetFocusPolicy ( TQ_NoFocus );
++
+ // \tresize ( 550,235 );
+@@ -405,5 +408,2 @@
+
+-\tsetPaletteBackgroundColor ( TQt::black );
+-\tsetFocusPolicy ( TQ_NoFocus );
+-
+
+' | patch -N -p0
+#
+## Use icons for quit and num pad show/hide buttons
+## these are the 16x16/actions icons used for the system selected icon set
+echo $'--- src/MainWidget.cpp
++++ src/MainWidget.cpp
+#
+## num pad show button
+@@ -400 +400 @@
+-\textent->setText(">>");
++\textent->setPixmap(TQIconSet(SmallIcon("media-seek-forward")).pixmap());
+@@ -698 +698 @@
+-\t\textent->setText(">>");
++\t\textent->setPixmap(TQIconSet(SmallIcon("media-seek-forward")).pixmap());
+#
+## num pad hide button
+@@ -702 +702 @@
+-\t\textent->setText("<<");
++\t\textent->setPixmap(TQIconSet(SmallIcon("media-seek-backward")).pixmap());
+#
+## quit button
+--- src/MainWidget.cpp
++++ src/MainWidget.cpp
+@@ -392 +392 @@
+-\tquit->setPaletteBackgroundColor ( TQt::red );
++\tquit->setPixmap(TQIconSet(SmallIcon("application-exit")).pixmap());
+' | patch -N -p0
+#
+## Display '&' where it is the lower key character on the key
+## E.g. fr be azerty keyboards
+echo $'--- src/MainWidget.cpp
++++ src/MainWidget.cpp
+@@ -895,5 +897,9 @@
+ \tTQString btn_text(TQChar((uint)ret));
+ \t
+-\tv.setText(btn_text);
++\t\tTQChar c((uint)ret);
++\t\tif (c==\'&\')
++\t\t\tv.setText("&&");
++\t\telse
++\t\t\tv.setText(btn_text);
+
+ \tTQString btn_upper(btn_text.upper());
+' | patch -N -p0
+#
+## resize quit, num pad show/hide, configure buttons to see the icons better at reduced size of keyboard
+echo $'--- src/MainWidget.cpp
++++ src/MainWidget.cpp
+@@ -390,2 +390,2 @@
+-\tquit->resize ( 15,30 );
+-\tquit->move ( 525,15 );
++\tquit->resize ( 20,30 );
++\tquit->move ( 526,15 );
+@@ -398,2 +398,2 @@
+-\textent->resize( 15,65 );
+-\textent->move(525, 85 );
++\textent->resize ( 20,65 );
++\textent->move(526, 85 );
+@@ -551,2 +551,2 @@
-\t\tpopup_menu->resize ( 15,30 );
-\t\tpopup_menu->move ( 525,15+35 );
+\t\tpopup_menu->resize ( 20,30 );
+\t\tpopup_menu->move ( 526,15+35 );
- \t\t//popup_menu->setPaletteBackgroundColor ( TQt::green );
-@@ -583,3 +598,3 @@
-
+#
+## move numpad after resizing buttons
+--- src/MainWidget.cpp
++++ src/MainWidget.cpp
+@@ -410 +410 @@
+-\tint padx= 550;
++\tint padx= 554;
+#
+## move and resize keyboard
+--- src/MainWidget.cpp
++++ src/MainWidget.cpp
+@@ -593 +593 @@
-\tint d_width=550;
+\tint d_width=553;
- \tint d_height=235;
-@@ -629,6 +644,6 @@
- \t\tsdxb = width();
+@@ -639,2 +639,2 @@
-\t\tsdxs = width() - (width() * (150.0/700.0));
-\t\tVButton::pw=700.0;
-+\t\tsdxs = width() - (width() * (150.0/704.0));
-+\t\tVButton::pw=704.0;
- \t\tVButton::ph=235.0;
++\t\tsdxs = width() - (width() * (150.0/703.0));
++\t\tVButton::pw=703.0;
+@@ -642 +642 @@
-\t\tsetMinimumSize(700/3,235/3);
-+\t\tsetMinimumSize(704/3,235/3);
- \t}
-@@ -636,6 +651,6 @@
- \t\tsdxs = width();
++\t\tsetMinimumSize(703/3,235/3);
+@@ -646,2 +646,2 @@
-\t\tsdxb = width() + (width() * (150.0/550.0));
-\t\tVButton::pw=550.0;
-+\t\tsdxb = width() + (width() * (150.0/553.0));
-+\t\tVButton::pw=553.0;
- \t\tVButton::ph=235.0;
++\t\tsdxb = width() + (width() * (150.0/552.0));
++\t\tVButton::pw=552.0;
+@@ -649 +649 @@
-\t\tsetMinimumSize(550/3,235/3);
-+\t\tsetMinimumSize(553/3,235/3);
- \t}
-@@ -675,3 +690,3 @@
- \t\t//double rs = (100.0/700.0)*width();
--\t\tdouble rp = (8.0/600.0)*width();
-+\t\tdouble rp = (10.0/600.0)*width();
- \t\t//fnt.setStretch(rs);
-@@ -688,3 +703,3 @@
- \t\tTQWidget::resize ( (int)sdxs, height() );
--\t\textent->setText(">>");
-+\t\textent->setPixmap(TQIconSet(SmallIcon("media-seek-forward")).pixmap());
- \t}
-@@ -692,3 +707,3 @@
- \t\textent_visible=true;\t
--\t\textent->setText("<<");
-+\t\textent->setPixmap(TQIconSet(SmallIcon("media-seek-backward")).pixmap());
- \t\tTQWidget::resize ( (int)sdxb, height() );
-@@ -731,2 +746,14 @@
++\t\tsetMinimumSize(552/3,235/3);
+--- src/VButton.cpp
++++ src/VButton.cpp
+@@ -5 +5 @@
+-double VButton::pw=550.0;
++double VButton::pw=552.0;
+' | patch -N -p0
+#
+## missing characters in keysymtab[] - for AC12 -> AD13 key on ua keyboard
+echo $'--- src/MainWidget.cpp
++++ src/MainWidget.cpp
+@@ -1251,2 +1251,3 @@
+ { 0x06ac, 0x045c }, /* Macedonia_kje ќ CYRILLIC SMALL LETTER KJE */
++ { 0x06ad, 0x0491 }, /* Ukrainian_ghe_with_upturn ґ CYRILLIC SMALL LETTER GHE WITH UPTURN */
+ { 0x06ae, 0x045e }, /* Byelorussian_shortu ў CYRILLIC SMALL LETTER SHORT U */
+@@ -1266,2 +1267,3 @@
+ { 0x06bc, 0x040c }, /* Macedonia_KJE Ќ CYRILLIC CAPITAL LETTER KJE */
++ { 0x06bd, 0x0490 }, /* Ukrainian_GHE_WITH_UPTURN Ґ CYRILLIC CAPITAL LETTER GHE WITH UPTURN */
+ { 0x06be, 0x040e }, /* Byelorussian_SHORTU Ў CYRILLIC CAPITAL LETTER SHORT U */
+' | patch -N -p0
+#
+## generate keycode for Win keys with single click so that they can be used for xmodmap
+echo $'--- src/MainWidget.cpp
++++ src/MainWidget.cpp
+#
+## don\'t lock the LWin button
+@@ -325 +325 @@
+-\twin->setToggleButton ( true );
++\twin->setToggleButton ( false );
+## don\'t lock the RWin button
+@@ -362 +362 @@
+-\trwin->setToggleButton ( true );
++\trwin->setToggleButton ( false );
+#
+## generate keycode on click rather than wait for next key-click for keycode
+--- src/MainWidget.cpp
++++ src/MainWidget.cpp
+#
+## for LWin
+@@ -326 +326,2 @@
+-\tmod_keys.append ( win );
++\tconnect ( win, TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) );
++\tother_keys.append( win );
+#
+## for RWin
+@@ -363 +364,2 @@
+-\tmod_keys.append( rwin );
++\tconnect ( rwin, TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) );
++\tother_keys.append( rwin );
+' | patch -N -p0
+#
+## add 'Lock on screen' feature from v0.5
+echo $'--- src/MainWidget.cpp
++++ src/MainWidget.cpp
+@@ -529,4 +529,8 @@
+ \t\tm->setItemChecked(mnu_dock, show_dock);
+ \t\t
++\t\tmnu_lock = m->insertItem("Lock on screen", this, TQT_SLOT(toggleLock()));
++\t\tbool is_locked = cfg->readBoolEntry("locked",false);
++\t\tm->setItemChecked(mnu_lock,is_locked);
++\t\t
+ \t\t//m->insertItem("Configure", this, TQT_SLOT(config()));
+ \t\tm->insertSeparator();
+@@ -742,2 +746,14 @@
}
+void MainWidget::toggleLock()
+{
@@ -3734,7 +3929,75 @@ These patches are to build Kvkbd to
+
+}
void MainWidget::showDock()
-@@ -878,26 +905,22 @@
+#
+##
+--- src/MainWidget.h
++++ src/MainWidget.h
+@@ -69,2 +69,3 @@
+ \tvoid saveState();
++\tvoid toggleLock();
+
+@@ -131,2 +131,3 @@
+ \tint mnu_autores;
++\tint mnu_lock;
+
+#
+##
+--- src/DragWidget.cpp
++++ src/DragWidget.cpp
+@@ -6,3 +6,3 @@
+ \tdrag=false;
+-
++\tlocked=false;
+ }
+@@ -17,2 +17,3 @@
+ \tgpress=e->globalPos();
++\tif (locked)return;
+ \tdrag=true;
+@@ -34,2 +35,12 @@
+ }
++
++void DragWidget::setLocked(bool mode)
++{
++\tlocked=mode;
++}
++
++const bool DragWidget::isLocked() const
++{
++\treturn locked;
++}
+
+#
+##
+--- src/DragWidget.h
++++ src/DragWidget.h
+@@ -14,2 +14,5 @@
+
++\tvoid setLocked(bool mode);
++\tconst bool isLocked() const;
++
+ private:
+@@ -24,2 +27,3 @@
+ \tTQPoint gpress;
++\tbool locked;
+
+#
+##
+--- src/resizabledragwidget.cpp
++++ src/resizabledragwidget.cpp
+@@ -38,2 +38,3 @@
+ {
++\tif (locked)return;
+ \t
+' | patch -N -p0
+#
+## Fix azerty keyboards shift keys showing caps by simplifying the algorithm:
+# * if Shift Lock is on, set text as shift character, else use lower character
+# * if Caps Lock is on, set text as l.upper(), which will be upper case for alpha characters, or lower level for non-alpha characters, else use lower character
+# * for lower level or shift characters, set ampersand as a special case
+echo $'--- src/MainWidget.cpp
++++ src/MainWidget.cpp
+@@ -905,30 +905,22 @@
\tKeyCode keycode=v.getKeyCode();
-
+// first level character keysym
@@ -3749,11 +4012,13 @@ These patches are to build Kvkbd to
-\tTQString btn_text(TQChar((uint)ret));
+\tlong retl = keysym2ucs(keysym_l);
\t
--\tv.setText(btn_text);
+-\t\tTQChar c((uint)ret);
+-\t\tif (c==\'&\')
+\t\tTQChar l((uint)retl);
+\t\tif (l==\'&\')
-+\t\t\tv.setText("&&");
-+\t\telse
+ \t\t\tv.setText("&&");
+ \t\telse
+-\t\t\tv.setText(btn_text);
+\t\t\tv.setText(l);
-\tTQString btn_upper(btn_text.upper());
@@ -3774,68 +4039,10 @@ These patches are to build Kvkbd to
-\t}
+\t\t\tv.setShiftText(s);
}
-@@ -928,3 +951,3 @@
- \ticn=UserIcon ( "dock" );
--\tresize ( 96,47 );
-+\tresize ( 64,31 );
-
-@@ -999,2 +1022,3 @@
- } keysymtab[] = {
-+ { 0x0000, 0x0020 }, /* NoSymbol -> <- space */
- { 0x01a1, 0x0104 }, /* Aogonek Ą LATIN CAPITAL LETTER A WITH OGONEK */
-@@ -1237,2 +1261,3 @@
- { 0x06ac, 0x045c }, /* Macedonia_kje ќ CYRILLIC SMALL LETTER KJE */
-+ { 0x06ad, 0x0491 }, /* Ukrainian_ghe_with_upturn ґ CYRILLIC SMALL LETTER GHE WITH UPTURN */
- { 0x06ae, 0x045e }, /* Byelorussian_shortu ў CYRILLIC SMALL LETTER SHORT U */
-@@ -1252,2 +1277,3 @@
- { 0x06bc, 0x040c }, /* Macedonia_KJE Ќ CYRILLIC CAPITAL LETTER KJE */
-+ { 0x06bd, 0x0490 }, /* Ukrainian_GHE_WITH_UPTURN Ґ CYRILLIC CAPITAL LETTER GHE WITH UPTURN */
- { 0x06be, 0x040e }, /* Byelorussian_SHORTU Ў CYRILLIC CAPITAL LETTER SHORT U */
-@@ -1772,2 +1798,18 @@
- { 0x20ac, 0x20ac }, /* EuroSign € EURO SIGN */
-+ { 0xfe50, 0x0060 }, /* dead_grave \` */
-+ { 0xfe51, 0x00b4 }, /* dead_acute ´ */
-+ { 0xfe52, 0x02c6 }, /* dead_circumflex ˆ */
-+ { 0xfe53, 0x02dc }, /* dead_tilde ˜ small tilde */
-+ { 0xfe54, 0x00af }, /* dead_macron ¯ */
-+ { 0xfe55, 0x02d8 }, /* dead_breve ˘ */
-+ { 0xfe56, 0x02d9 }, /* dead_abovedot ˙ */
-+ { 0xfe57, 0x00a8 }, /* dead_diaeresis ¨ */
-+ { 0xfe58, 0x02da }, /* dead_abovering ° */
-+ { 0xfe59, 0x02dd }, /* dead_doubleacute ˝ */
-+ { 0xfe5a, 0x02c7 }, /* dead_caron ˇ */
-+ { 0xfe5b, 0x00b8 }, /* dead_cedilla ¸ */
-+ { 0xfe5c, 0x02db }, /* dead_ogonek ˛ */
-+ { 0xfe5d, 0x0269 }, /* dead_iota ɩ Latin small iota */
-+ { 0xfe64, 0x1fbf }, /* dead_abovecomma ᾽ Greek Psili */
-+ { 0xfe65, 0x1ffe }, /* dead_abovereversedcomma ῾ Greek Dasia */
- };
-@@ -1808,3 +1850,3 @@
- {
--
-+\tTQToolTip::add ( this, "Virtual keyboard" );
- }
---- src-orig/MainWidget.h
-+++ src/MainWidget.h
-@@ -69,2 +69,3 @@
- \tvoid saveState();
-+\tvoid toggleLock();
-
-@@ -96,2 +97,3 @@
- \tVButton *win;
-+\tVButton *rwin;
- \tVButton *mnu;
-@@ -130,2 +132,3 @@
- \tint mnu_autores;
-+\tint mnu_lock;
-
---- src-orig/VButton.cpp
+' | patch -N -p0
+#
+echo $'--- src/VButton.cpp
+++ src/VButton.cpp
-@@ -4,3 +4,3 @@
-
--double VButton::pw=550.0;
-+double VButton::pw=553.0;
- double VButton::ph=235.0;
@@ -22,16 +22,6 @@
{
-\tif (press==true){\t
@@ -3879,56 +4086,18 @@ These patches are to build Kvkbd to
-\tu=text;
+\ts=text;
}
---- src-orig/VButton.h
+' | patch -N -p0
+#
+echo $'--- src/VButton.h
+++ src/VButton.h
@@ -31,3 +31,3 @@
\tunsigned int keycode;
-\tTQString u;
+\tTQString s;
\tTQString l;
---- src-orig/DragWidget.cpp
-+++ src/DragWidget.cpp
-@@ -6,3 +6,3 @@
- \tdrag=false;
--
-+\tlocked=false;
- }
-@@ -17,2 +17,3 @@
- \tgpress=e->globalPos();
-+\tif (locked)return;
- \tdrag=true;
-@@ -34,2 +35,12 @@
- }
-+
-+void DragWidget::setLocked(bool mode)
-+{
-+\tlocked=mode;
-+}
-+
-+const bool DragWidget::isLocked() const
-+{
-+\treturn locked;
-+}
-
---- src-orig/DragWidget.h
-+++ src/DragWidget.h
-@@ -14,2 +14,5 @@
-
-+\tvoid setLocked(bool mode);
-+\tconst bool isLocked() const;
-+
- private:
-@@ -24,2 +27,3 @@
- \tTQPoint gpress;
-+\tbool locked;
-
---- src-orig/resizabledragwidget.cpp
-+++ src/resizabledragwidget.cpp
-@@ -38,2 +38,3 @@
- {
-+\tif (locked)return;
- \t
---- src-orig/numpadvbutton.cpp
+' | patch -N -p0
+#
+echo $'--- src/numpadvbutton.cpp
+++ src/numpadvbutton.cpp
@@ -35,3 +35,3 @@
\tif (press==true){
@@ -3936,21 +4105,235 @@ These patches are to build Kvkbd to
+\t\tTQPushButton::setText(s);
\t\tVButton::setKeyCode(numlock_code);
' | patch -N -p0
-
-
Enter the colour in the form shown, or as "#f0f0f0" or 240,240,240 - the double quotes are required.
-echo $'--- src/VButton.cpp
+#
+## Set a default button background colour which otherwise defaults to system colour
+## Changeable from configuration menu
+echo $'--- src/VButton.cpp
+++ src/VButton.cpp
@@ -11,2 +11,3 @@
\t//connect(this,TQT_SIGNAL(clicked()),this,TQT_SLOT(sendKey()));
-+\tsetPaletteBackgroundColor ( TQColor("gray94") );
++\tsetPaletteBackgroundColor ( TQColor("#f0f0f0") );
\tsetFocusPolicy(TQ_NoFocus);
' | patch -N -p0
+#
+## Base the auto font size on main board size otherwise when the num pad is brought into view
+## the font size immediately increases in proportion, ie by 703/552.
+## and set a more realistic initial font size
+echo $'--- src/MainWidget.cpp
++++ src/MainWidget.cpp
+@@ -690,3 +690,6 @@
+ \t\t//double rs = (100.0/700.0)*width();
+-\t\tdouble rp = (8.0/600.0)*width();
++\tif (extent_visible) {
++\t\trp = (11.0/600.0)*width() * (552.0/703.0); }
++\telse {
++\t\trp = (11.0/600.0)*width(); }
+ \t\t//fnt.setStretch(rs);
+' | patch -N -p0
+#
+echo $'--- src/MainWidget.h
++++ src/MainWidget.h
+@@ -130,2 +130,3 @@
+ \tdouble sdxb;
++\tdouble rp;
+ \tint mnu_dock;
+' | patch -N -p0
+#
+## i18n
+echo $'--- src/MainWidget.cpp
++++ src/MainWidget.cpp
+@@ -519 +519 @@
+-\t\tm->insertItem ( "Font ...", this, TQT_SLOT ( chooseFont() ) );
++\t\tm->insertItem ( i18n ("Font"), this, TQT_SLOT ( chooseFont() ) );
+@@ -521 +521 @@
+-\t\tmnu_autores = m->insertItem( "Auto resize font",this, TQT_SLOT ( toggleFontAutoRes() ) );
++\t\tmnu_autores = m->insertItem( i18n ("Auto resize font"),this, TQT_SLOT ( toggleFontAutoRes() ) );
+@@ -524 +524,0 @@
+-\t\t
+@@ -526 +525 @@
+-\t\tmnu_dock = m->insertItem ( "Dock widget", this, TQT_SLOT ( showDock() ) );
++\t\tmnu_dock = m->insertItem ( i18n ("Dock widget"), this, TQT_SLOT ( showDock() ) );
+@@ -531 +530 @@
+-\t\tmnu_lock = m->insertItem("Lock on screen", this, TQT_SLOT(toggleLock()));
++\t\tmnu_lock = m->insertItem( i18n ("Lock on screen"), this, TQT_SLOT(toggleLock()));
+@@ -537 +536 @@
+-\t\tm->insertItem ( "Help", h->menu() );
++\t\tm->insertItem ( i18n ("Help"), h->menu() );
+@@ -1854 +1853 @@
+-\tTQToolTip::add ( this, "Virtual keyboard" );
++\tTQToolTip::add ( this, i18n ("Virtual keyboard") );
+' | patch -N -p0
+#
+## Add TQColorDialog
+## keyboard colour defaults to #cdc0b0
+## key/button colour defaults to #f0f0f0
+echo $'--- src/MainWidget.cpp
++++ src/MainWidget.cpp
+@@ -39,4 +39,3 @@
+ #include <tdeapplication.h>
+-
+-
++#include <ntqcolordialog.h>
+
+## load any existing chosen colours for the keyboard, otherwise default to #cdc0b0
+@@ -79,3 +78,7 @@
+
+-\tsetPaletteBackgroundColor ( TQColor("#cdc0b0") );
++\tTDEConfig *cfg = TDEApplication::kApplication()->config();
++// if "kbColor" entry doesn\'t exist - either because it hasn\'t been saved
++// or kvkbdrc doesn\'t exist, default to "#cdc0b0"
++\tTQColor bc = cfg->readEntry ("kbColor","#cdc0b0");
++\tsetPaletteBackgroundColor ( TQColor(bc) );
+ \tsetFocusPolicy ( TQ_NoFocus );
+## new configuration menu entries
+@@ -524,2 +527,8 @@
+
++\t\tm->insertSeparator();
++\t\tm->insertItem ( i18n ("Keyboard color"), this, TQT_SLOT ( Colorb() ) );
++
++\t\tm->insertItem ( i18n ("Key color (restart if changed)"), this, TQT_SLOT ( Colork() ) );
++
++\t\tm->insertSeparator();
+ \t\tmnu_dock = m->insertItem ( i18n ("Dock widget"), this, TQT_SLOT ( showDock() ) );
+## open ColorDialog and save chosen colours
+@@ -573,3 +582,26 @@
+
+-
++void MainWidget::Colorb() // keyboard colour chosen through the configuration menu
++{
++\tTDEConfig *cfg = TDEApplication::kApplication()->config();
++// if "kbColor" entry exists, start with that, otherwise start with the default "#cdc0b0"
++\tTQColor bc = cfg->readEntry ("kbColor","#cdc0b0");
++\tTQColor b = TQColorDialog::getColor( TQColor( bc ) );
++// if the selection of the new colour is cancelled, b will be invalid
++// otherwise the new value is written to kvkbdrc
++// - this must be in the #rrggbb format
++\tif ( b.isValid() ) {
++\tcfg->writeEntry ("kbColor", b.name() );
++\tcfg->sync();
++\tsetPaletteBackgroundColor ( TQColor( b ) ); }
++}
++void MainWidget::Colork() // key/button colour chosen through the configuration menu
++{
++\tTDEConfig *cfg = TDEApplication::kApplication()->config();
++\tTQColor kc = cfg->readEntry ("keyColor","#f0f0f0");
++\tTQColor k = TQColorDialog::getColor( TQColor( kc ) );
++\tif ( k.isValid() ) {
++\tcfg->writeEntry ("keyColor", k.name() );
++\tcfg->sync(); }
++// can\'t set PaletteBackgroundColor because it\'s in VButton::VButton - needs restart to read configuration entry
++}
+ void MainWidget::finishInit()
+## set initially 150 from the RH edge of the screen to allow for the num pad
+## and set 50 from the bottom edge to allow for the panel
+@@ -599,3 +631,3 @@
+ \tint d_height=235;
+-\tTQRect dflt_geom(screen_geom.width()-d_width,screen_geom.height()-d_height,d_width,d_height);
++\tTQRect dflt_geom(screen_geom.width()-d_width-150,screen_geom.height()-d_height-50,d_width,d_height);
+
+--- src/MainWidget.h
++++ src/MainWidget.h
+@@ -70,2 +70,4 @@
+ \tvoid toggleLock();
++\tvoid Colorb();
++\tvoid Colork();
+
+--- src/VButton.cpp
++++ src/VButton.cpp
+@@ -3,2 +3,4 @@
+ #include <tqfont.h>
++#include <tdeconfig.h>
++#include <tdeapplication.h>
+
+## load any existing chosen colours for the keys/buttons, otherwise default to #f0f0f0
+@@ -11,4 +13,10 @@
+ \t//connect(this,TQT_SIGNAL(clicked()),this,TQT_SLOT(sendKey()));
+-\tsetPaletteBackgroundColor ( TQColor("#f0f0f0") );
++\tTDEConfig *cfg = TDEApplication::kApplication()->config();
++// if "keyColor" entry doesn\'t exist - either because it hasn\'t been saved
++// or kvkbdrc doesn\'t exist, default to "#f0f0f0"
++\tTQColor kc = cfg->readEntry ("keyColor","#f0f0f0");
++\tsetPaletteBackgroundColor ( TQColor(kc) );
++
+ \tsetFocusPolicy(TQ_NoFocus);
++
+ \tresize(30,30);
+' | patch -N -p0
+#
+<<'comment'
+The keyboard geometry is saved when either of the Quit options is selected.
+If the num pad is visible [extent_visible=true] when Kvkbd is Quit, then when it is run again, with the default being extent_visible=false, the keyboard will display without the num pad but at an x-axis size which includes the num pad dimension, ie elongated.
+To fix this, add the state of extent_visible to the configuration file and start with that when Kvkbd is re-started.
+comment
+echo $'--- src/MainWidget.cpp
++++ src/MainWidget.cpp
+@@ -76,5 +76,6 @@
+ \tint sty=15;
+-\textent_visible=false;
+
+ \tTDEConfig *cfg = TDEApplication::kApplication()->config();
++// if the num pad was visible when Kvkbd was \'Quit\', the geometry includes it, so start with the num pad in the same state
++\textent_visible = cfg->readBoolEntry("numpad_visible",false);
+ // if "kbColor" entry doesn\'t exist - either because it hasn\'t been saved
+@@ -659,2 +660,3 @@
+ \t\tcfg->writeEntry("geometry",geometry());
++\t\tcfg->writeEntry("numpad_visible",extent_visible);
+ \t\tcfg->sync();
+' | patch -N -p0
+#
+## add tooltips to buttons
+echo $'--- src/MainWidget.cpp
++++ src/MainWidget.cpp
+@@ -398,2 +398,3 @@
+ \tquit->setPixmap(TQIconSet(SmallIcon("application-exit")).pixmap());
++\tTQToolTip::add( quit, i18n( "Hide keyboard" ) );
+ \tquit->res();
+@@ -406,2 +407,3 @@
+ \textent->setPixmap(TQIconSet(SmallIcon("media-seek-forward")).pixmap());
++\tTQToolTip::add( extent, i18n( "Show num pad" ) );
+ \textent->res();
+@@ -571,3 +573,3 @@
+ \t\tpopup_menu->setPixmap(TQIconSet(SmallIcon("configure")).pixmap());
+-
++\t\tTQToolTip::add( popup_menu, i18n( "Configure" ) );
+ \t\tother_keys.append(popup_menu);
+@@ -989,3 +991,3 @@
+
+-\tTQToolTip::add ( this, "Toggle keyboard visibility" );
++\tTQToolTip::add ( this, i18n ("Toggle keyboard visibility") );
+ }
+' | patch -N -p0
+#
+## more add tooltips to buttons
+## if the num pad was visible, the tooltip continued to show 'Show num pad'
+echo $'--- src/MainWidget.cpp
++++ src/MainWidget.cpp
+@@ -742,2 +742,3 @@
+ \t\textent->setPixmap(TQIconSet(SmallIcon("media-seek-forward")).pixmap());
++\t\tTQToolTip::add( extent, i18n( "Show num pad" ) );
+ \t}
+@@ -747,2 +748,3 @@
+ \t\tTQWidget::resize ( (int)sdxb, height() );
++\t\tTQToolTip::add( extent, i18n( "Hide num pad" ) );
+ \t}
+' | patch -N -p0
+#
+## yet more add tooltips to buttons
+## if Kvkbd was 'Quit' with the num pad visible, on restart the double arrow was indicating 'Show num pad'
+echo $'--- src/MainWidget.cpp
++++ src/MainWidget.cpp
+@@ -406,4 +406,8 @@
+ \textent->move(526, 85 );
+-\textent->setPixmap(TQIconSet(SmallIcon("media-seek-forward")).pixmap());
+-\tTQToolTip::add( extent, i18n( "Show num pad" ) );
++\tif (extent_visible) {
++\t\textent->setPixmap(TQIconSet(SmallIcon("media-seek-backward")).pixmap());
++\t\tTQToolTip::add( extent, i18n( "Hide num pad" ) ); }
++\telse {
++\t\textent->setPixmap(TQIconSet(SmallIcon("media-seek-forward")).pixmap());
++\t\tTQToolTip::add( extent, i18n( "Show num pad" ) ); }
+ \textent->res();
+' | patch -N -p0
chown_fn
@@ -3991,6 +4374,7 @@ makepkg_fn
There is a help page included with the tde-slackbuilds source which is not practical to add to this build.
It can be built from that source with meinproc and added to this package if needed.
+Translations are also available with the x86_64 build.
close