[SCM] ktp-contact-list packaging branch, master, updated. debian/15.12.1-2-1070-g6c56f91

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:07:20 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-contact-list.git;a=commitdiff;h=56668be

The following commit has been merged in the master branch:
commit 56668be64e1b44cf6703e10cc6d70c325f04d099
Author: Rohan Garg <rohangarg at kubuntu.org>
Date:   Tue Sep 6 23:02:47 2011 +0530

    Set the current status to be bold and italicized in the contact list
    REVIEW : 102535
    Reviewed By : Martin Klapetek
---
 account-button.cpp | 23 +++++++++++++++++------
 account-button.h   |  1 +
 2 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/account-button.cpp b/account-button.cpp
index e4278a1..3e1ae33 100644
--- a/account-button.cpp
+++ b/account-button.cpp
@@ -127,11 +127,6 @@ AccountButton::AccountButton(const Tp::AccountPtr &account, QWidget* parent)
 
     setMenu(presenceMenu);
 
-    //make all the actions checkable
-    foreach (QAction *a, actions()) {
-        a->setCheckable(true);
-    }
-
     //set the current status as checked and paint presence overlay
     presenceChanged(m_account->currentPresence());
 
@@ -211,12 +206,17 @@ void AccountButton::presenceChanged(const Tp::Presence &presence)
         return;
     }
 
+    resetMenuFormatting();
+    QFont presenceFont = KGlobalSettings::generalFont();
+    presenceFont.setBold(true);
+    presenceFont.setItalic(true);
+
     QAction *action = actionForPresence(presence);
     if (!action) {
         action = m_offlineAction;
     }
 
-    action->setChecked(true);
+    action->setFont(presenceFont);
     updateToolTip();
 
     QPixmap pixmap = icon().pixmap(32, 32);
@@ -278,4 +278,15 @@ void AccountButton::setCustomPresenceMessage(const QString& message)
     m_presenceMessageWidget->setText(message);
 }
 
+void AccountButton::resetMenuFormatting()
+{
+    QFont presenceFont = KGlobalSettings::generalFont();
+    presenceFont.setBold(false);
+    presenceFont.setItalic(false);
+
+    foreach (QAction *a, menu()->actions()) {
+        a->setFont(presenceFont);
+    }
+}
+
 #include "account-button.moc"
diff --git a/account-button.h b/account-button.h
index 8dbf315..e142112 100644
--- a/account-button.h
+++ b/account-button.h
@@ -68,6 +68,7 @@ public Q_SLOTS:
 private:
 
     QAction *actionForPresence(const Tp::Presence &presence) const;
+    void resetMenuFormatting();
 
     ///Holds the account it controls
     Tp::AccountPtr                  m_account;

-- 
ktp-contact-list packaging



More information about the pkg-kde-commits mailing list