Re: [Sugar-devel] Review: [PATCH] Downgrading activities not allowed. (#2164)

2010-10-21 Thread Manusheel Gupta
Sorry for the delayed response on this thread.

On Sat, Oct 16, 2010 at 3:09 AM, Sascha Silbe 
sascha-ml-reply-to-201...@silbe.org wrote:

 Excerpts from Manusheel Gupta's message of Sat Oct 09 04:46:02 +0200 2010:

  Ishan tried to add the tag - Coauthored by in his patch, and that line
  gets scrubbed off.

 Have you added it right at the end, like you would do with the
 Reviewed-By: tag? E.g.:

 (assuming author is set to Shanjit Singh Jajmann shan...@seeta.in)
 === Begin ===
 Allow downgrading activities (SL#2164)

 If the user tries to start an XO bundle containing a version of an activity
 that is older than the currently installed one, an option to downgrade the
 activity will be presented in the form of a confirmation alert.

 Co-Authored-By: Anubhav Aggarwal anub...@seeta.in
 === End ===


Sascha, appreciate your continued guidance in patch submission procedures
and reviews. This format guideline has been Implemented in all the latest
patch submissions. Thank you for the timely feedback.




 PS: Please subscribe to the non-digest version of sugar-devel so you
 don't break threads. If there's a particular reason you're using the
 digest I can try to suggest an alternative.


My apologies for breaking the thread. I am subscribed to the non-digest
(individual e-mails) version only.

Manu



 Sascha

 --
 http://sascha.silbe.org/
 http://www.infra-silbe.de/

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


Re: [Sugar-devel] Review: [PATCH] Downgrading activities not allowed. (#2164)

2010-10-15 Thread Sascha Silbe
Excerpts from Manusheel Gupta's message of Sat Oct 09 04:46:02 +0200 2010:

 Ishan tried to add the tag - Coauthored by in his patch, and that line
 gets scrubbed off.

Have you added it right at the end, like you would do with the
Reviewed-By: tag? E.g.:

(assuming author is set to Shanjit Singh Jajmann shan...@seeta.in)
=== Begin ===
Allow downgrading activities (SL#2164)

If the user tries to start an XO bundle containing a version of an activity
that is older than the currently installed one, an option to downgrade the
activity will be presented in the form of a confirmation alert.

Co-Authored-By: Anubhav Aggarwal anub...@seeta.in
=== End ===


PS: Please subscribe to the non-digest version of sugar-devel so you
don't break threads. If there's a particular reason you're using the
digest I can try to suggest an alternative.

Sascha

--
http://sascha.silbe.org/
http://www.infra-silbe.de/


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


[Sugar-devel] Review: [PATCH] Downgrading activities not allowed. (#2164)

2010-10-08 Thread Manusheel Gupta
Sascha,

Ishan tried to add the tag - Coauthored by in his patch, and that line
gets scrubbed off. We might have mistaken in understanding your review. Can
you elaborate on the format of the patch been worked on by multiple authors?
Unfortunately, git does not provide this feature at this
juncture. Appreciate your pointers as always.

On a separate note, could you please review the patch submitted by Shan
below. It was peer reviewed within the team by Ayush and Anurag.

Regards,

Manu







On Thu, Oct 7, 2010 at 8:52 PM, sugar-devel-requ...@lists.sugarlabs.orgwrote:


   2. [PATCH] Downgrading activities not allowed. (#2164)
  (shan...@seeta.in)

 From: shan...@seeta.in
 To: sugar-devel@lists.sugarlabs.org
 Subject: [Sugar-devel] [PATCH] Downgrading activities not allowed.
(#2164)
 Message-ID: 4cadd298.c83ddf0a.508f.3...@mx.google.com

 From: Shanjit Singh Jajmann shan...@seeta.in, Anubhav Aggarwal 
 anub...@seeta.in

 Downgrading an activity is now made possible. When a .xo file of a version
 older than the currently installed version is clicked, a downgrading option
 is made available, by popping up of a confirmation alert. Depending upton
 the choice selected you can downgrade the activity.
 ---
  src/jarabe/journal/journalactivity.py |   36 +++--
  src/jarabe/journal/listview.py|7 +++-
  src/jarabe/journal/misc.py|   56
 -
  src/jarabe/model/bundleregistry.py|   18 +++---
  4 files changed, 91 insertions(+), 26 deletions(-)
  mode change 100644 = 100755 src/jarabe/journal/misc.py
  mode change 100644 = 100755 src/jarabe/model/bundleregistry.py

 diff --git a/src/jarabe/journal/journalactivity.py
 b/src/jarabe/journal/journalactivity.py
 index 44cc018..2af55d3 100644
 --- a/src/jarabe/journal/journalactivity.py
 +++ b/src/jarabe/journal/journalactivity.py
 @@ -28,6 +28,7 @@ import os

  from sugar.graphics.window import Window
  from sugar.graphics.alert import ErrorAlert
 +from sugar.graphics.alert import ConfirmationAlert

  from sugar.bundle.bundle import ZipExtractException, RegistrationException
  from sugar import env
 @@ -128,7 +129,7 @@ class JournalActivity(Window):
 self.connect('window-state-event', self.__window_state_event_cb)
 self.connect('key-press-event', self._key_press_event_cb)
 self.connect('focus-in-event', self._focus_in_event_cb)
 -
 +
 model.created.connect(self.__model_created_cb)
 model.updated.connect(self.__model_updated_cb)
 model.deleted.connect(self.__model_deleted_cb)
 @@ -136,7 +137,6 @@ class JournalActivity(Window):
 self._dbus_service = JournalActivityDBusService(self)

 self.iconify()
 -
 self._critical_space_alert = None
 self._check_available_space()

 @@ -145,7 +145,29 @@ class JournalActivity(Window):
 alert.connect('response', self.__alert_response_cb)
 self.add_alert(alert)
 alert.show()
 -
 +
 +def __activity_alert1_cb(self):
 +   if misc.check_previous_install() == 1 and
 misc.return_checked()==0:
 + alert1 = ConfirmationAlert()
 + logging.debug('value of misc is %d',
 misc.check_previous_install())
 + alert1.props.title=_('Previous Version Found')
 + alert1.props.msg = _('A previous version of an installed
 activity was found. Are you sure you want to continue with installation ?
If Yes
 click Ok and the activity icon of the older .xo file in the Journal')
 + alert1.connect('response', self.__alert1_response_cb)
 + self.add_alert(alert1)
 + alert1.show()
 +
 +def __alert1_response_cb(self, alert1, response_id):
 +if response_id is gtk.RESPONSE_OK:
 +logging.debug('value of checked initial %d',
 misc.return_checked())
 +logging.debug('Installing previous version')
 +self.remove_alert(alert1)
 +misc.checked = 1
 +logging.debug('value of checked final %d',
 misc.return_checked())
 +
 +elif response_id is gtk.RESPONSE_CANCEL:
 +logging.debug('Cancelled by user')
 +self.remove_alert(alert1)
 +
 def __alert_response_cb(self, alert, response_id):
 self.remove_alert(alert)

 @@ -166,6 +188,8 @@ class JournalActivity(Window):
 self._list_view = ListView()
 self._list_view.connect('detail-clicked', self.__detail_clicked_cb)
 self._list_view.connect('clear-clicked', self.__clear_clicked_cb)
 +self._list_view.connect('icon-clicked', self.__icon_clicked_cb)
 +logging.debug('icon clicked in main')
 self._main_view.pack_start(self._list_view)
 self._list_view.show()

 @@ -195,7 +219,11 @@ class JournalActivity(Window):
 keyname = gtk.gdk.keyval_name(event.keyval)
 if keyname == 'Escape':
 self.show_main_view()
 -
 +
 +