[MonoDevelop] managed dock

John Luke john.luke@gmail.com
Sun, 06 Mar 2005 23:35:34 -0500


--=-U6txLWjUJ5DRJaQ3xMPg
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hey all,
	I've been working on finishing the C# version of the gdl dock recently
and it's pretty much working now.  I only expect there to be minor bugs
and perhaps some performance problems remaining.  Thanks to Todd and
Jeroen for doing the hard parts earlier.

If some people try it out and report no major problems perhaps it can be
switched to, otherwise it should wait a bit to be committed.

To try it out:
cd MonoDevelop/Unused/Gdl/
make
cd MonoDevelop/Core/src/Base
make clean
patch -p0 < dock.patch
make
cd MonoDevelop/build/bin
mono MonoDevelop.exe

--=-U6txLWjUJ5DRJaQ3xMPg
Content-Disposition: attachment; filename=dock.patch
Content-Type: text/x-patch; name=dock.patch; charset=UTF-8
Content-Transfer-Encoding: 7bit

Index: Gui/Workbench/Layouts/SdiWorkspaceLayout.cs
===================================================================
--- Gui/Workbench/Layouts/SdiWorkspaceLayout.cs	(revision 2275)
+++ Gui/Workbench/Layouts/SdiWorkspaceLayout.cs	(working copy)
@@ -83,7 +83,7 @@
 			
 			// Create the docking widget and add it to the window.
 			dock = new Dock ();
-			DockBar dockBar = new DockBar (dock);
+			DockBar dockBar = dock.Master.DockBar;
 			Gtk.HBox dockBox = new HBox (false, 5);
 			dockBox.PackStart (dockBar, false, true, 0);
 			dockBox.PackStart (dock, true, true, 0);
@@ -345,8 +345,9 @@
 								 content.Icon,
 								 DockItemBehavior.Normal);
 								 
-			Gtk.Label label = item.Tablabel as Gtk.Label;
-			label.UseMarkup = true;
+			Gtk.Label label = item.TabLabel as Gtk.Label;
+			if (label != null)
+				label.UseMarkup = true;
 
 			item.Add (content.Control);
 			item.ShowAll ();
@@ -356,11 +357,11 @@
 			if (extraPad) {
 				DockItem ot = dock.GetItemByName ("MonoDevelop.Gui.Pads.OpenTaskView"); 
 				if (ot != null && ot.IsAttached) {
-					item.DockTo (ot, DockPlacement.Center, 0);
+					item.DockTo (ot, DockPlacement.Center);
 				}
 				else {
 					ot = dock.GetItemByName ("Documents"); 
-					item.DockTo (ot, DockPlacement.Bottom, 0);
+					item.DockTo (ot, DockPlacement.Bottom);
 				}
 			}
 			else
@@ -375,8 +376,9 @@
 			IPadContent content = (IPadContent) source;
 			DockItem item = GetDockItem (content);
 			if (item != null) {
-				Gtk.Label label = item.Tablabel as Gtk.Label;
-				label.Markup = content.Title;
+				Gtk.Label label = item.TabLabel as Gtk.Label;
+				if (label != null)
+					label.Markup = content.Title;
 				item.LongName = content.Title;
 				item.StockId = content.Icon;
 			}
Index: Makefile.am
===================================================================
--- Makefile.am	(revision 2275)
+++ Makefile.am	(working copy)
@@ -6,7 +6,7 @@
 	/r:$(top_builddir)/build/bin/MonoDevelop.Gui.Utils.dll \
 	/r:$(top_builddir)/build/bin/MonoDevelop.Gui.Widgets.dll \
 	/r:System.Data.dll /r:System.Web.Services.dll \
-	/r:$(top_builddir)/build/bin/gdl-sharp.dll \
+	/r:$(top_builddir)/build/bin/MonoDevelop.Dock.dll \
 	/r:Mono.Posix.dll \
 	$(GTK_SHARP_LIBS) \
 	$(GNOME_SHARP_LIBS) \

--=-U6txLWjUJ5DRJaQ3xMPg--