[Xfce4-commits] <mousepad:master> Make MousepadView a subclass of GtkSourceView instead of GtkTextView.

Matthew Brush noreply at xfce.org
Sat May 5 21:31:33 CEST 2012


Updating branch refs/heads/master
         to d1970d6b3ec4e212f8fd2823b6f5dd00c17fe4cf (commit)
       from 4e5c46f563dc7e468041a62f82cab8e8bfc4a3dc (commit)

commit d1970d6b3ec4e212f8fd2823b6f5dd00c17fe4cf
Author: Matthew Brush <mbrush at codebrainz.ca>
Date:   Mon Oct 3 01:34:42 2011 -0700

    Make MousepadView a subclass of GtkSourceView instead of GtkTextView.
    
    Add include for gtksourceview.h in mousepad-private.h.
    
    Causes the line numbers to always be shown initially but this should be
    fixed once the line numbers code is ported to use GtkSourceView.

 mousepad/mousepad-private.h |    1 +
 mousepad/mousepad-view.c    |    6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/mousepad/mousepad-private.h b/mousepad/mousepad-private.h
index 4be50b1..520a9f7 100644
--- a/mousepad/mousepad-private.h
+++ b/mousepad/mousepad-private.h
@@ -21,6 +21,7 @@
 #include <glib-object.h>
 #include <gtk/gtk.h>
 #include <glib/gi18n.h>
+#include <gtksourceview/gtksourceview.h>
 
 G_BEGIN_DECLS
 
diff --git a/mousepad/mousepad-view.c b/mousepad/mousepad-view.c
index 4e12fa6..5146811 100644
--- a/mousepad/mousepad-view.c
+++ b/mousepad/mousepad-view.c
@@ -91,12 +91,12 @@ static void      mousepad_view_transpose_words               (GtkTextBuffer
 
 struct _MousepadViewClass
 {
-  GtkTextViewClass __parent__;
+  GtkSourceViewClass __parent__;
 };
 
 struct _MousepadView
 {
-  GtkTextView  __parent__;
+  GtkSourceView  __parent__;
 
   /* the selection style tag */
   GtkTextTag         *selection_tag;
@@ -128,7 +128,7 @@ struct _MousepadView
 
 
 
-G_DEFINE_TYPE (MousepadView, mousepad_view, GTK_TYPE_TEXT_VIEW);
+G_DEFINE_TYPE (MousepadView, mousepad_view, GTK_TYPE_SOURCE_VIEW);
 
 
 


More information about the Xfce4-commits mailing list