[Monodevelop-patches-list] r2191 - in trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor: . CodeCompletion
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Sun Jan 30 14:55:22 EST 2005
Author: tberman
Date: 2005-01-30 14:55:22 -0500 (Sun, 30 Jan 2005)
New Revision: 2191
Modified:
trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CompletionListWindow.cs
Log:
2005-01-30 Todd Berman <tberman at off.net>
* CodeCompletion/CompletionListWindow.cs: Small changes, make sure the
placement of the declaration view window is redone when the list size
is changed. Fixes bug #71974
Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog 2005-01-30 00:53:19 UTC (rev 2190)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog 2005-01-30 19:55:22 UTC (rev 2191)
@@ -1,3 +1,9 @@
+2005-01-30 Todd Berman <tberman at off.net>
+
+ * CodeCompletion/CompletionListWindow.cs: Small changes, make sure the
+ placement of the declaration view window is redone when the list size
+ is changed. Fixes bug #71974
+
2005-01-29 Todd Berman <tberman at off.net>
* Gui/SourceEditorView.cs: Only show "Breakpoint" if the
Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CompletionListWindow.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CompletionListWindow.cs 2005-01-30 00:53:19 UTC (rev 2190)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/CodeCompletion/CompletionListWindow.cs 2005-01-30 19:55:22 UTC (rev 2191)
@@ -153,7 +153,7 @@
void ListSizeChanged (object obj, SizeAllocatedArgs args)
{
-// UpdateDeclarationView ();
+ UpdateDeclarationView ();
}
protected override void OnSelectionChanged ()
@@ -169,19 +169,16 @@
declarationviewwindow.Hide ();
declarationviewwindow.Clear ();
- // FIXME: This code is buggy, and generates a bad placement sometimes when you jump a lot.
- // but it is better than 0,0
- // This code is for sizing the treeview properly.
-
if (List.GdkWindow == null) return;
Gdk.Rectangle rect = List.GetRowArea (List.Selection);
int listpos_x = 0, listpos_y = 0;
- while (listpos_x == 0)
+ while (listpos_x == 0 || listpos_y == 0)
GetPosition (out listpos_x, out listpos_y);
int vert = listpos_y + rect.Y;
- int lvWidth, lvHeight;
- this.GdkWindow.GetSize (out lvWidth, out lvHeight);
+ int lvWidth = 0, lvHeight = 0;
+ while (lvWidth == 0)
+ this.GdkWindow.GetSize (out lvWidth, out lvHeight);
if (vert >= listpos_y + lvHeight - 2) {
vert = listpos_y + lvHeight - rect.Height;
} else if (vert < listpos_y) {
@@ -191,13 +188,8 @@
ICompletionDataWithMarkup datawMarkup = data as ICompletionDataWithMarkup;
- string descMarkup = String.Empty;
+ string descMarkup = datawMarkup != null ? datawMarkup.DescriptionPango : data.Description;
- if (datawMarkup != null)
- descMarkup = datawMarkup.DescriptionPango;
- else
- descMarkup = declarationviewwindow.DescriptionMarkup = data.Description;
-
declarationviewwindow.Realize ();
declarationviewwindow.AddOverload (descMarkup);
More information about the Monodevelop-patches-list
mailing list