From 4902e177423bb290bfc4d5289e6fe49e1dd93557 Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos <kourem@gmail.com> Date: Tue, 30 Aug 2005 21:03:23 +0000 Subject: [PATCH] [stephan k.] fchooser now does unicode correctly --- src/config.py | 3 +++ src/filetransfers_window.py | 3 +++ src/vcard.py | 2 ++ 3 files changed, 8 insertions(+) diff --git a/src/config.py b/src/config.py index 8561c12052..e7d11f6f72 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 44812b3943..639e690d02 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 da19d9ba92..5c9dc9045f 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: -- GitLab