Update to relm4 v0.7.0-rc.1
This commit is contained in:
8
Cargo.lock
generated
8
Cargo.lock
generated
@@ -2787,9 +2787,9 @@ checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "relm4"
|
name = "relm4"
|
||||||
version = "0.7.0-beta.2"
|
version = "0.7.0-rc.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f505ac255c34dc85b8b189cbc8e12d012765aa9294727c6082e76777e56a50bf"
|
checksum = "b7497b6d4d07b10f8d5384a657d40fb814de5fc900785322129ec459527c7af1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"flume 0.11.0",
|
"flume 0.11.0",
|
||||||
@@ -2815,9 +2815,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "relm4-macros"
|
name = "relm4-macros"
|
||||||
version = "0.7.0-beta.1"
|
version = "0.7.0-rc.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7cdf60cdb41e28131b6c0d830db742dc2b9ea311ef319f08cfac28567ec1d938"
|
checksum = "830b999c06b80fc53dac4e1b20382fde949b15cfd3342e71f53fed5346237a4f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
10
Cargo.toml
10
Cargo.toml
@@ -1,12 +1,12 @@
|
|||||||
[workspace]
|
[workspace]
|
||||||
resolver = "2"
|
resolver = "2"
|
||||||
members = [
|
members = [
|
||||||
"delfin",
|
"delfin",
|
||||||
"video_player_mpv/sys",
|
"video_player_mpv/sys",
|
||||||
"video_player_mpv",
|
"video_player_mpv",
|
||||||
"video_player_gst",
|
"video_player_gst",
|
||||||
]
|
]
|
||||||
exclude = ["video_player_mpv/sys/gir"]
|
exclude = ["video_player_mpv/sys/gir"]
|
||||||
default-members = ["delfin"]
|
default-members = ["delfin"]
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
relm4 = { version = "0.7.0-beta.2", features = ["gnome_45", "libadwaita"] }
|
relm4 = { version = "0.7.0-rc.1", features = ["gnome_45", "libadwaita"] }
|
||||||
|
@@ -101,7 +101,7 @@ impl Component for AccountList {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
_init: Self::Init,
|
_init: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
sender: relm4::ComponentSender<Self>,
|
sender: relm4::ComponentSender<Self>,
|
||||||
) -> relm4::ComponentParts<Self> {
|
) -> relm4::ComponentParts<Self> {
|
||||||
let accounts = FactoryVecDeque::builder()
|
let accounts = FactoryVecDeque::builder()
|
||||||
|
@@ -116,7 +116,7 @@ impl Component for AddAccountDialog {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
server: Self::Init,
|
server: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
sender: relm4::ComponentSender<Self>,
|
sender: relm4::ComponentSender<Self>,
|
||||||
) -> relm4::ComponentParts<Self> {
|
) -> relm4::ComponentParts<Self> {
|
||||||
let model = AddAccountDialog {
|
let model = AddAccountDialog {
|
||||||
|
@@ -141,7 +141,7 @@ impl Component for App {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
_init: Self::Init,
|
_init: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
sender: relm4::ComponentSender<Self>,
|
sender: relm4::ComponentSender<Self>,
|
||||||
) -> relm4::ComponentParts<Self> {
|
) -> relm4::ComponentParts<Self> {
|
||||||
gtk::Window::set_default_icon_name(APP_ID);
|
gtk::Window::set_default_icon_name(APP_ID);
|
||||||
|
@@ -24,7 +24,7 @@ impl SimpleComponent for About {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
_init: Self::Init,
|
_init: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
_sender: relm4::ComponentSender<Self>,
|
_sender: relm4::ComponentSender<Self>,
|
||||||
) -> relm4::ComponentParts<Self> {
|
) -> relm4::ComponentParts<Self> {
|
||||||
let widgets = view_output!();
|
let widgets = view_output!();
|
||||||
|
@@ -82,7 +82,7 @@ impl Component for BorgarMenu {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
auth: Self::Init,
|
auth: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
sender: ComponentSender<Self>,
|
sender: ComponentSender<Self>,
|
||||||
) -> ComponentParts<Self> {
|
) -> ComponentParts<Self> {
|
||||||
let model = BorgarMenu {
|
let model = BorgarMenu {
|
||||||
|
@@ -70,7 +70,7 @@ impl Component for SignOutDialog {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
init: Self::Init,
|
init: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
sender: ComponentSender<Self>,
|
sender: ComponentSender<Self>,
|
||||||
) -> ComponentParts<Self> {
|
) -> ComponentParts<Self> {
|
||||||
let (api_client, server, account) = init;
|
let (api_client, server, account) = init;
|
||||||
|
@@ -70,7 +70,7 @@ impl Component for Collection {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
init: Self::Init,
|
init: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
sender: ComponentSender<Self>,
|
sender: ComponentSender<Self>,
|
||||||
) -> ComponentParts<Self> {
|
) -> ComponentParts<Self> {
|
||||||
let (api_client, collection, server, account) = init;
|
let (api_client, collection, server, account) = init;
|
||||||
|
@@ -34,7 +34,7 @@ impl SimpleComponent for Collections {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
api_client: Self::Init,
|
api_client: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
_sender: ComponentSender<Self>,
|
_sender: ComponentSender<Self>,
|
||||||
) -> ComponentParts<Self> {
|
) -> ComponentParts<Self> {
|
||||||
let fetcher = CollectionsFetcher {
|
let fetcher = CollectionsFetcher {
|
||||||
|
@@ -56,7 +56,7 @@ impl SimpleComponent for Home {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
init: Self::Init,
|
init: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
_sender: ComponentSender<Self>,
|
_sender: ComponentSender<Self>,
|
||||||
) -> ComponentParts<Self> {
|
) -> ComponentParts<Self> {
|
||||||
let mut model = Home { sections: vec![] };
|
let mut model = Home { sections: vec![] };
|
||||||
|
@@ -32,7 +32,7 @@ impl Component for HomeSectionContinueWatching {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
api_client: Self::Init,
|
api_client: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
sender: relm4::ComponentSender<Self>,
|
sender: relm4::ComponentSender<Self>,
|
||||||
) -> ComponentParts<Self> {
|
) -> ComponentParts<Self> {
|
||||||
let widgets = view_output!();
|
let widgets = view_output!();
|
||||||
|
@@ -50,7 +50,7 @@ impl Component for HomeSectionLatest {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
init: Self::Init,
|
init: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
sender: ComponentSender<Self>,
|
sender: ComponentSender<Self>,
|
||||||
) -> ComponentParts<Self> {
|
) -> ComponentParts<Self> {
|
||||||
let api_client = init.0;
|
let api_client = init.0;
|
||||||
@@ -120,7 +120,7 @@ impl SimpleComponent for LatestRow {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
init: Self::Init,
|
init: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
sender: ComponentSender<Self>,
|
sender: ComponentSender<Self>,
|
||||||
) -> ComponentParts<Self> {
|
) -> ComponentParts<Self> {
|
||||||
let (api_client, view) = init;
|
let (api_client, view) = init;
|
||||||
|
@@ -43,7 +43,7 @@ impl Component for HomeSectionMyMedia {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
init: Self::Init,
|
init: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
sender: ComponentSender<Self>,
|
sender: ComponentSender<Self>,
|
||||||
) -> ComponentParts<Self> {
|
) -> ComponentParts<Self> {
|
||||||
let HomeSectionMyMediaInit {
|
let HomeSectionMyMediaInit {
|
||||||
|
@@ -32,7 +32,7 @@ impl Component for HomeSectionNextUp {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
api_client: Self::Init,
|
api_client: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
sender: relm4::ComponentSender<Self>,
|
sender: relm4::ComponentSender<Self>,
|
||||||
) -> ComponentParts<Self> {
|
) -> ComponentParts<Self> {
|
||||||
let widgets = view_output!();
|
let widgets = view_output!();
|
||||||
|
@@ -39,7 +39,7 @@ impl SimpleComponent for MediaButton {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
init: Self::Init,
|
init: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
_sender: relm4::ComponentSender<Self>,
|
_sender: relm4::ComponentSender<Self>,
|
||||||
) -> relm4::ComponentParts<Self> {
|
) -> relm4::ComponentParts<Self> {
|
||||||
let (media, display) = init;
|
let (media, display) = init;
|
||||||
|
@@ -61,7 +61,7 @@ pub(crate) enum MediaCarouselOutput {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl MediaTileDisplay {
|
impl MediaTileDisplay {
|
||||||
fn min_height(&self, pages: &Vec<gtk::Box>) -> i32 {
|
fn min_height(&self, pages: &[gtk::Box]) -> i32 {
|
||||||
match pages.len() {
|
match pages.len() {
|
||||||
1 => self.height() + 50,
|
1 => self.height() + 50,
|
||||||
_ => self.height() + 80,
|
_ => self.height() + 80,
|
||||||
@@ -185,7 +185,7 @@ impl Component for MediaCarousel {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
init: Self::Init,
|
init: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
sender: relm4::ComponentSender<Self>,
|
sender: relm4::ComponentSender<Self>,
|
||||||
) -> relm4::ComponentParts<Self> {
|
) -> relm4::ComponentParts<Self> {
|
||||||
let MediaCarouselInit {
|
let MediaCarouselInit {
|
||||||
|
@@ -35,7 +35,7 @@ impl SimpleComponent for MediaGrid {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
init: Self::Init,
|
init: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
_sender: ComponentSender<Self>,
|
_sender: ComponentSender<Self>,
|
||||||
) -> ComponentParts<Self> {
|
) -> ComponentParts<Self> {
|
||||||
let MediaGridInit {
|
let MediaGridInit {
|
||||||
|
@@ -162,7 +162,7 @@ where
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
init: Self::Init,
|
init: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
sender: ComponentSender<Self>,
|
sender: ComponentSender<Self>,
|
||||||
) -> ComponentParts<Self> {
|
) -> ComponentParts<Self> {
|
||||||
let MediaPageInit {
|
let MediaPageInit {
|
||||||
|
@@ -277,7 +277,7 @@ impl Component for Library {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
init: Self::Init,
|
init: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
sender: relm4::ComponentSender<Self>,
|
sender: relm4::ComponentSender<Self>,
|
||||||
) -> relm4::ComponentParts<Self> {
|
) -> relm4::ComponentParts<Self> {
|
||||||
let (server, account, api_client) = init;
|
let (server, account, api_client) = init;
|
||||||
|
@@ -40,7 +40,7 @@ impl Component for SearchResults {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
api_client: Self::Init,
|
api_client: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
_sender: ComponentSender<Self>,
|
_sender: ComponentSender<Self>,
|
||||||
) -> ComponentParts<Self> {
|
) -> ComponentParts<Self> {
|
||||||
let model = SearchResults {
|
let model = SearchResults {
|
||||||
@@ -168,7 +168,7 @@ impl Component for SearchResultsEmpty {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
api_client: Self::Init,
|
api_client: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
sender: ComponentSender<Self>,
|
sender: ComponentSender<Self>,
|
||||||
) -> ComponentParts<Self> {
|
) -> ComponentParts<Self> {
|
||||||
let model = SearchResultsEmpty;
|
let model = SearchResultsEmpty;
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
use std::path::PathBuf;
|
use std::{fmt::Debug, path::PathBuf};
|
||||||
|
|
||||||
use anyhow::{bail, Context, Result};
|
use anyhow::{bail, Context, Result};
|
||||||
use delfin::{
|
use delfin::{
|
||||||
@@ -24,13 +24,13 @@ fn main() {
|
|||||||
|
|
||||||
let app = RelmApp::new(APP_ID);
|
let app = RelmApp::new(APP_ID);
|
||||||
relm4_icons::initialize_icons();
|
relm4_icons::initialize_icons();
|
||||||
load_css();
|
load_css(&app);
|
||||||
app.with_broker(&APP_BROKER).run::<App>(());
|
app.with_broker(&APP_BROKER).run::<App>(());
|
||||||
}
|
}
|
||||||
|
|
||||||
fn load_css() {
|
fn load_css<T: Debug>(app: &RelmApp<T>) {
|
||||||
let css = include_str!(concat!(env!("OUT_DIR"), "/app.css"));
|
let css = include_str!(concat!(env!("OUT_DIR"), "/app.css"));
|
||||||
relm4::set_global_css(css);
|
app.set_global_css(css);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn load_resources() -> Result<()> {
|
fn load_resources() -> Result<()> {
|
||||||
|
@@ -54,7 +54,7 @@ impl SimpleComponent for Episode {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
init: Self::Init,
|
init: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
_sender: ComponentSender<Self>,
|
_sender: ComponentSender<Self>,
|
||||||
) -> ComponentParts<Self> {
|
) -> ComponentParts<Self> {
|
||||||
let (media, api_client) = init;
|
let (media, api_client) = init;
|
||||||
@@ -146,7 +146,7 @@ impl Component for EpisodeThumbnail {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
init: Self::Init,
|
init: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
sender: ComponentSender<Self>,
|
sender: ComponentSender<Self>,
|
||||||
) -> ComponentParts<Self> {
|
) -> ComponentParts<Self> {
|
||||||
let (media, api_client) = init;
|
let (media, api_client) = init;
|
||||||
|
@@ -99,7 +99,7 @@ impl AsyncComponent for Episodes {
|
|||||||
AsyncComponentParts { model, widgets }
|
AsyncComponentParts { model, widgets }
|
||||||
}
|
}
|
||||||
|
|
||||||
fn init_loading_widgets(root: &mut Self::Root) -> Option<LoadingWidgets> {
|
fn init_loading_widgets(root: Self::Root) -> Option<LoadingWidgets> {
|
||||||
view! {
|
view! {
|
||||||
#[local_ref]
|
#[local_ref]
|
||||||
root {
|
root {
|
||||||
|
@@ -74,7 +74,7 @@ impl AsyncComponent for MediaDetailsContents {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn init_loading_widgets(root: &mut Self::Root) -> Option<LoadingWidgets> {
|
fn init_loading_widgets(root: Self::Root) -> Option<LoadingWidgets> {
|
||||||
view! {
|
view! {
|
||||||
#[local_ref]
|
#[local_ref]
|
||||||
root {
|
root {
|
||||||
|
@@ -187,7 +187,7 @@ impl Component for MediaDetailsHeader {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
init: Self::Init,
|
init: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
sender: ComponentSender<Self>,
|
sender: ComponentSender<Self>,
|
||||||
) -> ComponentParts<Self> {
|
) -> ComponentParts<Self> {
|
||||||
let MediaDetailsHeaderInit {
|
let MediaDetailsHeaderInit {
|
||||||
|
@@ -79,7 +79,7 @@ impl SimpleComponent for MediaDetails {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
init: Self::Init,
|
init: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
sender: ComponentSender<Self>,
|
sender: ComponentSender<Self>,
|
||||||
) -> ComponentParts<Self> {
|
) -> ComponentParts<Self> {
|
||||||
let (api_client, media, server, account) = init;
|
let (api_client, media, server, account) = init;
|
||||||
|
@@ -24,7 +24,7 @@ impl SimpleComponent for SeasonButtons {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
init: Self::Init,
|
init: Self::Init,
|
||||||
seasons_box: &Self::Root,
|
seasons_box: Self::Root,
|
||||||
sender: ComponentSender<Self>,
|
sender: ComponentSender<Self>,
|
||||||
) -> ComponentParts<Self> {
|
) -> ComponentParts<Self> {
|
||||||
let (seasons, initial_selected_season_index) = init;
|
let (seasons, initial_selected_season_index) = init;
|
||||||
|
@@ -53,7 +53,7 @@ impl AsyncComponent for Seasons {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn init_loading_widgets(root: &mut Self::Root) -> Option<LoadingWidgets> {
|
fn init_loading_widgets(root: Self::Root) -> Option<LoadingWidgets> {
|
||||||
view! {
|
view! {
|
||||||
#[local_ref]
|
#[local_ref]
|
||||||
root {
|
root {
|
||||||
|
@@ -97,7 +97,7 @@ impl SimpleComponent for GeneralPreferences {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
_init: Self::Init,
|
_init: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
sender: relm4::ComponentSender<Self>,
|
sender: relm4::ComponentSender<Self>,
|
||||||
) -> relm4::ComponentParts<Self> {
|
) -> relm4::ComponentParts<Self> {
|
||||||
let config = CONFIG.read();
|
let config = CONFIG.read();
|
||||||
|
@@ -35,7 +35,7 @@ impl SimpleComponent for Preferences {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
_init: Self::Init,
|
_init: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
_sender: ComponentSender<Self>,
|
_sender: ComponentSender<Self>,
|
||||||
) -> ComponentParts<Self> {
|
) -> ComponentParts<Self> {
|
||||||
let model = Preferences {
|
let model = Preferences {
|
||||||
|
@@ -179,7 +179,7 @@ impl Component for VideoPlayerPreferences {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
_init: Self::Init,
|
_init: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
sender: ComponentSender<Self>,
|
sender: ComponentSender<Self>,
|
||||||
) -> ComponentParts<Self> {
|
) -> ComponentParts<Self> {
|
||||||
let config = CONFIG.read();
|
let config = CONFIG.read();
|
||||||
|
@@ -190,7 +190,7 @@ impl SimpleComponent for SubtitlesPreferences {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
_init: Self::Init,
|
_init: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
sender: ComponentSender<Self>,
|
sender: ComponentSender<Self>,
|
||||||
) -> ComponentParts<Self> {
|
) -> ComponentParts<Self> {
|
||||||
let model = SubtitlesPreferences {
|
let model = SubtitlesPreferences {
|
||||||
|
@@ -120,7 +120,7 @@ impl Component for AddServerDialog {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
_init: Self::Init,
|
_init: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
sender: ComponentSender<Self>,
|
sender: ComponentSender<Self>,
|
||||||
) -> ComponentParts<Self> {
|
) -> ComponentParts<Self> {
|
||||||
let model = AddServerDialog {
|
let model = AddServerDialog {
|
||||||
|
@@ -92,7 +92,7 @@ impl Component for ServerList {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
_init: Self::Init,
|
_init: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
sender: relm4::ComponentSender<Self>,
|
sender: relm4::ComponentSender<Self>,
|
||||||
) -> relm4::ComponentParts<Self> {
|
) -> relm4::ComponentParts<Self> {
|
||||||
let servers = FactoryVecDeque::builder()
|
let servers = FactoryVecDeque::builder()
|
||||||
|
@@ -17,7 +17,7 @@ impl SimpleComponent for EmptyComponent {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
_init: Self::Init,
|
_init: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
_sender: ComponentSender<Self>,
|
_sender: ComponentSender<Self>,
|
||||||
) -> ComponentParts<Self> {
|
) -> ComponentParts<Self> {
|
||||||
let model = EmptyComponent;
|
let model = EmptyComponent;
|
||||||
|
@@ -55,7 +55,7 @@ impl Component for AudioTracks {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
video_player: Self::Init,
|
video_player: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
sender: relm4::ComponentSender<Self>,
|
sender: relm4::ComponentSender<Self>,
|
||||||
) -> ComponentParts<Self> {
|
) -> ComponentParts<Self> {
|
||||||
let model = AudioTracks {
|
let model = AudioTracks {
|
||||||
|
@@ -55,7 +55,7 @@ impl SimpleComponent for Fullscreen {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
_init: Self::Init,
|
_init: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
sender: relm4::ComponentSender<Self>,
|
sender: relm4::ComponentSender<Self>,
|
||||||
) -> relm4::ComponentParts<Self> {
|
) -> relm4::ComponentParts<Self> {
|
||||||
let window = get_main_window().expect("Failed to get main window.");
|
let window = get_main_window().expect("Failed to get main window.");
|
||||||
|
@@ -126,7 +126,7 @@ impl SimpleComponent for VideoPlayerControls {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
init: Self::Init,
|
init: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
sender: relm4::ComponentSender<Self>,
|
sender: relm4::ComponentSender<Self>,
|
||||||
) -> relm4::ComponentParts<Self> {
|
) -> relm4::ComponentParts<Self> {
|
||||||
let VideoPlayerControlsInit {
|
let VideoPlayerControlsInit {
|
||||||
|
@@ -75,7 +75,7 @@ impl SimpleComponent for NextPrevEpisode {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
direction: Self::Init,
|
direction: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
sender: ComponentSender<Self>,
|
sender: ComponentSender<Self>,
|
||||||
) -> ComponentParts<Self> {
|
) -> ComponentParts<Self> {
|
||||||
let model = NextPrevEpisode {
|
let model = NextPrevEpisode {
|
||||||
|
@@ -54,7 +54,7 @@ impl SimpleComponent for PlayPause {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
video_player: Self::Init,
|
video_player: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
sender: ComponentSender<Self>,
|
sender: ComponentSender<Self>,
|
||||||
) -> ComponentParts<Self> {
|
) -> ComponentParts<Self> {
|
||||||
let model = PlayPause {
|
let model = PlayPause {
|
||||||
|
@@ -169,7 +169,7 @@ impl Component for Scrubber {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
video_player: Self::Init,
|
video_player: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
sender: relm4::ComponentSender<Self>,
|
sender: relm4::ComponentSender<Self>,
|
||||||
) -> relm4::ComponentParts<Self> {
|
) -> relm4::ComponentParts<Self> {
|
||||||
video_player.borrow_mut().connect_position_updated({
|
video_player.borrow_mut().connect_position_updated({
|
||||||
|
@@ -81,7 +81,7 @@ impl SimpleComponent for SkipForwardsBackwards {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
init: Self::Init,
|
init: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
sender: ComponentSender<Self>,
|
sender: ComponentSender<Self>,
|
||||||
) -> ComponentParts<Self> {
|
) -> ComponentParts<Self> {
|
||||||
let (direction, player) = init;
|
let (direction, player) = init;
|
||||||
|
@@ -87,7 +87,7 @@ impl Component for Subtitles {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
video_player: Self::Init,
|
video_player: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
sender: relm4::ComponentSender<Self>,
|
sender: relm4::ComponentSender<Self>,
|
||||||
) -> relm4::ComponentParts<Self> {
|
) -> relm4::ComponentParts<Self> {
|
||||||
let model = Subtitles {
|
let model = Subtitles {
|
||||||
|
@@ -86,7 +86,7 @@ impl SimpleComponent for Volume {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
video_player: Self::Init,
|
video_player: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
sender: relm4::ComponentSender<Self>,
|
sender: relm4::ComponentSender<Self>,
|
||||||
) -> relm4::ComponentParts<Self> {
|
) -> relm4::ComponentParts<Self> {
|
||||||
let config = CONFIG.read();
|
let config = CONFIG.read();
|
||||||
|
@@ -200,7 +200,7 @@ impl Component for VideoPlayer {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
_init: Self::Init,
|
_init: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
sender: relm4::ComponentSender<Self>,
|
sender: relm4::ComponentSender<Self>,
|
||||||
) -> relm4::ComponentParts<Self> {
|
) -> relm4::ComponentParts<Self> {
|
||||||
let show_controls = true;
|
let show_controls = true;
|
||||||
|
@@ -179,7 +179,7 @@ impl Component for NextUp {
|
|||||||
|
|
||||||
fn init(
|
fn init(
|
||||||
video_player: Self::Init,
|
video_player: Self::Init,
|
||||||
root: &Self::Root,
|
root: Self::Root,
|
||||||
sender: ComponentSender<Self>,
|
sender: ComponentSender<Self>,
|
||||||
) -> ComponentParts<Self> {
|
) -> ComponentParts<Self> {
|
||||||
let model = NextUp {
|
let model = NextUp {
|
||||||
|
Reference in New Issue
Block a user