[Monodevelop-patches-list] r2042 - in trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Gui.Widgets: . FileSelector
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Wed Dec 1 13:18:13 EST 2004
Author: jluke
Date: 2004-12-01 13:18:13 -0500 (Wed, 01 Dec 2004)
New Revision: 2042
Modified:
trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Gui.Widgets/ChangeLog
trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Gui.Widgets/FileSelector/FileSelector.cs
Log:
2004-12-01 John Luke <john.luke at gmail.com>
* FileSelector/FileSelector.cs: modified patch
from Rubens Ramos <rubensr at users.sourceforge.net>
to use the default path from the property service
and make sure it exists before adding it as a bookmark
Modified: trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Gui.Widgets/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Gui.Widgets/ChangeLog 2004-12-01 05:51:55 UTC (rev 2041)
+++ trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Gui.Widgets/ChangeLog 2004-12-01 18:18:13 UTC (rev 2042)
@@ -1,5 +1,12 @@
2004-12-01 John Luke <john.luke at gmail.com>
+ * FileSelector/FileSelector.cs: modified patch
+ from Rubens Ramos <rubensr at users.sourceforge.net>
+ to use the default path from the property service
+ and make sure it exists before adding it as a bookmark
+
+2004-12-01 John Luke <john.luke at gmail.com>
+
* FileSelector/FileSelector.cs: improve this to take advantage
of the FileChooser and remove my old hacks that were likely buggy
use a switch for adding the buttons
Modified: trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Gui.Widgets/FileSelector/FileSelector.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Gui.Widgets/FileSelector/FileSelector.cs 2004-12-01 05:51:55 UTC (rev 2041)
+++ trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Gui.Widgets/FileSelector/FileSelector.cs 2004-12-01 18:18:13 UTC (rev 2042)
@@ -10,6 +10,7 @@
{
const string LastPathProperty = "MonoDevelop.FileSelector.LastPath";
PropertyService propertyService = (PropertyService) ServiceManager.GetService (typeof (PropertyService));
+ FileUtilityService fileUtilityService = (FileUtilityService) ServiceManager.GetService (typeof (FileUtilityService));
public FileSelector () : base (GettextCatalog.GetString ("Open file ..."), null, FileChooserAction.Open)
{
@@ -52,9 +53,12 @@
else
this.SetCurrentFolder (Environment.GetFolderPath (Environment.SpecialFolder.Personal));
- // add ~/Projects as a MD bookmark
- this.AddShortcutFolder (System.IO.Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.Personal), "Projects"));
+ // add default project path as a MD bookmark
+ string pathName = propertyService.GetProperty ("MonoDevelop.Gui.Dialogs.NewProjectDialog.DefaultPath", fileUtilityService.GetDirectoryNameWithSeparator (Environment.GetFolderPath (Environment.SpecialFolder.Personal))).ToString ();
+ if (fileUtilityService.IsDirectory (pathName))
+ this.AddShortcutFolder (pathName);
+
// FIXME: only set this once per-dialog
// perhaps in Dispose ()? or only when a file or dir is selected
this.CurrentFolderChanged += OnCurrentFolderChanged;
More information about the Monodevelop-patches-list
mailing list