[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:19:12 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=1833ca8
The following commit has been merged in the master branch:
commit 1833ca8b33fc2e7b1510408c9ccc733034143320
Author: David Edmundson <kde at davidedmundson.co.uk>
Date: Thu Mar 31 15:30:50 2011 +0100
Tidy up the code for activating a window when a notification is clicked + fixed crash
- Fixed an error catching case if(m_tabWidget) - which failed to set m_tabWidget on creation.
- Tidied up the signals/slots (currently chat-widget was calling a slot that didn't exist, a subclass was catching it)
- Call setTabWidget on the ChatTab class so that it can select the active tab.
Reviewed by Dario Freddi
REVIEW: 100990
---
app/chat-tab.cpp | 4 +++-
app/chat-window.cpp | 1 +
lib/chat-widget.cpp | 3 +--
lib/chat-widget.h | 3 +++
4 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/app/chat-tab.cpp b/app/chat-tab.cpp
index 224429b..8f5226e 100644
--- a/app/chat-tab.cpp
+++ b/app/chat-tab.cpp
@@ -27,8 +27,10 @@
#include <KDE/KColorScheme>
ChatTab::ChatTab(const Tp::TextChannelPtr & channel, QWidget *parent)
- : ChatWidget(channel, parent)
+ : ChatWidget(channel, parent),
+ m_tabWidget(0)
{
+ connect(this, SIGNAL(notificationClicked()), SLOT(showOnTop()));
}
ChatTab::~ChatTab()
diff --git a/app/chat-window.cpp b/app/chat-window.cpp
index b0a517e..0725ca6 100644
--- a/app/chat-window.cpp
+++ b/app/chat-window.cpp
@@ -95,6 +95,7 @@ void ChatWindow::startChat(Tp::TextChannelPtr incomingTextChannel)
// got new chat, create it
if(!duplicateTab) {
ChatTab *chatTab = new ChatTab(incomingTextChannel, m_tabWidget);
+ chatTab->setTabWidget(m_tabWidget);
connect(chatTab, SIGNAL(titleChanged(QString)), this, SLOT(onTabTextChanged(QString)));
connect(chatTab, SIGNAL(iconChanged(KIcon)), this, SLOT(onTabIconChanged(KIcon)));
connect(chatTab, SIGNAL(userTypingChanged(bool)), this, SLOT(onTabStateChanged()));
diff --git a/lib/chat-widget.cpp b/lib/chat-widget.cpp
index e9db9b7..33bd5c9 100644
--- a/lib/chat-widget.cpp
+++ b/lib/chat-widget.cpp
@@ -480,8 +480,7 @@ void ChatWidget::notifyAboutIncomingMessage(const Tp::ReceivedMessage & message)
//TODO notification->addContext("group",... Requires KDE Telepathy Contact to work out which group they are in.
notification->setActions(QStringList(i18n("View")));
- connect(notification, SIGNAL(activated(unsigned int)), notification, SLOT(raiseWidget()));
- connect(notification, SIGNAL(activated(unsigned int)), this, SLOT(showOnTop()));
+ connect(notification, SIGNAL(activated(unsigned int)), this, SIGNAL(notificationClicked()));
notification->sendEvent();
}
diff --git a/lib/chat-widget.h b/lib/chat-widget.h
index 9e74888..3973326 100644
--- a/lib/chat-widget.h
+++ b/lib/chat-widget.h
@@ -113,6 +113,9 @@ signals:
void unreadMessagesChanged(int messages);
+ /** Emitted when a notification for the chat window has been activated*/
+ void notificationClicked();
+
private slots:
/** recieved when user changes search criteria or when searching for text */
void findTextInChat(const QString &text, QWebPage::FindFlags flags);
--
ktp-text-ui packaging
More information about the pkg-kde-commits
mailing list