[gnome-software] GsApplication: Port to G_DECLARE_FINAL_TYPE macro



commit ffe17673d4ce122f08d01edce031d31549e24195
Author: Kalev Lember <klember redhat com>
Date:   Mon Sep 7 16:47:16 2015 +0200

    GsApplication: Port to G_DECLARE_FINAL_TYPE macro

 src/gs-application.c |    4 ----
 src/gs-application.h |    5 +----
 2 files changed, 1 insertions(+), 8 deletions(-)
---
diff --git a/src/gs-application.c b/src/gs-application.c
index 5852151..931459c 100644
--- a/src/gs-application.c
+++ b/src/gs-application.c
@@ -67,10 +67,6 @@ struct _GsApplication {
        GSettings       *settings;
 };
 
-struct _GsApplicationClass {
-       GtkApplicationClass parent_class;
-};
-
 G_DEFINE_TYPE (GsApplication, gs_application, GTK_TYPE_APPLICATION);
 
 gboolean
diff --git a/src/gs-application.h b/src/gs-application.h
index 7343c38..211dce6 100644
--- a/src/gs-application.h
+++ b/src/gs-application.h
@@ -25,12 +25,9 @@
 #include <gtk/gtk.h>
 
 #define GS_APPLICATION_TYPE (gs_application_get_type ())
-#define GS_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GS_APPLICATION_TYPE, GsApplication))
 
-typedef struct _GsApplication          GsApplication;
-typedef struct _GsApplicationClass     GsApplicationClass;
+G_DECLARE_FINAL_TYPE (GsApplication, gs_application, GS, APPLICATION, GtkApplication)
 
-GType           gs_application_get_type        (void);
 GsApplication  *gs_application_new             (void);
 
 gboolean        gs_application_has_active_window       (GsApplication *application);


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