mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
Moved all config info from qupzilla:about to qupzilla:config
This commit is contained in:
parent
1b24cb9fc2
commit
9eead3037d
@ -468,6 +468,7 @@ void QupZilla::setupMenu()
|
||||
infoAction->setShortcut(QKeySequence(QKeySequence::HelpContents));
|
||||
connect(infoAction, SIGNAL(triggered()), this, SLOT(loadActionUrlInNewTab()));
|
||||
m_menuHelp->addAction(infoAction);
|
||||
m_menuHelp->addAction(tr("Configuration Information"), this, SLOT(loadActionUrlInNewTab()))->setData(QUrl("qupzilla:config"));
|
||||
m_menuHelp->addAction(tr("Report &Issue"), this, SLOT(loadActionUrlInNewTab()))->setData(QUrl("qupzilla:reportbug"));
|
||||
|
||||
/************
|
||||
|
@ -24,13 +24,6 @@ p {margin-left: 1%;}
|
||||
%VERSION-INFO%
|
||||
</dl>
|
||||
|
||||
<h2>%BROWSER-IDENTIFICATION%</h2>
|
||||
<p>%USER-AGENT%</p>
|
||||
|
||||
<h2>%PATHS%</h2>
|
||||
<dl>
|
||||
%PATHS-TEXT%
|
||||
</dl>
|
||||
<h3>%MAIN-DEVELOPER%</h3>
|
||||
<p>%MAIN-DEVELOPER-TEXT%</p>
|
||||
<h3>%CONTRIBUTORS%</h3>
|
||||
|
@ -18,6 +18,7 @@ table.tbl {width: 100%;margin: 15px 0;border-radius: 4px;padding: 0px;border: 2p
|
||||
.tbl th[colspan="2"] {text-align: center;background: #ddd;font-style:normal;}
|
||||
.tbl td{border-radius: 2px;border: 1px solid #aaa;text-align: center;padding:1px 3px;}
|
||||
.tbl td:first-child{background: #eee;text-align: left;padding:1px 3px 1px 5px;}
|
||||
.no-available-plugins{background: white !important; text-align: center !important;}
|
||||
.tbl td:nth-of-type(2){color: black;max-width: 400px;max-height: 50px;overflow:auto;}
|
||||
</style>
|
||||
</head>
|
||||
@ -30,6 +31,25 @@ table.tbl {width: 100%;margin: 15px 0;border-radius: 4px;padding: 0px;border: 2p
|
||||
%VERSION-INFO%
|
||||
</dl>
|
||||
|
||||
<h2>%BROWSER-IDENTIFICATION%</h2>
|
||||
<p>%USER-AGENT%</p>
|
||||
|
||||
<h2>%PATHS%</h2>
|
||||
<dl>
|
||||
%PATHS-TEXT%
|
||||
</dl>
|
||||
|
||||
<h2>%PLUGINS%</h2>
|
||||
|
||||
<table class="tbl">
|
||||
<thead>
|
||||
<tr><th>%PL-NAME%</th><th>%PL-VER%</th><th>%PL-AUTH%</th><th>%PL-DESC%</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
%PLUGINS-INFO%
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h2>%PREFS%</h2>
|
||||
|
||||
<table class="tbl">
|
||||
@ -41,17 +61,6 @@ table.tbl {width: 100%;margin: 15px 0;border-radius: 4px;padding: 0px;border: 2p
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h2>%PLUGINS%</h2>
|
||||
|
||||
<table class="tbl">
|
||||
<thead>
|
||||
<tr><th>%PL-NAME%</th><th>%PL-VER%</th><th>%PL-AUTH%</th><th>%PL-DESC%</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
%PLUGINS-INFO%
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<small style="text-align:justify">
|
||||
%CONFIG-ABOUT%
|
||||
</small>
|
||||
|
@ -181,28 +181,15 @@ QString QupZillaSchemeReply::aboutPage()
|
||||
aPage.replace("%TITLE%", tr("About QupZilla"));
|
||||
aPage.replace("%ABOUT-QUPZILLA%", tr("About QupZilla"));
|
||||
aPage.replace("%INFORMATIONS-ABOUT-VERSION%", tr("Information about version"));
|
||||
aPage.replace("%BROWSER-IDENTIFICATION%", tr("Browser Identification"));
|
||||
aPage.replace("%PATHS%", tr("Paths"));
|
||||
aPage.replace("%COPYRIGHT%", tr("Copyright"));
|
||||
|
||||
aPage.replace("%VERSION-INFO%",
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Version"), QupZilla::VERSION
|
||||
#ifdef GIT_REVISION
|
||||
+ " (" + GIT_REVISION + ")"
|
||||
#endif
|
||||
) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("WebKit version"), QupZilla::WEBKITVERSION) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Build time"), QupZilla::BUILDTIME) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Platform"), qz_buildSystem()));
|
||||
aPage.replace("%PATHS-TEXT%",
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Profile"), mApp->getActiveProfilPath()) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Settings"), mApp->getActiveProfilPath() + "settings.ini") +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Saved session"), mApp->getActiveProfilPath() + "session.dat") +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Pinned tabs"), mApp->getActiveProfilPath() + "pinnedtabs.dat") +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Data"), mApp->DATADIR) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Themes"), mApp->THEMESDIR) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Plugins"), mApp->PLUGINSDIR) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Translations"), mApp->TRANSLATIONSDIR));
|
||||
#ifdef GIT_REVISION
|
||||
+ " (" + GIT_REVISION + ")"
|
||||
#endif
|
||||
) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("WebKit version"), QupZilla::WEBKITVERSION));
|
||||
aPage.replace("%MAIN-DEVELOPER%", tr("Main developer"));
|
||||
aPage.replace("%MAIN-DEVELOPER-TEXT%", authorString(QupZilla::AUTHOR.toUtf8(), "nowrep@gmail.com"));
|
||||
aPage.replace("%CONTRIBUTORS%", tr("Contributors"));
|
||||
@ -212,7 +199,7 @@ QString QupZillaSchemeReply::aboutPage()
|
||||
authorString("Mariusz Fik", "fisiu@opensuse.org") + "<br/>" +
|
||||
authorString("Jan Rajnoha", "honza.rajny@hotmail.com") + "<br/>" +
|
||||
authorString("Daniele Cocca", "jmc@chakra-project.org")
|
||||
);
|
||||
);
|
||||
aPage.replace("%TRANSLATORS%", tr("Translators"));
|
||||
aPage.replace("%TRANSLATORS-TEXT%",
|
||||
authorString("Heimen Stoffels", "vistausss@gmail.com") + " (Dutch)<br/>" +
|
||||
@ -233,13 +220,10 @@ QString QupZillaSchemeReply::aboutPage()
|
||||
authorString("Mladen Pejaković", "pejakm@gmail.com") + " (Serbian)<br/>" +
|
||||
authorString("Unink-Lio", "unink4451@163.com") + " (Chinese)<br/>" +
|
||||
authorString("Wu Cheng-Hong", "stu2731652@gmail.com") + " (Traditional Chinese)"
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
QString page = aPage;
|
||||
page.replace("%USER-AGENT%", mApp->getWindow()->weView()->webPage()->userAgentForUrl(QUrl()));
|
||||
|
||||
return page;
|
||||
return aPage;
|
||||
}
|
||||
|
||||
QString QupZillaSchemeReply::speeddialPage()
|
||||
@ -304,10 +288,12 @@ QString QupZillaSchemeReply::configPage()
|
||||
cPage.replace("%BOX-BORDER%", "qrc:html/box-border.png");
|
||||
cPage.replace("%ABOUT-IMG%", "qrc:icons/other/about.png");
|
||||
|
||||
cPage.replace("%TITLE%", tr("QupZilla Configuration Information"));
|
||||
cPage.replace("%TITLE%", tr("Configuration Information"));
|
||||
cPage.replace("%CONFIG%", tr("Configuration Information"));
|
||||
cPage.replace("%INFORMATIONS-ABOUT-VERSION%", tr("Information about version"));
|
||||
cPage.replace("%CONFIG-ABOUT%", tr("This page contains information about Qupzilla's current configuration, plugins, etc, all relevant information for troubleshooting. Please include these information when sending bug reports."));
|
||||
cPage.replace("%BROWSER-IDENTIFICATION%", tr("Browser Identification"));
|
||||
cPage.replace("%PATHS%", tr("Paths"));
|
||||
cPage.replace("%PREFS%", tr("Preferences"));
|
||||
cPage.replace("%OPTION%", tr("Option"));
|
||||
cPage.replace("%VALUE%", tr("Value"));
|
||||
@ -317,47 +303,90 @@ QString QupZillaSchemeReply::configPage()
|
||||
cPage.replace("%PL-AUTH%", tr("Author"));
|
||||
cPage.replace("%PL-DESC%", tr("Description"));
|
||||
|
||||
cPage.replace("%PATHS-TEXT%",
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Profile"), mApp->getActiveProfilPath()) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Settings"), mApp->getActiveProfilPath() + "settings.ini") +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Saved session"), mApp->getActiveProfilPath() + "session.dat") +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Pinned tabs"), mApp->getActiveProfilPath() + "pinnedtabs.dat") +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Data"), mApp->DATADIR) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Themes"), mApp->THEMESDIR) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Plugins"), mApp->PLUGINSDIR) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Translations"), mApp->TRANSLATIONSDIR));
|
||||
|
||||
cPage.replace("%USER-AGENT%", mApp->getWindow()->weView()->webPage()->userAgentForUrl(QUrl()));
|
||||
|
||||
|
||||
cPage.replace("%VERSION-INFO%",
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Version"), QupZilla::VERSION
|
||||
#ifdef GIT_REVISION
|
||||
+ " (" + GIT_REVISION + ")"
|
||||
#endif
|
||||
) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Application version"), QupZilla::VERSION
|
||||
#ifdef GIT_REVISION
|
||||
+ " (" + GIT_REVISION + ")"
|
||||
#endif
|
||||
) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Qt version"), QT_VERSION_STR) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("WebKit version"), QupZilla::WEBKITVERSION) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Build time"), QupZilla::BUILDTIME) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Platform"), qz_buildSystem()));
|
||||
|
||||
QString allGroupsString;
|
||||
QSettings* settings = Settings::globalSettings();
|
||||
foreach (const QString &group, settings->childGroups()) {
|
||||
QString groupString = QString("<tr><th colspan=\"2\">%1</th></tr>").arg(group);
|
||||
settings->beginGroup(group);
|
||||
QString pluginsString;
|
||||
QStringList availablePlugins = mApp->plugins()->getAvailablePlugins();
|
||||
|
||||
foreach (const QString &key, settings->childKeys()) {
|
||||
groupString.append(QString("<tr><td>%1</td><td>%2</td></tr>").arg(key, settings->value(key).toString()));
|
||||
foreach(const QString & fileName, availablePlugins) {
|
||||
PluginInterface* plugin = mApp->plugins()->getPlugin(fileName);
|
||||
if (!plugin) {
|
||||
continue;
|
||||
}
|
||||
pluginsString.append(QString("<tr><td>%1</td><td>%2</td><td>%3</td><td>%4</td></tr>").arg(
|
||||
plugin->pluginName(), plugin->pluginVersion(),
|
||||
Qt::escape(plugin->pluginAuthor()), plugin->pluginDescription()));
|
||||
}
|
||||
|
||||
settings->endGroup();
|
||||
if (pluginsString.isEmpty()) {
|
||||
pluginsString = QString("<tr><td colspan=4 class=\"no-available-plugins\">%1</td></tr>").arg(tr("No available plugins."));
|
||||
}
|
||||
|
||||
allGroupsString.append(groupString);
|
||||
cPage.replace("%PLUGINS-INFO%", pluginsString);
|
||||
|
||||
QString allGroupsString;
|
||||
QSettings* settings = Settings::globalSettings();
|
||||
foreach(const QString & group, settings->childGroups()) {
|
||||
QString groupString = QString("<tr><th colspan=\"2\">%1</th></tr>").arg(group);
|
||||
settings->beginGroup(group);
|
||||
|
||||
foreach(const QString & key, settings->childKeys()) {
|
||||
const QVariant &keyValue = settings->value(key);
|
||||
QString keyString;
|
||||
|
||||
switch (keyValue.type()) {
|
||||
case QVariant::ByteArray:
|
||||
keyString = "QByteArray";
|
||||
break;
|
||||
|
||||
case QVariant::Point: {
|
||||
const QPoint point = keyValue.toPoint();
|
||||
keyString = QString("QPoint(%1, %2)").arg(QString::number(point.x()), QString::number(point.y()));
|
||||
break;
|
||||
}
|
||||
|
||||
case QVariant::StringList:
|
||||
keyString = keyValue.toStringList().join(",");
|
||||
break;
|
||||
|
||||
default:
|
||||
keyString = keyValue.toString();
|
||||
}
|
||||
|
||||
if (keyString.isEmpty()) {
|
||||
keyString = "\"empty\"";
|
||||
}
|
||||
|
||||
groupString.append(QString("<tr><td>%1</td><td>%2</td></tr>").arg(key, Qt::escape(keyString)));
|
||||
}
|
||||
|
||||
settings->endGroup();
|
||||
allGroupsString.append(groupString);
|
||||
}
|
||||
|
||||
cPage.replace("%PREFS-INFO%", allGroupsString);
|
||||
|
||||
// getPluginsList());
|
||||
QString pluginsString;
|
||||
QStringList availablePlugins = mApp->plugins()->getAvailablePlugins();
|
||||
QStringList allowedPlugins = mApp->plugins()->getAllowedPlugins();
|
||||
foreach(const QString & fileName, availablePlugins) {
|
||||
PluginInterface* plugin = mApp->plugins()->getPlugin(fileName);
|
||||
if (!plugin) {
|
||||
continue;
|
||||
}
|
||||
pluginsString.append(QString("<tr><td>%1</td><td>%2</td><td>%3</td><td>%4</td></tr>").arg(plugin->pluginName(), plugin->pluginVersion(), plugin->pluginAuthor().replace("<", "<"), plugin->pluginDescription()));
|
||||
}
|
||||
|
||||
cPage.replace("%PLUGINS-INFO%", pluginsString);
|
||||
|
||||
}
|
||||
return cPage;
|
||||
}
|
Loading…
Reference in New Issue
Block a user