Added "do nothing" item to post-operation sub-menu.

This commit is contained in:
LoRd_MuldeR 2018-02-26 20:38:37 +01:00
parent 5b91737789
commit cbfa3a3600
4 changed files with 31 additions and 21 deletions

View File

@ -343,6 +343,8 @@
<addaction name="separator"/>
<addaction name="actionPostOp_PowerDown"/>
<addaction name="actionPostOp_Hibernate"/>
<addaction name="separator"/>
<addaction name="actionPostOp_DoNothing"/>
</widget>
<addaction name="actionOpen"/>
<addaction name="actionCreateJob"/>
@ -845,12 +847,27 @@
</property>
<property name="icon">
<iconset resource="../res/resources.qrc">
<normaloff>:/buttons/power_save.png</normaloff>:/buttons/power_save.png</iconset>
<normaloff>:/buttons/snow_flake.png</normaloff>:/buttons/snow_flake.png</iconset>
</property>
<property name="text">
<string>Hibernate Computer</string>
</property>
</action>
<action name="actionPostOp_DoNothing">
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="icon">
<iconset resource="../res/resources.qrc">
<normaloff>:/buttons/cross_grey.png</normaloff>:/buttons/cross_grey.png</iconset>
</property>
<property name="text">
<string>Do Nothing</string>
</property>
</action>
</widget>
<tabstops>
<tabstop>buttonAddJob</tabstop>

View File

@ -1,7 +1,6 @@
<!DOCTYPE RCC>
<RCC version="1.0">
<qresource>
<file>icons/movie.ico</file>
<file>buttons/accept.png</file>
<file>buttons/add.png</file>
<file>buttons/arrow_down.png</file>
@ -17,6 +16,7 @@
<file>buttons/computer.png</file>
<file>buttons/control_pause.png</file>
<file>buttons/cross.png</file>
<file>buttons/cross_grey.png</file>
<file>buttons/cup.png</file>
<file>buttons/disk.png</file>
<file>buttons/door_in.png</file>
@ -49,6 +49,7 @@
<file>buttons/shield_exclamation.png</file>
<file>buttons/shield_green.png</file>
<file>buttons/shield_grey.png</file>
<file>buttons/snow_flake.png</file>
<file>buttons/suspended.png</file>
<file>buttons/text_wrapping.png</file>
<file>buttons/transmit.png</file>
@ -58,6 +59,7 @@
<file>buttons/wrench.png</file>
<file>buttons/x264.png</file>
<file>buttons/x265.png</file>
<file>icons/movie.ico</file>
<file>images/avisynth.png</file>
<file>images/help.png</file>
<file>images/loading.gif</file>
@ -69,11 +71,11 @@
<file>images/update_wizard.png</file>
<file>images/x264.png</file>
<file>images/x265.png</file>
<file>sounds/shutdown.wav</file>
<file>sounds/beep.wav</file>
<file>sounds/beep2.wav</file>
<file>sounds/tada.wav</file>
<file>sounds/shattering.wav</file>
<file>sounds/failure.wav</file>
<file>sounds/shattering.wav</file>
<file>sounds/shutdown.wav</file>
<file>sounds/tada.wav</file>
</qresource>
</RCC>

View File

@ -26,7 +26,7 @@
#define VER_X264_MAJOR 2
#define VER_X264_MINOR 8
#define VER_X264_PATCH 6
#define VER_X264_BUILD 1122
#define VER_X264_BUILD 1123
#define VER_X264_PORTABLE_EDITION (0)

View File

@ -218,6 +218,7 @@ MainWindow::MainWindow(const MUtils::CPUFetaures::cpu_info_t &cpuFeatures, MUtil
connect(ui->actionOpen, SIGNAL(triggered()), this, SLOT(openActionTriggered()));
connect(ui->actionCleanup_Finished, SIGNAL(triggered()), this, SLOT(cleanupActionTriggered()));
connect(ui->actionCleanup_Enqueued, SIGNAL(triggered()), this, SLOT(cleanupActionTriggered()));
connect(ui->actionPostOp_DoNothing, SIGNAL(triggered()), this, SLOT(postOpActionTriggered()));
connect(ui->actionPostOp_PowerDown, SIGNAL(triggered()), this, SLOT(postOpActionTriggered()));
connect(ui->actionPostOp_Hibernate, SIGNAL(triggered()), this, SLOT(postOpActionTriggered()));
connect(ui->actionAbout, SIGNAL(triggered()), this, SLOT(showAbout()));
@ -225,6 +226,7 @@ MainWindow::MainWindow(const MUtils::CPUFetaures::cpu_info_t &cpuFeatures, MUtil
connect(ui->actionCheckForUpdates, SIGNAL(triggered()), this, SLOT(checkUpdates()));
ui->actionCleanup_Finished->setData(QVariant(bool(0)));
ui->actionCleanup_Enqueued->setData(QVariant(bool(1)));
ui->actionPostOp_DoNothing->setData(QVariant(POST_OP_DONOTHING));
ui->actionPostOp_PowerDown->setData(QVariant(POST_OP_POWERDOWN));
ui->actionPostOp_Hibernate->setData(QVariant(POST_OP_HIBERNATE));
ui->actionPostOp_Hibernate->setEnabled(MUtils::OS::is_hibernation_supported());
@ -432,26 +434,15 @@ void MainWindow::postOpActionTriggered(void)
if (data.isValid() && (data.type() == QVariant::Int))
{
const postOp_t mode = (postOp_t)data.toInt();
if (sender->isChecked())
if ((mode >= POST_OP_DONOTHING) && (mode <= POST_OP_HIBERNATE))
{
m_postOperation = mode;
if (mode != POST_OP_POWERDOWN)
{
ui->actionPostOp_PowerDown->setChecked(false);
}
if (mode != POST_OP_HIBERNATE)
{
ui->actionPostOp_Hibernate->setChecked(false);
}
}
else
{
m_postOperation = POST_OP_DONOTHING;
ui->actionPostOp_PowerDown->setChecked(mode == POST_OP_POWERDOWN);
ui->actionPostOp_Hibernate->setChecked(mode == POST_OP_HIBERNATE);
ui->actionPostOp_DoNothing->setChecked(mode == POST_OP_DONOTHING);
}
}
}
qWarning("Post-operation: %d", m_postOperation);
}
/*