Skip to content
Permalink
Browse files

Avoid deprecated g_type_class_add_private under libcaja-private

Changed CajaClipboardMonitor, CajaColumnChooser and CajaDesktopIconFile
  • Loading branch information...
yetist authored and raveit65 committed Jan 26, 2019
1 parent 4196136 commit 9cd63d4532ec29f9ed133e4f6d8ae07b241de416
@@ -53,15 +53,15 @@ enum
LAST_SIGNAL
};

struct CajaClipboardMonitorDetails
struct _CajaClipboardMonitorPrivate
{
CajaClipboardInfo *info;
};

static guint signals[LAST_SIGNAL] = { 0 };
static GdkAtom copied_files_atom;

G_DEFINE_TYPE (CajaClipboardMonitor, caja_clipboard_monitor, G_TYPE_OBJECT);
G_DEFINE_TYPE_WITH_PRIVATE (CajaClipboardMonitor, caja_clipboard_monitor, G_TYPE_OBJECT);

static CajaClipboardMonitor *clipboard_monitor = NULL;

@@ -141,9 +141,7 @@ caja_clipboard_info_free (CajaClipboardInfo *info)
static void
caja_clipboard_monitor_init (CajaClipboardMonitor *monitor)
{
monitor->details =
G_TYPE_INSTANCE_GET_PRIVATE (monitor, CAJA_TYPE_CLIPBOARD_MONITOR,
CajaClipboardMonitorDetails);
monitor->details = caja_clipboard_monitor_get_instance_private (monitor);
}

static void
@@ -189,8 +187,6 @@ caja_clipboard_monitor_class_init (CajaClipboardMonitorClass *klass)
g_cclosure_marshal_VOID__POINTER,
G_TYPE_NONE,
1, G_TYPE_POINTER);

g_type_class_add_private (klass, sizeof (CajaClipboardMonitorDetails));
}

void
@@ -39,14 +39,14 @@
#define CAJA_CLIPBOARD_MONITOR_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), CAJA_TYPE_CLIPBOARD_MONITOR, CajaClipboardMonitorClass))

typedef struct CajaClipboardMonitorDetails CajaClipboardMonitorDetails;
typedef struct _CajaClipboardMonitorPrivate CajaClipboardMonitorPrivate;
typedef struct CajaClipboardInfo CajaClipboardInfo;

typedef struct
{
GObject parent_slot;

CajaClipboardMonitorDetails *details;
CajaClipboardMonitorPrivate *details;
} CajaClipboardMonitor;

typedef struct
@@ -31,7 +31,7 @@

#include "caja-column-utilities.h"

struct _CajaColumnChooserDetails
struct _CajaColumnChooserPrivate
{
GtkTreeView *view;
GtkListStore *store;
@@ -65,7 +65,7 @@ enum
};
static guint signals[LAST_SIGNAL] = { 0 };

G_DEFINE_TYPE(CajaColumnChooser, caja_column_chooser, GTK_TYPE_BOX);
G_DEFINE_TYPE_WITH_PRIVATE (CajaColumnChooser, caja_column_chooser, GTK_TYPE_BOX);

static void caja_column_chooser_constructed (GObject *object);

@@ -128,8 +128,6 @@ caja_column_chooser_class_init (CajaColumnChooserClass *chooser_class)
CAJA_TYPE_FILE,
G_PARAM_CONSTRUCT_ONLY |
G_PARAM_WRITABLE));

g_type_class_add_private (chooser_class, sizeof (CajaColumnChooserDetails));
}

static void
@@ -463,7 +461,7 @@ caja_column_chooser_constructed (GObject *object)
static void
caja_column_chooser_init (CajaColumnChooser *chooser)
{
chooser->details = G_TYPE_INSTANCE_GET_PRIVATE ((chooser), CAJA_TYPE_COLUMN_CHOOSER, CajaColumnChooserDetails);
chooser->details = caja_column_chooser_get_instance_private (chooser);

g_object_set (G_OBJECT (chooser),
"homogeneous", FALSE,
@@ -40,13 +40,13 @@
#define CAJA_COLUMN_CHOOSER_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), CAJA_TYPE_COLUMN_CHOOSER, CajaColumnChooserClass))

typedef struct _CajaColumnChooserDetails CajaColumnChooserDetails;
typedef struct _CajaColumnChooserPrivate CajaColumnChooserPrivate;

typedef struct
{
GtkBox parent;

CajaColumnChooserDetails *details;
CajaColumnChooserPrivate *details;
} CajaColumnChooser;

typedef struct
@@ -40,12 +40,12 @@
#include <string.h>
#include <gio/gio.h>

struct CajaDesktopIconFileDetails
struct _CajaDesktopIconFilePrivate
{
CajaDesktopLink *link;
};

G_DEFINE_TYPE(CajaDesktopIconFile, caja_desktop_icon_file, CAJA_TYPE_FILE)
G_DEFINE_TYPE_WITH_PRIVATE (CajaDesktopIconFile, caja_desktop_icon_file, CAJA_TYPE_FILE)


static void
@@ -166,9 +166,7 @@ desktop_icon_file_get_where_string (CajaFile *file)
static void
caja_desktop_icon_file_init (CajaDesktopIconFile *desktop_file)
{
desktop_file->details = G_TYPE_INSTANCE_GET_PRIVATE (desktop_file,
CAJA_TYPE_DESKTOP_ICON_FILE,
CajaDesktopIconFileDetails);
desktop_file->details = caja_desktop_icon_file_get_instance_private (desktop_file);
}

static void
@@ -384,10 +382,8 @@ caja_desktop_icon_file_set_metadata_as_list (CajaFile *file,
static void
caja_desktop_icon_file_class_init (CajaDesktopIconFileClass *klass)
{
GObjectClass *object_class;
CajaFileClass *file_class;

object_class = G_OBJECT_CLASS (klass);
file_class = CAJA_FILE_CLASS (klass);

file_class->default_file_type = G_FILE_TYPE_DIRECTORY;
@@ -405,6 +401,4 @@ caja_desktop_icon_file_class_init (CajaDesktopIconFileClass *klass)
file_class->set_metadata_as_list = caja_desktop_icon_file_set_metadata_as_list;
file_class->unmount = caja_desktop_icon_file_unmount;
file_class->eject = caja_desktop_icon_file_eject;

g_type_class_add_private (object_class, sizeof(CajaDesktopIconFileDetails));
}
@@ -41,12 +41,12 @@
#define CAJA_DESKTOP_ICON_FILE_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), CAJA_TYPE_DESKTOP_ICON_FILE, CajaDesktopIconFileClass))

typedef struct CajaDesktopIconFileDetails CajaDesktopIconFileDetails;
typedef struct _CajaDesktopIconFilePrivate CajaDesktopIconFilePrivate;

typedef struct
{
CajaFile parent_slot;
CajaDesktopIconFileDetails *details;
CajaDesktopIconFilePrivate *details;
} CajaDesktopIconFile;

typedef struct

0 comments on commit 9cd63d4

Please sign in to comment.
You can’t perform that action at this time.