summaryrefslogtreecommitdiff
path: root/mate-volume-control
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-10-29 09:10:58 +0100
committerlukefromdc <[email protected]>2019-10-29 17:51:25 +0000
commitd92ada633ab351ee9dd572bb03aa4ab997edb610 (patch)
tree51d6b52c6eed2c743366a02b9c25012ff594c6a6 /mate-volume-control
parente64a15ea49e90d24f62b588b4159758402fae9c3 (diff)
downloadmate-media-d92ada633ab351ee9dd572bb03aa4ab997edb610.tar.bz2
mate-media-d92ada633ab351ee9dd572bb03aa4ab997edb610.tar.xz
gvc-combo-box: avoid 'g_type_class_add_private'
Diffstat (limited to 'mate-volume-control')
-rw-r--r--mate-volume-control/gvc-combo-box.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/mate-volume-control/gvc-combo-box.c b/mate-volume-control/gvc-combo-box.c
index 4ffe41c..1f3452f 100644
--- a/mate-volume-control/gvc-combo-box.c
+++ b/mate-volume-control/gvc-combo-box.c
@@ -28,8 +28,6 @@
#include "gvc-combo-box.h"
-#define GVC_COMBO_BOX_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GVC_TYPE_COMBO_BOX, GvcComboBoxPrivate))
-
struct _GvcComboBoxPrivate
{
GtkWidget *drop_box;
@@ -67,11 +65,9 @@ enum {
static GParamSpec *properties[N_PROPERTIES] = { NULL, };
-static void gvc_combo_box_class_init (GvcComboBoxClass *klass);
-static void gvc_combo_box_init (GvcComboBox *combo);
static void gvc_combo_box_dispose (GObject *object);
-G_DEFINE_TYPE (GvcComboBox, gvc_combo_box, GTK_TYPE_BOX)
+G_DEFINE_TYPE_WITH_PRIVATE (GvcComboBox, gvc_combo_box, GTK_TYPE_BOX)
MateMixerSwitch *
gvc_combo_box_get_switch (GvcComboBox *combobox)
@@ -295,8 +291,6 @@ gvc_combo_box_class_init (GvcComboBoxClass *klass)
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE,
0);
-
- g_type_class_add_private (klass, sizeof (GvcComboBoxPrivate));
}
static void
@@ -344,7 +338,7 @@ gvc_combo_box_init (GvcComboBox *combobox)
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE);
- combobox->priv = GVC_COMBO_BOX_GET_PRIVATE (combobox);
+ combobox->priv = gvc_combo_box_get_instance_private (combobox);
combobox->priv->model = GTK_TREE_MODEL (gtk_list_store_new (NUM_COLS,
G_TYPE_STRING,