end-session-dialog: Show default icon if user icon is unset
If the user has not configured a user icon, the logout dialog will display an empty rectangle. Show a default picture instead. https://bugzilla.gnome.org/show_bug.cgi?id=646032
This commit is contained in:
parent
f36f7644c8
commit
af69945e5b
@ -366,8 +366,10 @@ EndSessionDialog.prototype = {
|
|||||||
|
|
||||||
if (this._user.is_loaded && !dialogContent.iconName) {
|
if (this._user.is_loaded && !dialogContent.iconName) {
|
||||||
let iconFile = this._user.get_icon_file();
|
let iconFile = this._user.get_icon_file();
|
||||||
|
if (GLib.file_test(iconFile, GLib.FileTest.EXISTS))
|
||||||
this._setIconFromFile(iconFile, dialogContent.iconStyleClass);
|
this._setIconFromFile(iconFile, dialogContent.iconStyleClass);
|
||||||
|
else
|
||||||
|
this._setIconFromName('avatar-default', dialogContent.iconStyleClass);
|
||||||
} else if (dialogContent.iconName) {
|
} else if (dialogContent.iconName) {
|
||||||
this._setIconFromName(dialogContent.iconName,
|
this._setIconFromName(dialogContent.iconName,
|
||||||
dialogContent.iconStyleClass);
|
dialogContent.iconStyleClass);
|
||||||
|
Loading…
Reference in New Issue
Block a user