Browse Source

Update language resources.

Implemented SD2-1280/SD2-1320: Scroll completion window to move selected item to the middle

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/2.1@2516 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 19 years ago
parent
commit
06388697e0
  1. BIN
      data/resources/StringResources.cz.resources
  2. BIN
      data/resources/StringResources.de.resources
  3. BIN
      data/resources/StringResources.es-mx.resources
  4. BIN
      data/resources/StringResources.es.resources
  5. BIN
      data/resources/StringResources.fr.resources
  6. BIN
      data/resources/StringResources.it.resources
  7. BIN
      data/resources/StringResources.kr.resources
  8. BIN
      data/resources/StringResources.nl.resources
  9. BIN
      data/resources/StringResources.no.resources
  10. BIN
      data/resources/StringResources.pl.resources
  11. BIN
      data/resources/StringResources.pt.resources
  12. BIN
      data/resources/StringResources.ro.resources
  13. BIN
      data/resources/StringResources.tr.resources
  14. 8
      src/AddIns/DisplayBindings/XmlEditor/Project/Src/CodeCompletionWindow.cs
  15. 28
      src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/CompletionWindow/CodeCompletionListView.cs
  16. BIN
      src/Main/StartUp/Project/Resources/StringResources.resources

BIN
data/resources/StringResources.cz.resources

Binary file not shown.

BIN
data/resources/StringResources.de.resources

Binary file not shown.

BIN
data/resources/StringResources.es-mx.resources

Binary file not shown.

BIN
data/resources/StringResources.es.resources

Binary file not shown.

BIN
data/resources/StringResources.fr.resources

Binary file not shown.

BIN
data/resources/StringResources.it.resources

Binary file not shown.

BIN
data/resources/StringResources.kr.resources

Binary file not shown.

BIN
data/resources/StringResources.nl.resources

Binary file not shown.

BIN
data/resources/StringResources.no.resources

Binary file not shown.

BIN
data/resources/StringResources.pl.resources

Binary file not shown.

BIN
data/resources/StringResources.pt.resources

Binary file not shown.

BIN
data/resources/StringResources.ro.resources

Binary file not shown.

BIN
data/resources/StringResources.tr.resources

Binary file not shown.

8
src/AddIns/DisplayBindings/XmlEditor/Project/Src/CodeCompletionWindow.cs

@ -83,9 +83,11 @@ namespace ICSharpCode.XmlEditor @@ -83,9 +83,11 @@ namespace ICSharpCode.XmlEditor
declarationViewWindow.ShowDeclarationViewWindow();
control.Focus();
CodeCompletionListViewSelectedItemChanged(this, EventArgs.Empty);
if (completionDataProvider.DefaultIndex >= 0) {
codeCompletionListView.SelectIndex(completionDataProvider.DefaultIndex);
int defaultIndex = completionDataProvider.DefaultIndex;
if (defaultIndex >= 0) {
codeCompletionListView.SelectIndex(defaultIndex);
codeCompletionListView.CenterViewOn(defaultIndex);
}
if (completionDataProvider.PreSelection != null) {

28
src/Libraries/ICSharpCode.TextEditor/Project/Src/Gui/CompletionWindow/CodeCompletionListView.cs

@ -103,11 +103,25 @@ namespace ICSharpCode.TextEditor.Gui.CompletionWindow @@ -103,11 +103,25 @@ namespace ICSharpCode.TextEditor.Gui.CompletionWindow
int max = Math.Max(selectedItem, oldSelectedItem) - firstItem;
Invalidate(new Rectangle(0, 1 + min * ItemHeight, Width, (max - min + 1) * ItemHeight));
}
Update();
OnSelectedItemChanged(EventArgs.Empty);
}
}
public void CenterViewOn(int index)
{
int oldFirstItem = this.FirstItem;
int firstItem = index - MaxVisibleItem / 2;
if (firstItem < 0)
this.FirstItem = 0;
else if (firstItem >= completionData.Length - MaxVisibleItem)
this.FirstItem = completionData.Length - MaxVisibleItem;
else
this.FirstItem = firstItem;
if (this.FirstItem != oldFirstItem) {
Invalidate();
}
}
public void ClearSelection()
{
if (selectedItem < 0)
@ -186,10 +200,16 @@ namespace ICSharpCode.TextEditor.Gui.CompletionWindow @@ -186,10 +200,16 @@ namespace ICSharpCode.TextEditor.Gui.CompletionWindow
}
}
}
if (bestIndex < 0)
if (bestIndex < 0) {
ClearSelection();
else
SelectIndex(bestIndex);
} else {
if (bestIndex < firstItem || firstItem + MaxVisibleItem <= bestIndex) {
SelectIndex(bestIndex);
CenterViewOn(bestIndex);
} else {
SelectIndex(bestIndex);
}
}
}
protected override void OnPaint(PaintEventArgs pe)

BIN
src/Main/StartUp/Project/Resources/StringResources.resources

Binary file not shown.
Loading…
Cancel
Save