diff options
author | Pablo Barciela <[email protected]> | 2019-08-07 00:20:26 +0200 |
---|---|---|
committer | lukefromdc <[email protected]> | 2019-08-07 22:02:19 +0000 |
commit | 1bafd3ae74b9107e11b7b098d73996669d1c0f6e (patch) | |
tree | f7c8b3ca224617dff03d849c6cf58e618deedfcd /plugins | |
parent | 082e7b1fd913856624beacf1c50c94d650ecd3e1 (diff) | |
download | pluma-1bafd3ae74b9107e11b7b098d73996669d1c0f6e.tar.bz2 pluma-1bafd3ae74b9107e11b7b098d73996669d1c0f6e.tar.xz |
pluma-sort-plugin: avoid 'g_type_class_add_private'
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/sort/pluma-sort-plugin.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/plugins/sort/pluma-sort-plugin.c b/plugins/sort/pluma-sort-plugin.c index 6405cd76..385f81e9 100644 --- a/plugins/sort/pluma-sort-plugin.c +++ b/plugins/sort/pluma-sort-plugin.c @@ -37,19 +37,10 @@ #include <pluma/pluma-utils.h> #include <pluma/pluma-help.h> -#define PLUMA_SORT_PLUGIN_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), PLUMA_TYPE_SORT_PLUGIN, PlumaSortPluginPrivate)) - #define MENU_PATH "/MenuBar/EditMenu/EditOps_6" static void peas_activatable_iface_init (PeasActivatableInterface *iface); -G_DEFINE_DYNAMIC_TYPE_EXTENDED (PlumaSortPlugin, - pluma_sort_plugin, - PEAS_TYPE_EXTENSION_BASE, - 0, - G_IMPLEMENT_INTERFACE_DYNAMIC (PEAS_TYPE_ACTIVATABLE, - peas_activatable_iface_init)) - enum { PROP_0, PROP_OBJECT @@ -84,6 +75,14 @@ typedef struct gint starting_column; } SortInfo; +G_DEFINE_DYNAMIC_TYPE_EXTENDED (PlumaSortPlugin, + pluma_sort_plugin, + PEAS_TYPE_EXTENSION_BASE, + 0, + G_ADD_PRIVATE_DYNAMIC (PlumaSortPlugin) + G_IMPLEMENT_INTERFACE_DYNAMIC (PEAS_TYPE_ACTIVATABLE, + peas_activatable_iface_init)) + static void sort_cb (GtkAction *action, PlumaSortPlugin *plugin); static void sort_real (SortDialog *dialog); @@ -582,7 +581,7 @@ pluma_sort_plugin_init (PlumaSortPlugin *plugin) { pluma_debug_message (DEBUG_PLUGINS, "PlumaSortPlugin initializing"); - plugin->priv = PLUMA_SORT_PLUGIN_GET_PRIVATE (plugin); + plugin->priv = pluma_sort_plugin_get_instance_private (plugin); } static void @@ -617,8 +616,6 @@ pluma_sort_plugin_class_init (PlumaSortPluginClass *klass) object_class->get_property = pluma_sort_plugin_get_property; g_object_class_override_property (object_class, PROP_OBJECT, "object"); - - g_type_class_add_private (klass, sizeof (PlumaSortPluginPrivate)); } static void |