Rebrand to Galaxy, major improvements to Bedrock support, still needs some TLC though
This commit is contained in:
+10
-10
@@ -60,8 +60,8 @@ pub const fn toml_path_hierarchy(path: &str) -> Option<&str> {
|
||||
|
||||
use anyhow::{Context, Result};
|
||||
use serde::{Serialize, de::DeserializeOwned};
|
||||
use warpui::{AppContext, Entity, ModelContext};
|
||||
use warpui_extras::user_preferences::UserPreferences;
|
||||
use galaxyui::{AppContext, Entity, ModelContext};
|
||||
use galaxyui_extras::user_preferences::UserPreferences;
|
||||
|
||||
/// Whether the TOML-backed settings file is active.
|
||||
///
|
||||
@@ -117,16 +117,16 @@ impl PublicPreferences {
|
||||
}
|
||||
|
||||
/// Reloads the backing store from disk.
|
||||
pub fn reload_from_disk(&self) -> Result<(), warpui_extras::user_preferences::Error> {
|
||||
pub fn reload_from_disk(&self) -> Result<(), galaxyui_extras::user_preferences::Error> {
|
||||
self.0.reload_from_disk()
|
||||
}
|
||||
}
|
||||
|
||||
impl warpui::Entity for PublicPreferences {
|
||||
impl galaxyui::Entity for PublicPreferences {
|
||||
type Event = ();
|
||||
}
|
||||
|
||||
impl warpui::SingletonEntity for PublicPreferences {}
|
||||
impl galaxyui::SingletonEntity for PublicPreferences {}
|
||||
|
||||
/// A newtype wrapper for the private preferences backend.
|
||||
///
|
||||
@@ -150,11 +150,11 @@ impl Deref for PrivatePreferences {
|
||||
}
|
||||
}
|
||||
|
||||
impl warpui::Entity for PrivatePreferences {
|
||||
impl galaxyui::Entity for PrivatePreferences {
|
||||
type Event = ();
|
||||
}
|
||||
|
||||
impl warpui::SingletonEntity for PrivatePreferences {}
|
||||
impl galaxyui::SingletonEntity for PrivatePreferences {}
|
||||
|
||||
/// An enum representing the different platforms a setting could apply to.
|
||||
#[derive(Debug, Clone)]
|
||||
@@ -370,7 +370,7 @@ pub trait Setting {
|
||||
fn set_value_from_cloud_sync(
|
||||
&mut self,
|
||||
new_value: Self::Value,
|
||||
ctx: &mut warpui::ModelContext<Self::Group>,
|
||||
ctx: &mut galaxyui::ModelContext<Self::Group>,
|
||||
) -> anyhow::Result<()>;
|
||||
|
||||
/// Sets the value of the setting persisting it to storage.
|
||||
@@ -386,7 +386,7 @@ pub trait Setting {
|
||||
/// Sets the value of the setting to its default and persists it to storage.
|
||||
fn set_value_to_default(
|
||||
&mut self,
|
||||
ctx: &mut warpui::ModelContext<Self::Group>,
|
||||
ctx: &mut galaxyui::ModelContext<Self::Group>,
|
||||
) -> anyhow::Result<()> {
|
||||
self.set_value(Self::default_value(), ctx)
|
||||
}
|
||||
@@ -396,7 +396,7 @@ pub trait Setting {
|
||||
/// Private settings use the platform-native store; public settings use
|
||||
/// the main preferences backend (which may be the TOML settings file).
|
||||
fn preferences_for_setting(ctx: &AppContext) -> &dyn UserPreferences {
|
||||
use warpui::SingletonEntity;
|
||||
use galaxyui::SingletonEntity;
|
||||
|
||||
if Self::is_private() {
|
||||
<PrivatePreferences as SingletonEntity>::as_ref(ctx).deref()
|
||||
|
||||
Reference in New Issue
Block a user