Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
f69a4ef0
Commit
f69a4ef0
authored
Oct 13, 2010
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Oct 13, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winspool: Use CUPS for printing.
parent
178294a4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
info.c
dlls/winspool.drv/info.c
+5
-5
winspool.h
include/winspool.h
+4
-0
No files found.
dlls/winspool.drv/info.c
View file @
f69a4ef0
...
...
@@ -458,9 +458,8 @@ static BOOL CUPS_LoadPrinters(void)
nrofdests
=
pcupsGetDests
(
&
dests
);
TRACE
(
"Found %d CUPS %s:
\n
"
,
nrofdests
,
(
nrofdests
==
1
)
?
"printer"
:
"printers"
);
for
(
i
=
0
;
i
<
nrofdests
;
i
++
)
{
/* FIXME: replace "LPR:" with "CUPS:". Fix printing output first */
port
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
"LPR:"
)
+
strlen
(
dests
[
i
].
name
)
+
1
);
sprintf
(
port
,
"LPR:%s"
,
dests
[
i
].
name
);
port
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
"CUPS:"
)
+
strlen
(
dests
[
i
].
name
)
+
1
);
sprintf
(
port
,
"CUPS:%s"
,
dests
[
i
].
name
);
/* FIXME: remove extension. Fix gdi32/drivers and comdlg32/printdlg first */
devline
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
"WINEPS.DRV,,15,45"
)
+
strlen
(
port
));
sprintf
(
devline
,
"WINEPS.DRV,%s"
,
port
);
...
...
@@ -484,6 +483,7 @@ static BOOL CUPS_LoadPrinters(void)
/* Printer already in registry, delete the tag added in WINSPOOL_LoadSystemPrinters
and continue */
TRACE
(
"Printer already exists
\n
"
);
RegSetValueExA
(
hkeyPrinter
,
"Port"
,
0
,
REG_SZ
,
(
LPBYTE
)
port
,
strlen
(
port
)
+
1
);
/* overwrite LPR:* port */
RegDeleteValueW
(
hkeyPrinter
,
May_Delete_Value
);
RegCloseKey
(
hkeyPrinter
);
}
else
{
...
...
@@ -518,12 +518,12 @@ static BOOL CUPS_LoadPrinters(void)
hadprinter
=
TRUE
;
if
(
dests
[
i
].
is_default
)
{
WINSPOOL_SetDefaultPrinter
(
dests
[
i
].
name
,
dests
[
i
].
name
,
TRUE
);
SetDefaultPrinterA
(
dests
[
i
].
name
);
haddefault
=
TRUE
;
}
}
if
(
hadprinter
&
!
haddefault
)
WINSPOOL_SetDefaultPrinter
(
dests
[
0
].
name
,
dests
[
0
].
name
,
TRUE
);
SetDefaultPrinterA
(
dests
[
0
].
name
);
pcupsFreeDests
(
nrofdests
,
dests
);
RegCloseKey
(
hkeyPrinters
);
return
hadprinter
;
...
...
include/winspool.h
View file @
f69a4ef0
...
...
@@ -1541,6 +1541,10 @@ BOOL WINAPI GetDefaultPrinterA(LPSTR pName, LPDWORD pcbNameSize);
BOOL
WINAPI
GetDefaultPrinterW
(
LPWSTR
pName
,
LPDWORD
pcbNameSize
);
#define GetDefaultPrinter WINELIB_NAME_AW(GetDefaultPrinter)
BOOL
WINAPI
SetDefaultPrinterA
(
LPCSTR
);
BOOL
WINAPI
SetDefaultPrinterW
(
LPCWSTR
);
#define SetDefaultPrinter WINELIB_NAME_AW(SetDefaultPrinter)
BOOL
WINAPI
DeletePrinterDriverA
(
LPSTR
pName
,
LPSTR
pEnvironment
,
LPSTR
pDriverName
);
BOOL
WINAPI
DeletePrinterDriverW
(
LPWSTR
pName
,
LPWSTR
pEnvironment
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment