[Monodevelop-patches-list] r542 - in trunk/MonoDevelop/src: Libraries/MonoDevelop.Gui/Tree Main/Base/Gui/Pads

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Sun Jan 18 13:34:45 EST 2004


Author: pedroas
Date: 2004-01-18 13:34:45 -0500 (Sun, 18 Jan 2004)
New Revision: 542

Modified:
   trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/Tree/TreeNode.cs
   trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/Tree/TreeView.cs
   trunk/MonoDevelop/src/Main/Base/Gui/Pads/FileScout.cs
Log:
Flush, small fixes


Modified: trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/Tree/TreeNode.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/Tree/TreeNode.cs	2004-01-18 18:16:55 UTC (rev 541)
+++ trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/Tree/TreeNode.cs	2004-01-18 18:34:45 UTC (rev 542)
@@ -100,11 +100,10 @@
 			if (TreeView != null) {
 				TreeView.ExpandToPath(new Gtk.TreePath(TreePath));
 			}
-			//throw new NotImplementedException("Expand");
 		}
 		
 		public void EnsureVisible() {
-			//TODO
+			Expand(); // TODO
 		}
 		
 		public void Remove() {

Modified: trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/Tree/TreeView.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/Tree/TreeView.cs	2004-01-18 18:16:55 UTC (rev 541)
+++ trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/Tree/TreeView.cs	2004-01-18 18:34:45 UTC (rev 542)
@@ -7,6 +7,7 @@
 		private Gtk.TreeStore store;
 		private TreeNodeCollection nodes;
 		private bool updating = false;
+		private bool canEdit = false;
 		
 		public TreeView () : this (false)
 		{
@@ -15,6 +16,7 @@
 		public TreeView(bool canEdit) {
 			store = new Gtk.TreeStore(typeof(string), typeof(Gdk.Pixbuf), typeof(TreeNode));
 			this.Model = store;
+			this.canEdit = canEdit;
 
 			HeadersVisible = false;
 			Gtk.TreeViewColumn complete_column = new Gtk.TreeViewColumn ();
@@ -69,16 +71,25 @@
 				return (TreeNode) store.GetValue(iter, 2);
 			}
 			set {
-				throw new NotImplementedException();
+				Gtk.TreeIter iter;
+				if (store.GetIterFirst(out iter) == false) {
+					return;
+				}
+				do {
+					if (store.GetValue(iter, 2) == value) {
+						Selection.SelectIter(iter);
+						return;
+					} 
+				} while (store.IterNext(out iter) == true);
 			}
 		}
 		
 		public bool LabelEdit {
 			get {
-				return false;
+				return canEdit;
 			}
 			set {
-				// TODO
+				canEdit = value;
 			}
 		}
 		

Modified: trunk/MonoDevelop/src/Main/Base/Gui/Pads/FileScout.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Pads/FileScout.cs	2004-01-18 18:16:55 UTC (rev 541)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Pads/FileScout.cs	2004-01-18 18:34:45 UTC (rev 542)
@@ -83,7 +83,7 @@
 //			menu.MenuCommands.Add(new MagicMenus.MenuCommand("Rename", new EventHandler(renameFile)));
 			
 			try {
-				//watcher = new FileSystemWatcher();
+				watcher = new FileSystemWatcher();
 			} catch {}
 			
 			if(watcher != null) {
@@ -238,7 +238,7 @@
 				return;
 			}
 			
-			//watcher.Path = path;
+			watcher.Path = path;
 			//watcher.EnableRaisingEvents = true;
 			
 			foreach (string file in files) {
@@ -439,7 +439,11 @@
 		void OnDirChanged(object sender, EventArgs args) 
 /*		void DirectorySelected(object sender, TreeViewEventArgs e)*/
 		{
-			filelister.ShowFilesInPath(filetree.NodePath + System.IO.Path.DirectorySeparatorChar);
+			//filelister.ShowFilesInPath(filetree.NodePath + System.IO.Path.DirectorySeparatorChar);
+			if (filetree.NodePath[filetree.NodePath.Length - 1] == System.IO.Path.DirectorySeparatorChar)
+				filelister.ShowFilesInPath(filetree.NodePath);
+			else
+				filelister.ShowFilesInPath(filetree.NodePath + System.IO.Path.DirectorySeparatorChar);			
 		}
 
 //		void FileSelected(object sender, EventArgs e)




More information about the Monodevelop-patches-list mailing list