Exemplo n.º 1
0
    def on_open_item_activate(self, menuitem):
        """
            Shows a dialog to open media
        """
        def on_uris_selected(dialog, uris):
            uris.reverse()

            if len(uris) > 0:
                self.controller.open_uri(uris.pop(), play=True)

            for uri in uris:
                self.controller.open_uri(uri, play=False)

        dialog = dialogs.MediaOpenDialog(self.window)
        dialog.connect('uris-selected', on_uris_selected)
        dialog.show()
Exemplo n.º 2
0
 def open_cb(*args):
     dialog = dialogs.MediaOpenDialog(get_main().window)
     dialog.connect('uris-selected',
                    lambda d, uris: get_main().controller.open_uris(uris))
     dialog.show()