[Bf-blender-cvs] [4d93454] master: UI: only show thumbnail size when its enabled
Campbell Barton
noreply at git.blender.org
Fri Oct 16 09:58:19 CEST 2015
Commit: 4d9345479aa86f610650f43a6c5e04235d8943d1
Author: Campbell Barton
Date: Fri Oct 16 18:51:33 2015 +1100
Branches: master
https://developer.blender.org/rB4d9345479aa86f610650f43a6c5e04235d8943d1
UI: only show thumbnail size when its enabled
Also make enum identifiers less cryptic.
===================================================================
M release/scripts/startup/bl_ui/space_filebrowser.py
M source/blender/makesrna/intern/rna_space.c
M source/blender/windowmanager/intern/wm_operators.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py b/release/scripts/startup/bl_ui/space_filebrowser.py
index f6f86c0..0d30113 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 d73b231..5114037 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 5c2e1f8..2e039d8 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}
};
More information about the Bf-blender-cvs
mailing list