feat: import menubar from app/mod.rs

merge-requests/8/head
Nefo Fortressia 2021-10-22 10:13:14 +07:00
parent d4670be8b4
commit c3e76bccb2
1 changed files with 9 additions and 30 deletions

View File

@ -3,51 +3,30 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
pub mod imp;
pub mod menubar;
pub mod workspace;
use glib::wrapper;
wrapper! {
pub struct EchidnaEditor(ObjectSubclass<imp::EchidnaEditor>) @extends gio::Application, gtk::Application, @implements gio::ActionGroup, gio::ActionMap;
}
impl Default for EchidnaEditor {
fn default() -> Self {
Self::new("land.echidna.editor")
Self::new("land.echidna.editor")
}
}
impl EchidnaEditor {
pub fn new(
app_id: &'static str) -> Self {
let object = glib::Object::new(&[
pub fn new(app_id: &'static str) -> Self {
let object = glib::Object::new(&[
("application-id", &app_id),
("flags", &gio::ApplicationFlags::empty())
("flags", &gio::ApplicationFlags::empty()),
]);
match object {
Ok(o) => o,
Err(e) => panic!("Error in making EchidnaApplication {}", e),
}
match object {
Ok(o) => o,
Err(e) => panic!("Error in making EchidnaApplication {}", e),
}
}
}