[ros-diffs] [janderwald] 39412: - Make sure "Open" verb is always inserted first - Apply item style to current item not to next - bug 4065

janderwald at svn.reactos.org janderwald at svn.reactos.org
Thu Feb 5 16:15:24 CET 2009


Author: janderwald
Date: Thu Feb  5 09:15:24 2009
New Revision: 39412

URL: http://svn.reactos.org/svn/reactos?rev=39412&view=rev
Log:
- Make sure "Open" verb is always inserted first
- Apply item style to current item not to next
- bug 4065

Modified:
    trunk/reactos/dll/win32/shell32/shv_def_cmenu.c

Modified: trunk/reactos/dll/win32/shell32/shv_def_cmenu.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shv_def_cmenu.c?rev=39412&r1=39411&r2=39412&view=diff
==============================================================================
--- trunk/reactos/dll/win32/shell32/shv_def_cmenu.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shv_def_cmenu.c [iso-8859-1] Thu Feb  5 09:15:24 2009
@@ -167,6 +167,16 @@
         if (curEntry->szClass)
             wcscpy(curEntry->szClass, szClass);
     }
+
+    if (!wcsicmp(szVerb, L"open"))
+    {
+        /* open verb is always inserted in front */
+        curEntry->Next = This->shead;
+        This->shead = curEntry;
+        return;
+    }
+
+
 
     if (lastEntry)
     {
@@ -621,7 +631,7 @@
     mii.cbSize = sizeof(mii);
     mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE | MIIM_DATA;
     mii.fType = MFT_STRING;
-    mii.fState = MFS_ENABLED | MFS_DEFAULT;
+    mii.fState = MFS_ENABLED;
     mii.wID = 0x4000;
     This->iIdSCMFirst = mii.wID;
 
@@ -684,8 +694,9 @@
         }
 
         mii.cch = wcslen(mii.dwTypeData);
+        mii.fState = fState;
         InsertMenuItemW(hMenu, indexMenu++, TRUE, &mii);
-        mii.fState = fState;
+
         mii.wID++;
         curEntry = curEntry->Next;
      }



More information about the Ros-diffs mailing list