Re: [Sugar-devel] [sugar-update-control PATCH 1/2] Now, the selecting/unselecting particular activities works.

2012-12-03 Thread Daniel Drake
On Mon, Dec 3, 2012 at 1:44 AM, Ajay Garg a...@activitycentral.com wrote:
 I will be grateful if you could let me know the download link of the image
 where it worked.
 That will provide me the mental push to have a go-ahead on what surely would
 then be a regression.

12.1.0 from http://download.laptop.org/

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


Re: [Sugar-devel] [sugar-update-control PATCH 1/2] Now, the selecting/unselecting particular activities works.

2012-12-03 Thread Ajay Garg
Thanks Manuel and Daniel for the fix and commit of  the simplified/correct
patch by Manuel..


1)
Proves I am bad at UI/GTK issues :-P

2)
Saved my time of testing the 12.1.0 image :)



Thanks again.


On Mon, Dec 3, 2012 at 6:46 PM, Daniel Drake d...@laptop.org wrote:

 On Mon, Dec 3, 2012 at 1:44 AM, Ajay Garg a...@activitycentral.com
 wrote:
  I will be grateful if you could let me know the download link of the
 image
  where it worked.
  That will provide me the mental push to have a go-ahead on what surely
 would
  then be a regression.

 12.1.0 from http://download.laptop.org/

 Daniel




Regards,

Ajay Garg
Dextrose Developer
Activity Central: http://activitycentral.com
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [sugar-update-control PATCH 1/2] Now, the selecting/unselecting particular activities works.

2012-12-03 Thread Manuel QuiƱones
2012/12/3 Ajay Garg a...@activitycentral.com:
 Thanks Manuel and Daniel for the fix and commit of  the simplified/correct
 patch by Manuel..

You are welcome Ajay.  The next time would be nice if you attach the
traceback and a testcase so it is easier to reproduce and confirm the
bug.  Thanks for the report,
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [sugar-update-control PATCH 1/2] Now, the selecting/unselecting particular activities works.

2012-12-03 Thread Ajay Garg
On Mon, Dec 3, 2012 at 10:41 PM, Manuel QuiƱones ma...@laptop.org wrote:

 2012/12/3 Ajay Garg a...@activitycentral.com:
  Thanks Manuel and Daniel for the fix and commit of  the
 simplified/correct
  patch by Manuel..

 You are welcome Ajay.  The next time would be nice if you attach the
 traceback and a testcase so it is easier to reproduce and confirm the
 bug.


Ok. Will take care. :)

Thanks again.





  Thanks for the report,





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




Regards,

Ajay Garg
Dextrose Developer
Activity Central: http://activitycentral.com
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [sugar-update-control PATCH 1/2] Now, the selecting/unselecting particular activities works.

2012-12-02 Thread Daniel Drake
On Fri, Nov 30, 2012 at 3:52 PM, Ajay Garg a...@activitycentral.com wrote:
 It would be good if it is known whether the Select/Deselect feature worked
 at all previously (I doubt it ever did). In the unlikely scenario that it
 worked before, I will be happy to delve in more into this.

Yes, it worked fine before.

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


Re: [Sugar-devel] [sugar-update-control PATCH 1/2] Now, the selecting/unselecting particular activities works.

2012-12-02 Thread Ajay Garg
On Mon, Dec 3, 2012 at 2:38 AM, Daniel Drake d...@laptop.org wrote:

 On Fri, Nov 30, 2012 at 3:52 PM, Ajay Garg a...@activitycentral.com
 wrote:
  It would be good if it is known whether the Select/Deselect feature
 worked
  at all previously (I doubt it ever did). In the unlikely scenario that it
  worked before, I will be happy to delve in more into this.

 Yes, it worked fine before.

 Thanks Daniel.

I will be grateful if you could let me know the download link of the image
where it worked.
That will provide me the mental push to have a go-ahead on what surely
would then be a regression.



Thanks
 Daniel



Regards,

Ajay Garg
Dextrose Developer
Activity Central: http://activitycentral.com
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [sugar-update-control PATCH 1/2] Now, the selecting/unselecting particular activities works.

2012-11-30 Thread Daniel Drake
Thanks for the patch. If you'd like to speed up the process and save
me some time, please add a commit message explaining what was wrong
and how/why this fixes it. It does not jump out at me from the patch.
It also doesn't feel like the right place to be doing a spring
cleaning of the activities model.

