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
aa1b38c5
Commit
aa1b38c5
authored
Mar 02, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 05, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hhctrl.ocx: Try to build URL with full path if navigation to URL fails.
parent
e18ddbc0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
4 deletions
+30
-4
help.c
dlls/hhctrl.ocx/help.c
+30
-4
No files found.
dlls/hhctrl.ocx/help.c
View file @
aa1b38c5
...
...
@@ -62,11 +62,13 @@ static LPWSTR HH_LoadString(DWORD dwID)
return
string
;
}
BOOL
NavigateToU
rl
(
HHInfo
*
info
,
LPCWSTR
surl
)
static
HRESULT
navigate_u
rl
(
HHInfo
*
info
,
LPCWSTR
surl
)
{
VARIANT
url
;
HRESULT
hres
;
TRACE
(
"%s
\n
"
,
debugstr_w
(
surl
));
V_VT
(
&
url
)
=
VT_BSTR
;
V_BSTR
(
&
url
)
=
SysAllocString
(
surl
);
...
...
@@ -74,7 +76,29 @@ BOOL NavigateToUrl(HHInfo *info, LPCWSTR surl)
VariantClear
(
&
url
);
return
SUCCEEDED
(
hres
);
if
(
FAILED
(
hres
))
TRACE
(
"Navigation failed: %08lx
\n
"
,
hres
);
return
hres
;
}
BOOL
NavigateToUrl
(
HHInfo
*
info
,
LPCWSTR
surl
)
{
ChmPath
chm_path
;
BOOL
ret
;
HRESULT
hres
;
hres
=
navigate_url
(
info
,
surl
);
if
(
SUCCEEDED
(
hres
))
return
TRUE
;
SetChmPath
(
&
chm_path
,
info
->
pCHMInfo
->
szFile
,
surl
);
ret
=
NavigateToChm
(
info
,
chm_path
.
chm_file
,
chm_path
.
chm_index
);
hhctrl_free
(
chm_path
.
chm_file
);
hhctrl_free
(
chm_path
.
chm_index
);
return
ret
;
}
BOOL
NavigateToChm
(
HHInfo
*
info
,
LPCWSTR
file
,
LPCWSTR
index
)
...
...
@@ -84,7 +108,7 @@ BOOL NavigateToChm(HHInfo *info, LPCWSTR file, LPCWSTR index)
LPWSTR
ptr
;
static
const
WCHAR
url_format
[]
=
{
'm'
,
'k'
,
':'
,
'@'
,
'M'
,
'S'
,
'I'
,
'T'
,
'S'
,
't'
,
'o'
,
'r'
,
'e'
,
':'
,
'%'
,
's'
,
':'
,
':'
,
'
/'
,
'
%'
,
's'
,
0
};
{
'm'
,
'k'
,
':'
,
'@'
,
'M'
,
'S'
,
'I'
,
'T'
,
'S'
,
't'
,
'o'
,
'r'
,
'e'
,
':'
,
'%'
,
's'
,
':'
,
':'
,
'%'
,
's'
,
0
};
TRACE
(
"%p %s %s
\n
"
,
info
,
debugstr_w
(
file
),
debugstr_w
(
index
));
...
...
@@ -102,7 +126,7 @@ BOOL NavigateToChm(HHInfo *info, LPCWSTR file, LPCWSTR index)
if
((
ptr
=
strchrW
(
buf
,
'#'
)))
*
ptr
=
0
;
return
NavigateToUrl
(
info
,
buf
);
return
SUCCEEDED
(
navigate_url
(
info
,
buf
)
);
}
/* Size Bar */
...
...
@@ -892,6 +916,8 @@ static BOOL CreateViewer(HHInfo *pHHInfo)
void
ReleaseHelpViewer
(
HHInfo
*
info
)
{
TRACE
(
"(%p)
\n
"
,
info
);
if
(
!
info
)
return
;
...
...
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