Ui Scripts:
authorThomas Dinges <blender@dingto.org>
Fri, 30 Jul 2010 14:56:17 +0000 (14:56 +0000)
committerThomas Dinges <blender@dingto.org>
Fri, 30 Jul 2010 14:56:17 +0000 (14:56 +0000)
* Made a "View" Menu in the Text Editor, these settings don't belong into a "Text" Menu.
* Added "Properties" Operator into the VSE "View" menu.

release/scripts/ui/space_sequencer.py
release/scripts/ui/space_text.py

index 74de55b317a1101422f676e3ca13f2ec570aef4f..adf80635bc1cae7977b13e6d348cac96aeef765b 100644 (file)
@@ -98,6 +98,10 @@ class SEQUENCER_MT_view(bpy.types.Menu):
         st = context.space_data
 
         layout.column()
+        
+        layout.operator("sequencer.properties", icon='MENU_PANEL')
+        
+        layout.separator()
 
         """
     uiBlock *block= uiBeginBlock(C, ar, "seq_viewmenu", UI_EMBOSSP);
@@ -127,7 +131,6 @@ class SEQUENCER_MT_view(bpy.types.Menu):
              menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
 
         """
-        layout.separator()
         if (st.view_type == 'SEQUENCER') or (st.view_type == 'SEQUENCER_PREVIEW'):
             layout.operator("sequencer.view_all", text='View all Sequences')
         if (st.view_type == 'PREVIEW') or (st.view_type == 'SEQUENCER_PREVIEW'):
index 692f1581bd6b7d7b59d0592256740b19f5756b66..552621d87c6cfbca6317f85ccba3686b3c089dfe 100644 (file)
@@ -34,6 +34,7 @@ class TEXT_HT_header(bpy.types.Header):
 
         if context.area.show_menus:
             sub = row.row(align=True)
+            sub.menu("TEXT_MT_view")
             sub.menu("TEXT_MT_text")
             if text:
                 sub.menu("TEXT_MT_edit")
@@ -127,6 +128,20 @@ class TEXT_PT_find(bpy.types.Panel):
         row.prop(st, "find_all", text="All")
 
 
+class TEXT_MT_view(bpy.types.Menu):
+    bl_label = "View"
+    
+    def draw(self, context):
+        layout = self.layout
+        
+        layout.operator("text.properties", icon='MENU_PANEL')
+        
+        layout.separator()
+
+        layout.operator("screen.area_dupli")
+        layout.operator("screen.screen_full_area")
+        
+        
 class TEXT_MT_text(bpy.types.Menu):
     bl_label = "Text"
 
@@ -160,15 +175,8 @@ class TEXT_MT_text(bpy.types.Menu):
 
         layout.separator()
 
-        layout.operator("text.properties", icon='MENU_PANEL')
-
         layout.menu("TEXT_MT_templates")
 
-        layout.separator()
-
-        layout.operator("screen.area_dupli")
-        layout.operator("screen.screen_full_area")
-
 
 class TEXT_MT_templates(bpy.types.Menu):
     '''
@@ -294,6 +302,7 @@ classes = [
     TEXT_HT_header,
     TEXT_PT_properties,
     TEXT_PT_find,
+    TEXT_MT_view,
     TEXT_MT_text,
     TEXT_MT_templates,
     TEXT_MT_format,