Fixed FEN does not emit attribute changed events when optimizing changed

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.


svn path=/trunk/; revision=6743
This commit is contained in:
Lin Ma 2008-03-20 09:40:28 +00:00 committed by Lin Ma
parent 908d3ef0d4
commit 50556ee0a5
4 changed files with 31 additions and 4 deletions

View File

@ -1,3 +1,10 @@
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.
2008-03-19 Matthias Clasen <mclasen@redhat.com>
* gmountoperation.[hc]: Small documentation additions

View File

@ -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 @@ process_events (gpointer udata)
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 @@ fdata_add_event (fdata *f, fnode_event_t *ev)
} 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);

View File

@ -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);

View File

@ -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