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();
|
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();
|
m_ui.statusBar->clearMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -165,9 +165,8 @@
|
||||||
</attribute>
|
</attribute>
|
||||||
<addaction name="actionStartDisc"/>
|
<addaction name="actionStartDisc"/>
|
||||||
<addaction name="actionStartBios"/>
|
<addaction name="actionStartBios"/>
|
||||||
<addaction name="actionResumeLastState"/>
|
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionPowerOff"/>
|
<addaction name="actionResumeLastState"/>
|
||||||
<addaction name="actionReset"/>
|
<addaction name="actionReset"/>
|
||||||
<addaction name="actionPause"/>
|
<addaction name="actionPause"/>
|
||||||
<addaction name="actionChangeDisc"/>
|
<addaction name="actionChangeDisc"/>
|
||||||
|
|
Loading…
Reference in New Issue