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


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

The following commit has been merged in the master branch:
commit beb229df0ed91ab12ca51a606bf14bd02b64da8e
Author: Ahmed Ibrahim Khalil <ahmedibrahimkhali at gmail.com>
Date:   Tue Apr 3 00:33:44 2012 +0200

    Added a method that enables/disables the block action so that we
    
    disable the block action when switching to a group chat.
    BUG: 297187
---
 app/chat-window.cpp | 14 +++++++++++++-
 app/chat-window.h   |  1 +
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/app/chat-window.cpp b/app/chat-window.cpp
index ee62869..230dc15 100644
--- a/app/chat-window.cpp
+++ b/app/chat-window.cpp
@@ -266,7 +266,9 @@ void ChatWindow::onBlockContactTriggered()
     }
 
     Tp::ContactPtr contact = currChat->textChannel()->targetContact();
-    contact->block();
+    if(!contact.isNull()) {
+        contact->block();
+    }
 }
 
 void ChatWindow::onCurrentIndexChanged(int index)
@@ -319,6 +321,7 @@ void ChatWindow::onCurrentIndexChanged(int index)
         setShareDesktopEnabled(false);
         /// TODO re-activate check when invitation to chat has been sorted out
         setInviteToChatEnabled(false);
+        setBlockEnabled(false);
 
     }
 
@@ -598,6 +601,15 @@ void ChatWindow::setAudioCallEnabled(bool enable)
     }
 }
 
+void ChatWindow::setBlockEnabled(bool enable)
+{
+    QAction *action = actionCollection()->action(QLatin1String("block-contact"));
+
+    if (action) {
+        action->setEnabled(enable);
+    }
+}
+
 void ChatWindow::setFileTransferEnabled(bool enable)
 {
     QAction *action = actionCollection()->action(QLatin1String("send-file"));
diff --git a/app/chat-window.h b/app/chat-window.h
index fc5b26f..3a1e8d4 100644
--- a/app/chat-window.h
+++ b/app/chat-window.h
@@ -126,6 +126,7 @@ private:
 
     /** setters for chat actions */
     void setAudioCallEnabled(bool enable);
+    void setBlockEnabled(bool enable);
     void setFileTransferEnabled(bool enable);
     void setInviteToChatEnabled(bool enable);
     void setVideoCallEnabled(bool enable);

-- 
ktp-text-ui packaging



More information about the pkg-kde-commits mailing list