You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.6 KiB
44 lines
1.6 KiB
From f8f4cbf0beda0e82388748c916c6152996b12a8e Mon Sep 17 00:00:00 2001
|
|
From: Mart Raudsepp <leio@gentoo.org>
|
|
Date: Sat, 20 Jun 2020 01:06:04 +0300
|
|
Subject: [PATCH] Fix opening of the help files
|
|
|
|
webbrowser python module just opens things in the browser for me, which
|
|
doesn't understand what a "help:gtg" is and routes it back to external
|
|
program dialog if lucky.
|
|
Use Gtk.show_uri instead, which will properly open it in help handler (yelp).
|
|
|
|
I believe we should be using Gtk.show_uri instead of webbrowser in other
|
|
places as well, but that's something for a different release.
|
|
---
|
|
GTG/gtk/application.py | 6 ++++--
|
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/GTG/gtk/application.py b/GTG/gtk/application.py
|
|
index 39a8a5b3..e8091973 100644
|
|
--- a/GTG/gtk/application.py
|
|
+++ b/GTG/gtk/application.py
|
|
@@ -28,7 +28,6 @@ from GTG.gtk.browser.main_window import MainWindow
|
|
from GTG.gtk.editor.editor import TaskEditor
|
|
from GTG.gtk.preferences import Preferences
|
|
from GTG.gtk.plugins import PluginsDialog
|
|
-from webbrowser import open as openurl
|
|
from GTG.core import clipboard
|
|
from GTG.core.plugins.engine import PluginEngine
|
|
from GTG.core.plugins.api import PluginAPI
|
|
@@ -251,7 +250,10 @@ class Application(Gtk.Application):
|
|
def open_help(self, action, param):
|
|
"""Open help callback."""
|
|
|
|
- openurl("help:gtg")
|
|
+ try:
|
|
+ Gtk.show_uri(None, "help:gtg", Gdk.CURRENT_TIME)
|
|
+ except GLib.Error:
|
|
+ log.error('Could not open help')
|
|
|
|
def open_backends_manager(self, action, param):
|
|
"""Callback to open the backends manager dialog."""
|
|
--
|
|
2.20.1
|
|
|