ekiga r6833 - in trunk: . lib/engine/gui/gtk-frontend



Author: jschamp
Date: Sat Sep  6 04:25:58 2008
New Revision: 6833
URL: http://svn.gnome.org/viewvc/ekiga?rev=6833&view=rev

Log:
Don't give empty chat messages to send to the backend (fixes #551018).

Modified:
   trunk/ChangeLog
   trunk/lib/engine/gui/gtk-frontend/chat-area.cpp

Modified: trunk/lib/engine/gui/gtk-frontend/chat-area.cpp
==============================================================================
--- trunk/lib/engine/gui/gtk-frontend/chat-area.cpp	(original)
+++ trunk/lib/engine/gui/gtk-frontend/chat-area.cpp	Sat Sep  6 04:25:58 2008
@@ -543,6 +543,11 @@
     buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (self->priv->message));
     gtk_text_buffer_get_start_iter (GTK_TEXT_BUFFER (buffer), &start_iter);
     gtk_text_buffer_get_end_iter (GTK_TEXT_BUFFER (buffer), &end_iter);
+
+    /* if nothing to send - send nothing ;-) */
+    if (gtk_text_iter_get_offset (&end_iter) == 0)
+      return TRUE;
+
     body = gtk_text_buffer_get_text (GTK_TEXT_BUFFER (buffer), &start_iter, &end_iter, TRUE);
 
     if (self->priv->chat->send_message (body))



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