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
4a89d291
Commit
4a89d291
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: Don't add a page to the history when using the back button.
parent
07cf778b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
14 deletions
+13
-14
macro.c
programs/winhelp/macro.c
+3
-3
winhelp.c
programs/winhelp/winhelp.c
+9
-10
winhelp.h
programs/winhelp/winhelp.h
+1
-1
No files found.
programs/winhelp/macro.c
View file @
4a89d291
...
...
@@ -221,7 +221,7 @@ void CALLBACK MACRO_Back(void)
WINE_TRACE
(
"()
\n
"
);
if
(
win
&&
win
->
back
.
index
>=
2
)
WINHELP_CreateHelpWindow
(
&
win
->
back
.
set
[
--
win
->
back
.
index
-
1
],
SW_SHOW
);
WINHELP_CreateHelpWindow
(
&
win
->
back
.
set
[
--
win
->
back
.
index
-
1
],
SW_SHOW
,
FALSE
);
}
void
CALLBACK
MACRO_BackFlush
(
void
)
...
...
@@ -699,7 +699,7 @@ void CALLBACK MACRO_Next(void)
{
wp
.
page
->
file
->
wRefCount
++
;
wp
.
wininfo
=
Globals
.
active_win
->
info
;
WINHELP_CreateHelpWindow
(
&
wp
,
SW_NORMAL
);
WINHELP_CreateHelpWindow
(
&
wp
,
SW_NORMAL
,
TRUE
);
}
}
...
...
@@ -739,7 +739,7 @@ void CALLBACK MACRO_Prev(void)
{
wp
.
page
->
file
->
wRefCount
++
;
wp
.
wininfo
=
Globals
.
active_win
->
info
;
WINHELP_CreateHelpWindow
(
&
wp
,
SW_NORMAL
);
WINHELP_CreateHelpWindow
(
&
wp
,
SW_NORMAL
,
TRUE
);
}
}
...
...
programs/winhelp/winhelp.c
View file @
4a89d291
...
...
@@ -485,12 +485,10 @@ void WINHELP_LayoutMainWindow(WINHELP_WINDOW* win)
}
static
void
WINHELP_
AddHistory
(
WINHELP_WINDOW
*
win
,
HLPFILE_PAGE
*
page
)
static
void
WINHELP_
RememberPage
(
WINHELP_WINDOW
*
win
,
HLPFILE_PAGE
*
page
)
{
unsigned
num
;
/* FIXME: when using back, we shouldn't update the history... */
/* add to history only if different from top of history */
if
(
!
Globals
.
history
.
index
||
Globals
.
history
.
set
[
0
].
page
!=
page
)
{
num
=
sizeof
(
Globals
.
history
.
set
)
/
sizeof
(
Globals
.
history
.
set
[
0
]);
...
...
@@ -527,7 +525,7 @@ static void WINHELP_AddHistory(WINHELP_WINDOW* win, HLPFILE_PAGE* page)
*
* WINHELP_CreateHelpWindow
*/
BOOL
WINHELP_CreateHelpWindow
(
WINHELP_WNDPAGE
*
wpage
,
int
nCmdShow
)
BOOL
WINHELP_CreateHelpWindow
(
WINHELP_WNDPAGE
*
wpage
,
int
nCmdShow
,
BOOL
remember
)
{
WINHELP_WINDOW
*
win
=
NULL
;
BOOL
bPrimary
,
bPopup
,
bReUsed
=
FALSE
;
...
...
@@ -590,9 +588,9 @@ BOOL WINHELP_CreateHelpWindow(WINHELP_WNDPAGE* wpage, int nCmdShow)
win
->
hArrowCur
=
LoadCursorA
(
0
,
(
LPSTR
)
IDC_ARROW
);
win
->
hHandCur
=
LoadCursorA
(
0
,
(
LPSTR
)
IDC_HAND
);
if
(
!
bPopup
&&
wpage
->
page
)
if
(
!
bPopup
&&
wpage
->
page
&&
remember
)
{
WINHELP_
AddHistory
(
win
,
wpage
->
page
);
WINHELP_
RememberPage
(
win
,
wpage
->
page
);
}
if
(
!
bPopup
)
...
...
@@ -609,6 +607,7 @@ BOOL WINHELP_CreateHelpWindow(WINHELP_WNDPAGE* wpage, int nCmdShow)
MACRO_CreateButton
(
"BTN_SEARCH"
,
buffer
,
"Search()"
);
LoadString
(
Globals
.
hInstance
,
STID_BACK
,
buffer
,
sizeof
(
buffer
));
MACRO_CreateButton
(
"BTN_BACK"
,
buffer
,
"Back()"
);
if
(
win
->
back
.
index
<=
1
)
MACRO_DisableButton
(
"BTN_BACK"
);
LoadString
(
Globals
.
hInstance
,
STID_HISTORY
,
buffer
,
sizeof
(
buffer
));
MACRO_CreateButton
(
"BTN_HISTORY"
,
buffer
,
"History()"
);
LoadString
(
Globals
.
hInstance
,
STID_TOPICS
,
buffer
,
sizeof
(
buffer
));
...
...
@@ -669,7 +668,7 @@ BOOL WINHELP_CreateHelpWindowByHash(HLPFILE* hlpfile, LONG lHash,
HLPFILE_Contents
(
hlpfile
);
if
(
wpage
.
page
)
wpage
.
page
->
file
->
wRefCount
++
;
wpage
.
wininfo
=
wi
;
return
WINHELP_CreateHelpWindow
(
&
wpage
,
nCmdShow
);
return
WINHELP_CreateHelpWindow
(
&
wpage
,
nCmdShow
,
TRUE
);
}
/***********************************************************************
...
...
@@ -684,7 +683,7 @@ BOOL WINHELP_CreateHelpWindowByMap(HLPFILE* hlpfile, LONG lMap,
wpage
.
page
=
HLPFILE_PageByMap
(
hlpfile
,
lMap
);
if
(
wpage
.
page
)
wpage
.
page
->
file
->
wRefCount
++
;
wpage
.
wininfo
=
wi
;
return
WINHELP_CreateHelpWindow
(
&
wpage
,
nCmdShow
);
return
WINHELP_CreateHelpWindow
(
&
wpage
,
nCmdShow
,
TRUE
);
}
/***********************************************************************
...
...
@@ -699,7 +698,7 @@ BOOL WINHELP_CreateHelpWindowByOffset(HLPFILE* hlpfile, LONG lOffset,
wpage
.
page
=
HLPFILE_PageByOffset
(
hlpfile
,
lOffset
);
if
(
wpage
.
page
)
wpage
.
page
->
file
->
wRefCount
++
;
wpage
.
wininfo
=
wi
;
return
WINHELP_CreateHelpWindow
(
&
wpage
,
nCmdShow
);
return
WINHELP_CreateHelpWindow
(
&
wpage
,
nCmdShow
,
TRUE
);
}
/***********************************************************************
...
...
@@ -1293,7 +1292,7 @@ static LRESULT CALLBACK WINHELP_HistoryWndProc(HWND hWnd, UINT msg, WPARAM wPara
GetTextMetrics
(
hDc
,
&
tm
);
i
=
HIWORD
(
lParam
)
/
tm
.
tmHeight
;
if
(
i
<
Globals
.
history
.
index
)
WINHELP_CreateHelpWindow
(
&
Globals
.
history
.
set
[
i
],
SW_SHOW
);
WINHELP_CreateHelpWindow
(
&
Globals
.
history
.
set
[
i
],
SW_SHOW
,
TRUE
);
ReleaseDC
(
hWnd
,
hDc
);
break
;
case
WM_PAINT
:
...
...
programs/winhelp/winhelp.h
View file @
4a89d291
...
...
@@ -180,7 +180,7 @@ extern FARPROC Callbacks[];
BOOL
WINHELP_CreateHelpWindowByHash
(
HLPFILE
*
,
LONG
,
HLPFILE_WINDOWINFO
*
,
int
);
BOOL
WINHELP_CreateHelpWindowByMap
(
HLPFILE
*
,
LONG
,
HLPFILE_WINDOWINFO
*
,
int
);
BOOL
WINHELP_CreateHelpWindowByOffset
(
HLPFILE
*
,
LONG
,
HLPFILE_WINDOWINFO
*
,
int
);
BOOL
WINHELP_CreateHelpWindow
(
WINHELP_WNDPAGE
*
,
int
);
BOOL
WINHELP_CreateHelpWindow
(
WINHELP_WNDPAGE
*
,
int
,
BOOL
);
BOOL
WINHELP_GetOpenFileName
(
LPSTR
,
int
);
BOOL
WINHELP_CreateIndexWindow
(
void
);
void
WINHELP_DeleteBackSet
(
WINHELP_WINDOW
*
);
...
...
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