style cleanup: wm, mosyly adding space around ops

This commit is contained in:
2012-03-27 01:24:16 +00:00
parent 126c9d4caa
commit ae654301b0
14 changed files with 2587 additions and 2588 deletions

View File

@@ -1055,9 +1055,4 @@ BlenderCursor[BC_SWAPAREA_CURSOR]=&SwapCursor;
END_CURSOR_BLOCK END_CURSOR_BLOCK
/********************** Put the cursors in the array ***********************/ /********************** Put the cursors in the array ***********************/
} }

View File

@@ -691,7 +691,8 @@ static wmOperator *wm_operator_create(wmWindowManager *wm, wmOperatorType *ot, P
if (properties) { if (properties) {
otmacro = ot->macro.first; otmacro = ot->macro.first;
RNA_STRUCT_BEGIN(properties, prop) { RNA_STRUCT_BEGIN(properties, prop)
{
if (otmacro == NULL) if (otmacro == NULL)
break; break;
@@ -919,9 +920,10 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, P
* none to the UI handler */ * none to the UI handler */
wm_handler_ui_cancel(C); wm_handler_ui_cancel(C);
} }
else else {
WM_operator_free(op); WM_operator_free(op);
} }
}
return retval; return retval;
} }
@@ -1092,8 +1094,8 @@ int WM_operator_call_py(bContext *C, wmOperatorType *ot, int context, PointerRNA
/* keep the reports around if needed later */ /* keep the reports around if needed later */
if ((retval & OPERATOR_RUNNING_MODAL) || if ((retval & OPERATOR_RUNNING_MODAL) ||
((retval & OPERATOR_FINISHED) && wm_operator_register_check(CTX_wm_manager(C), ot)) ((retval & OPERATOR_FINISHED) && wm_operator_register_check(CTX_wm_manager(C), ot)))
) { {
reports->flag |= RPT_FREE; /* let blender manage freeing */ reports->flag |= RPT_FREE; /* let blender manage freeing */
} }
@@ -1764,8 +1766,8 @@ static int wm_handlers_do(bContext *C, wmEvent *event, ListBase *handlers)
* if its not handled by the keymap - campbell */ * if its not handled by the keymap - campbell */
if ((ABS(event->x - win->eventstate->prevclickx)) <= 2 && if ((ABS(event->x - win->eventstate->prevclickx)) <= 2 &&
(ABS(event->y - win->eventstate->prevclicky)) <= 2 && (ABS(event->y - win->eventstate->prevclicky)) <= 2 &&
((PIL_check_seconds_timer() - win->eventstate->prevclicktime) * 1000 < U.dbl_click_time) ((PIL_check_seconds_timer() - win->eventstate->prevclicktime) * 1000 < U.dbl_click_time))
) { {
event->val = KM_DBL_CLICK; event->val = KM_DBL_CLICK;
/* removed this because in cases where we're this is used as a single click /* removed this because in cases where we're this is used as a single click
* event, this will give old coords, * event, this will give old coords,

View File

@@ -418,7 +418,7 @@ void WM_exit_ext(bContext *C, const short do_python)
GPU_extensions_exit(); GPU_extensions_exit();
if (!G.background) { if (!G.background) {
BKE_undo_save_quit(); // saves quit.blend if global undo is on BKE_undo_save_quit(); /* saves quit.blend if global undo is on */
} }
BKE_reset_undo(); BKE_reset_undo();

View File

@@ -816,7 +816,8 @@ void WM_operator_properties_filesel(wmOperatorType *ot, int filter, short type,
{FILE_SHORTDISPLAY, "FILE_SHORTDISPLAY", ICON_SHORTDISPLAY, "Short List", "Display files as short list"}, {FILE_SHORTDISPLAY, "FILE_SHORTDISPLAY", ICON_SHORTDISPLAY, "Short List", "Display files as short list"},
{FILE_LONGDISPLAY, "FILE_LONGDISPLAY", ICON_LONGDISPLAY, "Long List", "Display files as a detailed list"}, {FILE_LONGDISPLAY, "FILE_LONGDISPLAY", ICON_LONGDISPLAY, "Long List", "Display files as a detailed list"},
{FILE_IMGDISPLAY, "FILE_IMGDISPLAY", ICON_IMGDISPLAY, "Thumbnails", "Display files as thumbnails"}, {FILE_IMGDISPLAY, "FILE_IMGDISPLAY", ICON_IMGDISPLAY, "Thumbnails", "Display files as thumbnails"},
{0, NULL, 0, NULL, NULL}}; {0, NULL, 0, NULL, NULL}
};
if (flag & WM_FILESEL_FILEPATH) if (flag & WM_FILESEL_FILEPATH)
@@ -975,8 +976,7 @@ static uiBlock *wm_block_create_redo(bContext *C, ARegion *ar, void *arg_op)
return block; return block;
} }
typedef struct wmOpPopUp typedef struct wmOpPopUp {
{
wmOperator *op; wmOperator *op;
int width; int width;
int height; int height;
@@ -2751,7 +2751,8 @@ int WM_gesture_lines_cancel(bContext *C, wmOperator *op)
static int gesture_lasso_exec(bContext *C, wmOperator *op) static int gesture_lasso_exec(bContext *C, wmOperator *op)
{ {
RNA_BEGIN(op->ptr, itemptr, "path") { RNA_BEGIN(op->ptr, itemptr, "path")
{
float loc[2]; float loc[2];
RNA_float_get_array(&itemptr, "loc", loc); RNA_float_get_array(&itemptr, "loc", loc);
@@ -3169,7 +3170,8 @@ static int radial_control_get_properties(bContext *C, wmOperator *op)
if (!radial_control_get_path(&ctx_ptr, op, "use_secondary", if (!radial_control_get_path(&ctx_ptr, op, "use_secondary",
&use_secondary_ptr, &use_secondary_prop, &use_secondary_ptr, &use_secondary_prop,
0, (RC_PROP_ALLOW_MISSING | 0, (RC_PROP_ALLOW_MISSING |
RC_PROP_REQUIRE_BOOL))) { RC_PROP_REQUIRE_BOOL)))
{
return 0; return 0;
} }
else { else {
@@ -3429,7 +3431,8 @@ static EnumPropertyItem redraw_timer_type_items[] = {
{4, "ANIM_STEP", 0, "Anim Step", "Animation Steps"}, {4, "ANIM_STEP", 0, "Anim Step", "Animation Steps"},
{5, "ANIM_PLAY", 0, "Anim Play", "Animation Playback"}, {5, "ANIM_PLAY", 0, "Anim Play", "Animation Playback"},
{6, "UNDO", 0, "Undo/Redo", "Undo/Redo"}, {6, "UNDO", 0, "Undo/Redo", "Undo/Redo"},
{0, NULL, 0, NULL, NULL}}; {0, NULL, 0, NULL, NULL}
};
static int redraw_timer_exec(bContext *C, wmOperator *op) static int redraw_timer_exec(bContext *C, wmOperator *op)
{ {
@@ -3697,7 +3700,6 @@ static void gesture_circle_modal_keymap(wmKeyConfig *keyconf)
{GESTURE_MODAL_DESELECT, "DESELECT", 0, "DeSelect", ""}, {GESTURE_MODAL_DESELECT, "DESELECT", 0, "DeSelect", ""},
{GESTURE_MODAL_NOP, "NOP", 0, "No Operation", ""}, {GESTURE_MODAL_NOP, "NOP", 0, "No Operation", ""},
{0, NULL, 0, NULL, NULL}}; {0, NULL, 0, NULL, NULL}};
wmKeyMap *keymap = WM_modalkeymap_get(keyconf, "View3D Gesture Circle"); wmKeyMap *keymap = WM_modalkeymap_get(keyconf, "View3D Gesture Circle");