diff options
author | Jeremie Laval <jeremie.laval@gmail.com> | 2012-11-16 21:20:48 +0400 |
---|---|---|
committer | Jeremie Laval <jeremie.laval@gmail.com> | 2012-11-16 21:22:20 +0400 |
commit | e798cd51f95f2ea0c1982bb55edbed8396f07186 (patch) | |
tree | ac7dde1211e1748d2e80c8456bdeafdb1e288bc8 /MyDocument.cs | |
parent | d5ea468c6e10a5a42a0f32956d09a0baef711db4 (diff) |
[macdoc] Add --search flag to macdoc.
The flag will make macdoc opens a untitled window (in addition to the restored ones), switch it to search mode, prefill the search entry and launch the search itself.
Diffstat (limited to 'MyDocument.cs')
-rw-r--r-- | MyDocument.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/MyDocument.cs b/MyDocument.cs index 48a652c..49a7554 100644 --- a/MyDocument.cs +++ b/MyDocument.cs @@ -46,6 +46,16 @@ namespace macdoc return "Mono Documentation Browser"; } } + + public void LoadWithSearch (string searchTerm) + { + if (!string.IsNullOrEmpty (searchTerm)) { + toolbarSearchEntry.StringValue = searchTerm; + tabSelector.SelectAt (2); + Search (searchTerm); + Console.WriteLine ("Searched: '{0}'", searchTerm); + } + } public override bool ReadFromUrl (NSUrl url, string typeName, out NSError outError) { |