Mercurial > libervia-desktop-kivy
annotate cagou/core/menu.py @ 168:397f2fb67aab
core (menu): animate transfer menu opening/closing + close it on [ESC]/back
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 28 Apr 2018 16:22:50 +0200 |
parents | cd99f70ea592 |
children | 5cf17930bb09 |
rev | line source |
---|---|
51 | 1 #!/usr/bin/python |
2 # -*- coding: utf-8 -*- | |
3 | |
4 # Cagou: desktop/mobile frontend for Salut à Toi XMPP client | |
126 | 5 # Copyright (C) 2016-2018 Jérôme Poisson (goffi@goffi.org) |
51 | 6 |
7 # This program is free software: you can redistribute it and/or modify | |
8 # it under the terms of the GNU Affero General Public License as published by | |
9 # the Free Software Foundation, either version 3 of the License, or | |
10 # (at your option) any later version. | |
11 | |
12 # This program is distributed in the hope that it will be useful, | |
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 # GNU Affero General Public License for more details. | |
16 | |
17 # You should have received a copy of the GNU Affero General Public License | |
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
19 | |
20 | |
21 from sat.core.i18n import _ | |
22 from sat.core import log as logging | |
23 log = logging.getLogger(__name__) | |
24 from cagou.core.constants import Const as C | |
85
c2a7234d13d2
menu: use of garden's contextmenu for menus
Goffi <goffi@goffi.org>
parents:
53
diff
changeset
|
25 from kivy.uix.boxlayout import BoxLayout |
51 | 26 from kivy.uix.label import Label |
27 from kivy.uix.popup import Popup | |
28 from kivy import properties | |
85
c2a7234d13d2
menu: use of garden's contextmenu for menus
Goffi <goffi@goffi.org>
parents:
53
diff
changeset
|
29 from kivy.garden import contextmenu |
51 | 30 from sat_frontends.quick_frontend import quick_menus |
168
397f2fb67aab
core (menu): animate transfer menu opening/closing + close it on [ESC]/back
Goffi <goffi@goffi.org>
parents:
126
diff
changeset
|
31 from kivy.core.window import Window |
397f2fb67aab
core (menu): animate transfer menu opening/closing + close it on [ESC]/back
Goffi <goffi@goffi.org>
parents:
126
diff
changeset
|
32 from kivy.animation import Animation |
51 | 33 from cagou import G |
34 import webbrowser | |
35 | |
36 ABOUT_TITLE = _(u"About {}".format(C.APP_NAME)) | |
37 ABOUT_CONTENT = _(u"""Cagou (Salut à Toi) v{} | |
38 | |
39 Cagou is a libre communication tool based on libre standard XMPP. | |
40 | |
41 Cagou is part of the "Salut à Toi" project | |
42 more informations at [color=5500ff][ref=website]salut-a-toi.org[/ref][/color] | |
43 """).format(C.APP_VERSION) | |
44 | |
45 | |
46 class AboutContent(Label): | |
47 | |
48 def on_ref_press(self, value): | |
49 if value == "website": | |
50 webbrowser.open("https://salut-a-toi.org") | |
51 | |
52 | |
53 class AboutPopup(Popup): | |
54 | |
55 def on_touch_down(self, touch): | |
56 if self.collide_point(*touch.pos): | |
57 self.dismiss() | |
58 return super(AboutPopup, self).on_touch_down(touch) | |
59 | |
60 | |
85
c2a7234d13d2
menu: use of garden's contextmenu for menus
Goffi <goffi@goffi.org>
parents:
53
diff
changeset
|
61 class MainMenu(contextmenu.AppMenu): |
c2a7234d13d2
menu: use of garden's contextmenu for menus
Goffi <goffi@goffi.org>
parents:
53
diff
changeset
|
62 pass |
c2a7234d13d2
menu: use of garden's contextmenu for menus
Goffi <goffi@goffi.org>
parents:
53
diff
changeset
|
63 |
c2a7234d13d2
menu: use of garden's contextmenu for menus
Goffi <goffi@goffi.org>
parents:
53
diff
changeset
|
64 |
c2a7234d13d2
menu: use of garden's contextmenu for menus
Goffi <goffi@goffi.org>
parents:
53
diff
changeset
|
65 class MenuItem(contextmenu.ContextMenuTextItem): |
51 | 66 item = properties.ObjectProperty() |
67 | |
68 def on_item(self, instance, item): | |
69 self.text = item.name | |
70 | |
71 def on_release(self): | |
85
c2a7234d13d2
menu: use of garden's contextmenu for menus
Goffi <goffi@goffi.org>
parents:
53
diff
changeset
|
72 super(MenuItem, self).on_release() |
c2a7234d13d2
menu: use of garden's contextmenu for menus
Goffi <goffi@goffi.org>
parents:
53
diff
changeset
|
73 self.parent.hide() |
51 | 74 selected = G.host.selected_widget |
75 profile = None | |
76 if selected is not None: | |
77 try: | |
78 profile = selected.profile | |
79 except AttributeError: | |
80 pass | |
81 | |
82 if profile is None: | |
83 try: | |
84 profile = list(selected.profiles)[0] | |
85 except (AttributeError, IndexError): | |
86 try: | |
87 profile = list(G.host.profiles)[0] | |
88 except IndexError: | |
89 log.warning(u"Can't find profile") | |
90 self.item.call(selected, profile) | |
91 | |
92 | |
85
c2a7234d13d2
menu: use of garden's contextmenu for menus
Goffi <goffi@goffi.org>
parents:
53
diff
changeset
|
93 class MenuSeparator(contextmenu.ContextMenuDivider): |
51 | 94 pass |
95 | |
96 | |
85
c2a7234d13d2
menu: use of garden's contextmenu for menus
Goffi <goffi@goffi.org>
parents:
53
diff
changeset
|
97 class RootMenuContainer(contextmenu.AppMenuTextItem): |
c2a7234d13d2
menu: use of garden's contextmenu for menus
Goffi <goffi@goffi.org>
parents:
53
diff
changeset
|
98 pass |
51 | 99 |
100 | |
85
c2a7234d13d2
menu: use of garden's contextmenu for menus
Goffi <goffi@goffi.org>
parents:
53
diff
changeset
|
101 class MenuContainer(contextmenu.ContextMenuTextItem): |
c2a7234d13d2
menu: use of garden's contextmenu for menus
Goffi <goffi@goffi.org>
parents:
53
diff
changeset
|
102 pass |
51 | 103 |
104 | |
85
c2a7234d13d2
menu: use of garden's contextmenu for menus
Goffi <goffi@goffi.org>
parents:
53
diff
changeset
|
105 class MenusWidget(BoxLayout): |
51 | 106 |
107 def update(self, type_, caller=None): | |
108 """Method to call when menus have changed | |
109 | |
110 @param type_(unicode): menu type like in sat.core.sat_main.importMenu | |
111 @param caller(Widget): instance linked to the menus | |
112 """ | |
113 self.menus_container = G.host.menus.getMainContainer(type_) | |
114 self.createMenus(caller) | |
115 | |
116 def _buildMenus(self, container, caller=None): | |
117 """Recursively build menus of the container | |
118 | |
119 @param container(quick_menus.MenuContainer): menu container | |
120 @param caller(Widget): instance linked to the menus | |
121 """ | |
122 if caller is None: | |
85
c2a7234d13d2
menu: use of garden's contextmenu for menus
Goffi <goffi@goffi.org>
parents:
53
diff
changeset
|
123 main_menu = MainMenu() |
c2a7234d13d2
menu: use of garden's contextmenu for menus
Goffi <goffi@goffi.org>
parents:
53
diff
changeset
|
124 self.add_widget(main_menu) |
c2a7234d13d2
menu: use of garden's contextmenu for menus
Goffi <goffi@goffi.org>
parents:
53
diff
changeset
|
125 caller = main_menu |
c2a7234d13d2
menu: use of garden's contextmenu for menus
Goffi <goffi@goffi.org>
parents:
53
diff
changeset
|
126 else: |
c2a7234d13d2
menu: use of garden's contextmenu for menus
Goffi <goffi@goffi.org>
parents:
53
diff
changeset
|
127 context_menu = contextmenu.ContextMenu() |
c2a7234d13d2
menu: use of garden's contextmenu for menus
Goffi <goffi@goffi.org>
parents:
53
diff
changeset
|
128 caller.add_widget(context_menu) |
c2a7234d13d2
menu: use of garden's contextmenu for menus
Goffi <goffi@goffi.org>
parents:
53
diff
changeset
|
129 # FIXME: next line is needed after parent is set to avoid a display bug in contextmenu |
c2a7234d13d2
menu: use of garden's contextmenu for menus
Goffi <goffi@goffi.org>
parents:
53
diff
changeset
|
130 # TODO: fix this upstream |
c2a7234d13d2
menu: use of garden's contextmenu for menus
Goffi <goffi@goffi.org>
parents:
53
diff
changeset
|
131 context_menu._on_visible(False) |
c2a7234d13d2
menu: use of garden's contextmenu for menus
Goffi <goffi@goffi.org>
parents:
53
diff
changeset
|
132 |
c2a7234d13d2
menu: use of garden's contextmenu for menus
Goffi <goffi@goffi.org>
parents:
53
diff
changeset
|
133 caller = context_menu |
c2a7234d13d2
menu: use of garden's contextmenu for menus
Goffi <goffi@goffi.org>
parents:
53
diff
changeset
|
134 |
51 | 135 for child in container.getActiveMenus(): |
136 if isinstance(child, quick_menus.MenuContainer): | |
85
c2a7234d13d2
menu: use of garden's contextmenu for menus
Goffi <goffi@goffi.org>
parents:
53
diff
changeset
|
137 if isinstance(caller, MainMenu): |
c2a7234d13d2
menu: use of garden's contextmenu for menus
Goffi <goffi@goffi.org>
parents:
53
diff
changeset
|
138 menu_container = RootMenuContainer() |
c2a7234d13d2
menu: use of garden's contextmenu for menus
Goffi <goffi@goffi.org>
parents:
53
diff
changeset
|
139 else: |
c2a7234d13d2
menu: use of garden's contextmenu for menus
Goffi <goffi@goffi.org>
parents:
53
diff
changeset
|
140 menu_container = MenuContainer() |
51 | 141 menu_container.text = child.name |
142 caller.add_widget(menu_container) | |
143 self._buildMenus(child, caller=menu_container) | |
144 elif isinstance(child, quick_menus.MenuSeparator): | |
145 wid = MenuSeparator() | |
146 caller.add_widget(wid) | |
147 elif isinstance(child, quick_menus.MenuItem): | |
148 wid = MenuItem(item=child) | |
149 caller.add_widget(wid) | |
150 else: | |
151 log.error(u"Unknown child type: {}".format(child)) | |
152 | |
153 def createMenus(self, caller): | |
154 self.clear_widgets() | |
155 self._buildMenus(self.menus_container, caller) | |
156 | |
157 def onAbout(self): | |
158 about = AboutPopup() | |
159 about.title = ABOUT_TITLE | |
160 about.content = AboutContent(text=ABOUT_CONTENT, markup=True) | |
161 about.open() | |
86 | 162 |
163 | |
97
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
164 class TransferItem(BoxLayout): |
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
165 plug_info = properties.DictProperty() |
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
166 |
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
167 def on_touch_up(self, touch): |
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
168 if not self.collide_point(*touch.pos): |
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
169 return super(TransferItem, self).on_touch_up(touch) |
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
170 else: |
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
171 transfer_menu = self.parent |
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
172 while not isinstance(transfer_menu, TransferMenu): |
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
173 transfer_menu = transfer_menu.parent |
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
174 transfer_menu.do_callback(self.plug_info) |
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
175 return True |
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
176 |
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
177 |
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
178 class TransferMenu(BoxLayout): |
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
179 """transfer menu which handle display and callbacks""" |
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
180 # callback will be called with path to file to transfer |
86 | 181 callback = properties.ObjectProperty() |
182 # cancel callback need to remove the widget for UI | |
183 # will be called with the widget to remove as argument | |
184 cancel_cb = properties.ObjectProperty() | |
97
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
185 # profiles if set will be sent to transfer widget, may be used to get specific files |
86 | 186 profiles = properties.ObjectProperty() |
97
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
187 transfer_txt = _(u"Beware! The file will be sent to your server and stay unencrypted there\nServer admin(s) can see the file, and they choose how, when and if it will be deleted") |
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
188 send_txt = _(u"The file will be sent unencrypted directly to your contact (without transiting by the server), except in some cases") |
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
189 items_layout = properties.ObjectProperty() |
86 | 190 |
191 def __init__(self, **kwargs): | |
97
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
192 super(TransferMenu, self).__init__(**kwargs) |
86 | 193 if self.cancel_cb is None: |
97
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
194 self.cancel_cb = self.onTransferCancelled |
86 | 195 if self.profiles is None: |
196 self.profiles = iter(G.host.profiles) | |
97
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
197 for plug_info in G.host.getPluggedWidgets(type_=C.PLUG_TYPE_TRANSFER): |
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
198 item = TransferItem( |
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
199 plug_info = plug_info |
86 | 200 ) |
97
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
201 self.items_layout.add_widget(item) |
86 | 202 |
203 def show(self, caller_wid=None): | |
168
397f2fb67aab
core (menu): animate transfer menu opening/closing + close it on [ESC]/back
Goffi <goffi@goffi.org>
parents:
126
diff
changeset
|
204 self.size_hint_y = 0 |
397f2fb67aab
core (menu): animate transfer menu opening/closing + close it on [ESC]/back
Goffi <goffi@goffi.org>
parents:
126
diff
changeset
|
205 Window.bind(on_keyboard=self.key_input) |
97
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
206 G.host.app.root.add_widget(self) |
168
397f2fb67aab
core (menu): animate transfer menu opening/closing + close it on [ESC]/back
Goffi <goffi@goffi.org>
parents:
126
diff
changeset
|
207 Animation(size_hint_y=0.5, d=2, t='out_elastic').start(self) |
397f2fb67aab
core (menu): animate transfer menu opening/closing + close it on [ESC]/back
Goffi <goffi@goffi.org>
parents:
126
diff
changeset
|
208 |
397f2fb67aab
core (menu): animate transfer menu opening/closing + close it on [ESC]/back
Goffi <goffi@goffi.org>
parents:
126
diff
changeset
|
209 def hide(self): |
397f2fb67aab
core (menu): animate transfer menu opening/closing + close it on [ESC]/back
Goffi <goffi@goffi.org>
parents:
126
diff
changeset
|
210 Window.unbind(on_keyboard=self.key_input) |
397f2fb67aab
core (menu): animate transfer menu opening/closing + close it on [ESC]/back
Goffi <goffi@goffi.org>
parents:
126
diff
changeset
|
211 anim = Animation(size_hint_y=0, d=0.3) |
397f2fb67aab
core (menu): animate transfer menu opening/closing + close it on [ESC]/back
Goffi <goffi@goffi.org>
parents:
126
diff
changeset
|
212 anim.bind(on_complete=lambda anim, menu: self.parent.remove_widget(self)) |
397f2fb67aab
core (menu): animate transfer menu opening/closing + close it on [ESC]/back
Goffi <goffi@goffi.org>
parents:
126
diff
changeset
|
213 anim.start(self) |
97
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
214 |
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
215 def on_touch_down(self, touch): |
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
216 # we remove the menu if we click outside |
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
217 # else we want to handle the event, but not |
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
218 # transmit it to parents |
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
219 if not self.collide_point(*touch.pos): |
168
397f2fb67aab
core (menu): animate transfer menu opening/closing + close it on [ESC]/back
Goffi <goffi@goffi.org>
parents:
126
diff
changeset
|
220 self.hide() |
86 | 221 else: |
97
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
222 return super(TransferMenu, self).on_touch_down(touch) |
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
223 return True |
86 | 224 |
168
397f2fb67aab
core (menu): animate transfer menu opening/closing + close it on [ESC]/back
Goffi <goffi@goffi.org>
parents:
126
diff
changeset
|
225 def key_input(self, window, key, scancode, codepoint, modifier): |
397f2fb67aab
core (menu): animate transfer menu opening/closing + close it on [ESC]/back
Goffi <goffi@goffi.org>
parents:
126
diff
changeset
|
226 if key == 27: |
397f2fb67aab
core (menu): animate transfer menu opening/closing + close it on [ESC]/back
Goffi <goffi@goffi.org>
parents:
126
diff
changeset
|
227 self.hide() |
397f2fb67aab
core (menu): animate transfer menu opening/closing + close it on [ESC]/back
Goffi <goffi@goffi.org>
parents:
126
diff
changeset
|
228 return True |
397f2fb67aab
core (menu): animate transfer menu opening/closing + close it on [ESC]/back
Goffi <goffi@goffi.org>
parents:
126
diff
changeset
|
229 |
86 | 230 def _closeUI(self, wid): |
231 G.host.closeUI() | |
232 | |
97
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
233 def onTransferCancelled(self, wid, cleaning_cb=None): |
86 | 234 self._closeUI(wid) |
88
3dc526bb4a5a
upload: plugin android gallery, first draft:
Goffi <goffi@goffi.org>
parents:
86
diff
changeset
|
235 if cleaning_cb is not None: |
3dc526bb4a5a
upload: plugin android gallery, first draft:
Goffi <goffi@goffi.org>
parents:
86
diff
changeset
|
236 cleaning_cb() |
86 | 237 |
238 def do_callback(self, plug_info): | |
97
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
239 self.parent.remove_widget(self) |
86 | 240 if self.callback is None: |
97
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
241 log.warning(u"TransferMenu callback is not set") |
86 | 242 else: |
243 wid = None | |
88
3dc526bb4a5a
upload: plugin android gallery, first draft:
Goffi <goffi@goffi.org>
parents:
86
diff
changeset
|
244 external = plug_info.get('external', False) |
97
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
245 def onTransferCb(file_path, cleaning_cb=None): |
88
3dc526bb4a5a
upload: plugin android gallery, first draft:
Goffi <goffi@goffi.org>
parents:
86
diff
changeset
|
246 if not external: |
3dc526bb4a5a
upload: plugin android gallery, first draft:
Goffi <goffi@goffi.org>
parents:
86
diff
changeset
|
247 self._closeUI(wid) |
98
4d8c122b86a6
menu (upload): send transfer (i.e. P2P transfer) is now working
Goffi <goffi@goffi.org>
parents:
97
diff
changeset
|
248 self.callback( |
4d8c122b86a6
menu (upload): send transfer (i.e. P2P transfer) is now working
Goffi <goffi@goffi.org>
parents:
97
diff
changeset
|
249 file_path, |
4d8c122b86a6
menu (upload): send transfer (i.e. P2P transfer) is now working
Goffi <goffi@goffi.org>
parents:
97
diff
changeset
|
250 cleaning_cb, |
4d8c122b86a6
menu (upload): send transfer (i.e. P2P transfer) is now working
Goffi <goffi@goffi.org>
parents:
97
diff
changeset
|
251 transfer_type = C.TRANSFER_UPLOAD if self.ids['upload_btn'].state == "down" else C.TRANSFER_SEND) |
97
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
88
diff
changeset
|
252 wid = plug_info['factory'](plug_info, onTransferCb, self.cancel_cb, self.profiles) |
88
3dc526bb4a5a
upload: plugin android gallery, first draft:
Goffi <goffi@goffi.org>
parents:
86
diff
changeset
|
253 if not external: |
3dc526bb4a5a
upload: plugin android gallery, first draft:
Goffi <goffi@goffi.org>
parents:
86
diff
changeset
|
254 G.host.showExtraUI(wid) |