115 Commits

Author SHA1 Message Date
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
b882eb9fe4 Print highlighted filename in unicode
Print_filename_in_fileselector()
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
62944c724e getcwd() => Get_current_directory() 2018-02-20 15:44:39 +01:00
Thomas Bernard
2ef2e04a7e Rewrite Read_list_of_files() to make use of For_each_directory_entry() 2018-02-20 15:44:39 +01:00
Thomas Bernard
2bfbc03cb8 Display the bpp of the picture in the Load/Save Dialog 2018-02-18 21:11:40 +01:00
Thomas Bernard
d44968f063 improve comments 2018-01-25 22:55:27 +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
207e487d99 Show palette in preview (instead of image) when loading palette ! 2018-01-25 22:55:27 +01:00
Thomas Bernard
1c6a9e2db2 fix UI colors Remaping when several windows are open 2018-01-25 22:55:27 +01:00
Thomas Bernard
2d26bb8a1f WIP: "Load" button in Palette Dialog
see http://pulkomandy.tk/projects/GrafX2/ticket/24

still some issues :

1) UI color remapping

2) File type selector (need to add a Palette selector
in addition to the Main and Brush selector)
2018-01-25 22:55:27 +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
350ca22f1e Restore the Selector_filename in case of Bookmark error.
There was a small bug in the code. To reproduce :
1- select a file to preview
2- Select a boggus bookmark, get the RED flash => OK
3- Click Load. RED Flash instead of loading the selected file

now the "selected file" (Selector_filename) is properly restored
2018-01-22 13:46:13 +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
e078b3afe1 fix issue 46 "ghost cursors"
see http://pulkomandy.tk/projects/GrafX2/ticket/46
One has to be with the cursor shown before calling Error(0)
2018-01-22 13:46:13 +01:00
Thomas Bernard
f84ca359d4 fix compilation of Native_filesel() with non win32/non linux platforms
Implementations would need to be added when Native_filesel() will be used for real
2017-08-08 18:06:06 +02: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
Yves Rizoud
2f3c55477e Fileselectors : handle palette and image formats separately
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2125 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2015-07-05 01:10:31 +00:00
Adrien Destugues
32defb8897 fix "save as" not showing the current filename
* We attempted to set this but it was overwritten when enumerating the files.
* This makes it easier to save the file in the same dir, with another name.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2111 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2015-03-04 10:12:18 +00:00
Adrien Destugues
fa80a10093 Implement "save palette" button
* Actually a shortcut to "save picture" with preset PAL format and different window title.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2110 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2015-03-04 10:08:34 +00:00
Adrien Destugues
02a32b75bb Don't free() stack-allocated buffer.
Probably a leftover of use of a Linux extension of getcwd. Currently we use a
buffer on the stack and we must not free it.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2089 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2015-02-23 20:56:36 +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
nokturnal
390ad46b96 atari/mint fixed gcc warnings, compilation fix
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2037 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-11-04 12:54:55 +00:00
Adrien Destugues
76222af12a * Brush factory: Drive entries in fileselector don't have an icon on some platforms
* File selector: remove BeOS quirk for getting home directory (the OS was fixed), and try to guess the drive type for UNIX OSes (untested)

Fixes #492.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2015 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-09-28 18:19:31 +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
5a2e556f18 Fix a problem when exporting a single layer or anim frame, the chosen format was kept as the file's 'current format'. Also improve Brush load/save which has now mostly separate settings
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2002 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-09-21 20:10:33 +00:00
Yves Rizoud
48bb895147 Fixed side effect of issue 498 in fileselector. Also fixed possible crash when you change format filter while highlighted filename has less than 3 characters, and made the display 'follow' selected file/dir when you change filter if it's still in list.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1995 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-09-17 23:40:09 +00:00
Yves Rizoud
95b537e5f0 Fix issue 506: Missing 'parent directory' in fileselector
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1994 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-09-17 21:11:44 +00:00
mazzearos
d616d44f97 AmigaOS,MorphOS,AROS: show the "assigns", too.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1990 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-08-14 12:16:18 +00:00
Yves Rizoud
f0041625a7 Fix issue 498: Now in fileselector, clicking the filename clears it if the highlighted 'file' was a directory or drive or the 'parent directory' entry
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1985 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-08-11 16:49:10 +00:00
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
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
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
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
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
747f9e8526 Fix most of issue 462 : Inconsistent directories in file selectors for image and brush.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1926 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-03-09 01:18:23 +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
Adrien Destugues
d34c3d9df5 Clipboard paste support for Haiku.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1828 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2011-09-25 11:48:37 +00:00
Adrien Destugues
afa22ae0ac Experimental "paste" support for text fields.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1827 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2011-09-25 08:45:48 +00:00
Adrien Destugues
2d95dac3b0 Add a warning if the native fileselector isn't available.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1807 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2011-06-18 16:08:40 +00:00
nokturnal
7184fb857f bugfix in Add_element_to_list(), there were changes in function interface, but they were not applied in function call, so this resulted in program hang when calling fileselector.
Bugfix there was no Atari_Memory_free() declaration when __MINT_ define was declared.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1799 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2011-06-15 19:29:11 +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
04761c79c4 Unbroke the file selector (was listing only hidden files instead of non-hidden). Lua: can browse the whole filesystem now
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1761 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2011-04-02 17:43:16 +00:00
Yves Rizoud
9f8dada2b0 Lua window: Fix inconsistency of 'parent directory' appearance. Now applies the 'show hidden files/dirs' settings too.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1760 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2011-03-23 20:13:12 +00:00
Yves Rizoud
4b6263d6fc Fixes grafx2 forgetting the image's directory, since r1710 (issue 421)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1739 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2011-02-28 19:42:06 +00:00
Adrien Destugues
c80ec5edbf Fix #418: don't overwrite main file format if saving only the palette.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1729 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2011-02-18 10:48:08 +00:00
nokturnal
fdb925979e compilation fixes for atari port
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1711 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2011-02-07 13:37:12 +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
5a8972d0f9 Fix an issue with files since the adding of xpm saving
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1706 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2011-01-30 19:35:29 +00:00