diff --git a/README.md b/README.md
index 5816c44..b15b811 100644
--- a/README.md
+++ b/README.md
@@ -31,6 +31,7 @@ The easiest way to install Dash-to-Panel is from [Gnome Shell Extensions](https:
* Set main panel position (top or bottom) and height
* Configure clock location
* Remove "Show Apps" icon from dash
+* Add "Show Desktop" button to panel
* Hide Activities and App Menu buttons from panel
* Isolate running apps in workspaces
* Assign click behaviors (launch new window, cycle open windows, minimize, etc)
@@ -91,4 +92,4 @@ Ideas for recursing child actors and assigning inline styles are based on code f
Thanks to the following people for contributing via pull requests:
- @franglais125 for launching apps by number (w/ overlay)
- @robrobinbin for configuring appMenu on/off in the panel
-- @frnogueira for translations
+- @frnogueira, @zeten30 for translations
diff --git a/appIcons.js b/appIcons.js
index 6099840..3f22bd3 100644
--- a/appIcons.js
+++ b/appIcons.js
@@ -1210,10 +1210,15 @@ const MyShowAppsIconMenu = new Lang.Class({
_redisplay: function() {
this.removeAll();
- let item = this._appendMenuItem('Dash to Panel ' + _('Settings'));
-
- item.connect('activate', function () {
+ let settingsMenuItem = this._appendMenuItem('Dash to Panel ' + _('Settings'));
+ settingsMenuItem.connect('activate', function () {
Util.spawn(["gnome-shell-extension-prefs", Me.metadata.uuid]);
});
+
+ if(this._source._dtpPanel) {
+ this._appendSeparator();
+ let item = this._appendMenuItem(this._source._dtpPanel._restoreWindowList ? _('Restore Windows') : _('Show Desktop'));
+ item.connect('activate', Lang.bind(this._source._dtpPanel, this._source._dtpPanel._onShowDesktopButtonPress));
+ }
}
});
\ No newline at end of file
diff --git a/panel.js b/panel.js
index 599e5db..b767a45 100644
--- a/panel.js
+++ b/panel.js
@@ -127,6 +127,9 @@ const dtpPanel = new Lang.Class({
// sync hover after a popupmenu is closed
this.taskbar.connect('menu-closed', Lang.bind(this, function(){this.container.sync_hover();}));
+
+ if(this.taskbar._showAppsIcon)
+ this.taskbar._showAppsIcon._dtpPanel = this;
this._signalsHandler = new Convenience.GlobalSignalsHandler();
this._signalsHandler.add(
@@ -450,6 +453,8 @@ const dtpPanel = new Lang.Class({
Main.activateWindow(w);
});
this._restoreWindowList = null;
+
+ Main.overview.hide();
} else {
let current_workspace = global.screen.get_active_workspace();
let windows = current_workspace.list_windows().filter(function (w) {
@@ -460,7 +465,7 @@ const dtpPanel = new Lang.Class({
windows.forEach(function(w) {
w.minimize();
});
-
+
this._restoreWindowList = windows;
Mainloop.timeout_add(0, Lang.bind(this, function () {
@@ -468,6 +473,8 @@ const dtpPanel = new Lang.Class({
this._restoreWindowList = null;
}));
}));
+
+ Main.overview.hide();
}
}
});
diff --git a/schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml b/schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml
index 5e87fdb..eb2d46d 100644
--- a/schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml
+++ b/schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml
@@ -143,7 +143,7 @@
Show activities button on the left hand side of the taskbar
- true
+ false
Show desktop button
Show button on right side of bar that minimizes/restores all visible windows on current workspace