[empathy] Don't paste if the remote contact is disconnected (#595417).



commit 5c9327240c2c1498a3441a8462d13ae479a0fae2
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Thu Sep 17 14:04:25 2009 +0200

    Don't paste if the remote contact is disconnected (#595417).

 libempathy-gtk/empathy-chat.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index c08b49c..d625371 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -1957,9 +1957,16 @@ empathy_chat_paste (EmpathyChat *chat)
 {
 	GtkTextBuffer *buffer;
 	GtkClipboard  *clipboard;
+	EmpathyChatPriv *priv;
 
 	g_return_if_fail (EMPATHY_IS_CHAT (chat));
 
+	priv = GET_PRIV (chat);
+
+	if (priv->tp_chat == NULL ||
+	    !GTK_WIDGET_IS_SENSITIVE (chat->input_text_view))
+		return;
+
 	buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (chat->input_text_view));
 	clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]