feat: implement win.get-started action
parent
d022ed7bc1
commit
f0246f281b
|
@ -4,11 +4,12 @@
|
||||||
|
|
||||||
use super::file::FileImplementedEditor;
|
use super::file::FileImplementedEditor;
|
||||||
use super::EchidnaWindow;
|
use super::EchidnaWindow;
|
||||||
|
use crate::components::GettingStartedPage;
|
||||||
|
use crate::prelude::*;
|
||||||
use gio::{MenuModel, SimpleAction};
|
use gio::{MenuModel, SimpleAction};
|
||||||
use glib::clone;
|
use glib::clone;
|
||||||
use gtk::prelude::*;
|
use gtk::prelude::*;
|
||||||
use gtk::AboutDialog;
|
use gtk::AboutDialog;
|
||||||
|
|
||||||
pub trait MenubarImplementedEditor {
|
pub trait MenubarImplementedEditor {
|
||||||
fn setup_menubar(&self);
|
fn setup_menubar(&self);
|
||||||
}
|
}
|
||||||
|
@ -120,5 +121,18 @@ impl MenubarImplementedEditor for EchidnaWindow {
|
||||||
window.action_save_file_as();
|
window.action_save_file_as();
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
let action_getting_started = SimpleAction::new("get-started", None);
|
||||||
|
|
||||||
|
self.add_action(&action_getting_started);
|
||||||
|
|
||||||
|
action_getting_started.connect_activate(clone!(@weak self as window =>
|
||||||
|
move |_action, _variant| {
|
||||||
|
let page = GettingStartedPage::new();
|
||||||
|
page.setup_actions(&window);
|
||||||
|
window.to_imp().notebook.prepend_closable_page(&page, Some(>k::Label::new(Some(&"Getting Started"))));
|
||||||
|
|
||||||
|
}));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue