Skip to content

Commit

Permalink
[Feature] Search all throughout the subfolders (#211, #232), version …
Browse files Browse the repository at this point in the history
…1.0.25.8
  • Loading branch information
Hofknecht committed Nov 13, 2021
1 parent ec7a246 commit fd554ec
Show file tree
Hide file tree
Showing 8 changed files with 2,068 additions and 94 deletions.
46 changes: 28 additions & 18 deletions Business/Menus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,26 @@ void LoadMainMenuCompleted(object sender, RunWorkerCompletedEventArgs e)
switch (menuData.Validity)
{
case MenuDataValidity.Valid:
if (!Properties.Settings.Default.CacheMainMenu)
if (Properties.Settings.Default.CacheMainMenu)
{
if (IconReader.MainPreload)
{
workerMainMenu.DoWork -= LoadMenu;
menus[0] = Create(menuData, Path.GetFileName(Config.Path));
IconReader.MainPreload = false;
}
else
{
AsEnumerable.ToList().ForEach(m => { m.ShowWithFade(); });
}
}
else
{
DisposeMenu(menus[menuData.Level]);
menus[0] = Create(menuData, Path.GetFileName(Config.Path));
AsEnumerable.ToList().ForEach(m => { m.ShowWithFade(); });
}

AsEnumerable.ToList().ForEach(m => { m.ShowWithFade(); });
break;
case MenuDataValidity.Empty:
if (!showingMessageBox)
Expand Down Expand Up @@ -591,27 +604,24 @@ internal void DisposeMenu(Menu menuToDispose)

internal void MainPreload()
{
IconReader.SingleThread = true;
LoadStarted();
menus[0] = Create(
GetData(workerMainMenu, Config.Path, 0),
Path.GetFileName(Config.Path));
IconReader.SingleThread = false;
AdjustMenusSizeAndLocation();
if (Properties.Settings.Default.CacheMainMenu)
IconReader.MainPreload = true;

if (FileUrl.GetDefaultBrowserPath(out string browserPath))
{
workerMainMenu.DoWork -= LoadMenu;
IconReader.GetFileIconWithCache(browserPath, true, true, out _);
}
else

timerShowProcessStartedAsLoadingIcon.Tick += Tick;
timerShowProcessStartedAsLoadingIcon.Start();
void Tick(object sender, EventArgs e)
{
DisposeMenu(menus[0]);
timerShowProcessStartedAsLoadingIcon.Tick -= Tick;
SwitchOpenClose(false);
}

LoadStopped();

if (FileUrl.GetDefaultBrowserPath(out string browserPath))
if (!Properties.Settings.Default.CacheMainMenu)
{
IconReader.GetFileIconWithCache(browserPath, true, true, out _);
DisposeMenu(menus[0]);
}
}

Expand Down Expand Up @@ -1080,7 +1090,7 @@ private void HideOldMenu(Menu menuToShow, bool keepOrSetIsMenuOpen = false)

private void FadeHalfOrOutIfNeeded()
{
if (menus[0].IsUsable)
if (menus[0] != null && menus[0].IsUsable)
{
if (!IsActive())
{
Expand Down
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.25.7")]
[assembly: AssemblyFileVersion("1.0.25.7")]
[assembly: AssemblyVersion("1.0.25.8")]
[assembly: AssemblyFileVersion("1.0.25.8")]
11 changes: 5 additions & 6 deletions UserInterface/AppNotifyIcon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ public void LoadingStart()
{
threadsLoading = true;
load.Start();
Load_Tick(load, null);
}

public void LoadingStop()
Expand Down Expand Up @@ -124,13 +123,13 @@ private void Load_Tick(object sender, EventArgs e)
notifyIcon.Icon = systemTrayMenu;
load.Stop();
}
}

private void DisposeIconIfNotDefaultIcon()
{
if (notifyIcon.Icon.GetHashCode() != systemTrayMenu.GetHashCode())
void DisposeIconIfNotDefaultIcon()
{
notifyIcon.Icon?.Dispose();
if (notifyIcon.Icon.GetHashCode() != systemTrayMenu.GetHashCode())
{
notifyIcon.Icon?.Dispose();
}
}
}
}
Expand Down
2 changes: 0 additions & 2 deletions UserInterface/FolderBrowseDialog/FolderDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,7 @@ public DialogResult ShowLegacyDialog(IWin32Window owner)
public void Dispose()
{
Dispose(true);
#if DEBUG
GC.SuppressFinalize(this);
#endif
}

protected virtual void Dispose(bool disposing)
Expand Down
2 changes: 1 addition & 1 deletion UserInterface/SettingsForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ void InitializeLanguage()

try
{
foreach (string pathAndRecursivString in Properties.Settings.Default.PathsAddToMainMenu.Split(@"|"))
foreach (string pathAndRecursivString in Settings.Default.PathsAddToMainMenu.Split(@"|"))
{
if (string.IsNullOrEmpty(pathAndRecursivString))
{
Expand Down
6 changes: 4 additions & 2 deletions UserInterface/TaskbarForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fd554ec

Please sign in to comment.