Merge lp:~cjwatson/humpolec/sort-channels into lp:humpolec

Proposed by Colin Watson
Status: Needs review
Proposed branch: lp:~cjwatson/humpolec/sort-channels
Merge into: lp:humpolec
Diff against target: 19 lines (+2/-0)
1 file modified
src/com/canonical/ubuntu/installer/InstallActivity.java (+2/-0)
To merge this branch: bzr merge lp:~cjwatson/humpolec/sort-channels
Reviewer Review Type Date Requested Status
Ondrej Kubik Approve
Review via email: mp+222144@code.launchpad.net

Commit message

Sort the channel list.

Description of the change

It would make the channel list much easier to use if it were sorted.

(I confess I have not tested this. Hopefully it's reasonably obvious ...)

To post a comment you must log in.
Revision history for this message
Ondrej Kubik (ondrak) wrote :

Yes, this could be good change.
I kept list deliberately as it is on the server but with number of channels growing, we should change our strategy.

review: Approve

Unmerged revisions

61. By Colin Watson

Sort the channel list.

60. By Ondrej Kubik

Bumping up version for release

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/com/canonical/ubuntu/installer/InstallActivity.java'
--- src/com/canonical/ubuntu/installer/InstallActivity.java 2014-01-09 08:54:46 +0000
+++ src/com/canonical/ubuntu/installer/InstallActivity.java 2014-06-05 09:34:47 +0000
@@ -3,6 +3,7 @@
3import java.io.File;3import java.io.File;
4import java.io.FileWriter;4import java.io.FileWriter;
5import java.text.SimpleDateFormat;5import java.text.SimpleDateFormat;
6import java.util.Arrays;
6import java.util.Calendar;7import java.util.Calendar;
7import java.util.HashMap;8import java.util.HashMap;
8import java.util.List;9import java.util.List;
@@ -241,6 +242,7 @@
241 } else if (0 != mAvailableChannels.size()) {242 } else if (0 != mAvailableChannels.size()) {
242 // get list of aliases as array243 // get list of aliases as array
243 String channels[] = mAvailableChannels.keySet().toArray(new String[mAvailableChannels.size()]);244 String channels[] = mAvailableChannels.keySet().toArray(new String[mAvailableChannels.size()]);
245 Arrays.sort(channels);
244 // look for "trusty" as default channel246 // look for "trusty" as default channel
245 int defSelection = channels.length/2;247 int defSelection = channels.length/2;
246 for (int i = 0 ; i < channels.length ; ++i) {248 for (int i = 0 ; i < channels.length ; ++i) {

Subscribers

People subscribed via source and target branches