Question

I'm trying to follow a tutorial about Gtk2Hs. I stumbled about the problem described in this question. I'm now trying to create a gtkbuilder xml file to use with gtk2 and load it similar to the description linked in the question. The resulting file I have now starts like this:

<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <!-- interface-requires gtk+ 3.0 -->
  <object class="GtkWindow" id="Hello Gtk2hs">
    <property name="can_focus">False</property>
    <child>
      <object class="GtkBox" id="box1">
        ...

It looks almost fine. It starts with <interface> instead of <glade-interface> but there is still that line that says <!-- interface-requires gtk+ 3.0 --> and i still get the same error when running it.

How can I force glade to generate gtkbuilder files for gtk2?

Était-ce utile?

La solution

This question says that glade newer that version 3.8 just doesn't support gtk2. So you need to either wait for gtk3 support in gtk2hs or switch to glade-3.8.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top