summaryrefslogtreecommitdiff
path: root/maximus/maximus-bind.c
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-10-30 10:25:37 +0100
committerZenWalker <[email protected]>2019-11-28 01:01:45 +0100
commit95c708e0e0ff611e7256f07cba0932c6453ab8dd (patch)
tree2eee88f5646bbea3a39895897d574ae5d3da8cbb /maximus/maximus-bind.c
parentf5687e5cbec95d8b8cbfcf4609014f0672253c35 (diff)
downloadmate-netbook-95c708e0e0ff611e7256f07cba0932c6453ab8dd.tar.bz2
mate-netbook-95c708e0e0ff611e7256f07cba0932c6453ab8dd.tar.xz
maximus-bind: avoid 'g_type_class_add_private'
Diffstat (limited to 'maximus/maximus-bind.c')
-rw-r--r--maximus/maximus-bind.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/maximus/maximus-bind.c b/maximus/maximus-bind.c
index 2eadcea..9701bff 100644
--- a/maximus/maximus-bind.c
+++ b/maximus/maximus-bind.c
@@ -44,12 +44,6 @@
#include "tomboykeybinder.h"
#include "eggaccelerators.h"
-G_DEFINE_TYPE (MaximusBind, maximus_bind, G_TYPE_OBJECT);
-
-#define MAXIMUS_BIND_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj),\
- MAXIMUS_TYPE_BIND, \
- MaximusBindPrivate))
-
#define KEY_RELEASE_TIMEOUT 300
#define STATE_CHANGED_SLEEP 0.5
@@ -83,6 +77,8 @@ typedef struct
gchar *unfullscreen;
} MaximusRule;
+G_DEFINE_TYPE_WITH_PRIVATE (MaximusBind, maximus_bind, G_TYPE_OBJECT);
+
static const gchar *
get_fullscreen_keystroke (GList *rules, WnckWindow *window)
{
@@ -455,8 +451,6 @@ maximus_bind_class_init (MaximusBindClass *klass)
GObjectClass *obj_class = G_OBJECT_CLASS (klass);
obj_class->finalize = maximus_bind_finalize;
-
- g_type_class_add_private (obj_class, sizeof (MaximusBindPrivate));
}
static void
@@ -466,7 +460,7 @@ maximus_bind_init (MaximusBind *bind)
GdkDisplay *display = gdk_display_get_default ();
WnckScreen *screen;
- priv = bind->priv = MAXIMUS_BIND_GET_PRIVATE (bind);
+ priv = bind->priv = maximus_bind_get_instance_private (bind);
priv->fk = fakekey_init (GDK_DISPLAY_XDISPLAY (display));
priv->screen = screen = wnck_screen_get_default ();