== filebrowser ==

PATCH: [#32985] File Browser text file icon does not match text filter icon
Contributed by Georg Kronthaler, many thanks!

* set correct icon for text files and drag&drop
* remove duplicate if for filter_text
* fixed a couple of blanks at the end of line.
This commit is contained in:
Andrea Weikert 2012-10-27 17:47:58 +00:00
parent 3f88ca0d80
commit 89b7e22578
3 changed files with 8 additions and 6 deletions

@ -272,6 +272,8 @@ static int get_file_icon(struct direntry *file)
return ICON_FILE_BLANK;
else if (file->flags & COLLADAFILE)
return ICON_FILE_BLANK;
else if (file->flags & TEXTFILE)
return ICON_FILE_TEXT;
else
return ICON_FILE_BLANK;
}

@ -833,6 +833,8 @@ int ED_file_extension_icon(const char *relname)
return ICON_FILE_BLANK;
else if (type == COLLADAFILE)
return ICON_FILE_BLANK;
else if (type == TEXTFILE)
return ICON_FILE_TEXT;
return ICON_FILE_BLANK;
}

@ -168,8 +168,6 @@ short ED_fileselect_set_params(SpaceFile *sfile)
params->filter |= RNA_boolean_get(op->ptr, "filter_image") ? IMAGEFILE : 0;
if (RNA_struct_find_property(op->ptr, "filter_movie"))
params->filter |= RNA_boolean_get(op->ptr, "filter_movie") ? MOVIEFILE : 0;
if (RNA_struct_find_property(op->ptr, "filter_text"))
params->filter |= RNA_boolean_get(op->ptr, "filter_text") ? TEXTFILE : 0;
if (RNA_struct_find_property(op->ptr, "filter_python"))
params->filter |= RNA_boolean_get(op->ptr, "filter_python") ? PYSCRIPTFILE : 0;
if (RNA_struct_find_property(op->ptr, "filter_font"))