mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-02-05 16:04:15 +00:00
use namespaces
This commit is contained in:
parent
b5b4b359fa
commit
9b12642960
@ -3,6 +3,8 @@ mod header;
|
||||
mod main;
|
||||
mod widget;
|
||||
|
||||
use gtk::gio::ActionEntry;
|
||||
use gtk::{Application, ApplicationWindow};
|
||||
use std::sync::Arc;
|
||||
|
||||
use gtk::prelude::{ActionMapExtManual, GtkWindowExt};
|
||||
@ -17,8 +19,8 @@ pub struct Browser {
|
||||
impl Browser {
|
||||
// Construct new browser
|
||||
pub fn new(
|
||||
app: >k::Application,
|
||||
connection: std::sync::Arc<sqlite::Connection>, // @TODO glib clone macro?
|
||||
app: &Application,
|
||||
connection: Arc<sqlite::Connection>, // @TODO glib clone macro?
|
||||
default_width: i32,
|
||||
default_height: i32,
|
||||
) -> Browser {
|
||||
@ -37,17 +39,17 @@ impl Browser {
|
||||
|
||||
// Init actions @TODO separated module
|
||||
widget.gtk().add_action_entries([
|
||||
gtk::gio::ActionEntry::builder("debug")
|
||||
.activate(|this: >k::ApplicationWindow, _, _| {
|
||||
ActionEntry::builder("debug")
|
||||
.activate(|this: &ApplicationWindow, _, _| {
|
||||
this.emit_enable_debugging(true);
|
||||
})
|
||||
.build(),
|
||||
gtk::gio::ActionEntry::builder("quit")
|
||||
.activate(|this: >k::ApplicationWindow, _, _| {
|
||||
ActionEntry::builder("quit")
|
||||
.activate(|this: &ApplicationWindow, _, _| {
|
||||
this.close();
|
||||
})
|
||||
.build(),
|
||||
gtk::gio::ActionEntry::builder("tab_append")
|
||||
ActionEntry::builder("tab_append")
|
||||
.activate({
|
||||
let main = main.clone();
|
||||
move |_, _, _| {
|
||||
|
Loading…
x
Reference in New Issue
Block a user