mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-27 04:07:25 +01:00
Refactor module layout
This commit is contained in:
parent
e59052a362
commit
5956b7ff15
70 changed files with 757 additions and 841 deletions
|
|
@ -1,4 +1,5 @@
|
|||
use crate::player::MusicusPlayer;
|
||||
use std::cell::{Cell, OnceCell};
|
||||
|
||||
use gtk::{
|
||||
gdk,
|
||||
glib::{self, clone, subclass::Signal, Properties},
|
||||
|
|
@ -6,7 +7,8 @@ use gtk::{
|
|||
subclass::prelude::*,
|
||||
};
|
||||
use once_cell::sync::Lazy;
|
||||
use std::cell::{Cell, OnceCell};
|
||||
|
||||
use crate::player::Player;
|
||||
|
||||
mod imp {
|
||||
use super::*;
|
||||
|
|
@ -16,7 +18,7 @@ mod imp {
|
|||
#[template(file = "data/ui/player_bar.blp")]
|
||||
pub struct PlayerBar {
|
||||
#[property(get, construct_only)]
|
||||
pub player: OnceCell<MusicusPlayer>,
|
||||
pub player: OnceCell<Player>,
|
||||
|
||||
pub seeking: Cell<bool>,
|
||||
|
||||
|
|
@ -196,7 +198,7 @@ glib::wrapper! {
|
|||
|
||||
#[gtk::template_callbacks]
|
||||
impl PlayerBar {
|
||||
pub fn new(player: &MusicusPlayer) -> Self {
|
||||
pub fn new(player: &Player) -> Self {
|
||||
glib::Object::builder().property("player", player).build()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue