summaryrefslogtreecommitdiff
path: root/mate-volume-control
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-10-28 10:27:12 +0100
committerlukefromdc <[email protected]>2019-10-29 17:51:25 +0000
commit1bab739651e81422160d34871fd2501f54fbf0de (patch)
treeafa273ee5d050d2fa45cfc7af35d18b78d79ab27 /mate-volume-control
parent1b8b8ccb1fca6d03089f79d8f07031571774332d (diff)
downloadmate-media-1bab739651e81422160d34871fd2501f54fbf0de.tar.bz2
mate-media-1bab739651e81422160d34871fd2501f54fbf0de.tar.xz
gvc-status-icon: avoid 'g_type_class_add_private'
Diffstat (limited to 'mate-volume-control')
-rw-r--r--mate-volume-control/gvc-status-icon.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/mate-volume-control/gvc-status-icon.c b/mate-volume-control/gvc-status-icon.c
index bfb2774..808143d 100644
--- a/mate-volume-control/gvc-status-icon.c
+++ b/mate-volume-control/gvc-status-icon.c
@@ -32,8 +32,6 @@
#include "gvc-status-icon.h"
#include "gvc-stream-status-icon.h"
-#define GVC_STATUS_ICON_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GVC_TYPE_STATUS_ICON, GvcStatusIconPrivate))
-
static const gchar *icon_names_output[] = {
"audio-volume-muted",
"audio-volume-low",
@@ -59,10 +57,7 @@ struct _GvcStatusIconPrivate
MateMixerStream *input;
};
-static void gvc_status_icon_class_init (GvcStatusIconClass *klass);
-static void gvc_status_icon_init (GvcStatusIcon *status_icon);
-
-G_DEFINE_TYPE (GvcStatusIcon, gvc_status_icon, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (GvcStatusIcon, gvc_status_icon, G_TYPE_OBJECT)
static void
update_icon_input (GvcStatusIcon *status_icon)
@@ -315,14 +310,12 @@ gvc_status_icon_class_init (GvcStatusIconClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->dispose = gvc_status_icon_dispose;
-
- g_type_class_add_private (klass, sizeof (GvcStatusIconPrivate));
}
static void
gvc_status_icon_init (GvcStatusIcon *status_icon)
{
- status_icon->priv = GVC_STATUS_ICON_GET_PRIVATE (status_icon);
+ status_icon->priv = gvc_status_icon_get_instance_private (status_icon);
status_icon->priv->icon_input = gvc_stream_status_icon_new (NULL, icon_names_input);
status_icon->priv->icon_output = gvc_stream_status_icon_new (NULL, icon_names_output);