diff options
author | Oliver Bolte <obo@openoffice.org> | 2006-07-10 15:30:50 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2006-07-10 15:30:50 +0000 |
commit | 22680dae3be2860c74efce6246a83b1db613467a (patch) | |
tree | 5257333b6187690a1832a788fb72d64624dcce9b /psprint | |
parent | 15d1b65c3be745d63be1666deea41a9f0b36c19b (diff) |
INTEGRATION: CWS vcl60 (1.33.4); FILE MERGED
2006/06/27 09:16:25 pl 1.33.4.2: RESYNC: (1.33-1.35); FILE MERGED
2006/06/20 11:20:18 pl 1.33.4.1: #i62663# method to wait on asynchronous printer detection
Diffstat (limited to 'psprint')
-rw-r--r-- | psprint/source/printer/printerinfomanager.cxx | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/psprint/source/printer/printerinfomanager.cxx b/psprint/source/printer/printerinfomanager.cxx index 3e198821c25b..8605262c4222 100644 --- a/psprint/source/printer/printerinfomanager.cxx +++ b/psprint/source/printer/printerinfomanager.cxx @@ -4,9 +4,9 @@ * * $RCSfile: printerinfomanager.cxx,v $ * - * $Revision: 1.35 $ + * $Revision: 1.36 $ * - * last change: $Author: hr $ $Date: 2006-06-19 10:26:09 $ + * last change: $Author: obo $ $Date: 2006-07-10 16:30:50 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -129,10 +129,9 @@ PrinterInfoManager::~PrinterInfoManager() // ----------------------------------------------------------------- -bool PrinterInfoManager::checkPrintersChanged() +bool PrinterInfoManager::checkPrintersChanged( bool bWait ) { // check if files were created, deleted or modified since initialize() - ::std::list< WatchFile >::const_iterator it; bool bChanged = false; for( it = m_aWatchFiles.begin(); it != m_aWatchFiles.end() && ! bChanged; ++it ) @@ -156,6 +155,18 @@ bool PrinterInfoManager::checkPrintersChanged() } } } + + if( bWait && m_pQueueInfo ) + { + #if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "syncing printer discovery thread\n" ); + #endif + m_pQueueInfo->join(); + #if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "done: syncing printer discovery thread\n" ); + #endif + } + if( ! bChanged && m_pQueueInfo ) bChanged = m_pQueueInfo->hasChanged(); if( bChanged ) |