[gtksourceview] Remove workarounds for bug #643732



commit 721c5b70ab2b0958b3870a045d769cd683ae4f8f
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Wed Jun 12 13:00:18 2013 +0200

    Remove workarounds for bug #643732
    
    "Source view is created with a GtkTextBuffer instead of
    GtkSourceBuffer"
    
    The bug is fixed now.

 tests/test-completion.c |   11 -----------
 tests/test-search.c     |    9 +++------
 2 files changed, 3 insertions(+), 17 deletions(-)
---
diff --git a/tests/test-completion.c b/tests/test-completion.c
index 241a7ae..0a6b0bd 100644
--- a/tests/test-completion.c
+++ b/tests/test-completion.c
@@ -339,7 +339,6 @@ create_window (void)
        GError *error = NULL;
        GtkWindow *window;
        GtkSourceView *source_view;
-       GtkSourceBuffer *source_buffer;
        GtkSourceCompletion *completion;
        GtkCheckButton *remember_info_visibility;
        GtkCheckButton *select_on_show;
@@ -374,16 +373,6 @@ create_window (void)
        nb_fixed_proposals = GTK_SPIN_BUTTON (gtk_builder_get_object (builder, 
"spinbutton_nb_fixed_proposals"));
        nb_random_proposals = GTK_SPIN_BUTTON (gtk_builder_get_object (builder, 
"spinbutton_nb_random_proposals"));
 
-       /* Workaround for https://bugzilla.gnome.org/show_bug.cgi?id=643732:
-        * "Source view is created with a GtkTextBuffer instead of GtkSourceBuffer"
-        */
-       source_buffer = gtk_source_buffer_new (NULL);
-
-       gtk_text_view_set_buffer (GTK_TEXT_VIEW (source_view),
-                                 GTK_TEXT_BUFFER (source_buffer));
-
-       g_object_unref (source_buffer);
-
        completion = gtk_source_view_get_completion (source_view);
 
        g_signal_connect (window,
diff --git a/tests/test-search.c b/tests/test-search.c
index 97fdb28..d1f5b4a 100644
--- a/tests/test-search.c
+++ b/tests/test-search.c
@@ -424,13 +424,10 @@ test_search_init (TestSearch *search)
        gtk_widget_override_font (GTK_WIDGET (search->priv->source_view), font);
        pango_font_description_free (font);
 
-       /* Workaround for https://bugzilla.gnome.org/show_bug.cgi?id=643732:
-        * "Source view is created with a GtkTextBuffer instead of GtkSourceBuffer"
-        */
-       search->priv->source_buffer = gtk_source_buffer_new (NULL);
+       search->priv->source_buffer = GTK_SOURCE_BUFFER (
+               gtk_text_view_get_buffer (GTK_TEXT_VIEW (search->priv->source_view)));
 
-       gtk_text_view_set_buffer (GTK_TEXT_VIEW (search->priv->source_view),
-                                 GTK_TEXT_BUFFER (search->priv->source_buffer));
+       g_object_ref (search->priv->source_buffer);
 
        open_file (search, TOP_SRCDIR "/gtksourceview/gtksourcesearchcontext.c");
 


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