default to home folder when choosing an avatar. Fixes #1701

This commit is contained in:
Yann Leboulanger 2006-03-14 23:07:45 +00:00
parent bb35e9e782
commit 1c992be553
1 changed files with 9 additions and 0 deletions

View File

@ -192,6 +192,15 @@ class VcardWindow:
gtk.FILE_CHOOSER_ACTION_OPEN,
(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
gtk.STOCK_OPEN, gtk.RESPONSE_OK))
try:
if os.name == 'nt':
path = os.environ['USERPROFILE']
else:
path = os.environ['HOME']
except:
path = ''
if path:
dialog.set_current_folder(path)
dialog.set_default_response(gtk.RESPONSE_OK)
filtr = gtk.FileFilter()
filtr.set_name(_('All files'))