GnuCash 2.3.0
Data Structures | Files | Defines | Typedefs | Enumerations | Functions
Common object and functions
Content Plugins

Data Structures

struct  _GncPluginPagePrivate
struct  GncPluginPage
struct  GncPluginPageClass

Files

file  gnc-plugin-page.c
 

Functions for adding plugins to a GnuCash window.


file  gnc-plugin-page.h
 

Functions for adding plugins to a GnuCash window.


Defines

#define GNC_PLUGIN_PAGE_GET_PRIVATE(o)   (G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_PLUGIN_PAGE, GncPluginPagePrivate))
#define KEY_SUMMARYBAR_POSITION   "summarybar_position"
#define GNC_TYPE_PLUGIN_PAGE   (gnc_plugin_page_get_type ())
#define GNC_PLUGIN_PAGE(o)   (G_TYPE_CHECK_INSTANCE_CAST ((o), GNC_TYPE_PLUGIN_PAGE, GncPluginPage))
#define GNC_PLUGIN_PAGE_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), GNC_TYPE_PLUGIN_PAGE, GncPluginPageClass))
#define GNC_IS_PLUGIN_PAGE(o)   (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNC_TYPE_PLUGIN_PAGE))
#define GNC_IS_PLUGIN_PAGE_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GNC_TYPE_PLUGIN_PAGE))
#define GNC_PLUGIN_PAGE_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), GNC_PLUGIN_PAGE, GncPluginPageClass))

Typedefs

typedef struct
_GncPluginPagePrivate 
GncPluginPagePrivate
typedef struct GncPluginPage GncPluginPage

Enumerations

enum  {
  INSERTED, REMOVED, SELECTED, UNSELECTED,
  LAST_SIGNAL
}
enum  {
  PROP_0, PROP_PAGE_NAME, PROP_PAGE_COLOR, PROP_PAGE_URI,
  PROP_BOOK, PROP_STATUSBAR_TEXT, PROP_USE_NEW_WINDOW, PROP_UI_DESCRIPTION,
  PROP_UI_MERGE, PROP_ACTION_GROUP
}

Functions

GType gnc_plugin_page_get_type (void)
GtkWidget * gnc_plugin_page_create_widget (GncPluginPage *plugin_page)
void gnc_plugin_page_destroy_widget (GncPluginPage *plugin_page)
void gnc_plugin_page_show_summarybar (GncPluginPage *page, gboolean visible)
void gnc_plugin_page_save_page (GncPluginPage *page, GKeyFile *key_file, const gchar *group_name)
GncPluginPagegnc_plugin_page_recreate_page (GtkWidget *window, const gchar *page_type, GKeyFile *key_file, const gchar *page_group)
void gnc_plugin_page_merge_actions (GncPluginPage *page, GtkUIManager *ui_merge)
void gnc_plugin_page_unmerge_actions (GncPluginPage *page, GtkUIManager *ui_merge)
GtkAction * gnc_plugin_page_get_action (GncPluginPage *page, const gchar *name)
const gchar * gnc_plugin_page_get_plugin_name (GncPluginPage *plugin_page)
void gnc_plugin_page_inserted (GncPluginPage *plugin_page)
void gnc_plugin_page_removed (GncPluginPage *plugin_page)
void gnc_plugin_page_selected (GncPluginPage *plugin_page)
void gnc_plugin_page_unselected (GncPluginPage *plugin_page)
void gnc_plugin_page_add_book (GncPluginPage *page, QofBook *book)
gboolean gnc_plugin_page_has_book (GncPluginPage *page, QofBook *book)
gboolean gnc_plugin_page_has_books (GncPluginPage *page)
GtkWidget * gnc_plugin_page_get_window (GncPluginPage *page)
const gchar * gnc_plugin_page_get_page_name (GncPluginPage *page)
void gnc_plugin_page_set_page_name (GncPluginPage *page, const gchar *name)
const gchar * gnc_plugin_page_get_page_long_name (GncPluginPage *page)
void gnc_plugin_page_set_page_long_name (GncPluginPage *page, const gchar *name)
const gchar * gnc_plugin_page_get_page_color (GncPluginPage *page)
void gnc_plugin_page_set_page_color (GncPluginPage *page, const gchar *color)
const gchar * gnc_plugin_page_get_uri (GncPluginPage *page)
void gnc_plugin_page_set_uri (GncPluginPage *page, const gchar *name)
const gchar * gnc_plugin_page_get_statusbar_text (GncPluginPage *page)
void gnc_plugin_page_set_statusbar_text (GncPluginPage *page, const gchar *message)
gboolean gnc_plugin_page_get_use_new_window (GncPluginPage *page)
void gnc_plugin_page_set_use_new_window (GncPluginPage *page, gboolean use_new)
const gchar * gnc_plugin_page_get_ui_description (GncPluginPage *page)
void gnc_plugin_page_set_ui_description (GncPluginPage *page, const char *ui_filename)
GtkUIManager * gnc_plugin_page_get_ui_merge (GncPluginPage *page)
GtkActionGroup * gnc_plugin_page_get_action_group (GncPluginPage *page)
GtkActionGroup * gnc_plugin_page_create_action_group (GncPluginPage *page, const gchar *group_name)
gboolean gnc_plugin_page_finish_pending (GncPluginPage *page)
void gnc_plugin_page_set_page_name (GncPluginPage *page, const char *name)
void gnc_plugin_page_set_page_long_name (GncPluginPage *page, const char *name)
void gnc_plugin_page_set_page_color (GncPluginPage *page, const char *color)
void gnc_plugin_page_set_uri (GncPluginPage *page, const char *name)
void gnc_plugin_page_set_statusbar_text (GncPluginPage *page, const char *name)

Typedef Documentation

typedef struct GncPluginPage GncPluginPage

The instance data structure for a content plugin.

The instance private data for a content plugin.


Function Documentation

void gnc_plugin_page_add_book ( GncPluginPage page,
QofBook book 
)

Add a book reference to the specified page.

Parameters:
pageThe page to be modified.
bookThe book referenced by this page.

Definition at line 714 of file gnc-plugin-page.c.

{
    GncPluginPagePrivate *priv;

    g_return_if_fail (GNC_IS_PLUGIN_PAGE (page));
    g_return_if_fail (book != NULL);

    priv = GNC_PLUGIN_PAGE_GET_PRIVATE(page);
    priv->books = g_list_append(priv->books, book);
}
GtkActionGroup * gnc_plugin_page_create_action_group ( GncPluginPage page,
const gchar *  group_name 
)

Create the GtkActionGroup object associated with this page.

Parameters:
pageThe page whose menu/toolbar action group should be created.
group_nameThe name associate with this action group. The name is used to associate key bindings with actions, so it should be consistent across all pages of the same type.
Returns:
A pointer to the newly created GtkActionGroup object for this page.

Definition at line 1011 of file gnc-plugin-page.c.

{
    GncPluginPagePrivate *priv;
    GtkActionGroup *group;

    priv = GNC_PLUGIN_PAGE_GET_PRIVATE(page);
    group = gtk_action_group_new(group_name);
    gnc_gtk_action_group_set_translation_domain(group, GETTEXT_PACKAGE);
    priv->action_group = group;
    return group;
}
GtkWidget * gnc_plugin_page_create_widget ( GncPluginPage plugin_page)

Create the display widget that corresponds to this plugin. This function will be called by the main/embedded window manipulation code to create a widget that they can display. The returned widget should encompass all information that goes with this page, including scroll bars, a summary bar, etc.

Parameters:
plugin_pageA pointer to the plugin for which a display widget should be created.
Returns:
A displayable gtk widget.

Definition at line 146 of file gnc-plugin-page.c.

{
    GncPluginPageClass *klass;
    GtkWidget *widget;

    g_return_val_if_fail (GNC_IS_PLUGIN_PAGE (plugin_page), NULL);

    klass = GNC_PLUGIN_PAGE_GET_CLASS (plugin_page);
    g_return_val_if_fail (klass != NULL, NULL);
    g_return_val_if_fail (klass->create_widget != NULL, NULL);

    widget = klass->create_widget (plugin_page);

    /*
     * If there is a destroy function, add a ref so that the
     * widgets will exists when the destroy function is called.
     * Otherwise it will be destroyed when it is removed from the
     * main notebook for the window.
     */
    if (klass->destroy_widget)
        g_object_ref(widget);

    return widget;
}
void gnc_plugin_page_destroy_widget ( GncPluginPage plugin_page)

Destroy the display widget that corresponds to this plugin. This function will be called by the main/embedded window manipulation code when a page is closed.

Parameters:
plugin_pageA pointer to the plugin whose display widget should be destroyed.

Definition at line 176 of file gnc-plugin-page.c.

