Merge lp:~evfool/software-properties/trim-source-comment into lp:software-properties

Proposed by Robert Roth
Status: Merged
Merged at revision: 852
Proposed branch: lp:~evfool/software-properties/trim-source-comment
Merge into: lp:software-properties
Diff against target: 12 lines (+1/-1)
1 file modified
softwareproperties/SoftwareProperties.py (+1/-1)
To merge this branch: bzr merge lp:~evfool/software-properties/trim-source-comment
Reviewer Review Type Date Requested Status
Iain Lane Approve
Brian Murray Approve
Review via email: mp+170182@code.launchpad.net

Description of the change

In case we have a comment for a source line, we display that comment on the Other sources tab as the description of the source, however as the comment usually looks like # comment, the entry on other sources started with a whitespace character thus causing that entry not to be vertically aligned with other source entries. Stripping the leading and trailing whitespaces from the source comment solves this, and that is what this branch accomplishes. (LP #1185144)

To post a comment you must log in.
Revision history for this message
Brian Murray (brian-murray) wrote :

Thanks for making this change.

review: Approve
Revision history for this message
Iain Lane (laney) wrote :

Looks great, thank you!

review: Approve
Revision history for this message
Iain Lane (laney) wrote :

Oops, wrong merge :P

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'softwareproperties/SoftwareProperties.py'
2--- softwareproperties/SoftwareProperties.py 2012-12-14 14:51:20 +0000
3+++ softwareproperties/SoftwareProperties.py 2013-06-18 19:46:25 +0000
4@@ -488,7 +488,7 @@
5 """Render a nice output to show the source in a treeview"""
6 if source.template == None:
7 if source.comment:
8- contents = "<b>%s</b> (%s %s" % (escape(source.comment),
9+ contents = "<b>%s</b> (%s %s" % (escape(source.comment).strip(),
10 source.uri, source.dist)
11 # Only show the components if there are more than one
12 if len(source.comps) > 1:

Subscribers

People subscribed via source and target branches

to status/vote changes: