[Monodevelop-patches-list] r2281 - trunk/MonoDevelop/Unused/Gdl
John Luke <jluke@cfl.rr.com>
jluke at mono-cvs.ximian.com
Mon Feb 28 18:54:16 EST 2005
Author: jluke
Date: 2005-02-28 18:54:16 -0500 (Mon, 28 Feb 2005)
New Revision: 2281
Modified:
trunk/MonoDevelop/Unused/Gdl/DockBar.cs
Log:
prevent duplicated from being added to dockbar
Modified: trunk/MonoDevelop/Unused/Gdl/DockBar.cs
===================================================================
--- trunk/MonoDevelop/Unused/Gdl/DockBar.cs 2005-02-28 23:26:42 UTC (rev 2280)
+++ trunk/MonoDevelop/Unused/Gdl/DockBar.cs 2005-02-28 23:54:16 UTC (rev 2281)
@@ -26,10 +26,14 @@
public void AddItem (DockItem item)
{
- Console.WriteLine ("adding item to dockbar");
DockBarButton button = new DockBarButton (item);
button.DockButtonClicked += OnDockButtonClicked;
// check if already there
+ foreach (DockBarButton dbb in this.Children) {
+ if (item == dbb.DockItem) {
+ return;
+ }
+ }
tooltips.SetTip (button, item.Name, item.Name);
item.DockBar = this;
item.DockBarButton = button;
More information about the Monodevelop-patches-list
mailing list