From d32be4527362999edaef8dd65da3abf956893efe Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Fri, 14 Jan 2022 11:25:15 -0300 Subject: [PATCH] event-editor/notes-section: Port to GTK4 --- src/gui/event-editor/gcal-notes-section.c | 6 ++++-- src/gui/event-editor/gcal-notes-section.h | 4 ++-- src/gui/event-editor/gcal-notes-section.ui | 11 ++--------- src/theme/Adwaita.css | 10 ++-------- 4 files changed, 10 insertions(+), 21 deletions(-) diff --git a/src/gui/event-editor/gcal-notes-section.c b/src/gui/event-editor/gcal-notes-section.c index 52314a6c..eeb105ed 100644 --- a/src/gui/event-editor/gcal-notes-section.c +++ b/src/gui/event-editor/gcal-notes-section.c @@ -27,7 +27,7 @@ struct _GcalNotesSection { - GtkBin parent; + AdwBin parent; GtkTextView *notes_text; @@ -37,7 +37,7 @@ struct _GcalNotesSection static void gcal_event_editor_section_iface_init (GcalEventEditorSectionInterface *iface); -G_DEFINE_TYPE_WITH_CODE (GcalNotesSection, gcal_notes_section, GTK_TYPE_BIN, +G_DEFINE_TYPE_WITH_CODE (GcalNotesSection, gcal_notes_section, ADW_TYPE_BIN, G_IMPLEMENT_INTERFACE (GCAL_TYPE_EVENT_EDITOR_SECTION, gcal_event_editor_section_iface_init)) enum @@ -177,4 +177,6 @@ static void gcal_notes_section_init (GcalNotesSection *self) { gtk_widget_init_template (GTK_WIDGET (self)); + + gtk_widget_remove_css_class (GTK_WIDGET (self->notes_text), "view"); } diff --git a/src/gui/event-editor/gcal-notes-section.h b/src/gui/event-editor/gcal-notes-section.h index f9b4dab1..ccf93e3e 100644 --- a/src/gui/event-editor/gcal-notes-section.h +++ b/src/gui/event-editor/gcal-notes-section.h @@ -20,11 +20,11 @@ #pragma once -#include +#include G_BEGIN_DECLS #define GCAL_TYPE_NOTES_SECTION (gcal_notes_section_get_type()) -G_DECLARE_FINAL_TYPE (GcalNotesSection, gcal_notes_section, GCAL, NOTES_SECTION, GtkBin) +G_DECLARE_FINAL_TYPE (GcalNotesSection, gcal_notes_section, GCAL, NOTES_SECTION, AdwBin) G_END_DECLS diff --git a/src/gui/event-editor/gcal-notes-section.ui b/src/gui/event-editor/gcal-notes-section.ui index 4b19336f..acbf6872 100644 --- a/src/gui/event-editor/gcal-notes-section.ui +++ b/src/gui/event-editor/gcal-notes-section.ui @@ -1,23 +1,16 @@ -