event-editor: Add "show-attendees-detail-page" action
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/671>
This commit is contained in:
@@ -336,6 +336,25 @@ on_event_editor_save_action_activated_cb (GSimpleAction *action,
|
||||
save_event_and_close_dialog (self);
|
||||
}
|
||||
|
||||
static void
|
||||
on_show_attendees_detail_page_action_activated_cb (GSimpleAction *action,
|
||||
GVariant *param,
|
||||
gpointer user_data)
|
||||
{
|
||||
GcalEventEditorDialog *self = GCAL_EVENT_EDITOR_DIALOG (user_data);
|
||||
|
||||
g_autoptr (GSList) attendees = gcal_event_get_attendees (self->event);
|
||||
|
||||
gcal_attendee_details_page_set_attendees (GCAL_ATTENDEE_DETAILS_PAGE (self->attendee_details_page),
|
||||
attendees);
|
||||
|
||||
gcal_attendee_details_page_set_type_filter (GCAL_ATTENDEE_DETAILS_PAGE (self->attendee_details_page),
|
||||
g_variant_get_uint32 (param));
|
||||
|
||||
adw_navigation_view_push (ADW_NAVIGATION_VIEW (self->nav_view),
|
||||
ADW_NAVIGATION_PAGE (self->attendee_details_page));
|
||||
}
|
||||
|
||||
static void
|
||||
on_cancel_button_clicked_cb (GtkButton *button,
|
||||
GcalEventEditorDialog *self)
|
||||
@@ -624,6 +643,7 @@ gcal_event_editor_dialog_init (GcalEventEditorDialog *self)
|
||||
{
|
||||
static const GActionEntry actions[] = {
|
||||
{"save", on_event_editor_save_action_activated_cb },
|
||||
{"show-attendees-detail-page", on_show_attendees_detail_page_action_activated_cb },
|
||||
};
|
||||
|
||||
gint i = 0;
|
||||
|
||||
Reference in New Issue
Block a user