[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:18:22 UTC 2016


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

The following commit has been merged in the master branch:
commit 4dca39bfa356510dca53b381fad3231bf1a1ac23
Author: Dominik Schmidt <ich at dominik-schmidt.de>
Date:   Mon Oct 4 00:57:53 2010 +0000

    Add support for boolean properties to the plist file reader.
    
    svn path=/trunk/playground/network/telepathy-chat-handler/; revision=1182266
---
 lib/chatstyleplistfilereader.cpp | 60 ++++++++++++++++++++++++++++++++++++++--
 lib/chatstyleplistfilereader.h   | 11 ++++++++
 2 files changed, 69 insertions(+), 2 deletions(-)

diff --git a/lib/chatstyleplistfilereader.cpp b/lib/chatstyleplistfilereader.cpp
index 6864097..96bead4 100644
--- a/lib/chatstyleplistfilereader.cpp
+++ b/lib/chatstyleplistfilereader.cpp
@@ -72,10 +72,16 @@ ChatStylePlistFileReader::Status ChatStylePlistFileReader::parse(const QDomDocum
 {
     QString key, value;
     QDomNodeList keyElements = document.elementsByTagName("key");
+
     for (int i = 0; i < keyElements.size(); i++) {
         if (keyElements.at(i).nextSibling().toElement().tagName() != "key") {
             key = keyElements.at(i).toElement().text();
-            value = keyElements.at(i).nextSibling().toElement().text();
+            QDomElement nextElement= keyElements.at(i).nextSibling().toElement();
+            if(nextElement.tagName() == "true" || nextElement.tagName() == "false") {
+                value = nextElement.tagName();
+            } else {
+                value = nextElement.text();
+            }
             d->data.insert(key, value);
         }
     }
@@ -126,4 +132,54 @@ int ChatStylePlistFileReader::messageViewVersion()
 ChatStylePlistFileReader::Status ChatStylePlistFileReader::status()
 {
     return d->m_status;
-}
\ No newline at end of file
+}
+
+bool ChatStylePlistFileReader::showUserIcons()
+{
+    return d->data.value("ShowUserIcons").toBool();
+}
+
+bool ChatStylePlistFileReader::showUserIcons(const QString& variantName)
+{
+    return d->data.value(QString("ShowUserIcons:%1").arg(variantName)).toBool();
+}
+
+bool ChatStylePlistFileReader::disableCombineConsecutive()
+{
+    return d->data.value("DisableCombineConsecutive").toBool();
+}
+
+bool ChatStylePlistFileReader::defaultBackgroundIsTransparent()
+{
+    return d->data.value("DefaultBackgroundIsTransparent").toBool();
+}
+
+bool ChatStylePlistFileReader::disableCustomBackground()
+{
+    return d->data.value("DisableCustomBackground").toBool();
+}
+
+QString ChatStylePlistFileReader::defaultBackgroundColor()
+{
+    return d->data.value("DefaultBackgroundColor").toString();
+}
+
+QString ChatStylePlistFileReader::defaultBackgroundColor(const QString& variantName)
+{
+    return d->data.value(QString("DefaultBackgroundColor:%1").arg(variantName)).toString();
+}
+
+bool ChatStylePlistFileReader::allowTextColors()
+{
+    return d->data.value("AllowTextColors").toBool();
+}
+
+bool ChatStylePlistFileReader::allowTextColors(const QString& variantName)
+{
+    return d->data.value(QString("AllowTextColors").arg(variantName)).toBool();
+}
+
+QString ChatStylePlistFileReader::imageMask()
+{
+    return d->data.value("ImageMask").toString();
+}
diff --git a/lib/chatstyleplistfilereader.h b/lib/chatstyleplistfilereader.h
index a206cdc..fef007a 100644
--- a/lib/chatstyleplistfilereader.h
+++ b/lib/chatstyleplistfilereader.h
@@ -44,6 +44,17 @@ public:
     int defaultFontSize();
     QString defaultVariant();
     int messageViewVersion();
+    bool showUserIcons();
+    bool showUserIcons(const QString &variantName);
+    bool disableCombineConsecutive();
+    bool defaultBackgroundIsTransparent();
+    bool disableCustomBackground();
+    QString defaultBackgroundColor();
+    QString defaultBackgroundColor(const QString &variantName);
+    bool allowTextColors();
+    bool allowTextColors(const QString &variantName);
+    QString imageMask();
+
     Status status();
 
 

-- 
ktp-text-ui packaging



More information about the pkg-kde-commits mailing list