https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4b0398184677dcd19a7e9…
commit 4b0398184677dcd19a7e9609f9d4eb8c42e00672
Author: Whindmar Saksit <whindsaks(a)proton.me>
AuthorDate: Sat Nov 4 22:08:10 2023 +0100
Commit: GitHub <noreply(a)github.com>
CommitDate: Sat Nov 4 22:08:10 2023 +0100
[RAPPS] Improve LicenseType handling (#5809)
Tries now to map the "License" text set to "Freeware" to the
LICENSE_FREEWARE "LicenseType" so it is translated correctly (LoadString).
Fixes the following:
- If only the "License" field is set in the DB, nothing will change
(this applies to 99% of the current entries in the DB).
- If both "LicenseType" and "License" are set, both will be used
(no observable change in behavior): "Open Source (GPL v2)" etc.
- If only "LicenseType" is set, it will now display just the type
"Freeware" instead of "Freeware ()".
This is done only for "Freeware", because the others (the open source ones)
have many variations. "OpenSource", "Open Source", "Open Source (GPL)" etc.
---
base/applications/rapps/appinfo.cpp | 11 +++++++++--
base/applications/rapps/include/appinfo.h | 10 +++++-----
2 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/base/applications/rapps/appinfo.cpp b/base/applications/rapps/appinfo.cpp
index 765f02016bb..7e00c4224e8 100644
--- a/base/applications/rapps/appinfo.cpp
+++ b/base/applications/rapps/appinfo.cpp
@@ -159,13 +159,18 @@ CAvailableApplicationInfo::LicenseString()
m_Parser->GetString(L"License", szLicenseString);
LicenseType licenseType;
- if (IsLicenseType(IntBuffer))
+ if (IsKnownLicenseType(IntBuffer))
{
licenseType = static_cast<LicenseType>(IntBuffer);
}
else
{
licenseType = LICENSE_NONE;
+ if (szLicenseString.CompareNoCase(L"Freeware") == 0)
+ {
+ licenseType = LICENSE_FREEWARE;
+ szLicenseString = L"";
+ }
}
CStringW szLicense;
@@ -184,7 +189,9 @@ CAvailableApplicationInfo::LicenseString()
return szLicenseString;
}
- return szLicense + L" (" + szLicenseString + L")";
+ if (!szLicenseString.IsEmpty())
+ szLicense += L" (" + szLicenseString + L")";
+ return szLicense;
}
VOID
diff --git a/base/applications/rapps/include/appinfo.h b/base/applications/rapps/include/appinfo.h
index 7ea0c65e537..639d3fc8182 100644
--- a/base/applications/rapps/include/appinfo.h
+++ b/base/applications/rapps/include/appinfo.h
@@ -8,17 +8,17 @@
enum LicenseType
{
LICENSE_NONE,
- LICENSE_OPENSOURCE,
- LICENSE_FREEWARE,
- LICENSE_TRIAL,
+ LICENSE_OPENSOURCE = 1,
+ LICENSE_FREEWARE = 2,
+ LICENSE_TRIAL = 3,
LICENSE_MIN = LICENSE_NONE,
LICENSE_MAX = LICENSE_TRIAL
};
inline BOOL
-IsLicenseType(INT x)
+IsKnownLicenseType(INT x)
{
- return (x >= LICENSE_MIN && x <= LICENSE_MAX);
+ return (x > LICENSE_NONE && x <= LICENSE_MAX);
}
enum AppsCategories
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b3c1f652ecab59d1d55f9…
commit b3c1f652ecab59d1d55f9162ab0602ae0017fd2a
Author: Whindmar Saksit <whindsaks(a)proton.me>
AuthorDate: Sat Nov 4 15:40:22 2023 +0100
Commit: GitHub <noreply(a)github.com>
CommitDate: Sat Nov 4 17:40:22 2023 +0300
[NETSHELL] Register folder attributes as SFGAO_FOLDER, not SFGAO_CANDELETE (#5880)
On Windows the Network connections folder uses a binary value
and someone forgot about Little Endian when converting it to a DWORD.
Addendum to 7eb3fcf1d (r66485). CORE-9276
This issue has not been very visible because of bugs in CRegFolderEnum.
---
dll/shellext/netshell/res/netshell.rgs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dll/shellext/netshell/res/netshell.rgs b/dll/shellext/netshell/res/netshell.rgs
index c5b57b659ae..103005a3e6a 100644
--- a/dll/shellext/netshell/res/netshell.rgs
+++ b/dll/shellext/netshell/res/netshell.rgs
@@ -11,7 +11,7 @@ HKCR
DefaultIcon = s '%MODULE%'
ShellFolder
{
- val Attributes = d '0x00000020'
+ val Attributes = d '0x20000000'
}
val LocalizedString = s '@%MODULE%,-10000'
}