Commit 733e2794 authored by Jordan Petridis's avatar Jordan Petridis 🌱

AudioPlayer: Rename the widget to AudioPlayerWidget.

parent efb685ac
...@@ -113,14 +113,14 @@ struct PlayerControls { ...@@ -113,14 +113,14 @@ struct PlayerControls {
} }
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
pub struct PlayerWidget { pub struct AudioPlayerWidget {
pub container: gtk::Box, pub container: gtk::Box,
player: gst_player::Player, player: gst_player::Player,
controls: PlayerControls, controls: PlayerControls,
timer: PlayerTimes, timer: PlayerTimes,
} }
impl Default for PlayerWidget { impl Default for AudioPlayerWidget {
fn default() -> Self { fn default() -> Self {
let dispatcher = gst_player::PlayerGMainContextSignalDispatcher::new(None); let dispatcher = gst_player::PlayerGMainContextSignalDispatcher::new(None);
let player = gst_player::Player::new( let player = gst_player::Player::new(
...@@ -160,7 +160,7 @@ impl Default for PlayerWidget { ...@@ -160,7 +160,7 @@ impl Default for PlayerWidget {
slider_update, slider_update,
}; };
PlayerWidget { AudioPlayerWidget {
container, container,
player, player,
controls, controls,
...@@ -169,7 +169,7 @@ impl Default for PlayerWidget { ...@@ -169,7 +169,7 @@ impl Default for PlayerWidget {
} }
} }
impl PlayerWidget { impl AudioPlayerWidget {
pub fn new() -> Rc<Self> { pub fn new() -> Rc<Self> {
let w = Rc::new(Self::default()); let w = Rc::new(Self::default());
Self::init(&w); Self::init(&w);
...@@ -230,7 +230,7 @@ impl PlayerWidget { ...@@ -230,7 +230,7 @@ impl PlayerWidget {
} }
} }
impl PlayerExt for PlayerWidget { impl PlayerExt for AudioPlayerWidget {
fn play(&self) { fn play(&self) {
self.controls.pause.show(); self.controls.pause.show();
self.controls.play.hide(); self.controls.play.hide();
......
...@@ -22,3 +22,4 @@ pub use self::avatar::Avatar; ...@@ -22,3 +22,4 @@ pub use self::avatar::Avatar;
pub use self::avatar::AvatarExt; pub use self::avatar::AvatarExt;
pub use self::avatar::admin_badge; pub use self::avatar::admin_badge;
pub use self::avatar::AdminColor; pub use self::avatar::AdminColor;
pub use self::inline_player::AudioPlayerWidget;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment