Commit Graph

53660 Commits

Author SHA1 Message Date
Matthias Clasen
4f3065a5e8 calendar: Stop using ::focus-out-event
Use the generic ::event signal.
2018-01-16 14:14:10 -05:00
Matthias Clasen
e733aa43cf color editor: stop using ::focus-out-event
Again, the has-focus property is sufficient.
2018-01-16 14:14:10 -05:00
Matthias Clasen
5d57f0be8a text cell renderer: Stop using ::focus-out-event
The has-focus property works fine here.
2018-01-16 14:14:10 -05:00
Matthias Clasen
7af2f73608 spin cell renderer: Stop using ::focus-out-event
The has-focus property works fine here.
2018-01-16 14:14:10 -05:00
Matthias Clasen
04adcff624 combo cell renderer: Stop using ::focus-out-event
The has-focus property works fine here.
2018-01-16 14:14:10 -05:00
Matthias Clasen
6d1dbec9dd tests: Stop using ::focus-in/out-event
The has-focus property works just as well here.
2018-01-16 14:14:10 -05:00
Matthias Clasen
e3e00a2673 popover: Stop using ::focus-in/out-event
We can use the is-active property of the window instead.
2018-01-16 14:14:10 -05:00
Matthias Clasen
b12371e1b0 application: Stop using ::focus-in-event
We are really interested in the active window, so use
that property directly.
2018-01-16 14:14:10 -05:00
Matthias Clasen
7277d657d9 window: Stop using ::focus-in/out-event
We can just use the generic ::event.
2018-01-16 14:14:10 -05:00
Matthias Clasen
327ec24e51 text view: Stop using ::focus-in/out-event
We can just use the generic ::event here.
2018-01-16 14:14:10 -05:00
Matthias Clasen
253ac15928 entry completion: Stop using ::focus-out-event
We can just use ::event.
2018-01-16 14:14:10 -05:00
Matthias Clasen
8c6c2be316 entry: Stop using ::focus-in/out-event
We can just use the generic ::event signal.
2018-01-16 14:14:10 -05:00
Matthias Clasen
144448d18b a11y: Stop using ::focus-in/out-event
We can just use the generic ::event signal.
2018-01-16 14:14:10 -05:00
Matthias Clasen
5759bc59c9 Drop gtk_widget_hide_on_delete
This function is misnamed - it is only ever relevant for
windows. And with the ::hide-on-delete property , it is
no longer necessary to use the signal for this simple case.
2018-01-16 14:14:10 -05:00
Matthias Clasen
2b59917a9d Drop ::event-after
This signal is not used in GTK+, and we are reducing the
amount of widget signals devoted to events in favor of
event controllers.
2018-01-16 14:14:10 -05:00
Matthias Clasen
1c2e09116a Drop ::grab-broken-event
This signal is no longer used in GTK+. Grab broken events
can be handled with the generic ::event signal.
2018-01-16 14:14:10 -05:00
Matthias Clasen
0583b80d1b button: Stop using ::grab-broken-event
The event-specific signals are going away. Just use ::event here.
2018-01-16 14:14:10 -05:00
Matthias Clasen
4bbda548b7 menushell: Stop using ::grab-broken
The event-specific signals are going away. Just use ::event here.
2018-01-16 14:14:10 -05:00
Matthias Clasen
fa07fe2124 notebook: some cleanup 2018-01-16 14:14:10 -05:00
Matthias Clasen
af8bf498e9 notebook: Use a motion event controller
This lets us avoid the ::motion-notify-event handler.
2018-01-16 14:14:10 -05:00
Matthias Clasen
7046463b88 textview: Use a motion event controller
This lets us replace the ::motion-notify-event handler.
2018-01-16 14:14:10 -05:00
Matthias Clasen
f594807c0a Drop ::enter/leave-notify-event
These signals are no longer used in GTK+ and have a (not quite
perfect yet) replacement with GtkEventControllerMotion.

If you need to catch the raw events, the generic ::event
signal still works.
2018-01-16 14:14:10 -05:00
Matthias Clasen
06605d54f2 menu: Use a motion event controller
This lets us replace the ::enter/leave-notify-event handlers.
Not that there is a FIXME here - we currently can't get the
crossing mode from the event controller, so we have to fall
back to gtk_get_current_event().
2018-01-16 14:14:10 -05:00
Matthias Clasen
6acf276a1a menuitem: Use a motion event controller
This lets us replace the ::enter/leave-notify-event handlers.
Not that there is a FIXME here - we currently can't get the
crossing mode from the event controller, so we have to fall
back to gtk_get_current_event().
2018-01-16 14:14:10 -05:00
Matthias Clasen
118424bd93 iconview: Use a motion event controller
This can replace ::motion-notify-event and ::leave-notify-event.
2018-01-16 14:14:10 -05:00
Matthias Clasen
ab4f4fb045 scrolled window: Use a motion event controller
This lets use replace one of the last uses of ::leave-notify-event.
2018-01-16 14:14:10 -05:00
Matthias Clasen
9ceafd7c38 entry completion: Drop initial selection avoidance
This is a minor thing, and it is hard to recreate
with event controllers, so drop it for now.
2018-01-16 14:14:10 -05:00
Matthias Clasen
a2a80f8a15 treeview: Use a motion event controller
This replaces handlers for ::enter/leave/motion-notify-event.
2018-01-16 14:14:10 -05:00
Matthias Clasen
cf9074a2e9 Add x/y to GtkEventControllerMotion::enter
We have this information available in enter events,
and having it in the controller signal as well makes
porting easier.

