Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gjs-WARNING: The GObject property St.ScrollView.[hv]scroll is deprecated (in GNOME 46) #2159

Closed
vanvugt opened this issue Mar 20, 2024 · 8 comments

Comments

@vanvugt
Copy link
Collaborator

vanvugt commented Mar 20, 2024

In GNOME 46:

(gnome-shell:18994): Gjs-WARNING **: 13:53:18.466: The GObject property St.ScrollView.vscroll is deprecated.
0 ensureActorVisibleInScrollView() ["file:///home/dan/.local/share/gnome-shell/extensions/dash-to-dock@micxgx.gmail.com/dash.js":1143:38]
1 _createAppItem/<() ["file:///home/dan/.local/share/gnome-shell/extensions/dash-to-dock@micxgx.gmail.com/dash.js":569:46]
2 _generateAccessors/propdesc.set() ["resource:///org/gnome/gjs/modules/core/_common.js":38:25]
3 _updateFocusState() ["file:///home/dan/.local/share/gnome-shell/extensions/dash-to-dock@micxgx.gmail.com/appIcons.js":328:8]
4 _init/<() ["file:///home/dan/.local/share/gnome-shell/extensions/dash-to-dock@micxgx.gmail.com/appIcons.js":921:74]
5 popModal() ["resource:///org/gnome/shell/ui/main.js":739:16]
6 _syncGrab() ["resource:///org/gnome/shell/ui/overview.js":526:21]
7 _hideDone() ["resource:///org/gnome/shell/ui/overview.js":647:13]
8 _animateNotVisible/<() ["resource:///org/gnome/shell/ui/overview.js":627:54]
9 onStopped() ["resource:///org/gnome/shell/ui/overviewControls.js":757:20]
10 _makeEaseCallback/<() ["resource:///org/gnome/shell/ui/environment.js":65:21]
11 _easeActorProperty/<() ["resource:///org/gnome/shell/ui/environment.js":232:59]
12 anonymous() ["resource:///org/gnome/shell/ui/init.js":21:19]


(gnome-shell:18994): Gjs-WARNING **: 13:53:18.466: The GObject property St.ScrollView.hscroll is deprecated.
0 ensureActorVisibleInScrollView() ["file:///home/dan/.local/share/gnome-shell/extensions/dash-to-dock@micxgx.gmail.com/dash.js":1144:38]
1 _createAppItem/<() ["file:///home/dan/.local/share/gnome-shell/extensions/dash-to-dock@micxgx.gmail.com/dash.js":569:46]
2 _generateAccessors/propdesc.set() ["resource:///org/gnome/gjs/modules/core/_common.js":38:25]
3 _updateFocusState() ["file:///home/dan/.local/share/gnome-shell/extensions/dash-to-dock@micxgx.gmail.com/appIcons.js":328:8]
4 _init/<() ["file:///home/dan/.local/share/gnome-shell/extensions/dash-to-dock@micxgx.gmail.com/appIcons.js":921:74]
5 popModal() ["resource:///org/gnome/shell/ui/main.js":739:16]
6 _syncGrab() ["resource:///org/gnome/shell/ui/overview.js":526:21]
7 _hideDone() ["resource:///org/gnome/shell/ui/overview.js":647:13]
8 _animateNotVisible/<() ["resource:///org/gnome/shell/ui/overview.js":627:54]
9 onStopped() ["resource:///org/gnome/shell/ui/overviewControls.js":757:20]
10 _makeEaseCallback/<() ["resource:///org/gnome/shell/ui/environment.js":65:21]
11 _easeActorProperty/<() ["resource:///org/gnome/shell/ui/environment.js":232:59]
12 anonymous() ["resource:///org/gnome/shell/ui/init.js":21:19]
@vanvugt vanvugt changed the title Gjs-WARNING: The GObject property St.ScrollView.[hv]scroll is deprecated. Gjs-WARNING: The GObject property St.ScrollView.[hv]scroll is deprecated (in GNOME 46) Mar 20, 2024
@sergio-costas
Copy link
Collaborator

This is odd... neither the documentation nor the Gnome Shell source code do mark those properties as deprecated...

imagen

imagen

@vanvugt
Copy link
Collaborator Author

vanvugt commented Mar 26, 2024

$ grep -B4 DEPRECATED *
...
--
st-scroll-view.c-    g_param_spec_object ("hscroll",
st-scroll-view.c-                         "StScrollBar",
st-scroll-view.c-                         "Horizontal scroll indicator",
st-scroll-view.c-                         ST_TYPE_SCROLL_BAR,
st-scroll-view.c:                         ST_PARAM_READABLE | G_PARAM_DEPRECATED);
--
st-scroll-view.c-    g_param_spec_object ("vscroll",
st-scroll-view.c-                         "StScrollBar",
st-scroll-view.c-                         "Vertical scroll indicator",
st-scroll-view.c-                         ST_TYPE_SCROLL_BAR,
st-scroll-view.c:                         ST_PARAM_READABLE | G_PARAM_DEPRECATED);
--
...

@sergio-costas
Copy link
Collaborator

Oh! I was searching for something in the comments... Now it makes sense.

@sergio-costas
Copy link
Collaborator

(also, I searched in lowercase 🤦🏾‍♂️)

@K1ngjulien
Copy link
Contributor

K1ngjulien commented Mar 28, 2024

Am I correct in seeing that this is the only place this occurs?:

dash-to-dock/dash.js

Lines 1142 to 1146 in 936b866

function ensureActorVisibleInScrollView(scrollView, actor) {
const {adjustment: vAdjustment} = scrollView.vscroll;
const {adjustment: hAdjustment} = scrollView.hscroll;
const {value: vValue0, pageSize: vPageSize, upper: vUpper} = vAdjustment;
const {value: hValue0, pageSize: hPageSize, upper: hUpper} = hAdjustment;

From what I can tell, it should be possible to just access scrollView.vAdjustment and scrollView.hAdjustment directly instead of going through vscroll and hscroll.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3020/diffs?commit_id=d243a9ba9320971d5ce8524ff8355b24606d9420

That seems to be why they got deprecated it in the first place:

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3020

@K1ngjulien
Copy link
Contributor

@vanvugt can you check the PR? that should be the last issue for the gnome 46 release :)

@sergio-costas
Copy link
Collaborator

@K1ngjulien You are right. I left a comment in your PR, but in overall, it looks good.

@vanvugt
Copy link
Collaborator Author

vanvugt commented Apr 2, 2024

Closed in #2185.

@vanvugt vanvugt closed this as completed Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants