# HG changeset patch # User Dirk Olmes # Date 1411183664 -7200 # Node ID 8e2271761d28feaaa3982680c5b3b58d58db79f6 # Parent 369bc16e74410ee8e8f362ba7516f8d0e93fcc4b pass the window title as argument to ConnectionDialog diff -r 369bc16e7441 -r 8e2271761d28 RemoteViewer/ConnectionDialog.py --- a/RemoteViewer/ConnectionDialog.py Sat Sep 20 05:25:30 2014 +0200 +++ b/RemoteViewer/ConnectionDialog.py Sat Sep 20 05:27:44 2014 +0200 @@ -3,18 +3,19 @@ from .Ui_ConnectionDialog import Ui_ConnectionDialog class ConnectionDialog(QDialog): - def __init__(self): + def __init__(self, windowTitle=''): super(QDialog, self).__init__() self.__initDefaultValues() - self.__initUi() + self.__initUi(windowTitle) self.__connectConnection() def __initDefaultValues(self): self.connection = Connection() - def __initUi(self): + def __initUi(self, windowTitle): self.ui = Ui_ConnectionDialog() self.ui.setupUi(self) + self.setWindowTitle(windowTitle) self.ui.type.addItem('rdp') self.ui.type.addItem('vnc') diff -r 369bc16e7441 -r 8e2271761d28 RemoteViewer/RemoteViewer.py --- a/RemoteViewer/RemoteViewer.py Sat Sep 20 05:25:30 2014 +0200 +++ b/RemoteViewer/RemoteViewer.py Sat Sep 20 05:27:44 2014 +0200 @@ -24,9 +24,7 @@ @ExceptionSafeSlot() def newConnection(self): - # TODO: make the window title a ctor argument - dialog = ConnectionDialog() - dialog.setWindowTitle('New Connection') + dialog = ConnectionDialog('New Connection') success = dialog.exec_() if success: connection = dialog.connection