From: Enrico Tröger Date: Thu, 23 Oct 2008 22:54:28 +0000 (+0200) Subject: Don't needlessly create text buffers X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb1fde09fe3c1f949fc8b16db918a2d0d3727cf6;p=midori Don't needlessly create text buffers --- diff --git a/midori/midori-source.c b/midori/midori-source.c index 9b8cbd93..1bd98774 100644 --- a/midori/midori-source.c +++ b/midori/midori-source.c @@ -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); }