37 #include <glib/gi18n.h>
45 static void gnc_plugin_account_tree_finalize (GObject *
object);
51 #define PLUGIN_ACTIONS_NAME "gnc-plugin-account-tree-actions"
52 #define PLUGIN_UI_FILENAME "gnc-plugin-account-tree-ui.xml"
56 static GtkActionEntry gnc_plugin_actions [] =
59 "ViewAccountTreeAction", NULL, N_(
"New Accounts _Page"), NULL,
60 N_(
"Open a new Account Tree page"),
61 G_CALLBACK (gnc_plugin_account_tree_cmd_new_account_tree)
65 static guint gnc_plugin_n_actions = G_N_ELEMENTS (gnc_plugin_actions);
74 #define GNC_PLUGIN_ACCOUNT_TREE_GET_PRIVATE(o) \
75 (G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_PLUGIN_ACCOUNT_TREE, GncPluginAccountTreePrivate))
78 static GObjectClass *parent_class = NULL;
85 static GType gnc_plugin_account_tree_type = 0;
87 if (gnc_plugin_account_tree_type == 0)
89 static const GTypeInfo our_info =
94 (GClassInitFunc) gnc_plugin_account_tree_class_init,
99 (GInstanceInitFunc) gnc_plugin_account_tree_init
102 gnc_plugin_account_tree_type = g_type_register_static (GNC_TYPE_PLUGIN,
103 "GncPluginAccountTree",
107 return gnc_plugin_account_tree_type;
119 GNC_TYPE_PLUGIN_PAGE_ACCOUNT_TREE;
121 plugin = g_object_new (GNC_TYPE_PLUGIN_ACCOUNT_TREE,
124 return GNC_PLUGIN (plugin);
138 GObjectClass *object_class = G_OBJECT_CLASS (klass);
141 parent_class = g_type_class_peek_parent (klass);
143 object_class->finalize = gnc_plugin_account_tree_finalize;
146 plugin_class->
plugin_name = GNC_PLUGIN_ACCOUNT_TREE_NAME;
150 plugin_class->
actions = gnc_plugin_actions;
151 plugin_class->
n_actions = gnc_plugin_n_actions;
178 gnc_plugin_account_tree_finalize (GObject *
object)
180 g_return_if_fail (GNC_IS_PLUGIN_ACCOUNT_TREE (
object));
182 G_OBJECT_CLASS (parent_class)->finalize (
object);
190 gnc_plugin_account_tree_cmd_new_account_tree (GtkAction *action,
195 g_return_if_fail (data != NULL);
GncPluginPage * gnc_plugin_page_account_tree_new(void)
GType gnc_plugin_account_tree_get_type(void)
const gchar * ui_filename
void gnc_main_window_open_page(GncMainWindow *window, GncPluginPage *page)
const gchar * actions_name
struct GncPluginAccountTreePrivate GncPluginAccountTreePrivate
Functions providing a chart of account page.
const gchar * plugin_name
GncPlugin * gnc_plugin_account_tree_new(void)
Provide the menus to create a chart of account page.
#define PLUGIN_ACTIONS_NAME
#define PLUGIN_UI_FILENAME