mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
Button to switch back to scan panel results
This commit is contained in:
parent
9fff268150
commit
31555eba05
@ -30,6 +30,7 @@ class FTSDialog(Dialog):
|
|||||||
self.scan_status = ss = ScanStatus(self)
|
self.scan_status = ss = ScanStatus(self)
|
||||||
ss.switch_to_search_panel.connect(self.show_results_panel)
|
ss.switch_to_search_panel.connect(self.show_results_panel)
|
||||||
self.results_panel = rp = ResultsPanel(self)
|
self.results_panel = rp = ResultsPanel(self)
|
||||||
|
rp.switch_to_scan_panel.connect(self.show_scan_status)
|
||||||
s.addWidget(ss), s.addWidget(rp)
|
s.addWidget(ss), s.addWidget(rp)
|
||||||
if ss.indexing_progress.almost_complete:
|
if ss.indexing_progress.almost_complete:
|
||||||
self.show_results_panel()
|
self.show_results_panel()
|
||||||
|
@ -76,7 +76,10 @@ class ScanProgress(QWidget):
|
|||||||
l.addWidget(la)
|
l.addWidget(la)
|
||||||
self.switch_anyway = sa = QPushButton(self)
|
self.switch_anyway = sa = QPushButton(self)
|
||||||
sa.clicked.connect(self.switch_to_search_panel)
|
sa.clicked.connect(self.switch_to_search_panel)
|
||||||
l.addWidget(sa)
|
h = QHBoxLayout()
|
||||||
|
h.setContentsMargins(0, 0, 0, 0)
|
||||||
|
h.addWidget(sa), h.addStretch(10)
|
||||||
|
l.addLayout(h)
|
||||||
|
|
||||||
def change_speed(self):
|
def change_speed(self):
|
||||||
db = get_db()
|
db = get_db()
|
||||||
|
@ -598,6 +598,8 @@ class LeftPanel(QWidget):
|
|||||||
|
|
||||||
class ResultsPanel(QWidget):
|
class ResultsPanel(QWidget):
|
||||||
|
|
||||||
|
switch_to_scan_panel = pyqtSignal()
|
||||||
|
|
||||||
def __init__(self, parent=None):
|
def __init__(self, parent=None):
|
||||||
super().__init__(parent)
|
super().__init__(parent)
|
||||||
if isinstance(parent, QDialog):
|
if isinstance(parent, QDialog):
|
||||||
@ -630,6 +632,7 @@ class ResultsPanel(QWidget):
|
|||||||
def specialize_button_box(self, bb):
|
def specialize_button_box(self, bb):
|
||||||
bb.clear()
|
bb.clear()
|
||||||
bb.addButton(QDialogButtonBox.StandardButton.Close)
|
bb.addButton(QDialogButtonBox.StandardButton.Close)
|
||||||
|
bb.addButton(_('Show &indexing status'), QDialogButtonBox.ButtonRole.ActionRole).clicked.connect(self.switch_to_scan_panel)
|
||||||
|
|
||||||
def clear_results(self):
|
def clear_results(self):
|
||||||
self.results_view.m.clear_results()
|
self.results_view.m.clear_results()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user