diff --git a/data/theme/gnome-shell-sass/widgets/_dialogs.scss b/data/theme/gnome-shell-sass/widgets/_dialogs.scss index b04c6b6e0..373291b5a 100644 --- a/data/theme/gnome-shell-sass/widgets/_dialogs.scss +++ b/data/theme/gnome-shell-sass/widgets/_dialogs.scss @@ -42,11 +42,6 @@ spacing: 20px; } -.message-dialog-icon { - min-width: $base_icon_size * 3; - icon-size: $base_icon_size * 3; -} - .message-dialog-title { font-weight: bold; } diff --git a/js/ui/accessDialog.js b/js/ui/accessDialog.js index df6ce4161..4f9f47202 100644 --- a/js/ui/accessDialog.js +++ b/js/ui/accessDialog.js @@ -38,12 +38,9 @@ class AccessDialog extends ModalDialog.ModalDialog { // let modal = options['modal'] || true; let denyLabel = options['deny_label'] || _("Deny Access"); let grantLabel = options['grant_label'] || _("Grant Access"); - let iconName = options['icon'] || null; let choices = options['choices'] || []; let contentParams = { title, subtitle, body }; - if (iconName) - contentParams.icon = new Gio.ThemedIcon({ name: iconName }); let content = new Dialog.MessageDialogContent(contentParams); this.contentLayout.add_actor(content); diff --git a/js/ui/closeDialog.js b/js/ui/closeDialog.js index 8353b56cb..b48428d20 100644 --- a/js/ui/closeDialog.js +++ b/js/ui/closeDialog.js @@ -1,7 +1,7 @@ // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- /* exported CloseDialog */ -const { Clutter, Gio, GLib, GObject, Meta, Shell, St } = imports.gi; +const { Clutter, GLib, GObject, Meta, Shell, St } = imports.gi; const Dialog = imports.ui.dialog; const Main = imports.ui.main; @@ -42,8 +42,7 @@ var CloseDialog = GObject.registerClass({ let title = _("ā€œ%sā€ is not responding.").format(windowApp.get_name()); let subtitle = _("You may choose to wait a short while for it to " + "continue or force the application to quit entirely."); - let icon = new Gio.ThemedIcon({ name: 'dialog-warning-symbolic' }); - return new Dialog.MessageDialogContent({ icon, title, subtitle }); + return new Dialog.MessageDialogContent({ title, subtitle }); } _updateScale() { diff --git a/js/ui/components/keyring.js b/js/ui/components/keyring.js index b791f0057..606c00405 100644 --- a/js/ui/components/keyring.js +++ b/js/ui/components/keyring.js @@ -21,8 +21,7 @@ class KeyringDialog extends ModalDialog.ModalDialog { this.prompt.connect('show-confirm', this._onShowConfirm.bind(this)); this.prompt.connect('prompt-close', this._onHidePrompt.bind(this)); - let icon = new Gio.ThemedIcon({ name: 'dialog-password-symbolic' }); - this._content = new Dialog.MessageDialogContent({ icon }); + this._content = new Dialog.MessageDialogContent(); this.contentLayout.add(this._content); this.prompt.bind_property('message', this._content, 'title', GObject.BindingFlags.SYNC_CREATE); diff --git a/js/ui/components/networkAgent.js b/js/ui/components/networkAgent.js index 63928f4a4..2e5b075b2 100644 --- a/js/ui/components/networkAgent.js +++ b/js/ui/components/networkAgent.js @@ -29,10 +29,10 @@ class NetworkSecretDialog extends ModalDialog.ModalDialog { else this._content = this._getContent(); - let icon = new Gio.ThemedIcon({ name: 'dialog-password-symbolic' }); - let contentParams = { icon, - title: this._content.title, - body: this._content.message }; + let contentParams = { + title: this._content.title, + body: this._content.message, + }; let contentBox = new Dialog.MessageDialogContent(contentParams); this.contentLayout.add_actor(contentBox); diff --git a/js/ui/components/polkitAgent.js b/js/ui/components/polkitAgent.js index 0a65fbdf6..d9c8bfc0a 100644 --- a/js/ui/components/polkitAgent.js +++ b/js/ui/components/polkitAgent.js @@ -1,7 +1,7 @@ // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- /* exported Component */ -const { AccountsService, Clutter, Gio, GLib, +const { AccountsService, Clutter, GLib, GObject, Pango, PolkitAgent, Polkit, Shell, St } = imports.gi; const Animation = imports.ui.animation; @@ -38,10 +38,9 @@ var AuthenticationDialog = GObject.registerClass({ this.connect('closed', this._onDialogClosed.bind(this)); - let icon = new Gio.ThemedIcon({ name: 'dialog-password-symbolic' }); let title = _("Authentication Required"); - let content = new Dialog.MessageDialogContent({ icon, title, body }); + let content = new Dialog.MessageDialogContent({ title, body }); this.contentLayout.add_actor(content); if (userNames.length > 1) { diff --git a/js/ui/dialog.js b/js/ui/dialog.js index 0799ad27f..8b4fde1ff 100644 --- a/js/ui/dialog.js +++ b/js/ui/dialog.js @@ -1,7 +1,7 @@ // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- /* exported Dialog, MessageDialogContent */ -const { Clutter, Gio, GObject, Pango, St } = imports.gi; +const { Clutter, GObject, Pango, St } = imports.gi; var Dialog = GObject.registerClass( class Dialog extends St.Widget { @@ -146,11 +146,6 @@ class Dialog extends St.Widget { var MessageDialogContent = GObject.registerClass({ Properties: { - 'icon': GObject.ParamSpec.object( - 'icon', 'icon', 'icon', - GObject.ParamFlags.READWRITE | - GObject.ParamFlags.CONSTRUCT, - Gio.Icon.$gtype), 'title': GObject.ParamSpec.string( 'title', 'title', 'title', GObject.ParamFlags.READWRITE | @@ -169,12 +164,11 @@ var MessageDialogContent = GObject.registerClass({ }, }, class MessageDialogContent extends St.BoxLayout { _init(params) { - this._icon = new St.Icon({ y_align: Clutter.ActorAlign.START }); - this._title = new St.Label({ style_class: 'headline' }); + this._title = new St.Label(); this._subtitle = new St.Label(); this._body = new St.Label(); - ['icon', 'title', 'subtitle', 'body'].forEach(prop => { + ['title', 'subtitle', 'body'].forEach(prop => { this[`_${prop}`].add_style_class_name(`message-dialog-${prop}`); }); @@ -196,15 +190,9 @@ var MessageDialogContent = GObject.registerClass({ this.messageBox.add_actor(this._title); this.messageBox.add_actor(this._subtitle); this.messageBox.add_actor(this._body); - - this.add_actor(this._icon); this.add_actor(this.messageBox); } - get icon() { - return this._icon.gicon; - } - get title() { return this._title.text; } @@ -217,14 +205,6 @@ var MessageDialogContent = GObject.registerClass({ return this._body.text; } - set icon(icon) { - this._icon.set({ - gicon: icon, - visible: icon != null, - }); - this.notify('icon'); - } - set title(title) { this._setLabel(this._title, 'title', title); } diff --git a/js/ui/extensionDownloader.js b/js/ui/extensionDownloader.js index 6e4f377ca..e261573ab 100644 --- a/js/ui/extensionDownloader.js +++ b/js/ui/extensionDownloader.js @@ -198,9 +198,6 @@ class InstallExtensionDialog extends ModalDialog.ModalDialog { let content = new Dialog.MessageDialogContent({ title: _("Download and install ā€œ%sā€ from extensions.gnome.org?").format(info.name), - icon: new Gio.FileIcon({ - file: Gio.File.new_for_uri(`${REPOSITORY_URL_BASE}${info.icon}`), - }), }); this.contentLayout.add(content); diff --git a/js/ui/inhibitShortcutsDialog.js b/js/ui/inhibitShortcutsDialog.js index e19f1ab65..42cfb0f90 100644 --- a/js/ui/inhibitShortcutsDialog.js +++ b/js/ui/inhibitShortcutsDialog.js @@ -79,9 +79,8 @@ var InhibitShortcutsDialog = GObject.registerClass({ let title = name ? _("%s wants to inhibit shortcuts").format(name) : _("Application wants to inhibit shortcuts"); - let icon = new Gio.ThemedIcon({ name: 'dialog-warning-symbolic' }); - let contentParams = { icon, title }; + let contentParams = { title }; let restoreAccel = this._getRestoreAccel(); if (restoreAccel) { diff --git a/js/ui/kbdA11yDialog.js b/js/ui/kbdA11yDialog.js index 877c4327a..2baedeefa 100644 --- a/js/ui/kbdA11yDialog.js +++ b/js/ui/kbdA11yDialog.js @@ -49,8 +49,7 @@ class KbdA11yDialog extends GObject.Object { return; } - let icon = new Gio.ThemedIcon({ name: 'preferences-desktop-accessibility-symbolic' }); - let contentParams = { icon, title, body, styleClass: 'access-dialog' }; + let contentParams = { title, body, styleClass: 'access-dialog' }; let content = new Dialog.MessageDialogContent(contentParams); dialog.contentLayout.add_actor(content); diff --git a/js/ui/shellMountOperation.js b/js/ui/shellMountOperation.js index f55f2a9b1..db1e313cd 100644 --- a/js/ui/shellMountOperation.js +++ b/js/ui/shellMountOperation.js @@ -99,8 +99,6 @@ var ShellMountOperation = class { this.close.bind(this)); this.mountOp.connect('show-unmount-progress', this._onShowUnmountProgress.bind(this)); - - this._gicon = source.get_icon(); } _closeExistingDialog() { @@ -113,7 +111,7 @@ var ShellMountOperation = class { _onAskQuestion(op, message, choices) { this._closeExistingDialog(); - this._dialog = new ShellMountQuestionDialog(this._gicon); + this._dialog = new ShellMountQuestionDialog(); this._dialogId = this._dialog.connect('response', (object, choice) => { @@ -132,7 +130,7 @@ var ShellMountOperation = class { this._dialog = this._existingDialog; this._dialog.reaskPassword(); } else { - this._dialog = new ShellMountPasswordDialog(message, this._gicon, flags); + this._dialog = new ShellMountPasswordDialog(message, flags); } this._dialogId = this._dialog.connect('response', @@ -178,7 +176,7 @@ var ShellMountOperation = class { let message = op.get_show_processes_message(); if (!this._processesDialog) { - this._processesDialog = new ShellProcessesDialog(this._gicon); + this._processesDialog = new ShellProcessesDialog(); this._dialog = this._processesDialog; this._dialogId = this._processesDialog.connect('response', @@ -259,10 +257,10 @@ class ShellUnmountNotifier extends MessageTray.Source { var ShellMountQuestionDialog = GObject.registerClass({ Signals: { 'response': { param_types: [GObject.TYPE_INT] } }, }, class ShellMountQuestionDialog extends ModalDialog.ModalDialog { - _init(icon) { + _init() { super._init({ styleClass: 'mount-dialog' }); - this._content = new Dialog.MessageDialogContent({ icon }); + this._content = new Dialog.MessageDialogContent(); this.contentLayout.add_child(this._content); } @@ -280,7 +278,7 @@ var ShellMountPasswordDialog = GObject.registerClass({ GObject.TYPE_BOOLEAN, GObject.TYPE_UINT] } }, }, class ShellMountPasswordDialog extends ModalDialog.ModalDialog { - _init(message, icon, flags) { + _init(message, flags) { let strings = message.split('\n'); let title = strings.shift() || null; let body = strings.shift() || null; @@ -288,7 +286,7 @@ var ShellMountPasswordDialog = GObject.registerClass({ let disksApp = Shell.AppSystem.get_default().lookup_app('org.gnome.DiskUtility.desktop'); - let content = new Dialog.MessageDialogContent({ icon, title, body }); + let content = new Dialog.MessageDialogContent({ title, body }); this.contentLayout.add_actor(content); content._body.clutter_text.ellipsize = Pango.EllipsizeMode.NONE; @@ -498,10 +496,10 @@ var ShellMountPasswordDialog = GObject.registerClass({ var ShellProcessesDialog = GObject.registerClass({ Signals: { 'response': { param_types: [GObject.TYPE_INT] } }, }, class ShellProcessesDialog extends ModalDialog.ModalDialog { - _init(icon) { + _init() { super._init({ styleClass: 'mount-dialog' }); - this._content = new Dialog.MessageDialogContent({ icon }); + this._content = new Dialog.MessageDialogContent(); this.contentLayout.add_child(this._content); let scrollView = new St.ScrollView({ @@ -617,12 +615,6 @@ var GnomeShellMountOpHandler = class { } } - _createGIcon(iconName) { - let realIconName = iconName ? iconName : 'drive-harddisk'; - return new Gio.ThemedIcon({ name: realIconName, - use_default_fallbacks: true }); - } - /** * AskPassword: * @param {Array} params @@ -649,7 +641,7 @@ var GnomeShellMountOpHandler = class { * attempt went wrong. */ AskPasswordAsync(params, invocation) { - let [id, message, iconName, defaultUser_, defaultDomain_, flags] = params; + let [id, message, iconName_, defaultUser_, defaultDomain_, flags] = params; if (this._setCurrentRequest(invocation, id, ShellMountOperationType.ASK_PASSWORD)) { this._dialog.reaskPassword(); @@ -658,7 +650,7 @@ var GnomeShellMountOpHandler = class { this._closeDialog(); - this._dialog = new ShellMountPasswordDialog(message, this._createGIcon(iconName), flags); + this._dialog = new ShellMountPasswordDialog(message, flags); this._dialog.connect('response', (object, choice, password, remember, hiddenVolume, systemVolume, pim) => { let details = {}; @@ -699,7 +691,7 @@ var GnomeShellMountOpHandler = class { * update the dialog with the new question. */ AskQuestionAsync(params, invocation) { - let [id, message, iconName, choices] = params; + let [id, message, iconName_, choices] = params; if (this._setCurrentRequest(invocation, id, ShellMountOperationType.ASK_QUESTION)) { this._dialog.update(message, choices); @@ -708,7 +700,7 @@ var GnomeShellMountOpHandler = class { this._closeDialog(); - this._dialog = new ShellMountQuestionDialog(this._createGIcon(iconName), message); + this._dialog = new ShellMountQuestionDialog(message); this._dialog.connect('response', (object, choice) => { this._clearCurrentRequest(Gio.MountOperationResult.HANDLED, { choice: GLib.Variant.new('i', choice) }); @@ -737,7 +729,7 @@ var GnomeShellMountOpHandler = class { * of processes. */ ShowProcessesAsync(params, invocation) { - let [id, message, iconName, applicationPids, choices] = params; + let [id, message, iconName_, applicationPids, choices] = params; if (this._setCurrentRequest(invocation, id, ShellMountOperationType.SHOW_PROCESSES)) { this._dialog.update(message, applicationPids, choices); @@ -746,7 +738,7 @@ var GnomeShellMountOpHandler = class { this._closeDialog(); - this._dialog = new ShellProcessesDialog(this._createGIcon(iconName)); + this._dialog = new ShellProcessesDialog(); this._dialog.connect('response', (object, choice) => { let response; let details = {}; diff --git a/js/ui/status/location.js b/js/ui/status/location.js index f57b02dbf..3ed54fe0e 100644 --- a/js/ui/status/location.js +++ b/js/ui/status/location.js @@ -351,13 +351,11 @@ var GeolocationDialog = GObject.registerClass({ super._init({ styleClass: 'geolocation-dialog' }); this.reqAccuracyLevel = reqAccuracyLevel; - let icon = new Gio.ThemedIcon({ name: 'find-location-symbolic' }); - /* 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 = { icon, title, subtitle, body }; + let contentParams = { title, subtitle, body }; let content = new Dialog.MessageDialogContent(contentParams); this.contentLayout.add_actor(content); diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js index f85298cd5..be0587527 100644 --- a/js/ui/windowManager.js +++ b/js/ui/windowManager.js @@ -51,13 +51,11 @@ class DisplayChangeDialog extends ModalDialog.ModalDialog { this._countDown = Meta.MonitorManager.get_display_configuration_timeout(); - let iconName = 'preferences-desktop-display-symbolic'; - let icon = new Gio.ThemedIcon({ name: iconName }); let title = _("Do you want to keep these display settings?"); let body = this._formatCountDown(); this._content = new Dialog.MessageDialogContent({ - icon, title, body, + title, body, x_expand: true, y_expand: true, });