26 #include <glib/gi18n.h>
28 #include "dialog-report-style-sheet.h"
30 #include "gnc-plugin-stylesheets.h"
36 static void gnc_plugin_stylesheets_finalize (GObject *
object);
40 static void gnc_plugin_stylesheets_cmd_edit_style_sheet (GtkAction *action,
44 #define PLUGIN_ACTIONS_NAME "gnc-plugin-stylesheets-actions"
45 #define PLUGIN_UI_FILENAME "gnc-plugin-stylesheets-ui.xml"
47 static GtkActionEntry gnc_plugin_actions [] =
51 "EditStyleSheetsAction", NULL, N_(
"St_yle Sheets"), NULL,
52 N_(
"Edit report style sheets"),
53 G_CALLBACK (gnc_plugin_stylesheets_cmd_edit_style_sheet)
56 static guint gnc_plugin_n_actions = G_N_ELEMENTS (gnc_plugin_actions);
64 #define GNC_PLUGIN_STYLESHEETS_GET_PRIVATE(o) \
65 (G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_PLUGIN_STYLESHEETS, GncPluginStylesheetsPrivate))
67 static GObjectClass *parent_class = NULL;
74 gnc_plugin_stylesheets_get_type (
void)
76 static GType gnc_plugin_stylesheets_type = 0;
78 if (gnc_plugin_stylesheets_type == 0)
80 static const GTypeInfo our_info =
85 (GClassInitFunc) gnc_plugin_stylesheets_class_init,
90 (GInstanceInitFunc) gnc_plugin_stylesheets_init,
93 gnc_plugin_stylesheets_type = g_type_register_static (GNC_TYPE_PLUGIN,
94 "GncPluginStylesheets",
98 return gnc_plugin_stylesheets_type;
102 gnc_plugin_stylesheets_new (
void)
104 return GNC_PLUGIN (g_object_new (GNC_TYPE_PLUGIN_STYLESHEETS, NULL));
110 GObjectClass *object_class = G_OBJECT_CLASS (klass);
113 parent_class = g_type_class_peek_parent (klass);
115 object_class->finalize = gnc_plugin_stylesheets_finalize;
118 plugin_class->
plugin_name = GNC_PLUGIN_STYLESHEETS_NAME;
122 plugin_class->
actions = gnc_plugin_actions;
123 plugin_class->
n_actions = gnc_plugin_n_actions;
135 gnc_plugin_stylesheets_finalize (GObject *
object)
137 g_return_if_fail (GNC_IS_PLUGIN_STYLESHEETS (
object));
139 G_OBJECT_CLASS (parent_class)->finalize (
object);
147 gnc_plugin_stylesheets_cmd_edit_style_sheet (GtkAction *action,
150 gnc_style_sheet_dialog_open();
158 gnc_plugin_stylesheets_create_plugin (
void)
160 GncPlugin *plugin = gnc_plugin_stylesheets_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)
Gnome specific utility functions.
All type declarations for the whole Gnucash engine.
const gchar * actions_name
const gchar * plugin_name
#define PLUGIN_ACTIONS_NAME
#define PLUGIN_UI_FILENAME