mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 17:15:28 +00:00
separate page handler from loader, draft some Titan features
This commit is contained in:
parent
123be8c97e
commit
f73b5c7956
5 changed files with 343 additions and 310 deletions
|
|
@ -3,15 +3,14 @@ mod sensitive;
|
|||
mod titan;
|
||||
mod widget;
|
||||
|
||||
use super::TabAction;
|
||||
use gtk::glib::Uri;
|
||||
use response::Response;
|
||||
use sensitive::Sensitive;
|
||||
use std::rc::Rc;
|
||||
use titan::Titan;
|
||||
use widget::Widget;
|
||||
|
||||
use crate::app::browser::window::tab::item::Action as TabAction;
|
||||
use gtk::glib::Uri;
|
||||
use std::rc::Rc;
|
||||
|
||||
pub struct Input {
|
||||
pub widget: Rc<Widget>,
|
||||
}
|
||||
|
|
@ -66,8 +65,12 @@ impl Input {
|
|||
));
|
||||
}
|
||||
|
||||
pub fn set_new_titan(&self, callback: impl Fn(&[u8]) + 'static) {
|
||||
pub fn set_new_titan(
|
||||
&self,
|
||||
titan: super::client::response::input::Titan,
|
||||
callback: impl Fn(Result<super::client::Response, ()>) + 'static,
|
||||
) {
|
||||
self.widget
|
||||
.update(Some(&Titan::build(callback).widget.g_box));
|
||||
.update(Some(&Titan::build(titan, callback).widget.g_box));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue