summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-10-29 09:18:44 +0100
committerlukefromdc <[email protected]>2019-10-29 17:51:25 +0000
commitc0e78378cff44cfee18d63aa8e587e5d24e27df0 (patch)
treece3448358332cbf5a4ea24cc2187a88aa3bcff44
parent0e217c5e92d3f1c8902acb648a615a5b50e492c6 (diff)
downloadmate-media-c0e78378cff44cfee18d63aa8e587e5d24e27df0.tar.bz2
mate-media-c0e78378cff44cfee18d63aa8e587e5d24e27df0.tar.xz
gvc-mixer-dialog: avoid 'g_type_class_add_private'
-rw-r--r--mate-volume-control/gvc-mixer-dialog.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/mate-volume-control/gvc-mixer-dialog.c b/mate-volume-control/gvc-mixer-dialog.c
index f100e5a..c3f3996 100644
--- a/mate-volume-control/gvc-mixer-dialog.c
+++ b/mate-volume-control/gvc-mixer-dialog.c
@@ -38,8 +38,6 @@
#include "gvc-speaker-test.h"
#include "gvc-utils.h"
-#define GVC_MIXER_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GVC_TYPE_MIXER_DIALOG, GvcMixerDialogPrivate))
-
struct _GvcMixerDialogPrivate
{
MateMixerContext *context;
@@ -110,8 +108,6 @@ static const guint tab_accel_keys[] = {
GDK_KEY_1, GDK_KEY_2, GDK_KEY_3, GDK_KEY_4, GDK_KEY_5
};
-static void gvc_mixer_dialog_class_init (GvcMixerDialogClass *klass);
-static void gvc_mixer_dialog_init (GvcMixerDialog *dialog);
static void gvc_mixer_dialog_finalize (GObject *object);
static void add_stream (GvcMixerDialog *dialog,
@@ -135,7 +131,7 @@ static gboolean dialog_page_scroll_event_cb (GtkWidget *widget,
GdkEventScroll *event,
GtkWindow *window);
-G_DEFINE_TYPE (GvcMixerDialog, gvc_mixer_dialog, GTK_TYPE_DIALOG)
+G_DEFINE_TYPE_WITH_PRIVATE (GvcMixerDialog, gvc_mixer_dialog, GTK_TYPE_DIALOG)
static MateMixerSwitch *
find_stream_port_switch (MateMixerStream *stream)
@@ -2318,14 +2314,12 @@ gvc_mixer_dialog_class_init (GvcMixerDialogClass *klass)
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
gtk_widget_class_set_css_name (widget_class, "GvcMixerDialog");
-
- g_type_class_add_private (klass, sizeof (GvcMixerDialogPrivate));
}
static void
gvc_mixer_dialog_init (GvcMixerDialog *dialog)
{
- dialog->priv = GVC_MIXER_DIALOG_GET_PRIVATE (dialog);
+ dialog->priv = gvc_mixer_dialog_get_instance_private (dialog);
dialog->priv->bars = g_hash_table_new (g_str_hash, g_str_equal);
dialog->priv->size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);