[SCM] ktp-text-ui packaging branch, master, updated. debian/15.12.1-1-1918-gdf4b0ec

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:22:44 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=8e9b572

The following commit has been merged in the master branch:
commit 8e9b5728090a83713fb5ac37020f6d6fd1145176
Author: Daniele E. Domenichelli <daniele.domenichelli at gmail.com>
Date:   Thu Aug 30 11:18:01 2012 +0200

    Execute the script after appending a message
---
 lib/adium-theme-view.cpp | 10 +++++++---
 lib/adium-theme-view.h   |  2 +-
 lib/message.cpp          |  7 ++-----
 3 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/lib/adium-theme-view.cpp b/lib/adium-theme-view.cpp
index 5ae7a6a..f96c9cf 100644
--- a/lib/adium-theme-view.cpp
+++ b/lib/adium-theme-view.cpp
@@ -366,7 +366,7 @@ void AdiumThemeView::addContentMessage(const AdiumThemeContentInfo &contentMessa
                                  willAddMoreContentObjects,
                                  replaceLastContent);
 
-    appendMessage(styleHtml, mode);
+    appendMessage(styleHtml, message.script(), mode);
 }
 
 void AdiumThemeView::addStatusMessage(const AdiumThemeStatusInfo& statusMessage)
@@ -404,7 +404,7 @@ void AdiumThemeView::addStatusMessage(const AdiumThemeStatusInfo& statusMessage)
                                  willAddMoreContentObjects,
                                  replaceLastContent);
 
-    appendMessage(styleHtml, mode);
+    appendMessage(styleHtml, message.script(), mode);
 }
 
 QString AdiumThemeView::appendScript(AdiumThemeView::AppendMode mode)
@@ -475,11 +475,15 @@ AdiumThemeView::AppendMode AdiumThemeView::appendMode(const AdiumThemeMessageInf
     return mode;
 }
 
-void AdiumThemeView::appendMessage(QString &html, AppendMode mode)
+void AdiumThemeView::appendMessage(QString &html, const QString &script, AppendMode mode)
 {
     QString js = appendScript(mode).arg(html.replace(QLatin1Char('\"'), QLatin1String("\\""))
                                             .replace(QLatin1Char('
'), QLatin1String("")));
     page()->mainFrame()->evaluateJavaScript(js);
+
+    if (!script.isEmpty()) {
+        page()->mainFrame()->evaluateJavaScript(script);
+    }
 }
 
 void AdiumThemeView::onLinkClicked(const QUrl &url)
diff --git a/lib/adium-theme-view.h b/lib/adium-theme-view.h
index c3ba089..6b78f7f 100644
--- a/lib/adium-theme-view.h
+++ b/lib/adium-theme-view.h
@@ -110,7 +110,7 @@ private:
                           bool consecutive,
                           bool willAddMoreContentObjects,
                           bool replaceLastContent);
-    void appendMessage(QString&, AppendMode mode);
+    void appendMessage(QString &htmlMessage, const QString &script, AppendMode mode);
 
     QString replaceHeaderKeywords(QString htmlTemplate, const AdiumThemeHeaderInfo&);
     QString replaceContentKeywords(QString& htmlTemplate, const AdiumThemeContentInfo&);
diff --git a/lib/message.cpp b/lib/message.cpp
index ae05770..d832011 100644
--- a/lib/message.cpp
+++ b/lib/message.cpp
@@ -77,17 +77,14 @@ QString Message::finalizedScript() const
 
     Q_FOREACH(const QString &script, m_scripts) {
         if (!finalScript.contains(script)) {
-            if (!finalScript.isEmpty()) {
-                finalScript.append(QLatin1String("; "));
-            }
             finalScript.append(script);
         }
     }
     if (!finalScript.isEmpty()) {
-        finalScript.append(QLatin1String("; false;"));
+        finalScript.append(QLatin1String("false;"));
     }
 
-    kDebug() << finalScript;
+//    kDebug() << finalScript;
     return finalScript;
 }
 

-- 
ktp-text-ui packaging



More information about the pkg-kde-commits mailing list