[Monodevelop-patches-list] r1749 - trunk/MonoDevelop/src/Libraries/Gdl
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Sat Jun 12 16:29:56 EDT 2004
Author: tberman
Date: 2004-06-12 16:29:56 -0400 (Sat, 12 Jun 2004)
New Revision: 1749
Modified:
trunk/MonoDevelop/src/Libraries/Gdl/Dock.cs
trunk/MonoDevelop/src/Libraries/Gdl/DockMaster.cs
trunk/MonoDevelop/src/Libraries/Gdl/DockObject.cs
trunk/MonoDevelop/src/Libraries/Gdl/GdlDockTest.cs
Log:
floating objects work properly now
Modified: trunk/MonoDevelop/src/Libraries/Gdl/Dock.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/Gdl/Dock.cs 2004-06-12 18:44:55 UTC (rev 1748)
+++ trunk/MonoDevelop/src/Libraries/Gdl/Dock.cs 2004-06-12 20:29:56 UTC (rev 1749)
@@ -24,12 +24,21 @@
public Dock () : this (null, false)
{
}
-
- public Dock (Dock original, bool _float)
+
+ public Dock (Dock original, bool _float) : this (original, _float, 0, 0, -1, -1)
{
+ }
+
+ public Dock (Dock original, bool _float, int x, int y, int _width, int _height)
+ {
+ float_x = x;
+ float_y = y;
+ width = _width;
+ height = _height;
SetFlag (WidgetFlags.NoWindow);
- if (original != null)
- Master = original.Master;
+ if (original != null) {
+ Bind (original.Master);
+ }
this.floating = _float;
if (Master == null) {
DockObjectFlags &= ~(DockObjectFlags.Automatic);
@@ -193,7 +202,7 @@
base.OnShown ();
if (floating && window != null)
- window.Show ();
+ window.ShowAll ();
if (IsController) {
foreach (DockObject item in Master.TopLevelDocks) {
@@ -336,7 +345,7 @@
if (position == DockPlacement.Floating) {
Console.WriteLine ("Adding a floating dockitem");
DockItem item = requestor as DockItem;
- int x = 0, y = 0, width = -1, height = 01;
+ int x = 0, y = 0, width = -1, height = -1;
if (data != null && data is Gdk.Rectangle) {
Gdk.Rectangle rect = (Gdk.Rectangle)data;
x = rect.X;
@@ -422,12 +431,10 @@
public void AddFloatingItem (DockItem item, int x, int y, int width, int height)
{
- Gdl.Dock dock = new Dock (this, true);
- dock.Width = width;
- dock.Height = height;
- dock.FloatX = x;
- dock.FloatY = y;
-
+ if (this.Master == null) {
+ Console.WriteLine ("something is seriously fucked here");
+ }
+ Gdl.Dock dock = new Dock (this, true, x, y, width, height);
if (Visible) {
dock.Show ();
if (IsMapped)
@@ -523,9 +530,9 @@
((Window)window).Title = title;
}
+ [GLib.ConnectBefore]
private void floatingConfigure (object o, ConfigureEventArgs e)
{
- Console.WriteLine ("inside configure");
float_x = e.Event.X;
float_y = e.Event.Y;
width = e.Event.Width;
Modified: trunk/MonoDevelop/src/Libraries/Gdl/DockMaster.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/Gdl/DockMaster.cs 2004-06-12 18:44:55 UTC (rev 1748)
+++ trunk/MonoDevelop/src/Libraries/Gdl/DockMaster.cs 2004-06-12 20:29:56 UTC (rev 1749)
@@ -21,7 +21,7 @@
private uint idle_layout_changed_id;
private Hashtable lockedItems = new Hashtable ();
private Hashtable unlockedItems = new Hashtable ();
-
+
public DockMaster ()
{
Console.WriteLine ("Creating a new DockMaster");
Modified: trunk/MonoDevelop/src/Libraries/Gdl/DockObject.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/Gdl/DockObject.cs 2004-06-12 18:44:55 UTC (rev 1748)
+++ trunk/MonoDevelop/src/Libraries/Gdl/DockObject.cs 2004-06-12 20:29:56 UTC (rev 1749)
@@ -328,6 +328,7 @@
{
if (master == null) {
Console.WriteLine ("Passed master is null");
+ Console.WriteLine (System.Environment.StackTrace);
return;
}
if (this.master == master) {
Modified: trunk/MonoDevelop/src/Libraries/Gdl/GdlDockTest.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/Gdl/GdlDockTest.cs 2004-06-12 18:44:55 UTC (rev 1748)
+++ trunk/MonoDevelop/src/Libraries/Gdl/GdlDockTest.cs 2004-06-12 20:29:56 UTC (rev 1749)
@@ -33,6 +33,10 @@
DockItemBehavior.CantClose);
di3.Add (CreateTextView ());
dock.AddItem (di3, DockPlacement.Bottom);
+
+ DockItem di4 = new DockItem ("itemfloat", "Floating Item", Gtk.Stock.Convert, DockItemBehavior.Normal);
+ di4.Add (new Label ("Floating dockitem"));
+ dock.AddFloatingItem (di4, 10, 10, 200, 200);
DockItem[] items = new DockItem[4];
items[0] = new DockItem ("item4", "Item #4", Gtk.Stock.JustifyFill,
More information about the Monodevelop-patches-list
mailing list