[gedit-plugins] sessionsaver: Use file_new_for_uri. Fixes bug #654366



commit 3fe0feb3b42b18c7d072513a1371e209f9feab5a
Author: Pieter <pieterprovoost gmail com>
Date:   Sun Aug 14 13:55:45 2011 +0200

    sessionsaver: Use file_new_for_uri. Fixes bug #654366

 plugins/sessionsaver/store.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plugins/sessionsaver/store.py b/plugins/sessionsaver/store.py
index e0b5c39..900f84e 100644
--- a/plugins/sessionsaver/store.py
+++ b/plugins/sessionsaver/store.py
@@ -22,7 +22,7 @@
 
 import os.path
 from xml.parsers import expat
-from gi.repository import GObject
+from gi.repository import GObject, Gio
 import glib
 
 class Session(object):
@@ -37,7 +37,7 @@ class Session(object):
         return cmp(self.name.lower(), session.name.lower())
 
     def add_file(self, filename):
-        self.files.append(Gio.file_new_for_path(filename))
+        self.files.append(Gio.file_new_for_uri(filename))
 
 class SessionStore(GObject.Object):
     __gsignals__ = {



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