]> spindle.queued.net Git - midori/commitdiff
Don't needlessly create text buffers
authorEnrico Tröger <enrico.troeger@uvena.de>
Thu, 23 Oct 2008 22:54:28 +0000 (00:54 +0200)
committerChristian Dywan <christian@twotoasts.de>
Thu, 23 Oct 2008 22:54:28 +0000 (00:54 +0200)
midori/midori-source.c

index 9b8cbd93fd350e2f5f6cdbeadffeaf7b9392a0e5..1bd9877464278d764590c467ccb14c39f59b2f22 100644 (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);
     }