1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 09:32:12 +01:00

GreaseMonkey: Show script dialog when creating new user script

This commit is contained in:
David Rosca 2015-05-28 10:08:58 +02:00
parent 146fdc953f
commit 878ed65753

View File

@ -116,7 +116,7 @@ void GM_Settings::newScript()
"// @namespace qupzilla.com \n" "// @namespace qupzilla.com \n"
"// @description Script description \n" "// @description Script description \n"
"// @include * \n" "// @include * \n"
"// @version 1 \n" "// @version 1.0.0 \n"
"// ==/UserScript==\n\n"); "// ==/UserScript==\n\n");
const QString fileName = QSL("%1/%2.user.js").arg(m_manager->scriptsDirectory(), QzTools::filterCharsFromFilename(name)); const QString fileName = QSL("%1/%2.user.js").arg(m_manager->scriptsDirectory(), QzTools::filterCharsFromFilename(name));
@ -129,7 +129,8 @@ void GM_Settings::newScript()
GM_Script *gmScript = new GM_Script(m_manager, file.fileName()); GM_Script *gmScript = new GM_Script(m_manager, file.fileName());
m_manager->addScript(gmScript); m_manager->addScript(gmScript);
QDesktopServices::openUrl(QUrl::fromLocalFile(file.fileName())); GM_SettingsScriptInfo* dialog = new GM_SettingsScriptInfo(gmScript, this);
dialog->open();
} }
void GM_Settings::loadScripts() void GM_Settings::loadScripts()