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