aboutsummaryrefslogtreecommitdiffstats
path: root/src/InotifyQueue.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-10 19:13:00 +0100
committerMax Kellermann <max@duempel.org>2013-01-14 09:15:49 +0100
commite83f805b8fa34db8ac0b885d3fb78c0e6437c908 (patch)
tree25c78bb3b016875aa9df2ec5449c623148083531 /src/InotifyQueue.cxx
parentbe98afe34d550a322adea78f92f1fd2088408e96 (diff)
downloadmpd-e83f805b8fa34db8ac0b885d3fb78c0e6437c908.tar.gz
mpd-e83f805b8fa34db8ac0b885d3fb78c0e6437c908.tar.xz
mpd-e83f805b8fa34db8ac0b885d3fb78c0e6437c908.zip
Main, IOThread: move GMainLoop setup code to class EventLoop
Diffstat (limited to '')
-rw-r--r--src/InotifyQueue.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/InotifyQueue.cxx b/src/InotifyQueue.cxx
index 0d19ff083..b94abeaaa 100644
--- a/src/InotifyQueue.cxx
+++ b/src/InotifyQueue.cxx
@@ -20,6 +20,8 @@
#include "config.h"
#include "InotifyQueue.hxx"
#include "UpdateGlue.hxx"
+#include "Main.hxx"
+#include "event/Loop.hxx"
#include <list>
#include <string>
@@ -93,8 +95,9 @@ mpd_inotify_enqueue(const char *uri_utf8)
{
if (queue_source_id != 0)
g_source_remove(queue_source_id);
- queue_source_id = g_timeout_add_seconds(INOTIFY_UPDATE_DELAY_S,
- mpd_inotify_run_update, NULL);
+ queue_source_id = main_loop->AddTimeoutSeconds(INOTIFY_UPDATE_DELAY_S,
+ mpd_inotify_run_update,
+ nullptr);
for (auto i = inotify_queue.begin(), end = inotify_queue.end();
i != end;) {