Squish: Fix getToolTipForViewTab()

Shortcuts will change when order of modes changes.

Change-Id: I9ee71cefebd4f2404976a7728fd1c4b500efc0f9
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
Robert Loehning
2013-09-18 11:54:08 +02:00
parent b0f18491c9
commit 1abe32996c

View File

@@ -112,21 +112,22 @@ class ViewConstants:
@staticmethod @staticmethod
def getToolTipForViewTab(viewTab): def getToolTipForViewTab(viewTab):
if viewTab == ViewConstants.WELCOME: if viewTab == ViewConstants.WELCOME:
return ur'Switch to <b>Welcome</b> mode <span style="color: gray; font-size: small">(Ctrl\+|\u2303)1</span>' toolTip = ur'Switch to <b>Welcome</b> mode <span style="color: gray; font-size: small">(Ctrl\+|\u2303)%d</span>'
elif viewTab == ViewConstants.EDIT: elif viewTab == ViewConstants.EDIT:
return ur'Switch to <b>Edit</b> mode <span style="color: gray; font-size: small">(Ctrl\+|\u2303)2</span>' toolTip = ur'Switch to <b>Edit</b> mode <span style="color: gray; font-size: small">(Ctrl\+|\u2303)%d</span>'
elif viewTab == ViewConstants.DESIGN: elif viewTab == ViewConstants.DESIGN:
return ur'Switch to <b>Design</b> mode <span style="color: gray; font-size: small">(Ctrl\+|\u2303)3</span>' toolTip = ur'Switch to <b>Design</b> mode <span style="color: gray; font-size: small">(Ctrl\+|\u2303)%d</span>'
elif viewTab == ViewConstants.DEBUG: elif viewTab == ViewConstants.DEBUG:
return ur'Switch to <b>Debug</b> mode <span style="color: gray; font-size: small">(Ctrl\+|\u2303)4</span>' toolTip = ur'Switch to <b>Debug</b> mode <span style="color: gray; font-size: small">(Ctrl\+|\u2303)%d</span>'
elif viewTab == ViewConstants.PROJECTS: elif viewTab == ViewConstants.PROJECTS:
return ur'Switch to <b>Projects</b> mode <span style="color: gray; font-size: small">(Ctrl\+|\u2303)5</span>' toolTip = ur'Switch to <b>Projects</b> mode <span style="color: gray; font-size: small">(Ctrl\+|\u2303)%d</span>'
elif viewTab == ViewConstants.ANALYZE: elif viewTab == ViewConstants.ANALYZE:
return ur'Switch to <b>Analyze</b> mode <span style="color: gray; font-size: small">(Ctrl\+|\u2303)6</span>' toolTip = ur'Switch to <b>Analyze</b> mode <span style="color: gray; font-size: small">(Ctrl\+|\u2303)%d</span>'
elif viewTab == ViewConstants.HELP: elif viewTab == ViewConstants.HELP:
return ur'Switch to <b>Help</b> mode <span style="color: gray; font-size: small">(Ctrl\+|\u2303)7</span>' toolTip = ur'Switch to <b>Help</b> mode <span style="color: gray; font-size: small">(Ctrl\+|\u2303)%d</span>'
else: else:
return None return None
return toolTip % (viewTab + 1)
class SubprocessType: class SubprocessType:
QT_WIDGET=0 QT_WIDGET=0