26 #include <glib/gi18n.h> 29 #include "gnc-plugin-ofx.h" 32 static void gnc_plugin_ofx_finalize (GObject *
object);
35 static void gnc_plugin_ofx_cmd_import (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
38 #define PLUGIN_ACTIONS_NAME "gnc-plugin-ofx-actions" 39 #define PLUGIN_UI_FILENAME "gnc-plugin-ofx.ui" 41 static GActionEntry gnc_plugin_actions [] =
43 {
"OfxImportAction", gnc_plugin_ofx_cmd_import, NULL, NULL, NULL },
46 static guint gnc_plugin_n_actions = G_N_ELEMENTS(gnc_plugin_actions);
49 static const gchar *gnc_plugin_load_ui_items [] =
60 G_DEFINE_TYPE(GncPluginOfx, gnc_plugin_ofx, GNC_TYPE_PLUGIN)
63 gnc_plugin_ofx_new (
void)
65 return GNC_PLUGIN (g_object_new (GNC_TYPE_PLUGIN_OFX, NULL));
69 gnc_plugin_ofx_class_init (GncPluginOfxClass *klass)
71 GObjectClass *object_class = G_OBJECT_CLASS (klass);
72 GncPluginClass *plugin_class = GNC_PLUGIN_CLASS (klass);
74 object_class->finalize = gnc_plugin_ofx_finalize;
77 plugin_class->plugin_name = GNC_PLUGIN_OFX_NAME;
81 plugin_class->actions = gnc_plugin_actions;
82 plugin_class->n_actions = gnc_plugin_n_actions;
84 plugin_class->ui_updates = gnc_plugin_load_ui_items;
88 gnc_plugin_ofx_init (GncPluginOfx *plugin)
93 gnc_plugin_ofx_finalize (GObject *
object)
95 g_return_if_fail (GNC_IS_PLUGIN_OFX (
object));
97 G_OBJECT_CLASS (gnc_plugin_ofx_parent_class)->finalize (
object);
109 gnc_plugin_ofx_cmd_import (GSimpleAction *simple,
123 gnc_plugin_ofx_create_plugin (
void)
125 GncPlugin *plugin = gnc_plugin_ofx_new ();
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.
Ofx import module interface.
void gnc_file_ofx_import(GtkWindow *parent)
The gnc_file_ofx_import() routine will pop up a standard file selection dialogue asking the user to p...
GncPluginManager * gnc_plugin_manager_get(void)
Retrieve a pointer to the plugin manager.
#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.