Commits

Erik Grinaker committed cace24e

~ in filenames will now be expanded to homedir

Comments (0)

Files changed (4)

 
 ---------------[ xxxx-xx-xx : 0.4.6 ]---------------
 
+2006-01-25  Erik Grinaker <erikg@codepoet.no>
+
+	* ~ in filenames will now be expanded to homedir
+
 2006-01-24  Erik Grinaker <erikg@codepoet.no>
 
 	* make password entry min 16px to avoid resize on icon display
 - fix crash in Password Safe import/export with fields longer than 256 chars
 - use full path when starting Revelation from applet
 - use correct key path for applet show_passwords gconf schema key
+- ~ in filenames will now be expanded to homedir
 - changed default file format for export to XML
 - changed button "Edit" to "Update" in edit entry dialog
 - remove GNOME_RevelationApplet.server during make clean
 		return None
 
 	file = re.sub("^file:/{,2}", "", file)
+	file = os.path.expanduser(file)
 
 	if not re.match("^[a-zA-Z]+://", file) and file[0] != "/":
 		file = os.path.abspath(file)
 
 		try:
 			fsel = dialog.FileSelector(None, self.title, self.type)
-
-			fsel.set_filename(self.get_filename())
+			file = self.get_filename()
+
+			if file != None:
+				fsel.set_filename(file)
+
 			self.set_filename(fsel.run())
 
 		except dialog.CancelError:
 	def get_filename(self):
 		"Gets the current filename"
 
-		return self.entry.get_text()
+		return io.file_normpath(self.entry.get_text())
 
 
 	def get_text(self):