summaryrefslogtreecommitdiff
path: root/examples/thread/dispatcher.cc
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@usa.net>2004-02-10 14:26:07 +0000
committerMurray Cumming <murrayc@src.gnome.org>2004-02-10 14:26:07 +0000
commitfc8dea9ce4bcf8963ccf0022c2493143406e3fc9 (patch)
tree919c768fb9ed0f6c0f6c27b2acd687bc0bbfe387 /examples/thread/dispatcher.cc
parent81738d5465fee36af441e6a0cbe5ffcd1b874f8b (diff)
downloadglibmm-fc8dea9ce4bcf8963ccf0022c2493143406e3fc9.tar.gz
glibmm now uses libsigc++ 2 instead of libsigc++ 1.2. See bug #125061 for
2004-02-10 Murray Cumming <murrayc@usa.net> * glibmm now uses libsigc++ 2 instead of libsigc++ 1.2. See bug #125061 for more details. We must update CHANGES later.
Diffstat (limited to 'examples/thread/dispatcher.cc')
-rw-r--r--examples/thread/dispatcher.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/thread/dispatcher.cc b/examples/thread/dispatcher.cc
index 3971be8c..cfbd7c01 100644
--- a/examples/thread/dispatcher.cc
+++ b/examples/thread/dispatcher.cc
@@ -20,7 +20,7 @@ namespace
{
Glib::RefPtr<Glib::MainLoop> main_loop;
-class ThreadProgress : public SigC::Object
+class ThreadProgress : public sigc::trackable
{
public:
ThreadProgress(int id, Glib::Mutex& mtx);
@@ -28,7 +28,7 @@ public:
void launch();
- typedef SigC::Signal1<void, ThreadProgress*> type_signal_finished;
+ typedef sigc::signal<void, ThreadProgress*> type_signal_finished;
type_signal_finished& signal_finished();
int id() const;
@@ -44,7 +44,7 @@ private:
};
//TODO: Rename to avoid confusion with Glib::Dispatcher.
-class Dispatcher : public SigC::Object
+class Dispatcher : public sigc::trackable
{
public:
Dispatcher();
@@ -65,7 +65,7 @@ ThreadProgress::ThreadProgress(int id, Glib::Mutex& mtx)
progress_ (0), id_ (id), cout_mutex_ (mtx)
{
// Connect to the cross-thread signal.
- signal_increment_.connect(SigC::slot(*this, &ThreadProgress::progress_increment));
+ signal_increment_.connect(sigc::mem_fun(*this, &ThreadProgress::progress_increment));
}
ThreadProgress::~ThreadProgress()
@@ -74,7 +74,7 @@ ThreadProgress::~ThreadProgress()
void ThreadProgress::launch()
{
// Create a non-joinable thread -- it's deleted automatically on thread exit.
- Glib::Thread::create(SigC::slot_class(*this, &ThreadProgress::thread_function), false);
+ Glib::Thread::create(sigc::mem_fun(*this, &ThreadProgress::thread_function), false);
}
ThreadProgress::type_signal_finished& ThreadProgress::signal_finished()
@@ -128,7 +128,7 @@ Dispatcher::Dispatcher()
progress_list_.push_back(progress);
progress->signal_finished().connect(
- SigC::slot(*this, &Dispatcher::on_progress_finished));
+ sigc::mem_fun(*this, &Dispatcher::on_progress_finished));
}
}
@@ -166,7 +166,7 @@ int main(int argc, char** argv)
// Install a one-shot idle handler to launch the threads
Glib::signal_idle().connect(
- SigC::bind_return(SigC::slot(dispatcher, &Dispatcher::launch_threads), false));
+ sigc::bind_return(sigc::mem_fun(dispatcher, &Dispatcher::launch_threads), false));
main_loop->run();