1563 Commits

Author SHA1 Message Date
mazzearos
d28a1df60b Renamed Find_last_slash() to Find_last_separator() to make purpose more clear.
Append_path():
- when adding sub directories: don't add a "/" when last separator is a ":".
- when climbing upwards: don't remove the ":" it it's the last separator.

Those fixes help the file selector for scripts on AROS.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1979 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-08-05 08:51:16 +00:00
mazzearos
d31b865482 Fixed RealPath() for AROS. Because we are building GrafX2 without Unix support we must use the "Amiga" way of defining the current path.
Reverted setup.h. I had drawn wrong conclusions because of the buggy RealPath().


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1978 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-08-04 07:39:18 +00:00
mazzearos
ce8fbe076d Started to add Lua support to AROS.
src/Makefile: link with lua. Note that I'm currently using an absolute path to include/lua
which only exits on my machine until AROS has support for pkg-config.

src/setup.h: added valid path to lua scripts.

src/io.c: take colon into account when checking for last separator.

src/factory.c: use luaL_newstate() instead of lua_open() because latter doesn't exist anymore in Lua-5.2.
Note: that fix should be valid for all platforms.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1977 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-08-03 19:10:44 +00:00
mazzearos
18886d86cb Added clipboard support for AROS.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1976 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-08-02 22:10:04 +00:00
mazzearos
12501833df Two more fixes for AROS to avoid paths like volume:/file.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1975 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-08-02 18:26:04 +00:00
mazzearos
469431446e Fix for my previous commit (r1973): Print only the volume
name. Limit length to 8 because exceeding the requester
border leeds to crashes.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1974 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-08-02 16:51:38 +00:00
mazzearos
7e7c718d40 AROS has working statfs(), so lets use it for printing the free disk size.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1973 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-08-02 16:02:33 +00:00
mazzearos
c68f05cda5 Some fixes for AROS:
src/text.c: Added path for truetype fonts.

src/Makefile: Create GrafX2 binary in the root directory. This allows
running without any prior installation.

src/readline.c: Added ':' to the forbidden charactersS.

src/const.h: Use '/' as indicator for parent directory.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1972 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-08-02 13:02:00 +00:00
mazzearos
ce2d12a0a8 AROS: check for ':' to avoid paths like PROGDIR:/filename.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1971 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-08-02 10:56:08 +00:00
mazzearos
113d6423b4 src/init.c: bail out if skin_name or font_name is "".
Fixes a crash on AROS

src/filesel.c: fixed BSTR conversion routine for AROS.
Without this fix "RAM DISK" was printed as "AM DISK" in
the file selector.

src/setup.c: removed slash to avoid that paths like
"PROGDIR:/share" are created on AROS. That fix should be right
for all Amiga like OS but I don't want to change things
which I can't test.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1970 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-08-02 09:19:07 +00:00
Yves Rizoud
7613093df9 Fix issue 496: Some animated GIF images don't load well. Also fixed the handling of transparency in preview (fileselector) and loading anim GIF as a brush loads first frame.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1969 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-07-12 22:27:49 +00:00
Yves Rizoud
2aa72730ad Fix issue 495 : Contour fill crashes on new anim frame, and possibly random crashes when adding anim frames
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1968 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-07-10 23:03:29 +00:00
Adrien Destugues
86d67e4658 * Fix CPC palette for Mode 5 files : add 'undocumented' color codes
* Fix "layer support" detection, it didn't work for Mode 5.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1966 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-06-24 18:03:21 +00:00
Yves Rizoud
dee88e4517 Fix a memory corruption that's been lurking in 'setpicturesize' (for Lua scripts) since r1611 (September 2010) but only affected multi-layered images.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1965 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-06-21 18:03:54 +00:00
Adrien Destugues
b437d458d4 CPC Mode 5 fixes :
* Be case unsensitive when looking for the GFX-file,
 * When an underlay is hidden, do not use it and replace it with color 0, 1, 2 or 3. Allows to see pixel data 
