mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
delegate unsupported URI to external application
This commit is contained in:
parent
382c110621
commit
9e56d37bae
1 changed files with 13 additions and 7 deletions
|
|
@ -119,15 +119,21 @@ Reader::Reader(
|
||||||
signal_activate_link().connect(
|
signal_activate_link().connect(
|
||||||
[this](const Glib::ustring & URI) -> bool
|
[this](const Glib::ustring & URI) -> bool
|
||||||
{
|
{
|
||||||
// Open link URI
|
const char * SCHEME = g_uri_parse_scheme(
|
||||||
activate_action(
|
URI.c_str()
|
||||||
|
);
|
||||||
|
|
||||||
|
if (SCHEME == NULL || SCHEME == Glib::ustring("gemini"))
|
||||||
|
{
|
||||||
|
return activate_action(
|
||||||
"win.open",
|
"win.open",
|
||||||
Glib::Variant<Glib::ustring>::create(
|
Glib::Variant<Glib::ustring>::create(
|
||||||
URI
|
URI
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false; // delegate unsupported URI to external application
|
||||||
},
|
},
|
||||||
false // after
|
false // after
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue