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

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Tue Jul 27 07:05:03 EDT 2004


Author: jzwart
Date: 2004-07-27 07:05:03 -0400 (Tue, 27 Jul 2004)
New Revision: 1918

Modified:
   trunk/MonoDevelop/Core/src/Libraries/Gdl/DockItem.cs
   trunk/MonoDevelop/Core/src/Libraries/Gdl/DockPaned.cs
   trunk/MonoDevelop/Core/src/Libraries/Gdl/GdlDockTest.cs
   trunk/MonoDevelop/Core/src/Libraries/Gdl/Makefile.Gdl
Log:
Fix DockPaned dock request. Crasher bug seems to be partially fixed now in Gtk#.


Modified: trunk/MonoDevelop/Core/src/Libraries/Gdl/DockItem.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Libraries/Gdl/DockItem.cs	2004-07-17 05:56:27 UTC (rev 1917)
+++ trunk/MonoDevelop/Core/src/Libraries/Gdl/DockItem.cs	2004-07-27 11:05:03 UTC (rev 1918)
@@ -36,11 +36,11 @@
 		static DockItem ()
 		{
 			Rc.ParseString ("style \"gdl-dock-item-default\" {\n" +
-			                    "xthickness = 0\n" +
-			                    "ythickness = 0\n" + 
-			                    "}\n" + 
-			                    "class \"Gdl_DockItem\" " +
-			                    "style : gtk \"gdl-dock-item-default\"\n");
+						"xthickness = 0\n" +
+						"ythickness = 0\n" + 
+					"}\n" + 
+					"class \"Gdl_DockItem\" " +
+					"style : gtk \"gdl-dock-item-default\"\n");
 		}
 		
 		protected DockItem ()
@@ -600,9 +600,9 @@
 			
 			/* Location is inside. */
 			if (relX > 0 && relX < alloc.Width &&
-			    relY > 0 && relY < alloc.Width) {
+			    relY > 0 && relY < alloc.Height) {
 				int divider = -1;
-
+				
 				/* these are for calculating the extra docking parameter */
 				Requisition other = ((DockItem)request.Applicant).PreferredSize;
 				Requisition my = PreferredSize;
@@ -664,7 +664,7 @@
 					}
 				}
 				
-				/* adjust returned coordinates so they are have the same
+				/* adjust returned coordinates so they have the same
 				   origin as our window */
 				request.X += alloc.X;
 				request.Y += alloc.Y;
@@ -845,17 +845,11 @@
 		public virtual void SetOrientation (Orientation orientation)
 		{
 			if (Orientation != orientation) {
-				if (Child != null) {
-					//FIXME: Port this, prolly w/ reflection
-					            /*pspec = g_object_class_find_property (
-                G_OBJECT_GET_CLASS (item->child), "orientation");
-            if (pspec && pspec->value_type == GTK_TYPE_ORIENTATION)
-                g_object_set (G_OBJECT (item->child),
-                              "orientation", orientation,
-                              NULL);*/
-				}
-				//PORT THIS:
-				//        g_object_notify (G_OBJECT (item), "orientation");
+				this.orientation = orientation;
+				if (IsDrawable)
+					QueueDraw ();
+				QueueResize ();
+				EmitPropertyEvent ("orientation");
 			}
 		}
 		

Modified: trunk/MonoDevelop/Core/src/Libraries/Gdl/DockPaned.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Libraries/Gdl/DockPaned.cs	2004-07-17 05:56:27 UTC (rev 1917)
+++ trunk/MonoDevelop/Core/src/Libraries/Gdl/DockPaned.cs	2004-07-27 11:05:03 UTC (rev 1918)
@@ -47,7 +47,9 @@
 		{
 			if (Child != null)
 				Child.Unparent ();
-				
+			
+			Orientation = orientation;
+
 			/* create the container paned */
 			if (orientation == Orientation.Horizontal)
 				Child = new HPaned ();
@@ -164,7 +166,7 @@
 			
 			/* Location is inside. */
 			if (relX > 0 && relX < alloc.Width &&
-			    relY > 0 && relY < alloc.Width) {
+			    relY > 0 && relY < alloc.Height) {
 			    	int divider = -1;
 			    
 				/* It's inside our area. */

Modified: trunk/MonoDevelop/Core/src/Libraries/Gdl/GdlDockTest.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Libraries/Gdl/GdlDockTest.cs	2004-07-17 05:56:27 UTC (rev 1917)
+++ trunk/MonoDevelop/Core/src/Libraries/Gdl/GdlDockTest.cs	2004-07-27 11:05:03 UTC (rev 1918)
@@ -38,7 +38,6 @@
 		di2.Add (new Button ("Button 2"));
 		dock.AddItem (di2, DockPlacement.Right);
 
-#if false
 		DockItem di3 = new DockItem ("item3", "Item #3 has accented characters",/* (áéíóúñ)",*/
 					     Gtk.Stock.Convert, DockItemBehavior.Normal |
 					     DockItemBehavior.CantClose);
@@ -64,7 +63,6 @@
 		di3.DockTo (di, DockPlacement.Top);
 		di2.DockTo (di3, DockPlacement.Right);
 		di2.DockTo (di3, DockPlacement.Left);
-#endif
 		di2.DockTo (null, DockPlacement.Floating);
 
 		box = new HBox (true, 5);

Modified: trunk/MonoDevelop/Core/src/Libraries/Gdl/Makefile.Gdl
===================================================================
--- trunk/MonoDevelop/Core/src/Libraries/Gdl/Makefile.Gdl	2004-07-17 05:56:27 UTC (rev 1917)
+++ trunk/MonoDevelop/Core/src/Libraries/Gdl/Makefile.Gdl	2004-07-27 11:05:03 UTC (rev 1918)
@@ -23,7 +23,7 @@
 ./DockBar.cs
 
 PKG_REFERENCES = \
-gtk-sharp
+gtk-sharp-2.0
 
 PKG_REFERENCES_BUILD = $(addprefix -pkg:, $(PKG_REFERENCES))
 




More information about the Monodevelop-patches-list mailing list