Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-09-10 18:20:21 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-09-10 18:20:21 +0400
commitcfb6f35f9fd2905b7d51b78258f98ab45d2c5ced (patch)
tree9c954266778cb7344dde5e01b77df335537f3dba /source/blender/editors/interface/interface_utils.c
parent15d77f17a40398a63f95e16607deb81257c02698 (diff)
UI:
* layout.itemR now has icon_only option to show only icon in e.g. enums buttons, for uv editor header. * Automatic key shortcuts in menus now show the shortcut even if operator properties don't match. Not sure this will work well everywhere, but seems to be working ok for now. * Open recent now show shorter filenames instead of the whole file path. * Tweak object Duplicate menu item.
Diffstat (limited to 'source/blender/editors/interface/interface_utils.c')
-rw-r--r--source/blender/editors/interface/interface_utils.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c
index 5b44f6544d1..63f81c9e46c 100644
--- a/source/blender/editors/interface/interface_utils.c
+++ b/source/blender/editors/interface/interface_utils.c
@@ -108,7 +108,12 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind
but= uiDefButR(block, NUM, 0, name, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL);
break;
case PROP_ENUM:
- but= uiDefButR(block, MENU, 0, NULL, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL);
+ if(icon && name && strcmp(name, "") == 0)
+ but= uiDefIconButR(block, MENU, 0, icon, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL);
+ else if(icon)
+ but= uiDefIconTextButR(block, MENU, 0, icon, NULL, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL);
+ else
+ but= uiDefButR(block, MENU, 0, NULL, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL);
break;
case PROP_STRING:
if(icon && name && strcmp(name, "") == 0)