summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-08-09 12:10:48 +0200
committerlukefromdc <[email protected]>2019-08-16 20:40:31 +0000
commit39c90f02308c6c54d6e655525420d1061c2e73dc (patch)
treed92be473e3ea08a64adc485683d15af6b4ba7a62
parent5dead5a639d080a6ebd99602966240f89eda335c (diff)
downloadatril-39c90f02308c6c54d6e655525420d1061c2e73dc.tar.bz2
atril-39c90f02308c6c54d6e655525420d1061c2e73dc.tar.xz
ev-progress-message-area: avoid 'g_type_class_add_private'
-rw-r--r--shell/ev-progress-message-area.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/shell/ev-progress-message-area.c b/shell/ev-progress-message-area.c
index 88a7e333..95809e6d 100644
--- a/shell/ev-progress-message-area.c
+++ b/shell/ev-progress-message-area.c
@@ -24,9 +24,6 @@
#include "ev-progress-message-area.h"
-#define EV_PROGRESS_MESSAGE_AREA_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EV_TYPE_PROGRESS_MESSAGE_AREA, EvProgressMessageAreaPrivate))
-
struct _EvProgressMessageAreaPrivate {
GtkWidget *label;
GtkWidget *progress_bar;
@@ -47,7 +44,7 @@ static void ev_progress_message_area_get_property (GObject *object,
GValue *value,
GParamSpec *pspec);
-G_DEFINE_TYPE (EvProgressMessageArea, ev_progress_message_area, EV_TYPE_MESSAGE_AREA)
+G_DEFINE_TYPE_WITH_PRIVATE (EvProgressMessageArea, ev_progress_message_area, EV_TYPE_MESSAGE_AREA)
static void
ev_progress_message_area_class_init (EvProgressMessageAreaClass *class)
@@ -71,8 +68,6 @@ ev_progress_message_area_class_init (EvProgressMessageAreaClass *class)
"The fraction of total work that has been completed",
0.0, 1.0, 0.0,
G_PARAM_READWRITE));
-
- g_type_class_add_private (gobject_class, sizeof (EvProgressMessageAreaPrivate));
}
static void
@@ -81,7 +76,7 @@ ev_progress_message_area_init (EvProgressMessageArea *area)
GtkWidget *contents;
GtkWidget *vbox;
- area->priv = EV_PROGRESS_MESSAGE_AREA_GET_PRIVATE (area);
+ area->priv = ev_progress_message_area_get_instance_private (area);
contents = _ev_message_area_get_main_box (EV_MESSAGE_AREA (area));