From 061009a171cb765626f918fcf5b349edef4169e5 Mon Sep 17 00:00:00 2001 From: lordmulder Date: Sat, 3 May 2014 15:11:29 +0200 Subject: [PATCH] Updated Python download address + some code refactoring. --- src/version.h | 2 +- src/win_main.cpp | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/version.h b/src/version.h index 58fd9de..9d87caa 100644 --- a/src/version.h +++ b/src/version.h @@ -26,7 +26,7 @@ #define VER_X264_MAJOR 2 #define VER_X264_MINOR 3 #define VER_X264_PATCH 8 -#define VER_X264_BUILD 856 +#define VER_X264_BUILD 857 #define VER_X264_PORTABLE_EDITION (0) diff --git a/src/win_main.cpp b/src/win_main.cpp index 0bcfafb..47c0d87 100644 --- a/src/win_main.cpp +++ b/src/win_main.cpp @@ -60,13 +60,18 @@ #include -static const char *home_url = "http://muldersoft.com/"; +//Constants +static const char *home_url = "http://muldersoft.com/"; static const char *update_url = "https://github.com/lordmulder/Simple-x264-Launcher/releases/latest"; -static const char *tpl_last = ""; +static const char *avs_dl_url = "http://sourceforge.net/projects/avisynth2/files/AviSynth%202.5/"; +static const char *vsynth_url = "http://www.vapoursynth.com/"; +static const char *python_url = "https://www.python.org/downloads/"; +static const char *tpl_last = ""; +//Macros #define SET_FONT_BOLD(WIDGET,BOLD) do { QFont _font = WIDGET->font(); _font.setBold(BOLD); WIDGET->setFont(_font); } while(0) #define SET_TEXT_COLOR(WIDGET,COLOR) do { QPalette _palette = WIDGET->palette(); _palette.setColor(QPalette::WindowText, (COLOR)); _palette.setColor(QPalette::Text, (COLOR)); WIDGET->setPalette(_palette); } while(0) -#define LINK(URL) "" URL "" +#define LINK(URL) (QString("%1").arg((URL))) #define INIT_ERROR_EXIT() do { m_status = STATUS_EXITTING; close(); qApp->exit(-1); return; } while(0) #define ENSURE_APP_IS_IDLE() do { if(m_status != STATUS_IDLE) { x264_beep(x264_beep_warning); qWarning("Cannot perfrom this action at this time!"); return; } } while(0) #define NEXT(X) ((*reinterpret_cast(&(X)))++) @@ -898,7 +903,7 @@ void MainWindow::init(void) if(!m_preferences->getDisableWarnings()) { QString text = tr("It appears that Avisynth is not currently installed on your computer.
Therefore Avisynth (.avs) input will not be working at all!").append("

"); - text += tr("Please download and install Avisynth:").append("
").append(LINK("http://sourceforge.net/projects/avisynth2/files/AviSynth%202.5/")); + text += tr("Please download and install Avisynth:").append("
").append(LINK(avs_dl_url)); int val = QMessageBox::warning(this, tr("Avisynth Missing"), QString("%1").arg(text).replace("-", "−"), tr("Close"), tr("Disable this Warning")); if(val == 1) { @@ -939,8 +944,8 @@ void MainWindow::init(void) if(!m_preferences->getDisableWarnings()) { QString text = tr("It appears that VapourSynth is not currently installed on your computer.
Therefore VapourSynth (.vpy) input will not be working at all!").append("

"); - text += tr("Please download and install VapourSynth for Windows (R19 or later):").append("
").append(LINK("http://www.vapoursynth.com/")).append("

"); - text += tr("Note that Python 3.3 (x86) is a prerequisite for installing VapourSynth:").append("
").append(LINK("http://www.python.org/getit/")).append("
"); + text += tr("Please download and install VapourSynth for Windows (R19 or later):").append("
").append(LINK(vsynth_url)).append("

"); + text += tr("Note that Python v3.x is a prerequisite for installing VapourSynth:").append("
").append(LINK(python_url)).append("
"); const int val = QMessageBox::warning(this, tr("VapourSynth Missing"), QString("%1").arg(text).replace("-", "−"), tr("Close"), tr("Disable this Warning")); if(val == 1) {