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
This commit is contained in:
Adrien Destugues 2012-06-09 20:41:05 +00:00
parent ff9f228b5f
commit d4d57f750d
2 changed files with 72 additions and 63 deletions

View File

@ -257,7 +257,7 @@ endif
COPT = -W -Wall -m68020-60 -fomit-frame-pointer -std=c99 -Wdeclaration-after-statement -D__MINT__ -DNO_INLINE_MATH -O$(OPTIM) -c -I$(prefix)/include `$(prefix)/bin/libpng12-config --cflags` `$(prefix)/bin/sdl-config --cflags` $(JOYCOPT) $(LUACOPT) COPT = -W -Wall -m68020-60 -fomit-frame-pointer -std=c99 -Wdeclaration-after-statement -D__MINT__ -DNO_INLINE_MATH -O$(OPTIM) -c -I$(prefix)/include `$(prefix)/bin/libpng12-config --cflags` `$(prefix)/bin/sdl-config --cflags` $(JOYCOPT) $(LUACOPT)
LOPT = -static -m68020-60 -lSDL_image `$(prefix)/bin/sdl-config --libs` -L$(prefix)/lib -ltiff -ljpeg `$(prefix)/bin/libpng12-config --libs` -lz -lm $(TTFLOPT) -lfreetype $(LUALOPT) $(LAYERLOPT) LOPT = -static -m68020-60 -lSDL_image `$(prefix)/bin/sdl-config --libs` -L$(prefix)/lib -ltiff -ljpeg `$(prefix)/bin/libpng12-config --libs` -lz -lm $(TTFLOPT) -lfreetype $(LUALOPT) $(LAYERLOPT)
else else
ifeq ($(PLATFORM),syllable) #10 ifeq ($(PLATFORM),syllable) #11
#Syllable #Syllable
DELCOMMAND = rm -rf DELCOMMAND = rm -rf
MKDIR = mkdir -p MKDIR = mkdir -p

View File

@ -1433,7 +1433,7 @@ void Draw_script_information(T_Fileselector_item * script_item, const char *full
// Blank the target area // Blank the target area
Window_rectangle(7, FILESEL_Y + 89, DESC_WIDTH*6+2, 4*8, MC_Black); Window_rectangle(7, FILESEL_Y + 89, DESC_WIDTH*6+2, 4*8, MC_Black);
if (script_item && script_item->Type==0 && script_item->Full_name && script_item->Full_name[0]!='\0') if (script_item && script_item->Full_name && script_item->Full_name[0]!='\0')
{ {
char full_name[MAX_PATH_CHARACTERS]; char full_name[MAX_PATH_CHARACTERS];
strcpy(full_name, full_directory); strcpy(full_name, full_directory);
@ -1442,6 +1442,9 @@ void Draw_script_information(T_Fileselector_item * script_item, const char *full
x=0; x=0;
y=0; y=0;
text_block[0][0] = text_block[1][0] = text_block[2][0] = '\0'; text_block[0][0] = text_block[1][0] = text_block[2][0] = '\0';
if (script_item->Type == 0)
{
// Start reading // Start reading
script_file = fopen(full_name, "r"); script_file = fopen(full_name, "r");
if (script_file != NULL) if (script_file != NULL)
@ -1478,7 +1481,6 @@ void Draw_script_information(T_Fileselector_item * script_item, const char *full
} }
fclose(script_file); fclose(script_file);
} }
Print_help(8, FILESEL_Y + 89 , text_block[0], 'N', 0, 0); Print_help(8, FILESEL_Y + 89 , text_block[0], 'N', 0, 0);
Print_help(8, FILESEL_Y + 89+ 8, text_block[1], 'N', 0, 0); Print_help(8, FILESEL_Y + 89+ 8, text_block[1], 'N', 0, 0);
Print_help(8, FILESEL_Y + 89+16, text_block[2], 'N', 0, 0); Print_help(8, FILESEL_Y + 89+16, text_block[2], 'N', 0, 0);
@ -1499,9 +1501,16 @@ void Draw_script_information(T_Fileselector_item * script_item, const char *full
{ {
Print_help(8+4*6, FILESEL_Y + 89+24, "None", 'K', 0, 4); Print_help(8+4*6, FILESEL_Y + 89+24, "None", 'K', 0, 4);
} }
} else {
int q = strlen(full_name);
q -= DESC_WIDTH;
if (q < 0)
q = 0;
else
full_name[q] = ELLIPSIS_CHARACTER;
Print_help(8, FILESEL_Y + 89 , full_name + q, 'N', 0, 0);
}
} }
Update_window_area(8, FILESEL_Y + 89, DESC_WIDTH*6+2, 4*8); Update_window_area(8, FILESEL_Y + 89, DESC_WIDTH*6+2, 4*8);