[Monodevelop-patches-list] r1049 - in trunk/MonoDevelop/src: Libraries/MonoDevelop.Gui.Widgets/FileBrowser Main/Base/Gui/Pads
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Fri Feb 27 18:15:12 EST 2004
Author: jluke
Date: 2004-02-27 18:15:12 -0500 (Fri, 27 Feb 2004)
New Revision: 1049
Modified:
trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Widgets/FileBrowser/FileBrowser.cs
trunk/MonoDevelop/src/Main/Base/Gui/Pads/FileScout.cs
Log:
clean up and add some comments
Modified: trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Widgets/FileBrowser/FileBrowser.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Widgets/FileBrowser/FileBrowser.cs 2004-02-27 22:18:53 UTC (rev 1048)
+++ trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui.Widgets/FileBrowser/FileBrowser.cs 2004-02-27 23:15:12 UTC (rev 1049)
@@ -96,8 +96,8 @@
init = true;
}
- // jba 23 feb 04 - reneabled this property to make the file browser obey the
- // ignoreHidden property from the visual style option panel
+ // FIXME: we should watch the PropertyChanged event instead
+ // of exposing the set part
public bool IgnoreHidden
{
get { return ignoreHidden; }
@@ -157,10 +157,11 @@
{
store.Clear ();
- if (System.IO.Path.GetPathRoot(CurrentDir) == CurrentDir)
- upbutton.State = StateType.Insensitive;
- else if (upbutton.State == StateType.Insensitive)
- upbutton.State = StateType.Normal;
+ // FIXME: never turns back on
+ if (System.IO.Path.GetPathRoot (CurrentDir) == CurrentDir)
+ upbutton.Sensitive = false;
+ else if (upbutton.Sensitive == false)
+ upbutton.Sensitive = true;
DirectoryInfo di = new DirectoryInfo (CurrentDir);
DirectoryInfo[] dirs = di.GetDirectories ();
@@ -209,6 +210,7 @@
}
}
+ // FIXME: implement .PopupMenu event instead
private void OnButtonReleaseEvent (object o, ButtonReleaseEventArgs args)
{
if (args.Event.Button == 3)
Modified: trunk/MonoDevelop/src/Main/Base/Gui/Pads/FileScout.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Pads/FileScout.cs 2004-02-27 22:18:53 UTC (rev 1048)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Pads/FileScout.cs 2004-02-27 23:15:12 UTC (rev 1049)
@@ -7,8 +7,8 @@
using System;
using System.IO;
-using System.Text;
-using System.Drawing;
+//using System.Text;
+//using System.Drawing;
using System.Collections;
using System.Resources;
using ICSharpCode.Core.Properties;
@@ -292,7 +292,7 @@
public string Title {
get {
- return resourceService.GetString("MainWindow.Windows.FileScoutLabel");
+ return resourceService.GetString ("MainWindow.Windows.FileScoutLabel");
}
}
@@ -308,52 +308,32 @@
//OnIconChanged(null);
}
- FileList filelister = new FileList();
+ FileList filelister = new FileList ();
FileBrowser fb = new FileBrowser ();
- // Gtk.Entry pathEntry;
PropertyService PropertyService = (PropertyService) ServiceManager.Services.GetService (typeof (PropertyService));
public FileScout()
{
- // fb.TreeView.Selection.Changed += new EventHandler (OnDirChanged);
fb.DirectoryChangedEvent += new DirectoryChangedEventHandler (OnDirChanged);
filelister.RowActivated += new Gtk.RowActivatedHandler(FileSelected);
- Gtk.Frame treef = new Gtk.Frame();
- /*Gtk.VBox utilVBox = new Gtk.VBox (false, 0);
- Gtk.HBox hbox = new Gtk.HBox (false, 6);
- pathEntry = new Gtk.Entry (fb.CurrentDir);
- pathEntry.Activated += new EventHandler (OnPathEntryActivated);
- hbox.PackStart (pathEntry);
- Gtk.Button homeButton = new Gtk.Button ();
- Gdk.Pixbuf pix = FileIconLoader.GetPixbufForType ("gnome-home");
- homeButton.Add (new Gtk.Image (pix.ScaleSimple (20, 20, Gdk.InterpType.Bilinear)));
- homeButton.Relief = Gtk.ReliefStyle.None;
- homeButton.Clicked += new EventHandler (OnHomeClicked);
- hbox.PackStart (homeButton, false, false, 0);
- utilVBox.PackStart (hbox, false, true, 0);
- utilVBox.PackStart (pathEntry, false, true, 0);
- utilVBox.PackStart (fb);*/
- treef.Add(fb);
-
+ Gtk.Frame treef = new Gtk.Frame ();
+ treef.Add (fb);
+
Gtk.ScrolledWindow listsw = new Gtk.ScrolledWindow ();
- listsw.Add(filelister);
- /*Gtk.Frame listf = new Gtk.Frame();
- listf.Add(listsw);*/
+ listsw.Add (filelister);
- Pack1(treef, true, true);
- Pack2(listsw, true, true);
+ this.Pack1 (treef, true, true);
+ this.Pack2 (listsw, true, true);
fb.TreeView.Selection.SelectPath (new Gtk.TreePath ("0"));
- OnDirChanged(fb.CurrentDir);
+ OnDirChanged (fb.CurrentDir);
+ this.ShowAll ();
}
-
- // void OnDirChanged(object sender, EventArgs args)
void OnDirChanged (string path)
{
- // pathEntry.Text = fb.CurrentDir;
filelister.Clear ();
PropertyService p = (PropertyService)ServiceManager.Services.GetService(typeof(PropertyService));
More information about the Monodevelop-patches-list
mailing list