mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
move actions connect into the search component
This commit is contained in:
parent
8b65df99f4
commit
dd5d79bac4
6 changed files with 125 additions and 129 deletions
|
|
@ -5,7 +5,7 @@ mod text;
|
|||
use image::Image;
|
||||
use text::Text;
|
||||
|
||||
use super::{BrowserAction, TabAction, WindowAction};
|
||||
use super::{TabAction, WindowAction};
|
||||
use adw::StatusPage;
|
||||
use gtk::{
|
||||
gdk::Paintable,
|
||||
|
|
@ -17,7 +17,6 @@ use gtk::{
|
|||
use std::{rc::Rc, time::Duration};
|
||||
|
||||
pub struct Content {
|
||||
browser_action: Rc<BrowserAction>,
|
||||
window_action: Rc<WindowAction>,
|
||||
tab_action: Rc<TabAction>,
|
||||
pub g_box: Box,
|
||||
|
|
@ -27,16 +26,9 @@ impl Content {
|
|||
// Construct
|
||||
|
||||
/// Create new container for different components
|
||||
pub fn new(
|
||||
(browser_action, window_action, tab_action): (
|
||||
Rc<BrowserAction>,
|
||||
Rc<WindowAction>,
|
||||
Rc<TabAction>,
|
||||
),
|
||||
) -> Self {
|
||||
pub fn new((window_action, tab_action): (Rc<WindowAction>, Rc<TabAction>)) -> Self {
|
||||
Self {
|
||||
g_box: Box::builder().orientation(Orientation::Vertical).build(),
|
||||
browser_action,
|
||||
window_action,
|
||||
tab_action,
|
||||
}
|
||||
|
|
@ -130,11 +122,7 @@ impl Content {
|
|||
/// * could be useful to extract document title parsed from Gemtext
|
||||
pub fn to_text_gemini(&self, base: &Uri, data: &str) -> Text {
|
||||
self.clean();
|
||||
let text = Text::new_gemini(
|
||||
data,
|
||||
base,
|
||||
(&self.browser_action, &self.window_action, &self.tab_action),
|
||||
);
|
||||
let text = Text::new_gemini(data, base, (&self.window_action, &self.tab_action));
|
||||
self.g_box.append(&text.g_box);
|
||||
text
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue