event-editor/schedule-section: Inherit AdwPreferencesGroup

This is a prerequisite to make GcalEventEditorSection require
inheriting AdwPreferencesGroup.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/781>
This commit is contained in:
Hari Rana
2026-06-23 14:10:34 -04:00
parent 60c9989e4b
commit cbee9bbb60
4 changed files with 6 additions and 10 deletions
@@ -49,10 +49,8 @@ template $GcalEventEditorDialog: Adw.Dialog {
}
}
Adw.PreferencesGroup {
$GcalScheduleSection schedule_section {
sensitive: bind template.writable;
}
$GcalScheduleSection schedule_section {
sensitive: bind template.writable;
}
$GcalAttendeesSection attendees_section {
@@ -1,16 +1,14 @@
using Gtk 4.0;
using Adw 1;
template $GcalScheduleSection: Box {
orientation: vertical;
spacing: 12;
template $GcalScheduleSection: Adw.PreferencesGroup {
Adw.InlineViewSwitcher {
stack: schedule_type_stack;
homogeneous: true;
}
Adw.ViewStack schedule_type_stack {
margin-top: 12;
vhomogeneous: false;
Adw.ViewStackPage {
+1 -1
View File
@@ -92,7 +92,7 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetState, widget_state_free);
static void gcal_event_editor_section_iface_init (GcalEventEditorSectionInterface *iface);
G_DEFINE_TYPE_WITH_CODE (GcalScheduleSection, gcal_schedule_section, GTK_TYPE_BOX,
G_DEFINE_TYPE_WITH_CODE (GcalScheduleSection, gcal_schedule_section, ADW_TYPE_PREFERENCES_GROUP,
G_IMPLEMENT_INTERFACE (GCAL_TYPE_EVENT_EDITOR_SECTION, gcal_event_editor_section_iface_init))
static void on_start_date_changed_cb (GtkWidget *widget,
+1 -1
View File
@@ -30,7 +30,7 @@
G_BEGIN_DECLS
#define GCAL_TYPE_SCHEDULE_SECTION (gcal_schedule_section_get_type())
G_DECLARE_FINAL_TYPE (GcalScheduleSection, gcal_schedule_section, GCAL, SCHEDULE_SECTION, GtkBox)
G_DECLARE_FINAL_TYPE (GcalScheduleSection, gcal_schedule_section, GCAL, SCHEDULE_SECTION, AdwPreferencesGroup)
gboolean gcal_schedule_section_recurrence_changed (GcalScheduleSection *self);