revert removal of ternary operators from r54414

This commit is contained in:
Campbell Barton 2013-02-10 08:26:48 +00:00
parent d65135ed93
commit 63af7068ad
2 changed files with 13 additions and 11 deletions

@ -313,11 +313,9 @@ class CLIP_PT_tools_solve(CLIP_PT_tracking_panel, Panel):
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 @@ class CLIP_MT_view(Menu):
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'

@ -73,13 +73,15 @@ class TEXT_HT_header(Header):
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):