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:
Diffstat (limited to 'release/scripts/ui/space_text.py')
-rw-r--r--release/scripts/ui/space_text.py44
1 files changed, 9 insertions, 35 deletions
diff --git a/release/scripts/ui/space_text.py b/release/scripts/ui/space_text.py
index 552621d87c6..71ab6540132 100644
--- a/release/scripts/ui/space_text.py
+++ b/release/scripts/ui/space_text.py
@@ -140,6 +140,11 @@ class TEXT_MT_view(bpy.types.Menu):
layout.operator("screen.area_dupli")
layout.operator("screen.screen_full_area")
+
+ layout.separator()
+
+ layout.operator("text.move", text="Top of File").type = 'FILE_TOP'
+ layout.operator("text.move", text="Bottom of File").type = 'FILE_BOTTOM'
class TEXT_MT_text(bpy.types.Menu):
@@ -188,16 +193,6 @@ class TEXT_MT_templates(bpy.types.Menu):
self.path_menu(bpy.utils.script_paths("templates"), "text.open", {"internal": True})
-class TEXT_MT_edit_view(bpy.types.Menu):
- bl_label = "View"
-
- def draw(self, context):
- layout = self.layout
-
- layout.operator("text.move", text="Top of File").type = 'FILE_TOP'
- layout.operator("text.move", text="Bottom of File").type = 'FILE_BOTTOM'
-
-
class TEXT_MT_edit_select(bpy.types.Menu):
bl_label = "Select"
@@ -251,7 +246,8 @@ class TEXT_MT_edit_to3d(bpy.types.Menu):
class TEXT_MT_edit(bpy.types.Menu):
bl_label = "Edit"
- def poll(self, context):
+ @classmethod
+ def poll(cls, context):
return (context.space_data.text)
def draw(self, context):
@@ -268,7 +264,6 @@ class TEXT_MT_edit(bpy.types.Menu):
layout.separator()
- layout.menu("TEXT_MT_edit_view")
layout.menu("TEXT_MT_edit_select")
layout.menu("TEXT_MT_edit_markers")
@@ -297,33 +292,12 @@ class TEXT_MT_toolbox(bpy.types.Menu):
layout.operator("text.run_script")
-
-classes = [
- TEXT_HT_header,
- TEXT_PT_properties,
- TEXT_PT_find,
- TEXT_MT_view,
- TEXT_MT_text,
- TEXT_MT_templates,
- TEXT_MT_format,
- TEXT_MT_edit,
- TEXT_MT_edit_view,
- TEXT_MT_edit_select,
- TEXT_MT_edit_markers,
- TEXT_MT_edit_to3d,
- TEXT_MT_toolbox]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()