diff options
-rw-r--r-- | extensions/source/update/check/download.cxx | 10 | ||||
-rw-r--r-- | extensions/source/update/check/updatecheck.cxx | 17 | ||||
-rw-r--r-- | extensions/source/update/check/updatecheck.hxx | 5 | ||||
-rw-r--r-- | extensions/source/update/check/updatehdl.cxx | 4 | ||||
-rw-r--r-- | extensions/source/update/ui/updatecheckui.cxx | 20 |
5 files changed, 39 insertions, 17 deletions
diff --git a/extensions/source/update/check/download.cxx b/extensions/source/update/check/download.cxx index cbe6e69cd..3cf77ac18 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. * @@ -364,9 +364,11 @@ 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 6a718a905..9ef37366e 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; + } } } @@ -1381,7 +1384,13 @@ 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<UpdateHandler> aUpdateHandler(getUpdateHandler()); OSL_ASSERT( aUpdateHandler.is() ); diff --git a/extensions/source/update/check/updatecheck.hxx b/extensions/source/update/check/updatecheck.hxx index 5f556340f..26337230d 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 aa818bf09..d75386bf7 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 d43c21982..8c673ccbc 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 ) |