def main(self):
dialog = Gtk.FileChooserDialog("Please choose a file", self.win,
Gtk.FileChooserAction.OPEN,
(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL))
self.button1 = dialog.add_button('Add to playlist', Gtk.ResponseType.OK)
self.button2 = dialog.add_button('Play now', Gtk.ResponseType.OK)
self.button1.connect("clicked", self._button_clicked)
self.button2.connect("clicked", self._button_clicked)
dialog.set_select_multiple(True)
self.add_filters(dialog)
ret = None
response = dialog.run()
if response == Gtk.ResponseType.OK:
ret = (dialog.get_uris(), self.but)
dialog.destroy()
return ret
评论列表
文章目录