Commit graph

766 commits

Author SHA1 Message Date
Pere Pujal i Carabantes
fa11348218 Fix undo for temporary applied labels. 2010-05-12 06:28:37 +00:00
Pere Pujal i Carabantes
eaa1ff5bd0 A fix for a crash with labels, Undo via CTRL-Z was mangled.
The crash:start, begin to type a label, click on save, hit enter.
2010-05-10 21:59:39 +00:00
Pere Pujal i Carabantes
94277d1e70 Two less open_memstream calls. 2010-05-10 17:29:00 +00:00
William Kendrick
960f5013fd Syntax error fix. 2010-04-29 20:04:54 +00:00
Scott McCreary
2d594c9bf1 Fixed several gcc2 compile errors by moving variable declarations to the top of functions. 2010-04-29 20:01:24 +00:00
William Kendrick
be2b5537b3 * Exposing load_user_fonts() and some other font.c functions,
even when FORKED_FONTS is not set.
* No longer undef'ing SDL_thread stuff when FORKED_FONTS is
  used if we're ALSO not using SDL_Pango, since that now
  uses a thread to let fontconfig generate its cache, and
  still let Tux Paint be responsive to the OS and user.
  (SF.net bug #2944951)
* Spawning a thread and rendering a dummy string with SDL_Pango,
  to allow fontconfig to generate its cache.
  (SF.net bug #2944951)
* Setting up 'busy' mouse cursor (watch-shaped) earlier
  (so it can happen while fontconfig cache thread runs).
* Not spawning forked font scanner (FORKED_FONTS) as early, so
  fontconfig can generate its cache first.
  (I wasn't sure if calling an SDL_thread after a fork()
  occured was safe or not; admittedly, I discovered that
  SDL_thread spawning wasn't working due to the re-#defines
  of those functions when FORKED_FONTS was set; see above.)

All of this only tested on Ubuntu 9.04.  Forced disabling of FORKED_FONTS
by editing fonts.h, and Tux Paint still worked (it just took longer at
the splash screen while the fonts were loaded).  Needs testing on various
Windows, Mac OS X and BeOS.
2010-04-27 22:04:43 +00:00
Pere Pujal i Carabantes
63e64c4374 Forgot to check for thumbnail directories. 2010-03-25 20:22:02 +00:00
Pere Pujal i Carabantes
d0368d0814 Fix writing thumbnails for custom starters. 2010-03-25 19:39:17 +00:00
William Kendrick
8169aec68c Less respect for the 'abusive' Magic tools (ones who draw widgets on the
canvas), since the switchout/switchin hack around the rec_undo_buffer()
call that happens when clicking the canvas with a Magic tool was breaking
tools (see Pere's email re: Zoom, Perspective, Rails not working).
2010-03-22 20:36:51 +00:00
Pere Pujal i Carabantes
27780f64e8 Tweaking labels, fixing mangled undo and a crash. 2010-03-17 22:11:48 +00:00
Pere Pujal i Carabantes
e8c378f1ae Embedding data in the png file. 2010-03-17 01:13:08 +00:00
William Kendrick
f638afa63c Gamma corrected scaling. 2010-02-25 22:02:07 +00:00
William Kendrick
b0d141fed3 Fixed dumb typo bug in recently-modified canvas/screen update code. 2010-02-25 21:46:14 +00:00
William Kendrick
7b31b7549d Patch collection from Volker Grabsch to help Tux Paint cross-compile for Windows:
* Solve the 'FIXME: "finddir" ...' (The trick is to use "=" instead of ":=". That way, $(beos_PREFIX) will only be evaluated when it is actually used.)
* include "shlwapi.h" instead of "Shlwapi.h" (Otherwise, compiling for Windows will fail on a case sensitive file system. (e.g. a Unix file system when cross compiling))
* use FILENAME_MAX instead of NAME_MAX (FILENAME_MAX is more portable than NAME_MAX. Also, recent MinGW versions don't support NAME_MAX anymore.)
* Exposing font_thread_aborted via extern [tweak to Volker's patch which removed a logic test, which is probably not what we want]
* include parse.h (and thus compiler.h) after <stdio.h> (This ensures that the perror() macro of compiler.h won't confuse the perror() function declaration of <stdio.h>.)
* fix another compiling error about undefined variables (The tuxpaint.c uses printcommand/altprintcommand/papersize even when they aren't defined, i.e. when libpaper is not used. This patch solves the issue by using "#ifdef PAPER_H")
* call show_available_papersizes() only when libpaper is used
* permit cross compiling by using Make variables instead of hard-coded tools

Documented scottmc's Haiku improvements.
2010-02-25 07:06:13 +00:00
William Kendrick
ba366043e0 Preventing flicker when typing with Text & Label tools. 2010-02-10 22:46:37 +00:00
Pere Pujal i Carabantes
2697ff0015 Syntax error. 2010-02-02 23:05:29 +00:00
Pere Pujal i Carabantes
460945eef1 Not saving label stuff if there are not valid labels. Not hardly checked. Time to think on embed all the data in one file... 2010-02-02 22:44:21 +00:00
Pere Pujal i Carabantes
1cfe1769e8 Was not freeing the surfaces inside the label nodes. 2010-02-02 22:26:08 +00:00
Pere Pujal i Carabantes
d713c61407 Unused things. 2010-02-02 21:32:11 +00:00
Pere Pujal i Carabantes
5e18e2380e This check is no more needed here. 2010-02-02 21:02:44 +00:00
Pere Pujal i Carabantes
e545f8bc87 The crash happened because have_to_rec_label_node was not set to NULL when start new drawing, now is yet corrected. 2010-02-02 18:20:27 +00:00
Pere Pujal i Carabantes
ade8febfb2 Only highlight labels when there are labels. 2010-01-27 14:15:38 +00:00
Pere Pujal i Carabantes
edfd833424 Minor label bugfixes and improvements, begin to clean up label code. 2010-01-26 22:26:04 +00:00
William Kendrick
db42b73caf Label tool improvements: [Tab] cycles between available labels when
'select a label' option is enabled.  Labels given a highlight background
to make them obvious (with currently-[Tab]-selected one in orange).
2010-01-08 00:12:07 +00:00
Scott McCreary
3f7b0bd972 Added support for building tuxpaint on Haiku 2009-12-08 08:38:30 +00:00
Pere Pujal i Carabantes
da628a6e45 Fixing a crash when trying to save labels when the fonts are not yet initialized. 2009-12-06 22:37:23 +00:00
Pere Pujal i Carabantes
e481f1c1c6 Saving RGB values to the .dat file, not save all the surface pixels but just the alpha channel, removing the label .png and .dat files when removing the main file in the open dialog 2009-12-06 22:07:19 +00:00
Albert Cahalan
e3a971194c options working fairly well 2009-11-23 07:45:24 +00:00
Albert Cahalan
3d15a468cd lots of functions made static (some had to be moved) 2009-11-22 23:17:35 +00:00
Pere Pujal i Carabantes
463564076f Using the hand pointer when hovering a label in select mode 2009-11-22 21:20:00 +00:00
Albert Cahalan
db4ad99ad8 lang/locale work much better now 2009-11-22 09:46:41 +00:00
Albert Cahalan
1c980026f0 now --lang works (must not use stale pointers) 2009-11-21 21:17:19 +00:00
Albert Cahalan
f296909c75 have to reset y_nudge if wiping out lang/locale 2009-11-21 11:30:19 +00:00
Albert Cahalan
b5275ec578 locales should work 2009-11-21 10:52:38 +00:00
Albert Cahalan
0045bbad98 i18n stuff belongs in i18n.c 2009-11-21 10:14:56 +00:00
Albert Cahalan
dd90d90624 savedir/datadir neatened up 2009-11-21 09:44:11 +00:00
Albert Cahalan
a9b8f6ea1c show_usage takes exit code, and knows what to do 2009-11-21 05:10:44 +00:00
Pere Pujal i Carabantes
150f3b41b9 Saving and printing uncommited text and labels, allowing to edit them later. 2009-11-20 19:12:40 +00:00
Albert Cahalan
1f9e0049d7 very little 2009-11-16 10:07:17 +00:00
Albert Cahalan
32c7a6682d lockfile into own function 2009-11-16 09:52:33 +00:00
Albert Cahalan
be05dba58f lockfile into own function 2009-11-16 09:51:30 +00:00
Albert Cahalan
5dc2a54407 main() looking OK now; config still ignored (probably crashes) 2009-11-16 09:34:23 +00:00
Albert Cahalan
3e3d589c17 signal handler can not do much 2009-11-16 09:02:54 +00:00
Albert Cahalan
9a00845f50 moving more code past start of font scanning 2009-11-16 08:54:48 +00:00
Albert Cahalan
c6d3259e2c broken, but it compiles with few warnings 2009-11-16 08:45:24 +00:00
William Kendrick
e43ae6f497 Please bring back my single-dash command-line shortcuts! :( 2009-11-11 22:49:17 +00:00
Pere Pujal i Carabantes
d7f621ce20 No more wait for fonts at startup. Split the font stuff from load_info_about_label_surface to set_label_fonts so it can be runned later. 2009-11-11 21:54:42 +00:00
Pere Pujal i Carabantes
f5e4e4eb0f Fixing a bug that caused the deletion of a label when a)writing the label b) draw things that caused that cur_undo matched newly label->save_undoid after cycling around NUM_UNDO_BUFS c)click on undo. 2009-11-09 21:51:45 +00:00
Albert Cahalan
79d049e7dd drop redundant unused buggy "fullscreen" code 2009-11-08 18:38:25 +00:00
Albert Cahalan
f9df7d75eb _ 2009-11-08 09:45:39 +00:00