Browse Source

draft action open

CPP-GTK4
yggverse 3 months ago
parent
commit
072a64dac7
  1. 12
      src/app/browser.cpp
  2. 8
      src/app/browser/main/tab/page/content/text/gemini/reader.cpp

12
src/app/browser.cpp

@ -26,6 +26,18 @@ Browser::Browser( @@ -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]

8
src/app/browser/main/tab/page/content/text/gemini/reader.cpp

@ -117,7 +117,13 @@ Reader::Reader( @@ -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…
Cancel
Save