diff --git a/src/config.py b/src/config.py index 8561c12052434681ff57bb4475d7778d5497bda9..e7d11f6f72a395c814c0a37ae2edde13f1358edf 100644 --- a/src/config.py +++ b/src/config.py @@ -21,6 +21,7 @@ import gtk import gtk.glade import gobject import os +import sys import common.config import common.sleepy @@ -1019,6 +1020,7 @@ class PreferencesWindow: if response != gtk.RESPONSE_OK: break file = dialog.get_filename() + file = file.decode(sys.getfilesystemencoding()) if os.path.exists(file): break dialog.destroy() @@ -1989,6 +1991,7 @@ class ManageEmoticonsWindow: response = dialog.run() if response == gtk.RESPONSE_OK: file = dialog.get_filename() + file = file.decode(sys.getfilesystemencoding()) if self.image_is_ok(file): ok = True else: diff --git a/src/filetransfers_window.py b/src/filetransfers_window.py index 44812b39439d13185dd40e3e7d8f4e664d9e2d1c..639e690d02da4fb9f24f9b7a79568366bc50baaf 100644 --- a/src/filetransfers_window.py +++ b/src/filetransfers_window.py @@ -22,6 +22,7 @@ import gtk import gtk.glade import gobject import os +import sys import gtkgui_helpers import tooltips @@ -241,6 +242,7 @@ _('Connection with peer cannot be established.')) files_path_list = dialog.get_filenames() dialog.destroy() for file_path in files_path_list: + file_path = file_path.decode(sys.getfilesystemencoding()) if os.path.isfile(file_path): file_dir = os.path.dirname(file_path) self.send_file(account, contact, file_path) @@ -297,6 +299,7 @@ _('Connection with peer cannot be established.')) response = dialog.run() if response == gtk.RESPONSE_OK: file_path = dialog.get_filename() + file_path = file_path.decode('utf-8') if os.path.exists(file_path): #FIXME: pango does not work here. #FIXME: if gtk2.8 do this via signal diff --git a/src/vcard.py b/src/vcard.py index da19d9ba9262ff63b43fc84add5460939d5df898..5c9dc9045fd8d8ea68566554bd7875519ff206cd 100644 --- a/src/vcard.py +++ b/src/vcard.py @@ -23,6 +23,7 @@ import urllib import base64 import mimetypes import os +import sys import dialogs from common import helpers @@ -154,6 +155,7 @@ class VcardWindow: response = dialog.run() if response == gtk.RESPONSE_OK: f = dialog.get_filename() + f = f.decode(sys.getfilesystemencoding()) if self.image_is_ok(f): ok = True else: