Provide means to disable dbus listener

This commit is contained in:
Jason DeRose
2020-02-25 14:56:41 -05:00
parent f29525f2f0
commit ba75e61d29
3 changed files with 31 additions and 6 deletions

View File

@@ -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({

View File

@@ -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
}

View File

@@ -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>