Mercurial > dwindows
diff os2/dw.c @ 1400:ccd383e11ff8
Allow removing of tooltips by passing NULL or "" and prevent double tooltips on some platforms.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sun, 27 Nov 2011 20:28:15 +0000 |
parents | 152e3c8916de |
children | 56f311dc23f6 |
line wrap: on
line diff
--- a/os2/dw.c Sun Nov 27 12:08:05 2011 +0000 +++ b/os2/dw.c Sun Nov 27 20:28:15 2011 +0000 @@ -6393,13 +6393,14 @@ { HWND buddy = (HWND)dw_window_get_data(handle, "_dw_comboentry"); WindowData *blah = (WindowData *)WinQueryWindowPtr(buddy ? buddy : handle, QWP_USER); + char *text = bubbletext ? bubbletext : ""; buddy = (HWND)dw_window_get_data(handle, "_dw_buddy"); if(blah) - strncpy(blah->bubbletext, bubbletext, BUBBLE_HELP_MAX - 1); + strncpy(blah->bubbletext, text, BUBBLE_HELP_MAX - 1); if(buddy && (blah = (WindowData *)WinQueryWindowPtr(buddy, QWP_USER))) - strncpy(blah->bubbletext, bubbletext, BUBBLE_HELP_MAX - 1); + strncpy(blah->bubbletext, text, BUBBLE_HELP_MAX - 1); } /*