[sword-svn] r197 - trunk/src/SwordReader_GUI
dtrotzjr at crosswire.org
dtrotzjr at crosswire.org
Tue Jan 6 21:01:30 MST 2009
Author: dtrotzjr
Date: 2009-01-06 21:01:30 -0700 (Tue, 06 Jan 2009)
New Revision: 197
Modified:
trunk/src/SwordReader_GUI/SRMainFrame.cpp
trunk/src/SwordReader_GUI/SRSubWindow.cpp
trunk/src/SwordReader_GUI/SRTextView.cpp
Log:
More pop-up refinements.
Modified: trunk/src/SwordReader_GUI/SRMainFrame.cpp
===================================================================
--- trunk/src/SwordReader_GUI/SRMainFrame.cpp 2009-01-06 13:21:28 UTC (rev 196)
+++ trunk/src/SwordReader_GUI/SRMainFrame.cpp 2009-01-07 04:01:30 UTC (rev 197)
@@ -390,7 +390,9 @@
mod->setKey(wcsKey.c_str());
mod->RenderText();
SWBuf bufNote = mod->getEntryAttributes()["Footnote"][wcsValue.c_str()]["body"];
- WCString wcsNote = (const TCHAR*)mod->RenderText(bufNote.c_str());
+ WCString wcsNote = "<html><body>";
+ wcsNote += (const TCHAR*)mod->RenderText(bufNote.c_str());
+ wcsNote += "</body></html>";
m_tabViews->ShowBibleNote(wcsNote);
// Send this somewhere and show it...
}else if(wcsURL.contains("showStrongs")){
Modified: trunk/src/SwordReader_GUI/SRSubWindow.cpp
===================================================================
--- trunk/src/SwordReader_GUI/SRSubWindow.cpp 2009-01-06 13:21:28 UTC (rev 196)
+++ trunk/src/SwordReader_GUI/SRSubWindow.cpp 2009-01-07 04:01:30 UTC (rev 197)
@@ -23,10 +23,11 @@
BOOL SRSubWindow::Create(SRWnd *pParentWnd, RECT bounds)
{
RECT rectSub = bounds;
- rectSub.top += 20;
+ rectSub.top += 21;
rectSub.left += 2;
rectSub.right -= 2;
rectSub.bottom -= 2;
+
if(!Register())
return FALSE;
@@ -75,7 +76,11 @@
HDC hdc = BeginPaint(m_hWnd, &ps);
INT nSavedDC = SaveDC(hdc);
+
GetClientRect(m_hWnd, &clientRect);
+ FillRect(hdc, &ps.rcPaint,(HBRUSH)GetStockObject(WHITE_BRUSH));
+ Rectangle(hdc, clientRect.left, clientRect.top, clientRect.right, 20);
+ Rectangle(hdc, clientRect.left, 20, clientRect.right, clientRect.bottom);
HICON icoCl = LoadIcon(m_hInstance, MAKEINTRESOURCE(IDI_CLOSE));
DrawIcon(hdc, clientRect.right - 18, 2, icoCl);
Modified: trunk/src/SwordReader_GUI/SRTextView.cpp
===================================================================
--- trunk/src/SwordReader_GUI/SRTextView.cpp 2009-01-06 13:21:28 UTC (rev 196)
+++ trunk/src/SwordReader_GUI/SRTextView.cpp 2009-01-07 04:01:30 UTC (rev 197)
@@ -811,10 +811,17 @@
m_fDragging = FALSE;
ReleaseCapture();
}
-
+ INT test, assigned;
+ if(!fMouseDown){
+ test = (GetTickCount() - m_dwClickTime) < 120;
+ }
// If we are absolutely positive the user wants to click...
- if(!fMouseDown && !mouseMoved && (GetTickCount() - m_dwClickTime) < 120)
+ if(!fMouseDown && !mouseMoved && ((GetTickCount() - m_dwClickTime) < 120)){
GetWordAtPoint(xPos, yPos);
+ assigned = test;
+ }
+ if(!fMouseDown)
+ assigned = test;
m_ptLastClick = pt;
// If there is a velocity set this will use it up, otherwise it drops out nicely.
@@ -836,7 +843,7 @@
while(pbtWord->m_lpszWord && pbtWord->m_rect.right < pt.x)
pbtWord = pbtWord->m_lpNextWord;
if(pbtWord->m_lpszWord){
- if(pbtWord->m_dwlfFontState & BTEXT_HTML_A_BEG && pbtWord->m_lpszHref){
+ if((pbtWord->m_dwlfFontState & BTEXT_HTML_A_BEG) && pbtWord->m_lpszHref){
wcsncpy(szWordFound, pbtWord->m_lpszHref, pbtWord->m_dwHrefLen);
::SendMessage(m_pParentWnd->GetWindowHandle(), WM_COMMAND, (SR_MSRC_TEXT << 16) | SR_HYPERLINK_CLICKED, (LPARAM)szWordFound);
}/*else{
More information about the sword-cvs
mailing list