Revision: 3646 http://geany.svn.sourceforge.net/geany/?rev=3646&view=rev Author: eht16 Date: 2009-03-24 18:12:39 +0000 (Tue, 24 Mar 2009)
Log Message: ----------- Delay disk file checks when switching between documents a little bit to avoid fast, unintentional page switching in some cases.
Modified Paths: -------------- trunk/ChangeLog trunk/src/callbacks.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-03-23 02:21:30 UTC (rev 3645) +++ trunk/ChangeLog 2009-03-24 18:12:39 UTC (rev 3646) @@ -1,3 +1,10 @@ +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:
Modified: trunk/src/callbacks.c =================================================================== --- trunk/src/callbacks.c 2009-03-23 02:21:30 UTC (rev 3645) +++ trunk/src/callbacks.c 2009-03-24 18:12:39 UTC (rev 3646) @@ -682,6 +682,13 @@ }
+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 @@ 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);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.