dialog: Remove MessageDialogContent.body property
According to the new dialog design, dialogs generally only have a title and a description, so the `body` property is no longer needed. At the places where it's still used, we replace it with the description property or a plain label we add to MessageDialogContent ourselves. See https://gitlab.gnome.org/GNOME/gnome-shell/issues/1343 https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/886
This commit is contained in:

committed by
Florian Müllner

parent
845c52797b
commit
2fc84e0fe3
@ -25,7 +25,7 @@ class KeyringDialog extends ModalDialog.ModalDialog {
|
||||
this.contentLayout.add(this._content);
|
||||
|
||||
this.prompt.bind_property('message', this._content, 'title', GObject.BindingFlags.SYNC_CREATE);
|
||||
this.prompt.bind_property('description', this._content, 'body', GObject.BindingFlags.SYNC_CREATE);
|
||||
this.prompt.bind_property('description', this._content, 'description', GObject.BindingFlags.SYNC_CREATE);
|
||||
|
||||
this._workSpinner = null;
|
||||
this._controlTable = null;
|
||||
|
@ -29,11 +29,10 @@ class NetworkSecretDialog extends ModalDialog.ModalDialog {
|
||||
else
|
||||
this._content = this._getContent();
|
||||
|
||||
let contentParams = {
|
||||
let contentBox = new Dialog.MessageDialogContent({
|
||||
title: this._content.title,
|
||||
body: this._content.message,
|
||||
};
|
||||
let contentBox = new Dialog.MessageDialogContent(contentParams);
|
||||
description: this._content.message,
|
||||
});
|
||||
this.contentLayout.add_actor(contentBox);
|
||||
|
||||
let layout = new Clutter.GridLayout({ orientation: Clutter.Orientation.VERTICAL });
|
||||
|
@ -25,11 +25,11 @@ const DELAYED_RESET_TIMEOUT = 200;
|
||||
var AuthenticationDialog = GObject.registerClass({
|
||||
Signals: { 'done': { param_types: [GObject.TYPE_BOOLEAN] } },
|
||||
}, class AuthenticationDialog extends ModalDialog.ModalDialog {
|
||||
_init(actionId, body, cookie, userNames) {
|
||||
_init(actionId, description, cookie, userNames) {
|
||||
super._init({ styleClass: 'prompt-dialog' });
|
||||
|
||||
this.actionId = actionId;
|
||||
this.message = body;
|
||||
this.message = description;
|
||||
this.userNames = userNames;
|
||||
|
||||
this._sessionUpdatedId = Main.sessionMode.connect('updated', () => {
|
||||
@ -40,7 +40,7 @@ var AuthenticationDialog = GObject.registerClass({
|
||||
|
||||
let title = _("Authentication Required");
|
||||
|
||||
let content = new Dialog.MessageDialogContent({ title, body });
|
||||
let content = new Dialog.MessageDialogContent({ title, description });
|
||||
this.contentLayout.add_actor(content);
|
||||
|
||||
if (userNames.length > 1) {
|
||||
|
Reference in New Issue
Block a user