Renaming and removed unnecessary function

This commit is contained in:
zeitigeist
2019-01-04 19:30:38 +03:00
parent 1694632c68
commit 267004881f
3 changed files with 5 additions and 6 deletions

View File

@@ -5428,7 +5428,7 @@
<item id="LAUNCH" translatable="yes">Launch new instance</item>
<item id="CYCLE" translatable="yes">Cycle through windows</item>
<item id="CYCLE-MIN" translatable="yes">Cycle windows + minimize</item>
<item id="NOTHING-MIN" translatable="yes">Do nothing + minimize</item>
<item id="TOOGLE-SHOWPREVIEW" translatable="yes">Toggle + Show preview</item>
</items>
</object>
<packing>

View File

@@ -752,13 +752,12 @@ var taskbarAppIcon = new Lang.Class({
}
let appCount = this.getAppIconInterestingWindows().length;
if (this.windowPreview && (!(buttonAction == "NOTHING-MIN") || (appCount <= 1)))
if (this.windowPreview && (!(buttonAction == "TOOGLE-SHOWPREVIEW") || (appCount <= 1)))
this.windowPreview.requestCloseMenu();
// We check if the app is running, and that the # of windows is > 0 in
// case we use workspace isolation,
let appIsRunning = this.app.state == Shell.AppState.RUNNING
&& this.getAppIconInterestingWindows().length > 0
let appIsRunning = this.app.state == Shell.AppState.RUNNING && appCount > 0
// We customize the action only when the application is already running
if (appIsRunning && !this.isLauncher) {
@@ -840,7 +839,7 @@ var taskbarAppIcon = new Lang.Class({
else
this.app.activate();
break;
case "NOTHING-MIN":
case "TOOGLE-SHOWPREVIEW":
if (appCount == 1) {
if (!Main.overview._shown) {
if (this.app == focusedApp)

View File

@@ -16,7 +16,7 @@
<value value='3' nick='CYCLE'/>
<value value='4' nick='CYCLE-MIN'/>
<value value='5' nick='QUIT'/>
<value value='6' nick='NOTHING-MIN'/>
<value value='6' nick='TOOGLE-SHOWPREVIEW'/>
</enum>
<enum id='org.gnome.shell.extensions.dash-to-panel.statusAreaPosition'>
<value value='0' nick='BUTTONSLEFT'/>