Author: akhaldi
Date: Sat Mar 5 08:45:08 2016
New Revision: 70922
URL:
http://svn.reactos.org/svn/reactos?rev=70922&view=rev
Log:
[PROGMAN] Properly import from Wine Staging 1.9.4. This fixes PCH usage, marks ReactOS
specific diffs, reduces difference to upstream code, properly documents the sync in
README.WINE, improves header inclusions and more. Changes should be sent upstream by their
author (TM). CORE-10912
Modified:
trunk/reactos/base/shell/progman/dialog.c
trunk/reactos/base/shell/progman/group.c
trunk/reactos/base/shell/progman/grpfile.c
trunk/reactos/base/shell/progman/main.c
trunk/reactos/base/shell/progman/progman.h
trunk/reactos/base/shell/progman/progman.rc
trunk/reactos/base/shell/progman/program.c
trunk/reactos/base/shell/progman/string.c
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/base/shell/progman/dialog.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/progman/dialog.…
==============================================================================
--- trunk/reactos/base/shell/progman/dialog.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/progman/dialog.c [iso-8859-1] Sat Mar 5 08:45:08 2016
@@ -21,6 +21,8 @@
*/
#include "progman.h"
+
+#include <commdlg.h>
/***********************************************************************
*
Modified: trunk/reactos/base/shell/progman/group.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/progman/group.c…
==============================================================================
--- trunk/reactos/base/shell/progman/group.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/progman/group.c [iso-8859-1] Sat Mar 5 08:45:08 2016
@@ -58,8 +58,8 @@
class.cbClsExtra = 0;
class.cbWndExtra = sizeof(LONG_PTR);
class.hInstance = Globals.hInstance;
- class.hIcon = LoadIconW(0, (LPWSTR)IDI_WINLOGO);
- class.hCursor = LoadCursorW(0, (LPWSTR)IDC_ARROW);
+ class.hIcon = LoadIconW (0, (LPWSTR)IDI_WINLOGO);
+ class.hCursor = LoadCursorW (0, (LPWSTR)IDC_ARROW);
class.hbrBackground = GetStockObject (WHITE_BRUSH);
class.lpszMenuName = 0;
class.lpszClassName = STRING_GROUP_WIN_CLASS_NAME;
@@ -170,7 +170,11 @@
cs.style = 0;
cs.lParam = 0;
+#ifdef __REACTOS__
group->hWnd = (HWND)SendMessageW(Globals.hMDIWnd, WM_MDICREATE, 0,
(LPARAM)&cs);
+#else
+ group->hWnd = (HWND)SendMessageA(Globals.hMDIWnd, WM_MDICREATE, 0,
(LPARAM)&cs);
+#endif
SetWindowTextA( group->hWnd, lpszName );
SetWindowLongPtrW(group->hWnd, 0, (LONG_PTR) hGroup);
Modified: trunk/reactos/base/shell/progman/grpfile.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/progman/grpfile…
==============================================================================
--- trunk/reactos/base/shell/progman/grpfile.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/progman/grpfile.c [iso-8859-1] Sat Mar 5 08:45:08 2016
@@ -20,7 +20,6 @@
*/
#include "progman.h"
-// #include <mmsystem.h>
#define MALLOCHUNK 1000
@@ -277,7 +276,11 @@
if (iconANDbits_ptr + iconANDsize > buffer + size ||
iconXORbits_ptr + iconXORsize > buffer + size) return(0);
- hIcon = CreateIcon( Globals.hInstance, width, height, planes, bpp,
(PBYTE)iconANDbits_ptr, (PBYTE)iconXORbits_ptr );
+#ifdef __REACTOS__
+ hIcon = CreateIcon(Globals.hInstance, width, height, planes, bpp,
(PBYTE)iconANDbits_ptr, (PBYTE)iconXORbits_ptr);
+#else
+ hIcon = CreateIcon( Globals.hInstance, width, height, planes, bpp, iconANDbits_ptr,
iconXORbits_ptr );
+#endif
lpszName = buffer + GET_USHORT(program_ptr, 18);
lpszCmdLine = buffer + GET_USHORT(program_ptr, 20);
@@ -508,7 +511,11 @@
HLOCAL hProgram;
INT NumProg, Title, Progs, Icons, Extension;
INT CurrProg, CurrIcon, nCmdShow, ptr, seqnum;
- UINT sizeAnd, sizeXor;
+#ifdef __REACTOS__
+ UINT sizeAnd, sizeXor;
+#else
+ DWORD sizeAnd, sizeXor;
+#endif
BOOL need_extension;
LPCSTR lpszTitle = LocalLock(group->hName);
Modified: trunk/reactos/base/shell/progman/main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/progman/main.c?…
==============================================================================
--- trunk/reactos/base/shell/progman/main.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/progman/main.c [iso-8859-1] Sat Mar 5 08:45:08 2016
@@ -19,8 +19,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-// #define OEMRESOURCE
#include "progman.h"
+
+#include <shellapi.h>
GLOBALS Globals;
@@ -38,11 +39,18 @@
* WinMain
*/
-int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show)
+#ifdef __REACTOS__
+int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show)
+#else
+int PASCAL WinMain (HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show)
+#endif
{
MSG msg;
Globals.lpszIniFile = "progman.ini";
+#ifndef __REACTOS__
+ Globals.lpszIcoFile = "progman.ico";
+#endif
Globals.hInstance = hInstance;
Globals.hGroups = 0;
@@ -57,9 +65,15 @@
GetPrivateProfileIntA("Settings", "SaveSettings", 0,
Globals.lpszIniFile);
/* Load default icons */
- Globals.hMainIcon = LoadIconW(Globals.hInstance, MAKEINTRESOURCEW(IDI_APPICON));
- Globals.hGroupIcon = Globals.hMainIcon; // ExtractIconA(Globals.hInstance,
Globals.lpszIcoFile, 0);
- Globals.hDefaultIcon = Globals.hMainIcon; // ExtractIconA(Globals.hInstance,
Globals.lpszIcoFile, 0);
+#ifdef __REACTOS__
+ Globals.hMainIcon = LoadIconW(Globals.hInstance, MAKEINTRESOURCEW(IDI_APPICON));
+ Globals.hGroupIcon = Globals.hMainIcon;
+ Globals.hDefaultIcon = Globals.hMainIcon;
+#else
+ Globals.hMainIcon = ExtractIconA(Globals.hInstance, Globals.lpszIcoFile, 0);
+ Globals.hGroupIcon = ExtractIconA(Globals.hInstance, Globals.lpszIcoFile, 0);
+ Globals.hDefaultIcon = ExtractIconA(Globals.hInstance, Globals.lpszIcoFile, 0);
+#endif
if (!Globals.hMainIcon) Globals.hMainIcon = LoadIconW(0, (LPWSTR)DEFAULTICON);
if (!Globals.hGroupIcon) Globals.hGroupIcon = LoadIconW(0, (LPWSTR)DEFAULTICON);
if (!Globals.hDefaultIcon) Globals.hDefaultIcon = LoadIconW(0, (LPWSTR)DEFAULTICON);
@@ -310,12 +324,17 @@
break;
case PM_ABOUT_WINE:
+#ifdef __REACTOS__
{
WCHAR szTitle[MAX_STRING_LEN];
LoadStringW(Globals.hInstance, IDS_PROGRAM_MANAGER, szTitle,
ARRAYSIZE(szTitle));
ShellAboutW(hWnd, szTitle, NULL, NULL);
break;
}
+#else
+ ShellAboutA(hWnd, "WINE", "Program Manager", 0);
+ break;
+#endif
default:
MAIN_MessageBoxIDS(IDS_NOT_IMPLEMENTED, IDS_ERROR, MB_OK);
@@ -338,7 +357,7 @@
class.cbWndExtra = 0;
class.hInstance = Globals.hInstance;
class.hIcon = Globals.hMainIcon;
- class.hCursor = LoadCursorW(0, (LPWSTR)IDC_ARROW);
+ class.hCursor = LoadCursorW (0, (LPWSTR)IDC_ARROW);
class.hbrBackground = GetStockObject (NULL_BRUSH);
class.lpszMenuName = 0;
class.lpszClassName = STRING_MAIN_WIN_CLASS_NAME;
Modified: trunk/reactos/base/shell/progman/progman.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/progman/progman…
==============================================================================
--- trunk/reactos/base/shell/progman/progman.h [iso-8859-1] (original)
+++ trunk/reactos/base/shell/progman/progman.h [iso-8859-1] Sat Mar 5 08:45:08 2016
@@ -23,20 +23,16 @@
#define PROGMAN_H
#include <stdio.h>
-#include <string.h>
-
-#define WIN32_LEAN_AND_MEAN
-
-#include <windows.h>
+
+#define WIN32_NO_STATUS
#include <windef.h>
-#include <commdlg.h>
-#include <shellapi.h>
-
+#include <winbase.h>
+#include <wingdi.h>
+#include <winuser.h>
#define MAX_STRING_LEN 255
#define MAX_PATHNAME_LEN 1024
#define MAX_LANGUAGE_NUMBER (PM_LAST_LANGUAGE - PM_FIRST_LANGUAGE)
-
#include "resource.h"
@@ -138,6 +134,9 @@
HMENU hWindowsMenu;
HMENU hLanguageMenu;
LPCSTR lpszIniFile;
+#ifndef __REACTOS__
+ LPCSTR lpszIcoFile;
+#endif
BOOL bAutoArrange;
BOOL bSaveSettings;
BOOL bMinOnRun;
@@ -206,3 +205,7 @@
extern WCHAR STRING_PROGRAM_WIN_CLASS_NAME[];
#endif /* PROGMAN_H */
+
+/* Local Variables: */
+/* c-file-style: "GNU" */
+/* End: */
Modified: trunk/reactos/base/shell/progman/progman.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/progman/progman…
==============================================================================
--- trunk/reactos/base/shell/progman/progman.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/progman/progman.rc [iso-8859-1] Sat Mar 5 08:45:08 2016
@@ -21,22 +21,17 @@
#include <windef.h>
#include <winuser.h>
-// #include <commctrl.h>
#include "resource.h"
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
-#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Program Manager"
-#define REACTOS_STR_INTERNAL_NAME "progman"
-#define REACTOS_STR_ORIGINAL_FILENAME "progman.exe"
+#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Program Manager"
+#define REACTOS_STR_INTERNAL_NAME "progman"
+#define REACTOS_STR_ORIGINAL_FILENAME "progman.exe"
#include <reactos/version.rc>
IDI_APPICON ICON "res/progman.ico"
-
-
-
-
LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
@@ -188,7 +183,11 @@
EDITTEXT PM_DIRECTORY, 95, 40, 90, 15,
WS_TABSTOP
LTEXT "&Key combination:", PM_HOT_KEY_TXT, 5, 55, 75,
10
EDITTEXT PM_HOT_KEY, 95, 55, 90, 15,
WS_TABSTOP
+#ifdef __REACTOS__
ICON "", PM_ICON, 20, 70, 20,
20
+#else
+ICON "", PM_ICON, 20, 70
+#endif
CHECKBOX "&Minimize at launch", PM_SYMBOL, 95, 75,
90, 10, WS_TABSTOP
DEFPUSHBUTTON "OK", IDOK, 200, 5, 70, 15,
WS_TABSTOP
PUSHBUTTON "Cancel", IDCANCEL, 200, 25, 70, 15,
WS_TABSTOP
Modified: trunk/reactos/base/shell/progman/program.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/progman/program…
==============================================================================
--- trunk/reactos/base/shell/progman/program.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/progman/program.c [iso-8859-1] Sat Mar 5 08:45:08 2016
@@ -77,7 +77,7 @@
class.cbWndExtra = sizeof(LONG_PTR);
class.hInstance = Globals.hInstance;
class.hIcon = 0;
- class.hCursor = LoadCursorW(0, (LPWSTR)IDC_ARROW);
+ class.hCursor = LoadCursorW (0, (LPWSTR)IDC_ARROW);
class.hbrBackground = GetStockObject (WHITE_BRUSH);
class.lpszMenuName = 0;
class.lpszClassName = STRING_PROGRAM_WIN_CLASS_NAME;
Modified: trunk/reactos/base/shell/progman/string.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/progman/string.…
==============================================================================
--- trunk/reactos/base/shell/progman/string.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/progman/string.c [iso-8859-1] Sat Mar 5 08:45:08 2016
@@ -30,31 +30,36 @@
VOID STRING_LoadMenus(VOID)
{
- WCHAR caption[MAX_STRING_LEN];
- HMENU hMainMenu;
+#ifdef __REACTOS__
+ WCHAR caption[MAX_STRING_LEN];
+#else
+ CHAR caption[MAX_STRING_LEN];
+#endif
+ HMENU hMainMenu;
- /* Set frame caption */
- LoadStringW(Globals.hInstance, IDS_PROGRAM_MANAGER, caption, sizeof(caption));
- SetWindowTextW(Globals.hMainWnd, caption);
+ /* Set frame caption */
+#ifdef __REACTOS__
+ LoadStringW(Globals.hInstance, IDS_PROGRAM_MANAGER, caption, sizeof(caption));
+ SetWindowTextW(Globals.hMainWnd, caption);
+#else
+ LoadStringA(Globals.hInstance, IDS_PROGRAM_MANAGER, caption, sizeof(caption));
+ SetWindowTextA(Globals.hMainWnd, caption);
+#endif
- /* Create menu */
- hMainMenu = LoadMenuW(Globals.hInstance, MAKEINTRESOURCEW(MAIN_MENU));
- Globals.hFileMenu = GetSubMenu(hMainMenu, 0);
- Globals.hOptionMenu = GetSubMenu(hMainMenu, 1);
- Globals.hWindowsMenu = GetSubMenu(hMainMenu, 2);
- Globals.hLanguageMenu = GetSubMenu(hMainMenu, 3);
+ /* Create menu */
+ hMainMenu = LoadMenuW(Globals.hInstance, MAKEINTRESOURCEW(MAIN_MENU));
+ Globals.hFileMenu = GetSubMenu(hMainMenu, 0);
+ Globals.hOptionMenu = GetSubMenu(hMainMenu, 1);
+ Globals.hWindowsMenu = GetSubMenu(hMainMenu, 2);
+ Globals.hLanguageMenu = GetSubMenu(hMainMenu, 3);
- if (Globals.hMDIWnd)
- {
- SendMessageW(Globals.hMDIWnd, WM_MDISETMENU,
- (WPARAM)hMainMenu, (LPARAM)Globals.hWindowsMenu);
- }
- else
- {
- SetMenu(Globals.hMainWnd, hMainMenu);
- }
+ if (Globals.hMDIWnd)
+ SendMessageW(Globals.hMDIWnd, WM_MDISETMENU,
+ (WPARAM) hMainMenu,
+ (LPARAM) Globals.hWindowsMenu);
+ else SetMenu(Globals.hMainWnd, hMainMenu);
- /* Destroy old menu */
- if (Globals.hMainMenu) DestroyMenu(Globals.hMainMenu);
- Globals.hMainMenu = hMainMenu;
+ /* Destroy old menu */
+ if (Globals.hMainMenu) DestroyMenu(Globals.hMainMenu);
+ Globals.hMainMenu = hMainMenu;
}
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sat Mar 5 08:45:08 2016
@@ -242,6 +242,7 @@
reactos/base/applications/winhlp32 # Synced to WineStaging-1.9.4
reactos/base/applications/wordpad # Synced to WineStaging-1.7.55
reactos/base/services/rpcss # Synced to WineStaging-1.7.55
+reactos/base/shell/progman # Synced to WineStaging-1.9.4
reactos/base/system/expand # Synced to WineStaging-1.7.55
reactos/base/system/msiexec # Synced to WineStaging-1.9.4
reactos/modules/rosapps/winfile # Autosync