Refactor: DECLARE_FINAL GncPluginLogReplay < GncPlugin

- Fix the name
This commit is contained in:
Richard Cohen 2023-06-12 19:11:45 +01:00
parent 08168bec26
commit d73117d1ef
2 changed files with 9 additions and 20 deletions

View File

@ -54,15 +54,15 @@ static const gchar *gnc_plugin_load_ui_items [] =
NULL,
};
typedef struct GncPluginLogreplayPrivate
typedef struct GncPluginLogReplayPrivate
{
gpointer dummy;
} GncPluginLogreplayPrivate;
} GncPluginLogReplayPrivate;
G_DEFINE_TYPE_WITH_PRIVATE(GncPluginLogreplay, gnc_plugin_log_replay, GNC_TYPE_PLUGIN)
G_DEFINE_TYPE_WITH_PRIVATE(GncPluginLogReplay, gnc_plugin_log_replay, GNC_TYPE_PLUGIN)
#define GNC_PLUGIN_LOG_REPLAY_GET_PRIVATE(o) \
((GncPluginLogreplayPrivate*)gnc_plugin_log_replay_get_instance_private((GncPluginLogReplay*)o))
((GncPluginLogReplayPrivate*)gnc_plugin_log_replay_get_instance_private((GncPluginLogReplay*)o))
GncPlugin *
gnc_plugin_log_replay_new (void)
@ -71,7 +71,7 @@ gnc_plugin_log_replay_new (void)
}
static void
gnc_plugin_log_replay_class_init (GncPluginLogreplayClass *klass)
gnc_plugin_log_replay_class_init (GncPluginLogReplayClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GncPluginClass *plugin_class = GNC_PLUGIN_CLASS (klass);
@ -90,7 +90,7 @@ gnc_plugin_log_replay_class_init (GncPluginLogreplayClass *klass)
}
static void
gnc_plugin_log_replay_init (GncPluginLogreplay *plugin)
gnc_plugin_log_replay_init (GncPluginLogReplay *plugin)
{
}

View File

@ -31,28 +31,17 @@ G_BEGIN_DECLS
/* type macros */
#define GNC_TYPE_PLUGIN_LOG_REPLAY (gnc_plugin_log_replay_get_type ())
#define GNC_PLUGIN_LOG_REPLAY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNC_TYPE_PLUGIN_LOG_REPLAY, GncPluginLogreplay))
#define GNC_PLUGIN_LOG_REPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNC_TYPE_PLUGIN_LOG_REPLAY, GncPluginLogreplayClass))
#define GNC_IS_PLUGIN_LOG_REPLAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNC_TYPE_PLUGIN_LOG_REPLAY))
#define GNC_IS_PLUGIN_LOG_REPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNC_TYPE_PLUGIN_LOG_REPLAY))
#define GNC_PLUGIN_LOG_REPLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNC_TYPE_PLUGIN_LOG_REPLAY, GncPluginLogreplayClass))
G_DECLARE_FINAL_TYPE (GncPluginLogReplay, gnc_plugin_log_replay, GNC, PLUGIN_LOG_REPLAY, GncPlugin)
#define GNC_PLUGIN_LOG_REPLAY_NAME "gnc-plugin-log-replay"
/* typedefs & structures */
typedef struct
struct _GncPluginLogReplay
{
GncPlugin gnc_plugin;
} GncPluginLogreplay;
typedef struct
{
GncPluginClass gnc_plugin;
} GncPluginLogreplayClass;
};
/* function prototypes */
GType gnc_plugin_log_replay_get_type (void);
GncPlugin *gnc_plugin_log_replay_new (void);
void gnc_plugin_log_replay_create_plugin (void);