Remove redundant SHOW_BUTTON_LABELS code, and set ready checkbox sooner

This commit is contained in:
Et0h 2015-01-22 21:53:07 +00:00
parent 14deec4db5
commit 09fb34bd9f
3 changed files with 4 additions and 8 deletions

View File

@ -13,7 +13,6 @@ RECENT_CLIENT_THRESHOLD = "1.2.9" #This and higher considered 'recent' clients
WARN_OLD_CLIENTS = True #Use MOTD to inform old clients to upgrade
LIST_RELATIVE_CONFIGS = True # Print list of relative configs loaded
SHOW_CONTACT_INFO = True # Displays dev contact details below list in GUI
SHOW_BUTTON_LABELS = True # If disabled, only shows icons for main GUI buttons
SHOW_TOOLTIPS = True
WARN_ABOUT_MISSING_STRINGS = False # (If debug mode is enabled)
FALLBACK_INITIAL_LANGUAGE = "en"

View File

@ -1059,9 +1059,6 @@ def isValidLanguage(language):
return messages.has_key(language)
def getMessage(type_, locale=None):
if constants.SHOW_BUTTON_LABELS == False:
if "-guibuttonlabel" in type_:
return ""
if constants.SHOW_TOOLTIPS == False:
if "-tooltip" in type_:
return ""

View File

@ -76,10 +76,8 @@ class MainWindow(QtGui.QMainWindow):
self.roomInput.setText(self._syncplayClient.getRoom())
self.config = self._syncplayClient.getConfig()
try:
if not constants.SHOW_BUTTON_LABELS:
self.hideRoomSeekLabels()
self.hideMiscLabels()
except ():
self.updateReadyState(self.config['readyAtStart'])
except:
pass
self.automaticUpdateCheck()
@ -204,7 +202,9 @@ class MainWindow(QtGui.QMainWindow):
def updateReadyState(self, newState):
oldState = self.readyPushButton.isChecked()
if newState != oldState and newState != None:
self.readyPushButton.blockSignals(True)
self.readyPushButton.setChecked(newState)
self.readyPushButton.blockSignals(False)
self.updateReadyIcon()
def roomClicked(self, item):