Revision: 23197
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23197
Author:   broken
Date:     2009-09-14 00:33:47 +0200 (Mon, 14 Sep 2009)

Log Message:
-----------
New 'icon_only' wasn't actually exposed in the ui api, causing errors in the py 
scripts, so I added it to ItemR. Also reverted Joshua's temporary fix, which 
didn't seem to help much and was making the render engine menu too small.

Modified Paths:
--------------
    trunk/blender/source/blender/makesrna/intern/rna_ui_api.c

Modified: trunk/blender/source/blender/makesrna/intern/rna_ui_api.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_ui_api.c   2009-09-13 
22:08:27 UTC (rev 23196)
+++ trunk/blender/source/blender/makesrna/intern/rna_ui_api.c   2009-09-13 
22:33:47 UTC (rev 23197)
@@ -37,17 +37,15 @@
 
 #ifdef RNA_RUNTIME
 
-static void rna_uiItemR(uiLayout *layout, char *name, int icon, PointerRNA 
*ptr, char *propname, int expand, int slider, int toggle)
+static void rna_uiItemR(uiLayout *layout, char *name, int icon, PointerRNA 
*ptr, char *propname, int expand, int slider, int toggle, int icon_only)
 {
        int flag= 0;
 
        flag |= (slider)? UI_ITEM_R_SLIDER: 0;
        flag |= (expand)? UI_ITEM_R_EXPAND: 0;
        flag |= (toggle)? UI_ITEM_R_TOGGLE: 0;
+       flag |= (icon_only)? UI_ITEM_R_ICON_ONLY: 0;
        
-               // XXX: an 'icon_only' prop should be added instead, but for 
now, this makes ptrs look ok
-       flag |= (name && name[0]==0)? UI_ITEM_R_ICON_ONLY: 0; 
-
        uiItemR(layout, name, icon, ptr, propname, flag);
 }
 
@@ -148,6 +146,7 @@
        RNA_def_boolean(func, "expand", 0, "", "Expand button to show more 
detail.");
        RNA_def_boolean(func, "slider", 0, "", "Use slider widget for numeric 
values.");
        RNA_def_boolean(func, "toggle", 0, "", "Use toggle widget for boolean 
values.");
+       RNA_def_boolean(func, "icon_only", 0, "", "Only show the property's 
icon, with no text");
 
        func= RNA_def_function(srna, "items_enumR", "uiItemsEnumR");
        api_ui_item_rna_common(func);


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to