diff --git a/extensions/source/update/check/download.cxx b/extensions/source/update/check/download.cxx index 3877de1a2582..eaa16a9f9368 100644 --- a/extensions/source/update/check/download.cxx +++ b/extensions/source/update/check/download.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: download.cxx,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.88.1 $ * * This file is part of OpenOffice.org. * @@ -365,8 +365,10 @@ Download::start(const rtl::OUString& rURL, const rtl::OUString& rFile, const rtl osl_syncFile(out.FileHandle); osl_closeFile(out.FileHandle); - if( ! ret ) - osl_removeFile(out.File.pData); +// #i90930# Don't remove already downloaded bits, when curl_run reports an error +// because later calls might be successful +// if( ! ret ) +// osl_removeFile(out.File.pData); } m_aCondition.reset(); diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx index 1c4eb7191592..d77ef542f3cc 100644 --- a/extensions/source/update/check/updatecheck.cxx +++ b/extensions/source/update/check/updatecheck.cxx @@ -7,7 +7,6 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: updatecheck.cxx,v $ - * $Revision: 1.21.76.1 $ * * This file is part of OpenOffice.org. * @@ -664,10 +663,9 @@ DownloadThread::run() // release config class for now rModel.clear(); + static sal_uInt8 n = 0; if( ! m_aDownload.start(m_aURL, aLocalFile, aDownloadDest ) ) { - static sal_uInt8 n = 0; - // retry every 15s unless the dialog is not visible TimeValue tv; tv.Seconds = 15; @@ -684,6 +682,11 @@ DownloadThread::run() } m_aCondition.wait(&tv); } + else + { + // reset wait period after successful download + n=0; + } } } @@ -1382,6 +1385,12 @@ void UpdateCheck::setUIState(UpdateState eState, bool suppressBubble) m_xMenuBarUI = createMenuBarUI(m_xContext, new MenuBarButtonJob(this)); } + // Show bubble only when the status has changed + if ( eState == m_eUpdateState ) + suppressBubble = true; + else + m_eUpdateState = eState; + rtl::Reference aUpdateHandler(getUpdateHandler()); OSL_ASSERT( aUpdateHandler.is() ); diff --git a/extensions/source/update/check/updatecheck.hxx b/extensions/source/update/check/updatecheck.hxx index 709458ce5dfe..c3a088897860 100644 --- a/extensions/source/update/check/updatecheck.hxx +++ b/extensions/source/update/check/updatecheck.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: updatecheck.hxx,v $ - * $Revision: 1.6 $ + * $Revision: 1.6.70.1 $ * * This file is part of OpenOffice.org. * @@ -67,7 +67,7 @@ class UpdateCheck : public salhelper::ReferenceObject, public rtl::StaticWithInit< rtl::Reference< UpdateCheck >, UpdateCheckInitData > { - UpdateCheck() : m_eState(NOT_INITIALIZED), m_pThread(NULL) {}; + UpdateCheck() : m_eState(NOT_INITIALIZED), m_eUpdateState(UPDATESTATES_COUNT), m_pThread(NULL) {}; public: inline SAL_CALL operator rtl::Reference< UpdateCheckConfigListener > () @@ -170,6 +170,7 @@ private: }; State m_eState; + UpdateState m_eUpdateState; mutable osl::Mutex m_aMutex; WorkerThread *m_pThread; diff --git a/extensions/source/update/check/updatehdl.cxx b/extensions/source/update/check/updatehdl.cxx index 80fa14ac830a..19ca5588c09c 100644 --- a/extensions/source/update/check/updatehdl.cxx +++ b/extensions/source/update/check/updatehdl.cxx @@ -7,7 +7,6 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: updatehdl.cxx,v $ - * $Revision: 1.7.60.1 $ * * This file is part of OpenOffice.org. * @@ -338,7 +337,8 @@ void SAL_CALL UpdateHandler::actionPerformed( awt::ActionEvent const & rEvent ) bool bCancel = true; if ( ( meCurState == UPDATESTATE_DOWNLOADING ) || - ( meCurState == UPDATESTATE_DOWNLOAD_PAUSED ) ) + ( meCurState == UPDATESTATE_DOWNLOAD_PAUSED ) || + ( meCurState == UPDATESTATE_ERROR_DOWNLOADING ) ) bCancel = showWarning( msCancelMessage ); if ( bCancel ) diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx index 027231775bca..c5ac7f485ca4 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.19 $ + * $Revision: 1.19.18.2 $ * * This file is part of OpenOffice.org. * @@ -595,6 +595,7 @@ BubbleWindow * UpdateCheckUI::GetBubbleWindow() XubString( maBubbleTitle ), XubString( maBubbleText ), maBubbleImage ); + mbBubbleChanged = false; } else if ( mbBubbleChanged ) { pBubbleWin->SetTitleAndText( XubString( maBubbleTitle ), @@ -709,13 +710,22 @@ IMPL_LINK( UpdateCheckUI, UserEventHdl, UpdateCheckUI*, EMPTYARG ) Window *pActiveWin = Application::GetActiveTopWindow(); SystemWindow *pActiveSysWin = NULL; - if ( pActiveWin && pActiveWin->IsTopWindow() ) + Window *pBubbleWin = NULL; + if ( mpBubbleWin ) + pBubbleWin = mpBubbleWin; + + if ( pActiveWin && ( pActiveWin != pBubbleWin ) && pActiveWin->IsTopWindow() ) pActiveSysWin = pActiveWin->GetSystemWindow(); - while ( !pActiveSysWin && pTopWin ) { - if ( pTopWin->IsTopWindow() ) + if ( pActiveWin == pBubbleWin ) + pActiveSysWin = NULL; + + while ( !pActiveSysWin && pTopWin ) + { + if ( ( pTopWin != pBubbleWin ) && pTopWin->IsTopWindow() ) pActiveSysWin = pTopWin->GetSystemWindow(); - pTopWin = Application::GetNextTopLevelWindow( pTopWin ); + if ( !pActiveSysWin ) + pTopWin = Application::GetNextTopLevelWindow( pTopWin ); } if ( pActiveSysWin )