# HG changeset patch # User Dirk Olmes # Date 1412731583 -7200 # Node ID 040dce23204bc4b77523812a8267a951e10cf495 # Parent 09bde9fd3dd99c4bed89282cc4c23c9298ff0dad Make the log viewer window non-modal and closeable to avoid blocking the main window. This allows opening another connection while one is already running. diff -r 09bde9fd3dd9 -r 040dce23204b RemoteViewer/LogViewer.py --- a/RemoteViewer/LogViewer.py Tue Oct 07 04:15:59 2014 +0200 +++ b/RemoteViewer/LogViewer.py Wed Oct 08 03:26:23 2014 +0200 @@ -1,4 +1,4 @@ -from PyQt4.QtCore import pyqtSignal +from PyQt4.QtCore import Qt, pyqtSignal from PyQt4.QtGui import QDialog from .Ui_LogViewer import Ui_LogViewer @@ -8,8 +8,16 @@ def __init__(self): super(LogViewer, self).__init__() + self.__setupUi() + # make the dialog minimizable + self.setWindowFlags(self.windowFlags() & Qt.WindowMinimizeButtonHint) + self.__connectSignals() + + def __setupUi(self): self.ui = Ui_LogViewer() self.ui.setupUi(self) + + def __connectSignals(self): self.appendSignal.connect(self.ui.logText.appendPlainText) self.closeSignal.connect(self.close) diff -r 09bde9fd3dd9 -r 040dce23204b RemoteViewer/LogViewer.ui --- a/RemoteViewer/LogViewer.ui Tue Oct 07 04:15:59 2014 +0200 +++ b/RemoteViewer/LogViewer.ui Wed Oct 08 03:26:23 2014 +0200 @@ -17,6 +17,9 @@ :/icons/remote.png:/icons/remote.png + + true + diff -r 09bde9fd3dd9 -r 040dce23204b RemoteViewer/Viewer.py --- a/RemoteViewer/Viewer.py Tue Oct 07 04:15:59 2014 +0200 +++ b/RemoteViewer/Viewer.py Wed Oct 08 03:26:23 2014 +0200 @@ -52,10 +52,11 @@ logViewer = self.__createLogViewer() readThread = ReadThread(self.process, logViewer) readThread.start() - logViewer.exec_() + logViewer.show() def __createLogViewer(self): viewer = LogViewer() + viewer.setModal(False) viewer.setWindowTitle(self.connection.displayString()) command = 'running ' + ' '.join(self.command) + '\n' viewer.append(command)