Update existing users.
2018-01-16 14:14:10 -05:00
Matthias Clasen
a9d468a4c8 Drop ::configure-event
This signal is unused in GTK+ and configure events are handled
internally by GtkWindow.

If you need to catch configure events, the generic ::event
signal still works.
2018-01-16 14:14:10 -05:00
Matthias Clasen
59572e5fcf window: Stop using ::configure-event
We already have a generic ::event handler that we
can just press into service for this.
2018-01-16 14:14:10 -05:00
Matthias Clasen
8338b0f0cc testgtk: Stop using ::configure-event 2018-01-16 14:14:10 -05:00
Matthias Clasen
2e04817701 xim: Stop using ::configure-event
The generic ::event will do.
2018-01-16 14:14:10 -05:00
Matthias Clasen
cbf1ff98f7 tests: Stop using ::configure-event
The generic ::event will do.
2018-01-16 14:14:10 -05:00
Matthias Clasen
fa885f437c Drop ::touch-event
This signal is not used in GTK+, and has a suitable
replacement with GtkGesture and its subclasses.

If you need to catch the raw touch events, the generic ::event
signal still works, too.
2018-01-16 14:14:10 -05:00
Matthias Clasen
47712a826b Drop ::scroll-event
This signal is not used in GTK+, and has a suitable
replacement with GtkEventControllerScroll.

If you need to catch these events, the generic ::event
signal still works, too.
2018-01-16 14:14:10 -05:00
Matthias Clasen
e93c2517e6 Drop ::proximity-in-event and ::proximity-out-event
These are unused in GTK+, and are not very common.
If you need to catch these events, the generic ::event
signal still works.
2018-01-16 14:14:09 -05:00
Matthias Clasen
fd2a3b602f Drop ::map-event and ::unmap-event
These are unused in GTK+, and are not very common.
If you need to catch these events, the generic ::event
signal still works.
2018-01-16 14:14:09 -05:00
Matthias Clasen
ab53142c0f window: Stop using ::map-event
Use ::event here, since we want to drop the event-specific
signals, and we already have a handler for the generic signal.
2018-01-16 14:14:09 -05:00
Matthias Clasen
1e0ae936fe widget: Stop using ::map-event
Use ::event here, since we want to drop the event-specific
signals.
2018-01-16 14:14:09 -05:00
Matthias Clasen
7b581ca096 Drop GtkWidget::destroy-event
This signal is unused in GTK+, and is documented as
'hard to ever get', so there's no good reason for
keeping it.
2018-01-16 14:14:09 -05:00
Matthias Clasen
2b52b4be5d Drop GtkWidget::delete-event
Nobody is using this signal anymore, and ::delete is there
for the few places where it is needed.
2018-01-16 14:14:09 -05:00
Matthias Clasen
41e4c93443 Replace all remaining uses of delete-event 2018-01-16 14:14:09 -05:00
Matthias Clasen
a739ee6905 Replace GtkWidget::delete-event by GtkWindow::close-request
The event is not useful at all, so we are better off
with a signal that doesn't have it, and it is only
relevant on toplevel windows, so we don't need it on
GtkWidget.

With this commit, delete events no longer go through the
::event, ::delete-event, ::event-after widget signals,
but just cause the ::close-request signal on GtkWindow to be
emitted.
2018-01-16 14:14:09 -05:00
Matthias Clasen
1c3f8ba252 testoverlay: Use an event controller
We can stop using ::enter-notify-event here, and use
our new motion event controller instead.
2018-01-16 14:14:09 -05:00
Matthias Clasen
96b2b1b2f3 testgtk: Redo the event watcher case
Make this watch for emissions of ::event, since we
want to get rid of individual signals first.
2018-01-16 14:14:09 -05:00
Matthias Clasen
6ac33215a5 testgtk: Use an event controller for 'testing scrolling'
The current code was not working with smooth scroll events,
for starters.
2018-01-16 14:14:09 -05:00
Matthias Clasen
97f805b888 testinput: Drop some no-op signal handlers
These were not doing anything.
2018-01-16 14:14:09 -05:00
Matthias Clasen
76fea5c5fa treeview: Don't handle ::delete-event
I don't think there is a way to get a delete event
on this popup - there's no window decorations, no close
button, etc. So no need to handle ::delete-event.
2018-01-16 14:14:09 -05:00
Matthias Clasen
7e491fd3fc font chooser: Stop using ::scroll-event
We have an event controller for this purpose now.
2018-01-16 14:14:09 -05:00