Browse Source

Merge pull request #4849 from Chocobo1/run_ext_slash

Save "Run external program" input as is. Closes #4830.
adaptive-webui-19844
sledgehammer999 9 years ago
parent
commit
96c2947283
  1. 4
      src/base/preferences.cpp
  2. 24
      src/gui/options_imp.cpp

4
src/base/preferences.cpp

@ -1127,12 +1127,12 @@ void Preferences::setAutoRunEnabled(bool enabled) @@ -1127,12 +1127,12 @@ void Preferences::setAutoRunEnabled(bool enabled)
QString Preferences::getAutoRunProgram() const
{
return Utils::Fs::fromNativePath(value("AutoRun/program").toString());
return value("AutoRun/program").toString();
}
void Preferences::setAutoRunProgram(const QString &program)
{
setValue("AutoRun/program", Utils::Fs::fromNativePath(program));
setValue("AutoRun/program", program);
}
bool Preferences::shutdownWhenDownloadsComplete() const

24
src/gui/options_imp.cpp

@ -199,17 +199,19 @@ options_imp::options_imp(QWidget *parent) @@ -199,17 +199,19 @@ options_imp::options_imp(QWidget *parent)
connect(autoRunBox, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
connect(autoRun_txt, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton()));
autoRun_param->setText(QString::fromUtf8("%1\n %2\n %3\n %4\n %5\n %6\n %7\n %8\n %9\n %10")
.arg(tr("Supported parameters (case sensitive):"))
.arg(tr("%N: Torrent name"))
.arg(tr("%L: Category"))
.arg(tr("%F: Content path (same as root path for multifile torrent)"))
.arg(tr("%R: Root path (first torrent subdirectory path)"))
.arg(tr("%D: Save path"))
.arg(tr("%C: Number of files"))
.arg(tr("%Z: Torrent size (bytes)"))
.arg(tr("%T: Current tracker"))
.arg(tr("%I: Info hash")));
const QString autoRunStr = QString::fromUtf8("%1\n %2\n %3\n %4\n %5\n %6\n %7\n %8\n %9\n %10\n%11")
.arg(tr("Supported parameters (case sensitive):"))
.arg(tr("%N: Torrent name"))
.arg(tr("%L: Label"))
.arg(tr("%F: Content path (same as root path for multifile torrent)"))
.arg(tr("%R: Root path (first torrent subdirectory path)"))
.arg(tr("%D: Save path"))
.arg(tr("%C: Number of files"))
.arg(tr("%Z: Torrent size (bytes)"))
.arg(tr("%T: Current tracker"))
.arg(tr("%I: Info hash"))
.arg(tr("Tip: Encapsulate parameter with quotation marks to avoid text being cut off at whitespace (e.g., \"%N\")"));
autoRun_param->setText(autoRunStr);
// Connection tab
connect(spinPort, SIGNAL(valueChanged(QString)), this, SLOT(enableApplyButton()));

Loading…
Cancel
Save