lyx_mirror/src/frontends/gnome/Timeout_pimpl.C
Baruch Even bed3713ff0 Fixed compilation problems.
Added infrastructure for MVC dialogs and implemented FormUrl as an MVC dialog.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1841 a592a061-630c-0410-9148-cb99ea01b6c8
2001-03-28 11:14:05 +00:00

57 lines
766 B
C

/**
* \file Timeout_pimpl.C
* Copyright 2001 LyX Team
* Read COPYING
*
* \author Baruch Even
*/
#include <config.h>
#ifdef __GNUG__
#pragma implementation
#endif
#include <gnome--/main.h>
#include "Timeout_pimpl.h"
#include "debug.h"
Timeout::Pimpl::Pimpl(Timeout * owner)
: owner_(owner)
{
}
void Timeout::Pimpl::reset()
{
stop();
}
void Timeout::Pimpl::start()
{
if (conn_.connected()) {
lyxerr << "Timeout::start: already running!" << std::endl;
stop();
}
conn_ = Gnome::Main::timeout.connect(
SigC::slot(this, &Timeout::Pimpl::timeoutEvent),
owner_->timeout_ms
);
}
void Timeout::Pimpl::stop()
{
conn_.disconnect();
}
gint Timeout::Pimpl::timeoutEvent()
{
owner_->emit();
return 0; // discontinue emitting timeouts.
}