72 Commits

Author SHA1 Message Date
Thomas Bernard
92facef46d Convert comments to UTF-8
most were encoded in Latin1 / CP1252
but a few lines in op_c.c were using IBM437/850 !
2018-06-26 11:37:19 +02:00
Philip Linde
b91cfe4ed3 Call Button_Quit and Button_Page with correct enum
These functions are called explicitly in a few places and need to be
handed the corresponding enum value to correctly get the button value.
Since they were previously called with -1, they would cause segfaults.
These seemed to happen when restoring backups or loading images to both
pages.
2018-06-03 20:03:34 +00:00
Thomas Bernard
d4746ea72e
Fix MacOS file case in include
<corefoundation/corefoundation.h>
should be
<CoreFoundation/CoreFoundation.h>

Many MacOS FS are case insensitives, but not all, so we must use
the correct case.

Issue detected by the MacPorts buildbot : https://trac.macports.org/ticket/56490
2018-05-15 15:33:15 +02:00
boomlinde
2639dec301 Add -size commandline argument 2018-05-14 19:46:19 +02:00
Thomas Bernard
30f23b93ef Massive change of button callback function prototypes 2018-03-10 00:46:11 +01:00
Thomas Bernard
3870cc8afb Program_shutdown() free all images, backups, brushes. 2018-03-05 09:22:02 +01:00
Thomas Bernard
37eac890c2 memory leak fix : free the main page on exit 2018-03-05 09:22:02 +01:00
Thomas Bernard
5acf27c1b4 call iconv_close() to free iconv resources 2018-03-05 09:22:02 +01:00
Thomas Bernard
dc4926b7c0 Fix to compile windows build with MinGW32 2018-02-20 15:45:45 +01:00
Thomas Bernard
c48e881a54 WIN32 versions of io functions 2018-02-20 15:45:45 +01:00
Thomas Bernard
6f48d7fefe Add MSVC 2010 project file and a make the project compile 2018-02-20 15:45:45 +01:00
Thomas Bernard
689aebf264 Unicode support in keyboard editable field for filename 2018-02-20 15:44:39 +01:00
Thomas Bernard
a4593da4d4 display unicode filename in menu 2018-02-20 15:44:39 +01:00
Thomas Bernard
9a03a54fef Display the current directory in unicode
rename function Print_in_window_utf16() to Print_in_window_unicode()
2018-02-20 15:44:39 +01:00
Thomas Bernard
3322529804 Support for unicode names in directory listing 2018-02-20 15:44:39 +01:00
Thomas Bernard
a1f0f36062 chdir() => Change_directory()
improve portability
2018-02-20 15:44:39 +01:00
Thomas Bernard
545308265b Add the ability to print unicode characters in addition to "Latin1" ones 2018-02-20 15:44:39 +01:00
Thomas Bernard
48a8a79746 Fix some memory leaks 2018-02-10 18:49:35 +01:00
Thomas Bernard
4ffa389a90 Update File selector to load/save palettes
Also "constify" the format array
2018-01-25 22:55:27 +01:00
Thomas Bernard
a53d6da6ea Add visible_image and backups to the T_Document structure 2018-01-22 16:16:39 +01:00
Thomas Bernard
8ae651c75f put common fields for Main and Spare page in a T_Document structure 2018-01-22 14:46:44 +01:00
Thomas Bernard
08e3c6bebf Fix issue 46 : part 2
in Error(0) the palette was not properly restored
as it was always restored to the Main_palette.
Now we really restore the right palette !

Also clarified/simplified the change directory code in case of error.

http://pulkomandy.tk/projects/GrafX2/ticket/46
2018-01-22 13:46:13 +01:00
Thomas Bernard
2928a16e41 Also save visible layers for spare page
see http://pulkomandy.tk/projects/GrafX2/ticket/25#comment:3
2018-01-03 05:13:51 +01:00
Adrien Destugues
32b3996cb8 Add Gamma correction in palette editor
Particularly useful when working for platforms with non-linear palettes.
For example the Thomson TO8 has a Gamma correction of 2.8, so the
darkest shade of color is already very bright. It is important to take
this into account when drawing pictures to avoid bad surprises when
showing them on the real machine.

The setting is available from the command line, or from the extended
palette window, which gets a little relayout using horizontal sliders
now that these are available.
2017-03-19 09:49:35 +01:00
Adrien Destugues
9c6f343215 Patch by Thomas Bernard to fix compilation on FreeBSD.
Thanks!

Fixes #50.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2173 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2017-01-03 18:25:35 +00:00
Adrien Destugues
0eaf3fce96 Use iconv to convert filenames from UTF-8.
Patch by miniupnp, with some C89 adjustments.
Enabled for Haiku and the generic Linux/*BSD part of the Makefile.
Please adjust as needed.

Fixes #10 for codepages for which we have a font.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2172 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2016-12-02 19:43:23 +00:00
Adrien Destugues
8808625851 Add a "tall 3" drawing mode.
Pixels with 3:4 aspect ratio. Why not?

Contributed by Nic Soudée (zoner/xylem). Thanks!


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2166 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2016-10-15 18:57:14 +00:00
Adrien Destugues
61c8dca353 Add a port to the GCW Zero, contributed by David Knight.
Untested since I don't have the hardware.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2080 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2015-02-10 20:13:57 +00:00
Yves Rizoud
1248100ae9 Integrate path fix from Android port (tnanks a lot Pelya)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2071 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2014-03-30 17:31:05 +00:00
Yves Rizoud
fbdde8d16c Issue 490: color 255 selected FG by default
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2021 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-09-30 16:25:52 +00:00
Yves Rizoud
26613ec440 Program now remembers favorite mode layers/anim, based on last time you switched in splash screen or toolbar. Fixed graphic behavior when mode 5 is enabled/disabled, and added a safety (colors <4).
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2014 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-09-28 00:19:57 +00:00
Yves Rizoud
80fc7da7f6 Fix issue 462: Save/Load path problems: Main, Spare and Brush now have completely distinct fileselector settings.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2003 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-09-22 16:47:39 +00:00
Yves Rizoud
191aa87172 Remove debug printf
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1958 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-05-13 16:55:06 +00:00
Yves Rizoud
7443239566 Fix issue 477: Crash when browsing drives that have no 'parent directory' entry
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1957 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-05-13 14:55:33 +00:00
Yves Rizoud
93c4832138 Saving as palette format no longer shows warning about lyaer/anim support. Loading a single file in command-line makes the spare use the same mode (layer/anim), so that the menus don't move when you switch
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1951 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-05-08 18:55:17 +00:00
Yves Rizoud
55f4884e34 Fix a few compilation warnings on Linux; Fix a possible bug in Mode5 loader; Removed a pair of debug printfs in realpath.c
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1933 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-03-14 19:17:35 +00:00
Adrien Destugues
af8316c279 * Second attempt at fixing #448.
* Fix another bug with realpath in Haiku (relying on nonstandard behaviour)


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1917 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-03-06 21:05:54 +00:00
Yves Rizoud
de6b3ac8d1 Toolbars now automatically switch to anim/layers when required
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1911 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-03-04 15:35:20 +00:00
Adrien Destugues
b92d66911f Should fix #448: make sure we go to the main file directory when wqloading one at startup.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1904 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-02-15 18:34:25 +00:00
Yves Rizoud
80e0b17be8 Fix issue 430: warning 'Implicit declaration of function Remove_duplicate_shortcuts'. Fix another warning for unused parameter. Now 0 warnings on mingw32-gcc 4.4.1
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1774 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2011-04-10 14:35:29 +00:00
Yves Rizoud
860648b190 Multi-shorcuts option now works. Default OFF, it will avoid situations where user mistakenly sets the same key for multiple actions.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1769 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2011-04-04 22:30:02 +00:00
Yves Rizoud
2378d8cedc Fix remaining issue of gradients / color cycling.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1716 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2011-02-09 21:40:15 +00:00
Yves Rizoud
1e6c4d22bc Default gradients (or cycles) are now loaded from skins. Initialized all current skins so that range 0 is a white->black range, this way the grad shapes are immediately efficient. Still has a problem when loading an image in command-line.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1714 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2011-02-09 00:57:33 +00:00
Yves Rizoud
d0aaabf6b2 Merge of r1709 into trunk: Atari Falcon port
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1710 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2011-02-06 19:30:55 +00:00
Yves Rizoud
e01b310317 Some work on brush remapping
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1700 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2011-01-29 21:20:54 +00:00
Adrien Destugues
4e35de8611 Add code to save XPM files.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1682 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2011-01-16 15:07:50 +00:00
Yves Rizoud
7a3ae5824a Merged the specifics of Caanoo 1.2 port by Pheel + Enabled TTF text on Caanoo
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1645 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-11-05 01:03:11 +00:00
Yves Rizoud
bd13dd93b1 Integrated the changes by PheeL for Caanoo support
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1629 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-09-29 22:21:25 +00:00
Yves Rizoud
db8bde5ba6 Fix issue 380: Exiting zoom mode in a large image jumps the viewport to a 'random' position
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1620 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-09-17 14:27:43 +00:00
Yves Rizoud
d78c33855b Drag-n-drop file in Grafx2 window is now cleanly prevented while a window is open: The OS's mouse cursor is the 'forbidden' sign. Preparatory work for horizontal slider controls.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1597 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-29 19:21:33 +00:00