Gtkdialog question

In the PPM there is a Find box with a Go button beside it. There is a request that pressing ENTER in the Find box should initiate the search.

However, if I put <action> tags within the <enter>, they run everytime a character is typed:

   <text><label>Find:</label></text>

<entry>
<variable>ENTRY1</variable>
<action>/usr/local/petget/findnames.sh</action>
<action>refresh:TREE1</action>
</entry>
<button>
<label>Go</label>
<action>/usr/local/petget/findnames.sh</action>
<action>refresh:TREE1</action>
</button>


Does anyone know how to set it so that the actions only run when the ENTER key is pressed?


Posted on 9 Sep 2009, 18:44


Comments:

Posted on 9 Sep 2009, 20:07 by zigbert
re: gtkdialog code
   <text><label>Find:</label></text>

<entry activates-default="true">
<variable>ENTRY1</variable>
</entry>
<button can-default="true" has-default="true" use-stock="true">
<label>Go</label>
<action>/usr/local/petget/findnames.sh</action>
<action>refresh:TREE1</action>
</button>



Posted on 10 Sep 2009, 7:05 by BarryK
gtkdialog code
It works! Zigbert, thanks for that.

Ah, there is an example:
/usr/share/doc/gtkdialog3/examples/16.02.widget_properties_default

...which I did see before, but I didn't understand it.