Author: fejj
Date: 2007-04-04 15:46:50 -0400 (Wed, 04 Apr 2007)
New Revision: 75405
Modified:
trunk/monodevelop/Core/src/MonoDevelop.Ide/ChangeLog
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui/NavigationService.cs
Log:
thought of a better way of doing my latest change
Modified: trunk/monodevelop/Core/src/MonoDevelop.Ide/ChangeLog
===================================================================
--- trunk/monodevelop/Core/src/MonoDevelop.Ide/ChangeLog 2007-04-04
19:34:33 UTC (rev 75404)
+++ trunk/monodevelop/Core/src/MonoDevelop.Ide/ChangeLog 2007-04-04
19:46:50 UTC (rev 75405)
@@ -1,23 +1,23 @@
2007-04-04 Jeffrey Stedfast <[EMAIL PROTECTED]>
- * MonoDevelop.Ide.Gui/NavigationService.cs: Defer logging until the
- timeout has expired unless there has been a file change.
+ * MonoDevelop.Ide.Gui/NavigationService.cs: Defer logging until
+ the timeout has expired unless there has been a file change.
2007-04-03 Jeffrey Stedfast <[EMAIL PROTECTED]>
- * MonoDevelop.Ide.Gui/NavigationService.cs: Only log new points if the
- time interval has been >= 1 second.
+ * MonoDevelop.Ide.Gui/NavigationService.cs: Only log new points if
+ the time interval has been >= 1 second.
- * MonoDevelop.Ide.Gui/NavigationHistory.cs: Don't include the current
- navpoint in the menus.
+ * MonoDevelop.Ide.Gui/NavigationHistory.cs: Don't include the
+ current navpoint in the menus.
2007-04-02 Jeffrey Stedfast <[EMAIL PROTECTED]>
* MonoDevelop.Ide.Gui/NavigationHistory.cs: Implement
NavigationHistoryForward class.
- * MonoDevelop.Ide.Gui/NavigationService.cs: After jumping to the new
- point, emit the HistoryChanged event.
+ * MonoDevelop.Ide.Gui/NavigationService.cs: After jumping to the
+ new point, emit the HistoryChanged event.
* MonoDevelop.Ide.addin.xml: The Forward button now uses the same
custom widget.
Modified:
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui/NavigationService.cs
===================================================================
---
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui/NavigationService.cs
2007-04-04 19:34:33 UTC (rev 75404)
+++
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui/NavigationService.cs
2007-04-04 19:46:50 UTC (rev 75405)
@@ -55,8 +55,6 @@
IdeApp.ProjectOperations.FileRenamedInProject +=
FileRenamed;
IdeApp.ProjectOperations.CombineClosed +=
SolutionClosed;
-
- timeout = GLib.Timeout.Add (1000, LogNavPoint);
}
#region Public Properties
@@ -130,20 +128,21 @@
if (p == null || p.FileName == null || p.FileName ==
String.Empty)
return;
+ if (timeout != 0)
+ GLib.Source.Remove (timeout);
+
if (navPoint != null && navPoint.FileName !=
p.FileName) {
- // always log last navpoint before switching
files
+ // user switched files: always log most recent
navpoint before file switch
LogNavPoint ();
}
// defer logging
+ timeout = GLib.Timeout.Add (1000, LogNavPoint);
navPoint = p;
}
static bool LogNavPoint ()
{
- if (navPoint == null || loggingSuspended)
- return true;
-
if (currentNode == null) {
currentNode = history.AddFirst (navPoint);
} else if (navPoint.Equals (currentNode.Value)) {
@@ -154,10 +153,11 @@
}
navPoint = null;
+ timeout = 0;
OnHistoryChanged ();
- return true;
+ return false;
}
// untested
@@ -268,7 +268,7 @@
loggingSuspended = false;
}
#endregion
-
+
// the following code is not covered by Unit tests as i wasn't
sure
// how to test code triggered by the user interacting with the
workbench
#region event trapping
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches