Glade example for open dialog



Hi there,

I'm currently trying to figure out how to operate a open file/save file
dialog from PyGobject using a dialog that I've created with Glade. To
clarify, I know how to open such a dialog programmatically, but would
like to use Glade (because in the future I'm thinking of adapting the
dialog and Glade makes this extremely easy and veratile).

But for now, it would be sufficient to have a dialog that simply "works"
(and behaves just like a programmatic version). For this I've created a
open dialog, added an okay and a cancel button, and put in a combobox
(for the filters). I've given "open" and "cancel" response IDs and use
stock button content. I've added a filefilter using glade for which I
filter for application/xml (*.xml).

Then I run this dialog after getting it from a builder using its .run()
method.

While it does work, kindof, it still isn't the "stock" behavior just yet:

1. While pressing "Escape" does invoke the "cancel" action, pressing
"Enter" does not invoke the "ok" action.
2. Double clikcing on a file does not invoke the "ok" action.
3. My combobox is completely empty (not filled with the configured filters)

Can someone please give me pointers on how I can add that behavior to
the Glade open dialog? I'd really appreciate your input.

Kind regards,
Johannes


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