mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-12-04 20:07:36 +00:00
calls-call-record-row: Adapt to event controller API changes
https://docs.gtk.org/gtk4/migrating-3to4.html#adapt-to-event-controller-api-changes Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/714>
This commit is contained in:
parent
78ad3af035
commit
669568869c
1 changed files with 5 additions and 5 deletions
|
@ -46,7 +46,6 @@ struct _CallsCallRecordRow {
|
|||
GtkLabel *time;
|
||||
GtkButton *button;
|
||||
GtkPopover *popover;
|
||||
GtkGesture *gesture;
|
||||
GtkBox *event_box;
|
||||
|
||||
GMenu *context_menu;
|
||||
|
@ -506,7 +505,6 @@ dispose (GObject *object)
|
|||
|
||||
g_clear_object (&self->contact);
|
||||
g_clear_object (&self->action_map);
|
||||
g_clear_object (&self->gesture);
|
||||
|
||||
calls_clear_source (&self->date_change_timeout);
|
||||
calls_clear_signal (self->record, &self->answered_notify_handler_id);
|
||||
|
@ -639,6 +637,7 @@ static void
|
|||
calls_call_record_row_init (CallsCallRecordRow *self)
|
||||
{
|
||||
GAction *act;
|
||||
GtkGesture *gesture;
|
||||
|
||||
gtk_widget_init_template (GTK_WIDGET (self));
|
||||
|
||||
|
@ -654,9 +653,10 @@ calls_call_record_row_init (CallsCallRecordRow *self)
|
|||
act = g_action_map_lookup_action (self->action_map, "delete-call");
|
||||
g_simple_action_set_enabled (G_SIMPLE_ACTION (act), TRUE);
|
||||
|
||||
self->gesture = gtk_gesture_long_press_new (GTK_WIDGET (self->event_box));
|
||||
gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (self->gesture), TRUE);
|
||||
g_signal_connect (self->gesture, "pressed", G_CALLBACK (on_long_pressed), self);
|
||||
gesture = gtk_gesture_long_press_new ();
|
||||
gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (gesture), TRUE);
|
||||
g_signal_connect (gesture, "pressed", G_CALLBACK (on_long_pressed), self);
|
||||
gtk_widget_add_controller (GTK_WIDGET (self->event_box), GTK_EVENT_CONTROLLER (gesture));
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue