[Bugs] #1093 UNSP: "Send to" upload (sender) frame palette can get into a state with no way to dismiss
SugarLabs Bugs
bugtracker-noreply at sugarlabs.org
Fri Jul 24 00:16:41 EDT 2009
#1093: "Send to" upload (sender) frame palette can get into a state with no way to
dismiss
------------------------------------------+---------------------------------
Reporter: garycmartin | Owner: tomeu
Type: defect | Status: new
Priority: Unspecified by Maintainer | Milestone: Unspecified by Release Team
Component: sugar | Version: Git as of bugdate
Severity: Major | Resolution:
Keywords: r? | Distribution: Unspecified
Status_field: Unconfirmed |
------------------------------------------+---------------------------------
Changes (by garycmartin):
* keywords: => r?
Comment:
Oh my... I might actually have a patch!
{{{
diff --git a/src/jarabe/frame/activitiestray.py
b/src/jarabe/frame/activitiestray.py
index 1e2b8e8..8dd75e7 100644
--- a/src/jarabe/frame/activitiestray.py
+++ b/src/jarabe/frame/activitiestray.py
@@ -877,6 +877,21 @@ class OutgoingTransferPalette(BaseTransferPalette):
self.update_progress()
+ elif self.file_transfer.props.state ==
filetransfer.FT_STATE_CANCELLED:
+
+ for item in self.menu.get_children():
+ self.menu.remove(item)
+
+ nick = self.file_transfer.buddy.props.nick
+ self.props.secondary_text = _('Transfer declined by %r') %
nick
+
+ 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()
+
def __cancel_activate_cb(self, menu_item):
self.file_transfer.cancel()
}}}
--
Ticket URL: <http://dev.sugarlabs.org/ticket/1093#comment:1>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system
More information about the Bugs
mailing list