95 Commits

Author SHA1 Message Date
Thomas Bernard
c65f9f8903
Prepare_and_display_filelist() can optionnaly update filename 2018-09-15 12:18:14 +02:00
Thomas Bernard
12050cd068
update Find_file_in_fileselector() to return -1 when not found 2018-09-15 11:11:48 +02:00
Thomas Bernard
16799113fc
properly keep filename when changing extension in the SAVE file selector
unicode string was not restored
2018-09-14 20:43:37 +02:00
Thomas Bernard
72972a8b49 doxygen comments in main.c.
Includes the mainpage section
2018-07-27 14:29:25 +02:00
Thomas Bernard
56df5080a5 filesel.c/.h: improvements in doxygen
Translated a few comments from French to English.
also improved the code slightly
2018-07-27 14:29:25 +02:00
Thomas Bernard
13dc203eaf remove leftover printf 2018-07-12 19:11:39 +02:00
Adrien Destugues
6dc5b89232 Try to fix some doxygen warnings. 2018-07-08 08:04:00 +02:00
Thomas Bernard
84070b43b2 fix display of filename in fileselector.
always redraw filename text after editing it
2018-07-02 11:38:52 +02:00
Thomas Bernard
cb2d479867 add GFX2_Get_Window_Handle() to get the win32 HWND
and use it
2018-07-02 11:38:51 +02:00
Thomas Bernard
3e4f3d0313 WIP. build under Win32 without SDL 2018-07-02 11:38:51 +02:00
Thomas Bernard
4d86b8a0c1 change all references to SDLK_xxxxx to KEY_xxxx
+ some fixes
2018-07-02 11:38:51 +02:00
Thomas Bernard
77005eb780 use screen.h instead of sdlscreen.h, etc.
Create grafx2-win32 MSVC++ project
create keycode.h
various fixes
2018-07-02 11:38:51 +02:00
Thomas Bernard
5c761ace2c Use KEY_NONE for buttons without key shortcuts
SDLK_LAST was used, but it is SDL 1.x specific
2018-07-02 11:38:51 +02:00
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
Nic Soudée
a01e7eea69 Implement shortcut/underscore for input button 2018-06-24 15:25:26 +00:00
Thomas Bernard
3a29a653ca remove a warning in WIN32 build 2018-05-22 17:55:00 +02:00
Thomas BERNARD
6c1e011de7 Fix "Select Drive" in file selector
Add HDD icon for /.
HFS Volumes have icon
2018-04-06 20:03:54 +02:00
Thomas Bernard
c8bc04e413 Fix filebackup when saving.
It was the wrong filename that was backuped when using "Save As".
Now it is the filename selected.
2018-04-06 16:45:35 +02:00
Thomas Bernard
10997509c8 File selector Fix "long" extensions detection under Win32 2018-03-19 14:54:19 +01:00
Thomas Bernard
b6c3852aad Display unicode names in script factory as well
So in windows the long filename is shown instead of the short filename
2018-02-23 18:46:28 +01:00
Thomas Bernard
854d787e59 io.c: Add Remove_directory() and Remove_path()
Also implement WIN32 version of File_length()
2018-02-20 15:45:45 +01:00
Thomas Bernard
60beebc9ac fixes for MSVC non-standard C library
strcase => _stricmp
strncase => _strnicmp
strdup => _strdup
snprintf => _snprintf

a compliant snprintf() is supposed to be available
in MS Visual Studio 2015 and later
2018-02-20 15:45:45 +01:00
Thomas Bernard
be824627ce loadsave.c: Add functions to open file with alternate extension.
Used by CPC format which are in several files :
PPH format uses PPH, ODD, EVE
CM5 uses CM5 + GFX
2018-02-20 15:45:45 +01:00
Thomas Bernard
ad219c84d2 Make saving of unicode named files work under Win32
the "Long" name is converted to short (DOS 8.3) name
as soon as possible.
2018-02-20 15:45:45 +01:00
Thomas Bernard
bbdee15990 Filename input in unicode for Win32 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
9fb6d650b5 pass unicode name when clicking Load or Save button 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
de8379aab8 Print_current_directory(): use ELLIPSIS_CHARACTER instead of ... 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
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