Added option to disable the Avisynth/VapourSynth warning messages to the preferences.
This commit is contained in:
parent
b33774c149
commit
cb554dd5eb
@ -10,7 +10,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>379</width>
|
||||
<height>399</height>
|
||||
<height>432</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -169,7 +169,7 @@ Please be aware that this option does NOT have any effect on 32-Bit systems.</st
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="17" column="1" colspan="5">
|
||||
<item row="19" column="1" colspan="5">
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
@ -382,23 +382,37 @@ Please be aware that this option does NOT have any effect on 32-Bit systems.</st
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0" rowspan="16">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<item row="18" column="2" colspan="4">
|
||||
<widget class="QLabel" name="labelDisableWarnings">
|
||||
<property name="text">
|
||||
<string>Never show warning about missing Avisynth or VapourSynth</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="18" column="1">
|
||||
<widget class="QCheckBox" name="checkDisableWarnings">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="17" column="1" colspan="5">
|
||||
<spacer name="verticalSpacer_10">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>8</width>
|
||||
<height>20</height>
|
||||
<width>20</width>
|
||||
<height>8</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="6" rowspan="16">
|
||||
<item row="1" column="6" rowspan="18">
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
@ -414,6 +428,22 @@ Please be aware that this option does NOT have any effect on 32-Bit systems.</st
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0" rowspan="18">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>8</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
|
@ -48,6 +48,7 @@ void PreferencesModel::initPreferences(PreferencesModel *preferences)
|
||||
preferences->m_saveToSourcePath = false;
|
||||
preferences->m_processPriority = X264_PRIORITY_BELOWNORMAL;
|
||||
preferences->m_enableSounds = false;
|
||||
preferences->m_disableWarnings = false;
|
||||
}
|
||||
|
||||
void PreferencesModel::loadPreferences(PreferencesModel *preferences)
|
||||
@ -67,6 +68,7 @@ void PreferencesModel::loadPreferences(PreferencesModel *preferences)
|
||||
preferences->m_saveToSourcePath = settings.value("save_to_source_path", QVariant(defaults.m_saveToSourcePath)).toBool();
|
||||
preferences->m_processPriority = settings.value("process_priority", QVariant(defaults.m_processPriority)).toInt();
|
||||
preferences->m_enableSounds = settings.value("enable_sounds", QVariant(defaults.m_enableSounds)).toBool();
|
||||
preferences->m_disableWarnings = settings.value("disable_warnings", QVariant(defaults.m_disableWarnings)).toBool();
|
||||
}
|
||||
|
||||
void PreferencesModel::savePreferences(PreferencesModel *preferences)
|
||||
@ -84,5 +86,6 @@ void PreferencesModel::savePreferences(PreferencesModel *preferences)
|
||||
settings.setValue("save_to_source_path", preferences->m_saveToSourcePath);
|
||||
settings.setValue("process_priority", preferences->m_processPriority);
|
||||
settings.setValue("enable_sounds", preferences->m_enableSounds);
|
||||
settings.setValue("disable_warnings", preferences->m_disableWarnings);
|
||||
settings.sync();
|
||||
}
|
||||
|
@ -45,6 +45,7 @@ public:
|
||||
bool saveToSourcePath(void) { return m_saveToSourcePath; }
|
||||
int processPriority(void) { return m_processPriority; }
|
||||
bool enableSounds(void) { return m_enableSounds; }
|
||||
bool disableWarnings(void) { return m_disableWarnings; }
|
||||
|
||||
//Setter
|
||||
void setAutoRunNextJob(const bool autoRunNextJob) { m_autoRunNextJob = autoRunNextJob; }
|
||||
@ -56,6 +57,7 @@ public:
|
||||
void setSaveToSourcePath(const bool saveToSourcePath) { m_saveToSourcePath = saveToSourcePath; }
|
||||
void setProcessPriority(const int processPriority) { m_processPriority = processPriority; }
|
||||
void setEnableSounds(const bool enableSounds) { m_enableSounds = enableSounds; }
|
||||
void setDisableWarnings(const bool disableWarnings) { m_disableWarnings = disableWarnings; }
|
||||
|
||||
//Static
|
||||
static void initPreferences(PreferencesModel *preferences);
|
||||
@ -72,4 +74,5 @@ protected:
|
||||
bool m_saveToSourcePath;
|
||||
int m_processPriority;
|
||||
bool m_enableSounds;
|
||||
bool m_disableWarnings;
|
||||
};
|
||||
|
@ -22,7 +22,7 @@
|
||||
#define VER_X264_MAJOR 2
|
||||
#define VER_X264_MINOR 1
|
||||
#define VER_X264_PATCH 9
|
||||
#define VER_X264_BUILD 552
|
||||
#define VER_X264_BUILD 560
|
||||
|
||||
#define VER_X264_MINIMUM_REV 2339
|
||||
#define VER_X264_CURRENT_API 135
|
||||
|
@ -825,9 +825,14 @@ void MainWindow::init(void)
|
||||
}
|
||||
if((!result) || (avisynthVersion < 2.5))
|
||||
{
|
||||
int val = QMessageBox::warning(this, tr("Avisynth Missing"), tr("<nobr>It appears that Avisynth is <b>not</b> currently installed on your computer.<br>Therefore Avisynth (.avs) input will <b>not</b> be working at all!<br><br>Please download and install Avisynth:<br>" LINK("http://sourceforge.net/projects/avisynth2/files/AviSynth%202.5/") "</nobr>").replace("-", "−"), tr("Quit"), tr("Ignore"));
|
||||
if(!m_preferences->disableWarnings())
|
||||
{
|
||||
QString text = tr("It appears that Avisynth is <b>not</b> currently installed on your computer.<br>Therefore Avisynth (.avs) input will <b>not</b> be working at all!").append("<br><br>");
|
||||
text += tr("Please download and install Avisynth:").append("<br>").append(LINK("http://sourceforge.net/projects/avisynth2/files/AviSynth%202.5/"));
|
||||
int val = QMessageBox::warning(this, tr("Avisynth Missing"), QString("<nobr>%1</nobr>").arg(text).replace("-", "−"), tr("Quit"), tr("Ignore"));
|
||||
if(val != 1) { close(); qApp->exit(-1); return; }
|
||||
}
|
||||
}
|
||||
qDebug("");
|
||||
}
|
||||
|
||||
@ -847,9 +852,14 @@ void MainWindow::init(void)
|
||||
}
|
||||
if((!result) || (m_vapoursynthPath.isEmpty()))
|
||||
{
|
||||
int val = QMessageBox::warning(this, tr("Vapoursynth Missing"), tr("<nobr>It appears that Vapoursynth is <b>not</b> currently installed on your computer.<br>Therefore Vapoursynth (.vpy) input will <b>not</b> be working at all!<br><br>Please download and install Vapoursynth R19 or later:<br>" LINK("http://www.vapoursynth.com/") "</nobr>").replace("-", "−"), tr("Quit"), tr("Ignore"));
|
||||
if(!m_preferences->disableWarnings())
|
||||
{
|
||||
QString text = tr("It appears that Vapoursynth is <b>not</b> currently installed on your computer.<br>Therefore Vapoursynth (.vpy) input will <b>not</b> be working at all!").append("<br><br>");
|
||||
text += tr("Please download and install Vapoursynth for Windows (R19 or later):").append("<br>").append(LINK("http://www.vapoursynth.com/"));
|
||||
int val = QMessageBox::warning(this, tr("Vapoursynth Missing"), QString("<nobr>%1</nobr>").arg(text).replace("-", "−"), tr("Quit"), tr("Ignore"));
|
||||
if(val != 1) { close(); qApp->exit(-1); return; }
|
||||
}
|
||||
}
|
||||
qDebug("");
|
||||
}
|
||||
|
||||
|
@ -57,6 +57,7 @@ PreferencesDialog::PreferencesDialog(QWidget *parent, PreferencesModel *preferen
|
||||
labelSaveLogFiles->installEventFilter(this);
|
||||
labelSaveToSourceFolder->installEventFilter(this);
|
||||
labelEnableSounds->installEventFilter(this);
|
||||
labelDisableWarnings->installEventFilter(this);
|
||||
|
||||
connect(resetButton, SIGNAL(clicked()), this, SLOT(resetButtonPressed()));
|
||||
connect(checkUse10BitEncoding, SIGNAL(toggled(bool)), this, SLOT(use10BitEncodingToggled(bool)));
|
||||
@ -78,6 +79,7 @@ void PreferencesDialog::showEvent(QShowEvent *event)
|
||||
UPDATE_CHECKBOX(checkSaveLogFiles, m_preferences->saveLogFiles());
|
||||
UPDATE_CHECKBOX(checkSaveToSourceFolder, m_preferences->saveToSourcePath());
|
||||
UPDATE_CHECKBOX(checkEnableSounds, m_preferences->enableSounds());
|
||||
UPDATE_CHECKBOX(checkDisableWarnings, m_preferences->disableWarnings());
|
||||
|
||||
checkUse10BitEncoding->blockSignals(true);
|
||||
UPDATE_CHECKBOX(checkUse10BitEncoding, m_preferences->use10BitEncoding());
|
||||
@ -99,6 +101,7 @@ bool PreferencesDialog::eventFilter(QObject *o, QEvent *e)
|
||||
emulateMouseEvent(o, e, labelSaveLogFiles, checkSaveLogFiles);
|
||||
emulateMouseEvent(o, e, labelSaveToSourceFolder, checkSaveToSourceFolder);
|
||||
emulateMouseEvent(o, e, labelEnableSounds, checkEnableSounds);
|
||||
emulateMouseEvent(o, e, labelDisableWarnings, checkDisableWarnings);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -133,6 +136,7 @@ void PreferencesDialog::done(int n)
|
||||
m_preferences->setMaxRunningJobCount(spinBoxJobCount->value());
|
||||
m_preferences->setProcessPriority(comboBoxPriority->currentIndex());
|
||||
m_preferences->setEnableSounds(checkEnableSounds->isChecked());
|
||||
m_preferences->setDisableWarnings(checkDisableWarnings->isChecked());
|
||||
|
||||
PreferencesModel::savePreferences(m_preferences);
|
||||
QDialog::done(n);
|
||||
|
Loading…
Reference in New Issue
Block a user