27 #include <glib/gi18n.h>
30 #include "gnc-plugin-log-replay.h"
32 #include "gnc-component-manager.h"
36 static void gnc_plugin_log_replay_finalize (GObject *
object);
42 #define PLUGIN_ACTIONS_NAME "gnc-plugin-log-replay-actions"
43 #define PLUGIN_UI_FILENAME "gnc-plugin-log-replay-ui.xml"
45 static GtkActionEntry gnc_plugin_actions [] =
48 "LogReplayAction", GTK_STOCK_CONVERT, N_(
"_Replay GnuCash .log file..."), NULL,
49 N_(
"Replay a GnuCash log file after a crash. This cannot be undone."),
50 G_CALLBACK (gnc_plugin_log_replay_cmd_new_log_replay)
53 static guint gnc_plugin_n_actions = G_N_ELEMENTS (gnc_plugin_actions);
60 #define GNC_PLUGIN_LOG_REPLAY_GET_PRIVATE(o) \
61 (G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_PLUGIN_LOG_REPLAY, GncPluginLogreplayPrivate))
63 static GObjectClass *parent_class = NULL;
66 gnc_plugin_log_replay_get_type (
void)
68 static GType gnc_plugin_log_replay_type = 0;
70 if (gnc_plugin_log_replay_type == 0)
72 static const GTypeInfo our_info =
77 (GClassInitFunc) gnc_plugin_log_replay_class_init,
82 (GInstanceInitFunc) gnc_plugin_log_replay_init,
85 gnc_plugin_log_replay_type = g_type_register_static (GNC_TYPE_PLUGIN,
90 return gnc_plugin_log_replay_type;
94 gnc_plugin_log_replay_new (
void)
96 return GNC_PLUGIN (g_object_new (GNC_TYPE_PLUGIN_LOG_REPLAY, NULL));
102 GObjectClass *object_class = G_OBJECT_CLASS (klass);
105 parent_class = g_type_class_peek_parent (klass);
107 object_class->finalize = gnc_plugin_log_replay_finalize;
110 plugin_class->
plugin_name = GNC_PLUGIN_LOG_REPLAY_NAME;
114 plugin_class->
actions = gnc_plugin_actions;
115 plugin_class->
n_actions = gnc_plugin_n_actions;
127 gnc_plugin_log_replay_finalize (GObject *
object)
129 g_return_if_fail (GNC_IS_PLUGIN_LOG_REPLAY (
object));
131 G_OBJECT_CLASS (parent_class)->finalize (
object);
143 gnc_plugin_log_replay_cmd_new_log_replay (GtkAction *action,
146 gnc_suspend_gui_refresh();
148 gnc_resume_gui_refresh();
156 gnc_plugin_log_replay_create_plugin (
void)
158 GncPlugin *plugin = gnc_plugin_log_replay_new ();
.log replay module interface
Plugin management functions for the GnuCash UI.
void gnc_plugin_manager_add_plugin(GncPluginManager *manager, GncPlugin *plugin)
const gchar * ui_filename
GncPluginManager * gnc_plugin_manager_get(void)
void gnc_file_log_replay(void)
const gchar * actions_name
const gchar * plugin_name
#define PLUGIN_ACTIONS_NAME
#define PLUGIN_UI_FILENAME