26 #include <glib/gi18n.h>
28 #include "gnc-plugin-csv-export.h"
35 static void gnc_plugin_csv_export_finalize (GObject *
object);
41 #define PLUGIN_ACTIONS_NAME "gnc-plugin-csv-export-actions"
42 #define PLUGIN_UI_FILENAME "gnc-plugin-csv-export-ui.xml"
44 static GtkActionEntry gnc_plugin_actions [] =
47 "CsvExportTreeAction", GTK_STOCK_CONVERT, N_(
"Export Account T_ree to CSV..."), NULL,
48 N_(
"Export the Account Tree to a CSV file"),
49 G_CALLBACK (gnc_plugin_csv_export_tree_cmd)
52 "CsvExportTransAction", GTK_STOCK_CONVERT, N_(
"Export _Transactions to CSV..."), NULL,
53 N_(
"Export the Transactions to a CSV file"),
54 G_CALLBACK (gnc_plugin_csv_export_trans_cmd)
57 static guint gnc_plugin_n_actions = G_N_ELEMENTS (gnc_plugin_actions);
64 #define GNC_PLUGIN_CSV_EXPORT_GET_PRIVATE(o) \
65 (G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_PLUGIN_CSV_EXPORT, GncPluginCsvExportPrivate))
67 static GObjectClass *parent_class = NULL;
70 gnc_plugin_csv_export_get_type (
void)
72 static GType gnc_plugin_csv_export_type = 0;
74 if (gnc_plugin_csv_export_type == 0)
76 static const GTypeInfo our_info =
81 (GClassInitFunc) gnc_plugin_csv_export_class_init,
86 (GInstanceInitFunc) gnc_plugin_csv_export_init,
89 gnc_plugin_csv_export_type = g_type_register_static (GNC_TYPE_PLUGIN,
94 return gnc_plugin_csv_export_type;
98 gnc_plugin_csv_export_new (
void)
100 return GNC_PLUGIN (g_object_new (GNC_TYPE_PLUGIN_CSV_EXPORT, NULL));
106 GObjectClass *object_class = G_OBJECT_CLASS (klass);
109 parent_class = g_type_class_peek_parent (klass);
111 object_class->finalize = gnc_plugin_csv_export_finalize;
114 plugin_class->
plugin_name = GNC_PLUGIN_CSV_EXPORT_NAME;
118 plugin_class->
actions = gnc_plugin_actions;
119 plugin_class->
n_actions = gnc_plugin_n_actions;
131 gnc_plugin_csv_export_finalize (GObject *
object)
133 g_return_if_fail (GNC_IS_PLUGIN_CSV_EXPORT (
object));
135 G_OBJECT_CLASS (parent_class)->finalize (
object);
146 gnc_plugin_csv_export_tree_cmd (GtkAction *action,
153 gnc_plugin_csv_export_trans_cmd (GtkAction *action,
163 gnc_plugin_csv_export_create_plugin (
void)
165 GncPlugin *plugin = gnc_plugin_csv_export_new ();
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_csv_export(CsvExportType export_type)
const gchar * actions_name
const gchar * plugin_name
#define PLUGIN_ACTIONS_NAME
#define PLUGIN_UI_FILENAME