glib r6743 - in trunk/gio: . fen
- From: linma svn gnome org
- To: svn-commits-list gnome org
- Subject: glib r6743 - in trunk/gio: . fen
- Date: Thu, 20 Mar 2008 09:40:28 +0000 (GMT)
Author: linma
Date: Thu Mar 20 09:40:28 2008
New Revision: 6743
URL: http://svn.gnome.org/viewvc/glib?rev=6743&view=rev
Log:
2008-03-20 Lin Ma <Lin Ma Sun COM>
* fen/fen-data.c: (process_events), (fdata_add_event): Fixed FEN does
not emit attribute changed events when optimizing changed events.
* fen/fen-helper.c, fen/fen-kernel.c: Added ifdef to default disable
warning messages.
Modified:
trunk/gio/ChangeLog
trunk/gio/fen/fen-data.c
trunk/gio/fen/fen-helper.c
trunk/gio/fen/fen-kernel.c
Modified: trunk/gio/fen/fen-data.c
==============================================================================
--- trunk/gio/fen/fen-data.c (original)
+++ trunk/gio/fen/fen-data.c Thu Mar 20 09:40:28 2008
@@ -43,7 +43,11 @@
#define BASE_NUM 2
#define FD_W if (fd_debug_enabled) g_warning
+#ifdef GIO_COMPILATION
static gboolean fd_debug_enabled = FALSE;
+#else
+static gboolean fd_debug_enabled = TRUE;
+#endif
G_LOCK_EXTERN (fen_lock);
static GList *deleting_data = NULL;
@@ -557,8 +561,16 @@
g_assert (f->change_update_id > 0);
}
break;
- case FILE_ATTRIB: /* Ignored */
- case FILE_DELETE:
+ case FILE_ATTRIB:
+ g_assert (f->change_update_id == 0);
+ if (!port_add (&f->fobj, &f->len, f)) {
+ ev = fnode_event_new (FILE_DELETE, FALSE, f);
+ if (ev != NULL) {
+ fdata_add_event (f, ev);
+ }
+ }
+ break;
+ case FILE_DELETE: /* Ignored */
break;
default:
g_assert_not_reached ();
@@ -651,10 +663,10 @@
} else {
break;
}
- } else if (tail->e == FILE_ATTRIB && ev->e == FILE_MODIFIED) {
+ } else if (ev->e == FILE_MODIFIED && tail->e == FILE_ATTRIB) {
ev->has_twin = TRUE;
fnode_event_delete (tail);
- } else if (ev->e == FILE_ATTRIB) {
+ } else if (ev->e == FILE_ATTRIB && f->change_update_id > 0) {
tail->has_twin = TRUE;
/* skip the current event */
fnode_event_delete (ev);
Modified: trunk/gio/fen/fen-helper.c
==============================================================================
--- trunk/gio/fen/fen-helper.c (original)
+++ trunk/gio/fen/fen-helper.c Thu Mar 20 09:40:28 2008
@@ -35,7 +35,11 @@
#endif
#define FH_W if (fh_debug_enabled) g_warning
+#ifdef GIO_COMPILATION
static gboolean fh_debug_enabled = FALSE;
+#else
+static gboolean fh_debug_enabled = TRUE;
+#endif
G_LOCK_EXTERN (fen_lock);
Modified: trunk/gio/fen/fen-kernel.c
==============================================================================
--- trunk/gio/fen/fen-kernel.c (original)
+++ trunk/gio/fen/fen-kernel.c Thu Mar 20 09:40:28 2008
@@ -33,7 +33,11 @@
#include "fen-dump.h"
#define FK_W if (fk_debug_enabled) g_warning
+#ifdef GIO_COMPILATION
static gboolean fk_debug_enabled = FALSE;
+#else
+static gboolean fk_debug_enabled = TRUE;
+#endif
G_GNUC_INTERNAL G_LOCK_DEFINE (fen_lock);
#define PE_ALLOC 64
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]