Commit graph

34 commits

Author SHA1 Message Date
dolphin6k
907c739679 Removed mtw() for windows.
Instead, defined windows native functions for mbstowcs()/wcstombs().
2022-02-11 09:40:59 +09:00
dolphin6k
7305768d38 Revert "Removed "#ifdef WIN32" block around label embedding."
This reverts commit c0da1f0e94.
2022-02-11 08:52:37 +09:00
dolphin6k
c0da1f0e94 Removed "#ifdef WIN32" block around label embedding.
It has likely become unneccessary by recent fix for the common part.

Also backported a fix for uppercase issue from sdl2.0 branch (Define Windows native
function for mbstowcs/wcstombs).
2022-02-11 08:33:29 +09:00
Bill Kendrick
3518433808 Better onscreen keyboard button sizing
No longer restricted to "the same as other UI buttons"
(e.g., 48x48 default) or "1/4th that size" (e.g., 24x24).
Will scale, allowing for larger buttons when appropriate.
h/t Anat Caspi for pointing out the continuing issue.

Closes https://sourceforge.net/p/tuxpaint/feature-requests/212/
2022-01-25 00:52:14 -08:00
dolphin6k
90baae6dfe Fixed crash bug regarding onscreen_keyboard and labels.
Every version after when onscreen-keyboard implimented has this bug,
which first became apparent in Windows 10. (Because of more strict
memory handling or something?)
Recommend every windows user to upgrade to 0.9.26-5.
2021-10-17 08:43:44 +09:00
dolphin6k
bedc2b43ad Removed old unnecessary windows specific code which cause crash bug. 2021-10-10 14:49:33 +09:00
Bill Kendrick
8ef759a9a7 Keyboard max size didn't account for UI buttons
Keyboard's goal is to not be > 90% of the width of the drawing
canvas.  Was misinterpreting the incoming argument ('canvas'),
so have to account for the toolbar (left) and selector (right)
buttons in the UI.

So e.g., `tuxpaint --900x768 --onscreen-keyboard` will use the
small keyboard buttons, while `... --1024x768 ...` will use the large.
2020-08-25 22:09:02 -07:00
Bill Kendrick
61998e4d00 Larger OSK on larger windows; larger OSK font
On-screen keyboard (visible when the feature is enabled, while
using the "Text" and "Label" tools) now appears with larger
(48x48 pixel, vs 24x24 pixel) buttons, when Tux Paint's window
(or fullscreen) size is large enough to fit them with the
chosen layout.
(h/t Anat & Aviv, who suggested it to help with users of
eye-tracking systems)

Also, on-screen keyboard buttons use a slightly larger font
(16pt vs 12pt, previously seen on the small keyboard;
32pt on the large keyboard).
2020-08-25 22:00:43 -07:00
Bill Kendrick
91505fae8e Debug output clean-up
Wrapped some debug output in "#ifdef DEBUG" tests,
and made sure some warnings and errors were going to
STDERR, rather than STDOUT.

