Author: dquintana
Date: Mon Mar 16 18:58:37 2015
New Revision: 66741

URL: http://svn.reactos.org/svn/reactos?rev=66741&view=rev
Log:
[SHELL32]
* Disable the hardcoded part of the File menu. It provided no useful function 
and couldn't be localized. It can be reintroduced later when it is done 
properly.

Modified:
    trunk/reactos/dll/win32/shell32/CDefView.cpp

Modified: trunk/reactos/dll/win32/shell32/CDefView.cpp
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CDefView.cpp?rev=66741&r1=66740&r2=66741&view=diff
==============================================================================
--- trunk/reactos/dll/win32/shell32/CDefView.cpp        [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/CDefView.cpp        [iso-8859-1] Mon Mar 16 
18:58:37 2015
@@ -1067,6 +1067,8 @@
         }
     }
 
+#if 0
+    /* FIXME/TODO: Reenable when they implemented AND localizable (not 
hardcoded). */
     /* Insert This item at the beginning of the menu. */
     _InsertMenuItemW(hSubMenu, 0, TRUE, 0, MFT_SEPARATOR, NULL, MFS_ENABLED);
     _InsertMenuItemW(hSubMenu, 0, TRUE, IDM_MYFILEITEM + 4, MFT_STRING, 
L"Properties", MFS_DISABLED);
@@ -1075,13 +1077,20 @@
     _InsertMenuItemW(hSubMenu, 0, TRUE, IDM_MYFILEITEM + 1, MFT_STRING, 
L"Create Shortcut", MFS_DISABLED);
     _InsertMenuItemW(hSubMenu, 0, TRUE, 0, MFT_SEPARATOR, NULL, MFS_ENABLED);
     _InsertMenuItemW(hSubMenu, 0, TRUE, IDM_MYFILEITEM, MFT_STRING, L"New", 
MFS_ENABLED);
+#endif
 
     HMENU menubase = BuildFileMenu();
     if (menubase)
     {
         int count = ::GetMenuItemCount(menubase);
-
-        for (int i = 0; i < count; i++)
+        int count2 = ::GetMenuItemCount(hSubMenu);
+
+        if (count2 > 0 && count > 0)
+        {
+            _InsertMenuItemW(hSubMenu, 0, TRUE, 0, MFT_SEPARATOR, NULL, 
MFS_ENABLED);
+        }
+
+        for (int i = count-1; i >= 0; i--)
         {
             WCHAR label[128];
 
@@ -1096,10 +1105,9 @@
 
             mii.fType |= MFT_RADIOCHECK;
 
-            ::InsertMenuItemW(hSubMenu, IDM_MYFILEITEM, FALSE, &mii);
+            ::InsertMenuItemW(hSubMenu, 0, TRUE, &mii);
         }
 
-        _InsertMenuItemW(hSubMenu, IDM_MYFILEITEM, FALSE, 0, MFT_SEPARATOR, 
NULL, MFS_ENABLED);
 
         ::DestroyMenu(menubase);
     }


Reply via email to