use action object

This commit is contained in:
yggverse 2024-09-28 03:54:14 +03:00
parent a6559a289f
commit ae2bb93ea7
5 changed files with 38 additions and 20 deletions

View file

@ -3,10 +3,13 @@ mod gemini;
use gemini::Gemini;
use gtk::{
gio::SimpleAction,
glib::{GString, Uri},
ScrolledWindow,
};
use std::sync::Arc;
pub struct Meta {
title: Option<GString>,
}
@ -18,9 +21,9 @@ pub struct Text {
impl Text {
// Construct
pub fn gemini(gemtext: &str, base: &Uri) -> Self {
pub fn gemini(gemtext: &str, base: &Uri, action_open: Arc<SimpleAction>) -> Self {
// Init components
let gemini = Gemini::new(gemtext, base);
let gemini = Gemini::new(gemtext, base, action_open);
// Init meta
let meta = Meta {