Gnome Shell Extension reacting to double-click



Hello,

I am trying to write a shell extension, creating a base with "gnome-
shell-extension-tool --create-extension". I changed the icon and wanted
to react on certain button-presses (esp. double-left-click).

I found from other extensions that you can subscribe to the button-
release-event and use event.get_button() to find out, which button was
pressed.

https://github.com/hedayaty/NetSpeed/blob/a83ed37a1d16e024b0f1d4627fb14
05360c39629/net_speed_status_icon.js#L110

And I think this fits with

http://docs.ptomato.name:9292/gdk30~3.10_/gdk.event#method-get_button

Now I found that there is a get_event_type() for this but
get_event_type() does not exist within my context. I get "JS ERROR:
TypeError: event.get_event_type is not a function", even though it
should be there if get_button() is present and working.

So my questions are:
* How do I find out from the button-release-event, whether the icon was
double-clicked?
* Is there a way to check library versions from within lg/gjs?
* Why is get_event_type not available? Or am I looking at the wrong
get_button()? Where is the correct one documented?

I am running Fedora 23 with gnome-shell 3.18.5.

Thank you
Mario Wenzel


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]