GnuCash
5.6-150-g038405b370+
|
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. | |
Data Structures | |
struct | GncPluginPagePrivate |
The instance private data for a content plugin. More... | |
struct | GncPluginPage |
The instance data structure for a content plugin. More... | |
struct | GncPluginPageClass |
The class data structure for a content plugin. More... | |
Macros | |
#define | GNC_PREF_SUMMARYBAR_POSITION_TOP "summarybar-position-top" |
#define | GNC_PREF_SUMMARYBAR_POSITION_BOTTOM "summarybar-position-bottom" |
#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)) |
Enumerations | |
enum | { INSERTED, REMOVED, SELECTED, UNSELECTED, LAST_SIGNAL } |
enum | { PROP_0, PROP_PAGE_NAME, PROP_PAGE_COLOR, PROP_BOOK, PROP_STATUSBAR_TEXT, PROP_USE_NEW_WINDOW, PROP_UI_DESCRIPTION } |
Functions | |
G_DEFINE_TYPE_WITH_CODE (GncPluginPage, gnc_plugin_page, G_TYPE_OBJECT, G_ADD_PRIVATE(GncPluginPage)) | |
void | gnc_plugin_page_destroy_widget (GncPluginPage *plugin_page) |
Destroy the display widget that corresponds to this plugin. More... | |
void | gnc_plugin_page_show_summarybar (GncPluginPage *page, gboolean visible) |
Show/hide the summarybar associated with this page. More... | |
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. More... | |
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. More... | |
void | gnc_plugin_page_merge_actions (GncPluginPage *plugin_page) |
Add the actions for a content page to the specified window. More... | |
GAction * | gnc_plugin_page_get_action (GncPluginPage *page, const gchar *action_name) |
Retrieve a GAction object associated with this page. More... | |
const gchar * | gnc_plugin_page_get_plugin_name (GncPluginPage *plugin_page) |
Retrieve the textual name of a plugin. More... | |
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) |
Add a book reference to the specified page. More... | |
gboolean | gnc_plugin_page_has_book (GncPluginPage *page, QofBook *book) |
Query a page to see if it has a reference to a given book. More... | |
gboolean | gnc_plugin_page_has_books (GncPluginPage *page) |
Query a page to see if it has a reference to any book. More... | |
GtkWidget * | gnc_plugin_page_get_window (GncPluginPage *page) |
Retrieve a pointer to the GncMainWindow (GtkWindow) containing this page. More... | |
const gchar * | gnc_plugin_page_get_page_name (GncPluginPage *page) |
Retrieve the name of this page. More... | |
void | gnc_plugin_page_set_page_name (GncPluginPage *page, const gchar *name) |
const gchar * | gnc_plugin_page_get_page_long_name (GncPluginPage *page) |
Retrieve the long name of this page. More... | |
void | gnc_plugin_page_set_page_long_name (GncPluginPage *page, const gchar *name) |
const gchar * | gnc_plugin_page_get_page_color (GncPluginPage *page) |
Retrieve the color of this page. More... | |
void | gnc_plugin_page_set_page_color (GncPluginPage *page, const gchar *color) |
void | gnc_plugin_page_inserted_cb (GncPluginPage *page, gpointer user_data) |
Set up the page_changed callback for when the current page is changed. More... | |
void | gnc_plugin_page_disconnect_page_changed (GncPluginPage *page) |
Disconnect the page_changed_id signal callback. More... | |
const gchar * | gnc_plugin_page_get_statusbar_text (GncPluginPage *page) |
Retrieve the statusbar text associated with this page. More... | |
void | gnc_plugin_page_set_statusbar_text (GncPluginPage *page, const gchar *message) |
gboolean | gnc_plugin_page_get_use_new_window (GncPluginPage *page) |
Retrieve the "use new window" setting associated with this page. More... | |
void | gnc_plugin_page_set_use_new_window (GncPluginPage *page, gboolean use_new) |
Set the "use new window" setting associated with this page. More... | |
const gchar * | gnc_plugin_page_get_ui_description (GncPluginPage *page) |
Retrieve the name of the XML UI file associated with this page. More... | |
void | gnc_plugin_page_set_ui_description (GncPluginPage *page, const char *ui_filename) |
Set an alternate UI for the specified page. More... | |
GtkBuilder * | gnc_plugin_page_get_builder (GncPluginPage *page) |
Retrieve the GtkBuilder object associated with this page. More... | |
const gchar * | gnc_plugin_page_get_menu_qualifier (GncPluginPage *page) |
Retrieve the menu qualifier for this page. More... | |
void | gnc_plugin_page_set_menu_qualifier (GncPluginPage *page, const char *menu_qualifier) |
Set a qualifier string for this page. More... | |
const gchar * | gnc_plugin_page_get_menu_popup_qualifier (GncPluginPage *page) |
Retrieve the menu popup qualifier for this page. More... | |
void | gnc_plugin_page_set_menu_popup_qualifier (GncPluginPage *page, const char *menu_qualifier) |
Set a qualifier string for this page. More... | |
GSimpleActionGroup * | gnc_plugin_page_get_action_group (GncPluginPage *page) |
Retrieve the GSimpleActionGroup object associated with this page. More... | |
GSimpleActionGroup * | gnc_plugin_page_create_action_group (GncPluginPage *page, const gchar *group_name) |
Create the GSimpleActionGroup object associated with this page. More... | |
const gchar * | gnc_plugin_page_get_simple_action_group_name (GncPluginPage *page) |
Retrieve the simple action group name associated with this plugin page. More... | |
gboolean | gnc_plugin_page_finish_pending (GncPluginPage *plugin_page) |
Tell a page to finish any outstanding activities. More... | |
GType | gnc_plugin_page_get_type (void) |
Get the type of a content plugin. More... | |
GtkWidget * | gnc_plugin_page_create_widget (GncPluginPage *plugin_page) |
Create the display widget that corresponds to this plugin. More... | |
void | gnc_plugin_page_set_page_name (GncPluginPage *page, const char *name) |
Set the name of this page. More... | |
void | gnc_plugin_page_set_page_long_name (GncPluginPage *page, const char *name) |
Set the long name of this page. More... | |
void | gnc_plugin_page_set_page_color (GncPluginPage *page, const char *color) |
Set the color of this page. More... | |
void | gnc_plugin_page_set_statusbar_text (GncPluginPage *page, const char *name) |
Set the statusbar text associated with this page. More... | |
void gnc_plugin_page_add_book | ( | GncPluginPage * | page, |
QofBook * | book | ||
) |
Add a book reference to the specified page.
page | The page to be modified. |
book | The book referenced by this page. |
Definition at line 656 of file gnc-plugin-page.c.
GSimpleActionGroup * gnc_plugin_page_create_action_group | ( | GncPluginPage * | page, |
const gchar * | group_name | ||
) |
Create the GSimpleActionGroup object associated with this page.
page | The page whose menu/toolbar action group should be created. |
group_name | The 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. |
Definition at line 1081 of file gnc-plugin-page.c.
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.
plugin_page | A pointer to the plugin for which a display widget should be created. |
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.
plugin_page | A pointer to the plugin whose display widget should be destroyed. |
Definition at line 152 of file gnc-plugin-page.c.
void gnc_plugin_page_disconnect_page_changed | ( | GncPluginPage * | page | ) |
Disconnect the page_changed_id signal callback.
page | The page whose name should be retrieved. |
Definition at line 901 of file gnc-plugin-page.c.
gboolean gnc_plugin_page_finish_pending | ( | GncPluginPage * | plugin_page | ) |
Tell a page to finish any outstanding activities.
plugin_page | A page. |
Definition at line 1104 of file gnc-plugin-page.c.
GAction * gnc_plugin_page_get_action | ( | GncPluginPage * | page, |
const gchar * | action_name | ||
) |
Retrieve a GAction object associated with this page.
page | The page whose menu/toolbar action group should be retrieved. |
action_name | The name of the GAction to find. |
Definition at line 281 of file gnc-plugin-page.c.
GSimpleActionGroup * gnc_plugin_page_get_action_group | ( | GncPluginPage * | page | ) |
Retrieve the GSimpleActionGroup object associated with this page.
page | The page whose menu/toolbar action group should be retrieved. |
Definition at line 1070 of file gnc-plugin-page.c.
GtkBuilder * gnc_plugin_page_get_builder | ( | GncPluginPage * | page | ) |
Retrieve the GtkBuilder object associated with this page.
page | The page whose UI information should be retrieved. |
Definition at line 1008 of file gnc-plugin-page.c.
const gchar * gnc_plugin_page_get_menu_popup_qualifier | ( | GncPluginPage * | page | ) |
Retrieve the menu popup qualifier for this page.
page | The page whose quailifier string should be retrieved. |
Definition at line 1045 of file gnc-plugin-page.c.
const gchar * gnc_plugin_page_get_menu_qualifier | ( | GncPluginPage * | page | ) |
Retrieve the menu qualifier for this page.
page | The page whose quailifier string should be retrieved. |
Definition at line 1021 of file gnc-plugin-page.c.
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.
page | The page whose name should be retrieved. |
Definition at line 787 of file gnc-plugin-page.c.
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.
page | The page whose name should be retrieved. |
Definition at line 757 of file gnc-plugin-page.c.
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.
page | The page whose name should be retrieved. |
Definition at line 717 of file gnc-plugin-page.c.
const gchar * gnc_plugin_page_get_plugin_name | ( | GncPluginPage * | plugin_page | ) |
Retrieve the textual name of a plugin.
plugin_page | A pointer to the page whose actions name should be retrieved. |
Definition at line 297 of file gnc-plugin-page.c.
const gchar * gnc_plugin_page_get_simple_action_group_name | ( | GncPluginPage * | page | ) |
Retrieve the simple action group name associated with this plugin page.
page | The page whose simple action group should be retrieved. |
Definition at line 1092 of file gnc-plugin-page.c.
const gchar * gnc_plugin_page_get_statusbar_text | ( | GncPluginPage * | page | ) |
Retrieve the statusbar text associated with this page.
page | The page whose statusbar should text be retrieved. |
Definition at line 919 of file gnc-plugin-page.c.
GType gnc_plugin_page_get_type | ( | void | ) |
Get the type of a content plugin.
const char * gnc_plugin_page_get_ui_description | ( | GncPluginPage * | page | ) |
Retrieve the name of the XML UI file associated with this page.
page | The page whose setting should be retrieved. |
Definition at line 977 of file gnc-plugin-page.c.
gboolean gnc_plugin_page_get_use_new_window | ( | GncPluginPage * | page | ) |
Retrieve the "use new window" setting associated with this page.
page | The page whose setting should be retrieved. |
Definition at line 948 of file gnc-plugin-page.c.
GtkWidget * gnc_plugin_page_get_window | ( | GncPluginPage * | page | ) |
Retrieve a pointer to the GncMainWindow (GtkWindow) containing this page.
page | The page whose window should be retrieved. |
Definition at line 706 of file gnc-plugin-page.c.
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.
page | The page to query. |
book | The guid of the book in question. |
Definition at line 670 of file gnc-plugin-page.c.
gboolean gnc_plugin_page_has_books | ( | GncPluginPage * | page | ) |
Query a page to see if it has a reference to any book.
page | The page to query. |
Definition at line 692 of file gnc-plugin-page.c.
void gnc_plugin_page_inserted_cb | ( | GncPluginPage * | page, |
gpointer | user_data | ||
) |
Set up the page_changed callback for when the current page is changed.
This will store a pointer to the page focus function passed as a parameter so that it can be used in setting up the g_idle_add
page | The page the callback is setup for. |
user_data | The page focus function |
Definition at line 881 of file gnc-plugin-page.c.
void gnc_plugin_page_merge_actions | ( | GncPluginPage * | plugin_page | ) |
Add the actions for a content page to the specified window.
plugin_page | A pointer to the page whose actions should be added to the user interface. |
Definition at line 252 of file gnc-plugin-page.c.
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.
window | The window where this page should be installed. |
page_type | The name of the page type to create. |
key_file | A pointer to the GKeyFile data structure where the page information should be read. |
group_name | The group name to use when restoring data. |
Definition at line 212 of file gnc-plugin-page.c.
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.
page | The page to save. |
key_file | A pointer to the GKeyFile data structure where the page information should be written. |
group_name | The group name to use when saving data. |
Definition at line 188 of file gnc-plugin-page.c.
void gnc_plugin_page_set_menu_popup_qualifier | ( | GncPluginPage * | page, |
const char * | menu_qualifier | ||
) |
Set a qualifier string for this page.
This string is used when there is more than one popup menu associated with the page.
page | The page whose qualifier string should be updated. |
menu_qualifier | A string to be used as for the qualifier. |
Definition at line 1056 of file gnc-plugin-page.c.
void gnc_plugin_page_set_menu_qualifier | ( | GncPluginPage * | page, |
const char * | menu_qualifier | ||
) |
Set a qualifier string for this page.
This string is used when there is more than one menu associated with the page.
page | The page whose qualifier string should be updated. |
menu_qualifier | A string to be used as for the qualifier. |
Definition at line 1032 of file gnc-plugin-page.c.
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.
page | The page whose name should be retrieved. |
color | 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.
page | The page whose name should be set. |
name | The 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.
page | The page whose name should be set. |
name | The 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.
page | The page whose statusbar text should be set. |
name | The 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.
page | The page to modify. |
ui_filename | The filename (no path) of the alternate UI. |
Definition at line 991 of file gnc-plugin-page.c.
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.
page | The page whose setting should be updated. |
use_new | The new value for this setting. |
Definition at line 964 of file gnc-plugin-page.c.
void gnc_plugin_page_show_summarybar | ( | GncPluginPage * | page, |
gboolean | visible | ||
) |
Show/hide the summarybar associated with this page.
page | The page whose summarybar visibility should be changed. |
visible | Whether or not the summarybar should be shown.. |
Definition at line 168 of file gnc-plugin-page.c.