def _installPlugins(self, details, missingPluginsCallback):
        context = GstPbutils.InstallPluginsContext()
        if self.app.system.has_x11():
            context.set_xid(self.window.xid)

        res = GstPbutils.install_plugins_async(details, context,
                                               missingPluginsCallback)
        return res
Exemple #2
0
def __create_context():
    LOGGER.info("Initializing connector for GstPbutils...")
    cntxt = GstPbutils.InstallPluginsContext()
    cntxt.set_confirm_search(True)

    # See https://standards.freedesktop.org/desktop-entry-spec/latest/ape.html
    cntxt.set_desktop_id("exaile.desktop")
    # TODO
    # cntxt.set_startup_notification_id()
    # cntxt.set_xid()
    return cntxt
Exemple #3
0
    def __getMissingElement(self, message, window_id=0):
        if gst.pygst_version < (0, 10, 10):
            print _("This version of gstreamer can't handle missing elements")
            return
        self.errors.append(str(message.structure["type"]))
        self.errors.append(str(message.structure["detail"]))
        self.errors.append(str(message.structure["name"]))
        detail = pbutils.missing_plugin_message_get_installer_detail(message)
        context = pbutils.InstallPluginsContext()

        if window_id:
            context.set_x_id(window_id)

        msg = pbutils.install_plugins_async([detail], context,
                                            self.__pbutils_plugin_installed_cb)