Commit c0ad6e2b authored by Thibault Saunier's avatar Thibault Saunier

flatpak: Bundle yelp so that users can see the user manual

Fixes T7445
Reviewed-by: Alexandru Băluț's avatarAlex Băluț <>
Differential Revision:
parent ff613f79
......@@ -315,6 +315,16 @@
"name": "yelp",
"sources": [
"type": "git",
"url": "",
"branch": "3.20.1"
"name": "pitivi",
"sources": [
......@@ -20,6 +20,7 @@
import bisect
import hashlib
import os
import subprocess
import threading
import time
from gettext import gettext as _
......@@ -250,19 +251,37 @@ def show_user_manual(page=None):
Display the user manual with Yelp.
Optional: for contextual help, a page ID can be specified.
def get_page_uri(uri, page):
if page is not None:
return uri + "#" + page
return uri
time_now = int(time.time())
for uri in uris:
if page is not None:
uri += "#" + page
Gtk.show_uri(None, uri, time_now)
Gtk.show_uri(None, get_page_uri(uri, page), time_now)
except Exception as e:
log.debug("utils", "Failed loading URI %s: %s", uri, e)"utils", "Failed loading URI %s: %s", uri, e)
log.warning("utils", "Failed loading URIs")
# TODO: Show an error message to the user.
# Last try calling yelp directly (used in flatpak while we do
# not have a portal to access system wild apps)
get_page_uri(APPMANUALURL_OFFLINE, page)])
except FileNotFoundError:
log.warning("utils", "Failed loading URIs")
dialog = Gtk.MessageDialog(modal=True,
text=_("Failed to open the user manual."
" Make sure to have either the `yelp` gnome "
" documentaion viewer or a web browser"
" installed"))
def unicode_error_dialog():
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment