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


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

The following commit has been merged in the master branch:
commit 3f06c0c7f9599ef9f618dfd4cdcd3e68244cab24
Author: Daniele E. Domenichelli <daniele.domenichelli at gmail.com>
Date:   Mon Aug 27 15:44:01 2012 +0200

    Update the Account Icon toolbar item icon size when the toolbar icons size changes
    
    Reviewed-by: Martin Klapetek <martin.klapetek at gmail.com>
    BUG: 305878
    FIXED-IN: 0.5.1
---
 app/chat-window.cpp | 14 +++++++++++---
 app/chat-window.h   |  4 +---
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/app/chat-window.cpp b/app/chat-window.cpp
index eb1b7a0..048632c 100644
--- a/app/chat-window.cpp
+++ b/app/chat-window.cpp
@@ -105,6 +105,12 @@ ChatWindow::ChatWindow()
     setCentralWidget(m_tabWidget);
 
     setupGUI(QSize(460, 440), static_cast<StandardWindowOptions>(Default^StatusBar), QLatin1String("chatwindow.rc"));
+
+    // Connects the toolbars iconSizeChanged to the custom toolbar item
+    // NOTE Must be called after setupGUI or the toolbars won't be created
+    Q_FOREACH(KToolBar *toolbar, toolBars()) {
+        connect(toolbar, SIGNAL(iconSizeChanged(const QSize&)), SLOT(updateAccountIcon()));
+    }
 }
 
 ChatWindow::~ChatWindow()
@@ -331,7 +337,7 @@ void ChatWindow::onCurrentIndexChanged(int index)
     setPreviousConversationsEnabled(currentChatTab->previousConversationAvailable());
 #endif
 
-    setAccountIcon(currentChatTab->accountIcon());
+    updateAccountIcon();
 }
 
 void ChatWindow::onEnableSearchActions(bool enable)
@@ -698,9 +704,11 @@ void ChatWindow::setPreviousConversationsEnabled ( bool enable )
     }
 }
 
-void ChatWindow::setAccountIcon(const QIcon &icon)
+void ChatWindow::updateAccountIcon()
 {
-    m_accountIconLabel->setPixmap(icon.pixmap(toolBar()->iconSize()));
+    int index = m_tabWidget->currentIndex();
+    ChatTab *currentChatTab = qobject_cast<ChatTab*>(m_tabWidget->widget(index));
+    m_accountIconLabel->setPixmap(currentChatTab->accountIcon().pixmap(toolBar()->iconSize()));
 }
 
 void ChatWindow::startAudioCall(const Tp::AccountPtr& account, const Tp::ContactPtr& contact)
diff --git a/app/chat-window.h b/app/chat-window.h
index 6fd1c29..837a404 100644
--- a/app/chat-window.h
+++ b/app/chat-window.h
@@ -100,6 +100,7 @@ private Q_SLOTS:
     void onOpenLogTriggered();                                  /** Starts ktp-log-viewer accountId contactId */
     void setTabSpellDictionary(const QString &dict);            /** set the spelling language for the current chat tab*/
     void toggleBlockButton(bool contactIsBlocked);              /** Toggle block/unblock action according to the flag */
+    void updateAccountIcon();                                   /** Update account icon fake action */
 
 protected Q_SLOTS:
     void showSettingsDialog();
@@ -134,9 +135,6 @@ private:
     void setShareDesktopEnabled(bool enable);
     void setPreviousConversationsEnabled(bool enable);
 
-    /** setter for account icon fake action */
-    void setAccountIcon(const QIcon &protocolIcon);
-
     /** starts audio call with given contact
      * @param account account sending the audio call request
      * @param contact contact with whom to start audio call

-- 
ktp-text-ui packaging



More information about the pkg-kde-commits mailing list