Philipp Hörist pushed to branch gajim_1.0 at gajim / gajim

Commits:
c8878555 by Philipp Hörist at 2018-03-17T21:48:51+01:00
Fix displaying VCard of unknown contact

In some cases sub can be None

Fixes #8954

- - - - -
50f7abcb by Philipp Hörist at 2018-03-17T21:49:01+01:00
Allow multiple file uploads

Fixes #8957

- - - - -


2 changed files:

- gajim/common/helpers.py
- gajim/gui_interface.py


Changes:

=====================================
gajim/common/helpers.py
=====================================
--- a/gajim/common/helpers.py
+++ b/gajim/common/helpers.py
@@ -431,6 +431,8 @@ def get_uf_sub(sub):
         uf_sub = _('From')
     elif sub == 'both':
         uf_sub = _('Both')
+    elif sub is None:
+        uf_sub = _('Unknown')
     else:
         uf_sub = sub
 


=====================================
gajim/gui_interface.py
=====================================
--- a/gajim/gui_interface.py
+++ b/gajim/gui_interface.py
@@ -1154,20 +1154,22 @@ class Interface:
             action=Gtk.FileChooserAction.OPEN,
             buttons=(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
                      Gtk.STOCK_OPEN, Gtk.ResponseType.OK),
+            select_multiple=True,
             default_response=Gtk.ResponseType.OK,
             transient_for=chat_control.parent_win.window)
 
     @staticmethod
     def on_file_dialog_ok(widget, chat_control):
-        path = widget.get_filename()
+        paths = widget.get_filenames()
         widget.destroy()
         con = app.connections[chat_control.account]
         groupchat = chat_control.type_id == message_control.TYPE_GC
-        con.check_file_before_transfer(path,
-                                       chat_control.encryption,
-                                       chat_control.contact,
-                                       chat_control.session,
-                                       groupchat)
+        for path in paths:
+            con.check_file_before_transfer(path,
+                                           chat_control.encryption,
+                                           chat_control.contact,
+                                           chat_control.session,
+                                           groupchat)
 
     def encrypt_file(self, file, callback):
         app.nec.push_incoming_event(HTTPUploadProgressEvent(



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/compare/2b0eb2212dbe55a54f3a65e7b55bcb7a8f361a41...50f7abcb68c2df11c6e59ab1aa2562a35334b599

---
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/compare/2b0eb2212dbe55a54f3a65e7b55bcb7a8f361a41...50f7abcb68c2df11c6e59ab1aa2562a35334b599
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to