[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdegames/kajongg/src
From: Wolfgang Rohdewald <wolfgang () rohdewald ! de>
Date: 2012-03-23 8:05:50
Message-ID: 20120323080550.0EB2EAC89D () svn ! kde ! org
[Download RAW message or body]
SVN commit 1286779 by wrohdewald:
TablesList: correctly enable/disable buttons
at startup, too many buttons were enabled
M +7 -2 tables.py
--- trunk/KDE/kdegames/kajongg/src/tables.py #1286778:1286779
@@ -249,8 +249,12 @@
def afterLogin(self):
"""callback after the server answered our login request"""
if self.client and self.client.perspective:
+ self.updateButtonsForTable(None)
for tList in InternalParameters.field.tableLists:
- if tList != self and tList.isVisible() and tList.client.url == self.client.url:
+ if (tList != self
+ and tList.isVisible()
+ and tList.client
+ and tList.client.url == self.client.url):
tList.activateWindow()
self.hideForever = True
InternalParameters.field.tableLists.remove(self)
@@ -305,7 +309,7 @@
self.newButton.setToolTip(m18n("Allocate a new table"))
self.joinButton.setText(m18n('&Join'))
self.joinButton.setToolTip(m18n("Join a table"))
- self.leaveButton.setEnabled(not self.joinButton.isEnabled())
+ self.leaveButton.setEnabled(hasTable and not self.joinButton.isEnabled())
self.startButton.setEnabled(not suspendedLocalGame and hasTable \
and self.client.username == table.playerNames[0])
self.compareButton.setEnabled(hasTable and table.myRuleset is None)
@@ -355,6 +359,7 @@
self.__wantedGame()).addCallback(self.newLocalTable)
else:
self.loadTables(clientTables)
+ self.selectTable(0)
self.show()
def selectedTable(self):
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic