[Sugar-devel] [PATCH sugar] FileTransfer: handle cancellation cleanly, OLPC #11065
Simon Schampijer
simon at schampijer.de
Wed Sep 14 06:04:58 EDT 2011
When a file transfer has been canceled (the sender quits
before the receiver transferred it) show a cancellation
message and the option to dismiss the notification.
Signed-off-by: Simon Schampijer <simon at laptop.org>
---
src/jarabe/frame/activitiestray.py | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/jarabe/frame/activitiestray.py b/src/jarabe/frame/activitiestray.py
index 2b5bf8d..636c085 100644
--- a/src/jarabe/frame/activitiestray.py
+++ b/src/jarabe/frame/activitiestray.py
@@ -625,12 +625,14 @@ class IncomingTransferPalette(BaseTransferPalette):
for item in self.menu.get_children():
self.menu.remove(item)
- menu_item = MenuItem(_('Resume'), icon_name='dialog-cancel')
- menu_item.connect('activate', self.__resume_activate_cb)
+ menu_item = MenuItem(_('Dismiss'), icon_name='dialog-cancel')
+ menu_item.connect('activate', self.__dismiss_activate_cb)
self.menu.append(menu_item)
menu_item.show()
- self.update_progress()
+ label = gtk.Label(_('Transfer canceled'))
+ self.set_content(label)
+ label.show()
def __accept_activate_cb(self, menu_item):
#TODO: figure out the best place to get rid of that temp file
@@ -657,9 +659,6 @@ class IncomingTransferPalette(BaseTransferPalette):
def __cancel_activate_cb(self, menu_item):
self.file_transfer.cancel()
- def __resume_activate_cb(self, menu_item):
- self.file_transfer.resume()
-
def __dismiss_activate_cb(self, menu_item):
self.emit('dismiss-clicked')
--
1.7.4.4
More information about the Sugar-devel
mailing list