Thank you both for your informations, they were really useful learning to
handle gnome-shell js again. :-)

Maybe my exceptions regarding looking-glass were misleaded by my
experiences with the firefox DOM-inspector
https://addons.mozilla.org/de/firefox/addon/dom-inspector-6622/ which is a
really powerful tool for CSS and javascript inspection for both content and
chrome.

cheers
Bazon

2012/10/5 Amy <mathematical.cof...@gmail.com>

> On 5 October 2012 14:55, Jasper St. Pierre <jstpie...@mecheye.net> wrote:
> > On Fri, Oct 5, 2012 at 12:17 AM, Bazon Bloch <bazonbl...@arcor.de>
> wrote:
> >> Thank you, that was indeed the needed connect! :-)
> >>
> >> But I got two questions left concerning that:
> >> 2012/10/4 Amy <mathematical.cof...@gmail.com>(You can
> >>
> >>> enter the Overview & then open the looking glass and use the 'picker'
> >>> object to try and work out which actor you want to listen to events on
> >>> if you didn't know it was the _workspacesDisplay.actor).
> >>
> >>
> >> 1.
> >> That was thing I was trying before. But: The picker only picked me
> >> [0x8f1a380 ShellGenericContainer:last-child first-child]
> >>
> >> this is indeed the same as if I enter
> >> imports.ui.main.overview._workspacesDisplay.actor
> >> in the looking glass inspector, that also returns
> >> [0x8f1a380 ShellGenericContainer:last-child first-child]
> >>
> >> But how do I know than that
> >> [0x8f1a380 ShellGenericContainer:last-child first-child] =
> >> imports.ui.main.overview._workspacesDisplay.actor ?
>
> re Blazon - Oh, I didn't think of that :P If you're very lucky,
> sometimes gnome-shell JS classes for which the class has one main
> actor set the '_delegate' property on `this.actor` pointing back to
> `this`, so you can trace back like that. For example,
> Main.panel.actor._delegate === Main.panel, so if you had just the
> actor you could ask for its  _delegate property and see '[object
> Object delegate for 0xa3723c0 ShellGenericContainer:last-child
> "panel"]'. I think on GNOME 3.4 if you get the above object, you can
> also look at __name__ to see 'Panel' (can't check at the moment, I'm
> on 3.2). Unfortunately not all classes do the `this.actor._delegate =
> this` thing (easy to forget, or perhaps not appropriate for that
> class).
>
> >
> > There's no way to find that (it would be impossible). But if you
> > scourge up and down the tree of actors (use the mouse wheel when
> > hovering over an actor in the looking glass), and grep through the
> > sources, you can get close.
> >> I tried to click on "__metaclass__", but that gave me no information.
> >>
> >> 2.
> >> In looking glass, I can't find the "reactive" property in
> >> imports.ui.main.overview._workspacesDisplay.actor. How did you know it
> was
> >> there?
>
> The hard way when I first started developing extensions, when I was
> spending ages trying to work out why my actor wasn't responding to
> clicks etc and eventually finding it in the Clutter documentation
> after far too many hours :) (it's a bit like that... "oh, all you had
> to do was set <magicProperty> to <magicValue> and it works!" - just
> ask lots of questions and you'll eventually get there). If you knew
> the actor was a Clutter.Actor (all St.* actors are Clutter Actors) you
> could look at the relevant documentation page [0] though .reactive
> might not be immediately obvious as the cause of your problem.
>
> > It's a property for all Clutter actors, of which
> > _workspacesDisplay.actor is one of. The property inspector is
> > misleading; we should probably rework that to be a bit better.
>
> The objects that are through GObject introspection (like Clutter
> actors, or Meta classes) don't have their properties shown in the LG
> object inspector by default because they're loaded lazily - i.e. they
> only show up once some extension/JS code queries them. For example,
> type in `global.screen` and inspect it - you probably won't see a
> property `set_compositor_data`. Now type
> `global.screen.set_compositor_data` and you will see that it exists
> and is a function. Inspect it again, and you'll see
> `set_compositor_data` is now there.
>
> I've done a little bit of work on trying to improve the property
> inspector in the looking glass to display all the properties of an
> object that can be found through GObject introspection - it doesn't
> always work, but I find it handy to explore new (gobject
> introspection) objects, hand in hand with the documentation [1]. You
> may find it handy.
>
> [0]: http://developer.gnome.org/clutter/stable/ClutterActor.html
> [1]:https://extensions.gnome.org/extension/476/looking-glass-inspector/
>
> >>
> >> Many thanks
> >> Bazon
> >>
> >>
> >>
> >>
> >>
> >>
> >> 2012/10/4 Amy <mathematical.cof...@gmail.com>
> >>>
> >>> If you connect to 'button-press-event' or 'button-release-event' (ie
> >>> click event) on `Main.overview._workspacesDisplay.actor`, and
> >>> additionally set its 'reactive' property to `true` (so that it
> >>> actually receives these events), that should do the trick. (You can
> >>> enter the Overview & then open the looking glass and use the 'picker'
> >>> object to try and work out which actor you want to listen to events on
> >>> if you didn't know it was the _workspacesDisplay.actor).
> >>>
> >>> On 3 October 2012 23:37, Bazon Bloch <bazonbl...@arcor.de> wrote:
> >>> > Hello,
> >>> >
> >>> > I would like to show the desktop when clicking an empty place in the
> >>> > overview in WorkspacesView.WorkspacesDisplay mode.
> >>> > So I need a connect signal for that. Does anyone know that signal?
> >>> >
> >>> > Thanks
> >>> > Bazon
> >>> > _______________________________________________
> >>> > gnome-shell-list mailing list
> >>> > gnome-shell-list@gnome.org
> >>> > https://mail.gnome.org/mailman/listinfo/gnome-shell-list
> >>
> >>
> >>
> >> _______________________________________________
> >> gnome-shell-list mailing list
> >> gnome-shell-list@gnome.org
> >> https://mail.gnome.org/mailman/listinfo/gnome-shell-list
> >>
> >
> >
> >
> > --
> >   Jasper
>
_______________________________________________
gnome-shell-list mailing list
gnome-shell-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gnome-shell-list

Reply via email to