Add GNOME 50 support and fix deprecated GTK4 widgets#171
Open
kongvut wants to merge 1 commit into
Open
Conversation
- Add GNOME 50 to shell-version in metadata.json - Fix DateMenu clearButton index for GNOME 49+ (DND button removed) - Add try-catch and null guards for DateMenu widget tree traversal - Add safety guards for private API access (_bannerBin, _bgManagers, panel boxes, _calendar) - Replace deprecated Gtk.MessageDialog with Adw.MessageDialog - Replace deprecated Gtk.FileChooserDialog with Gtk.FileDialog (async API) - Replace deprecated Gtk.ColorButton with Gtk.ColorDialogButton - Replace deprecated Gtk.FontButton with Gtk.FontDialogButton - Replace deprecated Gtk.ComboBoxText with Gtk.DropDown + StringList - Replace deprecated get_style_context().add_class() with add_css_class() Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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
shell-versionin metadata.json_bannerBin,_bgManagers, panel boxes,_calendar)Changes
extension.js
clearBtn = msgHbox.get_child_at_index(1)→get_child_at_index(0)for GNOME 49+?.null guardsMain.messageTray._bannerBin(3 locations)?.guard forMain.layoutManager._bgManagers.filter(Boolean)forpanel._leftBox/_centerBox/_rightBoxMain.panel.statusArea?.dateMenu?._calendarprefs.js
Gtk.MessageDialog→Adw.MessageDialogGtk.FileChooserDialog→Gtk.FileDialog(async open/save API)Gtk.ColorButton→Gtk.ColorDialogButton(signal:color-set→notify::rgba)Gtk.FontButton→Gtk.FontDialogButton(signal:font-set→notify::font-desc, added Pango import)Gtk.ComboBoxText→Gtk.DropDown+Gtk.StringListwith manual index↔id mappingget_style_context().add_class()→add_css_class()metadata.json
"50"toshell-versionarrayTest plan
journalctl /usr/bin/gnome-shell🤖 Generated with Claude Code