From b4bb1f7dce3995d5ebef38a534cd262dc2f63492 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 30 Nov 2000 18:54:34 +0000 Subject: [PATCH] Fixed progman internal dependencies and build it like the other programs. --- programs/progman/Makefile.in | 25 +++---------------------- programs/progman/grpfile.c | 9 +++++---- programs/progman/main.c | 30 +++--------------------------- 3 files changed, 11 insertions(+), 53 deletions(-) diff --git a/programs/progman/Makefile.in b/programs/progman/Makefile.in index 86541771835..e677f4e5e84 100644 --- a/programs/progman/Makefile.in +++ b/programs/progman/Makefile.in @@ -1,11 +1,9 @@ -DEFS = -DWINELIB -DSTRICT +DEFS = -DSTRICT TOPSRCDIR = @top_srcdir@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ -MODULE = none -PROGRAMS = progman -IMPORTS = shlwapi shell32 comdlg32 ole32 rpcrt4 winspool.drv user32 gdi32 kernel32 ntdll +MODULE = progman LICENSELANG = En @@ -19,25 +17,8 @@ C_SRCS = \ string.c \ $(LICENSELANG:%=License_%.c) -SPEC_SRCS = progman.spec - RC_SRCS = rsrc.rc -all: $(PROGRAMS) - -@MAKE_RULES@ - -progman: $(OBJS) - $(CC) -o progman $(OBJS) $(DLL_LINK) $(LIBS) - -$(SPEC_SRCS:.spec=.spec.c): $(RC_SRCS:.rc=.res) - -install:: - $(INSTALL_PROGRAM) progman $(bindir)/progman - -uninstall:: - $(RM) $(bindir)/progman - -checklink:: +@MAKE_PROG_RULES@ ### Dependencies: diff --git a/programs/progman/grpfile.c b/programs/progman/grpfile.c index 61d74b47f07..dbcbecb78c2 100644 --- a/programs/progman/grpfile.c +++ b/programs/progman/grpfile.c @@ -271,9 +271,9 @@ static HLOCAL GRPFILE_ScanProgram(LPCSTR buffer, INT size, if (iconANDbits_ptr + iconANDsize > buffer + size || iconXORbits_ptr + iconXORsize > buffer + size) return(0); - hIcon = CreateCursorIconIndirect16(Globals.hInstance, &iconinfo, - (LPSTR)iconANDbits_ptr, - (LPSTR)iconXORbits_ptr); + hIcon = CreateIcon( Globals.hInstance, iconinfo.nWidth, iconinfo.nHeight, + iconinfo.bPlanes, iconinfo.bBitsPerPixel, + iconANDbits_ptr, iconXORbits_ptr ); lpszName = buffer + GET_USHORT(program_ptr, 18); lpszCmdLine = buffer + GET_USHORT(program_ptr, 20); @@ -635,7 +635,8 @@ static BOOL GRPFILE_DoWriteGroupFile(HFILE file, PROGGROUP *group) LPVOID XorBits, AndBits; INT sizeXor = iconinfo->nHeight * iconinfo->nWidthBytes; INT sizeAnd = iconinfo->nHeight * ((iconinfo->nWidth + 15) / 16 * 2); - DumpIcon16(LocalLock(program->hIcon), 0, &XorBits, &AndBits); + /* FIXME: this is broken anyway */ + /* DumpIcon16(LocalLock(program->hIcon), 0, &XorBits, &AndBits);*/ PUT_SHORT(buffer, 0, iconinfo->ptHotSpot.x); PUT_SHORT(buffer, 2, iconinfo->ptHotSpot.y); diff --git a/programs/progman/main.c b/programs/progman/main.c index 48c5d311cbd..34326538f58 100644 --- a/programs/progman/main.c +++ b/programs/progman/main.c @@ -11,14 +11,8 @@ #include "license.h" #include "progman.h" -#ifdef WINELIB -#include "options.h" -#endif - GLOBALS Globals; -VOID WINAPI WriteOutProfiles16(void); - static VOID MAIN_CreateGroups(void); static VOID MAIN_MenuCommand(HWND hWnd, WPARAM wParam, LPARAM lParam); static ATOM MAIN_RegisterMainWinClass(void); @@ -37,26 +31,8 @@ int PASCAL WinMain (HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show { MSG msg; -#ifndef WINELIB Globals.lpszIniFile = "progman.ini"; Globals.lpszIcoFile = "progman.ico"; -#else /* Configuration in `wine.ini' */ - { - CHAR buffer[MAX_PATHNAME_LEN], *p; - - /* Redirect `progman.ini' */ - PROFILE_GetWineIniString("progman", "progman.ini", "progman.ini", - buffer, sizeof(buffer)); - Globals.lpszIniFile = p = LocalLock(LocalAlloc(LMEM_FIXED, lstrlen(buffer)+1)); - memcpy(p, buffer, 1 + lstrlen(buffer)); - - /* Redirect `progman.ico' */ - PROFILE_GetWineIniString("progman", "progman.ico", "progman.ico", - buffer, sizeof(buffer)); - Globals.lpszIcoFile = p = LocalLock(LocalAlloc(LMEM_FIXED, lstrlen(buffer)+1)); - memcpy(p, buffer, 1 + lstrlen(buffer)); - } -#endif /* Select Language */ Globals.lpszLanguage = "En"; @@ -279,7 +255,7 @@ static VOID MAIN_MenuCommand(HWND hWnd, WPARAM wParam, LPARAM lParam) WritePrivateProfileString("Settings", "AutoArrange", Globals.bAutoArrange ? "1" : "0", Globals.lpszIniFile); - WriteOutProfiles16(); + WritePrivateProfileString(NULL,NULL,NULL,Globals.lpszIniFile); /* flush it */ break; case PM_MIN_ON_RUN: @@ -290,7 +266,7 @@ static VOID MAIN_MenuCommand(HWND hWnd, WPARAM wParam, LPARAM lParam) WritePrivateProfileString("Settings", "MinOnRun", Globals.bMinOnRun ? "1" : "0", Globals.lpszIniFile); - WriteOutProfiles16(); + WritePrivateProfileString(NULL,NULL,NULL,Globals.lpszIniFile); /* flush it */ break; case PM_SAVE_SETTINGS: @@ -301,7 +277,7 @@ static VOID MAIN_MenuCommand(HWND hWnd, WPARAM wParam, LPARAM lParam) WritePrivateProfileString("Settings", "SaveSettings", Globals.bSaveSettings ? "1" : "0", Globals.lpszIniFile); - WriteOutProfiles16(); + WritePrivateProfileString(NULL,NULL,NULL,Globals.lpszIniFile); /* flush it */ break; /* Menu Windows */