[ros-diffs] [cfinck] 51033: [RAPPS] Fix a bug while testing Rapps under Windows. If you had an application with no registered DisplayName installed, Rapps used to consider every application with no RegName in ...

cfinck at svn.reactos.org cfinck at svn.reactos.org
Sun Mar 13 12:44:58 UTC 2011


Author: cfinck
Date: Sun Mar 13 12:44:58 2011
New Revision: 51033

URL: http://svn.reactos.org/svn/reactos?rev=51033&view=rev
Log:
[RAPPS]
Fix a bug while testing Rapps under Windows. If you had an application with no registered DisplayName installed, Rapps used to consider every application with no RegName in its database (= currently all Rapps applications) installed. Therefore the list of available applications has always been empty.
Now an application is always added to the ListView if no RegName is set for it.

Modified:
    trunk/reactos/base/applications/rapps/winmain.c

Modified: trunk/reactos/base/applications/rapps/winmain.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/winmain.c?rev=51033&r1=51032&r2=51033&view=diff
==============================================================================
--- trunk/reactos/base/applications/rapps/winmain.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/winmain.c [iso-8859-1] Sun Mar 13 12:44:58 2011
@@ -144,8 +144,11 @@
     PAPPLICATION_INFO ItemInfo;
     INT Index;
 
-    if (!IsInstalledApplication(Info.szRegName, FALSE) &&
-        !IsInstalledApplication(Info.szRegName, TRUE))
+    /* Only add a ListView entry if...
+         - no RegName was supplied (so we cannot determine whether the application is installed or not) or
+         - a RegName was supplied and the application is not installed
+    */
+    if (!*Info.szRegName || (!IsInstalledApplication(Info.szRegName, FALSE) && !IsInstalledApplication(Info.szRegName, TRUE)))
     {
         ItemInfo = HeapAlloc(GetProcessHeap(), 0, sizeof(APPLICATION_INFO));
         if (!ItemInfo) return FALSE;




More information about the Ros-diffs mailing list