diff options
author | Pablo Barciela <[email protected]> | 2019-10-29 09:17:06 +0100 |
---|---|---|
committer | lukefromdc <[email protected]> | 2019-10-29 17:51:25 +0000 |
commit | 0e217c5e92d3f1c8902acb648a615a5b50e492c6 (patch) | |
tree | 785e0045a9870edefe12eff690cc55adbea58ba4 /mate-volume-control | |
parent | f45ea0900a50e675c22da9aac734318f35330cde (diff) | |
download | mate-media-0e217c5e92d3f1c8902acb648a615a5b50e492c6.tar.bz2 mate-media-0e217c5e92d3f1c8902acb648a615a5b50e492c6.tar.xz |
gvc-applet: avoid 'g_type_class_add_private'
Diffstat (limited to 'mate-volume-control')
-rw-r--r-- | mate-volume-control/gvc-applet.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/mate-volume-control/gvc-applet.c b/mate-volume-control/gvc-applet.c index fc41ee6..df5d03e 100644 --- a/mate-volume-control/gvc-applet.c +++ b/mate-volume-control/gvc-applet.c @@ -34,8 +34,6 @@ #include "gvc-applet.h" #include "gvc-stream-applet-icon.h" -#define GVC_APPLET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GVC_TYPE_APPLET, GvcAppletPrivate)) - static const gchar *icon_names_output[] = { "audio-volume-muted", "audio-volume-low", @@ -76,10 +74,7 @@ struct _GvcAppletPrivate GtkActionGroup *action_group; }; -static void gvc_applet_class_init (GvcAppletClass *klass); -static void gvc_applet_init (GvcApplet *applet); - -G_DEFINE_TYPE (GvcApplet, gvc_applet, G_TYPE_OBJECT) +G_DEFINE_TYPE_WITH_PRIVATE (GvcApplet, gvc_applet, G_TYPE_OBJECT) static void update_icon_input (GvcApplet *applet) @@ -393,14 +388,12 @@ gvc_applet_class_init (GvcAppletClass *klass) GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->dispose = gvc_applet_dispose; - - g_type_class_add_private (klass, sizeof (GvcAppletPrivate)); } static void gvc_applet_init (GvcApplet *applet) { - applet->priv = GVC_APPLET_GET_PRIVATE (applet); + applet->priv = gvc_applet_get_instance_private (applet); applet->priv->icon_input = gvc_stream_applet_icon_new (NULL, icon_names_input); applet->priv->icon_output = gvc_stream_applet_icon_new (NULL, icon_names_output); |