Alex Roitman wrote:
I figured that you could connect to the notify::filter signal on the FileChooserDialog object but it doesn't work. It seems you have to connect to the child FileChooserDefault object that is retrieved by:Hello,
I'm following the example/gtk/filechooser.py and things are working fine.
However, I have a little problem. I'd like to suggest a filename in a save dialog. It would be nice if the suggested filename depended
on the filter chosen. In the context similar to that of the example, I would want to use Untitled_1.png if the filter is set to PNG images and to Untitled_1.jpeg if filter is set to JPEG images.
It's easy to set a name vie set_current_name() method of a chooser. But how do I detect that the filter has changed? I would think that there might be a signal that is emitted when the filter state changes. However, neither filter nor selection seem to have that signal.
Am I missing something? Should I instead watch gtk.events_pending() and query the filter (via get_filter()) every iteration of the main loop?
Thanks in advance for any help,
Alex
filechooserdefault = filechooserdialog.get_children()[0].get_children()[0].get_children()[0]
This seems kind of convoluted - maybe someone knows a better way.
John
_______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
