Merging r43501 through r43720 form trunk into soc-2011-tomato
[blender.git] / release / scripts / startup / bl_ui / space_dopesheet.py
index 580a4e7f1b62163980884c7dd118e9ae852d01d6..b7d69fb38b339e7420e74f9297df0b8a1888cfce 100644 (file)
@@ -20,7 +20,6 @@
 
 import bpy
 from bpy.types import Header, Menu
-from blf import gettext as _
 
 
 #######################################
@@ -118,7 +117,7 @@ class DOPESHEET_HT_header(Header):
                 row.menu("DOPESHEET_MT_gpencil_frame")
 
         layout.prop(st, "mode", text="")
-        layout.prop(st.dopesheet, "show_summary", text=_("Summary"))
+        layout.prop(st.dopesheet, "show_summary", text="Summary")
 
         if st.mode == 'DOPESHEET':
             dopesheet_filter(layout, context)
@@ -153,10 +152,7 @@ class DOPESHEET_MT_view(Menu):
         layout.prop(st, "use_auto_merge_keyframes")
         layout.prop(st, "use_marker_sync")
 
-        if st.show_seconds:
-            layout.operator("anim.time_toggle", text=_("Show Frames"))
-        else:
-            layout.operator("anim.time_toggle", text=_("Show Seconds"))
+        layout.prop(st, "show_seconds")
 
         layout.separator()
         layout.operator("anim.previewrange_set")
@@ -180,23 +176,23 @@ class DOPESHEET_MT_select(Menu):
         layout = self.layout
 
         # This is a bit misleading as the operator's default text is "Select All" while it actually *toggles* All/None
-        layout.operator("action.select_all_toggle")
-        layout.operator("action.select_all_toggle", text=_("Invert Selection")).invert = True
+        layout.operator("action.select_all_toggle").invert = False
+        layout.operator("action.select_all_toggle", text="Invert Selection").invert = True
 
         layout.separator()
-        layout.operator("action.select_border")
-        layout.operator("action.select_border", text=_("Border Axis Range")).axis_range = True
+        layout.operator("action.select_border").axis_range = False
+        layout.operator("action.select_border", text="Border Axis Range").axis_range = True
 
         layout.separator()
-        layout.operator("action.select_column", text=_("Columns on Selected Keys")).mode = 'KEYS'
-        layout.operator("action.select_column", text=_("Column on Current Frame")).mode = 'CFRA'
+        layout.operator("action.select_column", text="Columns on Selected Keys").mode = 'KEYS'
+        layout.operator("action.select_column", text="Column on Current Frame").mode = 'CFRA'
 
-        layout.operator("action.select_column", text=_("Columns on Selected Markers")).mode = 'MARKERS_COLUMN'
-        layout.operator("action.select_column", text=_("Between Selected Markers")).mode = 'MARKERS_BETWEEN'
+        layout.operator("action.select_column", text="Columns on Selected Markers").mode = 'MARKERS_COLUMN'
+        layout.operator("action.select_column", text="Between Selected Markers").mode = 'MARKERS_BETWEEN'
 
         layout.separator()
-        layout.operator("action.select_leftright", text=_("Before Current Frame")).mode = 'LEFT'
-        layout.operator("action.select_leftright", text=_("After Current Frame")).mode = 'RIGHT'
+        layout.operator("action.select_leftright", text="Before Current Frame").mode = 'LEFT'
+        layout.operator("action.select_leftright", text="After Current Frame").mode = 'RIGHT'
 
         # FIXME: grease pencil mode isn't supported for these yet, so skip for that mode only
         if context.space_data.mode != 'GPENCIL':
@@ -214,18 +210,10 @@ class DOPESHEET_MT_marker(Menu):
     def draw(self, context):
         layout = self.layout
 
-        st = context.space_data
-
-        #layout.operator_context = 'EXEC_REGION_WIN'
-
-        layout.operator("marker.add", _("Add Marker"))
-        layout.operator("marker.duplicate", text=_("Duplicate Marker"))
-        layout.operator("marker.delete", text=_("Delete Marker"))
+        from .space_time import marker_menu_generic
+        marker_menu_generic(layout)
 
