summaryrefslogtreecommitdiff
path: root/mate-volume-control
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-10-29 09:14:58 +0100
committerlukefromdc <[email protected]>2019-10-29 17:51:25 +0000
commitf45ea0900a50e675c22da9aac734318f35330cde (patch)
treefe9e0e3550fe66c65214d3fe4988f72ccf3e3c5c /mate-volume-control
parentae1aaeeef82801170b38c3dc00ff494b4467034c (diff)
downloadmate-media-f45ea0900a50e675c22da9aac734318f35330cde.tar.bz2
mate-media-f45ea0900a50e675c22da9aac734318f35330cde.tar.xz
gvc-level-bar: avoid 'g_type_class_add_private'
Diffstat (limited to 'mate-volume-control')
-rw-r--r--mate-volume-control/gvc-level-bar.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/mate-volume-control/gvc-level-bar.c b/mate-volume-control/gvc-level-bar.c
index 820ebbf..e6c000d 100644
--- a/mate-volume-control/gvc-level-bar.c
+++ b/mate-volume-control/gvc-level-bar.c
@@ -31,8 +31,6 @@
#include "gvc-level-bar.h"
#include "gvc-utils.h"
-#define GVC_LEVEL_BAR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GVC_TYPE_LEVEL_BAR, GvcLevelBarPrivate))
-
#define NUM_BOXES 15
#define MIN_HORIZONTAL_BAR_WIDTH 150
#define HORIZONTAL_BAR_HEIGHT 6
@@ -77,11 +75,9 @@ enum
static GParamSpec *properties[N_PROPERTIES] = { NULL, };
-static void gvc_level_bar_class_init (GvcLevelBarClass *klass);
-static void gvc_level_bar_init (GvcLevelBar *bar);
static void gvc_level_bar_finalize (GObject *object);
-G_DEFINE_TYPE (GvcLevelBar, gvc_level_bar, GTK_TYPE_WIDGET)
+G_DEFINE_TYPE_WITH_PRIVATE (GvcLevelBar, gvc_level_bar, GTK_TYPE_WIDGET)
static gboolean
layout_changed (LevelBarLayout *layout1, LevelBarLayout *layout2)
@@ -718,8 +714,6 @@ gvc_level_bar_class_init (GvcLevelBarClass *klass)
G_PARAM_STATIC_STRINGS);
g_object_class_install_properties (object_class, N_PROPERTIES, properties);
-
- g_type_class_add_private (klass, sizeof (GvcLevelBarPrivate));
}
static void
@@ -729,7 +723,7 @@ gvc_level_bar_init (GvcLevelBar *bar)
gtk_style_context_add_class (context, GTK_STYLE_CLASS_LIST_ROW);
- bar->priv = GVC_LEVEL_BAR_GET_PRIVATE (bar);
+ bar->priv = gvc_level_bar_get_instance_private (bar);
bar->priv->peak_adjustment = GTK_ADJUSTMENT (gtk_adjustment_new (0.0,
0.0,