/*  Create a new menu_additions plugin.  This plugin attaches the menu
 *  items from Scheme code to any window that is opened.
 *
 *  @return A pointer to the new object.
 */
GncPlugin *
gnc_plugin_menu_additions_new (void)
{
    GncPlugin *plugin_page = NULL;

    ENTER("");
    plugin_page = GNC_PLUGIN (g_object_new (GNC_TYPE_PLUGIN_MENU_ADDITIONS, NULL));
    LEAVE("plugin %p", plugin_page);
    return plugin_page;
}
/** Create a new basic commands menu plugin. */
GncPlugin *
gnc_plugin_basic_commands_new (void)
{
    GncPluginBasicCommands *plugin;

    /* We just need to mention it, so the GType is registered and will be
     * reflected during plugin-page restore. */
    GNC_TYPE_PLUGIN_PAGE_SX_LIST;

    plugin = g_object_new (GNC_TYPE_PLUGIN_BASIC_COMMANDS, NULL);

    return GNC_PLUGIN (plugin);
}
Exemple #3
0
GncPlugin *
gnc_plugin_register2_new (void)
{
    GncPluginRegister2 *plugin;

    /* Reference the register page plugin to ensure it exists in
     * the gtk type system. */
    GNC_TYPE_PLUGIN_PAGE_REGISTER2;

    plugin = g_object_new (GNC_TYPE_PLUGIN_REGISTER2,
                           NULL);

    return GNC_PLUGIN (plugin);
}
/*  Create a new account tree menu plugin. */
GncPlugin *
gnc_plugin_account_tree_new (void)
{
    GncPluginAccountTree *plugin;

    /* Reference the account tree page plugin to ensure it exists
     * in the gtk type system. */
    GNC_TYPE_PLUGIN_PAGE_ACCOUNT_TREE;

    plugin = g_object_new (GNC_TYPE_PLUGIN_ACCOUNT_TREE,
                           NULL);

    return GNC_PLUGIN (plugin);
}
Exemple #5
0
/** Finalize the gnucash plugin object.  This function is called from
 *  the G_Object level to complete the destruction of the object.  It
 *  should release any memory not previously released by the destroy
 *  function (i.e. the private data structure), then chain up to the
 *  parent's destroy function.
 *
 *  @param object The object being destroyed. */
static void
gnc_plugin_finalize (GObject *object)
{
    GncPlugin *plugin;
    GncPluginPrivate *priv;

    g_return_if_fail (GNC_IS_PLUGIN (object));

    plugin = GNC_PLUGIN (object);
    priv = GNC_PLUGIN_GET_PRIVATE (plugin);

    gnc_gobject_tracking_forget(object);
    G_OBJECT_CLASS (parent_class)->finalize (object);
}
GncPlugin *
gnc_plugin_business_new (void)
{
    GncPluginBusiness *plugin;

    /* Reference the invoice page plugin to ensure it exists in
     * the gtk type system. */
    GNC_TYPE_PLUGIN_PAGE_INVOICE;

    plugin = g_object_new (GNC_TYPE_PLUGIN_BUSINESS,
                           (char *)NULL);

    return GNC_PLUGIN (plugin);
}
GncPlugin *
gnc_plugin_customer_import_new (void)
{
    return GNC_PLUGIN (g_object_new (GNC_TYPE_PLUGIN_customer_import, (gchar*) NULL));
}
Exemple #8
0
GncPlugin *
gnc_plugin_ofx_new (void)
{
    return GNC_PLUGIN (g_object_new (GNC_TYPE_PLUGIN_OFX, NULL));
}
GncPlugin *
gnc_plugin_log_replay_new (void)
{
    return GNC_PLUGIN (g_object_new (GNC_TYPE_PLUGIN_LOG_REPLAY, NULL));
}
GncPlugin *
gnc_plugin_stylesheets_new (void)
{
    return GNC_PLUGIN (g_object_new (GNC_TYPE_PLUGIN_STYLESHEETS, NULL));
}
GncPlugin *
gnc_plugin_csv_import_new (void)
{
    return GNC_PLUGIN (g_object_new (GNC_TYPE_PLUGIN_CSV_IMPORT, NULL));
}