summaryrefslogtreecommitdiff
path: root/src/protocolhandler.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-05-25 15:58:13 +0200
committerAndrea Diamantini <adjam7@gmail.com>2012-05-25 15:58:13 +0200
commit8e15eef308f82528e304573e6250d09c2fc1ca64 (patch)
tree07b65482833408a00f34f37ed7210ab71221713a /src/protocolhandler.cpp
parentrekonq 0.9.58 (diff)
downloadrekonq-8e15eef308f82528e304573e6250d09c2fc1ca64.tar.xz
clean up rekonqinfo css
Diffstat (limited to 'src/protocolhandler.cpp')
-rw-r--r--src/protocolhandler.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/protocolhandler.cpp b/src/protocolhandler.cpp
index d69171ac..292ca7d9 100644
--- a/src/protocolhandler.cpp
+++ b/src/protocolhandler.cpp
@@ -294,7 +294,14 @@ QString ProtocolHandler::dirHandling(const KFileItemList &list)
return QString("rekonq error, sorry :(");
}
+ // 1. default data path
+ QString dataPath = QL1S("file://") + infoFilePath;
+ dataPath.remove(QL1S("/htmls/rekonqinfo.html"));
+
+ // 2. title
QString title = _url.prettyUrl();
+
+ // 3. main content
QString msg = i18nc("%1=an URL", "<h1>Index of %1</h1>", _url.prettyUrl());
@@ -338,11 +345,12 @@ QString ProtocolHandler::dirHandling(const KFileItemList &list)
}
msg += "</table>";
+ // done. Replace variables and show it
+ QString html = QL1S(file.readAll());
- QString html = QString(QL1S(file.readAll()))
- .arg(title)
- .arg(msg)
- ;
+ html.replace(QL1S("$DEFAULT_PATH"), dataPath);
+ html.replace(QL1S("$PAGE_TITLE"), title);
+ html.replace(QL1S("$MAIN_CONTENT"), msg);
return html;
}