event-editor/summary-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:
@@ -37,10 +37,8 @@ template $GcalEventEditorDialog: Adw.Dialog {
|
|||||||
revealed: bind template.writable inverted;
|
revealed: bind template.writable inverted;
|
||||||
};
|
};
|
||||||
|
|
||||||
Adw.PreferencesGroup {
|
$GcalSummarySection summary_section {
|
||||||
$GcalSummarySection summary_section {
|
sensitive: bind template.writable;
|
||||||
sensitive: bind template.writable;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Adw.PreferencesGroup {
|
Adw.PreferencesGroup {
|
||||||
|
|||||||
@@ -1,21 +1,13 @@
|
|||||||
using Gtk 4.0;
|
using Gtk 4.0;
|
||||||
using Adw 1;
|
using Adw 1;
|
||||||
|
|
||||||
template $GcalSummarySection: Adw.Bin {
|
template $GcalSummarySection: Adw.PreferencesGroup {
|
||||||
ListBox {
|
Adw.EntryRow summary_entry {
|
||||||
selection-mode: none;
|
title: _("Title");
|
||||||
|
changed => $on_summary_entry_text_changed_cb(template) not-swapped;
|
||||||
|
}
|
||||||
|
|
||||||
styles [
|
Adw.EntryRow location_entry {
|
||||||
"boxed-list",
|
title: _("Location");
|
||||||
]
|
|
||||||
|
|
||||||
Adw.EntryRow summary_entry {
|
|
||||||
title: _("Title");
|
|
||||||
changed => $on_summary_entry_text_changed_cb(template) not-swapped;
|
|
||||||
}
|
|
||||||
|
|
||||||
Adw.EntryRow location_entry {
|
|
||||||
title: _("Location");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ struct _GcalSummarySection
|
|||||||
|
|
||||||
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 (GcalSummarySection, gcal_summary_section, ADW_TYPE_BIN,
|
G_DEFINE_TYPE_WITH_CODE (GcalSummarySection, gcal_summary_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))
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -25,6 +25,6 @@
|
|||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GCAL_TYPE_SUMMARY_SECTION (gcal_summary_section_get_type())
|
#define GCAL_TYPE_SUMMARY_SECTION (gcal_summary_section_get_type())
|
||||||
G_DECLARE_FINAL_TYPE (GcalSummarySection, gcal_summary_section, GCAL, SUMMARY_SECTION, AdwBin)
|
G_DECLARE_FINAL_TYPE (GcalSummarySection, gcal_summary_section, GCAL, SUMMARY_SECTION, AdwPreferencesGroup)
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|||||||
Reference in New Issue
Block a user