27 #include <glib/gi18n.h> 30 #include "gnc-plugin-log-replay.h" 32 #include "gnc-component-manager.h" 34 static void gnc_plugin_log_replay_finalize (GObject *
object);
37 static void gnc_plugin_log_replay_cmd_new_log_replay (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
40 #define PLUGIN_ACTIONS_NAME "gnc-plugin-log-replay-actions" 41 #define PLUGIN_UI_FILENAME "gnc-plugin-log-replay.ui" 43 static GActionEntry gnc_plugin_actions [] =
45 {
"LogReplayAction", gnc_plugin_log_replay_cmd_new_log_replay, NULL, NULL, NULL },
48 static guint gnc_plugin_n_actions = G_N_ELEMENTS(gnc_plugin_actions);
51 static const gchar *gnc_plugin_load_ui_items [] =
62 G_DEFINE_TYPE(GncPluginLogReplay, gnc_plugin_log_replay, GNC_TYPE_PLUGIN)
65 gnc_plugin_log_replay_new (
void)
67 return GNC_PLUGIN (g_object_new (GNC_TYPE_PLUGIN_LOG_REPLAY, NULL));
71 gnc_plugin_log_replay_class_init (GncPluginLogReplayClass *klass)
73 GObjectClass *object_class = G_OBJECT_CLASS (klass);
74 GncPluginClass *plugin_class = GNC_PLUGIN_CLASS (klass);
76 object_class->finalize = gnc_plugin_log_replay_finalize;
79 plugin_class->plugin_name = GNC_PLUGIN_LOG_REPLAY_NAME;
83 plugin_class->actions = gnc_plugin_actions;
84 plugin_class->n_actions = gnc_plugin_n_actions;
86 plugin_class->ui_updates = gnc_plugin_load_ui_items;
90 gnc_plugin_log_replay_init (GncPluginLogReplay *plugin)
95 gnc_plugin_log_replay_finalize (GObject *
object)
97 g_return_if_fail (GNC_IS_PLUGIN_LOG_REPLAY (
object));
99 G_OBJECT_CLASS (gnc_plugin_log_replay_parent_class)->finalize (
object);
111 gnc_plugin_log_replay_cmd_new_log_replay (GSimpleAction *simple,
116 gnc_suspend_gui_refresh();
118 gnc_resume_gui_refresh();
126 gnc_plugin_log_replay_create_plugin (
void)
128 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)
Add a plugin to the list maintained by the plugin manager.
GncPluginManager * gnc_plugin_manager_get(void)
Retrieve a pointer to the plugin manager.
void gnc_file_log_replay(GtkWindow *parent)
The gnc_file_log_replay() routine will pop up a standard file selection dialogue asking the user to p...
#define PLUGIN_ACTIONS_NAME
The label given to the main window for this plugin.
#define PLUGIN_UI_FILENAME
The name of the UI description file for this plugin.