I'am trying to implement a fileChooser widget.The problem I am facing is, when you select multiple files and hit return or space the selection deselects, except one file. Because of this, when I handle the "file-activated" signal and use get_filenames(), it only returns one filename.
This is my code:
def file_chooser_box2(self):
box = gtk.HBox(False, 0)
file_ = gtk.FileChooserWidget()
file_.set_current_folder("/home/marco")
file_.set_show_hidden(False)
file_.set_select_multiple(True)
file_.connect("file-activated", self.files_selected, file_.get_filenames())
#hide stuff
file_box = file_.get_children()[0].get_children()[0].get_children()[1].get_children()[0]
file_box.hide()
box.pack_start(file_, True, True, 0)
file_.show()
box.show()
return box
def files_selected(self, widget, data = None):
print data