mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Fix default icon retrieval.
And replace continue; with if() statements (supposably more compile friendly)
This commit is contained in:
parent
0a45a6fea9
commit
7cd9768880
1 changed files with 11 additions and 12 deletions
|
|
@ -66,20 +66,19 @@ namespace Wox.Plugin.SystemPlugins.ControlPanel
|
||||||
{
|
{
|
||||||
executablePath = getExecutablePath(currentKey);
|
executablePath = getExecutablePath(currentKey);
|
||||||
|
|
||||||
if (executablePath == null)
|
if (!(executablePath == null)) //Cannot have item without executable path
|
||||||
continue; //Cannot have item without executable path
|
{
|
||||||
|
localizedString = getLocalizedString(currentKey);
|
||||||
|
|
||||||
localizedString = getLocalizedString(currentKey);
|
if (!string.IsNullOrEmpty(localizedString))//Cannot have item without Title
|
||||||
|
{
|
||||||
|
infoTip = getInfoTip(currentKey);
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(localizedString))
|
myIcon = getIcon(currentKey, size);
|
||||||
continue; //Cannot have item without Title
|
|
||||||
|
|
||||||
infoTip = getInfoTip(currentKey);
|
|
||||||
|
|
||||||
myIcon = getIcon(currentKey, size);
|
|
||||||
|
|
||||||
controlPanelItems.Add(new ControlPanelItem(localizedString, infoTip, key, executablePath, myIcon));
|
|
||||||
|
|
||||||
|
controlPanelItems.Add(new ControlPanelItem(localizedString, infoTip, key, executablePath, myIcon));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -251,7 +250,7 @@ namespace Wox.Plugin.SystemPlugins.ControlPanel
|
||||||
if (iconPtr == IntPtr.Zero)
|
if (iconPtr == IntPtr.Zero)
|
||||||
{
|
{
|
||||||
iconQueue = new Queue<IntPtr>();
|
iconQueue = new Queue<IntPtr>();
|
||||||
EnumResourceNamesWithID(dataFilePointer, 3, new EnumResNameDelegate(EnumRes), IntPtr.Zero); //Iterate through resources.
|
EnumResourceNamesWithID(dataFilePointer, GROUP_ICON, new EnumResNameDelegate(EnumRes), IntPtr.Zero); //Iterate through resources.
|
||||||
|
|
||||||
while (iconPtr == IntPtr.Zero && iconQueue.Count > 0)
|
while (iconPtr == IntPtr.Zero && iconQueue.Count > 0)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue