Launchbox was displaying the description of the application into its tooltips

even if it meant displaying the same label twice.

Fixes bug #5233.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35002 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Philippe Saint-Pierre 2010-01-11 00:53:22 +00:00
parent f175afefc3
commit 83de0ccdec
1 changed files with 4 additions and 2 deletions

View File

@ -379,7 +379,8 @@ LaunchButton::_UpdateToolTip()
if (fRef) { if (fRef) {
BString helper(fRef->name); BString helper(fRef->name);
if (fDescription.CountChars() > 0) { if (fDescription.CountChars() > 0) {
helper << "\n\n" << fDescription.String(); if (fDescription != helper)
helper << "\n\n" << fDescription.String();
} else { } else {
BFile file(fRef, B_READ_ONLY); BFile file(fRef, B_READ_ONLY);
BAppFileInfo appFileInfo; BAppFileInfo appFileInfo;
@ -387,7 +388,8 @@ LaunchButton::_UpdateToolTip()
if (appFileInfo.SetTo(&file) == B_OK if (appFileInfo.SetTo(&file) == B_OK
&& appFileInfo.GetVersionInfo(&info, && appFileInfo.GetVersionInfo(&info,
B_APP_VERSION_KIND) == B_OK B_APP_VERSION_KIND) == B_OK
&& strlen(info.short_info) > 0) { && strlen(info.short_info) > 0
&& helper.Compare(info.short_info) != 0) {
helper << "\n\n" << info.short_info; helper << "\n\n" << info.short_info;
} }
} }