#include "wx/html/htmlwin.h"
#include "wx/html/forcelnk.h"
+#include "wx/log.h"
-#ifdef __WXMSW__
-#include <windows.h>
-#endif
//-----------------------------------------------------------------------------
// wxHtmlWindow
if (f == NULL) {
wxString err;
- err.Printf(_("Unable to open requested location :\n\n%s"), WXSTRINGCAST location);
+ wxLogError(_("Unable to open requested HTML document: %s"), location.mb_str());
m_tmpCanDrawLocks--;
- Refresh();
- wxMessageBox(err, "Error");
SetCursor(*wxSTANDARD_CURSOR);
return FALSE;
m_History.Add(new HtmlHistoryItem(m_OpenedPage, m_OpenedAnchor));
}
+ if (m_OpenedPageTitle == wxEmptyString)
+ OnSetTitle(wxFileNameFromPath(m_OpenedPage));
SetCursor(*wxSTANDARD_CURSOR);
-
+
wxYield();
m_tmpCanDrawLocks--;
Refresh();
bool wxHtmlWindow::ScrollToAnchor(const wxString& anchor)
{
const wxHtmlCell *c = m_Cell -> Find(wxHTML_COND_ISANCHOR, &anchor);
- if (!c) return FALSE;
+ if (!c)
+ {
+ wxLogWarning(_("HTML anchor %s does not exist."), anchor.mb_str());
+ return FALSE;
+ }
else {
int y;
if (m_tmpCanDrawLocks > 0) return;
dc.SetMapMode(wxMM_TEXT);
+#if 0
+/* VS - I don't think this is neccessary any longer
+ MSC_VER 1200 means MSVC 6.0 and it works fine */
#if defined(_MSC_VER) && (_MSC_VER == 1200)
::SetMapMode((HDC)dc.GetHDC(), MM_TEXT);
+#endif
#endif
dc.SetBackgroundMode(wxTRANSPARENT);
ViewStart(&x, &y);
switch (event.KeyCode()) {
case WXK_PAGEUP :
case WXK_PRIOR :
- Scroll(-1, sty - (2 * cliy / 3));
+ Scroll(-1, sty - (5 * cliy / 6));
break;
case WXK_PAGEDOWN :
case WXK_NEXT :
- Scroll(-1, sty + (2 * cliy / 3));
+ Scroll(-1, sty + (5 * cliy / 6));
break;
case WXK_HOME :
Scroll(-1, 0);