summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-10-30 10:28:25 +0100
committerZenWalker <[email protected]>2019-11-28 01:01:45 +0100
commit3a9efe118d8d56d68ec8f71647228f374a627a89 (patch)
tree833b479090b547da4cae00e44e89c19c76ab0713
parent95c708e0e0ff611e7256f07cba0932c6453ab8dd (diff)
downloadmate-netbook-3a9efe118d8d56d68ec8f71647228f374a627a89.tar.bz2
mate-netbook-3a9efe118d8d56d68ec8f71647228f374a627a89.tar.xz
maximus-app: avoid 'g_type_class_add_private'
-rw-r--r--maximus/maximus-app.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/maximus/maximus-app.c b/maximus/maximus-app.c
index c451039..0e5f1d6 100644
--- a/maximus/maximus-app.c
+++ b/maximus/maximus-app.c
@@ -29,12 +29,6 @@
#include "maximus-bind.h"
#include "xutils.h"
-G_DEFINE_TYPE (MaximusApp, maximus_app, G_TYPE_OBJECT);
-
-#define MAXIMUS_APP_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj),\
- MAXIMUS_TYPE_APP, \
- MaximusAppPrivate))
-
/* GSettings schemas and keys */
#define APP_SCHEMA "org.mate.maximus"
#define APP_EXCLUDE_CLASS "exclude-class"
@@ -94,6 +88,8 @@ typedef struct {
#define MWM_HINTS_DECORATIONS (1L << 1)
#define _XA_MOTIF_WM_HINTS "_MOTIF_WM_HINTS"
+G_DEFINE_TYPE_WITH_PRIVATE (MaximusApp, maximus_app, G_TYPE_OBJECT);
+
static gboolean
wnck_window_is_decorated (WnckWindow *window)
{
@@ -505,9 +501,6 @@ on_app_undecorate_changed (GSettings *settings,
static void
maximus_app_class_init (MaximusAppClass *klass)
{
- GObjectClass *obj_class = G_OBJECT_CLASS (klass);
-
- g_type_class_add_private (obj_class, sizeof (MaximusAppPrivate));
}
static void
@@ -516,7 +509,7 @@ maximus_app_init (MaximusApp *app)
MaximusAppPrivate *priv;
WnckScreen *screen;
- priv = app->priv = MAXIMUS_APP_GET_PRIVATE (app);
+ priv = app->priv = maximus_app_get_instance_private (app);
priv->bind = maximus_bind_get_default ();