[pygtk] FileChooserButton - signal when the dialog closes
mailxbox2 at o2.pl
mailxbox2 at o2.pl
Sat Jun 23 00:24:06 WST 2007
> Hi there. Back in February Felix Rabe asked about how to know when a
> FileChooserButton's associated dialog is closed (so that the filename
> of the selected file can be retrieved from it). As far as I can see,
> there was no particular response. Having now stumbled upon the same
> issue, does anyone have any answers?
I don't know how to wait for a dialog to close, but I have way to get selected
filename without knowing it.
I simply connect to "selection-changed" signal.
Here is sample signal handler (self._fcbLogs is a FileChooserButton):
def _onFcbLogsSelChanged(self, widget, data=None):
dir = self._fcbLogs.get_filename()
if dir is None:
return
dir = unicode(dir, u'utf8')
self._config.logsPath = dir
More information about the pygtk
mailing list