Whitespace.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6242 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2003-02-25 12:33:33 +00:00
parent 6ea60cf308
commit 51ad0ec92f
4 changed files with 18 additions and 18 deletions

View File

@ -30,12 +30,12 @@ LoaderQueue & LoaderQueue::get()
}
void LoaderQueue::loadNext()
void LoaderQueue::loadNext()
{
emptyBucket();
lyxerr[Debug::GRAPHICS] << "LoaderQueue: "
<< cache_queue_.size()
<< " items in the queue" << endl;
<< " items in the queue" << endl;
int counter = s_numimages_;
while (cache_queue_.size() && counter--) {
if(cache_queue_.front()->status() == WaitingToLoad)
@ -57,21 +57,21 @@ void LoaderQueue::setPriority(int numimages , int millisecs)
s_millisecs_ = millisecs;
lyxerr[Debug::GRAPHICS] << "LoaderQueue: priority set to "
<< s_numimages_ << " images at a time, "
<< s_millisecs_ << " milliseconds between calls"
<< s_millisecs_ << " milliseconds between calls"
<< endl;
}
LoaderQueue::LoaderQueue() : timer(s_millisecs_, Timeout::ONETIME),
LoaderQueue::LoaderQueue() : timer(s_millisecs_, Timeout::ONETIME),
running_(false)
{
timer.timeout.connect(boost::bind(&LoaderQueue::loadNext, this));
}
void LoaderQueue::emptyBucket()
{
lyxerr[Debug::GRAPHICS] << "LoaderQueue: emptying bucket"
lyxerr[Debug::GRAPHICS] << "LoaderQueue: emptying bucket"
<< endl;
while (! bucket_.empty()) {
addToQueue(bucket_.front());
@ -114,15 +114,15 @@ void LoaderQueue::touch(Cache::ItemPtr const & item)
void LoaderQueue::addToQueue(Cache::ItemPtr const & item)
{
if (! cache_set_.insert(item).second) {
list<Cache::ItemPtr>::iterator
list<Cache::ItemPtr>::iterator
it = cache_queue_.begin();
list<Cache::ItemPtr>::iterator
list<Cache::ItemPtr>::iterator
end = cache_queue_.end();
it = std::find(it, end, item);
if (it != end)
cache_queue_.erase(it);
}
}
cache_queue_.push_front(item);
}

View File

@ -6,11 +6,11 @@
*
* \author Alfredo Braunstein
*
* Full author contact details are available in file CREDITS.
* Full author contact details are available in file CREDITS.
*
* This implements a threaded service queue which loads images on background.
* In order to request an image loading you call touch() with the pointer to
* the cached image. Then it will try to satisfy the request as soon as
* the cached image. Then it will try to satisfy the request as soon as
* posible (that's it: after finishing an eventual loading on progress)
* touch() returns inmediately, in order not tu disrupt the flow of the main
* thread.

View File

@ -543,9 +543,9 @@ void PreviewLoader::Impl::finishedGenerating(pid_t pid, int retval)
in_progress_.erase(git);
// Tell the outside world
std::list<PreviewImagePtr>::const_reverse_iterator
std::list<PreviewImagePtr>::const_reverse_iterator
nit = newimages.rbegin();
std::list<PreviewImagePtr>::const_reverse_iterator
std::list<PreviewImagePtr>::const_reverse_iterator
nend = newimages.rend();
for (; nit != nend; ++nit) {
imageReady(*nit->get());

View File

@ -17,20 +17,20 @@
#include <pwd.h>
#include <unistd.h>
#include <sys/types.h>
namespace lyx {
string const user_name()
{
struct passwd * pw(getpwuid(geteuid()));
lyx::Assert(pw);
string name = pw->pw_gecos;
if (name.empty())
name = pw->pw_name;
return name;
}
string const user_email()
{