comctl32/tooltips.c
Ulrich Czekalla
ulrich.czekalla at utoronto.ca
Thu Aug 19 10:09:53 CDT 2004
ChangeLog:
Ulrich Czekalla <ulrich at codeweavers.com>
Clear tooltip when text is set to NULL
Repaint tooltip when item info changes
-------------- next part --------------
Index: dlls/comctl32/tooltips.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/tooltips.c,v
retrieving revision 1.66
diff -u -r1.66 tooltips.c
--- dlls/comctl32/tooltips.c 12 Aug 2004 20:27:01 -0000 1.66
+++ dlls/comctl32/tooltips.c 19 Aug 2004 15:03:22 -0000
@@ -323,7 +323,7 @@
{
TTTOOL_INFO *toolPtr = &infoPtr->tools[nTool];
- if (HIWORD((UINT)toolPtr->lpszText) == 0) {
+ if (HIWORD((UINT)toolPtr->lpszText) == 0 && toolPtr->hinst) {
/* load a resource */
TRACE("load res string %p %x\n",
toolPtr->hinst, (int)toolPtr->lpszText);
@@ -1720,6 +1720,10 @@
KillTimer(hwnd, ID_TIMERPOP);
SetTimer(hwnd, ID_TIMERPOP, infoPtr->nAutoPopTime, 0);
TRACE("timer 2 restarted\n");
+ } else if(infoPtr->nTool != -1 && infoPtr->bActive) {
+ /* previous show attempt didn't result in tooltip so try again */
+ SetTimer(hwnd, ID_TIMERSHOW, infoPtr->nInitialTime, 0);
+ TRACE("timer 1 started!\n");
}
break;
}
@@ -1907,7 +1911,7 @@
TRACE("set string id %x!\n", (INT)lpToolInfo->lpszText);
toolPtr->lpszText = lpToolInfo->lpszText;
}
- else if (lpToolInfo->lpszText) {
+ else {
if (lpToolInfo->lpszText == LPSTR_TEXTCALLBACKW)
toolPtr->lpszText = LPSTR_TEXTCALLBACKW;
else {
@@ -1926,6 +1930,16 @@
if (lpToolInfo->cbSize >= sizeof(TTTOOLINFOW))
toolPtr->lParam = lpToolInfo->lParam;
+
+ if (infoPtr->nCurrentTool == nTool)
+ {
+ TOOLTIPS_GetTipText (hwnd, infoPtr, infoPtr->nCurrentTool);
+
+ if (infoPtr->szTipText[0] == 0)
+ TOOLTIPS_Hide(hwnd, infoPtr);
+ else
+ TOOLTIPS_Show (hwnd, infoPtr);
+ }
return 0;
}
More information about the wine-patches
mailing list