From 750a2a075a14e84b67d57e7786b15131e0a87799 Mon Sep 17 00:00:00 2001 From: zakee Date: Mon, 27 Apr 2026 10:10:30 +0300 Subject: [PATCH] feat: add GNOME 50 compatibility and fix clearBtn variable scoping --- README.md | 2 +- openbar@neuromorph/extension.js | 5 +++-- openbar@neuromorph/metadata.json | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 41ccd05..753b91f 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ The extension's directory name should match its uuid i.e. "openbar@neuromorph" Note: Please download from following GitHub branch as per your Gnome version: - For Gnome 42-44: branch 'g42-44' -- For Gnome 45+: branch 'main' +- For Gnome 45-50: branch 'main' You will need to restart the Gnome Shell (for manual install): diff --git a/openbar@neuromorph/extension.js b/openbar@neuromorph/extension.js index f716f91..0ba877b 100644 --- a/openbar@neuromorph/extension.js +++ b/openbar@neuromorph/extension.js @@ -383,15 +383,16 @@ export default class Openbar extends Extension { this.applySectionStyles(sectionList, add); const msgHbox = msgbox.get_child_at_index(1); // hbox at botton for dnd and clear buttons + let clearBtn; if(this.gnomeVersion < 49) { const dndBtn = msgHbox.get_child_at_index(1); this.applyMenuClass(dndBtn, add); const toggleSwitch = dndBtn.get_child_at_index(0); this.applyMenuClass(toggleSwitch, add); - const clearBtn = msgHbox.get_child_at_index(2); + clearBtn = msgHbox.get_child_at_index(2); } else { - const clearBtn = msgHbox.get_child_at_index(1); + clearBtn = msgHbox.get_child_at_index(1); } this.applyMenuClass(clearBtn, add); diff --git a/openbar@neuromorph/metadata.json b/openbar@neuromorph/metadata.json index 8f543f7..c43c704 100644 --- a/openbar@neuromorph/metadata.json +++ b/openbar@neuromorph/metadata.json @@ -12,7 +12,8 @@ "46", "47", "48", - "49" + "49", + "50" ], "url": "https://github.com/neuromorph/openbar", "uuid": "openbar@neuromorph",