Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Hutchinson <m.j.hutchinson@gmail.com>2011-10-02 22:12:12 +0400
committerMichael Hutchinson <m.j.hutchinson@gmail.com>2011-10-02 22:12:12 +0400
commit65d1d4cb7e76ca5db6a23d44cd6fff95a7abf10b (patch)
treefef2e2c73d868f781a876d860dcff880c375bd7b /main/src/addins/MonoDevelop.SourceEditor2
parent2e5ad594a95c7cbfe6d6a458afdd97f721e5433c (diff)
[SourceEditor] Clear search messages from status bar
Clears messages from the default status bar when the editor loses focus or the search widget is closed. Reduces confusion about the source of the messages - they don't need to be persistent anyway.
Diffstat (limited to 'main/src/addins/MonoDevelop.SourceEditor2')
-rw-r--r--main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorWidget.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorWidget.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorWidget.cs
index 57fcac7ab4..a24146f893 100644
--- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorWidget.cs
+++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorWidget.cs
@@ -281,6 +281,10 @@ namespace MonoDevelop.SourceEditor
vbox.SetSizeRequest (32, 32);
this.lastActiveEditor = this.textEditor = new MonoDevelop.SourceEditor.ExtensibleTextEditor (view);
this.textEditor.FocusInEvent += (o, s) => lastActiveEditor = (ExtensibleTextEditor)o;
+ this.textEditor.FocusOutEvent += delegate {
+ if (this.splittedTextEditor == null || !splittedTextEditor.HasFocus)
+ OnLostFocus ();
+ };
mainsw = new DecoratedScrolledWindow (this);
this.textEditorContainer = new TextEditorContainer (textEditor);
mainsw.SetTextEditor (textEditorContainer);
@@ -320,6 +324,12 @@ namespace MonoDevelop.SourceEditor
parseInformationUpdaterWorkerThread.DoWork += HandleParseInformationUpdaterWorkerThreadDoWork;
}
+ void OnLostFocus ()
+ {
+ //clears search status messages
+ IdeApp.Workbench.StatusBar.ShowReady ();
+ }
+
void UpdateLineColOnEventHandler (object sender, EventArgs e)
{
this.UpdateLineCol ();
@@ -672,6 +682,10 @@ namespace MonoDevelop.SourceEditor
secondsw = new DecoratedScrolledWindow (this);
this.splittedTextEditor = new MonoDevelop.SourceEditor.ExtensibleTextEditor (view, this.textEditor.Options, textEditor.Document);
this.splittedTextEditor.FocusInEvent += (o, s) => lastActiveEditor = (ExtensibleTextEditor)o;
+ this.splittedTextEditor.FocusOutEvent += delegate {
+ if (!textEditor.HasFocus)
+ OnLostFocus ();
+ };
this.splittedTextEditor.Extension = textEditor.Extension;
this.splittedTextEditorContainer = new TextEditorContainer (this.splittedTextEditor);
@@ -999,6 +1013,8 @@ namespace MonoDevelop.SourceEditor
searchAndReplaceWidgetFrame = null;
searchAndReplaceWidget = null;
result = true;
+ //clears any message it may have set
+ IdeApp.Workbench.StatusBar.ShowReady ();
}
if (gotoLineNumberWidgetFrame != null) {