On Tue, Nov 27, 2012 at 10:31 AM, Ajay Garg a...@activitycentral.com wrote:
 diff --git a/src/model.py b/src/model.py
 index 35896e2..533183b 100755
 --- a/src/model.py
 +++ b/src/model.py
 @@ -229,7 +229,13 @@ class UpdateList(Gtk.ListStore):

  def toggle_select(self, path):
  Toggle whether the given update will be installed.
 -row = self[path]
 +# We first need to remove all the spurious activities existing
 +# in the model, for whom UPDATE_EXISTS is False.
 +for act in self:
 +if act[UPDATE_EXISTS] is False:
 +self.remove(act.iter)
 +
 +row = self[self.get_iter_from_string(path)]
  row[UPDATE_SELECTED] = not row[UPDATE_SELECTED]

  # don't touch the UI in refresh, it needs to be thread-safe.
 diff --git a/src/view.py b/src/view.py
 index 32cb580..9c8efdb 100755
 --- a/src/view.py
 +++ b/src/view.py
 @@ -84,7 +84,6 @@ class ActivityListView(Gtk.ScrolledWindow):
  if self.activity_updater._in_sugar:
  crbool.set_property('indicator_size', style.zoom(26))
  def toggled_cb(crbool, path, self):
 -path = self.ftreestore.convert_path_to_child_path(path)
  self.activity_updater.activity_list.toggle_select(path)
  self.activity_pane._refresh_update_size()
  crbool.connect('toggled', toggled_cb, self)
 --
 1.7.11.7

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


Re: [Sugar-devel] [sugar-update-control PATCH 1/2] Now, the selecting/unselecting particular activities works.

2012-11-30 Thread Ajay Garg
Daniel,

I agree that the reason of applying this particular fix is not very well
explained, but this was the best that worked, without breaking  anything
else.

To put it logically, once the list is rendered, we do not need  any
not-updatable activity entries anyway; also the only next step after the
rendering, is Refresh, wherein the entire process is followed again.

Anyhow, as long as all the use-cases work as expected, we should be ok :)

It would be good if it is known whether the Select/Deselect feature
worked at all previously (I doubt it ever did). In the unlikely scenario
that it worked before, I will be happy to delve in more into this.


On Fri, Nov 30, 2012 at 10:47 PM, Daniel Drake d...@laptop.org wrote:

 Thanks for the patch. If you'd like to speed up the process and save
 me some time, please add a commit message explaining what was wrong
 and how/why this fixes it. It does not jump out at me from the patch.
 It also doesn't feel like the right place to be doing a spring
 cleaning of the activities model.

 On Tue, Nov 27, 2012 at 10:31 AM, Ajay Garg a...@activitycentral.com
 wrote:
  diff --git a/src/model.py b/src/model.py
  index 35896e2..533183b 100755
  --- a/src/model.py
  +++ b/src/model.py
  @@ -229,7 +229,13 @@ class UpdateList(Gtk.ListStore):
 
   def toggle_select(self, path):
   Toggle whether the given update will be installed.
  -row = self[path]
  +# We first need to remove all the spurious activities existing
  +# in the model, for whom UPDATE_EXISTS is False.
  +for act in self:
  +if act[UPDATE_EXISTS] is False:
  +self.remove(act.iter)
  +
  +row = self[self.get_iter_from_string(path)]
   row[UPDATE_SELECTED] = not row[UPDATE_SELECTED]
 
   # don't touch the UI in refresh, it needs to be thread-safe.
  diff --git a/src/view.py b/src/view.py
  index 32cb580..9c8efdb 100755
  --- a/src/view.py
  +++ b/src/view.py
  @@ -84,7 +84,6 @@ class ActivityListView(Gtk.ScrolledWindow):
   if self.activity_updater._in_sugar:
   crbool.set_property('indicator_size', style.zoom(26))
   def toggled_cb(crbool, path, self):
  -path = self.ftreestore.convert_path_to_child_path(path)
   self.activity_updater.activity_list.toggle_select(path)
   self.activity_pane._refresh_update_size()
   crbool.connect('toggled', toggled_cb, self)
  --
  1.7.11.7
 




Regards,

Ajay Garg
Dextrose Developer
Activity Central: http://activitycentral.com
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [sugar-update-control PATCH 1/2] Now, the selecting/unselecting particular activities works.

2012-11-27 Thread Ajay Garg
diff --git a/src/model.py b/src/model.py
index 35896e2..533183b 100755
--- a/src/model.py
+++ b/src/model.py
@@ -229,7 +229,13 @@ class UpdateList(Gtk.ListStore):
 
 def toggle_select(self, path):
 Toggle whether the given update will be installed.
-row = self[path]
+# We first need to remove all the spurious activities existing
+# in the model, for whom UPDATE_EXISTS is False.
+for act in self:
+if act[UPDATE_EXISTS] is False:
+self.remove(act.iter)
+
+row = self[self.get_iter_from_string(path)]
 row[UPDATE_SELECTED] = not row[UPDATE_SELECTED]
 
 # don't touch the UI in refresh, it needs to be thread-safe.
diff --git a/src/view.py b/src/view.py
index 32cb580..9c8efdb 100755
--- a/src/view.py
+++ b/src/view.py
@@ -84,7 +84,6 @@ class ActivityListView(Gtk.ScrolledWindow):
 if self.activity_updater._in_sugar:
 crbool.set_property('indicator_size', style.zoom(26))
 def toggled_cb(crbool, path, self):
-path = self.ftreestore.convert_path_to_child_path(path)
 self.activity_updater.activity_list.toggle_select(path)
 self.activity_pane._refresh_update_size()
 crbool.connect('toggled', toggled_cb, self)
-- 
1.7.11.7

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