summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-08-27 18:24:50 +0200
committerlukefromdc <[email protected]>2019-09-02 23:58:10 +0000
commit884288e10c01c93c3af8eaa22fc82f5fd747e5fa (patch)
tree72e2a0c0db6e969281de2ab426bc36e48b94262a
parent3e4b980cf8ef119348360b2e30572ddd3e945fe4 (diff)
downloadmate-utils-884288e10c01c93c3af8eaa22fc82f5fd747e5fa.tar.bz2
mate-utils-884288e10c01c93c3af8eaa22fc82f5fd747e5fa.tar.xz
logview-findbar: avoid 'g_type_class_add_private'
-rw-r--r--logview/src/logview-findbar.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/logview/src/logview-findbar.c b/logview/src/logview-findbar.c
index 5632784f..56141752 100644
--- a/logview/src/logview-findbar.c
+++ b/logview/src/logview-findbar.c
@@ -54,10 +54,7 @@ enum {
static guint signals[LAST_SIGNAL] = { 0 };
-G_DEFINE_TYPE (LogviewFindbar, logview_findbar, GTK_TYPE_TOOLBAR);
-
-#define GET_PRIVATE(o) \
- (G_TYPE_INSTANCE_GET_PRIVATE ((o), LOGVIEW_TYPE_FINDBAR, LogviewFindbarPrivate))
+G_DEFINE_TYPE_WITH_PRIVATE (LogviewFindbar, logview_findbar, GTK_TYPE_TOOLBAR);
static void
back_button_clicked_cb (GtkToolButton *button,
@@ -155,7 +152,7 @@ logview_findbar_init (LogviewFindbar *findbar)
GtkToolItem *item;
LogviewFindbarPrivate *priv;
- priv = findbar->priv = GET_PRIVATE (findbar);
+ priv = findbar->priv = logview_findbar_get_instance_private (findbar);
gtoolbar = GTK_TOOLBAR (findbar);
@@ -297,8 +294,6 @@ logview_findbar_class_init (LogviewFindbarClass *klass)
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
-
- g_type_class_add_private (klass, sizeof (LogviewFindbarPrivate));
}
/* public methods */