Resolve warnings in gm-control-panel
This commit is contained in:
parent
e87589705d
commit
b07e55f126
|
@ -45,7 +45,7 @@ impl ApplicationWindow {
|
||||||
]
|
]
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|name| {
|
.map(|name| {
|
||||||
let playlist = PlaylistCard::new();
|
let playlist = PlaylistCard::default();
|
||||||
playlist.set_name(name);
|
playlist.set_name(name);
|
||||||
playlist
|
playlist
|
||||||
})
|
})
|
||||||
|
|
|
@ -31,8 +31,8 @@ glib::wrapper! {
|
||||||
pub struct PlaylistCard(ObjectSubclass<PlaylistCardPrivate>) @extends gtk::Box, gtk::Widget, @implements gtk::Orientable;
|
pub struct PlaylistCard(ObjectSubclass<PlaylistCardPrivate>) @extends gtk::Box, gtk::Widget, @implements gtk::Orientable;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl PlaylistCard {
|
impl Default for PlaylistCard {
|
||||||
pub fn new() -> Self {
|
fn default() -> Self {
|
||||||
let s: Self = Object::builder().build();
|
let s: Self = Object::builder().build();
|
||||||
s.set_orientation(gtk::Orientation::Vertical);
|
s.set_orientation(gtk::Orientation::Vertical);
|
||||||
s.add_css_class("playlist-card");
|
s.add_css_class("playlist-card");
|
||||||
|
@ -43,7 +43,9 @@ impl PlaylistCard {
|
||||||
|
|
||||||
s
|
s
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl PlaylistCard {
|
||||||
pub fn set_name(&self, s: &str) {
|
pub fn set_name(&self, s: &str) {
|
||||||
self.imp().name.set_text(s);
|
self.imp().name.set_text(s);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue