Yuya Nishihara avatar Yuya Nishihara committed 3224aba

grep: move status bar to stand-alone dialog

Invisible since 9ee544e7504f. The contents margins are borrowed from
CommitDialog.

Comments (0)

Files changed (1)

tortoisehg/hgqt/grep.py

         self.searchhistory = [s for s in sh if s]
         self.setCompleters()
 
-        if parent:
-            mainvbox.setContentsMargins(0, 0, 0, 0)
-            self.setLayout(mainvbox)
-        else:
-            self.stbar = cmdui.ThgStatusBar()
-            mainvbox.setContentsMargins(5, 5, 5, 5)
-            outervbox = QVBoxLayout()
-            outervbox.addLayout(mainvbox)
-            outervbox.addWidget(self.stbar)
-            outervbox.setContentsMargins(0, 0, 0, 0)
-            self.setLayout(outervbox)
-            self.showMessage.connect(self.stbar.showMessage)
-            self.progress.connect(self.stbar.progress)
+        mainvbox.setContentsMargins(0, 0, 0, 0)
+        self.setLayout(mainvbox)
 
     @property
     def repo(self):
         self.setWindowFlags(Qt.Window)
         self.setWindowIcon(qtlib.geticon('view-filter'))
         self.setWindowTitle(_('TortoiseHg Search'))
-        self.setLayout(QVBoxLayout(self))
+
+        outervbox = QVBoxLayout()
+        outervbox.setContentsMargins(5, 5, 5, 0)
+        self.setLayout(outervbox)
         self._searchwidget = SearchWidget(repoagent, upats, parent=self, **opts)
-        self.layout().addWidget(self._searchwidget)
+        outervbox.addWidget(self._searchwidget)
+
+        self._stbar = cmdui.ThgStatusBar()
+        outervbox.addWidget(self._stbar)
+        self._searchwidget.showMessage.connect(self._stbar.showMessage)
+        self._searchwidget.progress.connect(self._stbar.progress)
+
         self.resize(800, 550)
 
     def closeEvent(self, event):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.