From 5c9327240c2c1498a3441a8462d13ae479a0fae2 Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Thu, 17 Sep 2009 14:04:25 +0200 Subject: Don't paste if the remote contact is disconnected (#595417). --- libempathy-gtk/empathy-chat.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libempathy-gtk/empathy-chat.c') diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c index c08b49c3f..d62537110 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); -- cgit v1.2.3