[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54421] trunk/blender/release/scripts/ startup/bl_ui: revert removal of ternary operators from r54414

Campbell Barton ideasman42 at gmail.com
Sun Feb 10 09:26:48 CET 2013


Revision: 54421
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54421
Author:   campbellbarton
Date:     2013-02-10 08:26:48 +0000 (Sun, 10 Feb 2013)
Log Message:
-----------
revert removal of ternary operators from r54414

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54414

Modified Paths:
--------------
    trunk/blender/release/scripts/startup/bl_ui/space_clip.py
    trunk/blender/release/scripts/startup/bl_ui/space_text.py

Modified: trunk/blender/release/scripts/startup/bl_ui/space_clip.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_clip.py	2013-02-10 08:21:39 UTC (rev 54420)
+++ trunk/blender/release/scripts/startup/bl_ui/space_clip.py	2013-02-10 08:26:48 UTC (rev 54421)
@@ -313,11 +313,9 @@
 
         col = layout.column(align=True)
 
-        # Note: avoid complex code in "text" values, they can't be handled right by i18n messages extractor script!
-        if tracking_object.is_camera:
-            col.operator("clip.solve_camera", text="Camera Motion")
-        else:
-            col.operator("clip.solve_camera", text="Object Motion")
+        col.operator("clip.solve_camera",
+                     text="Camera Motion" if tracking_object.is_camera
+                     else "Object Motion")
         col.operator("clip.clear_solution")
 
         col = layout.column()
@@ -911,7 +909,9 @@
 
             text = bpy.app.translations.pgettext("Zoom %d:%d")
             for a, b in ratios:
-                layout.operator("clip.view_zoom_ratio", text=text % (a, b), translate=False).ratio = a / b
+                layout.operator("clip.view_zoom_ratio",
+                                text=text % (a, b),
+                                translate=False).ratio = a / b
         else:
             if sc.view == 'GRAPH':
                 layout.operator_context = 'INVOKE_REGION_PREVIEW'

Modified: trunk/blender/release/scripts/startup/bl_ui/space_text.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_text.py	2013-02-10 08:21:39 UTC (rev 54420)
+++ trunk/blender/release/scripts/startup/bl_ui/space_text.py	2013-02-10 08:26:48 UTC (rev 54421)
@@ -73,13 +73,15 @@
             if text.filepath:
                 pgettext = bpy.app.translations.pgettext
                 if text.is_dirty:
-                    row.label(text=pgettext("File: *%r (unsaved)") % text.filepath, translate=False)
+                    row.label(text=pgettext("File: *%r (unsaved)") %
+                              text.filepath, translate=False)
                 else:
-                    row.label(text=pgettext("File: %r") % text.filepath, translate=False)
-            elif text.library:
-                row.label(text="Text: External")
+                    row.label(text=pgettext("File: %r") %
+                              text.filepath, translate=False)
             else:
-                row.label(text="Text: Internal")
+                row.label(text="Text: External"
+                          if text.library
+                          else "Text: Internal")
 
 
 class TEXT_PT_properties(Panel):




More information about the Bf-blender-cvs mailing list