[Monodevelop-patches-list] r2290 - trunk/MonoDevelop/Unused/Gdl
John Luke <jluke@cfl.rr.com>
jluke at mono-cvs.ximian.com
Thu Mar 3 19:33:28 EST 2005
Author: jluke
Date: 2005-03-03 19:33:27 -0500 (Thu, 03 Mar 2005)
New Revision: 2290
Modified:
trunk/MonoDevelop/Unused/Gdl/DockLayout.cs
trunk/MonoDevelop/Unused/Gdl/DockMaster.cs
Log:
flush
Modified: trunk/MonoDevelop/Unused/Gdl/DockLayout.cs
===================================================================
--- trunk/MonoDevelop/Unused/Gdl/DockLayout.cs 2005-03-03 23:08:13 UTC (rev 2289)
+++ trunk/MonoDevelop/Unused/Gdl/DockLayout.cs 2005-03-04 00:33:27 UTC (rev 2290)
@@ -21,6 +21,8 @@
DockMaster master = null;
ArrayList layouts;
+ CheckButton locked_check;
+
public DockLayout (Dock dock)
{
layouts = new ArrayList ();
@@ -313,7 +315,7 @@
// build layouts list
layoutsModel.Clear ();
foreach (string s in this.Layouts) {
- //if (s != "__default__")
+ if (s != "__default__")
layoutsModel.AppendValues (s, true);
}
}
@@ -344,14 +346,14 @@
return null;
Gtk.VBox container = gui.GetWidget ("items_vbox") as VBox;
- Gtk.CheckButton locked_check = gui.GetWidget ("locked_check") as CheckButton;
+ locked_check = gui.GetWidget ("locked_check") as CheckButton;
Gtk.TreeView items_list = gui.GetWidget ("items_list") as TreeView;
locked_check.Toggled += AllLockedToggledCb;
if (master != null) {
- //g_signal_connect (layout->master, "notify::locked", MasterLockedNotifyCb
+ master.NotifyLocked += MasterLockedNotifyCb;
// force update now
- MasterLockedNotifyCb (master, null);
+ MasterLockedNotifyCb (master, EventArgs.Empty);
}
// set models
@@ -554,16 +556,36 @@
void AllLockedToggledCb (object sender, EventArgs a)
{
- if (master == null)
- return;
+ if (master != null)
+ master.Locked = ((CheckButton) sender).Active ? 1 : 0;
}
void MasterLockedNotifyCb (object sender, EventArgs a)
{
+ if (master.Locked == -1) {
+ locked_check.Inconsistent = true;
+ }
+ else {
+ locked_check.Inconsistent = false;
+ locked_check.Active = (master.Locked == 1);
+ }
}
- void CellEditedCb (object sender, EventArgs a)
+ void CellEditedCb (object sender, EditedArgs a)
{
+ TreeIter iter;
+ layoutsModel.GetIterFromString (out iter, a.Path);
+ string name = (string) layoutsModel.GetValue (iter, 0);
+
+ XmlNode node = FindLayout (name);
+ if (node == null)
+ return;
+ node.Attributes["name"].Value = a.NewText;
+
+ layoutsModel.SetValue (iter, 0, a.NewText);
+ layoutsModel.SetValue (iter, 1, true);
+
+ SaveLayout (a.NewText);
}
}
}
Modified: trunk/MonoDevelop/Unused/Gdl/DockMaster.cs
===================================================================
--- trunk/MonoDevelop/Unused/Gdl/DockMaster.cs 2005-03-03 23:08:13 UTC (rev 2289)
+++ trunk/MonoDevelop/Unused/Gdl/DockMaster.cs 2005-03-04 00:33:27 UTC (rev 2290)
@@ -24,6 +24,7 @@
private Hashtable unlockedItems = new Hashtable ();
public event EventHandler LayoutChanged;
+ internal event EventHandler NotifyLocked;
public DockMaster ()
{
@@ -64,6 +65,8 @@
set {
if (value >= 0)
LockUnlock (value > 0);
+ if (NotifyLocked != null)
+ NotifyLocked (this, EventArgs.Empty);
}
}
More information about the Monodevelop-patches-list
mailing list