summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-10-28 10:37:30 +0100
committerlukefromdc <[email protected]>2019-10-29 17:51:25 +0000
commite64a15ea49e90d24f62b588b4159758402fae9c3 (patch)
tree4a270fed6cd581da54b9e869b95645e3ddb60b60
parent1d77fe995740a870dd0bf4d4a4e20d883b45c6e7 (diff)
downloadmate-media-e64a15ea49e90d24f62b588b4159758402fae9c3.tar.bz2
mate-media-e64a15ea49e90d24f62b588b4159758402fae9c3.tar.xz
gvc-balance-bar: avoid 'g_type_class_add_private'
-rw-r--r--mate-volume-control/gvc-balance-bar.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/mate-volume-control/gvc-balance-bar.c b/mate-volume-control/gvc-balance-bar.c
index 9d3555b..f6e8836 100644
--- a/mate-volume-control/gvc-balance-bar.c
+++ b/mate-volume-control/gvc-balance-bar.c
@@ -36,7 +36,6 @@
"widget \"*.balance-bar-scale\" style : rc \"balance-bar-scale-style\"\n"
#define SCALE_SIZE 128
-#define GVC_BALANCE_BAR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GVC_TYPE_BALANCE_BAR, GvcBalanceBarPrivate))
struct _GvcBalanceBarPrivate
{
@@ -63,8 +62,6 @@ enum
static GParamSpec *properties[N_PROPERTIES] = { NULL, };
-static void gvc_balance_bar_class_init (GvcBalanceBarClass *klass);
-static void gvc_balance_bar_init (GvcBalanceBar *balance_bar);
static void gvc_balance_bar_dispose (GObject *object);
static gboolean on_scale_scroll_event (GtkWidget *widget,
@@ -74,7 +71,7 @@ static gboolean on_scale_scroll_event (GtkWidget *widget,
static void on_adjustment_value_changed (GtkAdjustment *adjustment,
GvcBalanceBar *bar);
-G_DEFINE_TYPE (GvcBalanceBar, gvc_balance_bar, GTK_TYPE_BOX)
+G_DEFINE_TYPE_WITH_PRIVATE (GvcBalanceBar, gvc_balance_bar, GTK_TYPE_BOX)
static void
create_scale_box (GvcBalanceBar *bar)
@@ -433,8 +430,6 @@ gvc_balance_bar_class_init (GvcBalanceBarClass *klass)
G_PARAM_STATIC_STRINGS);
g_object_class_install_properties (object_class, N_PROPERTIES, properties);
-
- g_type_class_add_private (klass, sizeof (GvcBalanceBarPrivate));
}
static gboolean
@@ -502,7 +497,7 @@ on_adjustment_value_changed (GtkAdjustment *adjustment, GvcBalanceBar *bar)
static void
gvc_balance_bar_init (GvcBalanceBar *bar)
{
- bar->priv = GVC_BALANCE_BAR_GET_PRIVATE (bar);
+ bar->priv = gvc_balance_bar_get_instance_private (bar);
}
static void