Motivation: Less noise while launching/using Tux Paint,
unless it matters.
2020-04-02 22:15:13 -07:00
Bill Kendrick
7938480174 Clean up GCC warnings (2019-08-29 edition)
Updated most parts of the code that were throwing warnings in GCC.
2019-08-30 00:01:00 -07:00
Mark K. Kim
472bf79bb9 Trying again... 2017-11-27 01:02:41 -05:00
Bill Kendrick
e9447f8c3b indent onscreen_keyboard.c onscreen_keyboard.h 2017-10-15 10:59:50 -07:00
Pere Pujal i Carabantes
eeb27ad2ef Correct usage of wcsncmp function. 2016-10-06 21:28:01 +00:00
Pere Pujal i Carabantes
5b8fa21f49 Closing files in onscreem keyboard. 2014-06-04 20:54:26 +00:00
Pere Pujal i Carabantes
0bf00690ff Removing old code that leaked. 2014-05-21 21:23:00 +00:00
William Kendrick
19f5adaf4d Cleaning up some OSK code to avoid leaking so much memory.
Note: Planning to make keyboards load once, rather than every
time a switch happens.
Some other memory leak fixes.
2014-04-23 08:20:50 +00:00
Pere Pujal i Carabantes
25e582c438 Removing unused stuff. 2014-04-20 23:19:55 +00:00
Shin-ichi TOYAMA
a04319ed57 Fixed OSK crash. 2014-04-20 08:09:00 +00:00
Pere Pujal i Carabantes
1dbe751b4e Using PNGs as symbols in some onscreen keyboard keys. 2014-03-31 13:50:23 +00:00
William Kendrick
ff020525ef * Corrected some onscreenkeyboard.c malloc()s that didn't account for the size
of the objects being malloc'd; caused crashes with default layout!
* Wrapped some onscreenkeyboard.c printf()'s in #ifdef DEBUG
* Tweaked some formatting of onscreenkeyboard.c
2014-03-30 20:18:36 +00:00
William Kendrick
efd8d14585 A few tweaks (including wrapping stuff in #ifdef __APPLE__) to make sure
stuff still compiles under Linux, after applying Eric P.'s OSX changes.
2014-03-20 00:11:52 +00:00
William Kendrick
e990b48de7 Large bundle of OS X tweaks by Eric P. (basis of the 10.9-compatible
pre-release made in Dec. 2013):
 * Fix OS X 10.9 issue of current directory set by Finder
   to something else than folder where app bundle resides.
 * Some Mac OS X build / project changes & updates.
 * Adjustments to Mac OS X fontconfig config file, to avoid warnings
   and make things more robust.
 * Updates to some #include's to catch up with newer library revisions.
 * Tweaks to pixel read/write on Apple.
 * Introduction of 'intprt_t' casting to avoid warnings on x64.
 * Some additional debugging output.
 * Logging stderr & stdout to /tmp/tuxpaint.log
Untested (I don't have a Mac!)
2014-03-19 23:39:17 +00:00
Pere Pujal i Carabantes
ebbf69b1d5 The 2 first entries of the us keymap where duplicated 2012-11-13 07:31:02 +00:00
Pere Pujal i Carabantes
50b0e70eac Onscreen keyboard for Win32 2012-03-21 20:34:07 +00:00
Pere Pujal i Carabantes
668d453b3a Trying to compile for Win32. 2011-12-08 23:18:44 +00:00
Pere Pujal i Carabantes
4c76598cb0 Some less warnings and not crashing when freeing. 2011-12-01 23:21:45 +00:00
Pere Pujal i Carabantes
5a85cef991 Tweaking onscreen keyboard. 2011-11-14 20:54:15 +00:00
Pere Pujal i Carabantes
010f81cca3 Showing the letters/symbols that will be produced in the onscreen keyboard. 2011-11-09 12:23:39 +00:00
Shin-ichi TOYAMA
af54c494fe uint -> unsigned int 2011-10-10 05:28:14 +00:00
Pere Pujal i Carabantes
010eb89fe8 Was losing uncommited text when quitting.
Freeing onscreen keyboard stuff, buttons for changing the keyboard are btnoff if disable change is active.
2011-09-30 15:59:47 +00:00
Pere Pujal i Carabantes
ca6d9ce760 Buttons to change the onscreen keyboard layout now are purple. 2011-09-05 23:11:09 +00:00
Pere Pujal i Carabantes
15273cdd29 Adding an option to select the initial onscreen keyboard layout, adding an option to disable changes between layouts 2011-09-04 22:35:24 +00:00
Scott McCreary
e6ec173371 Fixed build for gcc2.95.3. 2011-09-02 17:55:20 +00:00
Pere Pujal i Carabantes
f14872a133 Rewrited of onscreen keyboard. Uses 2 files from xorg and now it can change between layouts. 2011-09-01 22:08:09 +00:00