title: Load GUI from a Glade with GtkSourceView in PyGObject
body: <p>I'm trying to use a Glade file that has a GtkSourceView widget in PyGObject. I've wrote a little guide on how to start using the new GtkSourceView 3.0 in Glade: <a href="http://cjenkins.wordpress.com/2012/05/08/use-gtksourceview-widget-in-glade/" rel="noreferrer">http://cjenkins.wordpress.com/2012/05/08/use-gtksourceview-widget-in-glade/</a></p>
  
  <p>The problem is when I want to load that Glade from PyGObject:</p>
  
  <pre><code>from gi.repository import Gtk, GtkSource
  from os.path import abspath, dirname, join
  
  WHERE_AM_I = abspath(dirname(__file__))
  
  class MyApp(object):
  
      def __init__(self):
          self.builder = Gtk.Builder()
          self.glade_file = join(WHERE_AM_I, 'test.glade')
          self.builder.add_from_file(self.glade_file)
  
  if __name__ == '__main__':
      try:
          gui = MyApp()
          Gtk.main()
      except KeyboardInterrupt:
          pass
  </code></pre>
  
  <p>When I run that file I got this error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "test.py", line 15, in &lt;module&gt;
      gui = MyApp()
    File "test.py", line 11, in __init__
      self.builder.add_from_file(self.glade_file)
    File "/usr/lib/python2.7/dist-packages/gi/types.py", line 43, in function
      return info.invoke(*args, **kwargs)
  gi._glib.GError: Invalid object type `GtkSourceView'
  </code></pre>
  
  <p>The Glade file (test.glade) is just a window with a GtkSourceView widget in it:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;interface&gt;
    &lt;!-- interface-requires gtksourceview 3.0 --&gt;
    &lt;!-- interface-requires gtk+ 3.0 --&gt;
    &lt;object class="GtkWindow" id="window1"&gt;
      &lt;property name="can_focus"&gt;False&lt;/property&gt;
      &lt;child&gt;
        &lt;object class="GtkSourceView" id="gtksourceview1"&gt;
          &lt;property name="visible"&gt;True&lt;/property&gt;
          &lt;property name="can_focus"&gt;True&lt;/property&gt;
          &lt;property name="has_tooltip"&gt;True&lt;/property&gt;
          &lt;property name="left_margin"&gt;2&lt;/property&gt;
          &lt;property name="right_margin"&gt;2&lt;/property&gt;
          &lt;property name="tab_width"&gt;4&lt;/property&gt;
          &lt;property name="auto_indent"&gt;True&lt;/property&gt;
          &lt;property name="indent_on_tab"&gt;False&lt;/property&gt;
        &lt;/object&gt;
      &lt;/child&gt;
    &lt;/object&gt;
  &lt;/interface&gt;
  </code></pre>
  
  <p>An how to solve this is out of my knowledge right now. I suppose I need to register some type before calling add_from_file(), not? Any idea is welcome.</p>
  
  <p>I'm using:</p>
  
  <ul>
  <li>Ubuntu Precise 12.04</li>
  <li>Glade 3.12.0</li>
  <li>libgtksourceview 3.0</li>
  <li>Gtk+ 3.0</li>
  </ul>
  
  <p>Kind regards</p>