Merge lp://staging/~dannymardini/update-manager/checkboxfix into lp://staging/~ubuntu-core-dev/update-manager/precise

Proposed by DanMD
Status: Needs review
Proposed branch: lp://staging/~dannymardini/update-manager/checkboxfix
Merge into: lp://staging/~ubuntu-core-dev/update-manager/precise
Diff against target: 16 lines (+2/-2)
1 file modified
UpdateManager/UpdateManager.py (+2/-2)
To merge this branch: bzr merge lp://staging/~dannymardini/update-manager/checkboxfix
Reviewer Review Type Date Requested Status
Michael Vogt feature enhancement Pending
Review via email: mp+172206@code.staging.launchpad.net

Description of the change

This change is a feature enhancement to the way origin/topic row checkboxes behave. In precise I noticed if I unclick a few package checkboxes then unlick the origin/topic row checkbox, all of it's related package checkboxes would simply be toggled. I expected it to behave as an uncheck/check-all checkbox but this was not how it behaved.

I thought it might align with expecations better if these checkboxes behaved as uncheck/check-all checkboxes instead of simply "toggle-all" check boxes.

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) wrote :

Thanks for your branch. Just a quick code review, aside from the
question of design review which I'll let somebody else weigh in on:

> === modified file 'UpdateManager/UpdateManager.py'
> --- UpdateManager/UpdateManager.py 2012-04-17 12:57:58 +0000
> +++ UpdateManager/UpdateManager.py 2013-06-29 18:54:23 +0000
> @@ -908,10 +908,10 @@
> self.setBusy(True)
> actiongroup = apt_pkg.ActionGroup(self.cache._depcache)
> for pkg in self.list.pkgs[origin]:
> - if pkg.marked_install or pkg.marked_upgrade:
> + if (pkg.marked_install or pkg.marked_upgrade) and select_all == False:
> #print "marking keep: ", pkg.name
> pkg.mark_keep()
> - elif not (pkg.name in self.list.held_back):
> + elif not (pkg.name in self.list.held_back) and select_all == True:

Please use "not select_all" rather than "select_all == False", and
"select_all" rather than "select_all == True" - there's no need to
explicitly compare booleans against True and False in conditional
expressions.

Feature work must be done against the development release (currently
saucy), not against precise. Changes which meet
https://wiki.ubuntu.com/StableReleaseUpdates might be backported later.
For update-manager, the branch to look at is
lp:~ubuntu-core-dev/update-manager/main. It looks as though this
segment of code has been moved around and also somewhat differently
there, so you may want to look into whether your request has already
been fulfilled in saucy.

Revision history for this message
DanMD (dannymardini) wrote :

Thank you very much for the comment and review Colin! I will be sure to check the saucy branch and submit a branch merge if applicable there!

Unmerged revisions

2408. By DanMD

Making origin row checkboxes behave as an check/uncheck-all, instead of
simply toggling their subsequent package rows.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches