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
d95bcb73
Commit
d95bcb73
authored
Apr 22, 2008
by
Eric Pouech
Committed by
Alexandre Julliard
Apr 23, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhelp: Present correctly the history when dealing with multiple files.
parent
db5902ba
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
7 deletions
+26
-7
winhelp.c
programs/winhelp/winhelp.c
+26
-7
No files found.
programs/winhelp/winhelp.c
View file @
d95bcb73
...
@@ -481,14 +481,11 @@ void WINHELP_LayoutMainWindow(WINHELP_WINDOW* win)
...
@@ -481,14 +481,11 @@ void WINHELP_LayoutMainWindow(WINHELP_WINDOW* win)
static
void
WINHELP_AddHistory
(
WINHELP_WINDOW
*
win
,
HLPFILE_PAGE
*
page
)
static
void
WINHELP_AddHistory
(
WINHELP_WINDOW
*
win
,
HLPFILE_PAGE
*
page
)
{
{
unsigned
i
,
num
;
unsigned
num
;
/* FIXME: when using back, we shouldn't update the history... */
/* FIXME: when using back, we shouldn't update the history... */
for
(
i
=
0
;
i
<
Globals
.
history
.
index
;
i
++
)
/* add to history only if different from top of history */
if
(
Globals
.
history
.
set
[
i
].
page
==
page
)
break
;
if
(
!
Globals
.
history
.
index
||
Globals
.
history
.
set
[
0
].
page
!=
page
)
/* if the new page is already in the history, do nothing */
if
(
i
==
Globals
.
history
.
index
)
{
{
num
=
sizeof
(
Globals
.
history
.
set
)
/
sizeof
(
Globals
.
history
.
set
[
0
]);
num
=
sizeof
(
Globals
.
history
.
set
)
/
sizeof
(
Globals
.
history
.
set
[
0
]);
/* we're full, remove latest entry */
/* we're full, remove latest entry */
...
@@ -503,8 +500,8 @@ static void WINHELP_AddHistory(WINHELP_WINDOW* win, HLPFILE_PAGE* page)
...
@@ -503,8 +500,8 @@ static void WINHELP_AddHistory(WINHELP_WINDOW* win, HLPFILE_PAGE* page)
Globals
.
history
.
set
[
0
].
wininfo
=
win
->
info
;
Globals
.
history
.
set
[
0
].
wininfo
=
win
->
info
;
Globals
.
history
.
index
++
;
Globals
.
history
.
index
++
;
page
->
file
->
wRefCount
++
;
page
->
file
->
wRefCount
++
;
if
(
win
->
hHistoryWnd
)
InvalidateRect
(
win
->
hHistoryWnd
,
NULL
,
TRUE
);
}
}
if
(
win
->
hHistoryWnd
)
InvalidateRect
(
win
->
hHistoryWnd
,
NULL
,
TRUE
);
num
=
sizeof
(
win
->
back
.
set
)
/
sizeof
(
win
->
back
.
set
[
0
]);
num
=
sizeof
(
win
->
back
.
set
)
/
sizeof
(
win
->
back
.
set
[
0
]);
if
(
win
->
back
.
index
==
num
)
if
(
win
->
back
.
index
==
num
)
...
@@ -1298,10 +1295,32 @@ static LRESULT CALLBACK WINHELP_HistoryWndProc(HWND hWnd, UINT msg, WPARAM wPara
...
@@ -1298,10 +1295,32 @@ static LRESULT CALLBACK WINHELP_HistoryWndProc(HWND hWnd, UINT msg, WPARAM wPara
for
(
i
=
0
;
i
<
Globals
.
history
.
index
;
i
++
)
for
(
i
=
0
;
i
<
Globals
.
history
.
index
;
i
++
)
{
{
if
(
Globals
.
history
.
set
[
i
].
page
->
file
==
Globals
.
active_win
->
page
->
file
)
{
TextOut
(
hDc
,
0
,
i
*
tm
.
tmHeight
,
TextOut
(
hDc
,
0
,
i
*
tm
.
tmHeight
,
Globals
.
history
.
set
[
i
].
page
->
lpszTitle
,
Globals
.
history
.
set
[
i
].
page
->
lpszTitle
,
strlen
(
Globals
.
history
.
set
[
i
].
page
->
lpszTitle
));
strlen
(
Globals
.
history
.
set
[
i
].
page
->
lpszTitle
));
}
}
else
{
char
buffer
[
1024
];
const
char
*
ptr1
;
const
char
*
ptr2
;
unsigned
len
;
ptr1
=
strrchr
(
Globals
.
history
.
set
[
i
].
page
->
file
->
lpszPath
,
'\\'
);
if
(
!
ptr1
)
ptr1
=
Globals
.
history
.
set
[
i
].
page
->
file
->
lpszPath
;
else
ptr1
++
;
ptr2
=
strrchr
(
ptr1
,
'.'
);
len
=
ptr2
?
ptr2
-
ptr1
:
strlen
(
ptr1
);
if
(
len
>
sizeof
(
buffer
))
len
=
sizeof
(
buffer
);
memcpy
(
buffer
,
ptr1
,
len
);
if
(
len
<
sizeof
(
buffer
))
buffer
[
len
++
]
=
':'
;
strncpy
(
&
buffer
[
len
],
Globals
.
history
.
set
[
i
].
page
->
lpszTitle
,
sizeof
(
buffer
)
-
len
);
buffer
[
sizeof
(
buffer
)
-
1
]
=
'\0'
;
TextOut
(
hDc
,
0
,
i
*
tm
.
tmHeight
,
buffer
,
strlen
(
buffer
));
}
}
EndPaint
(
hWnd
,
&
ps
);
EndPaint
(
hWnd
,
&
ps
);
break
;
break
;
case
WM_DESTROY
:
case
WM_DESTROY
:
...
...
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