summaryrefslogtreecommitdiff
path: root/capplets/common/file-transfer-dialog.c
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2019-05-14 13:38:31 +0800
committerraveit65 <[email protected]>2019-05-16 11:46:52 +0200
commit41c52ce3cc475c042f7e63b37e3d8db26db8d907 (patch)
treebb280d9558b045bb518e26c13b09f668df04c8f1 /capplets/common/file-transfer-dialog.c
parent4a3d516c04e1c87e89e6ac5015c8ace0575729cd (diff)
downloadmate-control-center-41c52ce3cc475c042f7e63b37e3d8db26db8d907.tar.bz2
mate-control-center-41c52ce3cc475c042f7e63b37e3d8db26db8d907.tar.xz
file-transfer-dialog.c: avoid deprecated 'g_type_class_add_private'
Diffstat (limited to 'capplets/common/file-transfer-dialog.c')
-rw-r--r--capplets/common/file-transfer-dialog.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/capplets/common/file-transfer-dialog.c b/capplets/common/file-transfer-dialog.c
index dc6a924d..4536e071 100644
--- a/capplets/common/file-transfer-dialog.c
+++ b/capplets/common/file-transfer-dialog.c
@@ -61,8 +61,6 @@ struct _FileTransferDialogPrivate
GCancellable *cancellable;
};
-#define FILE_TRANSFER_DIALOG_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), file_transfer_dialog_get_type (), FileTransferDialogPrivate))
-
typedef struct _FileTransferJob
{
FileTransferDialog *dialog;
@@ -85,7 +83,7 @@ typedef struct {
GtkDialog *overwrite_dialog;
} FileTransferData;
-G_DEFINE_TYPE (FileTransferDialog, file_transfer_dialog, GTK_TYPE_DIALOG)
+G_DEFINE_TYPE_WITH_PRIVATE (FileTransferDialog, file_transfer_dialog, GTK_TYPE_DIALOG)
static void
file_transfer_dialog_update_num_files (FileTransferDialog *dlg)
@@ -282,8 +280,6 @@ file_transfer_dialog_class_init (FileTransferDialogClass *klass)
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
-
- g_type_class_add_private (klass, sizeof (FileTransferDialogPrivate));
}
static void
@@ -296,7 +292,7 @@ file_transfer_dialog_init (FileTransferDialog *dlg)
GtkWidget *content_area;
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dlg));
- dlg->priv = FILE_TRANSFER_DIALOG_GET_PRIVATE (dlg);
+ dlg->priv = file_transfer_dialog_get_instance_private (dlg);
dlg->priv->cancellable = g_cancellable_new ();
gtk_container_set_border_width (GTK_CONTAINER (content_area), 4);