This is an automated email from the git hooks/post-receive script. n o m a d p u s h e d a c o m m i t t o b r a n c h m a s t e r in repository apps/xfdashboard.
commit a1e59c117533f7818ebd02def2366dda95e0baf2 Author: Stephan Haller <no...@froevel.de> Date: Wed Aug 21 14:32:43 2019 +0200 settings: update for g_type_class_add_private() deprecation --- settings/general.c | 17 +++++------------ settings/plugins.c | 20 +++++++------------- settings/settings.c | 16 ++++------------ settings/themes.c | 20 +++++++------------- 4 files changed, 23 insertions(+), 50 deletions(-) diff --git a/settings/general.c b/settings/general.c index 6cc1d5d..ea96f17 100644 --- a/settings/general.c +++ b/settings/general.c @@ -33,14 +33,6 @@ /* Define this class in GObject system */ -G_DEFINE_TYPE(XfdashboardSettingsGeneral, - xfdashboard_settings_general, - G_TYPE_OBJECT) - -/* Private structure - access only by public API if needed */ -#define XFDASHBOARD_SETTINGS_GENERAL_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE((obj), XFDASHBOARD_TYPE_SETTINGS_GENERAL, XfdashboardSettingsGeneralPrivate)) - struct _XfdashboardSettingsGeneralPrivate { /* Properties related */ @@ -61,6 +53,10 @@ struct _XfdashboardSettingsGeneralPrivate GtkWidget *widgetAllowSubwindows; }; +G_DEFINE_TYPE_WITH_PRIVATE(XfdashboardSettingsGeneral, + xfdashboard_settings_general, + G_TYPE_OBJECT) + /* Properties */ enum { @@ -718,9 +714,6 @@ static void xfdashboard_settings_general_class_init(XfdashboardSettingsGeneralCl gobjectClass->set_property=_xfdashboard_settings_general_set_property; gobjectClass->get_property=_xfdashboard_settings_general_get_property; - /* Set up private structure */ - g_type_class_add_private(klass, sizeof(XfdashboardSettingsGeneralPrivate)); - /* Define properties */ XfdashboardSettingsGeneralProperties[PROP_BUILDER]= g_param_spec_object("builder", @@ -739,7 +732,7 @@ static void xfdashboard_settings_general_init(XfdashboardSettingsGeneral *self) { XfdashboardSettingsGeneralPrivate *priv; - priv=self->priv=XFDASHBOARD_SETTINGS_GENERAL_GET_PRIVATE(self); + priv=self->priv=xfdashboard_settings_general_get_instance_private(self); /* Set default values */ priv->builder=NULL; diff --git a/settings/plugins.c b/settings/plugins.c index 2b18d24..d540f55 100644 --- a/settings/plugins.c +++ b/settings/plugins.c @@ -33,14 +33,6 @@ /* Define this class in GObject system */ -G_DEFINE_TYPE(XfdashboardSettingsPlugins, - xfdashboard_settings_plugins, - G_TYPE_OBJECT) - -/* Private structure - access only by public API if needed */ -#define XFDASHBOARD_SETTINGS_PLUGINS_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE((obj), XFDASHBOARD_TYPE_SETTINGS_PLUGINS, XfdashboardSettingsPluginsPrivate)) - struct _XfdashboardSettingsPluginsPrivate { /* Properties related */ @@ -66,6 +58,10 @@ struct _XfdashboardSettingsPluginsPrivate GtkWidget *widgetPluginPreferencesDialogTitle; }; +G_DEFINE_TYPE_WITH_PRIVATE(XfdashboardSettingsPlugins, + xfdashboard_settings_plugins, + G_TYPE_OBJECT) + /* Properties */ enum { @@ -674,7 +670,8 @@ static void _xfdashboard_settings_plugins_enabled_plugins_changed_by_xfconf(Xfda /* Sorting function for theme list's model */ static gint _xfdashboard_settings_plugins_sort_plugins_list_model(GtkTreeModel *inModel, GtkTreeIter *inLeft, - GtkTreeIter *inRight) + GtkTreeIter *inRight, + gpointer inUserData) { gchar *leftName; gchar *rightName; @@ -1175,9 +1172,6 @@ static void xfdashboard_settings_plugins_class_init(XfdashboardSettingsPluginsCl gobjectClass->set_property=_xfdashboard_settings_plugins_set_property; gobjectClass->get_property=_xfdashboard_settings_plugins_get_property; - /* Set up private structure */ - g_type_class_add_private(klass, sizeof(XfdashboardSettingsPluginsPrivate)); - /* Define properties */ XfdashboardSettingsPluginsProperties[PROP_BUILDER]= g_param_spec_object("builder", @@ -1196,7 +1190,7 @@ static void xfdashboard_settings_plugins_init(XfdashboardSettingsPlugins *self) { XfdashboardSettingsPluginsPrivate *priv; - priv=self->priv=XFDASHBOARD_SETTINGS_PLUGINS_GET_PRIVATE(self); + priv=self->priv=xfdashboard_settings_plugins_get_instance_private(self); /* Set default values */ priv->builder=NULL; diff --git a/settings/settings.c b/settings/settings.c index 7cc7d39..f3232c6 100644 --- a/settings/settings.c +++ b/settings/settings.c @@ -37,14 +37,6 @@ /* Define this class in GObject system */ -G_DEFINE_TYPE(XfdashboardSettings, - xfdashboard_settings, - G_TYPE_OBJECT) - -/* Private structure - access only by public API if needed */ -#define XFDASHBOARD_SETTINGS_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE((obj), XFDASHBOARD_TYPE_SETTINGS, XfdashboardSettingsPrivate)) - struct _XfdashboardSettingsPrivate { /* Instance related */ @@ -59,6 +51,9 @@ struct _XfdashboardSettingsPrivate GtkWidget *widgetCloseButton; }; +G_DEFINE_TYPE_WITH_PRIVATE(XfdashboardSettings, + xfdashboard_settings, + G_TYPE_OBJECT) /* IMPLEMENTATION: Private variables and methods */ #define XFDASHBOARD_XFCONF_CHANNEL "xfdashboard" @@ -236,9 +231,6 @@ static void xfdashboard_settings_class_init(XfdashboardSettingsClass *klass) /* Override functions */ gobjectClass->dispose=_xfdashboard_settings_dispose; - - /* Set up private structure */ - g_type_class_add_private(klass, sizeof(XfdashboardSettingsPrivate)); } /* Object initialization @@ -248,7 +240,7 @@ static void xfdashboard_settings_init(XfdashboardSettings *self) { XfdashboardSettingsPrivate *priv; - priv=self->priv=XFDASHBOARD_SETTINGS_GET_PRIVATE(self); + priv=self->priv=xfdashboard_settings_get_instance_private(self); /* Set default values */ priv->xfconfChannel=xfconf_channel_get(XFDASHBOARD_XFCONF_CHANNEL); diff --git a/settings/themes.c b/settings/themes.c index d43d8c7..4df1d1a 100644 --- a/settings/themes.c +++ b/settings/themes.c @@ -31,14 +31,6 @@ #include <xfconf/xfconf.h> /* Define this class in GObject system */ -G_DEFINE_TYPE(XfdashboardSettingsThemes, - xfdashboard_settings_themes, - G_TYPE_OBJECT) - -/* Private structure - access only by public API if needed */ -#define XFDASHBOARD_SETTINGS_THEMES_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE((obj), XFDASHBOARD_TYPE_SETTINGS_THEMES, XfdashboardSettingsThemesPrivate)) - struct _XfdashboardSettingsThemesPrivate { /* Properties related */ @@ -59,6 +51,10 @@ struct _XfdashboardSettingsThemesPrivate GtkWidget *widgetThemeDescription; }; +G_DEFINE_TYPE_WITH_PRIVATE(XfdashboardSettingsThemes, + xfdashboard_settings_themes, + G_TYPE_OBJECT) + /* Properties */ enum { @@ -380,7 +376,8 @@ static void _xfdashboard_settings_themes_theme_changed_by_xfconf(XfdashboardSett /* Sorting function for theme list's model */ static gint _xfdashboard_settings_themes_sort_themes_list_model(GtkTreeModel *inModel, GtkTreeIter *inLeft, - GtkTreeIter *inRight) + GtkTreeIter *inRight, + gpointer inUserData) { gchar *leftName; gchar *rightName; @@ -904,9 +901,6 @@ static void xfdashboard_settings_themes_class_init(XfdashboardSettingsThemesClas gobjectClass->set_property=_xfdashboard_settings_themes_set_property; gobjectClass->get_property=_xfdashboard_settings_themes_get_property; - /* Set up private structure */ - g_type_class_add_private(klass, sizeof(XfdashboardSettingsThemesPrivate)); - /* Define properties */ XfdashboardSettingsThemesProperties[PROP_BUILDER]= g_param_spec_object("builder", @@ -925,7 +919,7 @@ static void xfdashboard_settings_themes_init(XfdashboardSettingsThemes *self) { XfdashboardSettingsThemesPrivate *priv; - priv=self->priv=XFDASHBOARD_SETTINGS_THEMES_GET_PRIVATE(self); + priv=self->priv=xfdashboard_settings_themes_get_instance_private(self); /* Set default values */ priv->builder=NULL; -- To stop receiving notification emails like this one, please contact the administrator of this repository. _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits