Commit Graph

19 Commits

Author SHA1 Message Date
Florian Müllner
213e38c2ef cleanup: Use arrow notation for anonymous functions
Arrow notation is great, use it consistently through-out the code base
to bind `this` to anonymous functions, replacing the more overbose
Lang.bind(this, function() {}).

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/23
2018-02-21 13:55:00 +00:00
Florian Müllner
76f09b1e49 cleanup: Use method syntax
Modern javascript has a short-hand for function properties, embrace
it for better readability and to prepare for an eventual port to
ES6 classes.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/23
2018-02-21 13:54:58 +00:00
Carlos Garnacho
a2303c5272 ibusCandidatePopup: Feed OSK suggestions from ibus panel candidates
We don't currently hide the ibus completion panel, and this is done from
within the popup that we are meant to hide itself, so thoroughly sucks.
2018-02-05 17:46:57 +01:00
Florian Müllner
033277b68f Define externally accessible contants with 'var' instead of 'const'
Just as we did with classes, define other constants that are (or
may be) used from other modules with 'var' to cut down on warnings.

https://bugzilla.gnome.org/show_bug.cgi?id=785084
2017-07-18 21:52:06 +02:00
Florian Müllner
2582d16ca7 Define classes with 'var' instead of 'const'
Any symbols (including class properties) that should be visible
outside the module it's defined in need to be defined as global.
For now gjs still allows the access for 'const', but get rid of
the warnings spill now by changing it.

https://bugzilla.gnome.org/show_bug.cgi?id=785084
2017-07-18 21:52:06 +02:00
Peng Wu
f9a03f212c ibusCandidatePopup: handle mouse scroll event on candidates
When use mouse scroll button on input method candidates,
move the cursor up/down on candidates.

https://bugzilla.gnome.org/show_bug.cgi?id=776032
2017-01-19 15:18:43 +01:00
Rui Matos
1bf27b1f18 ibusCandidatePopup: Handle relative cursor signal absence gracefully
Only recent IBus versions have support for this signal
which is used for wayland clients. In order to work
with older IBus versions we can silently ignore the
signal's absence.

https://bugzilla.gnome.org/show_bug.cgi?id=753476
2016-02-17 18:01:02 +01:00
Rui Matos
a13357c2a8 ibusCandidatePopup: Add support for relative cursor positioning
IBus now provides a new method for cursor positioning where the
coordinates are relative to the focused window. This is useful for
wayland clients which don't have access to their global coordinates.

https://bugzilla.gnome.org/show_bug.cgi?id=753476
2016-02-15 18:06:53 +01:00
Jakub Steiner
48cfd35b65 theme: a button is a button is a button
https://bugzilla.gnome.org/show_bug.cgi?id=737785
2015-02-20 15:16:06 +01:00
Rui Matos
39c210abed ibusCandidatePopup: Fix default candidate index labels
The first 10 candidates are supposed to be shortcutted with the
keyboard keys 1 through 0 so the 10th index should be '0', not 'a'.

https://bugzilla.gnome.org/show_bug.cgi?id=702944
2014-07-08 11:31:15 +02:00
Rui Matos
e2ccbe5528 layout: Change setDummyCursorPosition to also set the size
If we are being used to follow a text entry cursor we also need to set
the size so that the popup menu avoids covering it.

https://bugzilla.gnome.org/show_bug.cgi?id=727579
2014-04-11 16:54:01 +02:00
Jasper St. Pierre
c8a58dcb69 layout: Add a standard dummy cursor
Right now we have three "dummy cursor" widgets between the background
menu, the message tray menu, and the IBus candidate popup. Consolidate
these into one "dummy cursor" widget which is tracked in the layout
manager.
2014-01-14 18:56:45 -05:00
Florian Müllner
deb2f30b37 js: Use EVENT_PROPAGATE/EVENT_STOP constants in event handlers
Just as SOURCE_CONTINUE/SOURCE_REMOVE in source functions, these
constants increase code clarity over plain true/false.

https://bugzilla.gnome.org/show_bug.cgi?id=719567
2013-12-16 18:27:19 +01:00
Rui Matos
7e24a696bd ibusCandidatePopup: Fix cursor positioning
After moving the dummy source actor, we still have to poke the
boxpointer so that it gets repositioned.

This has always been broken but went unnoticed until now since none of
the commonly used engines currently depend on this method. Thanks to
Mathieu Bridon for pointing it out.

https://bugzilla.gnome.org/show_bug.cgi?id=691902
2013-02-15 00:26:47 +01:00
Rui Matos
c3ed936776 ibusCandidatePopup: Make candidates reactive to pointer clicks
Allow for candidates to be selected by clicking on them.

https://bugzilla.gnome.org/show_bug.cgi?id=691902
2013-02-15 00:26:47 +01:00
Rui Matos
235ec7cb2e CandidateArea: make setOrientation() public
setCandidates() has too many arguments and setting the orientation
isn't particularly related with it. It might also be useful to switch
orientation without changing the candidates.

https://bugzilla.gnome.org/show_bug.cgi?id=691902
2013-02-15 00:26:47 +01:00
Rui Matos
4f8586d81d ibusCandidatePopup: Add pagination buttons
Makes switching candidates pages with pointer clicks possible.

https://bugzilla.gnome.org/show_bug.cgi?id=691902
2013-02-15 00:26:47 +01:00
Rui Matos
6cd1e38425 ibusCandidatePopup: Style updates according to design mockups
Make it look more like the mockups.

In order to do that we stop using PopupMenu and friends as it doesn't
really buy us anything and just makes it more cumbersome to add the
style classes we need.

https://bugzilla.gnome.org/show_bug.cgi?id=691902
2013-02-15 00:26:47 +01:00
Rui Matos
04074f883f ibusCandidatePopup: A candidate popup for IBus input methods
This is an implementation of the org.freedesktop.IBus.Panel API which
shows a shell style popup (BoxPointer) when using an IBus input
method.

Based on code from the ibus-gjs project[1].

[1] https://github.com/fujiwarat/ibus-gjs

https://bugzilla.gnome.org/show_bug.cgi?id=641531
2012-07-16 00:59:13 +02:00