Looking for improvement over zenity


dimag0g

Very Active Member
Joined
Jan 12, 2011
Messages
608
Location
Strasbourg, France
Hi there,

I happen to use zenity quite a lot, but it has a couple of few limitations which bother me:

- almost no interactive input/output. By "interactive" I mean that zenity process should output new values as the user changes it, or accept values from stdin to update the gui. So far the only interactive option is --progress, and it only works as output and is quite limited. An example of what I'd like to achieve is displaying a list and printing the selected line the moment the user changes selection. Another example would be a window which displays the last text line it gets from stdin, and closes on EOF.

- strictly 1 variable per input form. For instance, I'd like to display a form with several input fields (name, surname, phone number for instance) or a dialog with multiple scales. Ideally this would combine with interactivity, so I'd display three scales ("red", "green", "blue") and the moment the user would release the first slider after moving it to the max I'd get "red=255" printed to stdout (or "255 0 0" if all variables are printed every time)

Does anybody know about such GUIs?
 
Last edited by a moderator:
No*, but I guess you would better invest time in learning how to make a "proper" GUI. Ask someone else for more advice.

*At least not a lot. I know there are several similar tools, but they share the same inherent limitations and I've never used them.
 
^ Unless someone slaves for hours to make a simple window with few pulldown menus, slider and an okay button it's not proper. so I've been told.
 
Last edited by a moderator:
YAD is used by Ekianjo I know. It looks like a nice evolution from zenity.

mcobit use gtdkdialog. It's more powerfull and quite easy to use too (look at the config program inside mupen64plus2 PND, mcobit wrote it).
 
Gtkdialog is easy to use and to write guis with. Also pretty powerful.

https://code.google.com/p/gtkdialog/


Can be compiled easily in all the toolchains available for the Pandora that have the gtk-dev packages.


(Or just take the binary file from mupen)


Afaik, Puppy linux uses it exclusively for all of its dialogs.
 
Last edited by a moderator:
My attempt at addressing number 1 with python and Tkinter:

#!/usr/bin/python
import sys
import select
from Tkinter import *
root = Tk()
lb = Listbox(root)
lb.pack()
def callback(*args):
while sys.stdin in select.select([sys.stdin], [], [], 0)[0]:
line = sys.stdin.readline()
if line:
lb.insert(END, line)
lb.see(END)
else:
exit(0)
root.after(200, callback)
root.after(200, callback)
root.mainloop()
It creates a window with a listbox widget and fills it with lines read from stdin. Also exits when it gets EOF.
Unluckily it fails to run on Pandora, seems Tcl is missing
 
My ideal solution for this would be QML GUIs made from a set of components with a QtQuick plugin to handle calling the appropriate console commands. I've actually made such a plugin for an otherwise failed project. I can clean the relevant part up and put the code to github if someone wants to take a look.
 
Back
Top