summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-08-22 00:22:13 +0200
committerlukefromdc <[email protected]>2019-09-02 23:58:10 +0000
commitfb5801049aed8f7633ed4591ee65382e764ba7d5 (patch)
tree97b02578fb259768737228528cc4142cc1c06768
parenta426a8d8b346a9559793737e70704e36259aef57 (diff)
downloadmate-utils-fb5801049aed8f7633ed4591ee65382e764ba7d5.tar.bz2
mate-utils-fb5801049aed8f7633ed4591ee65382e764ba7d5.tar.xz
gdict-aligned-window: avoid 'g_type_class_add_private'
-rw-r--r--mate-dictionary/src/gdict-aligned-window.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/mate-dictionary/src/gdict-aligned-window.c b/mate-dictionary/src/gdict-aligned-window.c
index 5ddefde2..3384840a 100644
--- a/mate-dictionary/src/gdict-aligned-window.c
+++ b/mate-dictionary/src/gdict-aligned-window.c
@@ -33,8 +33,6 @@
#include "gdict-aligned-window.h"
-#define GDICT_ALIGNED_WINDOW_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GDICT_TYPE_ALIGNED_WINDOW, GdictAlignedWindowPrivate))
-
struct _GdictAlignedWindowPrivate
{
GtkWidget *align_widget;
@@ -67,7 +65,7 @@ static gboolean gdict_aligned_window_motion_notify_cb (GtkWidget *widget,
GdictAlignedWindow *aligned_window);
-G_DEFINE_TYPE (GdictAlignedWindow, gdict_aligned_window, GTK_TYPE_WINDOW);
+G_DEFINE_TYPE_WITH_PRIVATE (GdictAlignedWindow, gdict_aligned_window, GTK_TYPE_WINDOW);
@@ -90,14 +88,12 @@ gdict_aligned_window_class_init (GdictAlignedWindowClass *klass)
"The widget the window should align to",
GTK_TYPE_WIDGET,
G_PARAM_READWRITE));
-
- g_type_class_add_private (klass, sizeof (GdictAlignedWindowPrivate));
}
static void
gdict_aligned_window_init (GdictAlignedWindow *aligned_window)
{
- GdictAlignedWindowPrivate *priv = GDICT_ALIGNED_WINDOW_GET_PRIVATE (aligned_window);
+ GdictAlignedWindowPrivate *priv = gdict_aligned_window_get_instance_private (aligned_window);
GtkWindow *window = GTK_WINDOW (aligned_window);
aligned_window->priv = priv;
@@ -310,7 +306,7 @@ gdict_aligned_window_set_widget (GdictAlignedWindow *aligned_window,
}
#endif
- priv = GDICT_ALIGNED_WINDOW_GET_PRIVATE (aligned_window);
+ priv = gdict_aligned_window_get_instance_private (aligned_window);
if (priv->align_widget)
{