[Xfce4-commits] [apps/gigolo] 07/26: Resolve g_type_class_add_private deprecations

noreply at xfce.org noreply at xfce.org
Thu Oct 25 08:03:59 CEST 2018


This is an automated email from the git hooks/post-receive script.

l   a   n   d   r   y       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/gigolo.

commit 879fd2c5231936b673947602cc45617f31609ad7
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Tue Oct 16 21:40:53 2018 -0400

    Resolve g_type_class_add_private deprecations
---
 TODO                     |  11 -----
 src/backendgvfs.c        |  21 +++-----
 src/bookmark.c           | 126 ++++++++++++++++++++++++++++++++---------------
 src/bookmarkdialog.c     |  26 +++++-----
 src/bookmarkeditdialog.c |  33 ++++++-------
 src/bookmarkpanel.c      |  23 ++++-----
 src/browsenetworkpanel.c |  28 +++++------
 src/mountdialog.c        |  11 ++---
 src/settings.c           |  37 +++++++-------
 src/window.c             |  95 +++++++++++++++++------------------
 10 files changed, 208 insertions(+), 203 deletions(-)

diff --git a/TODO b/TODO
index 669932f..4511eda 100644
--- a/TODO
+++ b/TODO
@@ -3,17 +3,6 @@
 - split GigoloApp from GigoloWindow
 - Samba mounts with set credentials can fail
 
-=== GObject deprecations ===
-window.c:182:2: warning: ‘g_type_class_add_private’ is deprecated
-bookmark.c:93:2: warning: ‘g_type_class_add_private’ is deprecated
-settings.c:222:2: warning: ‘g_type_class_add_private’ is deprecated
-backendgvfs.c:149:2: warning: ‘g_type_class_add_private’ is deprecated
-mountdialog.c:65:2: warning: ‘g_type_class_add_private’ is deprecated
-bookmarkpanel.c:144:2: warning: ‘g_type_class_add_private’ is deprecated
-bookmarkdialog.c:77:2: warning: ‘g_type_class_add_private’ is deprecated
-bookmarkeditdialog.c:328:2: warning: ‘g_type_class_add_private’ is deprecated
-browsenetworkpanel.c:102:2: warning: ‘g_type_class_add_private’ is deprecated
-
 === GtkUiManager deprecations ===
 window.c:1333:2: warning: ‘gtk_ui_manager_insert_action_group’ is deprecated
 window.c:1334:2: warning: ‘gtk_ui_manager_get_accel_group’ is deprecated
diff --git a/src/backendgvfs.c b/src/backendgvfs.c
index f2cc598..9478448 100644
--- a/src/backendgvfs.c
+++ b/src/backendgvfs.c
@@ -31,9 +31,6 @@
 
 typedef struct _GigoloBackendGVFSPrivate			GigoloBackendGVFSPrivate;
 
