endSessionDialog: Fix the "Restart & Install" button
This moves the dialog type overriding that gnome-software uses to bring up restartInstallDialogContent from _sync() to OpenAsync(), in order to ensure the type is overridden early enough to show the correct buttons. While at this, make sure the & symbol in the button's label is escaped to avoid runtime warnings, now that the label actually gets used. https://bugzilla.gnome.org/show_bug.cgi?id=722898
This commit is contained in:
parent
5bec5fb6cb
commit
7551e134da
@ -116,7 +116,7 @@ const restartInstallDialogContent = {
|
|||||||
seconds).format(seconds);
|
seconds).format(seconds);
|
||||||
},
|
},
|
||||||
confirmButtons: [{ signal: 'ConfirmedReboot',
|
confirmButtons: [{ signal: 'ConfirmedReboot',
|
||||||
label: C_("button", "Restart & Install") }],
|
label: C_("button", "Restart & Install") }],
|
||||||
iconName: 'view-refresh-symbolic',
|
iconName: 'view-refresh-symbolic',
|
||||||
iconStyleClass: 'end-session-dialog-shutdown-icon',
|
iconStyleClass: 'end-session-dialog-shutdown-icon',
|
||||||
showOtherSessions: true,
|
showOtherSessions: true,
|
||||||
@ -300,9 +300,6 @@ const EndSessionDialog = new Lang.Class({
|
|||||||
if (!open)
|
if (!open)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (this._type == 2 && this._updatesFile.query_exists(null))
|
|
||||||
this._type = 3;
|
|
||||||
|
|
||||||
let dialogContent = DialogContent[this._type];
|
let dialogContent = DialogContent[this._type];
|
||||||
|
|
||||||
let subject = dialogContent.subject;
|
let subject = dialogContent.subject;
|
||||||
@ -545,6 +542,9 @@ const EndSessionDialog = new Lang.Class({
|
|||||||
this._totalSecondsToStayOpen = totalSecondsToStayOpen;
|
this._totalSecondsToStayOpen = totalSecondsToStayOpen;
|
||||||
this._type = type;
|
this._type = type;
|
||||||
|
|
||||||
|
if (this._type == 2 && this._updatesFile.query_exists(null))
|
||||||
|
this._type = 3;
|
||||||
|
|
||||||
this._applications = [];
|
this._applications = [];
|
||||||
this._applicationList.destroy_all_children();
|
this._applicationList.destroy_all_children();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user