|
|
@ -4,27 +4,28 @@ mod history; |
|
|
|
mod reload; |
|
|
|
mod reload; |
|
|
|
mod request; |
|
|
|
mod request; |
|
|
|
|
|
|
|
|
|
|
|
use gtk::prelude::BoxExt; |
|
|
|
|
|
|
|
use gtk::{Box, Orientation}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
use base::Base; |
|
|
|
use base::Base; |
|
|
|
use bookmark::Bookmark; |
|
|
|
use bookmark::Bookmark; |
|
|
|
use history::History; |
|
|
|
use history::History; |
|
|
|
use reload::Reload; |
|
|
|
use reload::Reload; |
|
|
|
use request::Request; |
|
|
|
use request::Request; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
use gtk::{prelude::BoxExt, Box, Orientation}; |
|
|
|
|
|
|
|
|
|
|
|
pub struct Navigation { |
|
|
|
pub struct Navigation { |
|
|
|
widget: Box, |
|
|
|
widget: Box, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
impl Navigation { |
|
|
|
impl Navigation { |
|
|
|
pub fn new() -> Navigation { |
|
|
|
pub fn new() -> Navigation { |
|
|
|
|
|
|
|
// Init components
|
|
|
|
let base = Base::new(); |
|
|
|
let base = Base::new(); |
|
|
|
let history = History::new(); |
|
|
|
let history = History::new(); |
|
|
|
let reload = Reload::new(); |
|
|
|
let reload = Reload::new(); |
|
|
|
let request = Request::new(); |
|
|
|
let request = Request::new(); |
|
|
|
let bookmark = Bookmark::new(); |
|
|
|
let bookmark = Bookmark::new(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Init widget
|
|
|
|
let widget = Box::builder() |
|
|
|
let widget = Box::builder() |
|
|
|
.orientation(Orientation::Horizontal) |
|
|
|
.orientation(Orientation::Horizontal) |
|
|
|
.spacing(8) |
|
|
|
.spacing(8) |
|
|
@ -40,6 +41,7 @@ impl Navigation { |
|
|
|
widget.append(request.widget()); |
|
|
|
widget.append(request.widget()); |
|
|
|
widget.append(bookmark.widget()); |
|
|
|
widget.append(bookmark.widget()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Result
|
|
|
|
Self { widget } |
|
|
|
Self { widget } |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|