[Sugar-devel] [PATCH Browse] Clarify warning on Stop with pending downloads (SL#1508)

2011-06-07 Thread Sascha Silbe
The warning previously used the word "cancel" to describe two antagonistic
operations: Not continuing the download (including erasing it from the
Journal) and not stopping Browse.

The new wording was agreed upon [1] by the Design Team.

[1] http://meeting.sugarlabs.org/sugar-meeting/meetings/2011-05-29T16:09:15.html

Closes: SL#1508
Signed-off-by: Sascha Silbe 
---
 downloadmanager.py |4 
 webactivity.py |   14 +++---
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/downloadmanager.py b/downloadmanager.py
index a88389f..4eab726 100644
--- a/downloadmanager.py
+++ b/downloadmanager.py
@@ -64,6 +64,10 @@ def can_quit():
 return len(_active_downloads) == 0
 
 
+def num_downloads():
+return len(_active_downloads)
+
+
 def remove_all_downloads():
 for download in _active_downloads:
 download.cancelable.cancel(NS_ERROR_FAILURE)
diff --git a/webactivity.py b/webactivity.py
index 48cb3ed..fc9e913 100644
--- a/webactivity.py
+++ b/webactivity.py
@@ -18,6 +18,7 @@
 
 import logging
 from gettext import gettext as _
+from gettext import ngettext
 import os
 import subprocess
 
@@ -650,10 +651,17 @@ class WebActivity(activity.Activity):
 return True
 else:
 alert = Alert()
-alert.props.title = _('Download in progress')
-alert.props.msg = _('Stopping now will cancel your download')
+alert.props.title = ngettext('Download in progress',
+ 'Downloads in progress',
+ downloadmanager.num_downloads())
+message = ngettext('Stopping now will erase your download',
+   'Stopping now will erase your downloads',
+   downloadmanager.num_downloads())
+alert.props.msg = message
 cancel_icon = Icon(icon_name='dialog-cancel')
-alert.add_button(gtk.RESPONSE_CANCEL, _('Cancel'), cancel_icon)
+cancel_label = ngettext('Continue download', 'Continue downloads',
+downloadmanager.num_downloads())
+alert.add_button(gtk.RESPONSE_CANCEL, cancel_label, cancel_icon)
 stop_icon = Icon(icon_name='dialog-ok')
 alert.add_button(gtk.RESPONSE_OK, _('Stop'), stop_icon)
 stop_icon.show()
-- 
1.7.4.1

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH Browse] Clarify warning on Stop with pending downloads (SL#1508)

2011-06-07 Thread Rafael Ortiz
On Tue, Jun 7, 2011 at 11:31 AM, Sascha Silbe wrote:

> The warning previously used the word "cancel" to describe two antagonistic
> operations: Not continuing the download (including erasing it from the
> Journal) and not stopping Browse.
>
> The new wording was agreed upon [1] by the Design Team.
>
> [1]
> http://meeting.sugarlabs.org/sugar-meeting/meetings/2011-05-29T16:09:15.html
>
> Closes: SL#1508
> Signed-off-by: Sascha Silbe 
> ---
>  downloadmanager.py |4 
>  webactivity.py |   14 +++---
>  2 files changed, 15 insertions(+), 3 deletions(-)
>
> diff --git a/downloadmanager.py b/downloadmanager.py
> index a88389f..4eab726 100644
> --- a/downloadmanager.py
> +++ b/downloadmanager.py
> @@ -64,6 +64,10 @@ def can_quit():
> return len(_active_downloads) == 0
>
>
> +def num_downloads():
> +return len(_active_downloads)
> +
> +
>  def remove_all_downloads():
> for download in _active_downloads:
> download.cancelable.cancel(NS_ERROR_FAILURE)
> diff --git a/webactivity.py b/webactivity.py
> index 48cb3ed..fc9e913 100644
> --- a/webactivity.py
> +++ b/webactivity.py
> @@ -18,6 +18,7 @@
>
>  import logging
>  from gettext import gettext as _
> +from gettext import ngettext
>  import os
>  import subprocess
>
> @@ -650,10 +651,17 @@ class WebActivity(activity.Activity):
> return True
> else:
> alert = Alert()
> -alert.props.title = _('Download in progress')
> -alert.props.msg = _('Stopping now will cancel your download')
> +alert.props.title = ngettext('Download in progress',
> + 'Downloads in progress',
> + downloadmanager.num_downloads())
> +message = ngettext('Stopping now will erase your download',
> +   'Stopping now will erase your downloads',
> +   downloadmanager.num_downloads())
> +alert.props.msg = message
> cancel_icon = Icon(icon_name='dialog-cancel')
> -alert.add_button(gtk.RESPONSE_CANCEL, _('Cancel'),
> cancel_icon)
> +cancel_label = ngettext('Continue download', 'Continue
> downloads',
> +downloadmanager.num_downloads())
> +alert.add_button(gtk.RESPONSE_CANCEL, cancel_label,
> cancel_icon)
> stop_icon = Icon(icon_name='dialog-ok')
> alert.add_button(gtk.RESPONSE_OK, _('Stop'), stop_icon)
> stop_icon.show()
> --
> 1.7.4.1
>
> ___
> Sugar-devel mailing list
> Sugar-devel@lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>

One comment here: when one stops a download described by
'Stopping now will erase your download', it
also quits the activity.

agree with the  'Continue download', dialog.
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH Browse] Clarify warning on Stop with pending downloads (SL#1508)

2011-06-11 Thread Rafael Ortiz
On Tue, Jun 7, 2011 at 11:51 AM, Rafael Ortiz wrote:

> On Tue, Jun 7, 2011 at 11:31 AM, Sascha Silbe 
> wrote:
>
>> The warning previously used the word "cancel" to describe two antagonistic
>> operations: Not continuing the download (including erasing it from the
>> Journal) and not stopping Browse.
>>
>> The new wording was agreed upon [1] by the Design Team.
>>
>> [1]
>> http://meeting.sugarlabs.org/sugar-meeting/meetings/2011-05-29T16:09:15.html
>>
>> Closes: SL#1508
>> Signed-off-by: Sascha Silbe 
>> ---
>>  downloadmanager.py |4 
>>  webactivity.py |   14 +++---
>>  2 files changed, 15 insertions(+), 3 deletions(-)
>>
>> diff --git a/downloadmanager.py b/downloadmanager.py
>> index a88389f..4eab726 100644
>> --- a/downloadmanager.py
>> +++ b/downloadmanager.py
>> @@ -64,6 +64,10 @@ def can_quit():
>> return len(_active_downloads) == 0
>>
>>
>> +def num_downloads():
>> +return len(_active_downloads)
>> +
>> +
>>  def remove_all_downloads():
>> for download in _active_downloads:
>> download.cancelable.cancel(NS_ERROR_FAILURE)
>> diff --git a/webactivity.py b/webactivity.py
>> index 48cb3ed..fc9e913 100644
>> --- a/webactivity.py
>> +++ b/webactivity.py
>> @@ -18,6 +18,7 @@
>>
>>  import logging
>>  from gettext import gettext as _
>> +from gettext import ngettext
>>  import os
>>  import subprocess
>>
>> @@ -650,10 +651,17 @@ class WebActivity(activity.Activity):
>> return True
>> else:
>> alert = Alert()
>> -alert.props.title = _('Download in progress')
>> -alert.props.msg = _('Stopping now will cancel your download')
>> +alert.props.title = ngettext('Download in progress',
>> + 'Downloads in progress',
>> + downloadmanager.num_downloads())
>> +message = ngettext('Stopping now will erase your download',
>> +   'Stopping now will erase your downloads',
>> +   downloadmanager.num_downloads())
>> +alert.props.msg = message
>> cancel_icon = Icon(icon_name='dialog-cancel')
>> -alert.add_button(gtk.RESPONSE_CANCEL, _('Cancel'),
>> cancel_icon)
>> +cancel_label = ngettext('Continue download', 'Continue
>> downloads',
>> +downloadmanager.num_downloads())
>> +alert.add_button(gtk.RESPONSE_CANCEL, cancel_label,
>> cancel_icon)
>> stop_icon = Icon(icon_name='dialog-ok')
>> alert.add_button(gtk.RESPONSE_OK, _('Stop'), stop_icon)
>> stop_icon.show()
>> --
>> 1.7.4.1
>>
>> ___
>> Sugar-devel mailing list
>> Sugar-devel@lists.sugarlabs.org
>> http://lists.sugarlabs.org/listinfo/sugar-devel
>>
>
> One comment here: when one stops a download described by
> 'Stopping now will erase your download', it
> also quits the activity.
>
> agree with the  'Continue download', dialog.
>
>
> We can push this change, it's better than the actual wording.
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel