[Monodevelop-patches-list] r817 - in trunk/MonoDevelop: build/bin build/data/options src/Main/Base/Gui/Workbench/Layouts

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Sat Feb 7 22:09:14 EST 2004


Author: tberman
Date: 2004-02-07 22:09:14 -0500 (Sat, 07 Feb 2004)
New Revision: 817

Added:
   trunk/MonoDevelop/build/data/options/DefaultEditingLayout.xml
Modified:
   trunk/MonoDevelop/build/bin/
   trunk/MonoDevelop/src/Main/Base/Gui/Workbench/Layouts/SdiWorkspaceLayout.cs
Log:
this is as clean as anything else for right now.



Property changes on: trunk/MonoDevelop/build/bin
___________________________________________________________________
Name: svn:ignore
   - *.exe
*.dll
libgdldock.so


   + *.exe
*.dll
*.png
libgdldock.so



Added: trunk/MonoDevelop/build/data/options/DefaultEditingLayout.xml
===================================================================
--- trunk/MonoDevelop/build/data/options/DefaultEditingLayout.xml	2004-02-08 00:48:44 UTC (rev 816)
+++ trunk/MonoDevelop/build/data/options/DefaultEditingLayout.xml	2004-02-08 03:09:14 UTC (rev 817)
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<dock-layout><layout name="__default__"><dock name="__dock_1" floating="no" width="-1" height="-1" floatx="0" floaty="0"><paned orientation="horizontal" locked="no" position="202"><notebook orientation="vertical" locked="no" page="0"><item name="Projects" orientation="vertical" locked="no"/><item name="Classes" orientation="vertical" locked="no"/><item name="Files" orientation="vertical" locked="no"/></notebook><paned orientation="vertical" locked="no" position="268"><item name="Documents" orientation="vertical" locked="yes"/><notebook orientation="vertical" locked="no" page="0"><item name="Output" orientation="vertical" locked="no"/><item name="Task List" orientation="vertical" locked="no"/></notebook></paned></paned></dock></layout></dock-layout>

Modified: trunk/MonoDevelop/src/Main/Base/Gui/Workbench/Layouts/SdiWorkspaceLayout.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Workbench/Layouts/SdiWorkspaceLayout.cs	2004-02-08 00:48:44 UTC (rev 816)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Workbench/Layouts/SdiWorkspaceLayout.cs	2004-02-08 03:09:14 UTC (rev 817)
@@ -30,13 +30,14 @@
 	public class SdiWorkbenchLayout : IWorkbenchLayout
 	{
 		static PropertyService propertyService = (PropertyService)ServiceManager.Services.GetService(typeof(PropertyService));
-		static string configFile = propertyService.ConfigDirectory + "MdiLayoutConfig.xml";
+		static string configFile = propertyService.ConfigDirectory + "DefaultEditingLayout.xml";
 
 		private IWorkbench workbench;
 		Window wbWindow;
 		Container rootWidget;
 		Container toolbarContainer;
 		Dock dock;
+		DockLayout dockLayout;
 		Notebook tabControl;
 
 		//ICSharpCode.SharpDevelop.Gui.Components.OpenFileTab tabControl = new ICSharpCode.SharpDevelop.Gui.Components.OpenFileTab();
@@ -91,8 +92,10 @@
 			
 			// Create the docking widget and add it to the window.
 			dock = new Dock ();
+			DockBar dockBar = new DockBar (dock);
 			Gtk.HBox dockBox = new HBox (false, 5);
 			dockBox.PackStart (dock, true, true, 0);
+			dockBox.PackStart (dockBar, false, true, 0);
 			vbox.PackStart (dockBox, true, true, 0);
 
 			// Create the notebook for the various documents.
@@ -146,16 +149,7 @@
 			//tabControl.SwitchPage += new EventHandler(ActiveMdiChanged);
 			//tabControl.SelectionChanged += new EventHandler(ActiveMdiChanged);
 			
-			try {
-				if (File.Exists(configFile)) {
-					// FIXME: GTKize
-					//dockManager.LoadConfigFromFile(configFile);
-				} else {
-					CreateDefaultLayout();
-				}
-			} catch (Exception) {
-				Console.WriteLine("can't load docking configuration, version clash ?");
-			}
+			CreateDefaultLayout();
 			RedrawAllComponents();
 			wbWindow.ShowAll ();
 		}
@@ -228,11 +222,19 @@
 				}
 			}
 			//Console.WriteLine(" Default Layout created.");
+			dockLayout = new DockLayout (dock);
+			if (File.Exists (configFile)) {
+				dockLayout.LoadFromFile (configFile);
+			} else {
+				dockLayout.LoadFromFile ("../data/options/DefaultEditingLayout.xml");
+			}
+			dockLayout.LoadLayout ("__default__");
 		}		
 
 		public void Detach()
 		{
 			Console.WriteLine("Call to SdiWorkSpaceLayout.Detach");
+			dockLayout.SaveToFile (configFile);
 			rootWidget.Remove(((DefaultWorkbench)workbench).TopMenu);
 			foreach (Gtk.Widget w in toolbarContainer.Children) {
 				toolbarContainer.Remove(w);




More information about the Monodevelop-patches-list mailing list