diff options
author | Max Kellermann <max@duempel.org> | 2013-01-10 19:13:00 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-01-14 09:15:49 +0100 |
commit | e83f805b8fa34db8ac0b885d3fb78c0e6437c908 (patch) | |
tree | 25c78bb3b016875aa9df2ec5449c623148083531 /src/StateFile.cxx | |
parent | be98afe34d550a322adea78f92f1fd2088408e96 (diff) | |
download | mpd-e83f805b8fa34db8ac0b885d3fb78c0e6437c908.tar.gz mpd-e83f805b8fa34db8ac0b885d3fb78c0e6437c908.tar.xz mpd-e83f805b8fa34db8ac0b885d3fb78c0e6437c908.zip |
Main, IOThread: move GMainLoop setup code to class EventLoop
Diffstat (limited to 'src/StateFile.cxx')
-rw-r--r-- | src/StateFile.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
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 <glib.h> #include <assert.h> @@ -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 |