Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
World
Feeds
Commits
ae83f788
Verified
Commit
ae83f788
authored
Oct 09, 2020
by
Gabriele Musco
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replaced system call to xdg-open with Gio.AppInfo.launch_default_for_uri
parent
e80b18f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
gfeeds/webview.py
gfeeds/webview.py
+5
-4
No files found.
gfeeds/webview.py
View file @
ae83f788
from
subprocess
import
Popen
from
gettext
import
gettext
as
_
import
threading
from
feedparser
import
FeedParserDict
from
gi.repository
import
Gtk
,
GLib
,
WebKit2
,
GObject
from
gi.repository
import
Gtk
,
GLib
,
WebKit2
,
GObject
,
Gio
from
gfeeds.build_reader_html
import
build_reader_html
from
gfeeds.confManager
import
ConfManager
from
gfeeds.download_manager
import
download_text
...
...
@@ -187,7 +186,9 @@ class GFeedsWebView(Gtk.Stack):
def
open_externally
(
self
,
*
args
):
if
self
.
uri
:
Popen
(
f
'xdg-open
{
self
.
uri
}
'
.
split
(
' '
))
Gio
.
AppInfo
.
launch_default_for_uri
(
self
.
uri
)
def
on_load_start
(
self
,
*
args
):
self
.
new_page_loaded
=
True
...
...
@@ -262,6 +263,6 @@ class GFeedsWebView(Gtk.Stack):
):
decision
.
ignore
()
uri
=
decision
.
get_navigation_action
().
get_request
().
get_uri
()
Popen
(
f
'xdg-open
{
uri
}
'
.
split
(
' '
)
)
Gio
.
AppInfo
.
launch_default_for_uri
(
uri
)
return
True
return
False
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment