26 #include <glib/gi18n.h>
29 #include "gnc-plugin-ofx.h"
34 static void gnc_plugin_ofx_finalize (GObject *
object);
40 #define PLUGIN_ACTIONS_NAME "gnc-plugin-ofx-actions"
41 #define PLUGIN_UI_FILENAME "gnc-plugin-ofx-ui.xml"
43 static GtkActionEntry gnc_plugin_actions [] =
46 "OfxImportAction", GTK_STOCK_CONVERT, N_(
"Import _OFX/QFX..."), NULL,
47 N_(
"Process an OFX/QFX response file"),
48 G_CALLBACK (gnc_plugin_ofx_cmd_import)
51 static guint gnc_plugin_n_actions = G_N_ELEMENTS (gnc_plugin_actions);
58 #define GNC_PLUGIN_OFX_GET_PRIVATE(o) \
59 (G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_PLUGIN_OFX, GncPluginOfxPrivate))
61 static GObjectClass *parent_class = NULL;
64 gnc_plugin_ofx_get_type (
void)
66 static GType gnc_plugin_ofx_type = 0;
68 if (gnc_plugin_ofx_type == 0)
70 static const GTypeInfo our_info =
75 (GClassInitFunc) gnc_plugin_ofx_class_init,
80 (GInstanceInitFunc) gnc_plugin_ofx_init,
83 gnc_plugin_ofx_type = g_type_register_static (GNC_TYPE_PLUGIN,
88 return gnc_plugin_ofx_type;
92 gnc_plugin_ofx_new (
void)
94 return GNC_PLUGIN (g_object_new (GNC_TYPE_PLUGIN_OFX, NULL));
100 GObjectClass *object_class = G_OBJECT_CLASS (klass);
103 parent_class = g_type_class_peek_parent (klass);
105 object_class->finalize = gnc_plugin_ofx_finalize;
112 plugin_class->
actions = gnc_plugin_actions;
113 plugin_class->
n_actions = gnc_plugin_n_actions;
125 gnc_plugin_ofx_finalize (GObject *
object)
127 g_return_if_fail (GNC_IS_PLUGIN_OFX (
object));
129 G_OBJECT_CLASS (parent_class)->finalize (
object);
141 gnc_plugin_ofx_cmd_import (GtkAction *action,
153 gnc_plugin_ofx_create_plugin (
void)
155 GncPlugin *plugin = gnc_plugin_ofx_new ();
Plugin management functions for the GnuCash UI.
void gnc_plugin_manager_add_plugin(GncPluginManager *manager, GncPlugin *plugin)
Ofx import module interface.
const gchar * ui_filename
GncPluginManager * gnc_plugin_manager_get(void)
void gnc_file_ofx_import(void)
const gchar * actions_name
const gchar * plugin_name
#define PLUGIN_ACTIONS_NAME
#define PLUGIN_UI_FILENAME