[gnome-todo] application: Subclass AdwApplication



commit 5d4aed114ce5bee4902a285bedc571cbcb45ebe9
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Fri Oct 8 12:55:26 2021 -0300

    application: Subclass AdwApplication

 src/gui/gtd-application.c | 6 ++----
 src/gui/gtd-application.h | 4 ++--
 2 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/src/gui/gtd-application.c b/src/gui/gtd-application.c
index 1d36d13c..b9622af0 100644
--- a/src/gui/gtd-application.c
+++ b/src/gui/gtd-application.c
@@ -39,7 +39,7 @@
 
 struct _GtdApplication
 {
-  GtkApplication         application;
+  AdwApplication         application;
 
   GtdThemeManager       *theme_manager;
 
@@ -67,7 +67,7 @@ static void           gtd_application_show_help                        (GSimpleA
                                                                    GVariant             *parameter,
                                                                    gpointer              user_data);
 
-G_DEFINE_TYPE (GtdApplication, gtd_application, GTK_TYPE_APPLICATION)
+G_DEFINE_TYPE (GtdApplication, gtd_application, ADW_TYPE_APPLICATION)
 
 static GOptionEntry cmd_options[] = {
   { "quit", 'q', 0, G_OPTION_ARG_NONE, NULL, N_("Quit GNOME To Do"), NULL },
@@ -255,8 +255,6 @@ gtd_application_startup (GApplication *application)
 
   G_APPLICATION_CLASS (gtd_application_parent_class)->startup (application);
 
-  adw_init ();
-
   /* CSS provider */
   gtd_theme_manager_add_resources (self->theme_manager, "resource:///org/gnome/todo");
 
diff --git a/src/gui/gtd-application.h b/src/gui/gtd-application.h
index 064392e8..864d72d7 100644
--- a/src/gui/gtd-application.h
+++ b/src/gui/gtd-application.h
@@ -21,13 +21,13 @@
 
 #include "gtd-types.h"
 
-#include <gtk/gtk.h>
+#include <adwaita.h>
 
 G_BEGIN_DECLS
 
 #define GTD_TYPE_APPLICATION (gtd_application_get_type())
 
-G_DECLARE_FINAL_TYPE (GtdApplication, gtd_application, GTD, APPLICATION, GtkApplication)
+G_DECLARE_FINAL_TYPE (GtdApplication, gtd_application, GTD, APPLICATION, AdwApplication)
 
 GtdApplication*                 gtd_application_new                     (void);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]