diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 06:06:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 06:07:20 +0000 |
commit | 291a94173c5ea022f75b4eee07e6e0c97a04ff7a (patch) | |
tree | 1b830db26b458dec134c75bfc3fcaf2ddcceb149 /extensions/45/vertical-workspaces/lib/optionsFactory.js | |
parent | Updating 45/no-overview to version 46 [85eba64]. (diff) | |
download | gnome-shell-extensions-extra-291a94173c5ea022f75b4eee07e6e0c97a04ff7a.tar.xz gnome-shell-extensions-extra-291a94173c5ea022f75b4eee07e6e0c97a04ff7a.zip |
Adding 45/vertical-workspaces version 37+20240412 [9b05a79].
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'extensions/45/vertical-workspaces/lib/optionsFactory.js')
-rw-r--r-- | extensions/45/vertical-workspaces/lib/optionsFactory.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/extensions/45/vertical-workspaces/lib/optionsFactory.js b/extensions/45/vertical-workspaces/lib/optionsFactory.js index c20885e..05e14b0 100644 --- a/extensions/45/vertical-workspaces/lib/optionsFactory.js +++ b/extensions/45/vertical-workspaces/lib/optionsFactory.js @@ -3,7 +3,7 @@ * optionsFactory.js * * @author GdH <G-dH@github.com> - * @copyright 2022 - 2023 + * @copyright 2022 - 2024 * @license GPL-3.0 */ @@ -130,7 +130,7 @@ export const ItemFactory = class ItemFactory { for (let i = 0; i < options.length; i++) { const text = options[i][0]; const id = options[i][1]; - model.append(new DropDownItemVW({ text, id })); + model.append(new DropDownItem({ text, id })); if (id === currentValue) widget.set_selected(i); } @@ -205,7 +205,7 @@ export const ItemFactory = class ItemFactory { newDropDown() { const dropDown = new Gtk.DropDown({ model: new Gio.ListStore({ - item_type: DropDownItemVW, + item_type: DropDownItem, }), halign: Gtk.Align.END, valign: Gtk.Align.CENTER, @@ -457,8 +457,9 @@ export const AdwPrefs = class { } }; -const DropDownItemVW = GObject.registerClass({ - GTypeName: 'DropDownItemVW', +const DropDownItem = GObject.registerClass({ + // Registered name should be unique + GTypeName: `DropDownItem${Math.floor(Math.random() * 1000)}`, Properties: { 'text': GObject.ParamSpec.string( 'text', @@ -476,7 +477,7 @@ const DropDownItemVW = GObject.registerClass({ -2147483648, 2147483647, 0 ), }, -}, class DropDownItemVW extends GObject.Object { +}, class DropDownItem extends GObject.Object { get text() { return this._text; } |