{
    GncPluginPageClass *klass;

    g_return_if_fail (GNC_IS_PLUGIN_PAGE (plugin_page));

    klass = GNC_PLUGIN_PAGE_GET_CLASS (plugin_page);
    g_return_if_fail (klass != NULL);
    g_return_if_fail (klass->destroy_widget != NULL);

    klass->destroy_widget (plugin_page);
}
gboolean gnc_plugin_page_finish_pending ( GncPluginPage plugin_page)

Tell a page to finish any outstanding activities.

Parameters:
plugin_pageA page.
Returns:
FALSE if the page could not or would not comply, which should cancel the pending operation. TRUE otherwise

Definition at line 1024 of file gnc-plugin-page.c.

{
    if (!page)
        return TRUE;
    if (!GNC_IS_PLUGIN_PAGE(page))
        return TRUE;

    if (!GNC_PLUGIN_PAGE_GET_CLASS(page)->finish_pending)
        return TRUE;
    return (GNC_PLUGIN_PAGE_GET_CLASS(page)->finish_pending)(page);
}
GtkAction * gnc_plugin_page_get_action ( GncPluginPage page,
const gchar *  name 
)

Retrieve a GtkAction object associated with this page.

Parameters:
pageThe page whose menu/toolbar action group should be retrieved.
nameThe name of the GtkAction to find.
Returns:
A pointer to the retuested GtkAction object or NULL.

Definition at line 318 of file gnc-plugin-page.c.

{
    GncPluginPagePrivate *priv;

    g_return_val_if_fail(GNC_IS_PLUGIN_PAGE(page), NULL);
    g_return_val_if_fail(name != NULL, NULL);

    priv = GNC_PLUGIN_PAGE_GET_PRIVATE(page);
    if (!priv->action_group)
        return NULL;
    return gtk_action_group_get_action (priv->action_group, name);
}
GtkActionGroup * gnc_plugin_page_get_action_group ( GncPluginPage page)

Retrieve the GtkActionGroup object associated with this page.

Parameters:
pageThe page whose menu/toolbar action group should be retrieved.
Returns:
A pointer to the GtkActionGroup object for this page.

Definition at line 999 of file gnc-plugin-page.c.

{
    GncPluginPagePrivate *priv;

    g_return_val_if_fail (GNC_IS_PLUGIN_PAGE (page), NULL);
    priv = GNC_PLUGIN_PAGE_GET_PRIVATE(page);
    return priv->action_group;
}
const gchar * gnc_plugin_page_get_page_color ( GncPluginPage page)

Retrieve the color of this page. This is the color string used in the notebook tab.

Parameters:
pageThe page whose name should be retrieved.
Returns:
The color for this page. This string is owned by the page and should not be freed by the caller.

Definition at line 843 of file gnc-plugin-page.c.

{
    GncPluginPagePrivate *priv;

    g_return_val_if_fail (GNC_IS_PLUGIN_PAGE (page), NULL);

    priv = GNC_PLUGIN_PAGE_GET_PRIVATE(page);
    return priv->page_color;
}
const gchar * gnc_plugin_page_get_page_long_name ( GncPluginPage page)

Retrieve the long name of this page. This is the string used in the tooltip that is attached to the page name in the notebook tab.

Parameters:
pageThe page whose name should be retrieved.
Returns:
The page's name. This string is owned by the page and should not be freed by the caller.

Definition at line 814 of file gnc-plugin-page.c.

{
    GncPluginPagePrivate *priv;

    g_return_val_if_fail (GNC_IS_PLUGIN_PAGE (page), NULL);

    priv = GNC_PLUGIN_PAGE_GET_PRIVATE(page);
    return priv->page_long_name;
}
const gchar * gnc_plugin_page_get_page_name ( GncPluginPage page)

Retrieve the name of this page. This is the string used in the window title, and in the notebook tab and page selection menus.

Parameters:
pageThe page whose name should be retrieved.
Returns:
The page's name. This string is owned by the page and should not be freed by the caller.

Definition at line 775 of file gnc-plugin-page.c.

{
    GncPluginPagePrivate *priv;

    g_return_val_if_fail (GNC_IS_PLUGIN_PAGE (page), NULL);

    priv = GNC_PLUGIN_PAGE_GET_PRIVATE(page);
    return priv->page_name;
}
const gchar * gnc_plugin_page_get_plugin_name ( GncPluginPage plugin_page)

Retrieve the textual name of a plugin.

Parameters:
plugin_pageA pointer to the page whose actions name should be retrieved.
Returns:
The name of this plugin. This string is owned by the plugin.

