trying to disconnect signals from thumbnailsbox
- From: Amy <mathematical coffee gmail com>
- To: "gnome-shell-list gnome org" <gnome-shell-list gnome org>
- Subject: trying to disconnect signals from thumbnailsbox
- Date: Fri, 17 May 2013 22:36:13 +1000
Hi all,
It's been a while since I've been digging around with extensions and I can't quite work out how to do this.
I'm trying to replace the thumbnails box (Main.overview._thumbnailsBox) with my own.
However, the thumbnails box connects to a few Main.overview signals (like showing/hidden) and even though I destroy the thumbnails box's actor, the thumbnails box still appears to respond to the signals (causing all sorts of segfaults due to the actor being destroyed...)
How can I make sure the thumbnails box instance "disappears" properly? I think I have removed all references to it, so why isn't it somehow removed? (At the very least, how do I make sure it stops responding to the signals it connected to? I can't disconnect them as the signal ID is not stored, and it appears to have no destroy() method: /usr/share/gnome-shell/js/ui/workspaceThumbnails.js (ThumbnailsBox class).
As far as I can tell, a reference to the thumbnailsbox is only stored in Main.overview._thumbnailsBox, and Main.overview._controls._thumbnailsSlider._thumbnailsBox (and its actor is added to the thumbnail slider's actor, but i made sure to remove it).
Can anyone give me any pointers?
let controls = Main.overview._controls,
slider = controls._thumbnailsSlider,
thumbnailsBox = new ThumbnailsBox();
// kill the old thumbnails box
slider.actor.remove_actor(Main.overview._thumbnailsBox.actor);
Main.overview._thumbnailsBox.actor.destroy(); // <-- TODO: signals not being disconnected....
thumbnailsBox = new ThumbnailsBox();
Main.overview._thumbnailsBox = thumbnailsBox;
slider._thumbnailsBox = thumbnailsBox;
slider.actor.add_actor(thumbnailsBox.actor);
thumbnailsBox.actor.y_expand = true;
cheers,
Amy
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]