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
@ -1,7 +1,7 @@
|
||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||
/* exported Indicator */
|
||||
|
||||
const { Clutter, Gio, GLib, GObject, Shell } = imports.gi;
|
||||
const { Clutter, Gio, GLib, GObject, Shell, St } = imports.gi;
|
||||
|
||||
const Dialog = imports.ui.dialog;
|
||||
const Main = imports.ui.main;
|
||||
@ -353,12 +353,16 @@ var GeolocationDialog = GObject.registerClass({
|
||||
|
||||
/* Translators: %s is an application name */
|
||||
let title = _("Give %s access to your location?").format(name);
|
||||
let body = _("Location access can be changed at any time from the privacy settings.");
|
||||
|
||||
let contentParams = { title, description, body };
|
||||
let content = new Dialog.MessageDialogContent(contentParams);
|
||||
let content = new Dialog.MessageDialogContent({ title, description });
|
||||
this.contentLayout.add_actor(content);
|
||||
|
||||
let infoLabel = new St.Label({
|
||||
text: _('Location access can be changed at any time from the privacy settings.'),
|
||||
x_align: Clutter.ActorAlign.CENTER,
|
||||
});
|
||||
content.add_child(infoLabel);
|
||||
|
||||
let button = this.addButton({ label: _("Deny Access"),
|
||||
action: this._onDenyClicked.bind(this),
|
||||
key: Clutter.KEY_Escape });
|
||||
|
Reference in New Issue
Block a user