[totem/gkarsay/totem-master: 2/6] properties: Replace deprecated g_type_class_add_private()
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem/gkarsay/totem-master: 2/6] properties: Replace deprecated g_type_class_add_private()
- Date: Thu, 26 Sep 2019 09:35:04 +0000 (UTC)
commit 256a18836cf32b2ae217e51190f090fa9181b9c6
Author: Gabor Karsay <gabor karsay gmx at>
Date: Thu Sep 26 11:33:14 2019 +0200
properties: Replace deprecated g_type_class_add_private()
g_type_class_add_private has been deprecated since GObject 2.58.
src/plugins/properties/bacon-video-widget-properties.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/src/plugins/properties/bacon-video-widget-properties.c
b/src/plugins/properties/bacon-video-widget-properties.c
index 06bb68c9f..cebf39450 100644
--- a/src/plugins/properties/bacon-video-widget-properties.c
+++ b/src/plugins/properties/bacon-video-widget-properties.c
@@ -38,24 +38,20 @@ struct BaconVideoWidgetPropertiesPrivate {
int time;
};
-#define BACON_VIDEO_WIDGET_PROPERTIES_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj),
BACON_TYPE_VIDEO_WIDGET_PROPERTIES, BaconVideoWidgetPropertiesPrivate))
-
-G_DEFINE_TYPE (BaconVideoWidgetProperties, bacon_video_widget_properties, GTK_TYPE_BOX)
+G_DEFINE_TYPE_WITH_PRIVATE (BaconVideoWidgetProperties, bacon_video_widget_properties, GTK_TYPE_BOX)
static void
bacon_video_widget_properties_class_init (BaconVideoWidgetPropertiesClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (BaconVideoWidgetPropertiesPrivate));
-
object_class->dispose = bacon_video_widget_properties_dispose;
}
static void
bacon_video_widget_properties_init (BaconVideoWidgetProperties *props)
{
- props->priv = G_TYPE_INSTANCE_GET_PRIVATE (props, BACON_TYPE_VIDEO_WIDGET_PROPERTIES,
BaconVideoWidgetPropertiesPrivate);
+ props->priv = bacon_video_widget_properties_get_instance_private (props);
gtk_orientable_set_orientation (GTK_ORIENTABLE (props), GTK_ORIENTATION_VERTICAL);
}
@@ -63,7 +59,7 @@ bacon_video_widget_properties_init (BaconVideoWidgetProperties *props)
static void
bacon_video_widget_properties_dispose (GObject *object)
{
- BaconVideoWidgetPropertiesPrivate *priv = BACON_VIDEO_WIDGET_PROPERTIES_GET_PRIVATE (object);
+ BaconVideoWidgetPropertiesPrivate *priv = BACON_VIDEO_WIDGET_PROPERTIES (object)->priv;
if (priv->xml != NULL)
g_object_unref (priv->xml);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]