[gnome-software] update monitor: Port to G_DECLARE_FINAL_TYPE macro



commit 68c22ba030fdc4e37040c457b709ec85e27c0f89
Author: Kalev Lember <klember redhat com>
Date:   Mon Sep 7 17:52:03 2015 +0200

    update monitor: Port to G_DECLARE_FINAL_TYPE macro

 src/gs-update-monitor.c |    4 ----
 src/gs-update-monitor.h |   11 ++---------
 2 files changed, 2 insertions(+), 13 deletions(-)
---
diff --git a/src/gs-update-monitor.c b/src/gs-update-monitor.c
index b06eb28..96d2b15 100644
--- a/src/gs-update-monitor.c
+++ b/src/gs-update-monitor.c
@@ -57,10 +57,6 @@ struct _GsUpdateMonitor {
        guint            check_offline_update_id;
 };
 
-struct _GsUpdateMonitorClass {
-       GObjectClass     parent_class;
-};
-
 G_DEFINE_TYPE (GsUpdateMonitor, gs_update_monitor, G_TYPE_OBJECT)
 
 static gboolean
diff --git a/src/gs-update-monitor.h b/src/gs-update-monitor.h
index 3ecf7fe..ab03213 100644
--- a/src/gs-update-monitor.h
+++ b/src/gs-update-monitor.h
@@ -27,17 +27,10 @@
 
 G_BEGIN_DECLS
 
-#define GS_TYPE_UPDATE_MONITOR         (gs_update_monitor_get_type ())
-#define GS_UPDATE_MONITOR(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), GS_TYPE_UPDATE_MONITOR, 
GsUpdateMonitor))
-#define GS_UPDATE_MONITOR_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), GS_TYPE_UPDATE_MONITOR, 
GsUpdateMonitorClass))
-#define GS_IS_UPDATE_MONITOR(o)                (G_TYPE_CHECK_INSTANCE_TYPE ((o), GS_TYPE_UPDATE_MONITOR))
-#define GS_IS_UPDATE_MONITOR_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), GS_TYPE_UPDATE_MONITOR))
-#define GS_UPDATE_MONITOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GS_TYPE_UPDATE_MONITOR, 
GsUpdateMonitorClass))
+#define GS_TYPE_UPDATE_MONITOR (gs_update_monitor_get_type ())
 
-typedef struct _GsUpdateMonitor                GsUpdateMonitor;
-typedef struct _GsUpdateMonitorClass   GsUpdateMonitorClass;
+G_DECLARE_FINAL_TYPE (GsUpdateMonitor, gs_update_monitor, GS, UPDATE_MONITOR, GObject)
 
-GType           gs_update_monitor_get_type     (void);
 GsUpdateMonitor        *gs_update_monitor_new          (GsApplication *app);
 
 G_END_DECLS


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