Compare commits
No commits in common. "f78546354078cff392bc79d1d45907946f934f41" and "fa128ca284fcf8c26be83d9507ffc8b826fa51a4" have entirely different histories.
f785463540
...
fa128ca284
|
@ -0,0 +1 @@
|
||||||
|
"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>
|
// 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());
|
this_imp.minimap.set_view(&this_imp.sourceview.clone());
|
||||||
|
|
||||||
match file {
|
if file.is_some() {
|
||||||
Some(file) => {
|
let file = file.unwrap();
|
||||||
let file_location = file
|
let file_location = file
|
||||||
.location()
|
.location()
|
||||||
.expect("file is required to have a location");
|
.expect("file is required to have a location");
|
||||||
|
@ -73,8 +73,6 @@ impl EchidnaCoreEditor {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
None => {}
|
|
||||||
}
|
|
||||||
this
|
this
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,9 +15,3 @@ impl EchidnaSidebar {
|
||||||
glib::Object::new(&[]).expect("Failed to create 'EchidnaSidebar' component.")
|
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(
|
fn add_child(
|
||||||
&self,
|
&self,
|
||||||
buildable: &Self::Type,
|
buildable: &Self::Type,
|
||||||
_builder: >k::Builder,
|
builder: >k::Builder,
|
||||||
child: &glib::Object,
|
child: &glib::Object,
|
||||||
_type_: Option<&str>,
|
type_: Option<&str>,
|
||||||
) {
|
) {
|
||||||
buildable.prepend(child.downcast_ref::<gtk::Widget>().unwrap());
|
buildable.prepend(child.downcast_ref::<gtk::Widget>().unwrap());
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,9 +17,8 @@ impl TabLabel {
|
||||||
pub fn new<U: IsA<gtk::Widget>>(tab_label: Option<&U>) -> Self {
|
pub fn new<U: IsA<gtk::Widget>>(tab_label: Option<&U>) -> Self {
|
||||||
let this: Self = glib::Object::new(&[]).expect("Failed to create 'TabLabel' component.");
|
let this: Self = glib::Object::new(&[]).expect("Failed to create 'TabLabel' component.");
|
||||||
|
|
||||||
match tab_label {
|
if tab_label.is_some() {
|
||||||
Some(tab_label) => this.prepend(tab_label),
|
this.prepend(tab_label.unwrap());
|
||||||
None => {}
|
|
||||||
}
|
}
|
||||||
this
|
this
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,7 +67,7 @@ impl FileImplementedEditor for super::EchidnaWindow {
|
||||||
notebook.prepend_closable_page(
|
notebook.prepend_closable_page(
|
||||||
&editor_page,
|
&editor_page,
|
||||||
Some(&Label::new(Some(
|
Some(&Label::new(Some(
|
||||||
file_location
|
&file_location
|
||||||
.path()
|
.path()
|
||||||
.expect("The file's path is missing")
|
.expect("The file's path is missing")
|
||||||
.file_name()
|
.file_name()
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
use crate::components::tab_label::TabLabel;
|
use crate::components::tab_label::TabLabel;
|
||||||
use glib::IsA;
|
use glib::IsA;
|
||||||
use gtk::{prelude::*, Widget};
|
use gtk::{prelude::*, Box, Button, Widget};
|
||||||
|
|
||||||
pub trait ClosableTabImplementedNotebook {
|
pub trait ClosableTabImplementedNotebook {
|
||||||
fn prepend_closable_page<T: IsA<Widget>, U: IsA<Widget>>(
|
fn prepend_closable_page<T: IsA<Widget>, U: IsA<Widget>>(
|
||||||
|
|
Loading…
Reference in New Issue