Skip to content
Permalink
Browse files

Avoid deprecated g_type_class_add_private under src

Changed CajaConnectServerOperation, CajaDesktopWindow and CajaImagePropertiesPage
  • Loading branch information...
yetist authored and raveit65 committed Jan 26, 2019
1 parent 328d820 commit 419613671dcf6ec55d8dc49f7bbbb9d11c19d54c
@@ -28,18 +28,18 @@

#include "caja-connect-server-dialog.h"

G_DEFINE_TYPE (CajaConnectServerOperation,
caja_connect_server_operation, GTK_TYPE_MOUNT_OPERATION);

enum {
PROP_DIALOG = 1,
NUM_PROPERTIES
};

struct _CajaConnectServerOperationDetails {
struct _CajaConnectServerOperationPrivate {
CajaConnectServerDialog *dialog;
};

G_DEFINE_TYPE_WITH_PRIVATE (CajaConnectServerOperation,
caja_connect_server_operation, GTK_TYPE_MOUNT_OPERATION);

static void
fill_details_async_cb (GObject *source,
GAsyncResult *result,
@@ -119,16 +119,12 @@ caja_connect_server_operation_class_init (CajaConnectServerOperationClass *klass
CAJA_TYPE_CONNECT_SERVER_DIALOG,
G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (object_class, PROP_DIALOG, pspec);

g_type_class_add_private (klass, sizeof (CajaConnectServerOperationDetails));
}

static void
caja_connect_server_operation_init (CajaConnectServerOperation *self)
{
self->details = G_TYPE_INSTANCE_GET_PRIVATE (self,
CAJA_TYPE_CONNECT_SERVER_OPERATION,
CajaConnectServerOperationDetails);
self->details = caja_connect_server_operation_get_instance_private (self);
}

GMountOperation *
@@ -42,12 +42,12 @@
#define CAJA_IS_CONNECT_SERVER_OPERATION(obj)\
(G_TYPE_INSTANCE_CHECK_TYPE ((obj), CAJA_TYPE_CONNECT_SERVER_OPERATION)

typedef struct _CajaConnectServerOperationDetails
CajaConnectServerOperationDetails;
typedef struct _CajaConnectServerOperationPrivate
CajaConnectServerOperationPrivate;

typedef struct {
GtkMountOperation parent;
CajaConnectServerOperationDetails *details;
CajaConnectServerOperationPrivate *details;
} CajaConnectServerOperation;

typedef struct {
@@ -72,14 +72,14 @@ caja_desktop_window_accessible_class_init (CajaDesktopWindowAccessibleClass *kla
aclass->get_attributes = desktop_get_attributes;
}

struct CajaDesktopWindowDetails
struct _CajaDesktopWindowPrivate
{
gulong size_changed_id;

gboolean loaded;
};

G_DEFINE_TYPE (CajaDesktopWindow, caja_desktop_window,
G_DEFINE_TYPE_WITH_PRIVATE (CajaDesktopWindow, caja_desktop_window,
CAJA_TYPE_SPATIAL_WINDOW);

static void
@@ -88,8 +88,7 @@ caja_desktop_window_init (CajaDesktopWindow *window)
GtkAction *action;
AtkObject *accessible;

window->details = G_TYPE_INSTANCE_GET_PRIVATE (window, CAJA_TYPE_DESKTOP_WINDOW,
CajaDesktopWindowDetails);
window->details = caja_desktop_window_get_instance_private (window);

GtkStyleContext *context;

@@ -222,7 +221,7 @@ static void
unrealize (GtkWidget *widget)
{
CajaDesktopWindow *window;
CajaDesktopWindowDetails *details;
CajaDesktopWindowPrivate *details;
GdkWindow *root_window;

window = CAJA_DESKTOP_WINDOW (widget);
@@ -280,7 +279,7 @@ static void
realize (GtkWidget *widget)
{
CajaDesktopWindow *window;
CajaDesktopWindowDetails *details;
CajaDesktopWindowPrivate *details;
window = CAJA_DESKTOP_WINDOW (widget);
details = window->details;

@@ -339,8 +338,6 @@ caja_desktop_window_class_init (CajaDesktopWindowClass *klass)
nclass->window_type = CAJA_WINDOW_DESKTOP;
nclass->get_title = real_get_title;
nclass->get_icon = real_get_icon;

g_type_class_add_private (klass, sizeof (CajaDesktopWindowDetails));
}

gboolean
@@ -46,12 +46,12 @@
#define CAJA_DESKTOP_WINDOW_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), CAJA_TYPE_DESKTOP_WINDOW, CajaDesktopWindowClass))

typedef struct CajaDesktopWindowDetails CajaDesktopWindowDetails;
typedef struct _CajaDesktopWindowPrivate CajaDesktopWindowPrivate;

typedef struct
{
CajaSpatialWindow parent_spot;
CajaDesktopWindowDetails *details;
CajaDesktopWindowPrivate *details;
gboolean affect_desktop_on_next_location_change;
} CajaDesktopWindow;

@@ -46,7 +46,7 @@

#define LOAD_BUFFER_SIZE 8192

struct CajaImagePropertiesPageDetails
struct _CajaImagePropertiesPagePrivate
{
GCancellable *cancellable;
GtkWidget *vbox;
@@ -93,7 +93,7 @@ typedef struct
static GType caja_image_properties_page_provider_get_type (void);
static void property_page_provider_iface_init (CajaPropertyPageProviderIface *iface);

G_DEFINE_TYPE (CajaImagePropertiesPage, caja_image_properties_page, GTK_TYPE_BOX);
G_DEFINE_TYPE_WITH_PRIVATE (CajaImagePropertiesPage, caja_image_properties_page, GTK_TYPE_BOX);

G_DEFINE_TYPE_WITH_CODE (CajaImagePropertiesPageProvider, caja_image_properties_page_provider, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (CAJA_TYPE_PROPERTY_PAGE_PROVIDER,
@@ -635,16 +635,12 @@ caja_image_properties_page_class_init (CajaImagePropertiesPageClass *class)
object_class = G_OBJECT_CLASS (class);

object_class->finalize = caja_image_properties_page_finalize;

g_type_class_add_private (object_class, sizeof(CajaImagePropertiesPageDetails));
}

static void
caja_image_properties_page_init (CajaImagePropertiesPage *page)
{
page->details = G_TYPE_INSTANCE_GET_PRIVATE (page,
CAJA_TYPE_IMAGE_PROPERTIES_PAGE,
CajaImagePropertiesPageDetails);
page->details = caja_image_properties_page_get_instance_private (page);

gtk_orientable_set_orientation (GTK_ORIENTABLE (page), GTK_ORIENTATION_VERTICAL);

@@ -26,6 +26,8 @@

#include <gtk/gtk.h>

G_BEGIN_DECLS

#define CAJA_TYPE_IMAGE_PROPERTIES_PAGE caja_image_properties_page_get_type()
#define CAJA_IMAGE_PROPERTIES_PAGE(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), CAJA_TYPE_IMAGE_PROPERTIES_PAGE, CajaImagePropertiesPage))
@@ -38,12 +40,12 @@
#define CAJA_IMAGE_PROPERTIES_PAGE_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), CAJA_TYPE_IMAGE_PROPERTIES_PAGE, CajaImagePropertiesPageClass))

typedef struct CajaImagePropertiesPageDetails CajaImagePropertiesPageDetails;
typedef struct _CajaImagePropertiesPagePrivate CajaImagePropertiesPagePrivate;

typedef struct
{
GtkBox parent;
CajaImagePropertiesPageDetails *details;
CajaImagePropertiesPagePrivate *details;
} CajaImagePropertiesPage;

typedef struct
@@ -54,4 +56,6 @@ typedef struct
GType caja_image_properties_page_get_type (void);
void caja_image_properties_page_register (void);

G_END_DECLS

#endif /* CAJA_IMAGE_PROPERTIES_PAGE_H */

0 comments on commit 4196136

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