mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
draft action open
This commit is contained in:
parent
2a0b9f194f
commit
072a64dac7
2 changed files with 19 additions and 1 deletions
|
|
@ -26,6 +26,18 @@ Browser::Browser(
|
|||
}
|
||||
);
|
||||
|
||||
const Glib::VariantType ACTION__OPEN__PARAMETER_TYPE("s");
|
||||
|
||||
const auto ACTION__OPEN = add_action_with_parameter(
|
||||
"open",
|
||||
ACTION__OPEN__PARAMETER_TYPE,
|
||||
[this](const Glib::VariantBase & parameter)
|
||||
{
|
||||
// @TODO process request
|
||||
// Glib::VariantBase::cast_dynamic<Glib::Variant<Glib::ustring>>(parameter).get()
|
||||
}
|
||||
);
|
||||
|
||||
const auto ACTION__CLEAN = add_action(
|
||||
"clean",
|
||||
[this]
|
||||
|
|
|
|||
|
|
@ -117,7 +117,13 @@ Reader::Reader(
|
|||
signal_activate_link().connect(
|
||||
[this](const Glib::ustring & URI) -> bool
|
||||
{
|
||||
// @TODO follow action
|
||||
// Open link URI
|
||||
activate_action(
|
||||
"win.open",
|
||||
Glib::Variant<Glib::ustring>::create(
|
||||
URI
|
||||
)
|
||||
);
|
||||
|
||||
return false;
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue