1. Yuya Nishihara
  2. thg-qt-mq

Commits

Yuya Nishihara  committed fd363f1

console patches refined

  • Participants
  • Parent commits 6ec638e
  • Branches default

Comments (0)

Files changed (4)

File console-per-repo.diff

View file
  • Ignore whitespace
 # Parent 1f958c0d2f4a1ca0fecce10c209abca72ead1a37
 docklog: assign console per repository (closes #120)
 
+This change works well in most cases. But if Mercurial command is running in
+inactive repository tab, its output is sent to wrong console. This bug will
+be fixed later by using new repository access layer.
+
 diff --git a/tortoisehg/hgqt/docklog.py b/tortoisehg/hgqt/docklog.py
 --- a/tortoisehg/hgqt/docklog.py
 +++ b/tortoisehg/hgqt/docklog.py

File console-stack.diff

View file
  • Ignore whitespace
 # HG changeset patch
 # Date 1372860751 -32400
-# Parent 52786d24054ea7e1f2027617ed1fbb0ebf736ae7
+# Parent ec8fe73a009c09bfc9835b9ced703c6fa89b8883
 docklog: insert QStackedWidget as stub for per-repository console (refs #120)
 
 diff --git a/tortoisehg/hgqt/docklog.py b/tortoisehg/hgqt/docklog.py
 --- a/tortoisehg/hgqt/docklog.py
 +++ b/tortoisehg/hgqt/docklog.py
-@@ -552,10 +552,9 @@ class LogDockWidget(QDockWidget):
-         # Not enabled until we have a way to make it configurable
+@@ -553,10 +553,9 @@ class LogDockWidget(QDockWidget):
          #self.setWindowFlags(Qt.Drawer)
+         self.dockLocationChanged.connect(self._updateTitleBarStyle)
  
 -        self.logte = ConsoleWidget(self)
 -        self.logte.closeRequested.connect(self.close)
  
          # move focus only when console is activated by keyboard/mouse operation
          self.toggleViewAction().triggered.connect(self._setFocusOnToggleView)
-@@ -563,6 +562,17 @@ class LogDockWidget(QDockWidget):
+@@ -564,6 +563,17 @@ class LogDockWidget(QDockWidget):
      def setRepository(self, repo):
          self.logte.setRepository(repo)
  

File console-vertical.diff

View file
  • Ignore whitespace
 # HG changeset patch
-# Parent ad071c45220f4c25697a5b5660a90ee40f77c921
+# Date 1372863620 -32400
+# Parent 52786d24054ea7e1f2027617ed1fbb0ebf736ae7
+docklog: move title bar to left if console is spanned horizontally
+
+It saves precious vertical space.
+
 diff --git a/tortoisehg/hgqt/docklog.py b/tortoisehg/hgqt/docklog.py
 --- a/tortoisehg/hgqt/docklog.py
 +++ b/tortoisehg/hgqt/docklog.py
-@@ -553,7 +553,8 @@ class LogDockWidget(QDockWidget):
- 
-         self.setFeatures(QDockWidget.DockWidgetClosable |
-                          QDockWidget.DockWidgetMovable  |
--                         QDockWidget.DockWidgetFloatable)
-+                         QDockWidget.DockWidgetFloatable|
-+                         QDockWidget.DockWidgetVerticalTitleBar)
+@@ -551,6 +551,7 @@ class LogDockWidget(QDockWidget):
          self.setWindowTitle(_('Output Log'))
          # Not enabled until we have a way to make it configurable
          #self.setWindowFlags(Qt.Drawer)
++        self.dockLocationChanged.connect(self._updateTitleBarStyle)
+ 
+         self.logte = ConsoleWidget(self)
+         self.logte.closeRequested.connect(self.close)
+@@ -589,3 +590,12 @@ class LogDockWidget(QDockWidget):
+         super(LogDockWidget, self).setVisible(visible)
+         if visible:
+             self.raise_()
++
++    @pyqtSlot(Qt.DockWidgetArea)
++    def _updateTitleBarStyle(self, area):
++        f = self.features()
++        if area & (Qt.TopDockWidgetArea | Qt.BottomDockWidgetArea):
++            f |= QDockWidget.DockWidgetVerticalTitleBar  # save vertical space
++        else:
++            f &= ~QDockWidget.DockWidgetVerticalTitleBar
++        self.setFeatures(f)

File series

View file
  • Ignore whitespace
+console-vertical.diff
 console-stack.diff
 console-per-repo.diff
-console-vertical.diff
 refreshwctx-trace.diff
 wbatext-abrt.diff
 wb-openrepo-trace.diff