Commited as you have requested.

Thomas

On Thu, 11 Jan 2001, Mike Nordell wrote:

> Gediminas Paulauskas wrote:
> > My friend, using Abi on Windows, has noticed a strange crash -- when
> holding
> > over some of toolbar buttons for some time, instead of showing a tooltip,
> > abi crashes. He noticed, that this is true only on items, whose
> szStatusMsg
> > is "", i.e. empty. As I understand the comment in ap_TB_LabelSet_lt-LT.h
> > file, if this field is blank (""), the default should be shown (from the
> > corresponding menu entry). But it just shows nthing in such items.
> 
> As the code looks today, it tries to display the status message, but in the
> lt-LT l18n it's null, not "" (empty string) and the code apparently didn't
> handle this case.
> 
> Since my sources are a bit in flux right now (I'm adding bitmap cleanup code
> to the win32 toolbar class) could someone please committ the following?
> Thanks.
> 
> af/ev/win/wv_Win32Toolbar.cpp
> 20 lines from the end of this file, in function getToolTip, it reads
> 
>     // here 'tis
>     strncpy(lpttt->lpszText, szToolTip, 80);
> 
> Please replace those two lines with:
> 
>     if (!szToolTip || !*szToolTip)
>     {
>         szToolTip = pLabel->getToolbarLabel();
>     }
> 
>     if (szToolTip && *szToolTip)
>     {
>         // here 'tis
>         strncpy(lpttt->lpszText, szToolTip, 80);
>     }
>     else
>     {
>         lpttt->lpszText[0] = '\0';
>     }
> 
> 
> That takes care of it.
> 
> /Mike
> 
> 

-------------------------------------------------------------
Thomas (toe-mah) Fletcher       QNX Software Systems
[EMAIL PROTECTED]                 Neutrino Development Group
(613)-591-0931                  http://www.qnx.com/~thomasf


Reply via email to