[eog-plugins] postasa: Stop using deprecated g_type_class_add_private
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog-plugins] postasa: Stop using deprecated g_type_class_add_private
- Date: Sun, 22 Jul 2018 18:17:44 +0000 (UTC)
commit b9a5de5f9dfc750e4a3b5af0541f9110c249aa3e
Author: Felix Riemann <friemann gnome org>
Date: Sun Jul 22 20:13:32 2018 +0200
postasa: Stop using deprecated g_type_class_add_private
Use G_ADD_PRIVATE instead. Upcoming glib releases will mark
g_type_class_add_private as deprecated so this will avoid a
deprecation warning during build with these versions.
plugins/postasa/eog-postasa-plugin.c | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
---
diff --git a/plugins/postasa/eog-postasa-plugin.c b/plugins/postasa/eog-postasa-plugin.c
index ad995c9..2afefe7 100644
--- a/plugins/postasa/eog-postasa-plugin.c
+++ b/plugins/postasa/eog-postasa-plugin.c
@@ -50,14 +50,6 @@ enum {
PROP_WINDOW
};
-static void
-eog_window_activatable_iface_init (EogWindowActivatableInterface *iface);
-
-G_DEFINE_DYNAMIC_TYPE_EXTENDED (EogPostasaPlugin, eog_postasa_plugin,
- PEAS_TYPE_EXTENSION_BASE, 0,
- G_IMPLEMENT_INTERFACE_DYNAMIC(EOG_TYPE_WINDOW_ACTIVATABLE,
- eog_window_activatable_iface_init))
-
/**
* _EogPostasaPluginPrivate:
*
@@ -90,6 +82,15 @@ struct _EogPostasaPluginPrivate
GtkListStore *uploads_store;
};
+static void
+eog_window_activatable_iface_init (EogWindowActivatableInterface *iface);
+
+G_DEFINE_DYNAMIC_TYPE_EXTENDED (EogPostasaPlugin, eog_postasa_plugin,
+ PEAS_TYPE_EXTENSION_BASE, 0,
+ G_ADD_PRIVATE_DYNAMIC(EogPostasaPlugin)
+ G_IMPLEMENT_INTERFACE_DYNAMIC(EOG_TYPE_WINDOW_ACTIVATABLE,
+ eog_window_activatable_iface_init))
+
/**
* PicasaWebUploadFileAsyncData:
*
@@ -907,7 +908,7 @@ eog_postasa_plugin_init (EogPostasaPlugin *plugin)
{
eog_debug_message (DEBUG_PLUGINS, "EogPostasaPlugin initializing");
- plugin->priv = G_TYPE_INSTANCE_GET_PRIVATE (plugin, EOG_TYPE_POSTASA_PLUGIN, EogPostasaPluginPrivate);
+ plugin->priv = eog_postasa_plugin_get_instance_private (plugin);
#ifdef HAVE_LIBGDATA_0_9
plugin->priv->authorizer = gdata_client_login_authorizer_new ("EogPostasa",
GDATA_TYPE_PICASAWEB_SERVICE);
@@ -1010,8 +1011,6 @@ eog_postasa_plugin_class_init (EogPostasaPluginClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (EogPostasaPluginPrivate));
-
object_class->dispose = eog_postasa_plugin_dispose;
object_class->set_property = eog_postasa_plugin_set_property;
object_class->get_property = eog_postasa_plugin_get_property;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]