SF.net SVN: geany: [2424] trunk

ntrel at users.sourceforge.net ntrel at xxxxx
Thu Mar 27 17:16:53 UTC 2008


Revision: 2424
          http://geany.svn.sourceforge.net/geany/?rev=2424&view=rev
Author:   ntrel
Date:     2008-03-27 10:16:53 -0700 (Thu, 27 Mar 2008)

Log Message:
-----------
Check file on disk for changes (with timeout) when pressing a key.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/keybindings.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2008-03-27 16:45:18 UTC (rev 2423)
+++ trunk/ChangeLog	2008-03-27 17:16:53 UTC (rev 2424)
@@ -12,6 +12,8 @@
    Split document_create_new_sci() into document_create() and
    create_new_sci().
    Rename filename parameter utf8_filename.
+ * src/keybindings.c:
+   Check file on disk for changes (with timeout) when pressing a key.
 
 
 2008-03-26  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>

Modified: trunk/src/keybindings.c
===================================================================
--- trunk/src/keybindings.c	2008-03-27 16:45:18 UTC (rev 2423)
+++ trunk/src/keybindings.c	2008-03-27 17:16:53 UTC (rev 2424)
@@ -842,6 +842,17 @@
 #endif
 
 
+static void check_disk_status(void)
+{
+	gint idx = document_get_cur_idx();
+
+	if (DOC_IDX_VALID(idx))
+	{
+		utils_check_disk_status(idx, FALSE);
+	}
+}
+
+
 /* central keypress event handler, almost all keypress events go to this function */
 gboolean keybindings_got_event(GtkWidget *widget, GdkEventKey *ev, gpointer user_data)
 {
@@ -851,6 +862,8 @@
 	if (ev->keyval == 0)
 		return FALSE;
 
+	check_disk_status();
+
 	keyval = ev->keyval;
     state = ev->state & GEANY_KEYS_MODIFIER_MASK;
 


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