From ca14c7d74bb7cf46fc39e06e808cbfb5d98c7dfc Mon Sep 17 00:00:00 2001 From: Rafael Ortiz Date: Fri, 20 May 2011 20:03:28 +0000 Subject: better wording #1508 + pep8 fixes --- diff --git a/downloadmanager.py b/downloadmanager.py index 27ed311..ba2b0a5 100644 --- a/downloadmanager.py +++ b/downloadmanager.py @@ -238,6 +238,7 @@ class Download: gtk.gdk.INTERP_BILINEAR) preview_data = [] + def save_func(buf, data): data.append(buf) @@ -297,7 +298,7 @@ class Download: def onProgressChange64(self, web_progress, request, cur_self_progress, max_self_progress, cur_total_progress, max_total_progress): - percent = (cur_self_progress * 100) / max_self_progress + percent = (cur_self_progress * 100) / max_self_progress if (time.time() - self._last_update_time) < _MIN_TIME_UPDATE and \ (percent - self._last_update_percent) < _MIN_PERCENT_UPDATE: @@ -354,7 +355,7 @@ class Download: if self in _active_downloads: # TODO: Use NS_BINDING_ABORTED instead of NS_ERROR_FAILURE. self._delete_partial_download() - self.cancelable.cancel(NS_ERROR_FAILURE) #NS_BINDING_ABORTED) + self.cancelable.cancel(NS_ERROR_FAILURE) # NS_BINDING_ABORTED) _active_downloads.remove(self) @@ -453,4 +454,4 @@ class _SaveLinkProgressListener(object): def onDataAvailable(self, request, context, inputStream, offset, count): self._external_listener.onDataAvailable(request, context, inputStream, - offset, count); + offset, count) diff --git a/webactivity.py b/webactivity.py index d744ab1..2e1509d 100644 --- a/webactivity.py +++ b/webactivity.py @@ -598,9 +598,9 @@ class WebActivity(activity.Activity): alert.props.title = _('Download in progress') alert.props.msg = _('Stopping now will cancel your download') cancel_icon = Icon(icon_name='dialog-cancel') - alert.add_button(gtk.RESPONSE_CANCEL, _('Cancel'), cancel_icon) + alert.add_button(gtk.RESPONSE_CANCEL, _('Continue Download'), cancel_icon) stop_icon = Icon(icon_name='dialog-ok') - alert.add_button(gtk.RESPONSE_OK, _('Stop'), stop_icon) + alert.add_button(gtk.RESPONSE_OK, _('Cancel Download'), stop_icon) stop_icon.show() self.add_alert(alert) alert.connect('response', self.__inprogress_response_cb) -- cgit v0.9.1