mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-02-10 10:24:13 +00:00
rename wrapper mod to window
This commit is contained in:
parent
992ecfc0f6
commit
d5101a6465
@ -1,12 +1,12 @@
|
|||||||
mod database;
|
mod database;
|
||||||
mod header;
|
mod header;
|
||||||
mod widget;
|
mod widget;
|
||||||
mod wrapper;
|
mod window;
|
||||||
|
|
||||||
use database::Database;
|
use database::Database;
|
||||||
use header::Header;
|
use header::Header;
|
||||||
use widget::Widget;
|
use widget::Widget;
|
||||||
use wrapper::Wrapper;
|
use window::Window;
|
||||||
|
|
||||||
use gtk::{
|
use gtk::{
|
||||||
gio::{AppInfo, AppLaunchContext, SimpleAction},
|
gio::{AppInfo, AppLaunchContext, SimpleAction},
|
||||||
@ -20,7 +20,7 @@ pub struct Browser {
|
|||||||
database: Arc<Database>,
|
database: Arc<Database>,
|
||||||
// Components
|
// Components
|
||||||
// header: Arc<Header>,
|
// header: Arc<Header>,
|
||||||
// wrapper: Arc<Wrapper>,
|
// window: Arc<Window>,
|
||||||
widget: Arc<Widget>,
|
widget: Arc<Widget>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ impl Browser {
|
|||||||
action_tab_pin.clone(),
|
action_tab_pin.clone(),
|
||||||
));
|
));
|
||||||
|
|
||||||
let main = Arc::new(Wrapper::new(
|
let main = Arc::new(Window::new(
|
||||||
action_tab_page_navigation_base.clone(),
|
action_tab_page_navigation_base.clone(),
|
||||||
action_tab_page_navigation_history_back.clone(),
|
action_tab_page_navigation_history_back.clone(),
|
||||||
action_tab_page_navigation_history_forward.clone(),
|
action_tab_page_navigation_history_forward.clone(),
|
||||||
@ -254,7 +254,7 @@ impl Browser {
|
|||||||
// Delegate restore action to childs
|
// Delegate restore action to childs
|
||||||
// @TODO
|
// @TODO
|
||||||
// self.header.restore(record.id);
|
// self.header.restore(record.id);
|
||||||
// self.main.restore(record.id);
|
// self.window.restore(record.id);
|
||||||
self.widget.restore(&record.id);
|
self.widget.restore(&record.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -269,7 +269,7 @@ impl Browser {
|
|||||||
let id = self.database.last_insert_id();
|
let id = self.database.last_insert_id();
|
||||||
// @TODO
|
// @TODO
|
||||||
// self.header.save(id);
|
// self.header.save(id);
|
||||||
// self.main.save(id);
|
// self.window.save(id);
|
||||||
self.widget.save(&id);
|
self.widget.save(&id);
|
||||||
}
|
}
|
||||||
Err(error) => panic!("{error}"), // @TODO
|
Err(error) => panic!("{error}"), // @TODO
|
||||||
|
@ -6,12 +6,12 @@ use tab::Tab;
|
|||||||
|
|
||||||
use gtk::{gio::SimpleAction, glib::GString, prelude::BoxExt, Box, Orientation};
|
use gtk::{gio::SimpleAction, glib::GString, prelude::BoxExt, Box, Orientation};
|
||||||
|
|
||||||
pub struct Wrapper {
|
pub struct Window {
|
||||||
tab: Arc<Tab>,
|
tab: Arc<Tab>,
|
||||||
widget: Box,
|
widget: Box,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Wrapper {
|
impl Window {
|
||||||
// Construct
|
// Construct
|
||||||
pub fn new(
|
pub fn new(
|
||||||
action_tab_page_navigation_base: Arc<SimpleAction>,
|
action_tab_page_navigation_base: Arc<SimpleAction>,
|
Loading…
x
Reference in New Issue
Block a user