[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#250391: ITP: gtkdialog -- GUI-creation command-line utility based on GTK+ library



Fabio Tranchitella wrote:
[snip]
#!/bin/bash

export MAIN_DIALOG='
 <vbox>
  <text>
    <label>This is a label...</label>
  </text>
  <hbox>
   <button ok>
      <action> echo You pressed OK </action>
   </button>
   <button cancel>
      <action> exit </action>
  </button>
  </hbox>
 </vbox>
'

gtkdialog --program MAIN_DIALOG

---

Here there are only labels and buttons, but you can add textfields, combos, radios
and checkboxex and so on.

As you can see, it has an XML language (but easier than glade XML files),
but it can be used with an arbitrary interpreter (in the previous example
I used bash, but every interpreter can use gtkdialog) or with applications that
support pipes, I/O from file or environment variables.

When gtkdialog exits, it returns as standard output all variables defined in
the dialog(s) in the form:

VAR1='value1'
VAR2='value2'


[snip]

Is this like an instant debconf thing but only in gtk?


Yes, it is similar to debconf, but you have to define the interface (which can be more complex than debconf) with an XML language and the result variables are printed as standard output. It's similar
to xdialog, but with an high customizable GUI.
[snip]

Nice, I will enjoy working with it.

Dan Weber

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: