[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [24796] trunk/blender: temp hack to make the popup show wider when running the edit description operator
Campbell Barton
ideasman42 at gmail.com
Mon Nov 23 01:56:19 CET 2009
Revision: 24796
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=24796
Author: campbellbarton
Date: 2009-11-23 01:56:19 +0100 (Mon, 23 Nov 2009)
Log Message:
-----------
temp hack to make the popup show wider when running the edit description operator
Modified Paths:
--------------
trunk/blender/release/scripts/op/wm.py
trunk/blender/source/blender/editors/interface/interface_handlers.c
trunk/blender/source/blender/windowmanager/intern/wm_operators.c
Modified: trunk/blender/release/scripts/op/wm.py
===================================================================
--- trunk/blender/release/scripts/op/wm.py 2009-11-23 00:27:30 UTC (rev 24795)
+++ trunk/blender/release/scripts/op/wm.py 2009-11-23 00:56:19 UTC (rev 24796)
@@ -248,9 +248,9 @@
return ('FINISHED',)
doc_id = StringProperty(name="Doc ID",
- description="ID for the documentation", maxlen=1024, default="")
+ description="", maxlen=1024, default="", hidden=True)
-doc_new = StringProperty(name="Doc New",
+doc_new = StringProperty(name="Edit Description",
description="", maxlen=1024, default="")
Modified: trunk/blender/source/blender/editors/interface/interface_handlers.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_handlers.c 2009-11-23 00:27:30 UTC (rev 24795)
+++ trunk/blender/source/blender/editors/interface/interface_handlers.c 2009-11-23 00:56:19 UTC (rev 24796)
@@ -3497,7 +3497,7 @@
RNA_string_set(&ptr_props, "doc_id", buf);
RNA_string_set(&ptr_props, "doc_new", RNA_property_description(but->rnaprop));
- uiItemFullO(layout, "Edit Docs (TODO)", 0, "WM_OT_doc_edit", ptr_props.data, WM_OP_INVOKE_DEFAULT, 0);
+ uiItemFullO(layout, "Submit Description", 0, "WM_OT_doc_edit", ptr_props.data, WM_OP_INVOKE_DEFAULT, 0);
}
else if (but->optype) {
WM_operator_py_idname(buf, but->optype->idname);
@@ -3511,7 +3511,7 @@
RNA_string_set(&ptr_props, "doc_id", buf);
RNA_string_set(&ptr_props, "doc_new", but->optype->description);
- uiItemFullO(layout, "Edit Docs (TODO)", 0, "WM_OT_doc_edit", ptr_props.data, WM_OP_INVOKE_DEFAULT, 0);
+ uiItemFullO(layout, "Submit Description", 0, "WM_OT_doc_edit", ptr_props.data, WM_OP_INVOKE_DEFAULT, 0);
}
}
Modified: trunk/blender/source/blender/windowmanager/intern/wm_operators.c
===================================================================
--- trunk/blender/source/blender/windowmanager/intern/wm_operators.c 2009-11-23 00:27:30 UTC (rev 24795)
+++ trunk/blender/source/blender/windowmanager/intern/wm_operators.c 2009-11-23 00:56:19 UTC (rev 24796)
@@ -699,7 +699,9 @@
uiBlock *block;
uiLayout *layout;
uiStyle *style= U.uistyles.first;
+ int columns= 2, width= 300;
+
block= uiBeginBlock(C, ar, "redo_popup", UI_EMBOSS);
uiBlockClearFlag(block, UI_BLOCK_LOOP);
uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN|UI_BLOCK_RET_1);
@@ -710,14 +712,20 @@
op->properties= IDP_New(IDP_GROUP, val, "wmOperatorProperties");
}
+ // XXX - hack, only for editing docs
+ if(strcmp(op->type->idname, "WM_OT_doc_edit")==0) {
+ columns= 1;
+ width= 500;
+ }
+
RNA_pointer_create(&wm->id, op->type->srna, op->properties, &ptr);
- layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, 0, 0, 300, 20, style);
+ layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, 0, 0, width, 20, style);
uiItemL(layout, op->type->name, 0);
if(op->type->ui)
op->type->ui((bContext*)C, &ptr, layout);
else
- uiDefAutoButsRNA(C, layout, &ptr, 2);
+ uiDefAutoButsRNA(C, layout, &ptr, columns);
uiPopupBoundsBlock(block, 4.0f, 0, 0);
uiEndBlock(C, block);
More information about the Bf-blender-cvs
mailing list