I have just written a little password generator python script and GUI with Glade and PyGTK. I have attached it below, (the file to run is passgen_gui.py). I am somewhat pleased with it but I would like input. Here are a few of my concerns:
1. When the expander is expanded, it pushes the buttons at the buttom down. When it is collapsed, the buttons at the bottom do not come back up, leaving a big ugly space. Is there a way to make the buttons "come back up"? GIMP's menus do this so I'm sure it's possible, I just don't have a clue how.
2. I would like to have the configuration of the GUI saved (what checkboxes are checked, what is in the text fields, whether or not the expander is expanded, etc...) and restored when passgen starts up again. On an earlier version of this program, I tried doing that by writing to and reading from a file but that seems kind of messy to me. Another option is using a class full of variables and pickling the class object but I haven't looked into that fully yet. What are my options?
3. Using glade did reduce the size of the file by quite a bit the way I have to import each widget with gtk.glade.XML.get_widget() is a bit tedious (lines 54-65 of passgen_gui.py). Is there a better way?
Guidance is much appreciated.
Bookmarks