summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2009-01-06 16:30:03 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2009-01-06 16:30:03 +0000
commitc9c843ab6fc04924d4721e57be0953c29c61f6b0 (patch)
treed9a3fc49222836dd74f38fa1c7ff3b1825f48569 /extensions
parent0cf944e41a1148ce17be52db890f732e6b2886f8 (diff)
CWS-TOOLING: integrate CWS dv05
2008-12-12 11:36:32 +0100 dv r265399 : #i93992# Reverted changes made for this issues 2008-12-11 10:22:09 +0100 dv r265252 : #i96735# the check for existance of the online update module needs to catch exceptions! 2008-12-10 13:28:32 +0100 dv r265179 : CWS-TOOLING: rebase CWS dv05 to trunk@264807 (milestone: DEV300:m37) 2008-12-09 11:38:53 +0100 dv r265069 : #i94154#: migrate CWS dv05 to SVN.
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/update/check/download.cxx8
-rw-r--r--extensions/source/update/check/updatecheck.cxx15
-rw-r--r--extensions/source/update/check/updatecheck.hxx5
-rw-r--r--extensions/source/update/check/updatehdl.cxx4
-rw-r--r--extensions/source/update/ui/updatecheckui.cxx20
5 files changed, 37 insertions, 15 deletions
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<UpdateHandler> 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 )