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>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>379</width>
|
<width>379</width>
|
||||||
<height>399</height>
|
<height>432</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -169,7 +169,7 @@ Please be aware that this option does NOT have any effect on 32-Bit systems.</st
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="17" column="1" colspan="5">
|
<item row="19" column="1" colspan="5">
|
||||||
<spacer name="verticalSpacer_3">
|
<spacer name="verticalSpacer_3">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<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>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0" rowspan="16">
|
<item row="18" column="2" colspan="4">
|
||||||
<spacer name="horizontalSpacer_2">
|
<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">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeType">
|
<property name="sizeType">
|
||||||
<enum>QSizePolicy::Fixed</enum>
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>8</width>
|
<width>20</width>
|
||||||
<height>20</height>
|
<height>8</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="6" rowspan="16">
|
<item row="1" column="6" rowspan="18">
|
||||||
<spacer name="horizontalSpacer_3">
|
<spacer name="horizontalSpacer_3">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<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>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</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>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
@ -48,6 +48,7 @@ void PreferencesModel::initPreferences(PreferencesModel *preferences)
|
|||||||
preferences->m_saveToSourcePath = false;
|
preferences->m_saveToSourcePath = false;
|
||||||
preferences->m_processPriority = X264_PRIORITY_BELOWNORMAL;
|
preferences->m_processPriority = X264_PRIORITY_BELOWNORMAL;
|
||||||
preferences->m_enableSounds = false;
|
preferences->m_enableSounds = false;
|
||||||
|
preferences->m_disableWarnings = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PreferencesModel::loadPreferences(PreferencesModel *preferences)
|
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_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_processPriority = settings.value("process_priority", QVariant(defaults.m_processPriority)).toInt();
|
||||||
preferences->m_enableSounds = settings.value("enable_sounds", QVariant(defaults.m_enableSounds)).toBool();
|
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)
|
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("save_to_source_path", preferences->m_saveToSourcePath);
|
||||||
settings.setValue("process_priority", preferences->m_processPriority);
|
settings.setValue("process_priority", preferences->m_processPriority);
|
||||||
settings.setValue("enable_sounds", preferences->m_enableSounds);
|
settings.setValue("enable_sounds", preferences->m_enableSounds);
|
||||||
|
settings.setValue("disable_warnings", preferences->m_disableWarnings);
|
||||||
settings.sync();
|
settings.sync();
|
||||||
}
|
}
|
||||||
|
@ -45,6 +45,7 @@ public:
|
|||||||
bool saveToSourcePath(void) { return m_saveToSourcePath; }
|
bool saveToSourcePath(void) { return m_saveToSourcePath; }
|
||||||
int processPriority(void) { return m_processPriority; }
|
int processPriority(void) { return m_processPriority; }
|
||||||
bool enableSounds(void) { return m_enableSounds; }
|
bool enableSounds(void) { return m_enableSounds; }
|
||||||
|
bool disableWarnings(void) { return m_disableWarnings; }
|
||||||
|
|
||||||
//Setter
|
//Setter
|
||||||
void setAutoRunNextJob(const bool autoRunNextJob) { m_autoRunNextJob = autoRunNextJob; }
|
void setAutoRunNextJob(const bool autoRunNextJob) { m_autoRunNextJob = autoRunNextJob; }
|
||||||
@ -56,6 +57,7 @@ public:
|
|||||||
void setSaveToSourcePath(const bool saveToSourcePath) { m_saveToSourcePath = saveToSourcePath; }
|
void setSaveToSourcePath(const bool saveToSourcePath) { m_saveToSourcePath = saveToSourcePath; }
|
||||||
void setProcessPriority(const int processPriority) { m_processPriority = processPriority; }
|
void setProcessPriority(const int processPriority) { m_processPriority = processPriority; }
|
||||||
void setEnableSounds(const bool enableSounds) { m_enableSounds = enableSounds; }
|
void setEnableSounds(const bool enableSounds) { m_enableSounds = enableSounds; }
|
||||||
|
void setDisableWarnings(const bool disableWarnings) { m_disableWarnings = disableWarnings; }
|
||||||
|
|
||||||
//Static
|
//Static
|
||||||
static void initPreferences(PreferencesModel *preferences);
|
static void initPreferences(PreferencesModel *preferences);
|
||||||
@ -72,4 +74,5 @@ protected:
|
|||||||
bool m_saveToSourcePath;
|
bool m_saveToSourcePath;
|
||||||
int m_processPriority;
|
int m_processPriority;
|
||||||
bool m_enableSounds;
|
bool m_enableSounds;
|
||||||
|
bool m_disableWarnings;
|
||||||
};
|
};
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#define VER_X264_MAJOR 2
|
#define VER_X264_MAJOR 2
|
||||||
#define VER_X264_MINOR 1
|
#define VER_X264_MINOR 1
|
||||||
#define VER_X264_PATCH 9
|
#define VER_X264_PATCH 9
|
||||||
#define VER_X264_BUILD 552
|
#define VER_X264_BUILD 560
|
||||||
|
|
||||||
#define VER_X264_MINIMUM_REV 2339
|
#define VER_X264_MINIMUM_REV 2339
|
||||||
#define VER_X264_CURRENT_API 135
|
#define VER_X264_CURRENT_API 135
|
||||||
|
@ -825,9 +825,14 @@ void MainWindow::init(void)
|
|||||||
}
|
}
|
||||||
if((!result) || (avisynthVersion < 2.5))
|
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; }
|
if(val != 1) { close(); qApp->exit(-1); return; }
|
||||||
}
|
}
|
||||||
|
}
|
||||||
qDebug("");
|
qDebug("");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -847,9 +852,14 @@ void MainWindow::init(void)
|
|||||||
}
|
}
|
||||||
if((!result) || (m_vapoursynthPath.isEmpty()))
|
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; }
|
if(val != 1) { close(); qApp->exit(-1); return; }
|
||||||
}
|
}
|
||||||
|
}
|
||||||
qDebug("");
|
qDebug("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,6 +57,7 @@ PreferencesDialog::PreferencesDialog(QWidget *parent, PreferencesModel *preferen
|
|||||||
labelSaveLogFiles->installEventFilter(this);
|
labelSaveLogFiles->installEventFilter(this);
|
||||||
labelSaveToSourceFolder->installEventFilter(this);
|
labelSaveToSourceFolder->installEventFilter(this);
|
||||||
labelEnableSounds->installEventFilter(this);
|
labelEnableSounds->installEventFilter(this);
|
||||||
|
labelDisableWarnings->installEventFilter(this);
|
||||||
|
|
||||||
connect(resetButton, SIGNAL(clicked()), this, SLOT(resetButtonPressed()));
|
connect(resetButton, SIGNAL(clicked()), this, SLOT(resetButtonPressed()));
|
||||||
connect(checkUse10BitEncoding, SIGNAL(toggled(bool)), this, SLOT(use10BitEncodingToggled(bool)));
|
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(checkSaveLogFiles, m_preferences->saveLogFiles());
|
||||||
UPDATE_CHECKBOX(checkSaveToSourceFolder, m_preferences->saveToSourcePath());
|
UPDATE_CHECKBOX(checkSaveToSourceFolder, m_preferences->saveToSourcePath());
|
||||||
UPDATE_CHECKBOX(checkEnableSounds, m_preferences->enableSounds());
|
UPDATE_CHECKBOX(checkEnableSounds, m_preferences->enableSounds());
|
||||||
|
UPDATE_CHECKBOX(checkDisableWarnings, m_preferences->disableWarnings());
|
||||||
|
|
||||||
checkUse10BitEncoding->blockSignals(true);
|
checkUse10BitEncoding->blockSignals(true);
|
||||||
UPDATE_CHECKBOX(checkUse10BitEncoding, m_preferences->use10BitEncoding());
|
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, labelSaveLogFiles, checkSaveLogFiles);
|
||||||
emulateMouseEvent(o, e, labelSaveToSourceFolder, checkSaveToSourceFolder);
|
emulateMouseEvent(o, e, labelSaveToSourceFolder, checkSaveToSourceFolder);
|
||||||
emulateMouseEvent(o, e, labelEnableSounds, checkEnableSounds);
|
emulateMouseEvent(o, e, labelEnableSounds, checkEnableSounds);
|
||||||
|
emulateMouseEvent(o, e, labelDisableWarnings, checkDisableWarnings);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,6 +136,7 @@ void PreferencesDialog::done(int n)
|
|||||||
m_preferences->setMaxRunningJobCount(spinBoxJobCount->value());
|
m_preferences->setMaxRunningJobCount(spinBoxJobCount->value());
|
||||||
m_preferences->setProcessPriority(comboBoxPriority->currentIndex());
|
m_preferences->setProcessPriority(comboBoxPriority->currentIndex());
|
||||||
m_preferences->setEnableSounds(checkEnableSounds->isChecked());
|
m_preferences->setEnableSounds(checkEnableSounds->isChecked());
|
||||||
|
m_preferences->setDisableWarnings(checkDisableWarnings->isChecked());
|
||||||
|
|
||||||
PreferencesModel::savePreferences(m_preferences);
|
PreferencesModel::savePreferences(m_preferences);
|
||||||
QDialog::done(n);
|
QDialog::done(n);
|
||||||
|
Loading…
Reference in New Issue
Block a user