[SCM] ktp-accounts-kcm packaging branch, master, updated. debian/15.12.1-1-1157-gc4589c5

Maximiliano Curia maxy at moszumanska.debian.org
Fri May 27 23:58:05 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-accounts-kcm.git;a=commitdiff;h=45cfc74

The following commit has been merged in the master branch:
commit 45cfc7474b016fc5b77bf7115cb74cb7f8dbb871
Author: Matteo Nardi <91.matteo at gmail.com>
Date:   Tue Aug 11 08:08:11 2009 +0000

    Display localized names of protocols.
    BUG: 202502
    
    svn path=/trunk/playground/network/telepathy-accounts-kcm/; revision=1009908
---
 src/KCMTelepathyAccounts/dictionary.cpp          | 20 +++++++++++++++++++-
 src/KCMTelepathyAccounts/protocol-item.cpp       | 11 ++++++++++-
 src/KCMTelepathyAccounts/protocol-item.h         |  2 ++
 src/KCMTelepathyAccounts/protocol-list-model.cpp |  2 +-
 4 files changed, 32 insertions(+), 3 deletions(-)

diff --git a/src/KCMTelepathyAccounts/dictionary.cpp b/src/KCMTelepathyAccounts/dictionary.cpp
index dd8b14b..2eeff58 100644
--- a/src/KCMTelepathyAccounts/dictionary.cpp
+++ b/src/KCMTelepathyAccounts/dictionary.cpp
@@ -32,7 +32,7 @@ Dictionary::Dictionary()
     // Set up the singleton instance
     s_self = this;
 
-    // TODO: Populate the dictionary
+    // Parameters
     m_strings.insert("password", i18n("Password"));
     m_strings.insert("account", i18n("Account"));
     m_strings.insert("priority", i18n("Priority"));
@@ -54,6 +54,24 @@ Dictionary::Dictionary()
     m_strings.insert("https-proxy-server", i18n("HTTPS Proxy Server Address"));
     m_strings.insert("ignore-ssl-errors", i18n("Ignore SSL Errors"));
     m_strings.insert("keepalive-interval", i18n("Keepalive Interval"));
+
+    // Protocols
+    m_strings.insert("aim", i18n("AOL Instant Messenger"));
+    m_strings.insert("gadugadu", i18n("Gadu-Gadu"));
+    m_strings.insert("groupwise", i18n("Novell Groupwise"));
+    m_strings.insert("icq", i18n("ICQ"));
+    m_strings.insert("irc", i18n("Internet Relay Chat"));
+    m_strings.insert("jabber", i18n("Jabber/XMPP/Google Talk"));
+    m_strings.insert("local-xmpp", i18n("Bonjour/Salut"));
+    m_strings.insert("msn", i18n("Windows Live Messenger"));
+    m_strings.insert("myspace", i18n("MySpaceIM"));
+    m_strings.insert("qq", i18n("Tencent QQ"));
+    m_strings.insert("sametime", i18n("IBM Lotus Sametime"));
+    m_strings.insert("silc", i18n("SILC"));
+    m_strings.insert("sip", i18n("Session Initiation Protocol (SIP)"));
+    m_strings.insert("trepia", i18n("Trepia"));
+    m_strings.insert("yahoo", i18n("Yahoo! Messenger"));
+    m_strings.insert("zephyr", i18n("Zephyr"));
 }
 
 Dictionary::~Dictionary()
diff --git a/src/KCMTelepathyAccounts/protocol-item.cpp b/src/KCMTelepathyAccounts/protocol-item.cpp
index 423f576..29c6dfe 100644
--- a/src/KCMTelepathyAccounts/protocol-item.cpp
+++ b/src/KCMTelepathyAccounts/protocol-item.cpp
@@ -21,6 +21,7 @@
 #include "protocol-item.h"
 
 #include "connection-manager-item.h"
+#include "dictionary.h"
 
 #include <KDebug>
 
@@ -30,7 +31,10 @@ ProtocolItem::ProtocolItem(const QString &protocol, ConnectionManagerItem *paren
 {
     kDebug() << "Creating new ProtocolItem with cmItem: " << parent << " and protocol;" << protocol;
 
-    // TODO: Implement me!
+    m_localizedName = Dictionary::instance()->string(protocol);
+    if(m_localizedName.isEmpty()) {
+        m_localizedName = protocol;
+    }
 }
 
 ProtocolItem::~ProtocolItem()
@@ -45,6 +49,11 @@ QString ProtocolItem::protocol() const
     return m_protocol;
 }
 
+QString ProtocolItem::localizedName() const
+{
+    return m_localizedName;
+}
+
 Tp::ProtocolParameterList ProtocolItem::mandatoryParameters() const
 {
     kDebug();
diff --git a/src/KCMTelepathyAccounts/protocol-item.h b/src/KCMTelepathyAccounts/protocol-item.h
index aba0ba0..d3ffa28 100644
--- a/src/KCMTelepathyAccounts/protocol-item.h
+++ b/src/KCMTelepathyAccounts/protocol-item.h
@@ -40,12 +40,14 @@ public:
     virtual ~ProtocolItem();
 
     QString protocol() const;
+    QString localizedName() const;
 
     Tp::ProtocolParameterList mandatoryParameters() const;
     Tp::ProtocolParameterList optionalParameters() const;
 
 private:
     QString m_protocol;
+    QString m_localizedName;
 };
 
 
diff --git a/src/KCMTelepathyAccounts/protocol-list-model.cpp b/src/KCMTelepathyAccounts/protocol-list-model.cpp
index ad23a07..168c6c5 100644
--- a/src/KCMTelepathyAccounts/protocol-list-model.cpp
+++ b/src/KCMTelepathyAccounts/protocol-list-model.cpp
@@ -63,7 +63,7 @@ QVariant ProtocolListModel::data(const QModelIndex &index, int role) const
     switch(role)
     {
     case Qt::DisplayRole:
-        data = QVariant(m_protocolItems.at(index.row())->protocol());
+        data = QVariant(m_protocolItems.at(index.row())->localizedName());
         break;
     case Qt::DecorationRole:
         // Look for an icon named im-<protocolname>

-- 
ktp-accounts-kcm packaging



More information about the pkg-kde-commits mailing list