[devhelp] Book: better listen to events for index file monitoring
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devhelp] Book: better listen to events for index file monitoring
- Date: Sun, 10 Dec 2017 12:53:25 +0000 (UTC)
commit 741368e9d1387f089b2dfaaf32d2aa28137241f9
Author: Sébastien Wilmet <swilmet gnome org>
Date: Sun Dec 10 13:33:54 2017 +0100
Book: better listen to events for index file monitoring
- The code was not listening to CHANGED events.
- I think that CHANGES_DONE_HINT can be emitted also after DELETED, so
the code was not correct. The API documentation is not really clear.
src/dh-book.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/src/dh-book.c b/src/dh-book.c
index e1deca9..b9fa068 100644
--- a/src/dh-book.c
+++ b/src/dh-book.c
@@ -246,11 +246,10 @@ index_file_changed_cb (GFileMonitor *file_monitor,
gboolean reset_timeout = FALSE;
/* CREATED may happen if the file is deleted and then created right
- * away, as we're merging events. Treat in the same way as a
- * CHANGES_DONE_HINT.
+ * away, as we're merging events.
*/
- if (event_type == G_FILE_MONITOR_EVENT_CREATED ||
- event_type == G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT) {
+ if (event_type == G_FILE_MONITOR_EVENT_CHANGED ||
+ event_type == G_FILE_MONITOR_EVENT_CREATED) {
priv->monitor_event = BOOK_MONITOR_EVENT_UPDATED;
reset_timeout = TRUE;
} else if (event_type == G_FILE_MONITOR_EVENT_DELETED) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]