From e83f805b8fa34db8ac0b885d3fb78c0e6437c908 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 10 Jan 2013 19:13:00 +0100 Subject: Main, IOThread: move GMainLoop setup code to class EventLoop --- src/StateFile.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/StateFile.cxx') diff --git a/src/StateFile.cxx b/src/StateFile.cxx index 29a560c75..a153a6263 100644 --- a/src/StateFile.cxx +++ b/src/StateFile.cxx @@ -24,6 +24,8 @@ #include "TextFile.hxx" #include "Partition.hxx" #include "Volume.hxx" +#include "Main.hxx" +#include "event/Loop.hxx" #include #include @@ -137,9 +139,9 @@ state_file_init(const char *path, Partition &partition) state_file_path = g_strdup(path); state_file_read(partition); - save_state_source_id = g_timeout_add_seconds(5 * 60, - timer_save_state_file, - &partition); + save_state_source_id = + main_loop->AddTimeoutSeconds(5 * 60, timer_save_state_file, + &partition); } void -- cgit v1.2.3