SF.net SVN: fclient: [600] trunk/fclient/src/fclient/Ui_ViewConnection.py
Status: Pre-Alpha
Brought to you by:
jurner
|
From: <jU...@us...> - 2008-07-12 19:59:18
|
Revision: 600
http://fclient.svn.sourceforge.net/fclient/?rev=600&view=rev
Author: jUrner
Date: 2008-07-12 12:59:24 -0700 (Sat, 12 Jul 2008)
Log Message:
-----------
beautify
Modified Paths:
--------------
trunk/fclient/src/fclient/Ui_ViewConnection.py
Modified: trunk/fclient/src/fclient/Ui_ViewConnection.py
===================================================================
--- trunk/fclient/src/fclient/Ui_ViewConnection.py 2008-07-12 19:58:48 UTC (rev 599)
+++ trunk/fclient/src/fclient/Ui_ViewConnection.py 2008-07-12 19:59:24 UTC (rev 600)
@@ -15,7 +15,6 @@
class Settings(config.SettingsBase):
_key_ = config.IdViewConnectionWidget
_settings_ = (
- #TODO: time secs vsmilis. should be either secs or milis. fix in fcp2.Client.connect
('ConnectionTimerTimeout', 'UInt', 800, config.SettingScopeExpert),
('ConnectionTimerMaxDuration', 'UInt', 20, config.SettingScopeExpert),
@@ -122,23 +121,20 @@
def retranslateUi(self, w):
Ui_ViewConnectionWidget.retranslateUi(self, w)
bt = self.controlById(self.IdBtConnect)
- if bt.isChecked():
- bt.setText(QtGui.QApplication.translate("ViewConnectionWidget", "Connect", None, QtGui.QApplication.UnicodeUTF8))
- else:
- bt.setText(QtGui.QApplication.translate("ViewConnectionWidget", "Disconnect", None, QtGui.QApplication.UnicodeUTF8))
+ bt.setText(self.trUtf8('Disconnect') if bt.isChecked() else self.trUtf8('Connect'))
+
#########################################
## event handlers
#########################################
- def handleBtConnectClicked(self, checked):
+ def handleBtConnectClicked(self, isChecked):
bt = self.controlById(self.IdBtConnect)
- if checked:
- bt.setText(QtGui.QApplication.translate("ViewConnectionWidget", "Disconnect", None, QtGui.QApplication.UnicodeUTF8))
+ bt.setText(self.trUtf8('Disconnect') if isChecked else self.trUtf8('Connect'))
+ if isChecked:
if config.fcpClient.isConnected():
config.fcpClient.close()
self._connectionTimer.start(self.settings)
else:
- bt.setText(QtGui.QApplication.translate("ViewConnectionWidget", "Connect", None, QtGui.QApplication.UnicodeUTF8))
self._connectionTimer.stop()
if config.fcpClient.isConnected():
config.fcpClient.close()
@@ -172,7 +168,6 @@
def objectName(self):
return 'ViewConnection'
-
def widget(self, parent):
if self._widget is None:
self._widget = ViewConnectionWidget(parent)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|