pass uri variant to action

This commit is contained in:
yggverse 2024-10-14 06:01:36 +03:00
parent ab73b9de5b
commit 7311af914a

View File

@ -196,14 +196,13 @@ impl Reader {
if let Some(iter) = gobject.iter_at_location(buffer_x, buffer_y) { if let Some(iter) = gobject.iter_at_location(buffer_x, buffer_y) {
for tag in iter.tags() { for tag in iter.tags() {
// Tag is link // Tag is link
if let Some(_) = _links_.get(&tag) { if let Some(uri) = _links_.get(&tag) {
return action_tab_open.activate(None); // @TODO implement URI option return action_tab_open.activate(Some(&uri.to_string().to_variant()));
// @TODO action does not work after focus out
} }
} }
} }
} }
}); }); // for a note: this action sensitive to focus out
motion_controller.connect_motion({ motion_controller.connect_motion({
let gobject = widget.gobject().clone(); let gobject = widget.gobject().clone();