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

github.com/xamarin/macdoc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremie Laval <jeremie.laval@gmail.com>2012-05-23 18:40:22 +0400
committerJeremie Laval <jeremie.laval@gmail.com>2012-05-23 18:40:22 +0400
commit1720df8a47d74aeaa576dfaf43012dafdedfe899 (patch)
treec847fc9ed8ecfe7078e9d56aa6a0635b33b7a01c /MyDocument.cs
parent00d13f77e29e0b9ed381af230c27aea761e02e1a (diff)
[macdoc] Give focus to toolbar search entry when user switch to search tab
Diffstat (limited to 'MyDocument.cs')
-rw-r--r--MyDocument.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/MyDocument.cs b/MyDocument.cs
index a52376a..7ee6f1e 100644
--- a/MyDocument.cs
+++ b/MyDocument.cs
@@ -128,6 +128,10 @@ namespace macdoc
multipleMatchResults.Source = new MultipleMatchDataSource (this);
searchResults.Source = new ResultDataSource ();
splitView.Delegate = new SplitViewDelegate ();
+ tabSelector.DidSelect += (sender, e) => {
+ if (e.Item.TabView.IndexOf (e.Item) == 2)
+ WindowForSheet.MakeFirstResponder (toolbarSearchEntry);
+ };
}
class SplitViewDelegate : NSSplitViewDelegate