Fix an hourglass cursor when loading a file from command-line (recent bug). Fix issue 307: Drop-opened files do not retain name in Save-as dialog.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1346 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud 2010-02-14 01:39:56 +00:00
parent 76887dd84d
commit 25e8943e4c
3 changed files with 25 additions and 10 deletions

View File

@ -2,7 +2,7 @@ $(OBJDIR)/SFont.o: SFont.c SFont.h
$(OBJDIR)/brush.o: brush.c global.h struct.h const.h graph.h misc.h errors.h \
windows.h sdlscreen.h brush.h
$(OBJDIR)/brush_ops.o: brush_ops.c brush.h struct.h const.h buttons.h engine.h \
global.h graph.h misc.h operatio.h pages.h windows.h
global.h graph.h misc.h operatio.h pages.h sdlscreen.h windows.h
$(OBJDIR)/buttons.o: buttons.c const.h struct.h global.h misc.h graph.h engine.h \
readline.h filesel.h loadsave.h init.h buttons.h operatio.h pages.h \
palette.h errors.h readini.h saveini.h shade.h io.h help.h text.h \
@ -14,7 +14,7 @@ $(OBJDIR)/engine.o: engine.c const.h struct.h global.h graph.h misc.h special.h
input.h engine.h pages.h layers.h
$(OBJDIR)/factory.o: factory.c brush.h struct.h const.h buttons.h engine.h errors.h \
filesel.h loadsave.h global.h graph.h io.h misc.h pages.h readline.h \
sdlscreen.h windows.h
sdlscreen.h windows.h palette.h
$(OBJDIR)/fileformats.o: fileformats.c errors.h global.h struct.h const.h \
loadsave.h misc.h io.h windows.h pages.h
$(OBJDIR)/filesel.o: filesel.c const.h struct.h global.h misc.h errors.h io.h \
@ -35,7 +35,8 @@ $(OBJDIR)/input.o: input.c global.h struct.h const.h keyboard.h sdlscreen.h \
windows.h errors.h misc.h input.h
$(OBJDIR)/io.o: io.c struct.h const.h io.h realpath.h
$(OBJDIR)/keyboard.o: keyboard.c global.h struct.h const.h keyboard.h
$(OBJDIR)/layers.o: layers.c const.h struct.h global.h windows.h engine.h pages.h
$(OBJDIR)/layers.o: layers.c const.h struct.h global.h windows.h engine.h pages.h \
sdlscreen.h input.h help.h misc.h
$(OBJDIR)/libraw2crtc.o: libraw2crtc.c const.h global.h struct.h loadsave.h
$(OBJDIR)/loadsave.o: loadsave.c buttons.h struct.h const.h errors.h global.h io.h \
loadsave.h misc.h graph.h op_c.h pages.h palette.h sdlscreen.h \
@ -51,8 +52,8 @@ $(OBJDIR)/mountlist.o: mountlist.c
$(OBJDIR)/op_c.o: op_c.c op_c.h struct.h const.h errors.h
$(OBJDIR)/operatio.o: operatio.c const.h struct.h global.h misc.h engine.h graph.h \
operatio.h buttons.h pages.h errors.h sdlscreen.h brush.h windows.h
$(OBJDIR)/pages.o: pages.c global.h struct.h const.h pages.h errors.h misc.h \
windows.h
$(OBJDIR)/pages.o: pages.c global.h struct.h const.h pages.h errors.h loadsave.h \
misc.h windows.h
$(OBJDIR)/palette.o: palette.c const.h struct.h global.h misc.h engine.h readline.h \
buttons.h pages.h help.h sdlscreen.h errors.h op_c.h windows.h input.h \
palette.h shade.h

View File

@ -963,14 +963,22 @@ void Scroll_fileselector(T_Scroller_button * file_scroller)
short Find_file_in_fileselector(T_Fileselector *list, char * fname)
{
T_Fileselector_item * current_item;
T_Fileselector_item * item;
short index;
short close_match=0;
for (index=0, current_item=list->First;
((current_item!=NULL) && (strcmp(current_item->Full_name,fname)));
index++,current_item=current_item->Next);
index=0;
for (item=list->First; item!=NULL; item=item->Next)
{
if (strcmp(item->Full_name,fname)==0)
return index;
if (strcasecmp(item->Full_name,fname)==0)
close_match=index;
index++;
}
return (current_item!=NULL)?index:0;
return close_match;
}

View File

@ -690,6 +690,9 @@ void Load_image(T_IO_Context *context)
{
Palette_loaded(context);
}
Hide_cursor();
Cursor_shape=CURSOR_SHAPE_ARROW;
Display_cursor();
break;
case CONTEXT_BRUSH:
@ -700,6 +703,9 @@ void Load_image(T_IO_Context *context)
Flush_update();
if (Convert_24b_bitmap_to_256(Brush,context->Buffer_image_24b,context->Width,context->Height,context->Palette))
File_error=2;
Hide_cursor();
Cursor_shape=CURSOR_SHAPE_ARROW;
Display_cursor();
break;
case CONTEXT_PREVIEW: