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
4dc019a4
Commit
4dc019a4
authored
Feb 07, 2010
by
Erich Hoover
Committed by
Alexandre Julliard
Feb 08, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hhctrl.ocx: Support HTML Help having indented Index tab items.
parent
687a2aea
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
hhctrl.h
dlls/hhctrl.ocx/hhctrl.h
+1
-0
index.c
dlls/hhctrl.ocx/index.c
+13
-1
No files found.
dlls/hhctrl.ocx/hhctrl.h
View file @
4dc019a4
...
...
@@ -79,6 +79,7 @@ typedef struct IndexItem {
int
nItems
;
int
itemFlags
;
int
indentLevel
;
IndexSubItem
*
items
;
}
IndexItem
;
...
...
dlls/hhctrl.ocx/index.c
View file @
4dc019a4
...
...
@@ -44,7 +44,8 @@ static void fill_index_tree(HWND hwnd, IndexItem *item)
}
memset
(
&
lvi
,
0
,
sizeof
(
lvi
));
lvi
.
iItem
=
index
++
;
lvi
.
mask
=
LVIF_TEXT
|
LVIF_PARAM
;
lvi
.
mask
=
LVIF_TEXT
|
LVIF_PARAM
|
LVIF_INDENT
;
lvi
.
iIndent
=
item
->
indentLevel
;
lvi
.
cchTextMax
=
strlenW
(
item
->
keyword
)
+
1
;
lvi
.
pszText
=
item
->
keyword
;
lvi
.
lParam
=
(
LPARAM
)
item
;
...
...
@@ -205,11 +206,17 @@ static IndexItem *parse_li(HHInfo *info, stream_t *stream)
* At this high-level stage we locate out each HTML list item tag.
* Since there is no end-tag for the <LI> item, we must hope that
* the <LI> entry is parsed correctly or tags might get lost.
*
* Within each entry it is also possible to encounter an additional
* <UL> tag. When this occurs the tag indicates that the topics
* contained within it are related to the parent <LI> topic and
* should be inset by an indent.
*/
static
void
parse_hhindex
(
HHInfo
*
info
,
IStream
*
str
,
IndexItem
*
item
)
{
stream_t
stream
;
strbuf_t
node
,
node_name
;
int
indent_level
=
-
1
;
strbuf_init
(
&
node
);
strbuf_init
(
&
node_name
);
...
...
@@ -225,6 +232,11 @@ static void parse_hhindex(HHInfo *info, IStream *str, IndexItem *item)
item
->
next
=
parse_li
(
info
,
&
stream
);
item
->
next
->
merge
=
item
->
merge
;
item
=
item
->
next
;
item
->
indentLevel
=
indent_level
;
}
else
if
(
!
strcasecmp
(
node_name
.
buf
,
"ul"
))
{
indent_level
++
;
}
else
if
(
!
strcasecmp
(
node_name
.
buf
,
"/ul"
))
{
indent_level
--
;
}
else
{
WARN
(
"Unhandled tag! %s
\n
"
,
node_name
.
buf
);
}
...
...
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