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