summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-07-29 16:42:37 +0200
committerlukefromdc <[email protected]>2019-08-01 19:23:52 +0000
commit7e97c8c54e0df87dc3c7fe233adf2d728115fe69 (patch)
tree70762b39ac6134e0938a7046ec9de1e3ee18d434
parentdd729f5781affdf8ad369b42d1b0d211123bb544 (diff)
downloadpluma-7e97c8c54e0df87dc3c7fe233adf2d728115fe69.tar.bz2
pluma-7e97c8c54e0df87dc3c7fe233adf2d728115fe69.tar.xz
pluma-window: avoid 'g_type_class_add_private'
-rw-r--r--pluma/pluma-window.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/pluma/pluma-window.c b/pluma/pluma-window.c
index d336df98..eaa7540b 100644
--- a/pluma/pluma-window.c
+++ b/pluma/pluma-window.c
@@ -68,10 +68,6 @@
#define LANGUAGE_DATA "PlumaWindowLanguageData"
#define FULLSCREEN_ANIMATION_SPEED 4
-#define PLUMA_WINDOW_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object),\
- PLUMA_TYPE_WINDOW, \
- PlumaWindowPrivate))
-
/* Local variables */
static gboolean cansave = TRUE;
@@ -99,7 +95,7 @@ enum
TARGET_URI_LIST = 100
};
-G_DEFINE_TYPE(PlumaWindow, pluma_window, GTK_TYPE_WINDOW)
+G_DEFINE_TYPE_WITH_PRIVATE (PlumaWindow, pluma_window, GTK_TYPE_WINDOW)
static void recent_manager_changed (GtkRecentManager *manager,
PlumaWindow *window);
@@ -476,8 +472,6 @@ pluma_window_class_init (PlumaWindowClass *klass)
PLUMA_WINDOW_STATE_NORMAL,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS));
-
- g_type_class_add_private (object_class, sizeof(PlumaWindowPrivate));
}
static void
@@ -3971,7 +3965,7 @@ pluma_window_init (PlumaWindow *window)
pluma_debug (DEBUG_WINDOW);
- window->priv = PLUMA_WINDOW_GET_PRIVATE (window);
+ window->priv = pluma_window_get_instance_private (window);
window->priv->active_tab = NULL;
window->priv->num_tabs = 0;
window->priv->removing_tabs = FALSE;