Definition at line 334 of file gnc-plugin-page.c.

{
    GncPluginPageClass *klass;

    g_return_val_if_fail (GNC_IS_PLUGIN_PAGE (plugin_page), NULL);

    klass = GNC_PLUGIN_PAGE_GET_CLASS (plugin_page);
    g_return_val_if_fail (klass != NULL, NULL);

    return (klass->plugin_name);
}
const gchar * gnc_plugin_page_get_statusbar_text ( GncPluginPage page)

Retrieve the statusbar text associated with this page.

Parameters:
pageThe page whose statusbar should text be retrieved.
Returns:
A pointer to the statusbar text for this page. This string is owned by the page and should not be freed by the caller.

Definition at line 899 of file gnc-plugin-page.c.

{
    GncPluginPagePrivate *priv;

    g_return_val_if_fail (GNC_IS_PLUGIN_PAGE (page), NULL);

    priv = GNC_PLUGIN_PAGE_GET_PRIVATE(page);
    return priv->statusbar_text;
}
GType gnc_plugin_page_get_type ( void  )

Get the type of a content plugin.

Returns:
A GType.

Definition at line 111 of file gnc-plugin-page.c.

{
    static GType gnc_plugin_page_type = 0;

    if (gnc_plugin_page_type == 0)
    {
        static const GTypeInfo our_info =
        {

            sizeof (GncPluginPageClass),
            NULL,               /* base_init */
            NULL,               /* base_finalize */
            (GClassInitFunc) gnc_plugin_page_class_init,
            NULL,               /* class_finalize */
            NULL,               /* class_data */
            sizeof (GncPluginPage),
            0,          /* n_preallocs */
            (GInstanceInitFunc) gnc_plugin_page_init,
        };

        gnc_plugin_page_type = g_type_register_static (G_TYPE_OBJECT,
                               "GncPluginPage",
                               &our_info, 0);
    }

    return gnc_plugin_page_type;
}
const char * gnc_plugin_page_get_ui_description ( GncPluginPage page)

Retrieve the name of the XML UI file associated with this page.

Parameters:
pageThe page whose setting should be retrieved.
Returns:
A pointer to the filename used for the UI. This string is owned by the page and should not be freed by the caller.

Definition at line 956 of file gnc-plugin-page.c.

{
    GncPluginPagePrivate *priv;

    g_return_val_if_fail (GNC_IS_PLUGIN_PAGE (page), FALSE);

    priv = GNC_PLUGIN_PAGE_GET_PRIVATE(page);
    return priv->ui_description;
}
GtkUIManager * gnc_plugin_page_get_ui_merge ( GncPluginPage page)

Retrieve the GtkUIManager object associated with this page.

Parameters:
pageThe page whose UI information should be retrieved.
Returns:
A pointer to the GtkUIManager object for this page.

Definition at line 986 of file gnc-plugin-page.c.

{
    GncPluginPagePrivate *priv;

    g_return_val_if_fail(GNC_IS_PLUGIN_PAGE(page), NULL);

    priv = GNC_PLUGIN_PAGE_GET_PRIVATE(page);
    return priv->ui_merge;
}
const gchar * gnc_plugin_page_get_uri ( GncPluginPage page)

Retrieve the Uniform Resource Identifier for this page.

Parameters:
pageThe page whose URI should be retrieved.
Returns:
The URI for this page. This string is owned by the page and should not be freed by the caller.

Definition at line 871 of file gnc-plugin-page.c.

{
    GncPluginPagePrivate *priv;

    g_return_val_if_fail (GNC_IS_PLUGIN_PAGE (page), NULL);

    priv = GNC_PLUGIN_PAGE_GET_PRIVATE(page);
    return priv->uri;
}
gboolean gnc_plugin_page_get_use_new_window ( GncPluginPage page)

Retrieve the "use new window" setting associated with this page.

Parameters:
pageThe page whose setting should be retrieved.
Returns:
Whether this page should be created in a new window.

Definition at line 927 of file gnc-plugin-page.c.

{
    GncPluginPagePrivate *priv;

    g_return_val_if_fail (GNC_IS_PLUGIN_PAGE (page), FALSE);

    priv = GNC_PLUGIN_PAGE_GET_PRIVATE(page);
    return priv->use_new_window;
}
GtkWidget * gnc_plugin_page_get_window ( GncPluginPage page)

Retrieve a pointer to the GncMainWindow (GtkWindow) containing this page.

Parameters:
pageThe page whose window should be retrieved.
Returns:
A pointer to the window.

Definition at line 764 of file gnc-plugin-page.c.

{
    g_return_val_if_fail (GNC_IS_PLUGIN_PAGE (page), NULL);

    return page->window;
}
gboolean gnc_plugin_page_has_book ( GncPluginPage page,
QofBook book 
)

Query a page to see if it has a reference to a given book. This function takes a guid instead of a QofBook because that's what the engine event mechanism provides.

Parameters:
pageThe page to query.
bookThe guid of the book in question.
Returns:
TRUE if the page refers to the specified book. FALSE otherwise.

Definition at line 728 of file gnc-plugin-page.c.

{
    GncPluginPagePrivate *priv;
    GList *item;

    g_return_val_if_fail (GNC_IS_PLUGIN_PAGE (page), FALSE);
    g_return_val_if_fail (book != NULL, FALSE);

    priv = GNC_PLUGIN_PAGE_GET_PRIVATE(page);
    for (item = priv->books; item; item = g_list_next(item))
    {
        if (item->data == book)
        {
            return TRUE;
        }
    }
    return FALSE;
}
gboolean gnc_plugin_page_has_books ( GncPluginPage page)

Query a page to see if it has a reference to any book.

Parameters:
pageThe page to query.
Returns:
TRUE if the page references any books. FALSE otherwise.

Definition at line 750 of file gnc-plugin-page.c.

{
    GncPluginPagePrivate *priv;

    g_return_val_if_fail (GNC_IS_PLUGIN_PAGE (page), FALSE);

    priv = GNC_PLUGIN_PAGE_GET_PRIVATE(page);
    return (priv->books != NULL);
}
void gnc_plugin_page_merge_actions ( GncPluginPage plugin_page,
GtkUIManager *  merge 
)

Add the actions for a content page to the specified window.

Parameters:
plugin_pageA pointer to the page whose actions should be added to the user interface.
mergeA pointer to the UI manager data structure for a window.

Definition at line 281 of file gnc-plugin-page.c.

{
    GncPluginPagePrivate *priv;

    g_return_if_fail (GNC_IS_PLUGIN_PAGE(page));

    priv = GNC_PLUGIN_PAGE_GET_PRIVATE(page);
    priv->ui_merge = ui_merge;
    priv->merge_id = gnc_plugin_add_actions(priv->ui_merge,
                                            priv->action_group,
                                            priv->ui_description);
}
GncPluginPage * gnc_plugin_page_recreate_page ( GtkWidget *  window,
const gchar *  page_type,
GKeyFile *  key_file,
const gchar *  group_name 
)

This function looks up a specific plugin type by name, and then calls a plugin specific function to create a new page and restore its content to a previous state.

Parameters:
windowThe window where this page should be installed.
page_typeThe name of the page type to create.
key_fileA pointer to the GKeyFile data structure where the page information should be read.
group_nameThe group name to use when restoring data.

Definition at line 240 of file gnc-plugin-page.c.

{
    GncPluginPageClass *klass;
    GncPluginPage *page = NULL;
    GType type;

    ENTER("type %s, keyfile %p, group %s", page_type, key_file, page_group);
    type = g_type_from_name(page_type);
    if (type == 0)
    {
        LEAVE("Cannot find type named %s", page_type);
        return NULL;
    }

    klass = g_type_class_ref(type);
    if (klass == NULL)
    {
        const gchar *type_name = g_type_name(type);
        LEAVE("Cannot create class %s(%s)", page_type, type_name ? type_name : "invalid type");
        return NULL;
    }

    if (!klass->recreate_page)
    {
        LEAVE("Class %shas no recreate function.", page_type);
        g_type_class_unref(klass);
        return NULL;
    }

    page = (klass->recreate_page)(window, key_file, page_group);
    g_type_class_unref(klass);
    LEAVE(" ");
    return page;
}
void gnc_plugin_page_save_page ( GncPluginPage page,
GKeyFile *  key_file,
const gchar *  group_name 
)

Call the plugin specific function that will save the state of a content page to a disk. That function must save enough information about the page that it can be recreated next time the user starts gnucash.

Parameters:
pageThe page to save.
key_fileA pointer to the GKeyFile data structure where the page information should be written.
group_nameThe group name to use when saving data.

Definition at line 216 of file gnc-plugin-page.c.

