Author: nevans Date: 2008-03-07 18:38:18 -0700 (Fri, 07 Mar 2008) New Revision: 6545
Modified: gnunet-gtk/src/plugins/chat/chat.c Log: Modified: gnunet-gtk/src/plugins/chat/chat.c =================================================================== --- gnunet-gtk/src/plugins/chat/chat.c 2008-03-07 19:26:30 UTC (rev 6544) +++ gnunet-gtk/src/plugins/chat/chat.c 2008-03-08 01:38:18 UTC (rev 6545) @@ -54,18 +54,10 @@ buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(writeholder->chatWindow)); message_buf_size = snprintf(NULL,0,"<%s> %s",writeholder->senderNick,writeholder->message); - message_buf = GNUNET_malloc(message_buf_size); - snprintf(message_buf,message_buf_size,"<%s> %s",writeholder->senderNick,writeholder->message); + message_buf = GNUNET_malloc(message_buf_size + 2); + snprintf(message_buf,message_buf_size + 2,"<%s> %s\n",writeholder->senderNick,writeholder->message); + gtk_text_buffer_insert_at_cursor(buffer,message_buf,message_buf_size + 1); - if(g_utf8_validate(message_buf,message_buf_size,NULL)) - { - g_print("validated fine\n"); - } - else - g_print("didn't validate\n"); - //gtk_text_buffer_set_text(buffer,message_buf,message_buf_size); - - g_print ("%s: %s\n", writeholder->senderNick,writeholder->message); return; } @@ -234,8 +226,6 @@ room_name = gtk_label_get_text(GTK_LABEL(chatlabel)); - g_print("Label of current tab is %s\n",room_name); - chathbox = gtk_widget_get_ancestor (widget,GTK_TYPE_HBOX); children = gtk_container_get_children (chathbox); _______________________________________________ GNUnet-SVN mailing list GNUnet-SVN@gnu.org http://lists.gnu.org/mailman/listinfo/gnunet-svn