Revision: 3506 http://geany.svn.sourceforge.net/geany/?rev=3506&view=rev Author: eht16 Date: 2009-01-24 19:38:53 +0000 (Sat, 24 Jan 2009)
Log Message: ----------- Disable GIO based file monitoring for now since it doesn't work yet as stable as it should. Define USE_GIO_FILEMON to use.
Modified Paths: -------------- trunk/ChangeLog trunk/src/document.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-01-24 19:38:31 UTC (rev 3505) +++ trunk/ChangeLog 2009-01-24 19:38:53 UTC (rev 3506) @@ -4,6 +4,8 @@ Use g_timeout_add_seconds() instead of g_timeout_add(). Add missing NULL check in monitor_file_changed_cb(). Reset the file status when saving a file failed. + Disable GIO based file monitoring for now since it doesn't work yet + as stable as it should. Define USE_GIO_FILEMON to use.
2009-01-22 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/document.c =================================================================== --- trunk/src/document.c 2009-01-24 19:38:31 UTC (rev 3505) +++ trunk/src/document.c 2009-01-24 19:38:53 UTC (rev 3506) @@ -47,7 +47,10 @@ /* gstdio.h also includes sys/stat.h */ #include <glib/gstdio.h>
-#ifdef HAVE_GIO +/* uncomment to use GIO based file monitoring, though it is not completely stable yet */ +/* #define USE_GIO_FILEMON 1 */ + +#if defined(HAVE_GIO) && defined(USE_GIO_FILEMON) # include <gio/gio.h> #endif
@@ -386,7 +389,7 @@ }
-#ifdef HAVE_GIO +#if defined(HAVE_GIO) && defined(USE_GIO_FILEMON) /* Set the file status to 'changed' after a single 'created' event. */ static gboolean monitor_finish_pending_create(gpointer doc) { @@ -504,7 +507,7 @@ * doesn't work at all for remote files and legacy polling is too slow. */ if (! doc->priv->is_remote) { -#ifdef HAVE_GIO +#if defined(HAVE_GIO) && defined(USE_GIO_FILEMON) gchar *locale_filename; GFile *file;
@@ -723,7 +726,7 @@ sci_set_undo_collection(doc->editor->sci, TRUE); sci_empty_undo_buffer(doc->editor->sci);
-#ifndef HAVE_GIO +#if ! defined(HAVE_GIO) || ! defined(USE_GIO_FILEMON) doc->priv->mtime = time(NULL); #endif
@@ -1403,7 +1406,7 @@ pos = sci_get_current_position(doc->editor->sci); new_doc = document_open_file_full(doc, NULL, pos, doc->readonly, doc->file_type, forced_enc); -#ifdef HAVE_GIO +#if defined(HAVE_GIO) && defined(USE_GIO_FILEMON) if (new_doc != NULL) { doc->priv->file_disk_status = FILE_IGNORE; @@ -1418,7 +1421,7 @@
static gboolean document_update_timestamp(GeanyDocument *doc, const gchar *locale_filename) { -#ifndef HAVE_GIO +#if ! defined(HAVE_GIO) || ! defined(USE_GIO_FILEMON) struct stat st;
g_return_val_if_fail(doc != NULL, FALSE); @@ -2835,7 +2838,7 @@ static time_t monitor_check_status_real(GeanyDocument *doc, gboolean force) { time_t t = 0; -#ifndef HAVE_GIO +#if ! defined(HAVE_GIO) || ! defined(USE_GIO_FILEMON) struct stat st; gchar *locale_filename;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.