UI: Add initial context menus for Info and Console editors
Both keymaps are also updated
This commit is contained in:
@@ -125,6 +125,37 @@ class CONSOLE_MT_console(Menu):
|
||||
|
||||
layout.operator("console.autocomplete", text="Autocomplete")
|
||||
|
||||
class CONSOLE_MT_context_menu(Menu):
|
||||
bl_label = "Console Context Menu"
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator("console.clear")
|
||||
layout.operator("console.clear_line")
|
||||
layout.operator("console.delete", text="Delete Previous Word").type = 'PREVIOUS_WORD'
|
||||
layout.operator("console.delete", text="Delete Next Word").type = 'NEXT_WORD'
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("console.copy_as_script", text="Copy as Script")
|
||||
layout.operator("console.copy", text="Copy")
|
||||
layout.operator("console.paste", text="Paste")
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("console.indent")
|
||||
layout.operator("console.unindent")
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("console.history_cycle", text="Backward in History").reverse = True
|
||||
layout.operator("console.history_cycle", text="Forward in History").reverse = False
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("console.autocomplete", text="Autocomplete")
|
||||
|
||||
|
||||
def add_scrollback(text, text_type):
|
||||
for l in text.split("\n"):
|
||||
@@ -137,6 +168,7 @@ classes = (
|
||||
CONSOLE_MT_view,
|
||||
CONSOLE_MT_language,
|
||||
CONSOLE_MT_console,
|
||||
CONSOLE_MT_context_menu,
|
||||
)
|
||||
|
||||
if __name__ == "__main__": # only for live edit.
|
||||
|
||||
@@ -104,12 +104,22 @@ class INFO_MT_area(Menu):
|
||||
).use_hide_panels = True
|
||||
|
||||
|
||||
class INFO_MT_context_menu(Menu):
|
||||
bl_label = "Info Context Menu"
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator("info.report_copy", text="Copy")
|
||||
layout.operator("info.report_delete", text="Delete")
|
||||
|
||||
classes = (
|
||||
INFO_HT_header,
|
||||
INFO_MT_editor_menus,
|
||||
INFO_MT_area,
|
||||
INFO_MT_view,
|
||||
INFO_MT_info,
|
||||
INFO_MT_context_menu,
|
||||
)
|
||||
|
||||
if __name__ == "__main__": # only for live edit.
|
||||
|
||||
Reference in New Issue
Block a user