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:
authorCampbell Barton <ideasman42@gmail.com>2009-07-30 03:12:30 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-07-30 03:12:30 +0400
commit239b78c6377c41ba49e36a1dbd3cede6a3347f64 (patch)
treede928373585b2e0c4bf07938413ea3cb0749b99d /source/blender/editors
parent408ba429e6aa392f769aac4a442a7a06c1740326 (diff)
- include operator commands in tooltips (needs sanitizing for transform operators, there are massive :|)
- WM_operator_pystring can now be used with an operator type and properties (rather then a wmOperator instance) - removed menus from file selector
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/interface/interface_regions.c15
-rw-r--r--source/blender/editors/space_file/file_draw.c5
-rw-r--r--source/blender/editors/space_file/file_ops.c1
3 files changed, 19 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index 7cce7a0bbed..94442c5de22 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -391,6 +391,21 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
data->linedark[data->totline]= 1;
data->totline++;
}
+ else if (but->optype) {
+ PointerRNA *opptr;
+ char *str;
+ opptr= uiButGetOperatorPtrRNA(but);
+
+ str= WM_operator_pystring(but->optype, opptr);
+
+ /* operator info */
+ BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), "Python: %s", str);
+ data->linedark[data->totline]= 1;
+ data->totline++;
+
+ WM_operator_properties_free(opptr);
+ MEM_freeN(str);
+ }
if(data->totline == 0) {
MEM_freeN(data);
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c
index e807bad28bf..933b9cc69ad 100644
--- a/source/blender/editors/space_file/file_draw.c
+++ b/source/blender/editors/space_file/file_draw.c
@@ -81,6 +81,7 @@
/* ui geometry */
#define IMASEL_BUTTONS_HEIGHT 40
+#define IMASEL_BUTTONS_MARGIN 6
#define TILE_BORDER_X 8
#define TILE_BORDER_Y 8
@@ -134,8 +135,8 @@ void file_draw_buttons(const bContext *C, ARegion *ar)
/* Button layout. */
const short min_x = 10;
const short max_x = ar->winx - 10;
- const short line2_y = ar->winy - IMASEL_BUTTONS_HEIGHT - 12;
- const short line1_y = line2_y + IMASEL_BUTTONS_HEIGHT/2 + 4;
+ const short line2_y = IMASEL_BUTTONS_HEIGHT/2 + IMASEL_BUTTONS_MARGIN*2;
+ const short line1_y = IMASEL_BUTTONS_MARGIN;
const short input_minw = 20;
const short btn_h = UI_UNIT_Y;
const short btn_fn_w = UI_UNIT_X;
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index a217dbe9f57..9c73956d375 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -716,6 +716,7 @@ void FILE_OT_directory_new(struct wmOperatorType *ot)
/* identifiers */
ot->name= "Create New Directory";
ot->idname= "FILE_OT_directory_new";
+ ot->description= "Create a new directory";
/* api callbacks */
ot->invoke= WM_operator_confirm;