diff options
author | Oliver Bolte <obo@openoffice.org> | 2006-07-10 15:30:23 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2006-07-10 15:30:23 +0000 |
commit | 15d1b65c3be745d63be1666deea41a9f0b36c19b (patch) | |
tree | 6192772dce57498e8d73107171f9928f5be5fc9b /psprint/source | |
parent | 79a32a4256dbc6d1daa3a2246193c8e9fb924827 (diff) |
INTEGRATION: CWS vcl60 (1.16.6); FILE MERGED
2006/06/27 09:16:15 pl 1.16.6.2: RESYNC: (1.16-1.17); FILE MERGED
2006/06/20 11:20:17 pl 1.16.6.1: #i62663# method to wait on asynchronous printer detection
Diffstat (limited to 'psprint/source')
-rw-r--r-- | psprint/source/printer/cupsmgr.cxx | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/psprint/source/printer/cupsmgr.cxx b/psprint/source/printer/cupsmgr.cxx index b4e45d380dac..190088e71b53 100644 --- a/psprint/source/printer/cupsmgr.cxx +++ b/psprint/source/printer/cupsmgr.cxx @@ -4,9 +4,9 @@ * * $RCSfile: cupsmgr.cxx,v $ * - * $Revision: 1.17 $ + * $Revision: 1.18 $ * - * last change: $Author: hr $ $Date: 2006-06-19 10:25:55 $ + * last change: $Author: obo $ $Date: 2006-07-10 16:30:23 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -861,9 +861,19 @@ void CUPSManager::changePrinterInfo( const OUString& rPrinter, const PrinterInfo PrinterInfoManager::changePrinterInfo( rPrinter, rNewInfo ); } -bool CUPSManager::checkPrintersChanged() +bool CUPSManager::checkPrintersChanged( bool bWait ) { bool bChanged = false; + if( bWait && m_aDestThread ) + { + #if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "syncing cups discovery thread\n" ); + #endif + osl_joinWithThread( m_aDestThread ); + #if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "done: syncing cups discovery thread\n" ); + #endif + } if( m_aCUPSMutex.tryToAcquire() ) { bChanged = m_bNewDests; @@ -872,7 +882,7 @@ bool CUPSManager::checkPrintersChanged() if( ! bChanged ) { - bChanged = PrinterInfoManager::checkPrintersChanged(); + bChanged = PrinterInfoManager::checkPrintersChanged( bWait ); // #i54375# ensure new merging with CUPS list in :initialize if( bChanged ) m_bNewDests = true; |