Don't needlessly create text buffers

This commit is contained in:
Enrico Tröger 2008-10-24 00:54:28 +02:00 committed by Christian Dywan
parent dd45aed139
commit cb1fde09fe

View file

@ -49,10 +49,6 @@ midori_source_class_init (MidoriSourceClass* class)
static void
midori_source_init (MidoriSource* source)
{
GtkTextBuffer* buffer;
buffer = gtk_text_buffer_new (NULL);
gtk_text_view_set_buffer (GTK_TEXT_VIEW (source), buffer);
gtk_text_view_set_editable (GTK_TEXT_VIEW (source), FALSE);
source->net = katze_net_new ();
@ -115,7 +111,6 @@ midori_source_transfer_cb (KatzeNetRequest* request,
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (source));
if (contents_utf8)
gtk_text_buffer_set_text (buffer, contents_utf8, -1);
g_object_unref (buffer);
if (contents_utf8 != request->data)
g_free (contents_utf8);
}