-        layout.separator()
-
-        layout.operator("marker.rename", text=_("Rename Marker"))
-        layout.operator("marker.move", text=_("Grab/Move Marker"))
+        st = context.space_data
 
         if st.mode in {'ACTION', 'SHAPEKEY'} and st.action:
             layout.separator()
@@ -255,14 +243,14 @@ class DOPESHEET_MT_channel(Menu):
 
         layout.separator()
         layout.operator("anim.channels_editable_toggle")
-        layout.operator_menu_enum("action.extrapolation_type", "type", text=_("Extrapolation Mode"))
+        layout.operator_menu_enum("action.extrapolation_type", "type", text="Extrapolation Mode")
 
         layout.separator()
         layout.operator("anim.channels_expand")
         layout.operator("anim.channels_collapse")
 
         layout.separator()
-        layout.operator_menu_enum("anim.channels_move", "direction", text=_("Move..."))
+        layout.operator_menu_enum("anim.channels_move", "direction", text="Move...")
 
         layout.separator()
         layout.operator("anim.channels_fcurves_enable")
@@ -274,10 +262,10 @@ class DOPESHEET_MT_key(Menu):
     def draw(self, context):
         layout = self.layout
 
-        layout.menu("DOPESHEET_MT_key_transform", text=_("Transform"))
+        layout.menu("DOPESHEET_MT_key_transform", text="Transform")
 
-        layout.operator_menu_enum("action.snap", "type", text=_("Snap"))
-        layout.operator_menu_enum("action.mirror", "type", text=_("Mirror"))
+        layout.operator_menu_enum("action.snap", "type", text="Snap")
+        layout.operator_menu_enum("action.mirror", "type", text="Mirror")
 
         layout.separator()
         layout.operator("action.keyframe_insert")
@@ -287,9 +275,9 @@ class DOPESHEET_MT_key(Menu):
         layout.operator("action.delete")
 
         layout.separator()
-        layout.operator_menu_enum("action.keyframe_type", "type", text=_("Keyframe Type"))
-        layout.operator_menu_enum("action.handle_type", "type", text=_("Handle Type"))
-        layout.operator_menu_enum("action.interpolation_type", "type", text=_("Interpolation Mode"))
+        layout.operator_menu_enum("action.keyframe_type", "type", text="Keyframe Type")
+        layout.operator_menu_enum("action.handle_type", "type", text="Handle Type")
+        layout.operator_menu_enum("action.interpolation_type", "type", text="Interpolation Mode")
 
         layout.separator()
         layout.operator("action.clean")
@@ -306,10 +294,10 @@ class DOPESHEET_MT_key_transform(Menu):
     def draw(self, context):
         layout = self.layout
 
-        layout.operator("transform.transform", text=_("Grab/Move")).mode = 'TIME_TRANSLATE'
-        layout.operator("transform.transform", text=_("Extend")).mode = 'TIME_EXTEND'
-        layout.operator("transform.transform", text=_("Slide")).mode = 'TIME_SLIDE'
-        layout.operator("transform.transform", text=_("Scale")).mode = 'TIME_SCALE'
+        layout.operator("transform.transform", text="Grab/Move").mode = 'TIME_TRANSLATE'
+        layout.operator("transform.transform", text="Extend").mode = 'TIME_EXTEND'
+        layout.operator("transform.transform", text="Slide").mode = 'TIME_SLIDE'
+        layout.operator("transform.transform", text="Scale").mode = 'TIME_SCALE'
 
 
 #######################################
@@ -348,7 +336,7 @@ class DOPESHEET_MT_gpencil_frame(Menu):
     def draw(self, context):
         layout = self.layout
 
-        layout.menu("DOPESHEET_MT_key_transform", text=_("Transform"))
+        layout.menu("DOPESHEET_MT_key_transform", text="Transform")
 
         #layout.operator_menu_enum("action.snap", "type", text="Snap")
         #layout.operator_menu_enum("action.mirror", "type", text="Mirror")