[Monodevelop-patches-list] r455 - in trunk/MonoDevelop/src: Libraries/MonoDevelop.Gui/Tree Main/Base/Gui/Pads/ProjectBrowser
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Sun Jan 11 19:23:50 EST 2004
Author: tberman
Date: 2004-01-11 19:23:50 -0500 (Sun, 11 Jan 2004)
New Revision: 455
Modified:
trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/Tree/TreeView.cs
trunk/MonoDevelop/src/Main/Base/Gui/Pads/ProjectBrowser/ProjectBrowserView.cs
Log:
some small touches, the project view is editable now, but it doesnt actually edit yet ;)
Modified: trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/Tree/TreeView.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/Tree/TreeView.cs 2004-01-11 23:49:56 UTC (rev 454)
+++ trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/Tree/TreeView.cs 2004-01-12 00:23:50 UTC (rev 455)
@@ -8,7 +8,11 @@
private TreeNodeCollection nodes;
private bool updating = false;
- public TreeView() {
+ public TreeView () : this (false)
+ {
+ }
+
+ public TreeView(bool canEdit) {
store = new Gtk.TreeStore(typeof(string), typeof(Gdk.Pixbuf), typeof(TreeNode));
this.Model = store;
@@ -21,6 +25,10 @@
complete_column.AddAttribute (pix_render, "pixbuf", 1);
Gtk.CellRendererText text_render = new Gtk.CellRendererText ();
+ text_render.Editable = canEdit;
+ if (canEdit) {
+ text_render.Edited += new GtkSharp.EditedHandler (OnEdit);
+ }
complete_column.PackStart (text_render, true);
complete_column.AddAttribute (text_render, "text", 0);
@@ -34,6 +42,11 @@
TestExpandRow += new GtkSharp.TestExpandRowHandler(OnTestExpandRow);
}
+ public virtual void OnEdit (object o, GtkSharp.EditedArgs e)
+ {
+
+ }
+
public TreeNodeCollection Nodes {
get {
return nodes;
Modified: trunk/MonoDevelop/src/Main/Base/Gui/Pads/ProjectBrowser/ProjectBrowserView.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Pads/ProjectBrowser/ProjectBrowserView.cs 2004-01-11 23:49:56 UTC (rev 454)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Pads/ProjectBrowser/ProjectBrowserView.cs 2004-01-12 00:23:50 UTC (rev 455)
@@ -86,7 +86,7 @@
//projectBrowserImageList = new ImageList();
//projectBrowserImageList.ColorDepth = ColorDepth.Depth32Bit;
}
- public ProjectBrowserView()
+ public ProjectBrowserView() : base (true)
{
//LabelEdit = true;
//AllowDrop = true;
@@ -175,6 +175,13 @@
}
}
+ public override void OnEdit (object o, GtkSharp.EditedArgs e)
+ {
+ //FIXME: We need to change the filename and refresh the view here
+ //FIXME: We should also be checking to make sure the filename *actually* changed
+ Console.WriteLine ("Filename needs to be changed here");
+ }
+
void DisposeProjectNodes()
{
if (Nodes.Count == 1) {
More information about the Monodevelop-patches-list
mailing list