event-editor: Extract attendee summary row into a separate widget
Make the summary row reusable and filterable based on the attendee type. This gives us the possibility to have separate summaries for people/groups and resources/rooms. Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/671>
This commit is contained in:
@@ -23,30 +23,16 @@ template $GcalAttendeesSection: Gtk.Box {
|
||||
]
|
||||
}
|
||||
|
||||
Adw.ActionRow summary_row {
|
||||
$GcalAttendeeSummaryRow summary_row {
|
||||
title: _("Participants");
|
||||
activatable-widget: open_details;
|
||||
activated => $on_participant_summary_row_activated_cb(template) not-swapped;
|
||||
attendees: bind template.attendees;
|
||||
filter-flags: GCAL_EVENT_ATTENDEE_TYPE_FILTER_PERSON;
|
||||
}
|
||||
|
||||
styles [
|
||||
"property",
|
||||
]
|
||||
|
||||
[suffix]
|
||||
Label {
|
||||
valign: center;
|
||||
label: bind template.num-participants as <string>;
|
||||
tooltip-text: _("Number of participants");
|
||||
|
||||
styles [
|
||||
"participants-count-label",
|
||||
]
|
||||
}
|
||||
|
||||
[suffix]
|
||||
Image open_details {
|
||||
icon-name: "go-next-symbolic";
|
||||
}
|
||||
$GcalAttendeeSummaryRow {
|
||||
title: _("Resources");
|
||||
attendees: bind template.attendees;
|
||||
filter-flags: GCAL_EVENT_ATTENDEE_TYPE_FILTER_RESOURCE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user