changeset e84cdbb65d58 in /home/hg/repos/gajim
author: Yann Leboulanger asterix@lagaule.org branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=e84cdbb65d58 description: [SamWhited] fix jingleFT. Fixes #7931
diffstat:
src/chat_control.py | 6 +++--- src/common/helpers.py | 2 +- src/common/jingle_content.py | 3 ++- src/groupchat_control.py | 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-)
diffs (71 lines):
diff -r 2a21b97baa30 -r e84cdbb65d58 src/chat_control.py --- a/src/chat_control.py Wed Jan 14 22:18:04 2015 +0100 +++ b/src/chat_control.py Mon Jan 19 13:37:28 2015 +0100 @@ -2951,7 +2951,7 @@
def _on_drag_data_received(self, widget, context, x, y, selection, target_type, timestamp): - if not selection.data: + if not selection.get_data(): return if self.TYPE_ID == message_control.TYPE_PM: c = self.gc_contact @@ -2960,7 +2960,7 @@ if target_type == self.TARGET_TYPE_URI_LIST: if not c.resource: # If no resource is known, we can't send a file return - uri = selection.data.strip() + uri = selection.get_data().strip() uri_splitted = uri.split() # we may have more than one file dropped for uri in uri_splitted: path = helpers.get_file_path_from_dnd_dropped_uri(uri) @@ -2972,7 +2972,7 @@ # chat2muc treeview = gajim.interface.roster.tree model = treeview.get_model() - data = selection.data + data = selection.get_data() path = treeview.get_selection().get_selected_rows()[1][0] iter_ = model.get_iter(path) type_ = model[iter_][2] diff -r 2a21b97baa30 -r e84cdbb65d58 src/common/helpers.py --- a/src/common/helpers.py Wed Jan 14 22:18:04 2015 +0100 +++ b/src/common/helpers.py Mon Jan 19 13:37:28 2015 +0100 @@ -410,7 +410,7 @@ return command
def get_file_path_from_dnd_dropped_uri(uri): - path = urllib.parse.unquote(uri) # escape special chars + path = urllib.parse.unquote(uri.decode('utf-8')) # escape special chars path = path.strip('\r\n\x00') # remove \r\n and NULL # get the path to file if re.match('^file:///[a-zA-Z]:/', path): # windows diff -r 2a21b97baa30 -r e84cdbb65d58 src/common/jingle_content.py --- a/src/common/jingle_content.py Wed Jan 14 22:18:04 2015 +0100 +++ b/src/common/jingle_content.py Mon Jan 19 13:37:28 2015 +0100 @@ -222,7 +222,8 @@ cert = load_cert_file(certpath) if cert: try: - digest_algo = cert.get_signature_algorithm().split('With')[0] + digest_algo = cert.get_signature_algorithm().decode('utf-8' + ).split('With')[0] except AttributeError as e: # Old py-OpenSSL is missing get_signature_algorithm digest_algo = "sha256" diff -r 2a21b97baa30 -r e84cdbb65d58 src/groupchat_control.py --- a/src/groupchat_control.py Wed Jan 14 22:18:04 2015 +0100 +++ b/src/groupchat_control.py Mon Jan 19 13:37:28 2015 +0100 @@ -2276,10 +2276,10 @@ # Invite contact to groupchat treeview = gajim.interface.roster.tree model = treeview.get_model() - if not selection.data or target_type == 80: + if not selection.get_data() or target_type == 80: # target_type = 80 means a file is dropped return - data = selection.data + data = selection.get_data() path = treeview.get_selection().get_selected_rows()[1][0] iter_ = model.get_iter(path) type_ = model[iter_][2]