Name unification commit for console toggling operator.
Requested by Dalai, approved by Campbell. Other requested from Dalai changes were rejected by our Python Departament.
This commit is contained in:
@@ -366,7 +366,7 @@ class INFO_MT_help(bpy.types.Menu):
|
||||
layout.operator("wm.sysinfo", icon='TEXT')
|
||||
layout.separator()
|
||||
if sys.platform[:3] == "win":
|
||||
layout.operator("wm.toggle_console", icon='CONSOLE')
|
||||
layout.operator("wm.console_toggle", icon='CONSOLE')
|
||||
layout.separator()
|
||||
layout.operator("anim.update_data_paths", text="FCurve/Driver Version fix", icon='HELP')
|
||||
layout.separator()
|
||||
|
||||
@@ -1999,7 +1999,7 @@ static void WM_OT_quit_blender(wmOperatorType *ot)
|
||||
/* *********************** */
|
||||
#if defined(WIN32)
|
||||
static int console= 1;
|
||||
void WM_toggle_console(bContext *UNUSED(C), short show)
|
||||
void WM_console_toggle(bContext *UNUSED(C), short show)
|
||||
{
|
||||
if(show) {
|
||||
ShowWindow(GetConsoleWindow(),SW_SHOW);
|
||||
@@ -2011,24 +2011,24 @@ void WM_toggle_console(bContext *UNUSED(C), short show)
|
||||
}
|
||||
}
|
||||
|
||||
static int wm_toggle_console_op(bContext *C, wmOperator *UNUSED(op))
|
||||
static int wm_console_toggle_op(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
if(console) {
|
||||
WM_toggle_console(C, 0);
|
||||
WM_console_toggle(C, 0);
|
||||
}
|
||||
else {
|
||||
WM_toggle_console(C, 1);
|
||||
WM_console_toggle(C, 1);
|
||||
}
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
static void WM_OT_toggle_console(wmOperatorType *ot)
|
||||
static void WM_OT_console_toggle(wmOperatorType *ot)
|
||||
{
|
||||
ot->name= "Toggle System Console";
|
||||
ot->idname= "WM_OT_toggle_console";
|
||||
ot->idname= "WM_OT_console_toggle";
|
||||
ot->description= "Toggle System Console";
|
||||
|
||||
ot->exec= wm_toggle_console_op;
|
||||
ot->exec= wm_console_toggle_op;
|
||||
ot->poll= WM_operator_winactive;
|
||||
}
|
||||
#endif
|
||||
@@ -3112,7 +3112,7 @@ void wm_operatortype_init(void)
|
||||
WM_operatortype_append(WM_OT_search_menu);
|
||||
WM_operatortype_append(WM_OT_call_menu);
|
||||
#if defined(WIN32)
|
||||
WM_operatortype_append(WM_OT_toggle_console);
|
||||
WM_operatortype_append(WM_OT_console_toggle);
|
||||
#endif
|
||||
|
||||
#ifdef WITH_COLLADA
|
||||
|
||||
Reference in New Issue
Block a user