diff --git a/gui/win_addJob.ui b/gui/win_addJob.ui
index 8189820..bfe29f7 100644
--- a/gui/win_addJob.ui
+++ b/gui/win_addJob.ui
@@ -953,6 +953,9 @@
Lucida Console
+
+ Qt::ActionsContextMenu
+
<nobr>All command−line parameters you enter here will be passed to x264 unmodified and unchecked. Some parameters are forbidden, as they are reserved for the GUI.<br>The following macros can be used:<tt> $(INPUT)</tt> expands to the current source file path and<tt> $(OUTPUT)</tt> expands to the current output file path.</nobr>
@@ -1164,6 +1167,9 @@
Lucida Console
+
+ Qt::ActionsContextMenu
+
All command-line parameters you enter here will be passed to Avs2YUV unmodified and unchecked. Only relevant for Avisynth input!
diff --git a/gui/win_editor.ui b/gui/win_editor.ui
new file mode 100644
index 0000000..533f6a7
--- /dev/null
+++ b/gui/win_editor.ui
@@ -0,0 +1,117 @@
+
+
+ EditorDialog
+
+
+
+ 0
+ 0
+ 690
+ 147
+
+
+
+ Editor
+
+
+ true
+
+
+ -
+
+
+
+ Lucida Console
+
+
+
+ Qt::ScrollBarAlwaysOff
+
+
+
+ -
+
+
-
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+
+ 96
+ 0
+
+
+
+ OK
+
+
+
+ -
+
+
+
+ 96
+ 0
+
+
+
+ Cancel
+
+
+
+
+
+
+
+
+ plainTextEdit
+ acceptButton
+ cancelButton
+
+
+
+
+ acceptButton
+ clicked()
+ EditorDialog
+ accept()
+
+
+ 455
+ 304
+
+
+ 307
+ 162
+
+
+
+
+ cancelButton
+ clicked()
+ EditorDialog
+ reject()
+
+
+ 557
+ 304
+
+
+ 307
+ 162
+
+
+
+
+
diff --git a/res/buttons/page_edit.png b/res/buttons/page_edit.png
new file mode 100644
index 0000000..046811e
Binary files /dev/null and b/res/buttons/page_edit.png differ
diff --git a/res/resources.qrc b/res/resources.qrc
index 0d710e4..20d1920 100644
--- a/res/resources.qrc
+++ b/res/resources.qrc
@@ -21,6 +21,7 @@
buttons/hourglass.png
buttons/information.png
buttons/lightning.png
+ buttons/page_edit.png
buttons/page_paste.png
buttons/pause.png
buttons/play.png
diff --git a/src/version.h b/src/version.h
index b18fcd1..51d670b 100644
--- a/src/version.h
+++ b/src/version.h
@@ -22,7 +22,7 @@
#define VER_X264_MAJOR 2
#define VER_X264_MINOR 0
#define VER_X264_PATCH 2
-#define VER_X264_BUILD 202
+#define VER_X264_BUILD 209
#define VER_X264_MINIMUM_REV 2146
#define VER_X264_CURRENT_API 120
diff --git a/src/win_addJob.cpp b/src/win_addJob.cpp
index 6b26743..2ebb55c 100644
--- a/src/win_addJob.cpp
+++ b/src/win_addJob.cpp
@@ -24,6 +24,7 @@
#include "global.h"
#include "model_options.h"
#include "win_help.h"
+#include "win_editor.h"
#include
#include
@@ -36,6 +37,7 @@
#include
#include
#include
+#include
#define VALID_DIR(PATH) ((!(PATH).isEmpty()) && QFileInfo(PATH).exists() && QFileInfo(PATH).isDir())
@@ -150,7 +152,7 @@ public:
virtual State validate(QString &input, int &pos) const
{
- static const char* p[] = {"o", "frames", "seek", "raw", "hfyu", NULL};
+ static const char* p[] = {"o", "frames", "seek", "raw", "hfyu", "slave", NULL};
bool invalid = false;
@@ -219,6 +221,16 @@ AddJobDialog::AddJobDialog(QWidget *parent, OptionsModel *options, bool x64suppo
connect(editCustomX264Params, SIGNAL(textChanged(QString)), this, SLOT(configurationChanged()));
connect(editCustomAvs2YUVParams, SIGNAL(textChanged(QString)), this, SLOT(configurationChanged()));
+ //Create context menus
+ QAction *editorActionX264 = new QAction(QIcon(":/buttons/page_edit.png"), tr("Open Editor"), this);
+ editorActionX264->setData(QVariant::fromValue(editCustomX264Params));
+ editCustomX264Params->addAction(editorActionX264);
+ connect(editorActionX264, SIGNAL(triggered(bool)), this, SLOT(editorActionTriggered()));
+ QAction *editorActionAvs2YUV = new QAction(QIcon(":/buttons/page_edit.png"), tr("Open Editor"), this);
+ editorActionAvs2YUV->setData(QVariant::fromValue(editCustomAvs2YUVParams));
+ editCustomAvs2YUVParams->addAction(editorActionAvs2YUV);
+ connect(editorActionAvs2YUV, SIGNAL(triggered(bool)), this, SLOT(editorActionTriggered()));
+
//Setup template selector
loadTemplateList();
connect(cbxTemplate, SIGNAL(currentIndexChanged(int)), this, SLOT(templateSelected()));
@@ -637,6 +649,25 @@ void AddJobDialog::deleteTemplateButtonClicked(void)
X264_DELETE(item);
}
+void AddJobDialog::editorActionTriggered(void)
+{
+
+ if(QAction *action = dynamic_cast(QObject::sender()))
+ {
+ QLineEdit *lineEdit = reinterpret_cast(action->data().value());
+
+ EditorDialog *editor = new EditorDialog(this);
+ editor->setEditText(lineEdit->text());
+
+ if(editor->exec() == QDialog::Accepted)
+ {
+ lineEdit->setText(editor->getEditText());
+ }
+
+ X264_DELETE(editor);
+ }
+}
+
///////////////////////////////////////////////////////////////////////////////
// Public functions
///////////////////////////////////////////////////////////////////////////////
diff --git a/src/win_addJob.h b/src/win_addJob.h
index 99dd1e2..fd43e37 100644
--- a/src/win_addJob.h
+++ b/src/win_addJob.h
@@ -67,6 +67,7 @@ private slots:
void templateSelected(void);
void saveTemplateButtonClicked(void);
void deleteTemplateButtonClicked(void);
+ void editorActionTriggered(void);
virtual void accept(void);
diff --git a/src/win_editor.cpp b/src/win_editor.cpp
new file mode 100644
index 0000000..1f305aa
--- /dev/null
+++ b/src/win_editor.cpp
@@ -0,0 +1,60 @@
+///////////////////////////////////////////////////////////////////////////////
+// Simple x264 Launcher
+// Copyright (C) 2004-2012 LoRd_MuldeR
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this program; if not, write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+//
+// http://www.gnu.org/licenses/gpl-2.0.txt
+///////////////////////////////////////////////////////////////////////////////
+
+#include "win_editor.h"
+#include "global.h"
+
+#include
+#include
+#include
+
+///////////////////////////////////////////////////////////////////////////////
+// Constructor & Destructor
+///////////////////////////////////////////////////////////////////////////////
+
+EditorDialog::EditorDialog(QWidget *parent)
+:
+ QDialog(parent)
+{
+ //Init the dialog, from the .ui file
+ setupUi(this);
+ setWindowFlags(windowFlags() & (~Qt::WindowContextHelpButtonHint));
+
+ //Fix size
+ setMinimumSize(size());
+}
+
+EditorDialog::~EditorDialog(void)
+{
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// Events
+///////////////////////////////////////////////////////////////////////////////
+
+/*None*/
+
+///////////////////////////////////////////////////////////////////////////////
+// Slots
+///////////////////////////////////////////////////////////////////////////////
+
+/*None*/
+
diff --git a/src/win_editor.h b/src/win_editor.h
new file mode 100644
index 0000000..bd678f2
--- /dev/null
+++ b/src/win_editor.h
@@ -0,0 +1,44 @@
+///////////////////////////////////////////////////////////////////////////////
+// Simple x264 Launcher
+// Copyright (C) 2004-2012 LoRd_MuldeR
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this program; if not, write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+//
+// http://www.gnu.org/licenses/gpl-2.0.txt
+///////////////////////////////////////////////////////////////////////////////
+
+#pragma once
+
+#include "uic_win_editor.h"
+
+class QProcess;
+
+class EditorDialog : public QDialog, private Ui::EditorDialog
+{
+ Q_OBJECT
+
+public:
+ EditorDialog(QWidget *parent);
+ ~EditorDialog(void);
+
+ QString getEditText(void) { return plainTextEdit->toPlainText().simplified(); }
+
+ void setEditText(const QString &text)
+ {
+ plainTextEdit->clear();
+ plainTextEdit->appendPlainText(text.simplified());
+ }
+};
+
diff --git a/x264_launcher.vcxproj b/x264_launcher.vcxproj
index be31702..299f221 100644
--- a/x264_launcher.vcxproj
+++ b/x264_launcher.vcxproj
@@ -164,6 +164,15 @@ copy "$(SolutionDir)res\toolset\*.exe" "$(SolutionDir)bin\$(Configuration)\tools
$(SolutionDir)tmp\uic\uic_%(Filename).h;%(Outputs)
$(SolutionDir)tmp\uic\uic_%(Filename).h;%(Outputs)
+
+ Document
+ "$(QTDIR)\bin\uic.exe" -o "$(SolutionDir)tmp\uic\uic_%(Filename).h" "%(FullPath)"
+ "$(QTDIR)\bin\uic.exe" -o "$(SolutionDir)tmp\uic\uic_%(Filename).h" "%(FullPath)"
+ UIC "$(SolutionDir)tmp\uic\uic_%(Filename).h"
+ UIC "$(SolutionDir)tmp\uic\uic_%(Filename).h"
+ $(SolutionDir)tmp\uic\uic_%(Filename).h;%(Outputs)
+ $(SolutionDir)tmp\uic\uic_%(Filename).h;%(Outputs)
+
Document
@@ -178,6 +187,14 @@ copy "$(SolutionDir)res\toolset\*.exe" "$(SolutionDir)bin\$(Configuration)\tools
+
+ "$(QTDIR)\bin\moc.exe" -o "$(SolutionDir)tmp\moc\moc_%(Filename).cpp" "%(FullPath)"
+ "$(QTDIR)\bin\moc.exe" -o "$(SolutionDir)tmp\moc\moc_%(Filename).cpp" "%(FullPath)"
+ MOC "$(SolutionDir)tmp\moc\moc_%(Filename).cpp"
+ MOC "$(SolutionDir)tmp\moc\moc_%(Filename).cpp"
+ $(SolutionDir)tmp\moc\moc_%(Filename).cpp;%(Outputs)
+ $(SolutionDir)tmp\moc\moc_%(Filename).cpp;%(Outputs)
+
"$(QTDIR)\bin\moc.exe" -o "$(SolutionDir)tmp\moc\moc_%(Filename).cpp" "%(FullPath)"
"$(QTDIR)\bin\moc.exe" -o "$(SolutionDir)tmp\moc\moc_%(Filename).cpp" "%(FullPath)"
@@ -250,6 +267,7 @@ copy "$(SolutionDir)res\toolset\*.exe" "$(SolutionDir)bin\$(Configuration)\tools
+
@@ -257,6 +275,7 @@ copy "$(SolutionDir)res\toolset\*.exe" "$(SolutionDir)bin\$(Configuration)\tools
+
diff --git a/x264_launcher.vcxproj.filters b/x264_launcher.vcxproj.filters
index a0724a8..74ebb9e 100644
--- a/x264_launcher.vcxproj.filters
+++ b/x264_launcher.vcxproj.filters
@@ -107,6 +107,12 @@
Source Files
+
+ Source Files
+
+
+ Generated Files
+
@@ -145,6 +151,12 @@
Dialogs
+
+ Dialogs
+
+
+ Header Files
+