Skip to content

Commit

Permalink
Update file registrar system icon cache refreshing
Browse files Browse the repository at this point in the history
  • Loading branch information
FangCunWuChang committed Sep 4, 2024
1 parent a213c2f commit f373329
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
3 changes: 3 additions & 0 deletions fileRegistrar/FileRegApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ class FileRegApp final : public juce::JUCEApplication {
OUT("");
}

/** Refresh Icon Cache */
refreshSystemIconCache();

/** Return */
juce::JUCEApplication::quit();
};
Expand Down
10 changes: 9 additions & 1 deletion fileRegistrar/SystemUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#if JUCE_WINDOWS
#include <Windows.h>
#include <ShlObj.h>
#endif //JUCE_WINDOWS

#define REG_RROJ_ROOT "HKEY_CLASSES_ROOT\\"
Expand Down Expand Up @@ -98,4 +99,11 @@ bool unregProjectFileFromSystem() {
return false;

#endif //JUCE_WINDOWS
}
}

void refreshSystemIconCache() {
#if JUCE_WINDOWS
SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, NULL, NULL);

#endif //JUCE_WINDOWS
}
1 change: 1 addition & 0 deletions fileRegistrar/SystemUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
bool checkAdmin();
bool regProjectFileInSystem(const juce::String& appPath);
bool unregProjectFileFromSystem();
void refreshSystemIconCache();

0 comments on commit f373329

Please sign in to comment.