SF.net SVN: geany: [2632] trunk/src/utils.c

ntrel at users.sourceforge.net ntrel at xxxxx
Mon Jun 2 15:51:11 UTC 2008


Revision: 2632
          http://geany.svn.sourceforge.net/geany/?rev=2632&view=rev
Author:   ntrel
Date:     2008-06-02 08:50:56 -0700 (Mon, 02 Jun 2008)

Log Message:
-----------
Reload a changed document immediately on user clicking reload
(waiting was not related to the now fixed reload-colourise problem).

Modified Paths:
--------------
    trunk/src/utils.c

Modified: trunk/src/utils.c
===================================================================
--- trunk/src/utils.c	2008-06-02 15:31:59 UTC (rev 2631)
+++ trunk/src/utils.c	2008-06-02 15:50:56 UTC (rev 2632)
@@ -278,19 +278,6 @@
 }
 
 
-static gboolean reload_idx(gpointer data)
-{
-	gint idx = GPOINTER_TO_INT(data);
-
-	/* check idx is still valid now we're idle, in case it was closed */
-	if (DOC_IDX_VALID(idx))
-	{
-		document_reload_file(idx, NULL);
-	}
-	return FALSE;
-}
-
-
 static gboolean check_reload(gint idx)
 {
 	gchar *base_name = g_path_get_basename(documents[idx]->file_name);
@@ -302,10 +289,7 @@
 			"the current buffer."), base_name);
 	if (want_reload)
 	{
-		/* delay reloading because we need to wait for any pending scintilla messages
-		 * to be processed, otherwise the reloaded document might not be colourised
-		 * properly */
-		g_idle_add(reload_idx, GINT_TO_POINTER(idx));
+		document_reload_file(idx, NULL);
 	}
 	g_free(base_name);
 	return want_reload;
@@ -343,7 +327,7 @@
 	{
 		if (check_reload(idx))
 		{
-			/* Disable checking until after reload, so ignore this change for now */
+			/* Update the modification time */
 			documents[idx]->mtime = st.st_mtime;
 		}
 		else


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list