[gnome-panel] panel-screensaver: avoid deprecated g_type_class_add_private
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel] panel-screensaver: avoid deprecated g_type_class_add_private
- Date: Thu, 13 Sep 2018 09:22:10 +0000 (UTC)
commit 9a7aec5a9db3c38ab7102266834d445567013fd9
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Thu Sep 13 02:33:20 2018 +0300
panel-screensaver: avoid deprecated g_type_class_add_private
gnome-panel/libpanel-util/panel-screensaver.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/gnome-panel/libpanel-util/panel-screensaver.c b/gnome-panel/libpanel-util/panel-screensaver.c
index 336576b65..d249c066c 100644
--- a/gnome-panel/libpanel-util/panel-screensaver.c
+++ b/gnome-panel/libpanel-util/panel-screensaver.c
@@ -30,13 +30,11 @@ struct _PanelScreensaverPrivate {
GDBusProxy *proxy;
};
-G_DEFINE_TYPE (PanelScreensaver, panel_screensaver, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE (PanelScreensaver, panel_screensaver, G_TYPE_OBJECT)
static void
panel_screensaver_class_init (PanelScreensaverClass *klass)
{
- g_type_class_add_private (klass,
- sizeof (PanelScreensaverPrivate));
}
static void
@@ -44,9 +42,7 @@ panel_screensaver_init (PanelScreensaver *screensaver)
{
GError *error;
- screensaver->priv = G_TYPE_INSTANCE_GET_PRIVATE (screensaver,
- PANEL_TYPE_SCREENSAVER,
- PanelScreensaverPrivate);
+ screensaver->priv = panel_screensaver_get_instance_private (screensaver);
error = NULL;
screensaver->priv->proxy = g_dbus_proxy_new_for_bus_sync (
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]