diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-06-16 19:28:39 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-06-16 19:28:39 +0400 |
commit | dce577ad85e9c3349000143cf4e7647254c01cb9 (patch) | |
tree | b8b55655d65391ad35af1493dea1a76313cecdf4 /source/blender/editors/interface | |
parent | fd24c99b5ddd251ee64f95ae227ba76bcf9cb561 (diff) |
use directory selector for properties defined as PROP_DIRPATH, user preferences 'File' buttons for eg.
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_layout.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 55c1488291b..79a90fb9d1d 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -534,7 +534,10 @@ static uiBut *ui_item_with_label(uiLayout *layout, uiBlock *block, const char *n uiDefAutoButR(block, ptr, prop, index, "", icon, x, y, w-UI_UNIT_X, h); /* BUTTONS_OT_file_browse calls uiFileBrowseContextProperty */ - but= uiDefIconButO(block, BUT, "BUTTONS_OT_file_browse", WM_OP_INVOKE_DEFAULT, ICON_FILESEL, x, y, UI_UNIT_X, h, NULL); + but= uiDefIconButO(block, BUT, subtype==PROP_DIRPATH ? + "BUTTONS_OT_directory_browse" : + "BUTTONS_OT_file_browse", + WM_OP_INVOKE_DEFAULT, ICON_FILESEL, x, y, UI_UNIT_X, h, NULL); } else if(flag & UI_ITEM_R_EVENT) { uiDefButR(block, KEYEVT, 0, name, x, y, w, h, ptr, RNA_property_identifier(prop), index, 0, 0, -1, -1, NULL); |