[stephan k.] fchooser now does unicode correctly
This commit is contained in:
parent
99699d60e0
commit
4902e17742
3 changed files with 8 additions and 0 deletions
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue