0

I'm trying to implement a project of mine, using Gtk+ and Glade. I can't provide any code, as it is for my coursework, and doing so would jeopardize my qualification, which I have no desire to do right now.

The problem, is that I am trying to implement a 'clear form' button. The easiest way I could think to do this, is create a 'clear entry' signal handler, and have the button call that on every entry it handles. The problem, is that after setting this up, Glade will not remember that the widgets are to be passed.

I'll save it, click off, click back to the button, and the 'Object' column will be blank again, despite me explicitly setting it, and saving it while it was set. I have tried saving as libglade and gtkbuilder formats, to no avail.

Any help would be appreciated. Thanks.

CWood
  • 23
  • 6

1 Answers1

1

Here it is working (glade 3.14.2). Keep in mind glade is quite buggy, so an upgrade could resolve the problem.

Here is a (manually reduced) version of my test case:

<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <!-- interface-requires gtk+ 3.0 -->
  <object class="GtkWindow" id="window1">
    <child>
      <object class="GtkBox" id="box1">
        <property name="orientation">vertical</property>
        <child>
          <object class="GtkEntry" id="entry1"/>
        </child>
        <child>
          <object class="GtkButton" id="button1">
            <property name="label">gtk-clear</property>
            <property name="use_stock">True</property>
            <signal name="clicked" handler="reset" object="entry1" swapped="yes"/>
          </object>
        </child>
      </object>
    </child>
  </object>
</interface>
ntd
  • 7,372
  • 1
  • 27
  • 44