mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
init profile in constructor
This commit is contained in:
parent
25b63c0e02
commit
a0201ea83b
4 changed files with 21 additions and 28 deletions
10
src/app.rs
10
src/app.rs
|
|
@ -4,7 +4,7 @@ mod database;
|
|||
use browser::Browser;
|
||||
use database::Database;
|
||||
|
||||
use crate::{action::Browser as BrowserAction, Profile};
|
||||
use crate::{action::Browser as BrowserAction, profile::Profile};
|
||||
use adw::Application;
|
||||
use gtk::{
|
||||
gio::SimpleAction,
|
||||
|
|
@ -25,14 +25,16 @@ pub struct App {
|
|||
|
||||
impl App {
|
||||
// Construct
|
||||
pub fn new(profile: Rc<Profile>) -> Self {
|
||||
pub fn new() -> Self {
|
||||
// Init profile
|
||||
let profile = Rc::new(Profile::new());
|
||||
|
||||
// Init actions
|
||||
let browser_action = Rc::new(BrowserAction::new());
|
||||
|
||||
// Init defaults
|
||||
// @TODO
|
||||
let default_state = (-1).to_variant();
|
||||
|
||||
// Init actions
|
||||
let action_page_new = SimpleAction::new(&uuid_string_random(), None);
|
||||
let action_page_close =
|
||||
SimpleAction::new_stateful(&uuid_string_random(), None, &default_state);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue