summaryrefslogtreecommitdiff
path: root/docs/reference/gtk/migrating-GtkBuilder.sgml
blob: 2806ff90273d53921b8d8cae487c21502980d11d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<chapter id="gtk-migrating-GtkBuilder">

  <title>Migrating from libglade to GtkBuilder</title>

  <para>
    Since version 2.12, GTK+ provides #GtkBuilder to construct
    user interfaces from XML descriptions, similar to the functionality
    provided by #GladeXML in the libglade library.
  </para>

  <para>
    While GtkBuilder strives to be a complete replacement for
    libglade, there are a number of areas where it is currently
    still behind libglade:
    <itemizedlist>

      <listitem><para>
        GtkBuilder can not construct partial trees, it lacks
        the equivalent of the @root parameter of glade_xml_new().
        Due to the way GtkBuilder parses its input, this is difficult 
        to implement, see 
        <ulink url="http://bugzilla.gnome.org/show_bug.cgi?id=447998">bug 
        447998</ulink>. As a workaround, you can split your glade file 
        into multiple GtkBuilder input files. The 
        <application>gtk-builder-convert</application> conversion script 
        has a <option>--root</option> option that can help with this.
      </para></listitem>

      <listitem><para>
        GtkBuilder does not yet implement support for accessibility 
        properties. It parses the same &lt;accessibility&gt; elements 
        as libglade, but ignores them. See 
        <ulink url="http://bugzilla.gnome.org/show_bug.cgi?id=454653">bug 
        454983</ulink> for the current status of accessibility support 
        in GtkBuilder.
      </para></listitem>
 
      <listitem><para>
        GtkBuilder supports context information in translatable
        properties in a slightly different way than libglade. 
        Intltool does not yet support this; see 
        <ulink url="http://bugzilla.gnome.org/show_bug.cgi?id=454894">bug 
        454894</ulink> for the current status of intltool support for 
        GtkBuilder files. Thankfully, context in translations is a 
        rarely used feature, and if you are not using it, intltools 
        glade format support works just fine for GtkBuilder files.
      </para></listitem>

  </itemizedlist>
  </para>

  <para>
    More details about migrating from libglade to GtkBuilder will 
    appear here over time...
  </para>

</chapter>