diff options
author | Marius Ungureanu <marius.ungureanu@xamarin.com> | 2015-12-14 19:45:01 +0300 |
---|---|---|
committer | Marius Ungureanu <marius.ungureanu@xamarin.com> | 2015-12-14 19:45:01 +0300 |
commit | 8b3a1c9324f2f4284c6b291a65488c5230efe8b8 (patch) | |
tree | 8bcbd42dd1ad38b7fca184fdf0b005b21cffe361 /main/src/addins/WindowsPlatform | |
parent | 64d7c147d89d06d6e3d5f738166b1a1310b1a9b4 (diff) | |
parent | 7a1b3c55032dbd2fc908d9aaf1418977afe4db86 (diff) |
Merge remote-tracking branch 'origin/master' into roslyn-nogtkshell
Diffstat (limited to 'main/src/addins/WindowsPlatform')
4 files changed, 21 insertions, 10 deletions
diff --git a/main/src/addins/WindowsPlatform/WindowsPlatform/MainToolbar/SearchBar.xaml.cs b/main/src/addins/WindowsPlatform/WindowsPlatform/MainToolbar/SearchBar.xaml.cs index 46a7ef9cc2..9425b3dc14 100644 --- a/main/src/addins/WindowsPlatform/WindowsPlatform/MainToolbar/SearchBar.xaml.cs +++ b/main/src/addins/WindowsPlatform/WindowsPlatform/MainToolbar/SearchBar.xaml.cs @@ -40,8 +40,10 @@ namespace WindowsPlatform.MainToolbar };
IdeApp.Workbench.RootWindow.SetFocus += (o, e) =>
{
- Keyboard.ClearFocus();
- IdeApp.Workbench.RootWindow.Present();
+ if (Keyboard.FocusedElement == SearchBar) {
+ Keyboard.ClearFocus ();
+ IdeApp.Workbench.RootWindow.Present ();
+ }
};
searchIcon = Stock.SearchboxSearch.GetImageSource (Xwt.IconSize.Small);
@@ -75,9 +77,9 @@ namespace WindowsPlatform.MainToolbar {
get { return searchText; }
set {
- searchText = value;
- UpdateIcon ();
- RaisePropertyChanged ();
+ searchText = value;
+ UpdateIcon ();
+ RaisePropertyChanged ();
}
}
diff --git a/main/src/addins/WindowsPlatform/WindowsPlatform/MainToolbar/StatusBar.xaml b/main/src/addins/WindowsPlatform/WindowsPlatform/MainToolbar/StatusBar.xaml index 591cded8f7..b941dd6179 100644 --- a/main/src/addins/WindowsPlatform/WindowsPlatform/MainToolbar/StatusBar.xaml +++ b/main/src/addins/WindowsPlatform/WindowsPlatform/MainToolbar/StatusBar.xaml @@ -49,6 +49,7 @@ Padding="7,1,0,2"
Foreground="{Binding StatusTextBrush}"
Text="{Binding Message}"
+ TextTrimming="WordEllipsis"
UseLayoutRounding="True"
MouseLeftButtonUp="OnShowPad" />
<StackPanel x:Name="BuildResultPanel"
diff --git a/main/src/addins/WindowsPlatform/WindowsPlatform/MainToolbar/WPFToolbar.cs b/main/src/addins/WindowsPlatform/WindowsPlatform/MainToolbar/WPFToolbar.cs index a5e10a8002..d7872eeda6 100644 --- a/main/src/addins/WindowsPlatform/WindowsPlatform/MainToolbar/WPFToolbar.cs +++ b/main/src/addins/WindowsPlatform/WindowsPlatform/MainToolbar/WPFToolbar.cs @@ -80,6 +80,10 @@ namespace WindowsPlatform.MainToolbar toolbar.SearchBar.SearchText = toolbar.SearchBar.PlaceholderText;
};
+ toolbar.SearchBar.SearchBar.GotKeyboardFocus += (o, e) => {
+ SearchEntryActivated?.Invoke (o, e);
+ };
+
toolbar.SearchBar.SearchBar.SizeChanged += (o, e) => {
if (SearchEntryResized != null)
SearchEntryResized (o, e);
@@ -99,9 +103,6 @@ namespace WindowsPlatform.MainToolbar void SendKeyPress(KeyEventArgs ka)
{
- if (ka.Key == Xwt.Key.Escape)
- SearchText = string.Empty;
-
if (SearchEntryKeyPressed != null)
SearchEntryKeyPressed(this, ka);
}
@@ -168,6 +169,7 @@ namespace WindowsPlatform.MainToolbar public string SearchCategory {
set {
toolbar.SearchBar.SearchText = value;
+ FocusSearchBar ();
toolbar.SearchBar.SearchBar.SelectAll ();
}
}
@@ -189,7 +191,13 @@ namespace WindowsPlatform.MainToolbar public string SearchText {
get { return toolbar.SearchBar.SearchText; }
- set { toolbar.SearchBar.SearchText = value; }
+ set {
+ toolbar.SearchBar.SearchText = value;
+
+ if (value != SearchPlaceholderMessage) {
+ toolbar.SearchBar.SearchBar.SelectAll ();
+ }
+ }
}
public StatusBar StatusBar {
diff --git a/main/src/addins/WindowsPlatform/WindowsPlatform/WindowsPlatform.cs b/main/src/addins/WindowsPlatform/WindowsPlatform/WindowsPlatform.cs index 592c74b3c0..4b3f446bae 100644 --- a/main/src/addins/WindowsPlatform/WindowsPlatform/WindowsPlatform.cs +++ b/main/src/addins/WindowsPlatform/WindowsPlatform/WindowsPlatform.cs @@ -93,7 +93,7 @@ namespace MonoDevelop.Platform HeightRequest = System.Windows.Forms.SystemInformation.CaptionHeight, }; commandManager.IncompleteKeyPressed += (sender, e) => {
- if (e.Key == Gdk.Key.Alt_L || e.Key == Gdk.Key.Alt_R) {
+ if (e.Key == Gdk.Key.Alt_L) {
Keyboard.Focus(titleBar.DockTitle.Children[0]);
}
}; |