diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-10-16 10:51:33 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-10-16 10:51:33 +0300 |
commit | 4d9345479aa86f610650f43a6c5e04235d8943d1 (patch) | |
tree | 7da1d3562058333d41b51f3bde7564107206b33d | |
parent | c9d3243f2b09dcc836f8bbd373df7da44d069476 (diff) |
UI: only show thumbnail size when its enabled
Also make enum identifiers less cryptic.
-rw-r--r-- | release/scripts/startup/bl_ui/space_filebrowser.py | 3 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 6 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 8 |
3 files changed, 9 insertions, 8 deletions
diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py b/release/scripts/startup/bl_ui/space_filebrowser.py index f6f86c0c7a7..0d30113e68a 100644 --- a/release/scripts/startup/bl_ui/space_filebrowser.py +++ b/release/scripts/startup/bl_ui/space_filebrowser.py @@ -56,7 +56,8 @@ class FILEBROWSER_HT_header(Header): layout.prop(params, "display_type", expand=True, text="") - layout.prop(params, "thumbnail_size", text="") + if params.display_type == 'THUMBNAIL': + layout.prop(params, "thumbnail_size", text="") layout.prop(params, "sort_method", expand=True, text="") diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index d73b2315434..5114037f852 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -3735,9 +3735,9 @@ static void rna_def_fileselect_params(BlenderRNA *brna) PropertyRNA *prop; static EnumPropertyItem file_display_items[] = { - {FILE_SHORTDISPLAY, "FILE_SHORTDISPLAY", ICON_SHORTDISPLAY, "Short List", "Display files as short list"}, - {FILE_LONGDISPLAY, "FILE_LONGDISPLAY", ICON_LONGDISPLAY, "Long List", "Display files as a detailed list"}, - {FILE_IMGDISPLAY, "FILE_IMGDISPLAY", ICON_IMGDISPLAY, "Thumbnails", "Display files as thumbnails"}, + {FILE_SHORTDISPLAY, "LIST_SHORT", ICON_SHORTDISPLAY, "Short List", "Display files as short list"}, + {FILE_LONGDISPLAY, "LIST_LONG", ICON_LONGDISPLAY, "Long List", "Display files as a detailed list"}, + {FILE_IMGDISPLAY, "THUMBNAIL", ICON_IMGDISPLAY, "Thumbnails", "Display files as thumbnails"}, {0, NULL, 0, NULL, NULL} }; diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 5c2e1f859c8..2e039d815f6 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -1215,10 +1215,10 @@ void WM_operator_properties_filesel(wmOperatorType *ot, int filter, short type, PropertyRNA *prop; static EnumPropertyItem file_display_items[] = { - {FILE_DEFAULTDISPLAY, "FILE_DEFAULTDISPLAY", 0, "Default", "Automatically determine display type for files"}, - {FILE_SHORTDISPLAY, "FILE_SHORTDISPLAY", ICON_SHORTDISPLAY, "Short List", "Display files as short list"}, - {FILE_LONGDISPLAY, "FILE_LONGDISPLAY", ICON_LONGDISPLAY, "Long List", "Display files as a detailed list"}, - {FILE_IMGDISPLAY, "FILE_IMGDISPLAY", ICON_IMGDISPLAY, "Thumbnails", "Display files as thumbnails"}, + {FILE_DEFAULTDISPLAY, "DEFAULT", 0, "Default", "Automatically determine display type for files"}, + {FILE_SHORTDISPLAY, "LIST_SHORT", ICON_SHORTDISPLAY, "Short List", "Display files as short list"}, + {FILE_LONGDISPLAY, "LIST_LONG", ICON_LONGDISPLAY, "Long List", "Display files as a detailed list"}, + {FILE_IMGDISPLAY, "THUMBNAIL", ICON_IMGDISPLAY, "Thumbnails", "Display files as thumbnails"}, {0, NULL, 0, NULL, NULL} }; |