From f22e31b9e61d30d2367581171a9e0c10db47db87 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 28 Jun 2005 13:55:02 +0000 Subject: [PATCH] Moved spooler configuration to HKCU\Software\Wine\Printing\Spooler. --- dlls/gdi/printdrv.c | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/dlls/gdi/printdrv.c b/dlls/gdi/printdrv.c index 75afd10e473..1fde25376d5 100644 --- a/dlls/gdi/printdrv.c +++ b/dlls/gdi/printdrv.c @@ -461,28 +461,16 @@ static int CreateSpoolFile(LPCSTR pszOutput) return -1; psCmd[0] = 0; - if (!strncmp("LPR:",pszOutput,4)) + /* @@ Wine registry key: HKCU\Software\Wine\Printing\Spooler */ + if(!RegOpenKeyA(HKEY_CURRENT_USER, "Software\\Wine\\Printing\\Spooler", &hkey)) { - /* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\spooler */ - if(!RegOpenKeyA(HKEY_LOCAL_MACHINE, "Software\\Wine\\Wine\\Config\\spooler", &hkey)) - { - DWORD type, count = sizeof(psCmd); - RegQueryValueExA(hkey, pszOutput, 0, &type, psCmd, &count); - RegCloseKey(hkey); - } - if(psCmd[0] == 0) - sprintf(psCmd,"|lpr -P%s",pszOutput+4); - } - else - { - /* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\spooler */ - if(!RegOpenKeyA(HKEY_LOCAL_MACHINE, "Software\\Wine\\Wine\\Config\\spooler", &hkey)) - { - DWORD type, count = sizeof(psCmd); - RegQueryValueExA(hkey, pszOutput, 0, &type, psCmd, &count); - RegCloseKey(hkey); - } + DWORD type, count = sizeof(psCmd); + RegQueryValueExA(hkey, pszOutput, 0, &type, psCmd, &count); + RegCloseKey(hkey); } + if (!psCmd[0] && !strncmp("LPR:",pszOutput,4)) + sprintf(psCmd,"|lpr -P%s",pszOutput+4); + TRACE("Got printerSpoolCommand '%s' for output device '%s'\n", psCmd, pszOutput); if (!*psCmd)