[banshee/stable-1.8] FileChooserDialog: Fix error message on first launch (bgo#637303)



commit 4df1588a65629c236483002483e64919d0c1e551
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date:   Sat Dec 18 17:21:55 2010 +0100

    FileChooserDialog: Fix error message on first launch (bgo#637303)
    
    Make sure that the fallback value for the last file chooser URI is a
    proper URI.

 .../Banshee.Gui.Dialogs/FileChooserDialog.cs       |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/Core/Banshee.ThickClient/Banshee.Gui.Dialogs/FileChooserDialog.cs b/src/Core/Banshee.ThickClient/Banshee.Gui.Dialogs/FileChooserDialog.cs
index d82efc8..10a1b72 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Gui.Dialogs/FileChooserDialog.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Gui.Dialogs/FileChooserDialog.cs
@@ -31,6 +31,7 @@ using Gtk;
 
 using Banshee.Configuration;
 using Banshee.ServiceStack;
+using Hyena;
 
 namespace Banshee.Gui.Dialogs
 {
@@ -67,7 +68,8 @@ namespace Banshee.Gui.Dialogs
             base (title, parent, action)
         {
             LocalOnly = Banshee.IO.Provider.LocalOnly;
-            SetCurrentFolderUri (LastFileChooserUri.Get (Environment.GetFolderPath (Environment.SpecialFolder.Personal)));
+            string fallback = SafeUri.FilenameToUri (Environment.GetFolderPath (Environment.SpecialFolder.Personal));
+            SetCurrentFolderUri (LastFileChooserUri.Get (fallback));
             WindowPosition = WindowPosition.Center;
         }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]