From d72dcac4204ad392bafd93adb31c9c1c32a81a60 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Manuel=20Qui=C3=B1ones?= <manuq@laptop.org>
Date: Thu, 6 Dec 2012 16:35:43 -0300
Subject: [PATCH shell 1/2] Neighborhood AP icons: popdown palette inmediatly
after mouse click - SL #4191
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Mail-Followup-To: <sugar-devel@lists.sugarlabs.org>
The current implementation of the palette requires that we explicitly
call the popdown method of the palette after each item is activated.
This affects the mouse interaction, in touch interaction the palette
is dismissed correctly.
Signed-off-by: Manuel Quiñones <manuq@laptop.org>
---
src/jarabe/desktop/networkviews.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/jarabe/desktop/networkviews.py b/src/jarabe/desktop/networkviews.py
index 63e860d..268a705 100644
a
|
b
|
class WirelessNetworkView(EventPulsingIcon): |
274 | 274 | self.props.alpha = 1.0 |
275 | 275 | |
276 | 276 | def __disconnect_activate_cb(self, item): |
| 277 | self._palette.popdown(immediate=True) |
277 | 278 | ap_paths = self._access_points.keys() |
278 | 279 | network.disconnect_access_points(ap_paths) |
279 | 280 | |
… |
… |
class WirelessNetworkView(EventPulsingIcon): |
341 | 342 | return wireless_security |
342 | 343 | |
343 | 344 | def __connect_activate_cb(self, icon): |
| 345 | self._palette.popdown(immediate=True) |
344 | 346 | self._connect() |
345 | 347 | |
346 | 348 | def _connect(self): |
… |
… |
class SugarAdhocView(EventPulsingIcon): |
521 | 523 | return palette_ |
522 | 524 | |
523 | 525 | def __connect_activate_cb(self, icon): |
| 526 | self._palette.popdown(immediate=True) |
524 | 527 | get_adhoc_manager_instance().activate_channel(self._channel) |
525 | 528 | |
526 | 529 | def __disconnect_activate_cb(self, icon): |
| 530 | self._palette.popdown(immediate=True) |
527 | 531 | get_adhoc_manager_instance().deactivate_active_channel() |
528 | 532 | |
529 | 533 | def __state_changed_cb(self, adhoc_manager, channel, device_state): |