Closed Mershl closed 8 months ago
GNOME 46 released mainstream on Arch now so this bug is very prominent.
Does everything work if you put add_child here instead: https://github.com/SUPERCILEX/gnome-clipboard-history/blob/9a4d9c0beca6f49b97f613c77022b2f650c3ba2a/extension.js#L87
@SUPERCILEX I'll try stuff for you but I am not clear what you want. You mean swap the order of lines 87 and 88?
No, the stack trace is saying that the add method was deleted (if you know where I can find release notes, that would be amazing), so I'm just hoping that calling add_child instead will work. Basically replace the word add with add_child.
Doesn't seem to be that simple. I changed that line but got the same problem with line 128. Then changed that line (from add
to add_child
and next got "add_actor" is not a function on line 156.
BTW, there is a GNOME doc which seems to talk about this (at least the add_actor change) at https://gjs.guide/extensions/upgrading/gnome-shell-46.html#gjs
See this comment from an extension developer also: https://www.reddit.com/r/gnome/comments/1bkwcsv/comment/kw246wq/
Made quite a few iterative changes and seems to work ok now. Tested config screen changes etc. Can't be bothered making a PR so here is my diff:
diff --git a/extension.js b/extension.js
index f76b43c..f730b79 100644
--- a/extension.js
+++ b/extension.js
@@ -84,7 +84,7 @@ class ClipboardIndicator extends PanelMenu.Button {
});
hbox.add_child(this._buttonText);
this._downArrow = PopupMenu.arrowIcon(St.Side.BOTTOM);
- hbox.add(this._downArrow);
+ hbox.add_child(this._downArrow);
this.add_child(hbox);
this._fetchSettings();
@@ -125,7 +125,7 @@ class ClipboardIndicator extends PanelMenu.Button {
reactive: false,
can_focus: false,
});
- entryItem.add(this.searchEntry);
+ entryItem.add_child(this.searchEntry);
this.menu.addMenuItem(entryItem);
this.menu.connect('open-state-changed', (self, open) => {
@@ -153,9 +153,9 @@ class ClipboardIndicator extends PanelMenu.Button {
style_class: 'ci-history-menu-section',
overlay_scrollbars: true,
});
- favoritesScrollView.add_actor(this.favoritesSection.actor);
+ favoritesScrollView.add_child(this.favoritesSection.actor);
- this.scrollViewFavoritesMenuSection.actor.add_actor(favoritesScrollView);
+ this.scrollViewFavoritesMenuSection.actor.add_child(favoritesScrollView);
this.menu.addMenuItem(this.scrollViewFavoritesMenuSection);
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
@@ -167,9 +167,9 @@ class ClipboardIndicator extends PanelMenu.Button {
style_class: 'ci-history-menu-section',
overlay_scrollbars: true,
});
- this.historyScrollView.add_actor(this.historySection.actor);
+ this.historyScrollView.add_child(this.historySection.actor);
- this.scrollViewMenuSection.actor.add_actor(this.historyScrollView);
+ this.scrollViewMenuSection.actor.add_child(this.historyScrollView);
this.menu.addMenuItem(this.scrollViewMenuSection);
@@ -181,7 +181,7 @@ class ClipboardIndicator extends PanelMenu.Button {
vertical: false,
});
- actionsSection.actor.add(actionsBox);
+ actionsSection.actor.add_child(actionsBox);
this.menu.addMenuItem(actionsSection);
const prevPage = new PopupMenu.PopupBaseMenuItem();
@@ -192,7 +192,7 @@ class ClipboardIndicator extends PanelMenu.Button {
}),
);
prevPage.connect('activate', this._navigatePrevPage.bind(this));
- actionsBox.add(prevPage);
+ actionsBox.add_child(prevPage);
const nextPage = new PopupMenu.PopupBaseMenuItem();
nextPage.add_child(
@@ -202,9 +202,9 @@ class ClipboardIndicator extends PanelMenu.Button {
}),
);
nextPage.connect('activate', this._navigateNextPage.bind(this));
- actionsBox.add(nextPage);
+ actionsBox.add_child(nextPage);
- actionsBox.add(new St.BoxLayout({ x_expand: true }));
+ actionsBox.add_child(new St.BoxLayout({ x_expand: true }));
this.privateModeMenuItem = new PopupMenu.PopupSwitchMenuItem(
_('Private mode'),
@@ -217,7 +217,7 @@ class ClipboardIndicator extends PanelMenu.Button {
this.privateModeMenuItem.state,
);
});
- actionsBox.add(this.privateModeMenuItem);
+ actionsBox.add_child(this.privateModeMenuItem);
this._updatePrivateModeState();
const clearMenuItem = new PopupMenu.PopupBaseMenuItem();
@@ -227,7 +227,7 @@ class ClipboardIndicator extends PanelMenu.Button {
style_class: 'popup-menu-icon',
}),
);
- actionsBox.add(clearMenuItem);
+ actionsBox.add_child(clearMenuItem);
const settingsMenuItem = new PopupMenu.PopupBaseMenuItem();
settingsMenuItem.add_child(
@@ -237,7 +237,7 @@ class ClipboardIndicator extends PanelMenu.Button {
}),
);
settingsMenuItem.connect('activate', this._openSettings.bind(this));
- actionsBox.add(settingsMenuItem);
+ actionsBox.add_child(settingsMenuItem);
if (ENABLE_KEYBINDING) {
this._bindShortcuts();
@@ -1018,7 +1018,7 @@ class ClipboardIndicator extends PanelMenu.Button {
this._notifSource.connect('destroy', () => {
this._notifSource = undefined;
});
- Main.messageTray.add(this._notifSource);
+ Main.messageTray.add_child(this._notifSource);
}
_showNotification(title, message, transformFn) {
I put changes into #161
So fast, thanks everybody! I put up the extension for review, will let y'all know when it goes through.
Just went live, can you two confirm stuff works?
Seems ok.
Version 35 breaks the clipboard item list on Gnome 45.2. The list won't appear now.
same issu i faced after upgrading it into v 35 ; then i'm manualy intalled the v34 ; butw im gnome 45 user
same issue ...
Whoops, ok I submitted a revert of the changes for gnome 45 review.
Went live.
It works again, thanks.
Sweet, sounds like everything is settled then.
Describe the bug
gnome-clipboard-history as of extension version 34 shows the following error when trying to load on Gnome 46.