Skip to content

Commit

Permalink
Clear CEF RootCacheDir on startup and using icons for play/pause wall…
Browse files Browse the repository at this point in the history
…paper settings..
  • Loading branch information
rocksdanister committed May 3, 2024
1 parent 5e199b6 commit 1c7c611
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 10 deletions.
1 change: 1 addition & 0 deletions src/Lively/Lively.Common/Constants.cs
Expand Up @@ -24,6 +24,7 @@ public static class CommonPaths
public static string WeatherSettingsPath { get; } = Path.Combine(AppDataDir, "WeatherSettings.json");
public static string ThemeDir { get; } = Path.Combine(AppDataDir, "Themes");
public static string ThemeCacheDir { get; } = Path.Combine(Path.GetTempPath(), "Lively Wallpaper", "themes");
public static string CefRootCacheDir { get; } = Path.Combine(Path.GetTempPath(), "Lively Wallpaper", "CEF");
public static string TokensPath { get; } = Path.Combine(AppDataDir, "Tokens.dat");
}

Expand Down
Expand Up @@ -23,8 +23,12 @@
<FontIcon Glyph="&#xE90E;" />
</controls:SettingsCard.HeaderIcon>
<controls:Segmented SelectedIndex="{Binding SelectedAppFullScreenIndex, Mode=TwoWay}">
<controls:SegmentedItem x:Uid="TextPerformancePause" Width="120" />
<controls:SegmentedItem x:Uid="TextPerformanceNone" Width="120" />
<controls:SegmentedItem Width="120">
<FontIcon FontSize="16" Glyph="&#xE769;" />
</controls:SegmentedItem>
<controls:SegmentedItem Width="120">
<FontIcon FontSize="16" Glyph="&#xE768;" />
</controls:SegmentedItem>
<controls:SegmentedItem x:Uid="TextPerformanceKill" Visibility="Collapsed" />
</controls:Segmented>
</controls:SettingsCard>
Expand All @@ -34,8 +38,12 @@
<FontIcon Glyph="&#xE90C;" />
</controls:SettingsCard.HeaderIcon>
<controls:Segmented SelectedIndex="{Binding SelectedAppFocusIndex, Mode=TwoWay}">
<controls:SegmentedItem x:Uid="TextPerformancePause" Width="120" />
<controls:SegmentedItem x:Uid="TextPerformanceNone" Width="120" />
<controls:SegmentedItem Width="120">
<FontIcon FontSize="16" Glyph="&#xE769;" />
</controls:SegmentedItem>
<controls:SegmentedItem Width="120">
<FontIcon FontSize="16" Glyph="&#xE768;" />
</controls:SegmentedItem>
<controls:SegmentedItem x:Uid="TextPerformanceKill" Visibility="Collapsed" />
</controls:Segmented>
</controls:SettingsCard>
Expand All @@ -52,8 +60,12 @@
<FontIcon Glyph="&#xE856;" />
</controls:SettingsCard.HeaderIcon>
<controls:Segmented SelectedIndex="{Binding SelectedBatteryPowerIndex, Mode=TwoWay}">
<controls:SegmentedItem x:Uid="TextPerformancePause" Width="120" />
<controls:SegmentedItem x:Uid="TextPerformanceNone" Width="120" />
<controls:SegmentedItem Width="120">
<FontIcon FontSize="16" Glyph="&#xE769;" />
</controls:SegmentedItem>
<controls:SegmentedItem Width="120">
<FontIcon FontSize="16" Glyph="&#xE768;" />
</controls:SegmentedItem>
<controls:SegmentedItem x:Uid="TextPerformanceKill" Visibility="Collapsed" />
</controls:Segmented>
</controls:SettingsCard>
Expand All @@ -63,8 +75,12 @@
<FontIcon Glyph="&#xE863;" />
</controls:SettingsCard.HeaderIcon>
<controls:Segmented SelectedIndex="{Binding SelectedPowerSaveModeIndex, Mode=TwoWay}">
<controls:SegmentedItem x:Uid="TextPerformancePause" Width="120" />
<controls:SegmentedItem x:Uid="TextPerformanceNone" Width="120" />
<controls:SegmentedItem Width="120">
<FontIcon FontSize="16" Glyph="&#xE769;" />
</controls:SegmentedItem>
<controls:SegmentedItem Width="120">
<FontIcon FontSize="16" Glyph="&#xE768;" />
</controls:SegmentedItem>
<controls:SegmentedItem x:Uid="TextPerformanceKill" Visibility="Collapsed" />
</controls:Segmented>
</controls:SettingsCard>
Expand All @@ -81,8 +97,12 @@
<FontIcon Glyph="&#xE703;" />
</controls:SettingsCard.HeaderIcon>
<controls:Segmented SelectedIndex="{Binding SelectedRemoteDestopPowerIndex, Mode=TwoWay}">
<controls:SegmentedItem x:Uid="TextPerformancePause" Width="120" />
<controls:SegmentedItem x:Uid="TextPerformanceNone" Width="120" />
<controls:SegmentedItem Width="120">
<FontIcon FontSize="16" Glyph="&#xE769;" />
</controls:SegmentedItem>
<controls:SegmentedItem Width="120">
<FontIcon FontSize="16" Glyph="&#xE768;" />
</controls:SegmentedItem>
<controls:SegmentedItem x:Uid="TextPerformanceKill" Visibility="Collapsed" />
</controls:Segmented>
</controls:SettingsCard>
Expand Down
1 change: 1 addition & 0 deletions src/Lively/Lively/App.xaml.cs
Expand Up @@ -105,6 +105,7 @@ public App()
//clear temp files from previous run if any..
FileUtil.EmptyDirectory(Constants.CommonPaths.TempDir);
FileUtil.EmptyDirectory(Constants.CommonPaths.ThemeCacheDir);
FileUtil.EmptyDirectory(Constants.CommonPaths.CefRootCacheDir);
}
catch { /* TODO */ }

Expand Down

0 comments on commit 1c7c611

Please sign in to comment.