diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2008-08-18 12:31:36 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2008-08-18 12:31:36 +0000 |
commit | 80bee155e507385febb6d70d4715c9757f21a867 (patch) | |
tree | 2138c345888e7b3bfba9e29dc3dc6bbb2ddc25bd | |
parent | 8e970444e6944b11d30e68d40e607cc5d093a652 (diff) |
INTEGRATION: CWS aquaupdateicon (1.18.68); FILE MERGED
2008/07/31 13:50:09 pl 1.18.68.1: #i92043# some adaptions for the mac
-rw-r--r-- | extensions/source/update/ui/updatecheckui.cxx | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx index 692cd933a929..027231775bca 100644 --- a/extensions/source/update/ui/updatecheckui.cxx +++ b/extensions/source/update/ui/updatecheckui.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: updatecheckui.cxx,v $ - * $Revision: 1.18 $ + * $Revision: 1.19 $ * * This file is part of OpenOffice.org. * @@ -59,6 +59,7 @@ #include <vcl/settings.hxx> #include <vcl/svapp.hxx> #include <sfx2/sfx.hrc> +#include "rtl/ustrbuf.hxx" #include "updatecheckui.hrc" @@ -389,9 +390,21 @@ void UpdateCheckUI::AddMenuBarIcon( SystemWindow *pSysWin, bool bAddEventHdl ) if ( pActiveMBar ) { + rtl::OUStringBuffer aBuf; + if( maBubbleTitle.getLength() ) + aBuf.append( maBubbleTitle ); + if( maBubbleText.getLength() ) + { + if( maBubbleTitle.getLength() ) + aBuf.appendAscii( "\n\n" ); + aBuf.append( maBubbleText ); + } + Image aImage = GetMenuBarIcon( pActiveMBar ); mnIconID = pActiveMBar->AddMenuBarButton( aImage, - LINK( this, UpdateCheckUI, ClickHdl ) ); + LINK( this, UpdateCheckUI, ClickHdl ), + aBuf.makeStringAndClear() + ); pActiveMBar->SetMenuBarButtonHighlightHdl( mnIconID, LINK( this, UpdateCheckUI, HighlightHdl ) ); } @@ -571,6 +584,10 @@ BubbleWindow * UpdateCheckUI::GetBubbleWindow() if ( !mpIconSysWin ) return NULL; + Rectangle aIconRect = mpIconMBar->GetMenuBarButtonRectPixel( mnIconID ); + if( aIconRect.IsEmpty() ) + return NULL; + BubbleWindow* pBubbleWin = mpBubbleWin; if ( !pBubbleWin ) { @@ -586,7 +603,6 @@ BubbleWindow * UpdateCheckUI::GetBubbleWindow() mbBubbleChanged = false; } - Rectangle aIconRect = mpIconMBar->GetMenuBarButtonRectPixel( mnIconID ); Point aWinPos = aIconRect.BottomCenter(); pBubbleWin->SetTipPosPixel( aWinPos ); |