An Account Tree Plugin
[Content Plugins]


Files

file  gnc-plugin-page-account-tree.c
 Functions providing a chart of account page.
file  gnc-plugin-page-account-tree.h
 Functions providing a chart of account page.

Data Structures

struct  GncPluginPageAccountTreePrivate
struct  _delete_helper
struct  GncPluginPageAccountTree
struct  GncPluginPageAccountTreeClass

Defines

#define PLUGIN_PAGE_ACCT_TREE_CM_CLASS   "plugin-page-acct-tree"
#define GCONF_SECTION   "window/pages/account_tree"
#define DELETE_DIALOG_FILTER   "filter"
#define DELETE_DIALOG_ACCOUNT   "account"
#define GNC_PLUGIN_PAGE_ACCOUNT_TREE_GET_PRIVATE(o)   (G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_PLUGIN_PAGE_ACCOUNT_TREE, GncPluginPageAccountTreePrivate))
#define GNC_TYPE_PLUGIN_PAGE_ACCOUNT_TREE   (gnc_plugin_page_account_tree_get_type ())
#define GNC_PLUGIN_PAGE_ACCOUNT_TREE(obj)   (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNC_TYPE_PLUGIN_PAGE_ACCOUNT_TREE, GncPluginPageAccountTree))
#define GNC_PLUGIN_PAGE_ACCOUNT_TREE_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), GNC_TYPE_PLUGIN_PAGE_ACCOUNT_TREE, GncPluginPageAccountTreeClass))
#define GNC_IS_PLUGIN_PAGE_ACCOUNT_TREE(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNC_TYPE_PLUGIN_PAGE_ACCOUNT_TREE))
#define GNC_IS_PLUGIN_PAGE_ACCOUNT_TREE_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GNC_TYPE_PLUGIN_PAGE_ACCOUNT_TREE))
#define GNC_PLUGIN_PAGE_ACCOUNT_TREE_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), GNC_TYPE_PLUGIN_PAGE_ACCOUNT_TREE, GncPluginPageAccountTreeClass))
#define GNC_PLUGIN_PAGE_ACCOUNT_TREE_NAME   "GncPluginPageAccountTree"

Typedefs

typedef _delete_helper delete_helper_t

Enumerations

enum  { ACCOUNT_SELECTED, LAST_SIGNAL }

Functions

void gppat_populate_tmas_list (GtkToggleButton *dmrb, gpointer tmas)
void gppat_set_insensitive_iff_rb_active (GtkToggleButton *b, GtkWidget *widget)
GType gnc_plugin_page_account_tree_get_type (void)
GncPluginPagegnc_plugin_page_account_tree_new (void)
Accountgnc_plugin_page_account_tree_get_current_account (GncPluginPageAccountTree *page)


Enumeration Type Documentation

anonymous enum

Enumerator:
ACCOUNT_SELECTED 
LAST_SIGNAL 

Definition at line 77 of file gnc-plugin-page-account-tree.c.

00077      {
00078   ACCOUNT_SELECTED,
00079   LAST_SIGNAL
00080 };


Function Documentation

Account * gnc_plugin_page_account_tree_get_current_account ( GncPluginPageAccountTree page  ) 

Given a pointer to an account tree plugin page, return the selected account (if any).

Parameters:
page The "account tree" page.
Returns:
The currently selected account. NULL if no account is selected.

Definition at line 364 of file gnc-plugin-page-account-tree.c.

00365 {
00366         GncPluginPageAccountTreePrivate *priv;
00367         Account *account;
00368 
00369         priv = GNC_PLUGIN_PAGE_ACCOUNT_TREE_GET_PRIVATE(page);
00370         ENTER("page %p (tree view %p)", page, priv->tree_view);
00371         account = gnc_tree_view_account_get_selected_account (GNC_TREE_VIEW_ACCOUNT(priv->tree_view));
00372         if (account == NULL) {
00373                 LEAVE("no account");
00374                 return NULL;
00375         }
00376 
00377         LEAVE("account %p", account);
00378         return account;
00379 }

GType gnc_plugin_page_account_tree_get_type ( void   ) 

Retrieve the type number for an "account tree" plugin page.

Returns:
The type number.

Definition at line 230 of file gnc-plugin-page-account-tree.c.

00231 {
00232         static GType gnc_plugin_page_account_tree_type = 0;
00233 
00234         if (gnc_plugin_page_account_tree_type == 0) {
00235                 static const GTypeInfo our_info = {
00236                         sizeof (GncPluginPageAccountTreeClass),
00237                         NULL,
00238                         NULL,
00239                         (GClassInitFunc) gnc_plugin_page_account_tree_class_init,
00240                         NULL,
00241                         NULL,
00242                         sizeof (GncPluginPageAccountTree),
00243                         0,
00244                         (GInstanceInitFunc) gnc_plugin_page_account_tree_init
00245                 };
00246                 
00247                 gnc_plugin_page_account_tree_type = g_type_register_static (GNC_TYPE_PLUGIN_PAGE,
00248                                                                             GNC_PLUGIN_PAGE_ACCOUNT_TREE_NAME,
00249                                                                             &our_info, 0);
00250         }
00251 
00252         return gnc_plugin_page_account_tree_type;
00253 }

GncPluginPage * gnc_plugin_page_account_tree_new ( void   ) 

Create a new "account tree" plugin page.

Returns:
The newly created plugin page.

Definition at line 256 of file gnc-plugin-page-account-tree.c.

00257 {
00258         GncPluginPageAccountTree *plugin_page;
00259 
00260         ENTER(" ");
00261         plugin_page = g_object_new (GNC_TYPE_PLUGIN_PAGE_ACCOUNT_TREE,
00262                               NULL);
00263 
00264         LEAVE("new account tree page %p", plugin_page);
00265         return GNC_PLUGIN_PAGE (plugin_page);
00266 }


Generated on Thu Jul 3 05:07:18 2008 for GnuCash by  doxygen 1.5.2