Info Header:

* Added a new window submenu, which contains operators for duplicating the window, going fullscreen and toggling the system console on Windows.
* Removed the Toggle fullscreen button from the header, its available via menu or shortcut (ALT+F11). 

Based on patch [#24709] Window menu added to Info menus by Elia Sarti (vekoon). Thanks!
This commit is contained in:
Thomas Dinges
2012-04-30 19:37:04 +00:00
parent 1d743d11dc
commit f4f52d4a17

View File

@@ -42,6 +42,7 @@ class INFO_HT_header(Header):
sub.menu("INFO_MT_game")
else:
sub.menu("INFO_MT_render")
sub.menu("INFO_MT_window")
sub.menu("INFO_MT_help")
if window.screen.show_fullscreen:
@@ -66,9 +67,6 @@ class INFO_HT_header(Header):
row.operator("wm.splash", text="", icon='BLENDER', emboss=False)
row.label(text=scene.statistics())
# XXX: this should be right-aligned to the RHS of the region
layout.operator("wm.window_fullscreen_toggle", icon='FULLSCREEN_ENTER', text="")
# XXX: BEFORE RELEASE, MOVE FILE MENU OUT OF INFO!!!
"""
sinfo = context.space_data
@@ -350,19 +348,30 @@ class INFO_MT_render(Menu):
layout.operator("render.view_show")
layout.operator("render.play_rendered_anim")
class INFO_MT_window(bpy.types.Menu):
bl_label = "Window"
def draw(self, context):
import sys
layout = self.layout
layout.operator("wm.window_duplicate")
layout.operator("wm.window_fullscreen_toggle", icon='FULLSCREEN_ENTER')
if sys.platform[:3] == "win":
layout.separator()
layout.operator("wm.console_toggle", icon='CONSOLE')
class INFO_MT_help(Menu):
bl_label = "Help"
def draw(self, context):
import sys
layout = self.layout
layout.operator("wm.url_open", text="Manual", icon='HELP').url = 'http://wiki.blender.org/index.php/Doc:2.6/Manual'
layout.operator("wm.url_open", text="Release Log", icon='URL').url = 'http://www.blender.org/development/release-logs/blender-263/'
layout.separator()
layout.operator("wm.url_open", text="Blender Website", icon='URL').url = 'http://www.blender.org/'
@@ -377,12 +386,10 @@ class INFO_MT_help(Menu):
layout.operator("wm.operator_cheat_sheet", icon='TEXT')
layout.operator("wm.sysinfo", icon='TEXT')
layout.separator()
if sys.platform[:3] == "win":
layout.operator("wm.console_toggle", icon='CONSOLE')
layout.separator()
layout.operator("anim.update_data_paths", text="FCurve/Driver Version fix", icon='HELP')
layout.operator("logic.texface_convert", text="TexFace to Material Convert", icon='GAME')
layout.separator()
layout.operator("wm.splash", icon='BLENDER')
if __name__ == "__main__": # only for live edit.