event-editor/reminders-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:
@@ -61,12 +61,9 @@ template $GcalEventEditorDialog: Adw.Dialog {
|
||||
}
|
||||
}
|
||||
|
||||
Adw.PreferencesGroup {
|
||||
$GcalRemindersSection reminders_section {
|
||||
title: _("Reminders");
|
||||
|
||||
$GcalRemindersSection reminders_section {
|
||||
sensitive: bind template.writable;
|
||||
}
|
||||
sensitive: bind template.writable;
|
||||
}
|
||||
|
||||
$GcalNotesSection notes_section {
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
using Gtk 4.0;
|
||||
using Adw 1;
|
||||
|
||||
template $GcalRemindersSection: Box {
|
||||
orientation: vertical;
|
||||
|
||||
template $GcalRemindersSection: Adw.PreferencesGroup {
|
||||
ListBox alarms_listbox {
|
||||
selection-mode: none;
|
||||
row-activated => $on_alarms_listbox_row_activated_cb(template) not-swapped;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
struct _GcalRemindersSection
|
||||
{
|
||||
GtkBox parent;
|
||||
AdwPreferencesGroup parent;
|
||||
|
||||
GtkListBox *alarms_listbox;
|
||||
GtkWidget *alarms_popover;
|
||||
@@ -60,7 +60,7 @@ static void on_remove_alarm_cb (GcalAlarmRow
|
||||
static void on_update_alarm_cb (GcalAlarmRow *alarm_row,
|
||||
GcalRemindersSection *self);
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (GcalRemindersSection, gcal_reminders_section, GTK_TYPE_BOX,
|
||||
G_DEFINE_TYPE_WITH_CODE (GcalRemindersSection, gcal_reminders_section, ADW_TYPE_PREFERENCES_GROUP,
|
||||
G_IMPLEMENT_INTERFACE (GCAL_TYPE_EVENT_EDITOR_SECTION, gcal_event_editor_section_iface_init))
|
||||
|
||||
/*
|
||||
|
||||
@@ -20,11 +20,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <adwaita.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GCAL_TYPE_REMINDERS_SECTION (gcal_reminders_section_get_type())
|
||||
G_DECLARE_FINAL_TYPE (GcalRemindersSection, gcal_reminders_section, GCAL, REMINDERS_SECTION, GtkBox)
|
||||
G_DECLARE_FINAL_TYPE (GcalRemindersSection, gcal_reminders_section, GCAL, REMINDERS_SECTION, AdwPreferencesGroup)
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
Reference in New Issue
Block a user