mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2024-12-18 07:51:47 +03:00
feat: get rid of deprecated libadwaita functions calls
This commit is contained in:
parent
a1d1950ce8
commit
9914072c77
6 changed files with 496 additions and 484 deletions
|
@ -71,7 +71,9 @@ impl SimpleAsyncComponent for EnvironmentPage {
|
|||
type Output = EnhancementsAppMsg;
|
||||
|
||||
view! {
|
||||
gtk::Box {
|
||||
adw::NavigationPage {
|
||||
#[wrap(Some)]
|
||||
set_child = >k::Box {
|
||||
set_orientation: gtk::Orientation::Vertical,
|
||||
|
||||
adw::HeaderBar {
|
||||
|
@ -150,6 +152,7 @@ impl SimpleAsyncComponent for EnvironmentPage {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async fn init(_init: Self::Init, root: Self::Root, sender: AsyncComponentSender<Self>) -> AsyncComponentParts<Self> {
|
||||
tracing::info!("Initializing environment settings");
|
||||
|
|
|
@ -105,7 +105,9 @@ impl SimpleAsyncComponent for GamePage {
|
|||
type Output = EnhancementsAppMsg;
|
||||
|
||||
view! {
|
||||
gtk::Box {
|
||||
adw::NavigationPage {
|
||||
#[wrap(Some)]
|
||||
set_child = >k::Box {
|
||||
set_orientation: gtk::Orientation::Vertical,
|
||||
|
||||
adw::HeaderBar {
|
||||
|
@ -150,6 +152,7 @@ impl SimpleAsyncComponent for GamePage {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async fn init(
|
||||
_init: Self::Init,
|
||||
|
|
|
@ -627,13 +627,13 @@ impl SimpleAsyncComponent for EnhancementsApp {
|
|||
},
|
||||
|
||||
#[local_ref]
|
||||
game_page -> gtk::Box {},
|
||||
game_page -> adw::NavigationPage,
|
||||
|
||||
#[local_ref]
|
||||
sandbox_page -> gtk::Box {},
|
||||
sandbox_page -> adw::NavigationPage,
|
||||
|
||||
#[local_ref]
|
||||
environment_page -> gtk::Box {}
|
||||
environment_page -> adw::NavigationPage,
|
||||
}
|
||||
|
||||
async fn init(
|
||||
|
@ -769,28 +769,28 @@ impl SimpleAsyncComponent for EnhancementsApp {
|
|||
PREFERENCES_WINDOW.as_ref()
|
||||
.unwrap_unchecked()
|
||||
.widget()
|
||||
.close_subpage();
|
||||
.pop_subpage();
|
||||
}
|
||||
|
||||
EnhancementsAppMsg::OpenGameSettingsPage => unsafe {
|
||||
PREFERENCES_WINDOW.as_ref()
|
||||
.unwrap_unchecked()
|
||||
.widget()
|
||||
.present_subpage(self.game_page.widget());
|
||||
.push_subpage(self.game_page.widget());
|
||||
}
|
||||
|
||||
EnhancementsAppMsg::OpenSandboxSettingsPage => unsafe {
|
||||
PREFERENCES_WINDOW.as_ref()
|
||||
.unwrap_unchecked()
|
||||
.widget()
|
||||
.present_subpage(self.sandbox_page.widget());
|
||||
.push_subpage(self.sandbox_page.widget());
|
||||
}
|
||||
|
||||
EnhancementsAppMsg::OpenEnvironmentSettingsPage => unsafe {
|
||||
PREFERENCES_WINDOW.as_ref()
|
||||
.unwrap_unchecked()
|
||||
.widget()
|
||||
.present_subpage(self.environment_page.widget());
|
||||
.push_subpage(self.environment_page.widget());
|
||||
}
|
||||
|
||||
EnhancementsAppMsg::Toast { title, description } => {
|
||||
|
|
|
@ -98,7 +98,9 @@ impl SimpleAsyncComponent for SandboxPage {
|
|||
type Output = EnhancementsAppMsg;
|
||||
|
||||
view! {
|
||||
gtk::Box {
|
||||
adw::NavigationPage {
|
||||
#[wrap(Some)]
|
||||
set_child = >k::Box {
|
||||
set_orientation: gtk::Orientation::Vertical,
|
||||
|
||||
adw::HeaderBar {
|
||||
|
@ -321,6 +323,7 @@ impl SimpleAsyncComponent for SandboxPage {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async fn init(_init: Self::Init, root: Self::Root, sender: AsyncComponentSender<Self>) -> AsyncComponentParts<Self> {
|
||||
tracing::info!("Initializing sandbox settings");
|
||||
|
|
|
@ -49,7 +49,9 @@ impl SimpleAsyncComponent for ComponentsPage {
|
|||
type Output = GeneralAppMsg;
|
||||
|
||||
view! {
|
||||
gtk::Box {
|
||||
adw::NavigationPage {
|
||||
#[wrap(Some)]
|
||||
set_child = >k::Box {
|
||||
set_orientation: gtk::Orientation::Vertical,
|
||||
|
||||
adw::HeaderBar {
|
||||
|
@ -239,6 +241,7 @@ impl SimpleAsyncComponent for ComponentsPage {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async fn init(_init: Self::Init, root: Self::Root, sender: AsyncComponentSender<Self>) -> AsyncComponentParts<Self> {
|
||||
tracing::info!("Initializing general settings -> components page");
|
||||
|
|
|
@ -528,7 +528,7 @@ impl SimpleAsyncComponent for GeneralApp {
|
|||
},
|
||||
|
||||
#[local_ref]
|
||||
components_page -> gtk::Box {}
|
||||
components_page -> adw::NavigationPage,
|
||||
}
|
||||
|
||||
async fn init(
|
||||
|
@ -664,14 +664,14 @@ impl SimpleAsyncComponent for GeneralApp {
|
|||
PREFERENCES_WINDOW.as_ref()
|
||||
.unwrap_unchecked()
|
||||
.widget()
|
||||
.close_subpage();
|
||||
.pop_subpage();
|
||||
}
|
||||
|
||||
GeneralAppMsg::OpenComponentsPage => unsafe {
|
||||
PREFERENCES_WINDOW.as_ref()
|
||||
.unwrap_unchecked()
|
||||
.widget()
|
||||
.present_subpage(self.components_page.widget());
|
||||
.push_subpage(self.components_page.widget());
|
||||
}
|
||||
|
||||
#[allow(unused_must_use)]
|
||||
|
|
Loading…
Reference in a new issue