Mercurial > libervia-desktop-kivy
comparison cagou/plugins/plugin_wid_file_sharing.py @ 383:a90f26e89a4a
share widget: fixed crash when a text content is shared without `text` in data:
sometimes, text content is shared via a path and not directly the `text` key. This is the
case with vCards. This patch fixes share widget to handle this case.
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 04 Feb 2020 20:47:17 +0100 |
parents | 1da3c379205b |
children | d61bbbac4160 |
comparison
equal
deleted
inserted
replaced
382:c7f1176cd2a9 | 383:a90f26e89a4a |
---|---|
15 | 15 |
16 # You should have received a copy of the GNU Affero General Public License | 16 # You should have received a copy of the GNU Affero General Public License |
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. | 17 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
18 | 18 |
19 | 19 |
20 from functools import partial | |
21 import os.path | |
22 import json | |
20 from sat.core import log as logging | 23 from sat.core import log as logging |
21 from sat.core import exceptions | 24 from sat.core import exceptions |
22 log = logging.getLogger(__name__) | |
23 from sat.core.i18n import _ | 25 from sat.core.i18n import _ |
24 from sat.tools.common import files_utils | 26 from sat.tools.common import files_utils |
25 from sat_frontends.quick_frontend import quick_widgets | 27 from sat_frontends.quick_frontend import quick_widgets |
26 from sat_frontends.tools import jid | 28 from sat_frontends.tools import jid |
27 from cagou.core.constants import Const as C | 29 from cagou.core.constants import Const as C |
33 from cagou import G | 35 from cagou import G |
34 from kivy import properties | 36 from kivy import properties |
35 from kivy.uix.label import Label | 37 from kivy.uix.label import Label |
36 from kivy.uix.button import Button | 38 from kivy.uix.button import Button |
37 from kivy import utils as kivy_utils | 39 from kivy import utils as kivy_utils |
38 from functools import partial | 40 |
39 import os.path | 41 log = logging.getLogger(__name__) |
40 import json | |
41 | 42 |
42 | 43 |
43 PLUGIN_INFO = { | 44 PLUGIN_INFO = { |
44 "name": _("file sharing"), | 45 "name": _("file sharing"), |
45 "main": "FileSharing", | 46 "main": "FileSharing", |