Merge lp:~evfool/software-properties/twolineitems into lp:software-properties

Proposed by Robert Roth
Status: Merged
Merged at revision: 853
Proposed branch: lp:~evfool/software-properties/twolineitems
Merge into: lp:software-properties
Diff against target: 30 lines (+7/-5)
1 file modified
softwareproperties/SoftwareProperties.py (+7/-5)
To merge this branch: bzr merge lp:~evfool/software-properties/twolineitems
Reviewer Review Type Date Requested Status
Iain Lane Approve
Review via email: mp+170435@code.launchpad.net

Description of the change

This branch improves the display of Other sources with comments by wrapping them into two lines, the first one for everything else except the URL, and the second one with the URL.
See comparison:
CUrrent layout : https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/930827/+attachment/2732465/+files/Screenshot%20at%202012-02-12%2004%3A11%3A00.png
Proposed layout : https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/930827/+attachment/2732467/+files/Screenshot%20at%202012-02-12%2004%3A10%3A58.png

In my opinion the proposed layout improves readability, reduces the cases when we need a horizontal scrollbar, and makes the commented sources representation consistent with the Partners and Independent items representation (at least in terms of line count, aka item height)

To post a comment you must log in.
Revision history for this message
Iain Lane (laney) wrote :

(right merge this time), thanks!

review: Approve

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 2013-06-18 19:34:47 +0000
3+++ softwareproperties/SoftwareProperties.py 2013-06-19 19:54:29 +0000
4@@ -488,19 +488,21 @@
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).strip(),
9- source.uri, source.dist)
10+ contents = "<b>%s</b> %s" % (escape(source.comment).strip(),
11+ source.dist)
12 # Only show the components if there are more than one
13 if len(source.comps) > 1:
14 for c in source.comps:
15 contents += " %s" % c
16- contents += ")"
17+ if source.type in ("deb-src", "rpm-src"):
18+ contents += " %s" % _("(Source Code)")
19+ contents += "\n%s" % source.uri
20 else:
21 contents = "<b>%s %s</b>" % (source.uri, source.dist)
22 for c in source.comps:
23 contents += " %s" % c
24- if source.type in ("deb-src", "rpm-src"):
25- contents += " %s" % _("(Source Code)")
26+ if source.type in ("deb-src", "rpm-src"):
27+ contents += " %s" % _("(Source Code)")
28 return contents
29 else:
30 # try to make use of a corresponding template

Subscribers

People subscribed via source and target branches

to status/vote changes: