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:
@@ -49,10 +49,8 @@ template $GcalEventEditorDialog: Adw.Dialog {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Adw.PreferencesGroup {
|
$GcalScheduleSection schedule_section {
|
||||||
$GcalScheduleSection schedule_section {
|
sensitive: bind template.writable;
|
||||||
sensitive: bind template.writable;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$GcalAttendeesSection attendees_section {
|
$GcalAttendeesSection attendees_section {
|
||||||
|
|||||||
@@ -1,16 +1,14 @@
|
|||||||
using Gtk 4.0;
|
using Gtk 4.0;
|
||||||
using Adw 1;
|
using Adw 1;
|
||||||
|
|
||||||
template $GcalScheduleSection: Box {
|
template $GcalScheduleSection: Adw.PreferencesGroup {
|
||||||
orientation: vertical;
|
|
||||||
spacing: 12;
|
|
||||||
|
|
||||||
Adw.InlineViewSwitcher {
|
Adw.InlineViewSwitcher {
|
||||||
stack: schedule_type_stack;
|
stack: schedule_type_stack;
|
||||||
homogeneous: true;
|
homogeneous: true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Adw.ViewStack schedule_type_stack {
|
Adw.ViewStack schedule_type_stack {
|
||||||
|
margin-top: 12;
|
||||||
vhomogeneous: false;
|
vhomogeneous: false;
|
||||||
|
|
||||||
Adw.ViewStackPage {
|
Adw.ViewStackPage {
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetState, widget_state_free);
|
|||||||
|
|
||||||
static void gcal_event_editor_section_iface_init (GcalEventEditorSectionInterface *iface);
|
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))
|
G_IMPLEMENT_INTERFACE (GCAL_TYPE_EVENT_EDITOR_SECTION, gcal_event_editor_section_iface_init))
|
||||||
|
|
||||||
static void on_start_date_changed_cb (GtkWidget *widget,
|
static void on_start_date_changed_cb (GtkWidget *widget,
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GCAL_TYPE_SCHEDULE_SECTION (gcal_schedule_section_get_type())
|
#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);
|
gboolean gcal_schedule_section_recurrence_changed (GcalScheduleSection *self);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user