From e6edae7d6392b19208e2cb4cd71d1cdcaedd33fb Mon Sep 17 00:00:00 2001 From: David Rosca Date: Sat, 27 Jan 2018 20:17:30 +0100 Subject: [PATCH] Show all data paths in falkon:config page Also show Extensions paths. --- src/lib/data/html/config.html | 2 +- .../schemehandlers/falkonschemehandler.cpp | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/lib/data/html/config.html b/src/lib/data/html/config.html index 8365666f2..e0102f15c 100644 --- a/src/lib/data/html/config.html +++ b/src/lib/data/html/config.html @@ -9,7 +9,7 @@ h1 {color: #1a4ba4;font-size: 160%;margin-bottom: 0px;} h2 {margin: 5px 0px;font-size: 100%;color: #525c66;font-weight: bold;} dl {margin-top: 0px;} dt {display: block;float: %LEFT_STR%;min-width: 24%;margin: 0 0 0.3em 1%} -dd {color: black;margin: 0 0 0.3em 28%;} +dd {color: black;margin: 0 0 0.3em 28%;word-wrap:break-word;} p {margin-%LEFT_STR%: 1%;} .about-img {float: %RIGHT_STR%;margin-top:10px;width:230px;} table.tbl {width: 100%;margin: 15px 0;border-radius: 4px;padding: 0px;border: 2px solid #aaa;border-collapse: separate;} diff --git a/src/lib/network/schemehandlers/falkonschemehandler.cpp b/src/lib/network/schemehandlers/falkonschemehandler.cpp index fc4ff6551..195173888 100644 --- a/src/lib/network/schemehandlers/falkonschemehandler.cpp +++ b/src/lib/network/schemehandlers/falkonschemehandler.cpp @@ -385,6 +385,18 @@ QString FalkonSchemeReply::configPage() cPage.replace(QLatin1String("%PL-AUTH%"), tr("Author")); cPage.replace(QLatin1String("%PL-DESC%"), tr("Description")); + auto allPaths = [](DataPaths::Path type) { + QString out; + const auto paths = DataPaths::allPaths(type); + for (const QString &path : paths) { + if (!out.isEmpty()) { + out.append(QSL("
")); + } + out.append(path); + } + return out; + }; + cPage.replace(QLatin1String("%VERSION-INFO%"), QString("
%1
%2
").arg(tr("Application version"), #ifdef FALKON_GIT_REVISION @@ -400,9 +412,10 @@ QString FalkonSchemeReply::configPage() QString("
%1
%2
").arg(tr("Profile"), DataPaths::currentProfilePath()) + QString("
%1
%2
").arg(tr("Settings"), DataPaths::currentProfilePath() + "/settings.ini") + QString("
%1
%2
").arg(tr("Saved session"), SessionManager::defaultSessionPath()) + - QString("
%1
%2
").arg(tr("Data"), DataPaths::path(DataPaths::AppData)) + - QString("
%1
%2
").arg(tr("Themes"), DataPaths::path(DataPaths::Themes)) + - QString("
%1
%2
").arg(tr("Translations"), DataPaths::path(DataPaths::Translations))); + QString("
%1
%2
").arg(tr("Data"), allPaths(DataPaths::AppData)) + + QString("
%1
%2
").arg(tr("Themes"), allPaths(DataPaths::Themes)) + + QString("
%1
%2
").arg(tr("Extensions"), allPaths(DataPaths::Plugins)) + + QString("
%1
%2
").arg(tr("Translations"), allPaths(DataPaths::Translations))); #ifdef QT_DEBUG QString debugBuild = tr("Enabled");