Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
ffbd30dd
Commit
ffbd30dd
authored
Jul 04, 2007
by
Pedro Araujo Chaves Jr
Committed by
Alexandre Julliard
Jul 05, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winspool.drv: Fallback to the first found printer as default printer.
parent
fe7e83fd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
info.c
dlls/winspool.drv/info.c
+6
-2
No files found.
dlls/winspool.drv/info.c
View file @
ffbd30dd
...
@@ -416,7 +416,7 @@ static void *cupshandle;
...
@@ -416,7 +416,7 @@ static void *cupshandle;
static
BOOL
CUPS_LoadPrinters
(
void
)
static
BOOL
CUPS_LoadPrinters
(
void
)
{
{
int
i
,
nrofdests
;
int
i
,
nrofdests
;
BOOL
hadprinter
=
FALSE
;
BOOL
hadprinter
=
FALSE
,
haddefault
=
FALSE
;
cups_dest_t
*
dests
;
cups_dest_t
*
dests
;
PRINTER_INFO_2A
pinfo2a
;
PRINTER_INFO_2A
pinfo2a
;
char
*
port
,
*
devline
;
char
*
port
,
*
devline
;
...
@@ -494,9 +494,13 @@ static BOOL CUPS_LoadPrinters(void)
...
@@ -494,9 +494,13 @@ static BOOL CUPS_LoadPrinters(void)
HeapFree
(
GetProcessHeap
(),
0
,
port
);
HeapFree
(
GetProcessHeap
(),
0
,
port
);
hadprinter
=
TRUE
;
hadprinter
=
TRUE
;
if
(
dests
[
i
].
is_default
)
if
(
dests
[
i
].
is_default
)
{
WINSPOOL_SetDefaultPrinter
(
dests
[
i
].
name
,
dests
[
i
].
name
,
TRUE
);
WINSPOOL_SetDefaultPrinter
(
dests
[
i
].
name
,
dests
[
i
].
name
,
TRUE
);
haddefault
=
TRUE
;
}
}
}
if
(
hadprinter
&
!
haddefault
)
WINSPOOL_SetDefaultPrinter
(
dests
[
0
].
name
,
dests
[
0
].
name
,
TRUE
);
RegCloseKey
(
hkeyPrinters
);
RegCloseKey
(
hkeyPrinters
);
return
hadprinter
;
return
hadprinter
;
}
}
...
...
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