Merge lp:~evfool/software-center/fix889080 into lp:software-center

Proposed by Robert Roth
Status: Merged
Merged at revision: 2569
Proposed branch: lp:~evfool/software-center/fix889080
Merge into: lp:software-center
Diff against target: 16 lines (+3/-2)
1 file modified
softwarecenter/ui/gtk3/widgets/reviews.py (+3/-2)
To merge this branch: bzr merge lp:~evfool/software-center/fix889080
Reviewer Review Type Date Requested Status
Michael Vogt Approve
Review via email: mp+83247@code.launchpad.net

Description of the change

This branch contains a fix for bug #889080, where in case of commercial applications the app_version is unknown, thus the version comparison between the review_version and app_version has not been executed, but Software-center assumed that the review is "For this version (x)" and "For this version (y)".

To test this, check the reviews for oilrush, where reviews appear with both "For this version (0.81)" and "For this version (0.74)". The fix changes the behavior in this case to show "For version (...)" for all reviews, as we don't know the app version and should not state that the review is for "this" version.

To post a comment you must log in.
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks a lot for working on this!

I merged this with a small tweak, I made the default string "For version %(version)" and only is upstream_version_compare matches change it. Please double check though :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'softwarecenter/ui/gtk3/widgets/reviews.py'
2--- softwarecenter/ui/gtk3/widgets/reviews.py 2011-10-20 16:34:14 +0000
3+++ softwarecenter/ui/gtk3/widgets/reviews.py 2011-11-24 06:36:26 +0000
4@@ -609,9 +609,10 @@
5 #if review version is different to version of app being displayed,
6 # alert user
7 version = GObject.markup_escape_text(upstream_version(review_version))
8- if (review_version and
9+ if ((review_version and
10 app_version and
11- upstream_version_compare(review_version, app_version) != 0):
12+ upstream_version_compare(review_version, app_version) != 0)
13+ or not app_version):
14 version_string = _("For version %(version)s") % {
15 'version' : version,
16 }