Fixed icons to passed name > sandbox name > path basename

shw-merge
xSmurf 7 years ago
parent 00aa12f140
commit fc19ebc2ef

@ -444,12 +444,18 @@ const PromptDialogHeader = new Lang.Class({
this.message.text = text; this.message.text = text;
}, },
setIcon: function(name) { setIcon: function(name, sandbox) {
if (sandbox.length > 0 && Gtk.IconTheme.get_default().has_icon(sandbox)) {
this.icon.icon_name = sandbox;
} else if (name.length > 0 && Gtk.IconTheme.get_default().has_icon(name)) {
this.icon.icon_name = name; this.icon.icon_name = name;
} else {
this.icon.icon_name = 'security-high-symbolic';
}
}, },
setIconDefault: function() { setIconDefault: function() {
this.setIcon('security-high-symbolic'); this.icon.icon_name = 'security-high-symbolic';
}, },
}); });
@ -584,9 +590,10 @@ const PromptDialog = new Lang.Class({
this.details.activate() this.details.activate()
} }
if(icon) { if(icon) {
this.header.setIcon(icon); this.header.setIcon(icon, sandbox);
} else { } else {
this.header.setIconDefault(); this.header.setIcon(path.split(/\//).pop(), sandbox);
//this.header.setIconDefault();
} }
if (proto == "icmp") { if (proto == "icmp") {

Loading…
Cancel
Save