mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
apply rustfmt
This commit is contained in:
parent
e6e81e846a
commit
f8d938a8af
24 changed files with 253 additions and 611 deletions
58
src/main.rs
58
src/main.rs
|
|
@ -1,53 +1,27 @@
|
|||
#[path = "app/browser.rs"] mod browser;
|
||||
#[path = "app/browser.rs"]
|
||||
mod browser;
|
||||
|
||||
use gtk::prelude::{
|
||||
ApplicationExt,
|
||||
ApplicationExtManual,
|
||||
GtkApplicationExt,
|
||||
GtkWindowExt
|
||||
};
|
||||
use gtk::prelude::{ApplicationExt, ApplicationExtManual, GtkApplicationExt, GtkWindowExt};
|
||||
|
||||
use gtk::{
|
||||
Application,
|
||||
glib
|
||||
};
|
||||
use gtk::{glib, Application};
|
||||
|
||||
fn main() -> glib::ExitCode
|
||||
{
|
||||
fn main() -> glib::ExitCode {
|
||||
// Init app
|
||||
let app = Application::builder().application_id(
|
||||
"io.github.yggverse.Yoda.app"
|
||||
).build();
|
||||
let app = Application::builder()
|
||||
.application_id("io.github.yggverse.Yoda.app")
|
||||
.build();
|
||||
|
||||
// Init accels
|
||||
app.set_accels_for_action(
|
||||
"win.tab_append", &["<Ctrl>t"]
|
||||
);
|
||||
|
||||
app.set_accels_for_action(
|
||||
"win.tab_close", &["<Ctrl>q"]
|
||||
);
|
||||
|
||||
app.set_accels_for_action(
|
||||
"win.debug", &["<Ctrl>i"]
|
||||
);
|
||||
|
||||
app.set_accels_for_action(
|
||||
"win.quit", &["<Ctrl>Escape"]
|
||||
);
|
||||
app.set_accels_for_action("win.tab_append", &["<Ctrl>t"]);
|
||||
app.set_accels_for_action("win.tab_close", &["<Ctrl>q"]);
|
||||
app.set_accels_for_action("win.debug", &["<Ctrl>i"]);
|
||||
app.set_accels_for_action("win.quit", &["<Ctrl>Escape"]);
|
||||
|
||||
// Create new window
|
||||
app.connect_activate(
|
||||
|app|
|
||||
{
|
||||
browser::new(
|
||||
app,
|
||||
640,
|
||||
480
|
||||
).present();
|
||||
}
|
||||
);
|
||||
app.connect_activate(|app| {
|
||||
browser::new(app, 640, 480).present();
|
||||
});
|
||||
|
||||
// Start
|
||||
app.run()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue