[Monodevelop-patches-list] r1716 - trunk/MonoDevelop/src/Libraries/Gdl

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Tue Jun 8 17:11:09 EDT 2004


Author: tberman
Date: 2004-06-08 17:11:09 -0400 (Tue, 08 Jun 2004)
New Revision: 1716

Modified:
   trunk/MonoDevelop/src/Libraries/Gdl/DockItemGrip.cs
   trunk/MonoDevelop/src/Libraries/Gdl/DockPaned.cs
Log:
fixeda small problem, some more porting


Modified: trunk/MonoDevelop/src/Libraries/Gdl/DockItemGrip.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/Gdl/DockItemGrip.cs	2004-06-08 20:05:10 UTC (rev 1715)
+++ trunk/MonoDevelop/src/Libraries/Gdl/DockItemGrip.cs	2004-06-08 21:11:09 UTC (rev 1716)
@@ -21,11 +21,13 @@
 		
 		public DockItemGrip ()
 		{
+			this.Flags |= (int)Gtk.WidgetFlags.NoWindow;
+		
 			Widget.PushCompositeChild ();
 			this.close_button = new Gtk.Button ();
 			Widget.PopCompositeChild ();
 			
-			this.close_button.Flags |= ~((int)Gtk.WidgetFlags.CanFocus);
+			this.close_button.Flags |= (int)Gtk.WidgetFlags.CanFocus;
 			this.close_button.Parent = this;
 			this.close_button.Relief = Gtk.ReliefStyle.None;
 			this.close_button.Show ();
@@ -40,7 +42,7 @@
 			this.iconify_button = new Gtk.Button ();
 			Widget.PopCompositeChild ();
 			
-			this.iconify_button.Flags |= ~((int)Gtk.WidgetFlags.CanFocus);
+			this.iconify_button.Flags |= (int)Gtk.WidgetFlags.CanFocus;
 			this.iconify_button.Parent = this;
 			this.iconify_button.Relief = Gtk.ReliefStyle.None;
 			this.iconify_button.Show ();

Modified: trunk/MonoDevelop/src/Libraries/Gdl/DockPaned.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/Gdl/DockPaned.cs	2004-06-08 20:05:10 UTC (rev 1715)
+++ trunk/MonoDevelop/src/Libraries/Gdl/DockPaned.cs	2004-06-08 21:11:09 UTC (rev 1716)
@@ -11,7 +11,7 @@
 
 		public DockPaned (Gtk.Orientation orientation)
 		{
-			//JUST A STUB need porting
+			CreateChild (orientation);
 		}
 		
 		public override bool HasGrip {
@@ -90,6 +90,46 @@
 			}
 		}
 		
-		
+		public override void Docking (DockObject requestor, DockPlacement position, object other_data)
+		{
+			if (this.Child == null)
+				return;
+			Gtk.Paned paned = (Gtk.Paned)this.Child;
+			bool hresize = false;
+			bool wresize = false;
+			bool done = false;
+			
+			if (requestor is DockItem) {
+				hresize = ((DockItem)requestor).PreferredHeight == -2 ? true : false;
+				wresize = ((DockItem)requestor).PreferredWidth == -2 ? true : false;
+			}
+			
+			switch (this.Orientation) {
+			case Gtk.Orientation.Horizontal:
+				if (paned.Child1 == null && position == DockPlacement.Left) {
+					paned.Pack1 (requestor, wresize, false);
+					done = true;
+				} else if (paned.Child2 == null && position == DockPlacement.Right) {
+					paned.Pack2 (requestor, wresize, false);
+					done = true;
+				}
+				break;
+			case Gtk.Orientation.Vertical:
+				if (paned.Child1 == null && position == DockPlacement.Top) {
+					paned.Pack1 (requestor, hresize, false);
+					done = true;
+				} else if (paned.Child2 == null && position == DockPlacement.Bottom) {
+					paned.Pack2 (requestor, hresize, false);
+					done = true;
+				}
+				break;
+			}
+			if (!done) {
+				base.Docking (requestor, position, other_data);
+			} else {
+				((DockItem)requestor).ShowGrip ();
+				requestor.DockObjectFlags |= DockObjectFlags.Attached;
+			}
+		}
 	}
 }
\ No newline at end of file




More information about the Monodevelop-patches-list mailing list