Simplify gui (#570)
* Make toolbar and log views non-hideable * Remove most action-based menu entries, encourage user to use toolbar * Remove slot disconnection (It appears to not be necessary with PySide2 and causes exceptions to be thrown) * Various other minor cleanups and simplifications
This commit is contained in:
Родитель
c10b618fd4
Коммит
26cd366a68
|
@ -44,10 +44,6 @@ class MainWindow(QMainWindow):
|
|||
self.ui = Ui_MainWindow()
|
||||
self.ui.setupUi(self)
|
||||
|
||||
# Init MenuViews
|
||||
self.ui.actionLogView.setChecked(self.ui.logDockWidget.isVisible())
|
||||
self.ui.actionToolBar.setChecked(self.ui.toolBar.isVisible())
|
||||
|
||||
self.bisect_runner = BisectRunner(self)
|
||||
self.single_runner = SingleBuildRunner(self)
|
||||
self.current_runner = None
|
||||
|
@ -80,6 +76,12 @@ class MainWindow(QMainWindow):
|
|||
|
||||
self.read_settings()
|
||||
|
||||
# Make sure the toolbar and logviews are visible (in case
|
||||
# the user manually turned them off in a previous release
|
||||
# where this was possible)
|
||||
self.ui.toolBar.setVisible(True)
|
||||
self.ui.log_view.setVisible(True)
|
||||
|
||||
@Slot()
|
||||
def clear(self):
|
||||
mozfile.remove(self.persist)
|
||||
|
|
|
@ -119,16 +119,6 @@ class ReportModel(QAbstractTableModel):
|
|||
'finished')
|
||||
downloader_slots = ('download_progress', )
|
||||
|
||||
if self.bisector:
|
||||
_bulk_action_slots('disconnect',
|
||||
bisector_slots,
|
||||
self.bisector,
|
||||
self)
|
||||
_bulk_action_slots('disconnect',
|
||||
downloader_slots,
|
||||
self.bisector.download_manager,
|
||||
self)
|
||||
|
||||
if bisector:
|
||||
self.attach_single_runner(None)
|
||||
_bulk_action_slots('connect',
|
||||
|
@ -147,12 +137,6 @@ class ReportModel(QAbstractTableModel):
|
|||
sr_slots = ('started', 'step_build_found', 'step_testing')
|
||||
downloader_slots = ('download_progress', )
|
||||
|
||||
if self.single_runner:
|
||||
_bulk_action_slots('disconnect', sr_slots, self.single_runner,
|
||||
self)
|
||||
_bulk_action_slots('disconnect', downloader_slots,
|
||||
self.single_runner.download_manager, self)
|
||||
|
||||
if single_runner:
|
||||
self.attach_bisector(None)
|
||||
_bulk_action_slots('connect', sr_slots, single_runner, self)
|
||||
|
|
|
@ -22,12 +22,6 @@
|
|||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="spacing">
|
||||
|
@ -89,18 +83,14 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1024</width>
|
||||
<height>21</height>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuFile">
|
||||
<property name="title">
|
||||
<string>&File</string>
|
||||
</property>
|
||||
<addaction name="actionStart_a_new_bisection"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionRun_a_single_build"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionStop_the_bisection"/>
|
||||
<addaction name="actionGlobal_preferences"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionQuit"/>
|
||||
</widget>
|
||||
|
@ -110,31 +100,31 @@
|
|||
</property>
|
||||
<addaction name="actionAbout"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuEdit">
|
||||
<property name="title">
|
||||
<string>&Edit</string>
|
||||
</property>
|
||||
<addaction name="actionGlobal_preferences"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuViews">
|
||||
<property name="title">
|
||||
<string>&Views</string>
|
||||
</property>
|
||||
<addaction name="actionToolBar"/>
|
||||
<addaction name="actionLogView"/>
|
||||
</widget>
|
||||
<addaction name="menuFile"/>
|
||||
<addaction name="menuEdit"/>
|
||||
<addaction name="menuViews"/>
|
||||
<addaction name="menuHelp"/>
|
||||
</widget>
|
||||
<widget class="QToolBar" name="toolBar">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::NoContextMenu</enum>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>toolBar</string>
|
||||
</property>
|
||||
<property name="movable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="floatable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<attribute name="toolBarArea">
|
||||
<enum>TopToolBarArea</enum>
|
||||
</attribute>
|
||||
|
@ -215,41 +205,19 @@
|
|||
<property name="text">
|
||||
<string>&Stop</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Esc</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Stop bisection or single build run</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Esc</string>
|
||||
</property>
|
||||
<property name="iconVisibleInMenu">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionGlobal_preferences">
|
||||
<property name="text">
|
||||
<string>Global &preferences</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionToolBar">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Toolbar</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionLogView">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Log view</string>
|
||||
<string>Preferences...</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionRun_a_single_build">
|
||||
|
@ -369,70 +337,6 @@
|
|||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>actionToolBar</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>toolBar</receiver>
|
||||
<slot>setVisible(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>-1</x>
|
||||
<y>-1</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>511</x>
|
||||
<y>46</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>actionLogView</sender>
|
||||
<signal>triggered(bool)</signal>
|
||||
<receiver>logDockWidget</receiver>
|
||||
<slot>setVisible(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>-1</x>
|
||||
<y>-1</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>511</x>
|
||||
<y>650</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>toolBar</sender>
|
||||
<signal>visibilityChanged(bool)</signal>
|
||||
<receiver>actionToolBar</receiver>
|
||||
<slot>setChecked(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>511</x>
|
||||
<y>46</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>-1</x>
|
||||
<y>-1</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>logDockWidget</sender>
|
||||
<signal>visibilityChanged(bool)</signal>
|
||||
<receiver>actionLogView</receiver>
|
||||
<slot>setChecked(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>511</x>
|
||||
<y>650</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>-1</x>
|
||||
<y>-1</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>actionRun_a_single_build</sender>
|
||||
<signal>triggered()</signal>
|
||||
|
|
Загрузка…
Ссылка в новой задаче