[gnome-text-editor] app: inherit AdwApplication
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-text-editor] app: inherit AdwApplication
- Date: Mon, 17 Jan 2022 01:30:30 +0000 (UTC)
commit c570f43374357deb1ac933abe2d1a57d4a595d4a
Author: Christian Hergert <chergert redhat com>
Date: Sun Jan 16 17:29:19 2022 -0800
app: inherit AdwApplication
Apparently we hadn't switched over to AdwApplication as part of the port
to libadwaita.
Fixes #287
src/editor-application-private.h | 2 +-
src/editor-application.c | 4 +---
src/editor-application.h | 4 +++-
3 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/editor-application-private.h b/src/editor-application-private.h
index 561e097..0a4cbed 100644
--- a/src/editor-application-private.h
+++ b/src/editor-application-private.h
@@ -26,7 +26,7 @@ G_BEGIN_DECLS
struct _EditorApplication
{
- GtkApplication parent_instance;
+ AdwApplication parent_instance;
EditorSession *session;
GSettings *settings;
GtkCssProvider *recoloring;
diff --git a/src/editor-application.c b/src/editor-application.c
index fd70dca..0ccefb4 100644
--- a/src/editor-application.c
+++ b/src/editor-application.c
@@ -34,7 +34,7 @@
#define PORTAL_OBJECT_PATH "/org/freedesktop/portal/desktop"
#define PORTAL_SETTINGS_INTERFACE "org.freedesktop.portal.Settings"
-G_DEFINE_TYPE (EditorApplication, editor_application, GTK_TYPE_APPLICATION)
+G_DEFINE_TYPE (EditorApplication, editor_application, ADW_TYPE_APPLICATION)
enum {
PROP_0,
@@ -292,8 +292,6 @@ editor_application_startup (GApplication *application)
G_APPLICATION_CLASS (editor_application_parent_class)->startup (application);
- adw_init ();
-
display = gdk_display_get_default ();
self->recoloring = gtk_css_provider_new ();
gtk_style_context_add_provider_for_display (display,
diff --git a/src/editor-application.h b/src/editor-application.h
index 057d435..af6759b 100644
--- a/src/editor-application.h
+++ b/src/editor-application.h
@@ -20,6 +20,8 @@
#pragma once
+#include <adwaita.h>
+
#include "editor-types.h"
G_BEGIN_DECLS
@@ -27,7 +29,7 @@ G_BEGIN_DECLS
#define EDITOR_TYPE_APPLICATION (editor_application_get_type())
#define EDITOR_APPLICATION_DEFAULT (EDITOR_APPLICATION(g_application_get_default()))
-G_DECLARE_FINAL_TYPE (EditorApplication, editor_application, EDITOR, APPLICATION, GtkApplication)
+G_DECLARE_FINAL_TYPE (EditorApplication, editor_application, EDITOR, APPLICATION, AdwApplication)
EditorSession *editor_application_get_session (EditorApplication *self);
EditorWindow *editor_application_get_current_window (EditorApplication *self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]