From 069abbd00b453d4d0183f4968b40ee9549c0609a Mon Sep 17 00:00:00 2001 From: Yann Leboulanger <asterix@lagaule.org> Date: Tue, 15 Mar 2005 21:37:02 +0000 Subject: [PATCH] do not try to send a message if we are not connected --- plugins/gtkgui/tabbed_chat_window.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/gtkgui/tabbed_chat_window.py b/plugins/gtkgui/tabbed_chat_window.py index 4cc4d5a4c0..712d3663e7 100644 --- a/plugins/gtkgui/tabbed_chat_window.py +++ b/plugins/gtkgui/tabbed_chat_window.py @@ -151,6 +151,9 @@ class tabbed_chat_window(Chat): if event.keyval == gtk.keysyms.Return: if (event.state & gtk.gdk.SHIFT_MASK): return 0 + if self.plugin.connected[self.account] < 2: #we are not connected + Error_dialog(_('You are not connected, so you cannot send a message')) + return 1 message_buffer = widget.get_buffer() start_iter = message_buffer.get_start_iter() end_iter = message_buffer.get_end_iter() -- GitLab