mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-29 20:44:25 +00:00
delegate unsupported URI to external application
This commit is contained in:
parent
382c110621
commit
9e56d37bae
@ -119,15 +119,21 @@ Reader::Reader(
|
||||
signal_activate_link().connect(
|
||||
[this](const Glib::ustring & URI) -> bool
|
||||
{
|
||||
// Open link URI
|
||||
activate_action(
|
||||
"win.open",
|
||||
Glib::Variant<Glib::ustring>::create(
|
||||
URI
|
||||
)
|
||||
const char * SCHEME = g_uri_parse_scheme(
|
||||
URI.c_str()
|
||||
);
|
||||
|
||||
return false;
|
||||
if (SCHEME == NULL || SCHEME == Glib::ustring("gemini"))
|
||||
{
|
||||
return activate_action(
|
||||
"win.open",
|
||||
Glib::Variant<Glib::ustring>::create(
|
||||
URI
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
return false; // delegate unsupported URI to external application
|
||||
},
|
||||
false // after
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user