alone or disable rasters on one color, as it's possible to get confused quite easily.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1964 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-06-13 19:50:35 +00:00
Adrien Destugues
ba46f1fd21 * Use the left triangle char for parent directory instead of '<-'
* Make sure parent directory is alway listed first, even when some dir names start with ! (yes, I do use that, as a trick to make sure they list first)


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1963 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-06-09 21:00:49 +00:00
Adrien Destugues
d4d57f750d In brush factory, when the selected entry is not a file, display the full path in the description window.
Since the factory can open in an empty or even non-existing (!) dir, this is helpful to locate where you are.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1962 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-06-09 20:41:05 +00:00
Adrien Destugues
ff9f228b5f On Haiku, there are two different versions of gcc available (gcc2 and gcc4). Since
mixing them in the same binary result in linker error, build them in separate dirs.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1961 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-06-02 09:05:54 +00:00
Adrien Destugues
125207cfc8 Build fix on Debian/kFreeBSD. I hope it doesn't create problems with the (older) libc version in Haiku...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1960 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-06-02 08:54:44 +00:00
Yves Rizoud
c87fa6ede7 Fix a graphical mouse bug that happened when toolbar was hidden and you moved the mouse from layer button to image. Fix layer preview that disappeared when you clicked on layer button
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1959 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-05-14 14:05:12 +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
5864569bd6 Updated version of skin 'Scenish' by iLKke
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1956 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-05-13 13:19:08 +00:00
Adrien Destugues
493d998375 Use pkg-config to detect libpng when building for unix, this helps with Debian package system.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1955 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-05-13 07:02:13 +00:00
Adrien Destugues
2aa9ea7f8e * Load Microsoft RIFF palette files
* Make byte, word, dword, qword typedefs instead of defines.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1954 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-05-12 14:05:40 +00:00
Adrien Destugues
235f7d4d1c Just fix some warnings for Haiku as well.
One of them was a missing prototype, the other was likely some strangeness in the definition of size_t.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1953 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-05-12 11:48:39 +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
2afad0b550 Fix issue 483 : Saving layers/anim as non-GIF saves only layer/frame 0. Now with anim it asks confirm then saves current frame, and for layers it allows saving current layer or flattened copy.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1950 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-05-08 15:39:48 +00:00
Yves Rizoud
21659e9aee Reverted Dpaint skin, I accidentally replaced some time ago with one of my variants
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1949 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-05-05 23:56:10 +00:00
Yves Rizoud
3684509dc6 Fix the elusive crash that happened in anim mode after resizing the image; Thanks to iLKke again.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1948 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-05-05 23:48:22 +00:00
Yves Rizoud
d29bbee941 Fix an error when loading layered image that used a transparent color different from zero ,which resulted in corrupted image. Thanks iLKke!
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1947 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-05-05 16:01:14 +00:00
Yves Rizoud
bbd0d0114c Fix an error in previous commit. Zero warnings on Windows too (Mingw, gcc 4.4.1-TDM)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1946 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-05-03 22:46:04 +00:00
Yves Rizoud
d8bb1e1d55 Fix some mostly harmless warnings and re-generated dependencies. Now compiles with zero warnings on Linux (gcc 4.1.2)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1945 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-05-03 21:32:59 +00:00
Yves Rizoud
6316fc2add Fix second part of issue 459 : In anim mode, polybrush-grab with the right mouse button didn't clear the cut area.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1944 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-04-09 14:55:44 +00:00
Yves Rizoud
064bbebc5b Fix part of issue 459: In anim mode, Color-replacer didn't refresh the screen
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1943 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-04-08 14:45:56 +00:00
Yves Rizoud
020e57846b Layer preview now only appears if there's at least 2 layers. Fixed the preview not reappearing after using a keyboard shortcut (ex: scrolling with arrow keys)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1942 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-04-07 19:31:20 +00:00
Yves Rizoud
4fe4ccd7b0 Added safeties for Mode5: Mode will only switch on if the image has the required layers and a compatible width.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1941 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-03-30 22:27:09 +00:00
Yves Rizoud
95482d3f17 Tilemap settings window: removed empty space, and the mode is switched ON if you exit this window using the OK button
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1940 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-03-30 22:06:37 +00:00
Yves Rizoud
c5f9bb354d Tilemap mode: added a missing tile refresh after using the scroll(pan) tool. Added a few Doxygen comments.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1939 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-03-30 21:46:54 +00:00
Yves Rizoud
a137e063f0 Fix a crash that happened in Palette screen when right-clicking near top of screen: it opened the 'Copy/Paste' dropdown outside of screen edge. Now this dropdown menu only appears when you click in the palette area
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1938 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-03-25 14:44:29 +00:00
Yves Rizoud
2e5b97eb41 More fixes on layer preview. Layer buttons now activate on click instead of release.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1937 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-03-25 14:23:50 +00:00
Yves Rizoud
cd5b3346b0 More adjustments of layer preview : images less wide than a layer button are not zoomed more than normal size, and a max height is applied (Screen_height/4)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1936 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-03-24 19:50:06 +00:00
Yves Rizoud
c6479d22f6 Layer pop-up preview now has higher resolution (bypasses pixel ratio and menu zoom)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1935 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-03-24 18:55:49 +00:00
Yves Rizoud
99ce514ce8 Fix a case where the image could be in layer mode while the anim toolbar is visible. Note that from now on, if main and spare are single-image, changing the type of one will not change the type of the other.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1934 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-03-15 19:51:19 +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
Yves Rizoud
30e8079236 Fix crash when using Magnifier shortcut while the mouse is on a layer button (issue 480)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1932 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-03-13 19:55:51 +00:00
Yves Rizoud
be96447f3b Anim: Improved support of extreme durations (O included to 655.350s included); Adding frames now inherits parent's duration cleanly; Default duration now 100ms (instead of 1ms). Removed blanks in Time window and made tooltips more explicit for next/prev frame, thanks to 00ai99 for reporting.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1931 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-03-13 00:21:12 +00:00
Adrien Destugues
8081c9527d Quick fix for realpath needing PATH_MAX following Haiku patch.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1930 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-03-12 21:26:13 +00:00
Yves Rizoud
7d6d3ad875 Fix the Tilemap mode : When grid was visible, the copied tiles were erasing the grid. Now the grid is refreshed as needed.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1929 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-03-11 17:41:52 +00:00
Yves Rizoud
145c9545e7 Fix the 'FX' button that didn't refresh its state when swapping pages between an image with Tilemap ON (button should be highlighted) and an image with Tilemap OFF (button not highlighted)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1928 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-03-11 16:50:28 +00:00