Commit 47e3567a authored by Andre Miranda's avatar Andre Miranda

Fix g_type_class_add_private is deprecated

parent 400c01a9
......@@ -133,7 +133,7 @@ static const GtkRadioActionEntry order_action_entries[] =
G_DEFINE_ABSTRACT_TYPE (ThunarAbstractIconView, thunar_abstract_icon_view, THUNAR_TYPE_STANDARD_VIEW)
G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (ThunarAbstractIconView, thunar_abstract_icon_view, THUNAR_TYPE_STANDARD_VIEW)
......@@ -143,9 +143,6 @@ thunar_abstract_icon_view_class_init (ThunarAbstractIconViewClass *klass)
ThunarStandardViewClass *thunarstandard_view_class;
GtkWidgetClass *gtkwidget_class;
/* add private data to the instance type */
g_type_class_add_private (klass, sizeof (ThunarAbstractIconViewPrivate));
gtkwidget_class = GTK_WIDGET_CLASS (klass);
gtkwidget_class->style_set = thunar_abstract_icon_view_style_set;
......@@ -198,7 +195,7 @@ thunar_abstract_icon_view_init (ThunarAbstractIconView *abstract_icon_view)
GtkWidget *view;
/* connect private instance data */
abstract_icon_view->priv = THUNAR_ABSTRACT_ICON_VIEW_GET_PRIVATE (abstract_icon_view);
abstract_icon_view->priv = thunar_abstract_icon_view_get_instance_private (abstract_icon_view);
/* stay informed about zoom-level changes, so we can force a re-layout on the abstract_icon view */
g_signal_connect (G_OBJECT (abstract_icon_view), "notify::zoom-level", G_CALLBACK (thunar_abstract_icon_view_zoom_level_changed), NULL);
......
......@@ -81,7 +81,7 @@ struct _ThunarImagePrivate
G_DEFINE_TYPE (ThunarImage, thunar_image, GTK_TYPE_IMAGE);
G_DEFINE_TYPE_WITH_PRIVATE (ThunarImage, thunar_image, GTK_TYPE_IMAGE);
......@@ -90,8 +90,6 @@ thunar_image_class_init (ThunarImageClass *klass)
{
GObjectClass *gobject_class;
g_type_class_add_private (klass, sizeof (ThunarImagePrivate));
gobject_class = G_OBJECT_CLASS (klass);
gobject_class->finalize = thunar_image_finalize;
gobject_class->get_property = thunar_image_get_property;
......@@ -110,7 +108,7 @@ thunar_image_class_init (ThunarImageClass *klass)
static void
thunar_image_init (ThunarImage *image)
{
image->priv = THUNAR_IMAGE_GET_PRIVATE (image);
image->priv = thunar_image_get_instance_private (image);
image->priv->file = NULL;
image->priv->monitor = thunar_file_monitor_get_default ();
......
......@@ -78,7 +78,7 @@ static guint job_signals[LAST_SIGNAL];
G_DEFINE_ABSTRACT_TYPE (ThunarJob, thunar_job, EXO_TYPE_JOB)
G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (ThunarJob, thunar_job, EXO_TYPE_JOB)
......@@ -99,9 +99,6 @@ thunar_job_class_init (ThunarJobClass *klass)
{
GObjectClass *gobject_class;
/* add our private data for this class */
g_type_class_add_private (klass, sizeof (ThunarJobPrivate));
gobject_class = G_OBJECT_CLASS (klass);
gobject_class->finalize = thunar_job_finalize;
......@@ -209,7 +206,7 @@ thunar_job_class_init (ThunarJobClass *klass)
static void
thunar_job_init (ThunarJob *job)
{
job->priv = THUNAR_JOB_GET_PRIVATE (job);
job->priv = thunar_job_get_instance_private (job);
job->priv->earlier_ask_create_response = 0;
job->priv->earlier_ask_overwrite_response = 0;
job->priv->earlier_ask_skip_response = 0;
......
......@@ -444,7 +444,8 @@ static GParamSpec *standard_view_props[N_PROPERTIES] = { NULL, };
G_DEFINE_ABSTRACT_TYPE_WITH_CODE (ThunarStandardView, thunar_standard_view, GTK_TYPE_SCROLLED_WINDOW,
G_IMPLEMENT_INTERFACE (THUNAR_TYPE_NAVIGATOR, thunar_standard_view_navigator_init)
G_IMPLEMENT_INTERFACE (THUNAR_TYPE_COMPONENT, thunar_standard_view_component_init)
G_IMPLEMENT_INTERFACE (THUNAR_TYPE_VIEW, thunar_standard_view_view_init))
G_IMPLEMENT_INTERFACE (THUNAR_TYPE_VIEW, thunar_standard_view_view_init)
G_ADD_PRIVATE (ThunarStandardView))
......@@ -456,8 +457,6 @@ thunar_standard_view_class_init (ThunarStandardViewClass *klass)
GObjectClass *gobject_class;
gpointer g_iface;
g_type_class_add_private (klass, sizeof (ThunarStandardViewPrivate));
gobject_class = G_OBJECT_CLASS (klass);
gobject_class->constructor = thunar_standard_view_constructor;
gobject_class->dispose = thunar_standard_view_dispose;
......@@ -636,7 +635,7 @@ thunar_standard_view_view_init (ThunarViewIface *iface)
static void
thunar_standard_view_init (ThunarStandardView *standard_view)
{
standard_view->priv = THUNAR_STANDARD_VIEW_GET_PRIVATE (standard_view);
standard_view->priv = thunar_standard_view_get_instance_private (standard_view);
/* allocate the scroll_to_files mapping (directory GFile -> first visible child GFile) */
standard_view->priv->scroll_to_files = g_hash_table_new_full (g_file_hash, (GEqualFunc) g_file_equal, g_object_unref, g_object_unref);
......
......@@ -93,7 +93,7 @@ static guint signals[LAST_SIGNAL];
G_DEFINE_TYPE (ThunarxMenuItem, thunarx_menu_item, G_TYPE_OBJECT)
G_DEFINE_TYPE_WITH_PRIVATE (ThunarxMenuItem, thunarx_menu_item, G_TYPE_OBJECT)
......@@ -102,9 +102,6 @@ thunarx_menu_item_class_init (ThunarxMenuItemClass *klass)
{
GObjectClass *gobject_class;
/* add our private data to the class type */
g_type_class_add_private (klass, sizeof (ThunarxMenuItemPrivate));
gobject_class = G_OBJECT_CLASS (klass);
gobject_class->finalize = thunarx_menu_item_finalize;
gobject_class->get_property = thunarx_menu_item_get_property;
......@@ -177,7 +174,7 @@ thunarx_menu_item_class_init (ThunarxMenuItemClass *klass)
static void
thunarx_menu_item_init (ThunarxMenuItem *item)
{
item->priv = THUNARX_MENU_ITEM_GET_PRIVATE (item);
item->priv = thunarx_menu_item_get_instance_private (item);
item->priv->sensitive = TRUE;
item->priv->priority = FALSE;
item->priv->menu = NULL;
......
......@@ -53,7 +53,7 @@ struct _ThunarxMenuPrivate
G_DEFINE_TYPE (ThunarxMenu, thunarx_menu, G_TYPE_OBJECT)
G_DEFINE_TYPE_WITH_PRIVATE (ThunarxMenu, thunarx_menu, G_TYPE_OBJECT)
......@@ -62,9 +62,6 @@ thunarx_menu_class_init (ThunarxMenuClass *klass)
{
GObjectClass *gobject_class;
/* add our private data to the class type */
g_type_class_add_private (klass, sizeof (ThunarxMenuPrivate));
gobject_class = G_OBJECT_CLASS (klass);
gobject_class->finalize = thunarx_menu_finalize;
}
......@@ -74,7 +71,7 @@ thunarx_menu_class_init (ThunarxMenuClass *klass)
static void
thunarx_menu_init (ThunarxMenu *menu)
{
menu->priv = THUNARX_MENU_GET_PRIVATE (menu);
menu->priv = thunarx_menu_get_instance_private (menu);
menu->priv->items = NULL;
}
......
......@@ -85,7 +85,7 @@ struct _ThunarxPropertyPagePrivate
G_DEFINE_TYPE (ThunarxPropertyPage, thunarx_property_page, GTK_TYPE_BIN)
G_DEFINE_TYPE_WITH_PRIVATE (ThunarxPropertyPage, thunarx_property_page, GTK_TYPE_BIN)
......@@ -95,9 +95,6 @@ thunarx_property_page_class_init (ThunarxPropertyPageClass *klass)
GtkWidgetClass *gtkwidget_class;
GObjectClass *gobject_class;
/* add our private data to the class type */
g_type_class_add_private (klass, sizeof (ThunarxPropertyPagePrivate));
gobject_class = G_OBJECT_CLASS (klass);
gobject_class->get_property = thunarx_property_page_get_property;
gobject_class->set_property = thunarx_property_page_set_property;
......@@ -137,7 +134,7 @@ thunarx_property_page_class_init (ThunarxPropertyPageClass *klass)
static void
thunarx_property_page_init (ThunarxPropertyPage *property_page)
{
property_page->priv = THUNARX_PROPERTY_PAGE_GET_PRIVATE (property_page);
property_page->priv = thunarx_property_page_get_instance_private (property_page);
}
......
......@@ -114,7 +114,7 @@ static guint renamer_signals[LAST_SIGNAL];
G_DEFINE_ABSTRACT_TYPE (ThunarxRenamer, thunarx_renamer, GTK_TYPE_BOX)
G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (ThunarxRenamer, thunarx_renamer, GTK_TYPE_BOX)
......@@ -123,9 +123,6 @@ thunarx_renamer_class_init (ThunarxRenamerClass *klass)
{
GObjectClass *gobject_class;
/* add private data */
g_type_class_add_private (klass, sizeof (ThunarxRenamerPrivate));
gobject_class = G_OBJECT_CLASS (klass);
gobject_class->finalize = thunarx_renamer_finalize;
gobject_class->constructor = thunarx_renamer_constructor;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment