summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-07-12 13:29:44 -0300
committerTomás Touceda <chiiph@leap.se>2013-07-12 13:29:44 -0300
commit5c22d5cc2af8693592670b1838a42511bdfeaf3c (patch)
tree8db3394ee81835cbf81cb860f5f0019da72bf58f
parent55f7638041a66cfd94baf49df947e71e50bedd3a (diff)
parent96b8e05b98ebeb7645f53be6c0116c3212fa6b20 (diff)
Merge remote-tracking branch 'ivan/bug/3152_logger-window-toggle-fix' into develop
-rw-r--r--changes/bug-3152_logger-window-toggle1
-rw-r--r--src/leap/gui/loggerwindow.py4
-rw-r--r--src/leap/gui/mainwindow.py9
3 files changed, 12 insertions, 2 deletions
diff --git a/changes/bug-3152_logger-window-toggle b/changes/bug-3152_logger-window-toggle
new file mode 100644
index 00000000..b282e1e5
--- /dev/null
+++ b/changes/bug-3152_logger-window-toggle
@@ -0,0 +1 @@
+ o Bugfix: logger window's toggle button reflects window state. Closes #3152.
diff --git a/src/leap/gui/loggerwindow.py b/src/leap/gui/loggerwindow.py
index dc1e273d..4d24a7d8 100644
--- a/src/leap/gui/loggerwindow.py
+++ b/src/leap/gui/loggerwindow.py
@@ -28,7 +28,7 @@ from leap.util.leap_log_handler import LeapLogHandler
logger = logging.getLogger(__name__)
-class LoggerWindow(QtGui.QWidget):
+class LoggerWindow(QtGui.QDialog):
"""
Window that displays a history of the logged messages in the app.
"""
@@ -39,7 +39,7 @@ class LoggerWindow(QtGui.QWidget):
:param handler: Custom handler that supports history and signal.
:type handler: LeapLogHandler.
"""
- QtGui.QWidget.__init__(self)
+ QtGui.QDialog.__init__(self)
leap_assert(handler, "We need a handler for the logger window")
leap_assert_type(handler, LeapLogHandler)
diff --git a/src/leap/gui/mainwindow.py b/src/leap/gui/mainwindow.py
index 4874de80..ba546fd0 100644
--- a/src/leap/gui/mainwindow.py
+++ b/src/leap/gui/mainwindow.py
@@ -369,6 +369,15 @@ class MainWindow(QtGui.QMainWindow):
self._logger_window.setVisible(not self._logger_window.isVisible())
self.ui.btnShowLog.setChecked(self._logger_window.isVisible())
+ self._logger_window.finished.connect(self._uncheck_logger_button)
+
+ def _uncheck_logger_button(self):
+ """
+ SLOT
+ Sets the checked state of the loggerwindow button to false.
+ """
+ self.ui.btnShowLog.setChecked(False)
+
def _new_updates_available(self, req):
"""
Callback for the new updates event