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
183fcb5c
Commit
183fcb5c
authored
Jul 15, 2005
by
Huw Davies
Committed by
Alexandre Julliard
Jul 15, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set the default doc title to that of Windows.
Pass cups the doc title.
parent
fe80b4ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
info.c
dlls/winspool/info.c
+14
-7
No files found.
dlls/winspool/info.c
View file @
183fcb5c
...
...
@@ -160,6 +160,9 @@ static const WCHAR CUPS_Port[] = {'C','U','P','S',':',0};
static
const
WCHAR
FILE_Port
[]
=
{
'F'
,
'I'
,
'L'
,
'E'
,
':'
,
0
};
static
const
WCHAR
LPR_Port
[]
=
{
'L'
,
'P'
,
'R'
,
':'
,
0
};
static
const
WCHAR
default_doc_title
[]
=
{
'L'
,
'o'
,
'c'
,
'a'
,
'l'
,
' '
,
'D'
,
'o'
,
'w'
,
'n'
,
'l'
,
'e'
,
'v'
,
'e'
,
'l'
,
' '
,
'D'
,
'o'
,
'c'
,
'u'
,
'm'
,
'e'
,
'n'
,
't'
,
0
};
static
HKEY
WINSPOOL_OpenDriverReg
(
LPVOID
pEnvironment
,
BOOL
unicode
);
static
BOOL
WINSPOOL_GetPrinterDriver
(
HANDLE
hPrinter
,
LPWSTR
pEnvironment
,
DWORD
Level
,
LPBYTE
pDriverInfo
,
...
...
@@ -181,7 +184,7 @@ static inline PWSTR asciitounicode( UNICODE_STRING * usBufferPtr, LPCSTR src )
return
NULL
;
}
static
LPWSTR
strdupW
(
LPWSTR
p
)
static
LPWSTR
strdupW
(
LP
C
WSTR
p
)
{
LPWSTR
ret
;
DWORD
len
;
...
...
@@ -1328,7 +1331,7 @@ BOOL WINAPI AddJobW(HANDLE hPrinter, DWORD Level, LPBYTE pData, DWORD cbBuf, LPD
len
=
strlenW
(
filename
);
job
->
filename
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
len
+
1
)
*
sizeof
(
WCHAR
));
memcpy
(
job
->
filename
,
filename
,
(
len
+
1
)
*
sizeof
(
WCHAR
));
job
->
document_title
=
NULL
;
job
->
document_title
=
strdupW
(
default_doc_title
)
;
list_add_tail
(
&
printer
->
jobs
,
&
job
->
entry
);
*
pcbNeeded
=
(
len
+
1
)
*
sizeof
(
WCHAR
)
+
sizeof
(
*
addjob
);
...
...
@@ -4905,12 +4908,12 @@ static BOOL schedule_lpr(LPCWSTR printer_name, LPCWSTR filename)
/*****************************************************************************
* schedule_cups
*/
static
BOOL
schedule_cups
(
LPCWSTR
printer_name
,
LPCWSTR
filename
)
static
BOOL
schedule_cups
(
LPCWSTR
printer_name
,
LPCWSTR
filename
,
LPCWSTR
document_title
)
{
#if HAVE_CUPS_CUPS_H
if
(
pcupsPrintFile
)
{
char
*
unixname
,
*
queue
;
char
*
unixname
,
*
queue
,
*
doc_titleA
;
DWORD
len
;
BOOL
ret
;
...
...
@@ -4921,9 +4924,13 @@ static BOOL schedule_cups(LPCWSTR printer_name, LPCWSTR filename)
queue
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
WideCharToMultiByte
(
CP_ACP
,
0
,
printer_name
,
-
1
,
queue
,
len
,
NULL
,
NULL
);
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
document_title
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
doc_titleA
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
WideCharToMultiByte
(
CP_ACP
,
0
,
document_title
,
-
1
,
doc_titleA
,
len
,
NULL
,
NULL
);
TRACE
(
"printing via cups
\n
"
);
/* FIXME: get job title from GetJob */
ret
=
pcupsPrintFile
(
queue
,
unixname
,
"Wine print job"
,
0
,
NULL
);
ret
=
pcupsPrintFile
(
queue
,
unixname
,
doc_titleA
,
0
,
NULL
);
HeapFree
(
GetProcessHeap
(),
0
,
doc_titleA
);
HeapFree
(
GetProcessHeap
(),
0
,
queue
);
HeapFree
(
GetProcessHeap
(),
0
,
unixname
);
return
ret
;
...
...
@@ -5058,7 +5065,7 @@ BOOL WINAPI ScheduleJob( HANDLE hPrinter, DWORD dwJobID )
}
else
if
(
!
strncmpW
(
pi5
->
pPortName
,
CUPS_Port
,
strlenW
(
CUPS_Port
)))
{
schedule_cups
(
pi5
->
pPortName
+
strlenW
(
CUPS_Port
),
job
->
filename
);
schedule_cups
(
pi5
->
pPortName
+
strlenW
(
CUPS_Port
),
job
->
filename
,
job
->
document_title
);
}
else
if
(
!
strncmpW
(
pi5
->
pPortName
,
FILE_Port
,
strlenW
(
FILE_Port
)))
{
...
...
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