{
    GncPluginPageClass *klass;

    g_return_if_fail (GNC_IS_PLUGIN_PAGE (page));
    g_return_if_fail (key_file != NULL);
    g_return_if_fail (group_name != NULL);

    ENTER(" ");
    klass = GNC_PLUGIN_PAGE_GET_CLASS (page);
    g_return_if_fail (klass != NULL);
    g_return_if_fail (klass->save_page != NULL);

    klass->save_page(page, key_file, group_name);
    LEAVE(" ");
}
void gnc_plugin_page_set_page_color ( GncPluginPage page,
const char *  color 
)

Set the color of this page. This is the color string used in the notebook tab.

Parameters:
pageThe page whose name should be retrieved.
Returns:
The color for this page. This string is owned by the page and should not be freed by the caller.
void gnc_plugin_page_set_page_long_name ( GncPluginPage page,
const char *  name 
)

Set the long name of this page. This is the string used in the tooltip that is attached to the page name in the notebook tab.

Parameters:
pageThe page whose name should be set.
nameThe new string for the name.
void gnc_plugin_page_set_page_name ( GncPluginPage page,
const char *  name 
)

Set the name of this page. This is the string used in the window title, and in the notebook tab and page selection menus.

Parameters:
pageThe page whose name should be set.
nameThe new string for the name.
void gnc_plugin_page_set_statusbar_text ( GncPluginPage page,
const char *  name 
)

Set the statusbar text associated with this page.

Parameters:
pageThe page whose statusbar text should be set.
nameThe new statusbar text for the page.
void gnc_plugin_page_set_ui_description ( GncPluginPage page,
const char *  ui_filename 
)

Set an alternate UI for the specified page. This alternate ui may only use actions specified in the source for the page.

Note:
This function must be called before the page is installed into a window.
Parameters:
pageThe page to modify.
ui_filenameThe filename (no path) of the alternate UI.

Definition at line 970 of file gnc-plugin-page.c.

{
    GncPluginPagePrivate *priv;

    g_return_if_fail(GNC_IS_PLUGIN_PAGE(page));

    priv = GNC_PLUGIN_PAGE_GET_PRIVATE(page);
    if (priv->ui_description)
        g_free(priv->ui_description);
    priv->ui_description = g_strdup(ui_filename);
}
void gnc_plugin_page_set_uri ( GncPluginPage page,
const char *  name 
)

Set the Uniform Resource Identifier for this page.

Parameters:
pageThe page whose URI should be set.
nameThe new URI for the page.
void gnc_plugin_page_set_use_new_window ( GncPluginPage page,
gboolean  use_new 
)

Set the "use new window" setting associated with this page. If this setting is TRUE, the page will be installed into a new window. Otherwise the page will be installed into an existing window.

Parameters:
pageThe page whose setting should be updated.
use_newThe new value for this setting.

Definition at line 943 of file gnc-plugin-page.c.

{
    GncPluginPagePrivate *priv;

    g_return_if_fail (GNC_IS_PLUGIN_PAGE (page));

    priv = GNC_PLUGIN_PAGE_GET_PRIVATE(page);
    priv->use_new_window = use_new;
}
void gnc_plugin_page_show_summarybar ( GncPluginPage page,
gboolean  visible 
)

Show/hide the summarybar associated with this page.

Parameters:
pageThe page whose summarybar visibility should be changed.
visibleWhether or not the summarybar should be shown..

Definition at line 192 of file gnc-plugin-page.c.

{
    g_return_if_fail (GNC_IS_PLUGIN_PAGE (page));

    if (!page->summarybar)
        return;

    if (visible)
    {
        gtk_widget_show(page->summarybar);
    }
    else
    {
        gtk_widget_hide(page->summarybar);
    }
}
void gnc_plugin_page_unmerge_actions ( GncPluginPage plugin_page,
GtkUIManager *  merge 
)

Remove the actions for a content page from the specified window.

Parameters:
plugin_pageA pointer to the page whose actions should be removed from the user interface.
mergeA pointer to the UI manager data structure for a window.

Definition at line 298 of file gnc-plugin-page.c.

{
    GncPluginPagePrivate *priv;

    priv = GNC_PLUGIN_PAGE_GET_PRIVATE(page);

    g_return_if_fail (GNC_IS_PLUGIN_PAGE (page));
    g_return_if_fail (priv->merge_id != 0);
    g_return_if_fail (priv->action_group != NULL);

    gtk_ui_manager_remove_ui(ui_merge, priv->merge_id);
    gtk_ui_manager_remove_action_group(ui_merge, priv->action_group);

    priv->ui_merge = NULL;
    priv->merge_id = 0;
}
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines