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
=== modified file 'softwareproperties/SoftwareProperties.py'
--- softwareproperties/SoftwareProperties.py 2013-06-18 19:34:47 +0000
+++ softwareproperties/SoftwareProperties.py 2013-06-19 19:54:29 +0000
@@ -488,19 +488,21 @@
488 """Render a nice output to show the source in a treeview"""488 """Render a nice output to show the source in a treeview"""
489 if source.template == None:489 if source.template == None:
490 if source.comment:490 if source.comment:
491 contents = "<b>%s</b> (%s %s" % (escape(source.comment).strip(),491 contents = "<b>%s</b> %s" % (escape(source.comment).strip(),
492 source.uri, source.dist)492 source.dist)
493 # Only show the components if there are more than one493 # Only show the components if there are more than one
494 if len(source.comps) > 1:494 if len(source.comps) > 1:
495 for c in source.comps:495 for c in source.comps:
496 contents += " %s" % c496 contents += " %s" % c
497 contents += ")"497 if source.type in ("deb-src", "rpm-src"):
498 contents += " %s" % _("(Source Code)")
499 contents += "\n%s" % source.uri
498 else:500 else:
499 contents = "<b>%s %s</b>" % (source.uri, source.dist)501 contents = "<b>%s %s</b>" % (source.uri, source.dist)
500 for c in source.comps:502 for c in source.comps:
501 contents += " %s" % c503 contents += " %s" % c
502 if source.type in ("deb-src", "rpm-src"):504 if source.type in ("deb-src", "rpm-src"):
503 contents += " %s" % _("(Source Code)")505 contents += " %s" % _("(Source Code)")
504 return contents506 return contents
505 else:507 else:
506 # try to make use of a corresponding template508 # try to make use of a corresponding template

Subscribers

People subscribed via source and target branches

to status/vote changes: