[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [ktp-text-ui/filters] lib: Inject the scripts and the css before the end of the head tag
From: Daniele E. Domenichelli <daniele.domenichelli () gmail ! com>
Date: 2012-09-22 19:03:45
Message-ID: 20120922190345.CA194A60C6 () git ! kde ! org
[Download RAW message or body]
Git commit 027bb0ea5ad4c0ffc453fb04ad5e7e82d2f5c63b by Daniele E. Domenichelli.
Committed on 31/08/2012 at 12:33.
Pushed by ddomenichelli into branch 'filters'.
Inject the scripts and the css before the end of the head tag
M +7 -0 lib/adium-theme-view.cpp
http://commits.kde.org/telepathy-text-ui/027bb0ea5ad4c0ffc453fb04ad5e7e82d2f5c63b
diff --git a/lib/adium-theme-view.cpp b/lib/adium-theme-view.cpp
index df2b6d7..ca975f0 100644
--- a/lib/adium-theme-view.cpp
+++ b/lib/adium-theme-view.cpp
@@ -25,6 +25,7 @@
#include "adium-theme-status-info.h"
#include "chat-window-style-manager.h"
#include "chat-window-style.h"
+#include "message-processor.h"
#include <QtCore/QFile>
#include <QtCore/QTextCodec>
@@ -211,6 +212,12 @@ void AdiumThemeView::initialise(const AdiumThemeHeaderInfo &chatInfo)
index = templateHtml.indexOf(QLatin1String("%@"), index);
templateHtml.replace(index, 2, footerHtml);
+ // Inject the scripts and the css just before the end of the head tag
+ index = templateHtml.indexOf(QLatin1String("</head>"));
+ templateHtml.insert(index, MessageProcessor::instance()->header());
+
+ kWarning() << templateHtml;
+
setHtml(templateHtml);
//hidden HTML debugging mode. Should have no visible way to turn it on.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic