diff --git a/Settings.ui b/Settings.ui index 2b164a8b86..e408d674c6 100644 --- a/Settings.ui +++ b/Settings.ui @@ -1335,6 +1335,90 @@ + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + True + end + center + + + 1 + 0 + + + + + True + False + True + Show trash can + 0 + + + 0 + 0 + + + + + + + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + True + end + center + + + 1 + 0 + + + + + True + False + True + Show mounted volumes and devices + 0 + + + 0 + 0 + + + + + + diff --git a/dash.js b/dash.js index 9093dcadd9..e1c67cb122 100644 --- a/dash.js +++ b/dash.js @@ -762,8 +762,13 @@ var MyDash = new Lang.Class({ } } - Array.prototype.push.apply(newApps, this._removables.getApps()); - newApps.push(this._trash.getApp()); + if (this._dtdSettings.get_boolean('show-mounts')) { + Array.prototype.push.apply(newApps, this._removables.getApps()); + } + + if (this._dtdSettings.get_boolean('show-trash')) { + newApps.push(this._trash.getApp()); + } // Figure out the actual changes to the list of items; we iterate // over both the list of items currently in the dash and the list diff --git a/docking.js b/docking.js index 11810a1f32..0ba9a27e75 100644 --- a/docking.js +++ b/docking.js @@ -507,6 +507,18 @@ const DockedDash = new Lang.Class({ Lang.bind(this, function() { this.dash.resetAppIcons(); }) + ], [ + this._settings, + 'changed::show-trash', + Lang.bind(this, function() { + this.dash.resetAppIcons(); + }) + ], [ + this._settings, + 'changed::show-mounts', + Lang.bind(this, function() { + this.dash.resetAppIcons(); + }) ], [ this._settings, 'changed::show-running', diff --git a/prefs.js b/prefs.js index d8d8b94182..bc9fc65892 100644 --- a/prefs.js +++ b/prefs.js @@ -357,6 +357,14 @@ const Settings = new Lang.Class({ this._builder.get_object('show_favorite_switch'), 'active', Gio.SettingsBindFlags.DEFAULT); + this._settings.bind('show-trash', + this._builder.get_object('show_trash_switch'), + 'active', + Gio.SettingsBindFlags.DEFAULT); + this._settings.bind('show-mounts', + this._builder.get_object('show_mounts_switch'), + 'active', + Gio.SettingsBindFlags.DEFAULT); this._settings.bind('show-show-apps-button', this._builder.get_object('show_applications_button_switch'), 'active', diff --git a/schemas/org.gnome.shell.extensions.dash-to-dock.gschema.xml b/schemas/org.gnome.shell.extensions.dash-to-dock.gschema.xml index 765a397f1f..6a5ec0dc34 100644 --- a/schemas/org.gnome.shell.extensions.dash-to-dock.gschema.xml +++ b/schemas/org.gnome.shell.extensions.dash-to-dock.gschema.xml @@ -215,6 +215,16 @@ Show favorites apps Show or hide favorite appplications icons in the dash + + true + Show trash can + Show or hide the trash can icon in the dash + + + true + Show mounted volumes and devices + Show or hide mounted volume and device icons in the dash + true Show applications button