Check file on disk for changes (with timeout) when pressing a key.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2424 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2008-03-27 17:16:53 +00:00
parent b700989ea8
commit d8bca75e41
2 changed files with 15 additions and 0 deletions

View File

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

View File

@ -842,6 +842,17 @@ static gboolean check_vte(GdkModifierType state, guint keyval)
#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 @@ gboolean keybindings_got_event(GtkWidget *widget, GdkEventKey *ev, gpointer user
if (ev->keyval == 0)
return FALSE;
check_disk_status();
keyval = ev->keyval;
state = ev->state & GEANY_KEYS_MODIFIER_MASK;