gui/event-widget: Use more bindings in the UI file

Instead of manually connecting to signals and binding to properties
in code.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/758>
This commit is contained in:
Georges Basile Stavracas Neto
2026-05-19 22:20:09 +00:00
committed by Marge Bot
parent c939c7176d
commit e4d1fdf13c
2 changed files with 12 additions and 39 deletions
+6 -1
View File
@@ -11,6 +11,9 @@ template $GcalEventWidget: Widget {
}
DragSource drag_source {
propagation-phase: bind $read_only_to_propagation_phase_cb(
template.event as <$GcalEvent>.calendar as <$GcalCalendar>.read-only
);
prepare => $on_drag_source_prepare_cb(template) not-swapped;
begin => $on_drag_source_begin_cb(template) not-swapped;
}
@@ -64,7 +67,9 @@ template $GcalEventWidget: Widget {
Box horizontal_box {
spacing: 4;
$GcalFadingLabel summary_label {}
$GcalFadingLabel summary_label {
label: bind template.event as <$GcalEvent>.summary;
}
Label timestamp_label {
halign: end;