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


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

The following commit has been merged in the master branch:
commit 3ca24fbeabfdc6827f8fbe7a5bd05af561236807
Author: Daniele E. Domenichelli <daniele.domenichelli at gmail.com>
Date:   Fri Nov 9 21:29:26 2012 +0100

    Fix the logviewer showing twice "Previous conversation" and "Next conversation"
    
    Reviewed-by: David Edmundson <kde at davidedmundson.co.uk>
    Reviewed-by: Dan Vrátil <dvratil at redhat.com>
    REVIEW: 107269
    BUG: 309828
    FIXED-IN: 0.5.2
---
 logviewer/message-view.cpp | 46 +++++++++++++---------------------------------
 logviewer/message-view.h   | 10 +++-------
 2 files changed, 16 insertions(+), 40 deletions(-)

diff --git a/logviewer/message-view.cpp b/logviewer/message-view.cpp
index 012c3b7..d80a3eb 100644
--- a/logviewer/message-view.cpp
+++ b/logviewer/message-view.cpp
@@ -33,7 +33,7 @@
 MessageView::MessageView(QWidget *parent) :
     AdiumThemeView(parent)
 {
-    connect(this, SIGNAL(loadFinished(bool)), SLOT(onLoadFinished()));
+    connect(this, SIGNAL(loadFinished(bool)), SLOT(processStoredEvents()));
 }
 
 
@@ -41,21 +41,18 @@ void MessageView::loadLog(const Tp::AccountPtr &account, const Tpl::EntityPtr &e
                           const Tp::ContactPtr &contact, const QDate &date,
                           const QPair< QDate, QDate > &nearestDates)
 {
-
     if (account.isNull() || entity.isNull()) {
         //note contact can be null
         kWarning() << "invalid account/contact. Not loading log";
         return;
     }
-    
+
     m_account = account;
     m_entity = entity;
     m_contact = contact;
     m_date = date;
     m_prev = nearestDates.first;
     m_next = nearestDates.second;
-    m_initialized = false;
-    m_templateLoaded = false;
 
     if (entity->entityType() == Tpl::EntityTypeRoom) {
         load(AdiumThemeView::GroupChat);
@@ -85,41 +82,24 @@ void MessageView::clearHighlightText()
     setHighlightText(QString());
 }
 
-void MessageView::onLoadFinished()
-{
-    processStoredEvents();
-
-    m_templateLoaded = true;
-}
-
 void MessageView::onEventsLoaded(Tpl::PendingOperation *po)
 {
     Tpl::PendingEvents *pe = qobject_cast<Tpl::PendingEvents*>(po);
+    m_events << pe->events();
 
     /* Wait with initialization for the first event so that we can know when the chat session started */
-    if (!m_initialized) {
-        AdiumThemeHeaderInfo headerInfo;
-        headerInfo.setDestinationDisplayName(m_contact.isNull() ? m_entity->alias() : m_contact->alias());
-        headerInfo.setChatName(m_contact.isNull() ? m_entity->alias() : m_contact->alias());
-        headerInfo.setGroupChat(m_entity->entityType() == Tpl::EntityTypeRoom);
-        headerInfo.setSourceName(m_account->displayName());
-        headerInfo.setIncomingIconPath(m_contact.isNull() ? QString() : m_contact->avatarData().fileName);
-
-        if (pe->events().count() > 0 && !pe->events().first().isNull()) {
-            headerInfo.setTimeOpened(pe->events().first()->timestamp());
-        }
-
-        initialise(headerInfo);
-
-        m_initialized = true;
+    AdiumThemeHeaderInfo headerInfo;
+    headerInfo.setDestinationDisplayName(m_contact.isNull() ? m_entity->alias() : m_contact->alias());
+    headerInfo.setChatName(m_contact.isNull() ? m_entity->alias() : m_contact->alias());
+    headerInfo.setGroupChat(m_entity->entityType() == Tpl::EntityTypeRoom);
+    headerInfo.setSourceName(m_account->displayName());
+    headerInfo.setIncomingIconPath(m_contact.isNull() ? QString() : m_contact->avatarData().fileName);
+
+    if (pe->events().count() > 0 && !pe->events().first().isNull()) {
+        headerInfo.setTimeOpened(pe->events().first()->timestamp());
     }
 
-    m_events << pe->events();
-
-    /* Don't add retrieved messages until template is loaded */
-    if (m_templateLoaded) {
-        processStoredEvents();
-    }
+    initialise(headerInfo);
 }
 
 
diff --git a/logviewer/message-view.h b/logviewer/message-view.h
index 0c90ded..c9ae322 100644
--- a/logviewer/message-view.h
+++ b/logviewer/message-view.h
@@ -46,16 +46,14 @@ public Q_SLOTS:
     void onLinkClicked(const QUrl &link);
 
 private Q_SLOTS:
-   void onLoadFinished();
-   void onEventsLoaded(Tpl::PendingOperation* po);
-   void doHighlightText();
+    void onEventsLoaded(Tpl::PendingOperation* po);
+    void doHighlightText();
+    void processStoredEvents();
 
 Q_SIGNALS:
     void conversationSwitchRequested(const QDate &date);
 
 private:
-    void processStoredEvents();
-
     Tpl::EntityPtr m_entity;
     Tp::AccountPtr m_account;
     Tp::ContactPtr m_contact;
@@ -66,8 +64,6 @@ private:
     QString m_highlightedText;
 
     Tpl::EventPtrList m_events;
-    bool m_initialized;
-    bool m_templateLoaded;
 
     QString m_accountAvatar;
 };

-- 
ktp-text-ui packaging



More information about the pkg-kde-commits mailing list