fix: GNOME 49 compatibility - Replace DoNotDisturbSwitch and fix bugs#231
Open
sfnemis wants to merge 3 commits intoqwreey:devfrom
Open
fix: GNOME 49 compatibility - Replace DoNotDisturbSwitch and fix bugs#231sfnemis wants to merge 3 commits intoqwreey:devfrom
sfnemis wants to merge 3 commits intoqwreey:devfrom
Conversation
…lity GNOME 49 removed DoNotDisturbSwitch from ui/calendar.js. This commit: - Replaces the deprecated DoNotDisturbSwitch usage with direct GSettings access - Uses org.gnome.desktop.notifications schema with show-banners key - Creates a custom St.Switch that syncs with GSettings - Adds proper cleanup on destroy to prevent memory leaks This change maintains backward compatibility with GNOME 48 as well. Ref: https://gjs.guide/extensions/upgrading/gnome-shell-49.html
- overlayMenu.ts: Prevent negative offsetY when bottom anchor is used and menu is taller than Quick Settings box by using Math.max(0, ...) - media.ts: Enable addEventStop functionality by uncommenting the button-press-event handler and adding button-release-event handler to properly stop event propagation on media controls
St.Switch does not exist in GNOME Shell's St (Shell Toolkit). The DND control now uses: - St.Button with toggle_mode for the clickable toggle - St.Icon for the visual indicator - St.BoxLayout to combine icon and label This fixes the 'Switch is not a constructor' error on GNOME 49.
Closed
|
It would be great to get this PR tested and merged! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds GNOME 49 compatibility by replacing deprecated APIs and fixing bugs.
Changes
GNOME 49 Compatibility
DoNotDisturbSwitchfromui/calendar.jswith custom implementationSt.Buttonwithtoggle_modeinstead of non-existentSt.SwitchGio.Settingsaccess fororg.gnome.desktop.notificationsschemaBug Fixes
offsetYwhen "bottom" anchor is used with oversized menuaddEventStopfunctionality (was commented out/no-op)Testing
Reference