mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +09:00
Provide means to disable dbus listener
This commit is contained in:
21
panel.js
21
panel.js
@@ -413,7 +413,7 @@ var dtpPanel = Utils.defineClass({
|
||||
// This saves significant CPU when repainting the screen.
|
||||
this.set_offscreen_redirect(Clutter.OffscreenRedirect.ALWAYS);
|
||||
|
||||
this.progressManager = new Progress.ProgressManager();
|
||||
this._initProgressManager();
|
||||
},
|
||||
|
||||
disable: function () {
|
||||
@@ -550,7 +550,17 @@ var dtpPanel = Utils.defineClass({
|
||||
this._formatVerticalClock();
|
||||
}
|
||||
}
|
||||
]
|
||||
],
|
||||
[
|
||||
Me.settings,
|
||||
'changed::progress-show-bar',
|
||||
() => this._initProgressManager()
|
||||
],
|
||||
[
|
||||
Me.settings,
|
||||
'changed::progress-show-count',
|
||||
() => this._initProgressManager()
|
||||
],
|
||||
);
|
||||
|
||||
if (isVertical) {
|
||||
@@ -1154,7 +1164,12 @@ var dtpPanel = Utils.defineClass({
|
||||
let ignoredConstr = ['WorkspaceIndicator'];
|
||||
|
||||
return source._dtpIgnoreScroll || ignoredConstr.indexOf(source.constructor.name) >= 0;
|
||||
}
|
||||
},
|
||||
|
||||
_initProgressManager: function() {
|
||||
if(!this.progressManager && (Me.settings.get_boolean('progress-show-bar') || Me.settings.get_boolean('progress-show-count')))
|
||||
this.progressManager = new Progress.ProgressManager();
|
||||
},
|
||||
});
|
||||
|
||||
var dtpSecondaryAggregateMenu = Utils.defineClass({
|
||||
|
||||
@@ -252,11 +252,11 @@ var AppProgress = Utils.defineClass({
|
||||
if (property == 'count') {
|
||||
this.setCount(other[property].get_int64());
|
||||
} else if (property == 'count-visible') {
|
||||
this.setCountVisible(other[property].get_boolean());
|
||||
} if (property == 'progress') {
|
||||
this.setCountVisible(Me.settings.get_boolean('progress-show-count') && other[property].get_boolean());
|
||||
} else if (property == 'progress') {
|
||||
this.setProgress(other[property].get_double());
|
||||
} else if (property == 'progress-visible') {
|
||||
this.setProgressVisible(other[property].get_boolean());
|
||||
this.setProgressVisible(Me.settings.get_boolean('progress-show-bar') && other[property].get_boolean());
|
||||
} else {
|
||||
// Not implemented yet
|
||||
}
|
||||
|
||||
@@ -1181,5 +1181,15 @@
|
||||
Keybinding to either show or launch the 10th application in the dash.
|
||||
</description>
|
||||
</key>
|
||||
<key type="b" name="progress-show-bar">
|
||||
<default>true</default>
|
||||
<summary>Show progress bar on app icon</summary>
|
||||
<description>Whether to show progress bar overlay on app icon, for supported applications.</description>
|
||||
</key>
|
||||
<key type="b" name="progress-show-count">
|
||||
<default>true</default>
|
||||
<summary>Show badge count on app icon</summary>
|
||||
<description>Whether to show badge count overlay on app icon, for supported applications.</description>
|
||||
</key>
|
||||
</schema>
|
||||
</schemalist>
|
||||
|
||||
Reference in New Issue
Block a user