summaryrefslogtreecommitdiff
path: root/logview/src
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-08-21 00:23:33 +0200
committerlukefromdc <[email protected]>2019-09-02 23:58:10 +0000
commitb53d4c280ac6a0f31b289098eaf1f61faa3fd2ac (patch)
tree8a4a927b4eddb2cf87b75758d99d1789c0ac6375 /logview/src
parent884288e10c01c93c3af8eaa22fc82f5fd747e5fa (diff)
downloadmate-utils-b53d4c280ac6a0f31b289098eaf1f61faa3fd2ac.tar.bz2
mate-utils-b53d4c280ac6a0f31b289098eaf1f61faa3fd2ac.tar.xz
logview-window: avoid 'g_type_class_add_private'
Diffstat (limited to 'logview/src')
-rw-r--r--logview/src/logview-window.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/logview/src/logview-window.c b/logview/src/logview-window.c
index 56a0b32f..d36e69ea 100644
--- a/logview/src/logview-window.c
+++ b/logview/src/logview-window.c
@@ -74,10 +74,7 @@ struct _LogviewWindowPrivate {
gboolean matches_only;
};
-#define GET_PRIVATE(o) \
- (G_TYPE_INSTANCE_GET_PRIVATE ((o), LOGVIEW_TYPE_WINDOW, LogviewWindowPrivate))
-
-G_DEFINE_TYPE (LogviewWindow, logview_window, GTK_TYPE_WINDOW);
+G_DEFINE_TYPE_WITH_PRIVATE (LogviewWindow, logview_window, GTK_TYPE_WINDOW);
static void findbar_close_cb (LogviewFindbar *findbar,
gpointer user_data);
@@ -634,7 +631,7 @@ filter_remove (LogviewWindow *logview, LogviewFilter *filter)
static void
on_filter_toggled (GtkToggleAction *action, LogviewWindow *logview)
{
- LogviewWindowPrivate *priv = GET_PRIVATE (logview);
+ LogviewWindowPrivate *priv = logview_window_get_instance_private (logview);
const gchar* name;
LogviewFilter *filter;
@@ -668,7 +665,7 @@ update_filter_menu (LogviewWindow *window)
GtkToggleAction *action;
gchar* name;
- priv = GET_PRIVATE (window);
+ priv = logview_window_get_instance_private (window);
ui = priv->ui_manager;
g_return_if_fail (priv->filter_action_group != NULL);
@@ -1290,7 +1287,7 @@ logview_window_init (LogviewWindow *logview)
s_context = gtk_widget_get_style_context (GTK_WIDGET (logview));
gtk_style_context_add_class (s_context, "logview-window");
- priv = logview->priv = GET_PRIVATE (logview);
+ priv = logview->priv = logview_window_get_instance_private (logview);
priv->prefs = logview_prefs_get ();
priv->manager = logview_manager_get ();
priv->monitor_id = 0;
@@ -1473,8 +1470,6 @@ logview_window_class_init (LogviewWindowClass *klass)
GObjectClass *object_class = (GObjectClass *) klass;
object_class->finalize = logview_window_finalize;
-
- g_type_class_add_private (klass, sizeof (LogviewWindowPrivate));
}
/* public methods */