Mercurial > libervia-desktop-kivy
comparison cagou/core/common.py @ 322:e2b51663d8b8
core, android: new share widget + added Cagou to "share" menu:
- new intent filter to add Cagou to share menu for all media types
- minimum Kivy version is now 1.11.0
- new "Share" widget to display data to share via SàT and select the target
- new core.platform_ module (the suffix "_" avoid trouble with standard "platform"
module), for platform specific code.
- Android intent are now checked on startup and "on_new_intent" events
- if a android.intent.action.SEND action is received (i.e. some data is shared), the
"Share" widget is shown
- new Cagou.share method to share data using "Share" widget
- new Cagou.getAncestorWidget method to easily retrieve an instance of a specific class in
a widget's ancestors
- ContactList's Avatar and ContactItem widgets have been moved to core.common
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 06 Dec 2019 13:23:03 +0100 |
parents | 772c170b47a9 |
children | 38fd457b2158 |
comparison
equal
deleted
inserted
replaced
321:a6eb154ba266 | 322:e2b51663d8b8 |
---|---|
23 from kivy.uix.image import Image | 23 from kivy.uix.image import Image |
24 from kivy.uix.label import Label | 24 from kivy.uix.label import Label |
25 from kivy.uix.behaviors import ButtonBehavior | 25 from kivy.uix.behaviors import ButtonBehavior |
26 from kivy.uix.behaviors import ToggleButtonBehavior | 26 from kivy.uix.behaviors import ToggleButtonBehavior |
27 from kivy.uix.boxlayout import BoxLayout | 27 from kivy.uix.boxlayout import BoxLayout |
28 from kivy.metrics import dp | |
28 from cagou.core.constants import Const as C | 29 from cagou.core.constants import Const as C |
29 from kivy import properties | 30 from kivy import properties |
30 from cagou import G | 31 from cagou import G |
31 import json | 32 import json |
32 from sat.core import log as logging | 33 from sat.core import log as logging |
36 UNKNOWN_SYMBOL = 'Unknown symbol name' | 37 UNKNOWN_SYMBOL = 'Unknown symbol name' |
37 | 38 |
38 | 39 |
39 class IconButton(ButtonBehavior, Image): | 40 class IconButton(ButtonBehavior, Image): |
40 pass | 41 pass |
42 | |
43 | |
44 class Avatar(Image): | |
45 pass | |
46 | |
47 | |
48 class ContactItem(BoxLayout): | |
49 base_width = dp(150) | |
50 profile = properties.StringProperty() | |
51 data = properties.DictProperty() | |
52 jid = properties.StringProperty('') | |
41 | 53 |
42 | 54 |
43 class JidItem(BoxLayout): | 55 class JidItem(BoxLayout): |
44 bg_color = properties.ListProperty([0.2, 0.2, 0.2, 1]) | 56 bg_color = properties.ListProperty([0.2, 0.2, 0.2, 1]) |
45 color = properties.ListProperty([1, 1, 1, 1]) | 57 color = properties.ListProperty([1, 1, 1, 1]) |