[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:21:39 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=f987144
The following commit has been merged in the master branch:
commit f9871441d407b25f3e8dec2c02a5d173d0700347
Author: Daniele E. Domenichelli <daniele.domenichelli at gmail.com>
Date: Tue Mar 13 01:03:49 2012 +0100
Add a fake toolbar button to show account icon
---
app/chat-window.cpp | 14 ++++++++++++++
app/chat-window.h | 5 +++++
app/chatwindow.rc | 5 +++++
3 files changed, 24 insertions(+)
diff --git a/app/chat-window.cpp b/app/chat-window.cpp
index 75dd968..3d95717 100644
--- a/app/chat-window.cpp
+++ b/app/chat-window.cpp
@@ -42,9 +42,11 @@
#include <KMenuBar>
#include <KLineEdit>
#include <KMenu>
+#include <KToolBar>
#include <QEvent>
#include <QWidgetAction>
+#include <QLabel>
#include <TelepathyQt/Account>
#include <TelepathyQt/ContactCapabilities>
@@ -305,6 +307,8 @@ void ChatWindow::onCurrentIndexChanged(int index)
setInviteToChatEnabled(false);
}
+
+ setAccountIcon(currentChatTab->accountIcon());
}
void ChatWindow::onEnableSearchActions(bool enable)
@@ -536,6 +540,10 @@ void ChatWindow::setupCustomActions()
spellDictComboAction->setIcon(KIcon(QLatin1String("tools-check-spelling")));
spellDictComboAction->setIconText(i18n("Choose Spelling Language"));
+ KAction *accountIconAction = new KAction(KIcon(QLatin1String("telepathy-kde")), i18n("Account Icon"), this);
+ m_accountIconLabel = new QLabel(this);
+ accountIconAction->setDefaultWidget(m_accountIconLabel);
+
// add custom actions to the collection
actionCollection()->addAction(QLatin1String("next-tab"), nextTabAction);
actionCollection()->addAction(QLatin1String("previous-tab"), previousTabAction);
@@ -545,6 +553,7 @@ void ChatWindow::setupCustomActions()
actionCollection()->addAction(QLatin1String("invite-to-chat"), inviteToChat);
actionCollection()->addAction(QLatin1String("share-desktop"), shareDesktopAction);
actionCollection()->addAction(QLatin1String("language"), spellDictComboAction);
+ actionCollection()->addAction(QLatin1String("account-icon"), accountIconAction);
}
void ChatWindow::setAudioCallEnabled(bool enable)
@@ -593,6 +602,11 @@ void ChatWindow::setShareDesktopEnabled(bool enable)
}
}
+void ChatWindow::setAccountIcon(const QIcon &icon)
+{
+ m_accountIconLabel->setPixmap(icon.pixmap(toolBar()->iconSize()));
+}
+
void ChatWindow::startAudioCall(const Tp::AccountPtr& account, const Tp::ContactPtr& contact)
{
Tp::PendingChannelRequest *channelRequest = account->ensureAudioCall(contact,
diff --git a/app/chat-window.h b/app/chat-window.h
index 8ee4463..fd81141 100644
--- a/app/chat-window.h
+++ b/app/chat-window.h
@@ -32,6 +32,7 @@ namespace Sonnet {
class KIcon;
class ChatTab;
+class QLabel;
class ChatWindow : public KXmlGuiWindow
{
@@ -127,6 +128,9 @@ private:
void setVideoCallEnabled(bool enable);
void setShareDesktopEnabled(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
@@ -154,6 +158,7 @@ private:
KTabWidget *m_tabWidget;
Sonnet::DictionaryComboBox *m_spellDictCombo;
+ QLabel *m_accountIconLabel;
};
#endif // CHATWINDOW_H
diff --git a/app/chatwindow.rc b/app/chatwindow.rc
index f65fbd1..743e913 100644
--- a/app/chatwindow.rc
+++ b/app/chatwindow.rc
@@ -24,4 +24,9 @@
<Action name="language"/>
</ToolBar>
+ <ToolBar noMerge="1" name="accountIconToolBar">
+ <text>Account Icon Toolbar</text>
+ <Action name="account-icon" />
+ </ToolBar>
+
</gui>
--
ktp-text-ui packaging
More information about the pkg-kde-commits
mailing list