Qt: Combine resume and power off toolbar buttons
This commit is contained in:
parent
e6d52ce6de
commit
9f22684cea
|
@ -468,6 +468,23 @@ void MainWindow::updateEmulationActions(bool starting, bool running)
|
|||
m_status_frame_time_widget->hide();
|
||||
}
|
||||
|
||||
if (starting || running)
|
||||
{
|
||||
if (!m_ui.toolBar->actions().contains(m_ui.actionPowerOff))
|
||||
{
|
||||
m_ui.toolBar->insertAction(m_ui.actionResumeLastState, m_ui.actionPowerOff);
|
||||
m_ui.toolBar->removeAction(m_ui.actionResumeLastState);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!m_ui.toolBar->actions().contains(m_ui.actionResumeLastState))
|
||||
{
|
||||
m_ui.toolBar->insertAction(m_ui.actionPowerOff, m_ui.actionResumeLastState);
|
||||
m_ui.toolBar->removeAction(m_ui.actionPowerOff);
|
||||
}
|
||||
}
|
||||
|
||||
m_ui.statusBar->clearMessage();
|
||||
}
|
||||
|
||||
|
|
|
@ -165,9 +165,8 @@
|
|||
</attribute>
|
||||
<addaction name="actionStartDisc"/>
|
||||
<addaction name="actionStartBios"/>
|
||||
<addaction name="actionResumeLastState"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionPowerOff"/>
|
||||
<addaction name="actionResumeLastState"/>
|
||||
<addaction name="actionReset"/>
|
||||
<addaction name="actionPause"/>
|
||||
<addaction name="actionChangeDisc"/>
|
||||
|
|
Loading…
Reference in New Issue