Author: lslezak Date: Tue Oct 21 16:51:16 2008 New Revision: 52403 URL: http://svn.opensuse.org/viewcvs/yast?rev=52403&view=rev Log: - repositories.ycp - pad the priority number with spaces so the sorting by priority works as expected (bnc#404205) Modified: trunk/packager/package/yast2-packager.changes trunk/packager/src/clients/repositories.ycp Modified: trunk/packager/package/yast2-packager.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/package/yast2-packager.changes?rev=52403&r1=52402&r2=52403&view=diff ============================================================================== --- trunk/packager/package/yast2-packager.changes (original) +++ trunk/packager/package/yast2-packager.changes Tue Oct 21 16:51:16 2008 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Tue Oct 21 16:49:06 CEST 2008 - lslezak@suse.cz + +- repositories.ycp - pad the priority number with spaces so the + sorting by priority works as expected (bnc#404205) + +------------------------------------------------------------------- Mon Oct 20 18:04:07 CEST 2008 - lslezak@suse.cz - moved PackagesUI.ycp to yast2 package, use the new API Modified: trunk/packager/src/clients/repositories.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/packager/src/clients/repositories.ycp?rev=52403&r1=52402&r2=52403&view=diff ============================================================================== --- trunk/packager/src/clients/repositories.ycp (original) +++ trunk/packager/src/clients/repositories.ycp Tue Oct 21 16:51:16 2008 @@ -66,6 +66,8 @@ // default (minimal) priority of a repository const integer default_priority = 99; + const string priority_label = _("&Priority"); + // current view: // selected service (or empty) if all services are selected string displayed_service = ""; @@ -117,7 +119,21 @@ string PriorityToString(integer priority) { - return (priority == default_priority) ? _("Default") : tostring(priority); + string ret = tostring(priority); + + // pad to 3 characters + integer rest = 3 - size(ret); + while(rest > 0) { + ret = " " + ret; + rest = rest - 1; + } + + if (priority == default_priority) + { + ret = ret + " (" + _("Default") + ")"; + } + + return ret; } list