Commit 3ae5ad8e authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

winhelp: Enable/Disable prev/next buttons if there's a prev/next page.

parent 7ae1bb28
......@@ -245,10 +245,17 @@ void CALLBACK MACRO_BookmarkMore(void)
void CALLBACK MACRO_BrowseButtons(void)
{
HLPFILE_PAGE* page = Globals.active_win->page;
WINE_TRACE("()\n");
MACRO_CreateButton("BTN_PREV", "&<<", "Prev()");
MACRO_CreateButton("BTN_NEXT", "&>>", "Next()");
if (!HLPFILE_PageByOffset(page->file, page->browse_bwd))
MACRO_DisableButton("BTN_PREV");
if (!HLPFILE_PageByOffset(page->file, page->browse_fwd))
MACRO_DisableButton("BTN_NEXT");
}
void CALLBACK MACRO_ChangeButtonBinding(LPCSTR id, LPCSTR macro)
......
......@@ -614,17 +614,6 @@ BOOL WINHELP_CreateHelpWindow(WINHELP_WNDPAGE* wpage, int nCmdShow, BOOL remembe
MACRO_CreateButton("BTN_TOPICS", buffer, "Finder()");
}
/* Initialize file specific pushbuttons */
if (!(wpage->wininfo->win_style & WS_POPUP) && wpage->page)
{
HLPFILE_MACRO *macro;
for (macro = wpage->page->file->first_macro; macro; macro = macro->next)
MACRO_ExecuteMacro(macro->lpszMacro);
for (macro = wpage->page->first_macro; macro; macro = macro->next)
MACRO_ExecuteMacro(macro->lpszMacro);
}
if (!bReUsed)
{
win->hMainWnd = CreateWindowEx((bPopup) ? WS_EX_TOOLWINDOW : 0, MAIN_WIN_CLASS_NAME,
......@@ -644,6 +633,17 @@ BOOL WINHELP_CreateHelpWindow(WINHELP_WNDPAGE* wpage, int nCmdShow, BOOL remembe
0, 0, 0, 0, win->hMainWnd, (HMENU)CTL_ID_TEXT, Globals.hInstance, win);
}
/* Initialize file specific pushbuttons */
if (!(wpage->wininfo->win_style & WS_POPUP) && wpage->page)
{
HLPFILE_MACRO *macro;
for (macro = wpage->page->file->first_macro; macro; macro = macro->next)
MACRO_ExecuteMacro(macro->lpszMacro);
for (macro = wpage->page->first_macro; macro; macro = macro->next)
MACRO_ExecuteMacro(macro->lpszMacro);
}
WINHELP_LayoutMainWindow(win);
if (bPopup) Globals.hPopupWnd = win->hMainWnd;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment