summaryrefslogtreecommitdiff
path: root/mate-window-picker-applet
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-10-30 11:34:26 +0100
committerZenWalker <[email protected]>2019-11-28 01:01:45 +0100
commit115c3332363857157f45a318d8e818b0e042153b (patch)
treed304968a97fbeb1f5100ccf452371f96cffb59e4 /mate-window-picker-applet
parent5b45af8351c19e42433207c0b47e20634ac705fd (diff)
downloadmate-netbook-115c3332363857157f45a318d8e818b0e042153b.tar.bz2
mate-netbook-115c3332363857157f45a318d8e818b0e042153b.tar.xz
task-list: avoid 'g_type_class_add_private'
Diffstat (limited to 'mate-window-picker-applet')
-rw-r--r--mate-window-picker-applet/task-list.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/mate-window-picker-applet/task-list.c b/mate-window-picker-applet/task-list.c
index 01ca46a..18794a4 100644
--- a/mate-window-picker-applet/task-list.c
+++ b/mate-window-picker-applet/task-list.c
@@ -23,12 +23,6 @@
#define WNCK_I_KNOW_THIS_IS_UNSTABLE
#include <libwnck/libwnck.h>
-G_DEFINE_TYPE (TaskList, task_list, GTK_TYPE_BOX);
-
-#define TASK_LIST_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj),\
- TASK_TYPE_LIST, \
- TaskListPrivate))
-
struct _TaskListPrivate
{
WnckScreen *screen;
@@ -43,6 +37,8 @@ enum
PROP_SHOW_ALL_WINDOWS
};
+G_DEFINE_TYPE_WITH_PRIVATE (TaskList, task_list, GTK_TYPE_BOX);
+
static void
task_list_set_show_all_windows (TaskList *list, gboolean show_all_windows)
{
@@ -154,8 +150,6 @@ task_list_class_init (TaskListClass *klass)
"Show windows from all workspaces",
TRUE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
-
- g_type_class_add_private (obj_class, sizeof (TaskListPrivate));
}
static void
@@ -163,7 +157,7 @@ task_list_init (TaskList *list)
{
TaskListPrivate *priv;
- priv = list->priv = TASK_LIST_GET_PRIVATE (list);
+ priv = list->priv = task_list_get_instance_private (list);
priv->screen = wnck_screen_get_default ();