-#define GIGOLO_BACKEND_GVFS_GET_PRIVATE(obj)		(G_TYPE_INSTANCE_GET_PRIVATE((obj),\
-			GIGOLO_BACKEND_GVFS_TYPE, GigoloBackendGVFSPrivate))
-
 enum
 {
     PROP_0,
@@ -96,7 +93,7 @@ static void browse_network_real						(BrowseData *bd);
 static void browse_host_real						(BrowseData *bd);
 
 
-G_DEFINE_TYPE(GigoloBackendGVFS, gigolo_backend_gvfs, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GigoloBackendGVFS, gigolo_backend_gvfs, G_TYPE_OBJECT);
 
 
 
@@ -146,8 +143,6 @@ static void gigolo_backend_gvfs_class_init(GigoloBackendGVFSClass *klass)
 	g_object_class->finalize = gigolo_backend_gvfs_finalize;
 	g_object_class->set_property = gigolo_backend_gvfs_set_property;
 
-	g_type_class_add_private(klass, sizeof(GigoloBackendGVFSPrivate));
-
 	g_object_class_install_property(g_object_class,
 										PROP_PARENT,
 										g_param_spec_object(
@@ -211,7 +206,7 @@ static void gigolo_backend_gvfs_finalize(GObject *object)
 static gchar *get_tooltip_text(GigoloBackendGVFS *backend, gpointer ref, gint ref_type, const gchar *type)
 {
 	gchar *result = NULL;
-	GigoloBackendGVFSPrivate *priv = GIGOLO_BACKEND_GVFS_GET_PRIVATE(backend);
+	GigoloBackendGVFSPrivate *priv = gigolo_backend_gvfs_get_instance_private(backend);
 	switch (ref_type)
 	{
 		case GIGOLO_WINDOW_REF_TYPE_MOUNT:
@@ -269,7 +264,7 @@ static void mount_volume_changed_cb(GVolumeMonitor *vm, G_GNUC_UNUSED GMount *mn
 	GtkTreeIter iter;
 	gchar *vol_name, *mount_name, *display_name, *scheme, *uri, *tooltip_text;
 	const gchar *scheme_name;
-	GigoloBackendGVFSPrivate *priv = GIGOLO_BACKEND_GVFS_GET_PRIVATE(backend);
+	GigoloBackendGVFSPrivate *priv = gigolo_backend_gvfs_get_instance_private(backend);
 	GigoloBookmark *bookmark;
 	GigoloSettings *settings = gigolo_window_get_settings(GIGOLO_WINDOW(priv->parent));
 
@@ -364,7 +359,7 @@ static void mount_volume_changed_cb(GVolumeMonitor *vm, G_GNUC_UNUSED GMount *mn
 static void gigolo_backend_gvfs_set_property(GObject *object, guint prop_id,
 											 const GValue *value, GParamSpec *pspec)
 {
-	GigoloBackendGVFSPrivate *priv = GIGOLO_BACKEND_GVFS_GET_PRIVATE(object);
+	GigoloBackendGVFSPrivate *priv = gigolo_backend_gvfs_get_instance_private(GIGOLO_BACKEND_GVFS(object));
 
 	switch (prop_id)
 	{
@@ -635,7 +630,7 @@ gchar *gigolo_backend_gvfs_get_mount_path(gpointer mount)
 static gboolean browse_network_ready_cb(gpointer backend)
 {
 	GigoloBackendGVFSPrivate *priv;
-	priv = GIGOLO_BACKEND_GVFS_GET_PRIVATE(backend);
+	priv = gigolo_backend_gvfs_get_instance_private(GIGOLO_BACKEND_GVFS(backend));
 
 	g_return_val_if_fail(backend != NULL, FALSE);
 
@@ -659,7 +654,7 @@ static void browse_network_mount_ready_cb(GFile *location, GAsyncResult *res, Br
 
 	g_file_mount_enclosing_volume_finish(location, res, &error);
 
-	priv = GIGOLO_BACKEND_GVFS_GET_PRIVATE(bd->self);
+	priv = gigolo_backend_gvfs_get_instance_private(bd->self);
 	priv->browse_counter--;
 
 	if (error != NULL)
@@ -698,7 +693,7 @@ static void browse_network_real(BrowseData *bd)
 	mode = bd->mode;
 	parent = bd->parent;
 	backend = bd->self;
-	priv = GIGOLO_BACKEND_GVFS_GET_PRIVATE(backend);
+	priv = gigolo_backend_gvfs_get_instance_private(backend);
 	priv->browse_counter++;
 
 	file = g_file_new_for_uri(bd->uri);
@@ -817,7 +812,7 @@ void gigolo_backend_gvfs_browse_network(GigoloBackendGVFS *backend, GtkWindow *p
 	bd->self = backend;
 	bd->browse_func = browse_network_real;
 
-	priv = GIGOLO_BACKEND_GVFS_GET_PRIVATE(backend);
+	priv = gigolo_backend_gvfs_get_instance_private(backend);
 	priv->browse_counter = 0;
 
 	browse_network_real(bd);
diff --git a/src/bookmark.c b/src/bookmark.c
index bfc2ec3..72b77b8 100644
--- a/src/bookmark.c
+++ b/src/bookmark.c
@@ -29,9 +29,6 @@
 
 typedef struct _GigoloBookmarkPrivate			GigoloBookmarkPrivate;
 
-#define GIGOLO_BOOKMARK_GET_PRIVATE(obj)		(G_TYPE_INSTANCE_GET_PRIVATE((obj),\
-			GIGOLO_BOOKMARK_TYPE, GigoloBookmarkPrivate))
-
 struct _GigoloBookmarkPrivate
 {
 	gchar	*name;
@@ -52,12 +49,12 @@ struct _GigoloBookmarkPrivate
 
 static void gigolo_bookmark_finalize  		(GObject *object);
 
-G_DEFINE_TYPE(GigoloBookmark, gigolo_bookmark, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GigoloBookmark, gigolo_bookmark, G_TYPE_OBJECT);
 
 
 void gigolo_bookmark_clear(GigoloBookmark *bookmark)
 {
-	GigoloBookmarkPrivate *priv = GIGOLO_BOOKMARK_GET_PRIVATE(bookmark);
+	GigoloBookmarkPrivate *priv = gigolo_bookmark_get_instance_private(bookmark);
 
 	g_free(priv->name);
 	g_free(priv->scheme);
@@ -89,8 +86,6 @@ static void gigolo_bookmark_class_init(GigoloBookmarkClass *klass)
 	g_object_class = G_OBJECT_CLASS(klass);
 
 	g_object_class->finalize = gigolo_bookmark_finalize;
-
-	g_type_class_add_private(klass, sizeof(GigoloBookmarkPrivate));
 }
 
 
@@ -107,7 +102,7 @@ gboolean gigolo_bookmark_parse_uri(GigoloBookmark *bookmark, const gchar *uri)
 	gchar *s, *t, *x, *end, *tmp;
 	guint l;
 	gboolean is_uri_dav;
-	GigoloBookmarkPrivate *priv = GIGOLO_BOOKMARK_GET_PRIVATE(bookmark);
+	GigoloBookmarkPrivate *priv = gigolo_bookmark_get_instance_private(bookmark);
 
 	priv->scheme = g_uri_parse_scheme(uri);
 
@@ -263,7 +258,7 @@ GigoloBookmark *gigolo_bookmark_new(void)
 GigoloBookmark *gigolo_bookmark_new_from_uri(const gchar *name, const gchar *uri)
 {
 	GigoloBookmark *bm = g_object_new(GIGOLO_BOOKMARK_TYPE, NULL);
-	GigoloBookmarkPrivate *priv = GIGOLO_BOOKMARK_GET_PRIVATE(bm);
+	GigoloBookmarkPrivate *priv = gigolo_bookmark_get_instance_private(bm);
 
 	gigolo_bookmark_set_name(bm, name);
 	if (! gigolo_bookmark_parse_uri(bm, uri))
@@ -282,8 +277,8 @@ void gigolo_bookmark_clone(GigoloBookmark *dst, const GigoloBookmark *src)
 	g_return_if_fail(dst != NULL);
 	g_return_if_fail(src != NULL);
 
-	priv_dst = GIGOLO_BOOKMARK_GET_PRIVATE(dst);
-	priv_src = GIGOLO_BOOKMARK_GET_PRIVATE(src);
+	priv_dst = gigolo_bookmark_get_instance_private(dst);
+	priv_src = gigolo_bookmark_get_instance_private(GIGOLO_BOOKMARK(src));
 
 	/* free existing strings and data */
 	gigolo_bookmark_clear(dst);
@@ -303,7 +298,7 @@ void gigolo_bookmark_clone(GigoloBookmark *dst, const GigoloBookmark *src)
 
 static gchar *gigolo_bookmark_get_uri_real(GigoloBookmark *bookmark, gboolean escaped)
 {
-	GigoloBookmarkPrivate *priv = GIGOLO_BOOKMARK_GET_PRIVATE(bookmark);
+	GigoloBookmarkPrivate *priv = gigolo_bookmark_get_instance_private(bookmark);
 	gchar *result;
 	const gchar *domain = NULL;
 	gchar *user = NULL;
@@ -362,7 +357,7 @@ void gigolo_bookmark_set_uri(GigoloBookmark *bookmark, const gchar *uri)
 	g_return_if_fail(bookmark != NULL);
 	g_return_if_fail(NZV(uri));
 
-	priv = GIGOLO_BOOKMARK_GET_PRIVATE(bookmark);
+	priv = gigolo_bookmark_get_instance_private(bookmark);
 
 	tmp = gigolo_bookmark_new_from_uri(priv->name, uri);
 	if (gigolo_bookmark_is_valid(tmp))
@@ -374,9 +369,13 @@ void gigolo_bookmark_set_uri(GigoloBookmark *bookmark, const gchar *uri)
 
 const gchar *gigolo_bookmark_get_name(GigoloBookmark *bookmark)
 {
+	GigoloBookmarkPrivate *priv;
+
 	g_return_val_if_fail(bookmark != NULL, NULL);
 
-	return GIGOLO_BOOKMARK_GET_PRIVATE(bookmark)->name;
+	priv = gigolo_bookmark_get_instance_private(bookmark);
+
+	return priv->name;
 }
 
 
@@ -387,7 +386,7 @@ void gigolo_bookmark_set_name(GigoloBookmark *bookmark, const gchar *name)
 	g_return_if_fail(bookmark != NULL);
 	g_return_if_fail(NZV(name));
 
-	priv = GIGOLO_BOOKMARK_GET_PRIVATE(bookmark);
+	priv = gigolo_bookmark_get_instance_private(bookmark);
 
 	g_free(priv->name);
 	priv->name = g_strdup(name);
@@ -396,9 +395,13 @@ void gigolo_bookmark_set_name(GigoloBookmark *bookmark, const gchar *name)
 
 const gchar *gigolo_bookmark_get_scheme(GigoloBookmark *bookmark)
 {
+	GigoloBookmarkPrivate *priv;
+
 	g_return_val_if_fail(bookmark != NULL, NULL);
 
-	return GIGOLO_BOOKMARK_GET_PRIVATE(bookmark)->scheme;
+	priv = gigolo_bookmark_get_instance_private(bookmark);
+
+	return priv->scheme;
 }
 
 
@@ -409,7 +412,7 @@ void gigolo_bookmark_set_scheme(GigoloBookmark *bookmark, const gchar *scheme)
 	g_return_if_fail(bookmark != NULL);
 	g_return_if_fail(NZV(scheme));
 
-	priv = GIGOLO_BOOKMARK_GET_PRIVATE(bookmark);
+	priv = gigolo_bookmark_get_instance_private(bookmark);
 
 	g_free(priv->scheme);
 	priv->scheme = g_strdup(scheme);
@@ -418,9 +421,13 @@ void gigolo_bookmark_set_scheme(GigoloBookmark *bookmark, const gchar *scheme)
 
 const gchar *gigolo_bookmark_get_host(GigoloBookmark *bookmark)
 {
+	GigoloBookmarkPrivate *priv;
+
 	g_return_val_if_fail(bookmark != NULL, NULL);
 
-	return GIGOLO_BOOKMARK_GET_PRIVATE(bookmark)->host;
+	priv = gigolo_bookmark_get_instance_private(bookmark);
+
+	return priv->host;
 }
 
 
@@ -431,7 +438,7 @@ void gigolo_bookmark_set_host(GigoloBookmark *bookmark, const gchar *host)
 	g_return_if_fail(bookmark != NULL);
 	g_return_if_fail(NZV(host));
 
-	priv = GIGOLO_BOOKMARK_GET_PRIVATE(bookmark);
+	priv = gigolo_bookmark_get_instance_private(bookmark);
 
 	g_free(priv->host);
 	priv->host = g_strdup(host);
@@ -440,21 +447,28 @@ void gigolo_bookmark_set_host(GigoloBookmark *bookmark, const gchar *host)
 
 const gchar *gigolo_bookmark_get_folder(GigoloBookmark *bookmark)
 {
+	GigoloBookmarkPrivate *priv;
+
 	g_return_val_if_fail(bookmark != NULL, NULL);
 
-	return GIGOLO_BOOKMARK_GET_PRIVATE(bookmark)->folder;
+	priv = gigolo_bookmark_get_instance_private(bookmark);
+
+	return priv->folder;
 }
 
 
 gchar *gigolo_bookmark_get_folder_expanded(GigoloBookmark *bookmark)
 {
+	GigoloBookmarkPrivate *priv;
 	const gchar *folder;
 	const gchar *username;
 	gchar *result;
 
 	g_return_val_if_fail(bookmark != NULL, NULL);
 
-	folder = GIGOLO_BOOKMARK_GET_PRIVATE(bookmark)->folder;
+	priv = gigolo_bookmark_get_instance_private(bookmark);
+
+	folder = priv->folder;
 	username = gigolo_bookmark_get_user(bookmark);
 	if (NZV(folder) && folder[0] == '~')
 	{
@@ -476,7 +490,7 @@ void gigolo_bookmark_set_folder(GigoloBookmark *bookmark, const gchar *folder)
 	g_return_if_fail(bookmark != NULL);
 	g_return_if_fail(folder != NULL);
 
-	priv = GIGOLO_BOOKMARK_GET_PRIVATE(bookmark);
+	priv = gigolo_bookmark_get_instance_private(bookmark);
 
 	g_free(priv->folder);
 	priv->folder = g_strdup(folder);
@@ -485,9 +499,13 @@ void gigolo_bookmark_set_folder(GigoloBookmark *bookmark, const gchar *folder)
 
 const gchar *gigolo_bookmark_get_path(GigoloBookmark *bookmark)
 {
+	GigoloBookmarkPrivate *priv;
+
 	g_return_val_if_fail(bookmark != NULL, NULL);
 
-	return GIGOLO_BOOKMARK_GET_PRIVATE(bookmark)->path;
+	priv = gigolo_bookmark_get_instance_private(bookmark);
+
+	return priv->path;
 }
 
 
@@ -498,7 +516,7 @@ void gigolo_bookmark_set_path(GigoloBookmark *bookmark, const gchar *path)
 	g_return_if_fail(bookmark != NULL);
 	g_return_if_fail(path != NULL);
 
-	priv = GIGOLO_BOOKMARK_GET_PRIVATE(bookmark);
+	priv = gigolo_bookmark_get_instance_private(bookmark);
 
 	g_free(priv->path);
 	priv->path = g_strdup(path);
@@ -507,9 +525,13 @@ void gigolo_bookmark_set_path(GigoloBookmark *bookmark, const gchar *path)
 
 guint gigolo_bookmark_get_port(GigoloBookmark *bookmark)
 {
+	GigoloBookmarkPrivate *priv;
+
 	g_return_val_if_fail(bookmark != NULL, 0);
 
-	return GIGOLO_BOOKMARK_GET_PRIVATE(bookmark)->port;
+	priv = gigolo_bookmark_get_instance_private(bookmark);
+
+	return priv->port;
 }
 
 
@@ -519,7 +541,7 @@ void gigolo_bookmark_set_port(GigoloBookmark *bookmark, guint port)
 
 	g_return_if_fail(bookmark != NULL);
 
-	priv = GIGOLO_BOOKMARK_GET_PRIVATE(bookmark);
+	priv = gigolo_bookmark_get_instance_private(bookmark);
 
 	priv->port = port;
 }
@@ -527,9 +549,13 @@ void gigolo_bookmark_set_port(GigoloBookmark *bookmark, guint port)
 
 gboolean gigolo_bookmark_get_autoconnect(GigoloBookmark *bookmark)
 {
+	GigoloBookmarkPrivate *priv;
+
 	g_return_val_if_fail(bookmark != NULL, 0);
 
-	return GIGOLO_BOOKMARK_GET_PRIVATE(bookmark)->autoconnect;
+	priv = gigolo_bookmark_get_instance_private(bookmark);
+
+	return priv->autoconnect;
 }
 
 
@@ -539,7 +565,7 @@ void gigolo_bookmark_set_autoconnect(GigoloBookmark *bookmark, gboolean autoconn
 
 	g_return_if_fail(bookmark != NULL);
 
-	priv = GIGOLO_BOOKMARK_GET_PRIVATE(bookmark);
+	priv = gigolo_bookmark_get_instance_private(bookmark);
 
 	priv->autoconnect = autoconnect;
 }
@@ -547,9 +573,13 @@ void gigolo_bookmark_set_autoconnect(GigoloBookmark *bookmark, gboolean autoconn
 
 gboolean gigolo_bookmark_get_should_not_autoconnect(GigoloBookmark *bookmark)
 {
+	GigoloBookmarkPrivate *priv;
+
 	g_return_val_if_fail(bookmark != NULL, 0);
 
-	return GIGOLO_BOOKMARK_GET_PRIVATE(bookmark)->should_not_autoconnect;
+	priv = gigolo_bookmark_get_instance_private(bookmark);
+
+	return priv->should_not_autoconnect;
 }
 
 
@@ -559,7 +589,7 @@ void gigolo_bookmark_set_should_not_autoconnect(GigoloBookmark *bookmark, gboole
 
 	g_return_if_fail(bookmark != NULL);
 
-	priv = GIGOLO_BOOKMARK_GET_PRIVATE(bookmark);
+	priv = gigolo_bookmark_get_instance_private(bookmark);
 
 	priv->should_not_autoconnect = should_not_autoconnect;
 }
@@ -572,7 +602,7 @@ gchar *gigolo_bookmark_get_user_unescaped(GigoloBookmark *bookmark)
 
 	g_return_val_if_fail(bookmark != NULL, NULL);
 
-	priv = GIGOLO_BOOKMARK_GET_PRIVATE(bookmark);
+	priv = gigolo_bookmark_get_instance_private(bookmark);
 
 	if (NZV(priv->user))
 		username = g_uri_unescape_string(priv->user, G_URI_RESERVED_CHARS_ALLOWED_IN_USERINFO);
@@ -585,9 +615,13 @@ gchar *gigolo_bookmark_get_user_unescaped(GigoloBookmark *bookmark)
 
 const gchar *gigolo_bookmark_get_user(GigoloBookmark *bookmark)
 {
+	GigoloBookmarkPrivate *priv;
+
 	g_return_val_if_fail(bookmark != NULL, NULL);
 
-	return GIGOLO_BOOKMARK_GET_PRIVATE(bookmark)->user;
+	priv = gigolo_bookmark_get_instance_private(bookmark);
+
+	return priv->user;
 }
 
 
@@ -598,7 +632,7 @@ void gigolo_bookmark_set_user(GigoloBookmark *bookmark, const gchar *user)
 	g_return_if_fail(bookmark != NULL);
 	g_return_if_fail(user != NULL);
 
-	priv = GIGOLO_BOOKMARK_GET_PRIVATE(bookmark);
+	priv = gigolo_bookmark_get_instance_private(bookmark);
 
 	g_free(priv->user);
 	priv->user = g_strdup(user);
@@ -607,9 +641,13 @@ void gigolo_bookmark_set_user(GigoloBookmark *bookmark, const gchar *user)
 
 const gchar *gigolo_bookmark_get_share(GigoloBookmark *bookmark)
 {
+	GigoloBookmarkPrivate *priv;
+
 	g_return_val_if_fail(bookmark != NULL, NULL);
 
-	return GIGOLO_BOOKMARK_GET_PRIVATE(bookmark)->share;
+	priv = gigolo_bookmark_get_instance_private(bookmark);
+
+	return priv->share;
 }
 
 
@@ -620,7 +658,7 @@ void gigolo_bookmark_set_share(GigoloBookmark *bookmark, const gchar *share)
 	g_return_if_fail(bookmark != NULL);
 	g_return_if_fail(share != NULL);
 
-	priv = GIGOLO_BOOKMARK_GET_PRIVATE(bookmark);
+	priv = gigolo_bookmark_get_instance_private(bookmark);
 
 	g_free(priv->share);
 	priv->share = g_strdup(share);
@@ -629,9 +667,13 @@ void gigolo_bookmark_set_share(GigoloBookmark *bookmark, const gchar *share)
 
 const gchar *gigolo_bookmark_get_domain(GigoloBookmark *bookmark)
 {
+	GigoloBookmarkPrivate *priv;
+
 	g_return_val_if_fail(bookmark != NULL, NULL);
 
-	return GIGOLO_BOOKMARK_GET_PRIVATE(bookmark)->domain;
+	priv = gigolo_bookmark_get_instance_private(bookmark);
+
+	return priv->domain;
 }
 
 
@@ -642,7 +684,7 @@ void gigolo_bookmark_set_domain(GigoloBookmark *bookmark, const gchar *domain)
 	g_return_if_fail(bookmark != NULL);
 	g_return_if_fail(domain != NULL);
 
-	priv = GIGOLO_BOOKMARK_GET_PRIVATE(bookmark);
+	priv = gigolo_bookmark_get_instance_private(bookmark);
 
 	g_free(priv->domain);
 	priv->domain = g_strdup(domain);
@@ -651,9 +693,13 @@ void gigolo_bookmark_set_domain(GigoloBookmark *bookmark, const gchar *domain)
 
 const gchar *gigolo_bookmark_get_color(GigoloBookmark *bookmark)
 {
+	GigoloBookmarkPrivate *priv;
+
 	g_return_val_if_fail(bookmark != NULL, NULL);
 
-	return GIGOLO_BOOKMARK_GET_PRIVATE(bookmark)->color;
+	priv = gigolo_bookmark_get_instance_private(bookmark);
+
+	return priv->color;
 }
 
 
@@ -664,7 +710,7 @@ void gigolo_bookmark_set_color(GigoloBookmark *bookmark, const gchar *color)
 	g_return_if_fail(bookmark != NULL);
 	g_return_if_fail(color != NULL);
 
-	priv = GIGOLO_BOOKMARK_GET_PRIVATE(bookmark);
+	priv = gigolo_bookmark_get_instance_private(bookmark);
 
 	g_free(priv->color);
 	priv->color = g_strdup(color);
@@ -677,7 +723,7 @@ gboolean gigolo_bookmark_is_valid(GigoloBookmark *bookmark)
 
 	g_return_val_if_fail(bookmark != NULL, FALSE);
 
-	priv = GIGOLO_BOOKMARK_GET_PRIVATE(bookmark);
+	priv = gigolo_bookmark_get_instance_private(bookmark);
 
 	return priv->is_valid;
 }
diff --git a/src/bookmarkdialog.c b/src/bookmarkdialog.c
index 15c4f97..8b945a1 100644
--- a/src/bookmarkdialog.c
+++ b/src/bookmarkdialog.c
@@ -33,9 +33,6 @@
 
 typedef struct _GigoloBookmarkDialogPrivate			GigoloBookmarkDialogPrivate;
 
-#define GIGOLO_BOOKMARK_DIALOG_GET_PRIVATE(obj)		(G_TYPE_INSTANCE_GET_PRIVATE((obj),\
-			GIGOLO_BOOKMARK_DIALOG_TYPE, GigoloBookmarkDialogPrivate))
-
 struct _GigoloBookmarkDialogPrivate
 {
 	GigoloWindow *parent;
@@ -69,18 +66,17 @@ enum
 };
 
 
-G_DEFINE_TYPE(GigoloBookmarkDialog, gigolo_bookmark_dialog, GTK_TYPE_DIALOG);
+G_DEFINE_TYPE_WITH_PRIVATE(GigoloBookmarkDialog, gigolo_bookmark_dialog, GTK_TYPE_DIALOG);
 
 
 static void gigolo_bookmark_dialog_class_init(GigoloBookmarkDialogClass *klass)
 {
-	g_type_class_add_private(klass, sizeof(GigoloBookmarkDialogPrivate));
 }
 
 
 static void update_row_in_model(GigoloBookmarkDialog *dialog, GtkTreeIter *iter, GigoloBookmark *bm)
 {
-	GigoloBookmarkDialogPrivate *priv = GIGOLO_BOOKMARK_DIALOG_GET_PRIVATE(dialog);
+	GigoloBookmarkDialogPrivate *priv = gigolo_bookmark_dialog_get_instance_private(dialog);
 	gchar port[6];
 	GString *other_text = g_string_new(NULL);
 	const gchar *tmp;
@@ -128,7 +124,7 @@ static void update_row_in_model(GigoloBookmarkDialog *dialog, GtkTreeIter *iter,
 
 static void add_button_click_cb(G_GNUC_UNUSED GtkButton *button, GtkWindow *dialog)
 {
-	GigoloBookmarkDialogPrivate *priv = GIGOLO_BOOKMARK_DIALOG_GET_PRIVATE(dialog);
+	GigoloBookmarkDialogPrivate *priv = gigolo_bookmark_dialog_get_instance_private(GIGOLO_BOOKMARK_DIALOG(dialog));
 	GtkWidget *edit_dialog = gigolo_bookmark_edit_dialog_new(priv->parent, GIGOLO_BE_MODE_CREATE);
 	GigoloBookmark *bm = NULL;
 
@@ -157,7 +153,7 @@ static void edit_button_click_cb(G_GNUC_UNUSED GtkButton *button, GtkWindow *dia
 	GtkTreeSelection *treesel;
 	GtkTreeIter iter;
 	GtkWidget *edit_dialog;
-	GigoloBookmarkDialogPrivate *priv = GIGOLO_BOOKMARK_DIALOG_GET_PRIVATE(dialog);
+	GigoloBookmarkDialogPrivate *priv = gigolo_bookmark_dialog_get_instance_private(GIGOLO_BOOKMARK_DIALOG(dialog));
 	GigoloBookmark *bm;
 
 	treesel = gtk_tree_view_get_selection(GTK_TREE_VIEW(priv->tree));
@@ -187,7 +183,7 @@ static void delete_button_click_cb(G_GNUC_UNUSED GtkButton *button, gpointer use
 {
 	GtkTreeSelection *treesel;
 	GtkTreeIter iter;
-	GigoloBookmarkDialogPrivate *priv = GIGOLO_BOOKMARK_DIALOG_GET_PRIVATE(user_data);
+	GigoloBookmarkDialogPrivate *priv = gigolo_bookmark_dialog_get_instance_private(user_data);
 	GigoloBookmark *bm;
 	GigoloBookmarkList *bml = gigolo_settings_get_bookmarks(
 		gigolo_window_get_settings(GIGOLO_WINDOW(priv->parent)));
@@ -211,7 +207,7 @@ static void tree_fill(GigoloBookmarkDialog *dialog)
 {
 	guint i;
 	GigoloBookmark *bm;
-	GigoloBookmarkDialogPrivate *priv = GIGOLO_BOOKMARK_DIALOG_GET_PRIVATE(dialog);
+	GigoloBookmarkDialogPrivate *priv = gigolo_bookmark_dialog_get_instance_private(dialog);
 	GigoloBookmarkList *bml = gigolo_settings_get_bookmarks(
 		gigolo_window_get_settings(GIGOLO_WINDOW(priv->parent)));
 	GtkTreeIter iter;
@@ -236,7 +232,7 @@ static void tree_row_activated_cb(G_GNUC_UNUSED GtkTreeView *treeview,
 
 static void tree_selection_changed_cb(GtkTreeSelection *selection, gpointer data)
 {
-	GigoloBookmarkDialogPrivate *priv = GIGOLO_BOOKMARK_DIALOG_GET_PRIVATE(data);
+	GigoloBookmarkDialogPrivate *priv = gigolo_bookmark_dialog_get_instance_private(data);
 
 	gtk_widget_set_sensitive(priv->button_edit, (selection != NULL));
 	gtk_widget_set_sensitive(priv->button_delete, (selection != NULL));
@@ -248,7 +244,7 @@ static gboolean tree_button_press_event_cb(G_GNUC_UNUSED GtkWidget *widget,
 {
 	if (event->button == 3)
 	{
-		GigoloBookmarkDialogPrivate *priv = GIGOLO_BOOKMARK_DIALOG_GET_PRIVATE(data);
+		GigoloBookmarkDialogPrivate *priv = gigolo_bookmark_dialog_get_instance_private(data);
 		GtkTreeSelection *treesel = gtk_tree_view_get_selection(GTK_TREE_VIEW(priv->tree));
 		gboolean have_sel = (gtk_tree_selection_count_selected_rows(treesel) > 0);
 
@@ -294,7 +290,7 @@ static void tree_prepare(GigoloBookmarkDialog *dialog)
 	GtkTreeViewColumn *column;
 	GtkTreeSelection *sel;
 	GtkWidget *item;
-	GigoloBookmarkDialogPrivate *priv = GIGOLO_BOOKMARK_DIALOG_GET_PRIVATE(dialog);
+	GigoloBookmarkDialogPrivate *priv = gigolo_bookmark_dialog_get_instance_private(dialog);
 
 	priv->tree = gtk_tree_view_new();
 	priv->store = gtk_list_store_new(N_COLUMNS,
@@ -403,7 +399,7 @@ static void tree_prepare(GigoloBookmarkDialog *dialog)
 static void gigolo_bookmark_dialog_init(GigoloBookmarkDialog *dialog)
 {
 	GtkWidget *vbox, *vbox2, *hbox, *swin, *button_add;
-	GigoloBookmarkDialogPrivate *priv = GIGOLO_BOOKMARK_DIALOG_GET_PRIVATE(dialog);
+	GigoloBookmarkDialogPrivate *priv = gigolo_bookmark_dialog_get_instance_private(dialog);
 
 	g_object_set(dialog,
 		"icon-name", gigolo_find_icon_name("bookmark-new", "gtk-edit"),
@@ -462,7 +458,7 @@ GtkWidget *gigolo_bookmark_dialog_new(GigoloWindow *parent)
 	GigoloBookmarkDialogPrivate *priv;
 
 	dialog = g_object_new(GIGOLO_BOOKMARK_DIALOG_TYPE, "transient-for", parent, NULL);
-	priv = GIGOLO_BOOKMARK_DIALOG_GET_PRIVATE(dialog);
+	priv = gigolo_bookmark_dialog_get_instance_private(GIGOLO_BOOKMARK_DIALOG(dialog));
 
 	priv->parent = parent;
 
diff --git a/src/bookmarkeditdialog.c b/src/bookmarkeditdialog.c
index 077c51a..4153d25 100644
--- a/src/bookmarkeditdialog.c
+++ b/src/bookmarkeditdialog.c
@@ -36,9 +36,6 @@
 
 typedef struct _GigoloBookmarkEditDialogPrivate			GigoloBookmarkEditDialogPrivate;
 
-#define GIGOLO_BOOKMARK_EDIT_DIALOG_GET_PRIVATE(obj)	(G_TYPE_INSTANCE_GET_PRIVATE((obj),\
-			GIGOLO_BOOKMARK_EDIT_DIALOG_TYPE, GigoloBookmarkEditDialogPrivate))
-
 struct _GigoloBookmarkEditDialogPrivate
 {
 	GigoloWindow *parent;
@@ -156,13 +153,13 @@ static guint methods_len = G_N_ELEMENTS(methods);
 
 
 
-G_DEFINE_TYPE(GigoloBookmarkEditDialog, gigolo_bookmark_edit_dialog, GTK_TYPE_DIALOG);
+G_DEFINE_TYPE_WITH_PRIVATE(GigoloBookmarkEditDialog, gigolo_bookmark_edit_dialog, GTK_TYPE_DIALOG);
 
 
 
 static void gigolo_bookmark_edit_dialog_finalize(GObject *object)
 {
-	GigoloBookmarkEditDialogPrivate *priv = GIGOLO_BOOKMARK_EDIT_DIALOG_GET_PRIVATE(object);
+	GigoloBookmarkEditDialogPrivate *priv = gigolo_bookmark_edit_dialog_get_instance_private(GIGOLO_BOOKMARK_EDIT_DIALOG(object));
 	GigoloBackendGVFS *backend;
 
 	backend = gigolo_window_get_backend(priv->parent);
@@ -210,7 +207,7 @@ gint gigolo_bookmark_edit_dialog_run(GigoloBookmarkEditDialog *dialog)
 {
 	gint res;
 	gboolean error = FALSE;
-	GigoloBookmarkEditDialogPrivate *priv = GIGOLO_BOOKMARK_EDIT_DIALOG_GET_PRIVATE(dialog);
+	GigoloBookmarkEditDialogPrivate *priv = gigolo_bookmark_edit_dialog_get_instance_private(dialog);
 	const gchar *tmp;
 
 	while (TRUE)
@@ -325,8 +322,6 @@ static void gigolo_bookmark_edit_dialog_class_init(GigoloBookmarkEditDialogClass
 
 	g_object_class->set_property = gigolo_bookmark_edit_dialog_set_property;
 
-	g_type_class_add_private(klass, sizeof(GigoloBookmarkEditDialogPrivate));
-
 	g_object_class_install_property(g_object_class,
 									PROP_MODE,
 									g_param_spec_int(
@@ -413,7 +408,7 @@ static void combo_set_active(GtkWidget *combo, guint idx)
 
 static void init_values(GigoloBookmarkEditDialog *dialog)
 {
-	GigoloBookmarkEditDialogPrivate *priv = GIGOLO_BOOKMARK_EDIT_DIALOG_GET_PRIVATE(dialog);
+	GigoloBookmarkEditDialogPrivate *priv = gigolo_bookmark_edit_dialog_get_instance_private(dialog);
 	gchar *uri, *user;
 	const gchar *tmp;
 	guint port;
@@ -503,7 +498,7 @@ static void setup_for_type(GigoloBookmarkEditDialog *dialog)
 	guint idx;
 	GtkWidget *table;
 	GtkTreeIter iter;
-	GigoloBookmarkEditDialogPrivate *priv = GIGOLO_BOOKMARK_EDIT_DIALOG_GET_PRIVATE(dialog);
+	GigoloBookmarkEditDialogPrivate *priv = gigolo_bookmark_edit_dialog_get_instance_private(dialog);
 
 	if (! gtk_combo_box_get_active_iter(GTK_COMBO_BOX(priv->type_combo), &iter))
 		return;
@@ -700,7 +695,7 @@ static void fill_method_combo_box(GigoloBookmarkEditDialog *dialog)
 	GtkTreeModel *filter;
 	GtkTreeIter iter;
 	const gchar *scheme;
-	GigoloBookmarkEditDialogPrivate *priv = GIGOLO_BOOKMARK_EDIT_DIALOG_GET_PRIVATE(dialog);
+	GigoloBookmarkEditDialogPrivate *priv = gigolo_bookmark_edit_dialog_get_instance_private(dialog);
 
 	/* 0 - method index, 1 - visible/supported flag, 2 - description */
 	store = gtk_list_store_new(3, G_TYPE_UINT, G_TYPE_BOOLEAN, G_TYPE_STRING);
@@ -757,7 +752,7 @@ static void update_bookmark_color(GigoloBookmarkEditDialog *dialog)
 	GdkRGBA color;
 	gchar *color_string;
 
-	priv = GIGOLO_BOOKMARK_EDIT_DIALOG_GET_PRIVATE(dialog);
+	priv = gigolo_bookmark_edit_dialog_get_instance_private(dialog);
 
 	if (! priv->color_set)
 		/* if no colour has been chosen by the user, don't set the default colour (black) */
@@ -781,7 +776,7 @@ static void update_bookmark(GigoloBookmarkEditDialog *dialog)
 
 	g_return_if_fail(dialog != NULL);
 
-	priv = GIGOLO_BOOKMARK_EDIT_DIALOG_GET_PRIVATE(dialog);
+	priv = gigolo_bookmark_edit_dialog_get_instance_private(dialog);
 	g_return_if_fail(priv->bookmark_update != NULL);
 	g_return_if_fail(gigolo_bookmark_is_valid(priv->bookmark_update));
 
@@ -851,7 +846,7 @@ static void gigolo_bookmark_edit_dialog_set_property(GObject *object, guint prop
 												   const GValue *value, GParamSpec *pspec)
 {
  	GigoloBookmarkEditDialog *dialog = GIGOLO_BOOKMARK_EDIT_DIALOG(object);
- 	GigoloBookmarkEditDialogPrivate *priv = GIGOLO_BOOKMARK_EDIT_DIALOG_GET_PRIVATE(dialog);
+ 	GigoloBookmarkEditDialogPrivate *priv = gigolo_bookmark_edit_dialog_get_instance_private(dialog);
 
 	switch (prop_id)
     {
@@ -920,7 +915,7 @@ static void gigolo_bookmark_edit_dialog_set_property(GObject *object, guint prop
 static void browse_host_finished_cb(G_GNUC_UNUSED GigoloBackendGVFS *bnd, GSList *shares,
 									GigoloBookmarkEditDialog *dialog)
 {
-	GigoloBookmarkEditDialogPrivate *priv = GIGOLO_BOOKMARK_EDIT_DIALOG_GET_PRIVATE(dialog);
+	GigoloBookmarkEditDialogPrivate *priv = gigolo_bookmark_edit_dialog_get_instance_private(dialog);
 
 	if (shares != NULL)
 	{
@@ -938,7 +933,7 @@ static void browse_host_finished_cb(G_GNUC_UNUSED GigoloBackendGVFS *bnd, GSList
 
 static void share_button_clicked_cb(GtkWidget *btn, GigoloBookmarkEditDialog *dialog)
 {
-	GigoloBookmarkEditDialogPrivate *priv = GIGOLO_BOOKMARK_EDIT_DIALOG_GET_PRIVATE(dialog);
+	GigoloBookmarkEditDialogPrivate *priv = gigolo_bookmark_edit_dialog_get_instance_private(dialog);
 	const gchar *hostname;
 
 	gtk_list_store_clear(GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(priv->share_combo))));
@@ -971,7 +966,7 @@ static void entry_activate_cb(G_GNUC_UNUSED GtkEditable *editable, GigoloBookmar
 static void color_chooser_set_cb(G_GNUC_UNUSED GtkColorButton *widget,
 								 GigoloBookmarkEditDialog *dialog)
 {
-	GigoloBookmarkEditDialogPrivate *priv = GIGOLO_BOOKMARK_EDIT_DIALOG_GET_PRIVATE(dialog);
+	GigoloBookmarkEditDialogPrivate *priv = gigolo_bookmark_edit_dialog_get_instance_private(dialog);
 
 	priv->color_set = TRUE;
 }
@@ -987,7 +982,7 @@ static void gigolo_bookmark_edit_dialog_init(GigoloBookmarkEditDialog *dialog)
 	GtkWidget *hbox;
 	GtkWidget *vbox;
 	GtkCellRenderer *renderer;
-	GigoloBookmarkEditDialogPrivate *priv = GIGOLO_BOOKMARK_EDIT_DIALOG_GET_PRIVATE(dialog);
+	GigoloBookmarkEditDialogPrivate *priv = gigolo_bookmark_edit_dialog_get_instance_private(dialog);
 
 	priv->browse_host_signal_id = 0;
 	priv->dialog_type = GIGOLO_BE_MODE_EDIT;
@@ -1145,7 +1140,7 @@ GtkWidget *gigolo_bookmark_edit_dialog_new(GigoloWindow *parent, GigoloBookmarkE
 		"mode", mode,
 		NULL);
 
-	priv = GIGOLO_BOOKMARK_EDIT_DIALOG_GET_PRIVATE(dialog);
+	priv = gigolo_bookmark_edit_dialog_get_instance_private(dialog);
 	priv->parent = parent;
 
 	priv->browse_host_signal_id = g_signal_connect(gigolo_window_get_backend(parent),
diff --git a/src/bookmarkpanel.c b/src/bookmarkpanel.c
index 700ed4e..0e1f226 100644
--- a/src/bookmarkpanel.c
+++ b/src/bookmarkpanel.c
@@ -34,8 +34,6 @@
 
 typedef struct _GigoloBookmarkPanelPrivate			GigoloBookmarkPanelPrivate;
 
-#define GIGOLO_BOOKMARK_PANEL_GET_PRIVATE(obj)		(G_TYPE_INSTANCE_GET_PRIVATE((obj),\
-			GIGOLO_BOOKMARK_PANEL_TYPE, GigoloBookmarkPanelPrivate))
 
 
 enum
@@ -73,7 +71,7 @@ struct _GigoloBookmarkPanelPrivate
 	GtkListStore *store;
 };
 
-G_DEFINE_TYPE(GigoloBookmarkPanel, gigolo_bookmark_panel, GTK_TYPE_BOX);
+G_DEFINE_TYPE_WITH_PRIVATE(GigoloBookmarkPanel, gigolo_bookmark_panel, GTK_TYPE_BOX);
 
 
 
@@ -82,7 +80,7 @@ static void update_store(GigoloBookmarkPanel *panel, GigoloSettings *settings)
 	guint i;
 	GigoloBookmark *bm;
 	GigoloBookmarkList *bml = gigolo_settings_get_bookmarks(settings);
-	GigoloBookmarkPanelPrivate *priv = GIGOLO_BOOKMARK_PANEL_GET_PRIVATE(panel);
+	GigoloBookmarkPanelPrivate *priv = gigolo_bookmark_panel_get_instance_private(panel);
 
 	gtk_list_store_clear(priv->store);
 
@@ -139,15 +137,12 @@ static void gigolo_bookmark_panel_class_init(GigoloBookmarkPanelClass *klass)
 										"The associated settings",
 										GIGOLO_SETTINGS_TYPE,
 										G_PARAM_WRITABLE));
-
-
-	g_type_class_add_private(klass, sizeof(GigoloBookmarkPanelPrivate));
 }
 
 
 static void button_close_click_cb(G_GNUC_UNUSED GtkToolButton *btn, GigoloBookmarkPanel *panel)
 {
-	GigoloBookmarkPanelPrivate *priv = GIGOLO_BOOKMARK_PANEL_GET_PRIVATE(panel);
+	GigoloBookmarkPanelPrivate *priv = gigolo_bookmark_panel_get_instance_private(panel);
 	GigoloSettings *settings = gigolo_window_get_settings(GIGOLO_WINDOW(priv->parent));
 
 	g_object_set(settings, "show-panel", FALSE, NULL);
@@ -156,7 +151,7 @@ static void button_close_click_cb(G_GNUC_UNUSED GtkToolButton *btn, GigoloBookma
 
 static void button_connect_click_cb(G_GNUC_UNUSED GtkToolButton *btn, GigoloBookmarkPanel *panel)
 {
-	GigoloBookmarkPanelPrivate *priv = GIGOLO_BOOKMARK_PANEL_GET_PRIVATE(panel);
+	GigoloBookmarkPanelPrivate *priv = gigolo_bookmark_panel_get_instance_private(panel);
 	GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(priv->tree));
 	GtkTreeModel *model;
 	GtkTreeIter iter;
@@ -174,7 +169,7 @@ static void button_connect_click_cb(G_GNUC_UNUSED GtkToolButton *btn, GigoloBook
 static void tree_selection_changed_cb(GtkTreeSelection *selection, GigoloBookmarkPanel *panel)
 {
 	gboolean set;
-	GigoloBookmarkPanelPrivate *priv = GIGOLO_BOOKMARK_PANEL_GET_PRIVATE(panel);
+	GigoloBookmarkPanelPrivate *priv = gigolo_bookmark_panel_get_instance_private(panel);
 
 	set = (selection != NULL) ? gtk_tree_selection_get_selected(selection, NULL, NULL) : FALSE;
 
@@ -186,7 +181,7 @@ static void tree_row_activated_cb(GtkTreeView *view, GtkTreePath *path,
 								  G_GNUC_UNUSED GtkTreeViewColumn *col,
 								  GigoloBookmarkPanel *panel)
 {
-	GigoloBookmarkPanelPrivate *priv = GIGOLO_BOOKMARK_PANEL_GET_PRIVATE(panel);
+	GigoloBookmarkPanelPrivate *priv = gigolo_bookmark_panel_get_instance_private(panel);
 	GtkTreeModel *model;
 	GtkTreeIter iter;
 
@@ -208,7 +203,7 @@ static void tree_prepare(GigoloBookmarkPanel *panel)
 	GtkTreeSelection *selection;
 	GtkWidget *tree;
 	GtkListStore *store;
-	GigoloBookmarkPanelPrivate *priv = GIGOLO_BOOKMARK_PANEL_GET_PRIVATE(panel);
+	GigoloBookmarkPanelPrivate *priv = gigolo_bookmark_panel_get_instance_private(panel);
 
 	tree = gtk_tree_view_new();
 	store = gtk_list_store_new(GIGOLO_BOOKMARK_PANEL_N_COLUMNS,
@@ -246,7 +241,7 @@ static void gigolo_bookmark_panel_init(GigoloBookmarkPanel *self)
 {
 	GtkWidget *swin, *toolbar;
 	GtkToolItem *toolitem;
-	GigoloBookmarkPanelPrivate *priv = GIGOLO_BOOKMARK_PANEL_GET_PRIVATE(self);
+	GigoloBookmarkPanelPrivate *priv = gigolo_bookmark_panel_get_instance_private(self);
 
 	gtk_orientable_set_orientation (GTK_ORIENTABLE (self), GTK_ORIENTATION_VERTICAL);
 	toolbar = gtk_toolbar_new();
@@ -294,7 +289,7 @@ GtkWidget *gigolo_bookmark_panel_new(GigoloWindow *parent)
 
 	self = g_object_new(GIGOLO_BOOKMARK_PANEL_TYPE, NULL);
 
-	priv = GIGOLO_BOOKMARK_PANEL_GET_PRIVATE(self);
+	priv = gigolo_bookmark_panel_get_instance_private(GIGOLO_BOOKMARK_PANEL(self));
 	priv->parent = parent;
 
 	return self;
diff --git a/src/browsenetworkpanel.c b/src/browsenetworkpanel.c
index d3a0acc..127c1ad 100644
--- a/src/browsenetworkpanel.c
+++ b/src/browsenetworkpanel.c
@@ -35,9 +35,6 @@
 
 typedef struct _GigoloBrowseNetworkPanelPrivate			GigoloBrowseNetworkPanelPrivate;
 
-#define GIGOLO_BROWSE_NETWORK_PANEL_GET_PRIVATE(obj)		(G_TYPE_INSTANCE_GET_PRIVATE((obj),\
-			GIGOLO_BROWSE_NETWORK_PANEL_TYPE, GigoloBrowseNetworkPanelPrivate))
-
 struct _GigoloBrowseNetworkPanelPrivate
 {
 	GigoloWindow *parent;
@@ -67,12 +64,12 @@ static void tree_selection_changed_cb(GtkTreeSelection *selection, GigoloBrowseN
 static void browse_network_finished_cb(G_GNUC_UNUSED GigoloBackendGVFS *bnd, GigoloBrowseNetworkPanel *panel);
 
 
-G_DEFINE_TYPE(GigoloBrowseNetworkPanel, gigolo_browse_network_panel, GTK_TYPE_BOX);
+G_DEFINE_TYPE_WITH_PRIVATE(GigoloBrowseNetworkPanel, gigolo_browse_network_panel, GTK_TYPE_BOX);
 
 
 static void gigolo_browse_network_panel_finalize(GObject *object)
 {
-	GigoloBrowseNetworkPanelPrivate *priv = GIGOLO_BROWSE_NETWORK_PANEL_GET_PRIVATE(object);
+	GigoloBrowseNetworkPanelPrivate *priv = gigolo_browse_network_panel_get_instance_private(GIGOLO_BROWSE_NETWORK_PANEL(object));
 	GigoloBackendGVFS *backend;
 
 	gtk_widget_destroy(priv->popup_menu);
@@ -99,13 +96,12 @@ static void gigolo_browse_network_panel_class_init(GigoloBrowseNetworkPanelClass
 	g_object_class->finalize = gigolo_browse_network_panel_finalize;
 
 	gigolo_browse_network_panel_parent_class = (GtkBoxClass*) g_type_class_peek(GTK_TYPE_BOX);
-	g_type_class_add_private(klass, sizeof(GigoloBrowseNetworkPanelPrivate));
 }
 
 
 static void mount_share(GigoloBrowseNetworkPanel *panel, GigoloBookmarkEditDialogMode mode)
 {
-	GigoloBrowseNetworkPanelPrivate *priv = GIGOLO_BROWSE_NETWORK_PANEL_GET_PRIVATE(panel);
+	GigoloBrowseNetworkPanelPrivate *priv = gigolo_browse_network_panel_get_instance_private(panel);
 	GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(priv->tree));
 	GtkTreeModel *model;
 	GtkTreeIter iter;
@@ -208,7 +204,7 @@ static void find_empty_nodes(GtkTreeModel *model)
 
 static void browse_network_finished_cb(G_GNUC_UNUSED GigoloBackendGVFS *bnd, GigoloBrowseNetworkPanel *panel)
 {
-	GigoloBrowseNetworkPanelPrivate *priv = GIGOLO_BROWSE_NETWORK_PANEL_GET_PRIVATE(panel);
+	GigoloBrowseNetworkPanelPrivate *priv = gigolo_browse_network_panel_get_instance_private(panel);
 
 	find_empty_nodes(GTK_TREE_MODEL(priv->store));
 
@@ -220,7 +216,7 @@ static void browse_network_finished_cb(G_GNUC_UNUSED GigoloBackendGVFS *bnd, Gig
 
 static void gigolo_browse_network_panel_refresh(GigoloBrowseNetworkPanel *panel)
 {
-	GigoloBrowseNetworkPanelPrivate *priv = GIGOLO_BROWSE_NETWORK_PANEL_GET_PRIVATE(panel);
+	GigoloBrowseNetworkPanelPrivate *priv = gigolo_browse_network_panel_get_instance_private(panel);
 
 	gtk_widget_set_sensitive(priv->button_refresh, FALSE);
 	gtk_tree_store_clear(priv->store);
@@ -232,7 +228,7 @@ static void gigolo_browse_network_panel_refresh(GigoloBrowseNetworkPanel *panel)
 
 static gboolean delay_refresh(GigoloBrowseNetworkPanel *panel)
 {
-	GigoloBrowseNetworkPanelPrivate *priv = GIGOLO_BROWSE_NETWORK_PANEL_GET_PRIVATE(panel);
+	GigoloBrowseNetworkPanelPrivate *priv = gigolo_browse_network_panel_get_instance_private(panel);
 
 	gdk_window_set_cursor(gtk_widget_get_window(GTK_WIDGET(panel)), priv->wait_cursor);
 	/* Force the update of the cursor */
@@ -251,7 +247,7 @@ static void button_refresh_click_cb(G_GNUC_UNUSED GtkToolButton *btn, GigoloBrow
 
 static void button_close_click_cb(G_GNUC_UNUSED GtkToolButton *btn, GigoloBrowseNetworkPanel *panel)
 {
-	GigoloBrowseNetworkPanelPrivate *priv = GIGOLO_BROWSE_NETWORK_PANEL_GET_PRIVATE(panel);
+	GigoloBrowseNetworkPanelPrivate *priv = gigolo_browse_network_panel_get_instance_private(panel);
 	GigoloSettings *settings = gigolo_window_get_settings(GIGOLO_WINDOW(priv->parent));
 	/* hide the panel by setting the property to FALSE */
 	g_object_set(settings, "show-panel", FALSE, NULL);
@@ -278,7 +274,7 @@ static gboolean tree_button_release_event(G_GNUC_UNUSED GtkWidget *widget, GdkEv
 {
 	if (event->button == 3)
 	{
-		GigoloBrowseNetworkPanelPrivate *priv = GIGOLO_BROWSE_NETWORK_PANEL_GET_PRIVATE(panel);
+		GigoloBrowseNetworkPanelPrivate *priv = gigolo_browse_network_panel_get_instance_private(panel);
 		gtk_menu_popup_at_pointer (GTK_MENU(priv->popup_menu),
 								   (GdkEvent *)event);
 		return TRUE;
@@ -348,7 +344,7 @@ static void tree_popup_activate_cb(GtkCheckMenuItem *item, gpointer user_data)
 
 static void tree_selection_changed_cb(GtkTreeSelection *selection, GigoloBrowseNetworkPanel *panel)
 {
-	GigoloBrowseNetworkPanelPrivate *priv = GIGOLO_BROWSE_NETWORK_PANEL_GET_PRIVATE(panel);
+	GigoloBrowseNetworkPanelPrivate *priv = gigolo_browse_network_panel_get_instance_private(panel);
 	GtkTreeModel *model;
 	GtkTreeIter iter;
 	gboolean set = FALSE;
@@ -401,7 +397,7 @@ static void tree_prepare(GigoloBrowseNetworkPanel *panel)
 	GtkTreeSelection *selection;
 	GtkWidget *tree, *menu, *item;
 	GtkTreeStore *store;
-	GigoloBrowseNetworkPanelPrivate *priv = GIGOLO_BROWSE_NETWORK_PANEL_GET_PRIVATE(panel);
+	GigoloBrowseNetworkPanelPrivate *priv = gigolo_browse_network_panel_get_instance_private(panel);
 
 	tree = gtk_tree_view_new();
 	store = gtk_tree_store_new(GIGOLO_BROWSE_NETWORK_N_COLUMNS,
@@ -474,7 +470,7 @@ static void gigolo_browse_network_panel_init(GigoloBrowseNetworkPanel *panel)
 {
 	GtkWidget *swin, *toolbar;
 	GtkToolItem *toolitem;
-	GigoloBrowseNetworkPanelPrivate *priv = GIGOLO_BROWSE_NETWORK_PANEL_GET_PRIVATE(panel);
+	GigoloBrowseNetworkPanelPrivate *priv = gigolo_browse_network_panel_get_instance_private(panel);
 
 	priv->browse_network_signal_id = 0;
 
@@ -547,7 +543,7 @@ GtkWidget *gigolo_browse_network_panel_new(GigoloWindow *parent)
 
 	self = g_object_new(GIGOLO_BROWSE_NETWORK_PANEL_TYPE, NULL);
 
-	priv = GIGOLO_BROWSE_NETWORK_PANEL_GET_PRIVATE(self);
+	priv = gigolo_browse_network_panel_get_instance_private(GIGOLO_BROWSE_NETWORK_PANEL(self));
 	priv->parent = parent;
 
 	backend = gigolo_window_get_backend(parent);
diff --git a/src/mountdialog.c b/src/mountdialog.c
index e9771f3..f2f920a 100644
--- a/src/mountdialog.c
+++ b/src/mountdialog.c
@@ -30,9 +30,6 @@
 
 typedef struct _GigoloMountDialogPrivate			GigoloMountDialogPrivate;
 
-#define GIGOLO_MOUNT_DIALOG_GET_PRIVATE(obj)		(G_TYPE_INSTANCE_GET_PRIVATE((obj),\
-			GIGOLO_MOUNT_DIALOG_TYPE, GigoloMountDialogPrivate))
-
 struct _GigoloMountDialog
 {
 	GtkDialog parent;
@@ -61,14 +58,12 @@ static void gigolo_mount_dialog_class_init(GigoloMountDialogClass *klass)
 	GObjectClass *object_class = G_OBJECT_CLASS(klass);
 
 	object_class->finalize = gigolo_mount_dialog_finalize;
-
-	g_type_class_add_private(klass, sizeof(GigoloMountDialogPrivate));
 }
 
 
 static void gigolo_mount_dialog_finalize(GObject *widget)
 {
-	GigoloMountDialogPrivate *priv = GIGOLO_MOUNT_DIALOG_GET_PRIVATE(widget);
+	GigoloMountDialogPrivate *priv = gigolo_mount_dialog_get_instance_private(GIGOLO_MOUNT_DIALOG(widget));
 
 	if (priv->timer_id != (guint) -1)
 	{
@@ -91,7 +86,7 @@ static gboolean do_pulse(gpointer data)
 static void gigolo_mount_dialog_init(GigoloMountDialog *self)
 {
 	GtkWidget *vbox, *progress;
-	GigoloMountDialogPrivate *priv = GIGOLO_MOUNT_DIALOG_GET_PRIVATE(self);
+	GigoloMountDialogPrivate *priv = gigolo_mount_dialog_get_instance_private(self);
 
 	priv->timer_id = (guint) -1;
 
@@ -120,7 +115,7 @@ GtkWidget *gigolo_mount_dialog_new(GtkWindow *parent, const gchar *label)
 		"transient-for", parent,
 		"icon-name", gigolo_get_application_icon_name(),
 		NULL);
-	GigoloMountDialogPrivate *priv = GIGOLO_MOUNT_DIALOG_GET_PRIVATE(dialog);
+	GigoloMountDialogPrivate *priv = gigolo_mount_dialog_get_instance_private(GIGOLO_MOUNT_DIALOG(dialog));
 
 	gtk_label_set_text(GTK_LABEL(priv->label), label);
 
diff --git a/src/settings.c b/src/settings.c
index 91641ee..9ae0826 100644
--- a/src/settings.c
+++ b/src/settings.c
@@ -34,9 +34,6 @@
 
 typedef struct _GigoloSettingsPrivate			GigoloSettingsPrivate;
 
-#define GIGOLO_SETTINGS_GET_PRIVATE(obj)		(G_TYPE_INSTANCE_GET_PRIVATE((obj),\
-		GIGOLO_SETTINGS_TYPE, GigoloSettingsPrivate))
-
 struct _GigoloSettingsPrivate
 {
 	gchar		*config_path;
@@ -95,12 +92,12 @@ enum
 };
 
 
-G_DEFINE_TYPE(GigoloSettings, gigolo_settings, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE(GigoloSettings, gigolo_settings, G_TYPE_OBJECT);
 
 
 static void gigolo_settings_set_property(GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
 {
-	GigoloSettingsPrivate *priv = GIGOLO_SETTINGS_GET_PRIVATE(object);
+	GigoloSettingsPrivate *priv = gigolo_settings_get_instance_private(GIGOLO_SETTINGS(object));
 
 	switch (prop_id)
 	{
@@ -157,7 +154,7 @@ static void gigolo_settings_set_property(GObject *object, guint prop_id, const G
 
 static void gigolo_settings_get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
 {
-	GigoloSettingsPrivate *priv = GIGOLO_SETTINGS_GET_PRIVATE(object);
+	GigoloSettingsPrivate *priv = gigolo_settings_get_instance_private(GIGOLO_SETTINGS(object));
 
 	switch (prop_id)
 	{
@@ -219,8 +216,6 @@ static void gigolo_settings_class_init(GigoloSettingsClass *klass)
 	gobject_class->get_property = gigolo_settings_get_property;
 	gobject_class->set_property = gigolo_settings_set_property;
 
-	g_type_class_add_private(klass, sizeof(GigoloSettingsPrivate));
-
 	g_object_class_install_property(gobject_class,
 									PROP_SAVE_GEOMETRY,
 									g_param_spec_boolean(
@@ -454,7 +449,7 @@ static void write_data(GKeyFile *k, const gchar *filename)
 static void write_settings_config(GigoloSettings *settings)
 {
 	GKeyFile *k;
-	GigoloSettingsPrivate *priv = GIGOLO_SETTINGS_GET_PRIVATE(settings);
+	GigoloSettingsPrivate *priv = gigolo_settings_get_instance_private(settings);
 
 	if (! g_file_test(priv->config_path, G_FILE_TEST_IS_DIR))
 		g_mkdir_with_parents(priv->config_path, 0700);
@@ -494,7 +489,7 @@ static void write_settings_bookmarks(GigoloSettings *settings)
 	gsize i;
 	GigoloBookmark *bm;
 	GigoloBookmarkList *bml;
-	GigoloSettingsPrivate *priv = GIGOLO_SETTINGS_GET_PRIVATE(settings);
+	GigoloSettingsPrivate *priv = gigolo_settings_get_instance_private(settings);
 
 	if (! g_file_test(priv->config_path, G_FILE_TEST_IS_DIR))
 		g_mkdir_with_parents(priv->config_path, 0700);
@@ -540,7 +535,7 @@ void gigolo_settings_write(GigoloSettings *settings, GigoloSettingsFlags flags)
 
 static void gigolo_settings_finalize(GObject* object)
 {
-	GigoloSettingsPrivate *priv = GIGOLO_SETTINGS_GET_PRIVATE(object);
+	GigoloSettingsPrivate *priv = gigolo_settings_get_instance_private(GIGOLO_SETTINGS(object));
 
 	gigolo_settings_write(GIGOLO_SETTINGS(object),
 		GIGOLO_SETTINGS_PREFERENCES | GIGOLO_SETTINGS_BOOKMARKS);
@@ -712,7 +707,7 @@ static void check_for_old_dir(GigoloSettingsPrivate *priv)
 
 static void gigolo_settings_init(GigoloSettings *self)
 {
-	GigoloSettingsPrivate *priv = GIGOLO_SETTINGS_GET_PRIVATE(self);
+	GigoloSettingsPrivate *priv = gigolo_settings_get_instance_private(self);
 
 	priv->config_path = g_build_filename(g_get_user_config_dir(), PACKAGE, NULL);
 	priv->config_filename = g_build_filename(priv->config_path, "config", NULL);
@@ -735,9 +730,13 @@ GigoloSettings *gigolo_settings_new(void)
 
 const gint *gigolo_settings_get_geometry(GigoloSettings *settings)
 {
+	GigoloSettingsPrivate *priv;
+
 	g_return_val_if_fail(settings != NULL, NULL);
 
-	return GIGOLO_SETTINGS_GET_PRIVATE(settings)->geometry;
+	priv = gigolo_settings_get_instance_private(settings);
+
+	return priv->geometry;
 }
 
 
@@ -750,7 +749,7 @@ void gigolo_settings_set_geometry(GigoloSettings *settings, const gint *geometry
 	g_return_if_fail(geometry != NULL);
 	g_return_if_fail(len > 0);
 
-	priv = GIGOLO_SETTINGS_GET_PRIVATE(settings);
+	priv = gigolo_settings_get_instance_private(settings);
 
 	g_free(priv->geometry);
 	priv->geometry = g_new(gint, len);
@@ -764,9 +763,13 @@ void gigolo_settings_set_geometry(GigoloSettings *settings, const gint *geometry
 
 GigoloBookmarkList *gigolo_settings_get_bookmarks(GigoloSettings *settings)
 {
+	GigoloSettingsPrivate *priv;
+
 	g_return_val_if_fail(settings != NULL, NULL);
 
-	return GIGOLO_SETTINGS_GET_PRIVATE(settings)->bookmarks;
+	priv = gigolo_settings_get_instance_private(settings);
+
+	return priv->bookmarks;
 }
 
 
@@ -815,7 +818,7 @@ gboolean gigolo_settings_has_file_manager(GigoloSettings *settings)
 
 	g_return_val_if_fail(settings != NULL, FALSE);
 
-	priv = GIGOLO_SETTINGS_GET_PRIVATE(settings);
+	priv = gigolo_settings_get_instance_private(settings);
 
 	return NZV(priv->file_manager);
 }
@@ -827,7 +830,7 @@ gboolean gigolo_settings_has_terminal(GigoloSettings *settings)
 
 	g_return_val_if_fail(settings != NULL, FALSE);
 
-	priv = GIGOLO_SETTINGS_GET_PRIVATE(settings);
+	priv = gigolo_settings_get_instance_private(settings);
 
 	return NZV(priv->terminal);
 }
diff --git a/src/window.c b/src/window.c
index 7b623b3..f4b5304 100644
--- a/src/window.c
+++ b/src/window.c
@@ -42,9 +42,6 @@
 
 typedef struct _GigoloWindowPrivate			GigoloWindowPrivate;
 
-#define GIGOLO_WINDOW_GET_PRIVATE(obj)		(G_TYPE_INSTANCE_GET_PRIVATE((obj),\
-		GIGOLO_WINDOW_TYPE, GigoloWindowPrivate))
-
 /* Returns: TRUE if @a ptr points to a non-zero value. */
 #define NZV(ptr) \
 	((ptr) && (ptr)[0])
@@ -100,12 +97,12 @@ enum
 };
 
 
-G_DEFINE_TYPE(GigoloWindow, gigolo_window, GTK_TYPE_WINDOW);
+G_DEFINE_TYPE_WITH_PRIVATE(GigoloWindow, gigolo_window, GTK_TYPE_WINDOW);
 
 
 static void remove_autoconnect_timeout(GigoloWindow *window)
 {
-	GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 
 	if (priv->autoconnect_timeout_id != (guint) -1)
 	{
@@ -117,7 +114,7 @@ static void remove_autoconnect_timeout(GigoloWindow *window)
 
 static void gigolo_window_destroy(GigoloWindow *window)
 {
-	GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 	gint geo[5];
 
 	remove_autoconnect_timeout(window);
@@ -159,7 +156,7 @@ static void gigolo_window_destroy(GigoloWindow *window)
 
 static gboolean gigolo_window_delete_event(GtkWidget *widget, G_GNUC_UNUSED GdkEventAny *event)
 {
-	GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(widget);
+	GigoloWindowPrivate *priv = gigolo_window_get_instance_private(GIGOLO_WINDOW(widget));
 
 	if (gigolo_settings_get_boolean(priv->settings, "show-in-systray"))
 	{
@@ -178,8 +175,6 @@ static void gigolo_window_class_init(GigoloWindowClass *klass)
 {
 	GtkWidgetClass *gtkwidget_class = GTK_WIDGET_CLASS(klass);
 	gtkwidget_class->delete_event = gigolo_window_delete_event;
-
-	g_type_class_add_private(klass, sizeof(GigoloWindowPrivate));
 }
 
 
@@ -198,7 +193,7 @@ static void systray_icon_activate_cb(G_GNUC_UNUSED GtkStatusIcon *status_icon, G
 static void systray_icon_popup_menu_cb(G_GNUC_UNUSED GtkStatusIcon *status_icon, guint button,
 								   guint activate_time, GigoloWindow *window)
 {
-	GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 
 	if (button == 3)
 		gtk_menu_popup_at_pointer (GTK_MENU(priv->systray_icon_popup_menu),
@@ -210,7 +205,7 @@ static void systray_icon_popup_menu_cb(G_GNUC_UNUSED GtkStatusIcon *status_icon,
  * whichever is currently used for display. */
 static void get_selected_iter(GigoloWindow *window, GtkTreeIter *iter)
 {
-	GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 
 	g_return_if_fail(window != NULL);
 	g_return_if_fail(iter != NULL);
@@ -247,7 +242,7 @@ void gigolo_window_mount_from_bookmark(GigoloWindow *window, GigoloBookmark *boo
 	g_return_if_fail(window != NULL);
 	g_return_if_fail(bookmark != NULL);
 
-	priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	priv = gigolo_window_get_instance_private(window);
 
 	uri = gigolo_bookmark_get_uri_escaped(bookmark);
 
@@ -277,7 +272,7 @@ void gigolo_window_mount_from_bookmark(GigoloWindow *window, GigoloBookmark *boo
 
 static void action_mount_cb(G_GNUC_UNUSED GtkAction *action, GigoloWindow *window)
 {
-	GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 	GtkTreeIter iter;
 	GtkTreeModel *model = GTK_TREE_MODEL(priv->store);
 	gpointer vol;
@@ -319,7 +314,7 @@ static void action_mount_cb(G_GNUC_UNUSED GtkAction *action, GigoloWindow *windo
 static void action_preferences_cb(G_GNUC_UNUSED GtkAction *action, GigoloWindow *window)
 {
 	GtkWidget *dialog;
-	GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 
 	dialog = gigolo_preferences_dialog_new(GTK_WINDOW(window), priv->settings);
 
@@ -333,7 +328,7 @@ static void action_preferences_cb(G_GNUC_UNUSED GtkAction *action, GigoloWindow
 
 static void action_toggle_view_cb(GtkToggleAction *action, GigoloWindow *window)
 {
-	GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 	gboolean active = gtk_toggle_action_get_active(action);
 	const gchar *property = NULL;
 
@@ -352,7 +347,7 @@ static void action_toggle_view_cb(GtkToggleAction *action, GigoloWindow *window)
 static void action_view_mode_change_cb(G_GNUC_UNUSED GtkRadioAction *action,
 									   GtkRadioAction *current, GigoloWindow *window)
 {
-	GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 	gint mode = gtk_radio_action_get_current_value(current);
 
 	g_object_set(priv->settings, "view-mode", mode, NULL);
@@ -361,7 +356,7 @@ static void action_view_mode_change_cb(G_GNUC_UNUSED GtkRadioAction *action,
 
 static void action_unmount_cb(G_GNUC_UNUSED GtkAction *action, GigoloWindow *window)
 {
-	GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 	GtkTreeIter iter;
 	GigoloBookmark *bm;
 
@@ -399,7 +394,7 @@ static void action_quit_cb(G_GNUC_UNUSED GtkAction *action, GigoloWindow *window
 static void action_bookmark_edit_cb(G_GNUC_UNUSED GtkAction *action, GigoloWindow *window)
 {
 	GtkWidget *dialog;
-	GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 
 	dialog = gigolo_bookmark_dialog_new(window);
 
@@ -480,7 +475,7 @@ static void action_supported_schemes_cb(G_GNUC_UNUSED GtkAction *action, GigoloW
 
 static void action_copy_uri_cb(G_GNUC_UNUSED GtkAction *action, GigoloWindow *window)
 {
-	GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 	GtkTreeIter iter;
 	GtkTreeModel *model = GTK_TREE_MODEL(priv->store);
 
@@ -515,7 +510,7 @@ static void action_copy_uri_cb(G_GNUC_UNUSED GtkAction *action, GigoloWindow *wi
 
 static gpointer get_selected_mount(GigoloWindow *window)
 {
-	GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 	GtkTreeIter iter;
 	GtkTreeModel *model = GTK_TREE_MODEL(priv->store);
 
@@ -535,7 +530,7 @@ static gpointer get_selected_mount(GigoloWindow *window)
 
 static void action_open_cb(G_GNUC_UNUSED GtkAction *action, GigoloWindow *window)
 {
-	GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 	gpointer mnt;
 
 	if (! gigolo_settings_has_file_manager(priv->settings))
@@ -582,7 +577,7 @@ static void action_open_cb(G_GNUC_UNUSED GtkAction *action, GigoloWindow *window
 
 static void action_open_terminal_cb(G_GNUC_UNUSED GtkAction *action, GigoloWindow *window)
 {
-	GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 	gpointer mnt;
 
 	if (! gigolo_settings_has_terminal(priv->settings))
@@ -657,7 +652,7 @@ static gboolean iter_is_bookmark(GigoloWindow *window, GtkTreeModel *model, GtkT
 	{
 		gchar *uri;
 		gboolean found = FALSE;
-		GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+		GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 
 		gigolo_backend_gvfs_get_name_and_uri_from_mount(ref, NULL, &uri);
 
@@ -700,7 +695,7 @@ static void update_create_edit_bookmark_action_label(GtkAction *action, gboolean
 
 static void update_sensitive_buttons(GigoloWindow *window, GtkTreeModel *model, GtkTreeIter *iter)
 {
-	GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 	gint ref_type;
 	gboolean is_bookmark,is_mount, open_possible, open_terminal_possible;
 
@@ -735,7 +730,7 @@ static void tree_selection_changed_cb(GtkTreeSelection *selection, GigoloWindow
 {
 	GtkTreeIter iter;
 	GtkTreeModel *model;
-	GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 
 	if (selection == NULL)
 		selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(priv->treeview));
@@ -767,7 +762,7 @@ static void iconview_selection_changed_cb(GtkIconView *view, GigoloWindow *windo
 
 static void mounts_changed_cb(G_GNUC_UNUSED GigoloBackendGVFS *backend, GigoloWindow *window)
 {
-	GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 	gint view_mode = gigolo_settings_get_integer(priv->settings, "view-mode");
 
 	if (view_mode == VIEW_MODE_ICONVIEW)
@@ -793,7 +788,7 @@ static void tree_row_activated_cb(G_GNUC_UNUSED GtkTreeView *treeview, GtkTreePa
 {
 	GtkTreeIter iter;
 	gint ref_type;
-	GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 
 	if (gtk_tree_model_get_iter(GTK_TREE_MODEL(priv->store), &iter, path))
 	{
@@ -823,7 +818,7 @@ static gboolean tree_button_press_event_cb(G_GNUC_UNUSED GtkWidget *widget,
 {
 	if (event->button == 3)
 	{
-		GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+		GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 		GtkTreeSelection *treesel = gtk_tree_view_get_selection(GTK_TREE_VIEW(priv->treeview));
 		gboolean have_sel = (gtk_tree_selection_count_selected_rows(treesel) > 0);
 
@@ -857,7 +852,7 @@ static gboolean iconview_button_press_event_cb(GtkWidget *widget, GdkEventButton
 {
 	if (event->button == 3)
 	{
-		GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+		GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 		GList *items;
 		gboolean have_sel;
 
@@ -898,7 +893,7 @@ static gint sort_bookmarks(gconstpointer a, gconstpointer b)
 
 void gigolo_window_update_bookmarks(GigoloWindow *window)
 {
-	GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 	GigoloBookmarkList *bookmarks = gigolo_settings_get_bookmarks(priv->settings);
 
 	/* sort the bookmarks */
@@ -918,7 +913,7 @@ void gigolo_window_update_bookmarks(GigoloWindow *window)
 gboolean gigolo_window_do_autoconnect(gpointer data)
 {
 	GigoloWindow *window = GIGOLO_WINDOW(data);
-	GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 	GigoloBookmarkList *bookmarks = gigolo_settings_get_bookmarks(priv->settings);
 	static gint old_interval = -1;
 	gint interval;
@@ -957,7 +952,7 @@ gboolean gigolo_window_do_autoconnect(gpointer data)
 
 static void action_create_bookmark_cb(G_GNUC_UNUSED GtkAction *button, GigoloWindow *window)
 {
-	GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 	GtkTreeIter iter;
 	GtkTreeModel *model = GTK_TREE_MODEL(priv->store);
 
@@ -1025,7 +1020,7 @@ static void action_create_bookmark_cb(G_GNUC_UNUSED GtkAction *button, GigoloWin
 
 static void gigolo_window_show_side_panel(GigoloWindow *window, gboolean show)
 {
-	GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 
 	if (show)
 		gtk_widget_show(priv->hbox_pane);
@@ -1036,7 +1031,7 @@ static void gigolo_window_show_side_panel(GigoloWindow *window, gboolean show)
 
 static void gigolo_window_show_systray_icon(GigoloWindow *window, gboolean show)
 {
-	GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 
 	G_GNUC_BEGIN_IGNORE_DEPRECATIONS /* Gtk 3.14 */
 	gtk_status_icon_set_visible(priv->systray_icon, show);
@@ -1046,7 +1041,7 @@ static void gigolo_window_show_systray_icon(GigoloWindow *window, gboolean show)
 
 static void gigolo_window_show_toolbar(GigoloWindow *window, gboolean show)
 {
-	GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 
 	if (show)
 		gtk_widget_show(priv->toolbar);
@@ -1057,7 +1052,7 @@ static void gigolo_window_show_toolbar(GigoloWindow *window, gboolean show)
 
 static void gigolo_window_set_toolbar_style(GigoloWindow *window, gint style)
 {
-	GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 	if (style == -1)
 	{
 		g_object_get(gtk_widget_get_settings(GTK_WIDGET(window)), "gtk-toolbar-style", &style, NULL);
@@ -1072,7 +1067,7 @@ static void gigolo_window_set_toolbar_style(GigoloWindow *window, gint style)
 
 static void gigolo_window_set_toolbar_orientation(GigoloWindow *window, gint orientation)
 {
-	GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 
 	gtk_orientable_set_orientation(GTK_ORIENTABLE(priv->toolbar), orientation);
 	if (orientation == GTK_ORIENTATION_HORIZONTAL && priv->vbox != gtk_widget_get_parent(priv->toolbar))
@@ -1093,7 +1088,7 @@ static void gigolo_window_set_toolbar_orientation(GigoloWindow *window, gint ori
 
 static void gigolo_window_set_view_mode(GigoloWindow *window, gint mode)
 {
-	GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 
 	if (mode == VIEW_MODE_ICONVIEW && priv->hbox_view != gtk_widget_get_parent(priv->swin_iconview))
 	{
@@ -1112,7 +1107,7 @@ static void gigolo_window_set_view_mode(GigoloWindow *window, gint mode)
 
 static void toggle_action_set_active(GigoloWindow *window, const gchar *name, gboolean set)
 {
-	GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 	GtkAction *action = gtk_action_group_get_action(priv->action_group, name);
 
 	gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), set);
@@ -1121,7 +1116,7 @@ static void toggle_action_set_active(GigoloWindow *window, const gchar *name, gb
 
 static void view_mode_action_set_active(GigoloWindow *window, gint val)
 {
-	GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 	GtkAction *action = gtk_action_group_get_action(priv->action_group, "ViewSymbols");
 
 	gtk_radio_action_set_current_value(GTK_RADIO_ACTION(action), val);
@@ -1314,7 +1309,7 @@ static void create_ui_elements(GigoloWindow *window, GtkUIManager *ui_manager)
 	};
 	const guint radio_entries_n = G_N_ELEMENTS(radio_entries);
 	GError *error = NULL;
-	GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 	GtkAction *open_terminal;
 	GtkIconTheme *icon_theme;
 
@@ -1353,7 +1348,7 @@ static void create_ui_elements(GigoloWindow *window, GtkUIManager *ui_manager)
 
 static void tree_mounted_col_toggled_cb(GtkCellRendererToggle *cell, gchar *pth, GigoloWindow *window)
 {
-	GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 	GtkTreeSelection *selection;
 	GtkTreePath *path;
 
@@ -1373,7 +1368,7 @@ static void tree_mounted_col_toggled_cb(GtkCellRendererToggle *cell, gchar *pth,
 
 static void create_tree_view(GigoloWindow *window)
 {
-	GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 	GtkCellRenderer *renderer;
 	GtkTreeViewColumn *column;
 	GtkTreeSelection *sel;
@@ -1435,7 +1430,7 @@ static void create_tree_view(GigoloWindow *window)
 
 static void create_icon_view(GigoloWindow *window)
 {
-	GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 	GtkCellRenderer *renderer;
 
 	priv->iconview = gtk_icon_view_new();
@@ -1480,7 +1475,7 @@ static void create_icon_view(GigoloWindow *window)
 static GtkWidget *gigolo_window_create_panel(GigoloWindow *window)
 {
 	GtkWidget *panel_pane, *label;
-	GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 
 	panel_pane = gtk_paned_new(GTK_ORIENTATION_HORIZONTAL);
 	gtk_paned_set_position(GTK_PANED(panel_pane), 200);
@@ -1518,7 +1513,7 @@ static GtkWidget *gigolo_window_create_panel(GigoloWindow *window)
 
 static void update_side_panel(GigoloWindow *window)
 {
-	GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 	guint panel_position;
 
 	if (! gigolo_backend_gvfs_is_scheme_supported("smb"))
@@ -1541,7 +1536,7 @@ static void gigolo_window_init(GigoloWindow *window)
 {
 	GtkWidget *menubar, *panel_pane;
 	GtkUIManager *ui_manager;
-	GigoloWindowPrivate *priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	GigoloWindowPrivate *priv = gigolo_window_get_instance_private(window);
 
 	priv->autoconnect_timeout_id = (guint) -1;
 
@@ -1643,7 +1638,7 @@ GtkWidget *gigolo_window_new(GigoloSettings *settings)
 	gint value;
 
 	window = g_object_new(GIGOLO_WINDOW_TYPE, NULL);
-	priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	priv = gigolo_window_get_instance_private(GIGOLO_WINDOW(window));
 	priv->settings = settings;
 	g_signal_connect(settings, "notify", G_CALLBACK(gigolo_window_settings_notify_cb), window);
 
@@ -1699,7 +1694,7 @@ GigoloSettings *gigolo_window_get_settings(GigoloWindow *window)
 
 	g_return_val_if_fail(window != NULL, NULL);
 
-	priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	priv = gigolo_window_get_instance_private(window);
 
 	return priv->settings;
 }
@@ -1711,7 +1706,7 @@ GigoloBackendGVFS *gigolo_window_get_backend(GigoloWindow *window)
 
 	g_return_val_if_fail(window != NULL, NULL);
 
-	priv = GIGOLO_WINDOW_GET_PRIVATE(window);
+	priv = gigolo_window_get_instance_private(window);
 
 	return priv->backend_gvfs;
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list