Skip to content
Snippets Groups Projects
Commit 4902e177 authored by nkour's avatar nkour
Browse files

[stephan k.] fchooser now does unicode correctly

parent 99699d60
No related branches found
No related tags found
No related merge requests found
...@@ -21,6 +21,7 @@ import gtk ...@@ -21,6 +21,7 @@ import gtk
import gtk.glade import gtk.glade
import gobject import gobject
import os import os
import sys
import common.config import common.config
import common.sleepy import common.sleepy
...@@ -1019,6 +1020,7 @@ class PreferencesWindow: ...@@ -1019,6 +1020,7 @@ class PreferencesWindow:
if response != gtk.RESPONSE_OK: if response != gtk.RESPONSE_OK:
break break
file = dialog.get_filename() file = dialog.get_filename()
file = file.decode(sys.getfilesystemencoding())
if os.path.exists(file): if os.path.exists(file):
break break
dialog.destroy() dialog.destroy()
...@@ -1989,6 +1991,7 @@ class ManageEmoticonsWindow: ...@@ -1989,6 +1991,7 @@ class ManageEmoticonsWindow:
response = dialog.run() response = dialog.run()
if response == gtk.RESPONSE_OK: if response == gtk.RESPONSE_OK:
file = dialog.get_filename() file = dialog.get_filename()
file = file.decode(sys.getfilesystemencoding())
if self.image_is_ok(file): if self.image_is_ok(file):
ok = True ok = True
else: else:
......
...@@ -22,6 +22,7 @@ import gtk ...@@ -22,6 +22,7 @@ import gtk
import gtk.glade import gtk.glade
import gobject import gobject
import os import os
import sys
import gtkgui_helpers import gtkgui_helpers
import tooltips import tooltips
...@@ -241,6 +242,7 @@ _('Connection with peer cannot be established.')) ...@@ -241,6 +242,7 @@ _('Connection with peer cannot be established.'))
files_path_list = dialog.get_filenames() files_path_list = dialog.get_filenames()
dialog.destroy() dialog.destroy()
for file_path in files_path_list: for file_path in files_path_list:
file_path = file_path.decode(sys.getfilesystemencoding())
if os.path.isfile(file_path): if os.path.isfile(file_path):
file_dir = os.path.dirname(file_path) file_dir = os.path.dirname(file_path)
self.send_file(account, contact, file_path) self.send_file(account, contact, file_path)
...@@ -297,6 +299,7 @@ _('Connection with peer cannot be established.')) ...@@ -297,6 +299,7 @@ _('Connection with peer cannot be established.'))
response = dialog.run() response = dialog.run()
if response == gtk.RESPONSE_OK: if response == gtk.RESPONSE_OK:
file_path = dialog.get_filename() file_path = dialog.get_filename()
file_path = file_path.decode('utf-8')
if os.path.exists(file_path): if os.path.exists(file_path):
#FIXME: pango does not work here. #FIXME: pango does not work here.
#FIXME: if gtk2.8 do this via signal #FIXME: if gtk2.8 do this via signal
......
...@@ -23,6 +23,7 @@ import urllib ...@@ -23,6 +23,7 @@ import urllib
import base64 import base64
import mimetypes import mimetypes
import os import os
import sys
import dialogs import dialogs
from common import helpers from common import helpers
...@@ -154,6 +155,7 @@ class VcardWindow: ...@@ -154,6 +155,7 @@ class VcardWindow:
response = dialog.run() response = dialog.run()
if response == gtk.RESPONSE_OK: if response == gtk.RESPONSE_OK:
f = dialog.get_filename() f = dialog.get_filename()
f = f.decode(sys.getfilesystemencoding())
if self.image_is_ok(f): if self.image_is_ok(f):
ok = True ok = True
else: else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment