From 1c992be55375ecaf838e3bf680a49114936f16de Mon Sep 17 00:00:00 2001
From: Yann Leboulanger <asterix@lagaule.org>
Date: Tue, 14 Mar 2006 23:07:45 +0000
Subject: [PATCH] default to home folder when choosing an avatar. Fixes #1701

---
 src/vcard.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/vcard.py b/src/vcard.py
index fca54418c0..a6de9d2441 100644
--- a/src/vcard.py
+++ b/src/vcard.py
@@ -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'))
-- 
GitLab