bugfix [#23174] Text Editor: View Top of File and View Bottom of File not working...
authorCampbell Barton <ideasman42@gmail.com>
Tue, 3 Aug 2010 22:41:01 +0000 (22:41 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 3 Aug 2010 22:41:01 +0000 (22:41 +0000)
also moved these into the View menu (removed Edit->View)

release/scripts/ui/space_text.py
source/blender/editors/space_text/space_text.c

index 29a5674d377b7e8710e75dcdeeb79f02bb0330a0..85c2b43859dff0c8ab4c95203150b3d6d059dc31 100644 (file)
@@ -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"
 
@@ -268,7 +263,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")
 
index 7f3741e8e178d3016de3a15dda55e02853db15ef..bbea5bce2268ec2eb2d6f7bf224d5fe98dc08ec1 100644 (file)
@@ -274,6 +274,8 @@ static void text_keymap(struct wmKeyConfig *keyconf)
        RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move", DOWNARROWKEY, KM_PRESS, 0, 0)->ptr, "type", NEXT_LINE);
        RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move", PAGEUPKEY, KM_PRESS, 0, 0)->ptr, "type", PREV_PAGE);
        RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move", PAGEDOWNKEY, KM_PRESS, 0, 0)->ptr, "type", NEXT_PAGE);
+       RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move", HOMEKEY, KM_PRESS, KM_CTRL, 0)->ptr, "type", FILE_TOP);
+       RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move", ENDKEY, KM_PRESS, KM_CTRL, 0)->ptr, "type", FILE_BOTTOM);
 
        RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", HOMEKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", LINE_BEGIN);
        RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", ENDKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", LINE_END);
@@ -285,6 +287,8 @@ static void text_keymap(struct wmKeyConfig *keyconf)
        RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", DOWNARROWKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", NEXT_LINE);
        RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", PAGEUPKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", PREV_PAGE);
        RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", PAGEDOWNKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", NEXT_PAGE);
+       RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", HOMEKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0)->ptr, "type", FILE_TOP);
+       RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", ENDKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0)->ptr, "type", FILE_BOTTOM);
 
        RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_delete", DELKEY, KM_PRESS, 0, 0)->ptr, "type", DEL_NEXT_CHAR);
        RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_delete", DKEY, KM_PRESS, KM_CTRL, 0)->ptr, "type", DEL_NEXT_CHAR);