[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:24:46 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=681e966
The following commit has been merged in the master branch:
commit 681e966277b6b71a158a2292f42c8f6ba01ab056
Author: Marcin Ziemiński <zieminn at gmail.com>
Date: Wed Aug 6 16:56:13 2014 +0200
Block user text input in new tabs when there is ongoing private key generation.
---
app/chat-window.cpp | 4 ++++
lib/chat-widget.cpp | 1 +
lib/proxy-service.cpp | 5 +++++
lib/proxy-service.h | 5 +++--
4 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/app/chat-window.cpp b/app/chat-window.cpp
index 849238f..c5b4527 100644
--- a/app/chat-window.cpp
+++ b/app/chat-window.cpp
@@ -280,6 +280,10 @@ void ChatWindow::addTab(ChatTab *tab)
tab->setFocus();
tab->updateSendMessageShortcuts(m_sendMessage->shortcut());
+ // block text input if key is being generated for this account
+ if(m_proxyService->isOngoingGeneration(QDBusObjectPath(tab->account()->objectPath()))) {
+ tab->blockTextInput(true);
+ }
}
void ChatWindow::destroyTab(QWidget* chatWidget)
diff --git a/lib/chat-widget.cpp b/lib/chat-widget.cpp
index bb9bd00..57a765b 100644
--- a/lib/chat-widget.cpp
+++ b/lib/chat-widget.cpp
@@ -729,6 +729,7 @@ void ChatWidget::setupOTR()
void ChatWidget::onOTRTrustLevelChanged(Tp::OTRTrustLevel trustLevel, Tp::OTRTrustLevel previous)
{
+ kDebug();
d->newOTRstatus = true;
switch(trustLevel) {
case Tp::OTRTrustLevelUnverified:
diff --git a/lib/proxy-service.cpp b/lib/proxy-service.cpp
index bedf20b..256c2cd 100644
--- a/lib/proxy-service.cpp
+++ b/lib/proxy-service.cpp
@@ -128,6 +128,11 @@ bool ProxyService::generatePrivateKey(const QDBusObjectPath& account)
return !rep.isError();
}
+bool ProxyService::isOngoingGeneration(const QDBusObjectPath &account)
+{
+ return d->dialogs.contains(account.path());
+}
+
QString ProxyService::fingerprintForAccount(const QDBusObjectPath& account)
{
QDBusPendingReply<QString> rep = d->psi->GetFingerprintForAccount(account);
diff --git a/lib/proxy-service.h b/lib/proxy-service.h
index 96e9263..f324952 100644
--- a/lib/proxy-service.h
+++ b/lib/proxy-service.h
@@ -37,9 +37,10 @@ class KDE_TELEPATHY_CHAT_EXPORT ProxyService : public QObject
~ProxyService();
/** return true if generation could be started */
- bool generatePrivateKey(const QDBusObjectPath& account);
+ bool generatePrivateKey(const QDBusObjectPath &account);
+ bool isOngoingGeneration(const QDBusObjectPath &account);
/** fingerprint or an empty string of none available */
- QString fingerprintForAccount(const QDBusObjectPath& account);
+ QString fingerprintForAccount(const QDBusObjectPath &account);
Tp::PendingVariant* getOTRPolicy() const;
Tp::PendingOperation* setOTRPolicy(uint policy);
--
ktp-text-ui packaging
More information about the pkg-kde-commits
mailing list