fthx / dock-from-dash

GNU General Public License v3.0
97 stars 20 forks source link

Update preferences UI #74

Closed subpop closed 1 year ago

subpop commented 1 year ago

Replace the GtkBox in the preferences window with a couple AdwPreferenceGroups and AdwActionRows.

fthx commented 1 year ago

Seems this does concern GS 43+ ? If so, I won't break UI for GS < 43 users.

subpop commented 1 year ago

That's a good question. I don't know, actually. Does gnome-shell use the gjs and runtime of the system or something else? I'll load up a GNOME 42 desktop and see how the extension behaves.

subpop commented 1 year ago

It runs fine on Fedora 36.

Screenshot from 2022-12-18 20-18-40

subpop commented 1 year ago

I learned that GNOME Shell >= 42 will prefer fillPreferencesWindow if the function is present. I refactored the patch to preserve the existing buildPrefsWidget, allowing GNOME Shell < 42 to continue to use the GtkWidget-based preferences window, while still enabling GNOME Shell >= 42 to use the AdwPreferencesWindow-based window.

I'm not sure I'm happy with the amount of code duplication this creates though. It makes adding a new preference now twice as burdensome.

fthx commented 1 year ago

I'll try your first patch with Ubuntu 22.04 (that I do use), GS 42. It could be wise to use a GS >= 42 only prefs UI, extension available only for GS >= 42 in Gnome extensions website.

The old (= current) extension version is quite ok now (with no more harmless JS errors). I've got a last bug to catch and I could freeze it as the latest GS < 42 version, then begin to update it only for GS >= 42.