Hi, all i tried to set a gtk.FileChooseButton to use a gtk.FileChooserDialog defined by me. It all works fine, but when i choose a file from the dialog and click "Open" button, the selected file won't be shown in the button.
Here how i define button and dialog:
class filechooser(gtk.FileChooserButton):
def __init__(self, hbox):
gtk.FileChooserButton.__init__(self, filedlg())
hbox.pack_start(self, False, True, 0)
hbox.reorder_child(self, 1)
class filedlg(gtk.FileChooserDialog):
def __init__(self):
gtk.FileChooserDialog.__init__(self,
"Select a package",
None,
gtk.FILE_CHOOSER_ACTION_OPEN,
(gtk.STOCK_OPEN,
gtk.RESPONSE_OK,
gtk.STOCK_CANCEL,
gtk.RESPONSE_CANCEL))
pkgfilter = gtk.FileFilter()
pkgfilter.add_pattern("*.pkg.tar.gz")
pkgfilter.set_name("Packages")
self.add_filter(pkgfilter)
allfilter = gtk.FileFilter()
allfilter.add_pattern("*")
allfilter.set_name("All files")
self.add_filter(allfilter)
--
"Solo due cose sono infinite: l'universo e la stupidità umana... e per quanto
riguarda l'universo non sono sicuro"
Albert Einstein
# GnuPG/PGP Key Id: 0x5646B7D4
pgpe15rQEO7W3.pgp
Description: PGP signature
_______________________________________________ pygtk mailing list [email protected] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
