summaryrefslogtreecommitdiff
path: root/shell/ev-history.c
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-08-09 12:37:30 +0200
committerlukefromdc <[email protected]>2019-08-16 20:40:31 +0000
commit6d5f3605d6a1d96f054f229d896fa6df863a8022 (patch)
treee4c7612c71af8497912b5a384a4153c75609c412 /shell/ev-history.c
parent10f175e52b5bb546cd0e257478c6470c4cbd96ba (diff)
downloadatril-6d5f3605d6a1d96f054f229d896fa6df863a8022.tar.bz2
atril-6d5f3605d6a1d96f054f229d896fa6df863a8022.tar.xz
ev-history: avoid 'g_type_class_add_private'
Diffstat (limited to 'shell/ev-history.c')
-rw-r--r--shell/ev-history.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/shell/ev-history.c b/shell/ev-history.c
index 73d3c863..55fff29f 100644
--- a/shell/ev-history.c
+++ b/shell/ev-history.c
@@ -41,14 +41,12 @@ struct _EvHistoryPrivate
static void ev_history_init (EvHistory *history);
static void ev_history_class_init (EvHistoryClass *class);
-G_DEFINE_TYPE (EvHistory, ev_history, G_TYPE_OBJECT)
-
-#define EV_HISTORY_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EV_TYPE_HISTORY, EvHistoryPrivate))
+G_DEFINE_TYPE_WITH_PRIVATE (EvHistory, ev_history, G_TYPE_OBJECT)
static void
ev_history_init (EvHistory *history)
{
- history->priv = EV_HISTORY_GET_PRIVATE (history);
+ history->priv = ev_history_get_instance_private (history);
history->priv->links = NULL;
}
@@ -85,8 +83,6 @@ ev_history_class_init (EvHistoryClass *class)
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
-
- g_type_class_add_private (object_class, sizeof (EvHistoryPrivate));
}
#define HISTORY_LENGTH 7