summaryrefslogtreecommitdiff
path: root/panels/background/bg-colors-source.c
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2017-09-04 16:12:07 +1200
committerRobert Ancell <robert.ancell@canonical.com>2017-09-25 14:17:24 -0400
commitc6981636dc38a9fdc844db40964c5d89cf10615e (patch)
tree4f132f929d2f2de633fbf3a6a180e57d9d6967ec /panels/background/bg-colors-source.c
parent045b1f03b9339c9a696277f6bc1194dbc0bb1c6b (diff)
downloadgnome-control-center-c6981636dc38a9fdc844db40964c5d89cf10615e.tar.gz
Replace old-fashioned GObject boilerplate with G_DEFINE_TYPEwip/rancell/g-define-type
As well as simplifying the code this allows us to make use of the g_auto memory management macros.
Diffstat (limited to 'panels/background/bg-colors-source.c')
-rw-r--r--panels/background/bg-colors-source.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/panels/background/bg-colors-source.c b/panels/background/bg-colors-source.c
index afe58683e..f46acb6d0 100644
--- a/panels/background/bg-colors-source.c
+++ b/panels/background/bg-colors-source.c
@@ -28,10 +28,12 @@
#include <glib/gi18n-lib.h>
#include <gdesktop-enums.h>
-G_DEFINE_TYPE (BgColorsSource, bg_colors_source, BG_TYPE_SOURCE)
+struct _BgColorsSource
+{
+ BgSource parent_instance;
+};
-#define COLORS_SOURCE_PRIVATE(o) \
- (G_TYPE_INSTANCE_GET_PRIVATE ((o), BG_TYPE_COLORS_SOURCE, BgColorsSourcePrivate))
+G_DEFINE_TYPE (BgColorsSource, bg_colors_source, BG_TYPE_SOURCE)
struct {
GDesktopBackgroundShading type;