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

@@ -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;
}