Kaydet (Commit) 97a90efb authored tarafından Enrico Tröger's avatar Enrico Tröger

Delay disk file checks when switching between documents a little bit to avoid…

Delay disk file checks when switching between documents a little bit to avoid fast, unintentional page switching in some cases.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3646 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 9318d1de
2009-03-24 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* src/callbacks.c:
Delay disk file checks when switching between documents a little
bit to avoid fast, unintentional page switching in some cases.
2009-03-22 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* tagmanager/css.c:
......
......@@ -682,6 +682,13 @@ on_toolbutton_preferences_clicked (GtkAction *action,
}
static gboolean delayed_check_disk_status(gpointer data)
{
document_check_disk_status(data, FALSE);
return FALSE;
}
/* Changes window-title after switching tabs and lots of other things.
* note: using 'after' makes Scintilla redraw before the UI, appearing more responsive */
void
......@@ -709,7 +716,10 @@ on_notebook1_switch_page_after (GtkNotebook *notebook,
build_menu_update(doc);
treeviews_update_tag_list(doc, FALSE);
document_check_disk_status(doc, FALSE);
/* We delay the check to avoid weird fast, unintended switching of notebook pages when
* the 'file has changed' dialog is shown while the switch event is not yet completely
* finished. So, we check after the switch has been performed to be safe. */
g_idle_add(delayed_check_disk_status, doc);
#ifdef HAVE_VTE
vte_cwd((doc->real_path != NULL) ? doc->real_path : doc->file_name, FALSE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment