diff options
author | Pablo Barciela <[email protected]> | 2019-08-09 12:37:30 +0200 |
---|---|---|
committer | lukefromdc <[email protected]> | 2019-08-16 20:40:31 +0000 |
commit | 6d5f3605d6a1d96f054f229d896fa6df863a8022 (patch) | |
tree | e4c7612c71af8497912b5a384a4153c75609c412 | |
parent | 10f175e52b5bb546cd0e257478c6470c4cbd96ba (diff) | |
download | atril-6d5f3605d6a1d96f054f229d896fa6df863a8022.tar.bz2 atril-6d5f3605d6a1d96f054f229d896fa6df863a8022.tar.xz |
ev-history: avoid 'g_type_class_add_private'
-rw-r--r-- | shell/ev-history.c | 8 |
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 |