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

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Thu Jun 24 23:20:27 EDT 2004


Author: jluke
Date: 2004-06-24 23:20:27 -0400 (Thu, 24 Jun 2004)
New Revision: 1824

Modified:
   trunk/MonoDevelop/src/Libraries/Gdl/DockBar.cs
   trunk/MonoDevelop/src/Libraries/Gdl/DockItemBehavior.cs
   trunk/MonoDevelop/src/Libraries/Gdl/DockObjectFlags.cs
   trunk/MonoDevelop/src/Libraries/Gdl/DockParamFlags.cs
   trunk/MonoDevelop/src/Libraries/Gdl/Gdl.prjx
   trunk/MonoDevelop/src/Libraries/Gdl/GdlDockTest.cs
Log:
slight bit more


Modified: trunk/MonoDevelop/src/Libraries/Gdl/DockBar.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/Gdl/DockBar.cs	2004-06-25 03:19:34 UTC (rev 1823)
+++ trunk/MonoDevelop/src/Libraries/Gdl/DockBar.cs	2004-06-25 03:20:27 UTC (rev 1824)
@@ -9,9 +9,11 @@
 	public class DockBar : VBox
 	{
 		DockMaster master;
+		Tooltips tooltips = new Tooltips ();
 		
 		public DockBar (Dock dock)
 		{
+			Console.WriteLine ("new dockbar");
 			master = dock.Master;
 		}
 		
@@ -26,12 +28,14 @@
 		
 		public void AddItem (DockItem item)
 		{
+			Console.WriteLine ("adding item to dockbar");
 			Button button = new Button ();
-			Image image = new Image (item.StockId);
+			button.Relief = ReliefStyle.None;
+			Image image = new Image (item.StockId, IconSize.SmallToolbar);
 			button.Add (image);
 			button.Clicked += OnDockButtonClicked;
 			// check if already there
-			// set tooltip
+			tooltips.SetTip (button, item.Name, item.Name);
 			item.DockBar = this;
 			item.DockBarButton = button;
 			this.PackStart (button, false, false, 0);
@@ -68,9 +72,14 @@
 		
 		void OnDockButtonClicked (object o, EventArgs args)
 		{
-			// show
-			// remove
-			// resize
+			DockItem item = (DockItem) o;  //FIXME: o is a Button
+			DockObject controller = item.Master.Controller;
+			item.DockBar = null;
+			// remove Iconified flag
+			item.Flags |= (int) DockObjectFlags.Iconified;
+			item.Show ();
+			this.RemoveItem (item);
+			controller.QueueResize ();
 		}
 	}
 }
\ No newline at end of file

Modified: trunk/MonoDevelop/src/Libraries/Gdl/DockItemBehavior.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/Gdl/DockItemBehavior.cs	2004-06-25 03:19:34 UTC (rev 1823)
+++ trunk/MonoDevelop/src/Libraries/Gdl/DockItemBehavior.cs	2004-06-25 03:20:27 UTC (rev 1824)
@@ -1,15 +1,10 @@
-// This file was generated by the Gtk# code generator.
-// Any changes made will be lost if regenerated.
+using System;
 
-namespace Gdl {
-
-	using System;
-
-
+namespace Gdl
+{
 	[Flags]
-#region Autogenerated code
-	public enum DockItemBehavior {
-
+	public enum DockItemBehavior
+	{
 		Normal,
 		NeverFloating = 1 << 0,
 		NeverVertical = 1 << 1,
@@ -23,5 +18,4 @@
 		CantClose = 1 << 9,
 		CantIconify = 1 << 10,
 	}
-#endregion
 }

Modified: trunk/MonoDevelop/src/Libraries/Gdl/DockObjectFlags.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/Gdl/DockObjectFlags.cs	2004-06-25 03:19:34 UTC (rev 1823)
+++ trunk/MonoDevelop/src/Libraries/Gdl/DockObjectFlags.cs	2004-06-25 03:20:27 UTC (rev 1824)
@@ -1,15 +1,10 @@
-// This file was generated by the Gtk# code generator.
-// Any changes made will be lost if regenerated.
+using System;
 
-namespace Gdl {
-
-	using System;
-
-
+namespace Gdl
+{
 	[Flags]
-#region Autogenerated code
-	public enum DockObjectFlags {
-
+	public enum DockObjectFlags
+	{
 		Automatic = 1 << 0,
 		Attached = 1 << 1,
 		InReflow = 1 << 2,
@@ -19,5 +14,4 @@
 		Iconified = 1 << 6,
 		UserAction = 1 << 7 
 	}
-#endregion
 }

Modified: trunk/MonoDevelop/src/Libraries/Gdl/DockParamFlags.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/Gdl/DockParamFlags.cs	2004-06-25 03:19:34 UTC (rev 1823)
+++ trunk/MonoDevelop/src/Libraries/Gdl/DockParamFlags.cs	2004-06-25 03:20:27 UTC (rev 1824)
@@ -1,15 +1,10 @@
-// This file was generated by the Gtk# code generator.
-// Any changes made will be lost if regenerated.
+using System;
 
-namespace Gdl {
-
-	using System;
-
-#region Autogenerated code
-	public enum DockParamFlags {
-
+namespace Gdl
+{
+	public enum DockParamFlags
+	{
 		Export = 1,
 		After = 2,
 	}
-#endregion
 }

Modified: trunk/MonoDevelop/src/Libraries/Gdl/Gdl.prjx
===================================================================
--- trunk/MonoDevelop/src/Libraries/Gdl/Gdl.prjx	2004-06-25 03:19:34 UTC (rev 1823)
+++ trunk/MonoDevelop/src/Libraries/Gdl/Gdl.prjx	2004-06-25 03:20:27 UTC (rev 1824)
@@ -15,7 +15,6 @@
     <File name="./DockPlaceholder.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
     <File name="./DockPaned.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
     <File name="./DockNotebook.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
-    <File name="./GdlDockTest.cs" subtype="Code" buildaction="Exclude" dependson="" data="" />
     <File name="./stock-close-12.png" subtype="Code" buildaction="Exclude" dependson="" data="" />
     <File name="./stock-menu-left-12.png" subtype="Code" buildaction="Exclude" dependson="" data="" />
     <File name="./stock-menu-right-12.png" subtype="Code" buildaction="Exclude" dependson="" data="" />
@@ -23,6 +22,7 @@
     <File name="./DockedHandler.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
     <File name="./DockLayout.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
     <File name="./DockBar.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
+    <File name="./GdlDockTest.cs" subtype="Code" buildaction="Nothing" dependson="" data="" />
   </Contents>
   <References>
     <Reference type="Gac" refto="gtk-sharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" localcopy="True" />

Modified: trunk/MonoDevelop/src/Libraries/Gdl/GdlDockTest.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/Gdl/GdlDockTest.cs	2004-06-25 03:19:34 UTC (rev 1823)
+++ trunk/MonoDevelop/src/Libraries/Gdl/GdlDockTest.cs	2004-06-25 03:20:27 UTC (rev 1824)
@@ -21,11 +21,11 @@
 		app.Add (table);
 		
 		Dock dock = new Dock ();		
-		//DockLayout layout = new DockLayout (dock);
-		//DockBar dockbar = new DockBar (dock);
+		DockLayout layout = new DockLayout (dock);
+		DockBar dockbar = new DockBar (dock);
 		
 		Box box = new HBox (false, 5);
-		//box.PackStart (dockbar, false, false, 0);
+		box.PackStart (dockbar, false, false, 0);
 		box.PackEnd (dock, true, true, 0);
 		table.PackStart (box, true, true, 0);
 




More information about the Monodevelop-patches-list mailing list