Skip to content

Commit 07856a9

Browse files
committed
GridDay: Finish GTK4 port
1 parent cf5a725 commit 07856a9

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

src/Widgets/calendar/GridDay.vala

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ public class DateTime.Widgets.GridDay : Granite.Bin {
3636
private Gtk.Label label;
3737
private bool valid_grab = false;
3838

39-
private Gtk.GestureMultiPress click_gesture;
40-
private Gtk.EventControllerKey key_controller;
41-
4239
public GridDay (GLib.DateTime date) {
4340
Object (date: date);
4441
}
@@ -76,11 +73,13 @@ public class DateTime.Widgets.GridDay : Granite.Bin {
7673
child = box;
7774

7875
// Signals and handlers
79-
click_gesture = new Gtk.GestureMultiPress (this);
76+
var click_gesture = new Gtk.GestureClick ();
8077
click_gesture.pressed.connect (on_button_press);
78+
add_controller (click_gesture);
8179

82-
key_controller = new Gtk.EventControllerKey (this);
80+
var key_controller = new Gtk.EventControllerKey ();
8381
key_controller.key_pressed.connect (on_key_press);
82+
add_controller (key_controller);
8483

8584
bind_property ("date", label, "label", GLib.BindingFlags.SYNC_CREATE, (binding, from_value, ref to_value) => {
8685
unowned var new_date = (GLib.DateTime) from_value.get_boxed ();

0 commit comments

Comments
 (0)