Compare commits
8 Commits
fa128ca284
...
f785463540
Author | SHA1 | Date |
---|---|---|
Nefo Fortressia | f785463540 | |
Nefo Fortressia | e0d353a10b | |
Nefo Fortressia | b53915afa0 | |
Nefo Fortressia | 9b99932fdd | |
Nefo Fortressia | 8e31be7e47 | |
Nefo Fortressia | c8fd305d90 | |
Nefo Fortressia | 10ae0cf783 | |
Nefo Fortressia | 9e06e96fed |
|
@ -1 +0,0 @@
|
|||
"clippy::style" = "deny"
|
|
@ -21,8 +21,8 @@ impl EchidnaCoreEditor {
|
|||
// Without cloning it, for some reasons the Rust compiler complains about &this.to_imp().sourceview not being IsA<sourceview::View>
|
||||
this_imp.minimap.set_view(&this_imp.sourceview.clone());
|
||||
|
||||
if file.is_some() {
|
||||
let file = file.unwrap();
|
||||
match file {
|
||||
Some(file) => {
|
||||
let file_location = file
|
||||
.location()
|
||||
.expect("file is required to have a location");
|
||||
|
@ -73,6 +73,8 @@ impl EchidnaCoreEditor {
|
|||
);
|
||||
}
|
||||
}
|
||||
None => {}
|
||||
}
|
||||
this
|
||||
}
|
||||
|
||||
|
|
|
@ -15,3 +15,9 @@ impl EchidnaSidebar {
|
|||
glib::Object::new(&[]).expect("Failed to create 'EchidnaSidebar' component.")
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for EchidnaSidebar {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,9 +36,9 @@ impl BuildableImpl for TabLabel {
|
|||
fn add_child(
|
||||
&self,
|
||||
buildable: &Self::Type,
|
||||
builder: >k::Builder,
|
||||
_builder: >k::Builder,
|
||||
child: &glib::Object,
|
||||
type_: Option<&str>,
|
||||
_type_: Option<&str>,
|
||||
) {
|
||||
buildable.prepend(child.downcast_ref::<gtk::Widget>().unwrap());
|
||||
}
|
||||
|
|
|
@ -17,8 +17,9 @@ impl TabLabel {
|
|||
pub fn new<U: IsA<gtk::Widget>>(tab_label: Option<&U>) -> Self {
|
||||
let this: Self = glib::Object::new(&[]).expect("Failed to create 'TabLabel' component.");
|
||||
|
||||
if tab_label.is_some() {
|
||||
this.prepend(tab_label.unwrap());
|
||||
match tab_label {
|
||||
Some(tab_label) => this.prepend(tab_label),
|
||||
None => {}
|
||||
}
|
||||
this
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ impl FileImplementedEditor for super::EchidnaWindow {
|
|||
notebook.prepend_closable_page(
|
||||
&editor_page,
|
||||
Some(&Label::new(Some(
|
||||
&file_location
|
||||
file_location
|
||||
.path()
|
||||
.expect("The file's path is missing")
|
||||
.file_name()
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
use crate::components::tab_label::TabLabel;
|
||||
use glib::IsA;
|
||||
use gtk::{prelude::*, Box, Button, Widget};
|
||||
use gtk::{prelude::*, Widget};
|
||||
|
||||
pub trait ClosableTabImplementedNotebook {
|
||||
fn prepend_closable_page<T: IsA<Widget>, U: IsA<Widget>>(
|
||||
|
|
Loading…
Reference in New Issue