Kaydet (Commit) 24922e6c authored tarafından franglais125's avatar franglais125

Add trailing white space to package names to prevent them from getting to the

edge of the indicator
üst 5886ecea
...@@ -589,18 +589,19 @@ const AptUpdateIndicator = new Lang.Class({ ...@@ -589,18 +589,19 @@ const AptUpdateIndicator = new Lang.Class({
}, },
_cleanUpgradeList: function() { _cleanUpgradeList: function() {
let trailingSpace = " ";
if (this._settings.get_boolean('strip-versions') == true) { if (this._settings.get_boolean('strip-versions') == true) {
this._updateList = this._updateList.map(function(p) { this._updateList = this._updateList.map(function(p) {
// example: firefox/jessie 50.0-1 amd64 [upgradable from: 49.0-4] // example: firefox/jessie 50.0-1 amd64 [upgradable from: 49.0-4]
// chunks[0] is the package name // chunks[0] is the package name
// chunks[1] is the remaining part // chunks[1] is the remaining part
var chunks = p.split("/",2); var chunks = p.split("/",2);
return chunks[0]; return chunks[0] + trailingSpace;
}); });
} else { } else {
this._updateList = this._updateList.map(function(p) { this._updateList = this._updateList.map(function(p) {
var chunks = p.split("/",2); var chunks = p.split("/",2);
var version = chunks[1].split(" ",3)[1]; var version = chunks[1].split(" ",3)[1] + trailingSpace;
return chunks[0] + "\t" + version; return chunks[0] + "\t" + version;
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment