🔧 Connect fire buttons only once
This commit is contained in:
@@ -117,6 +117,10 @@ var Fire = class {
|
|||||||
dialog.bindColorButton('fire-color-4');
|
dialog.bindColorButton('fire-color-4');
|
||||||
dialog.bindColorButton('fire-color-5');
|
dialog.bindColorButton('fire-color-5');
|
||||||
|
|
||||||
|
// Connect the buttons only once. The bindPreferences can be called multiple times...
|
||||||
|
if (!this._isConnected) {
|
||||||
|
this._isConnected = true;
|
||||||
|
|
||||||
// The fire-gradient-reset button needs to be bound explicitly.
|
// The fire-gradient-reset button needs to be bound explicitly.
|
||||||
dialog.getBuilder().get_object('reset-fire-colors').connect('clicked', () => {
|
dialog.getBuilder().get_object('reset-fire-colors').connect('clicked', () => {
|
||||||
dialog.getProfileSettings().reset('fire-color-1');
|
dialog.getProfileSettings().reset('fire-color-1');
|
||||||
@@ -129,6 +133,7 @@ var Fire = class {
|
|||||||
// Initialize the fire-preset dropdown.
|
// Initialize the fire-preset dropdown.
|
||||||
this._createFirePresets(dialog);
|
this._createFirePresets(dialog);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------- API for extension.js
|
// ---------------------------------------------------------------- API for extension.js
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user