From 83de0ccdec4ec2b4e69b2334500c3809ca904291 Mon Sep 17 00:00:00 2001 From: Philippe Saint-Pierre Date: Mon, 11 Jan 2010 00:53:22 +0000 Subject: [PATCH] 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 --- src/apps/launchbox/LaunchButton.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/apps/launchbox/LaunchButton.cpp b/src/apps/launchbox/LaunchButton.cpp index 86107930a1..653181625e 100644 --- a/src/apps/launchbox/LaunchButton.cpp +++ b/src/apps/launchbox/LaunchButton.cpp @@ -379,7 +379,8 @@ LaunchButton::_UpdateToolTip() if (fRef) { BString helper(fRef->name); if (fDescription.CountChars() > 0) { - helper << "\n\n" << fDescription.String(); + if (fDescription != helper) + helper << "\n\n" << fDescription.String(); } else { BFile file(fRef, B_READ_ONLY); BAppFileInfo appFileInfo; @@ -387,7 +388,8 @@ LaunchButton::_UpdateToolTip() if (appFileInfo.SetTo(&file) == B_OK && appFileInfo.GetVersionInfo(&info, 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; } }