GnuCash c935c2f+
Loading...
Searching...
No Matches
gnc-plugin-aqbanking.c
1/*
2 * gnc-plugin-aqbanking.c --
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of
7 * the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, contact:
16 *
17 * Free Software Foundation Voice: +1-617-542-5942
18 * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
19 * Boston, MA 02110-1301, USA gnu@gnu.org
20 */
21
31#include <config.h>
32
33#include <glib/gi18n.h>
34
35#include "Account.h"
36#include "dialog-ab-trans.h"
38#include "gnc-ab-getbalance.h"
39#include "gnc-ab-gettrans.h"
40#include "gnc-ab-transfer.h"
41#include "gnc-ab-utils.h"
42#include "gnc-ab-kvp.h"
43#include "gnc-gwen-gui.h"
44#include "gnc-file-aqb-import.h"
46#include "gnc-plugin-manager.h"
49#include "gnc-main-window.h"
50#include "gnc-prefs.h"
51#include "gnc-ui-util.h" // for gnc_get_current_book
52
53/* This static indicates the debugging module that this .o belongs to. */
54static QofLogModule log_module = G_LOG_DOMAIN;
55
56static void gnc_plugin_aqbanking_add_to_window(GncPlugin *plugin, GncMainWindow *window, GQuark type);
57static void gnc_plugin_aqbanking_remove_from_window(GncPlugin *plugin, GncMainWindow *window, GQuark type);
58
59/* Object callbacks */
60static void gnc_plugin_ab_main_window_page_added(GncMainWindow *window, GncPluginPage *page, gpointer user_data);
61static void gnc_plugin_ab_main_window_page_changed(GncMainWindow *window, GncPluginPage *page, gpointer user_data);
62static void gnc_plugin_ab_account_selected(GncPluginPage *plugin_page, Account *account, gpointer user_data);
63
64/* Auxiliary functions */
65static Account *main_window_to_account(GncMainWindow *window);
66
67/* Command callbacks */
68static void gnc_plugin_ab_cmd_setup (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
69static void gnc_plugin_ab_cmd_get_balance (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
70static void gnc_plugin_ab_cmd_get_transactions (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
71static void gnc_plugin_ab_cmd_issue_sepatransaction (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
72static void gnc_plugin_ab_cmd_issue_sepainternaltransaction (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
73static void gnc_plugin_ab_cmd_issue_inttransaction (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
74static void gnc_plugin_ab_cmd_issue_sepa_direct_debit (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
75static void gnc_plugin_ab_cmd_view_logwindow (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
76static void gnc_plugin_ab_cmd_aqb_import (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
77
78#define PLUGIN_ACTIONS_NAME "gnc-plugin-aqbanking-actions"
79#define PLUGIN_UI_FILENAME "gnc-plugin-aqbanking.ui"
80
81#define MENU_TOGGLE_ACTION_AB_VIEW_LOGWINDOW "ABViewLogwindowAction"
82
83static GActionEntry gnc_plugin_actions [] =
84{
85 { "OnlineActionsAction", NULL, NULL, NULL, NULL },
86 { "ABSetupAction", gnc_plugin_ab_cmd_setup, NULL, NULL, NULL },
87 { "ABGetBalanceAction", gnc_plugin_ab_cmd_get_balance, NULL, NULL, NULL },
88 { "ABGetTransAction", gnc_plugin_ab_cmd_get_transactions, NULL, NULL, NULL },
89 { "ABIssueSepaTransAction", gnc_plugin_ab_cmd_issue_sepatransaction, NULL, NULL, NULL },
90 { "ABIssueSepaIntTransAction", gnc_plugin_ab_cmd_issue_sepainternaltransaction, NULL, NULL, NULL },
91 { "ABIssueIntTransAction", gnc_plugin_ab_cmd_issue_inttransaction, NULL, NULL, NULL },
92 { "ABIssueSepaDirectDebitAction", gnc_plugin_ab_cmd_issue_sepa_direct_debit, NULL, NULL, NULL },
93 { "AQBankingImportAction", gnc_plugin_ab_cmd_aqb_import, NULL, NULL, NULL },
94 { MENU_TOGGLE_ACTION_AB_VIEW_LOGWINDOW, gnc_plugin_ab_cmd_view_logwindow, NULL, "true", NULL },
95};
97static guint gnc_plugin_n_actions = G_N_ELEMENTS(gnc_plugin_actions);
98
100static const gchar *gnc_plugin_load_ui_items [] =
101{
102 "FilePlaceholder1",
103 "ToolsPlaceholder0",
104 "ActionsPlaceholder1",
105 NULL,
106};
107
108static const gchar *need_account_actions[] =
109{
110 "ABGetBalanceAction",
111 "ABGetTransAction",
112 "ABIssueSepaTransAction",
113#if (AQBANKING_VERSION_INT >= 60400)
114 "ABIssueSepaIntTransAction",
115#endif
116 "ABIssueIntTransAction",
117 "ABIssueSepaDirectDebitAction",
118 NULL
119};
120
121#if (AQBANKING_VERSION_INT < 60400)
122static const gchar *inactive_account_actions[] =
123{
124 "ABIssueSepaIntTransAction",
125 NULL
126};
127#endif
128
129static const gchar *readonly_inactive_actions[] =
130{
131 "OnlineActionsAction",
132 "ABSetupAction",
133 NULL
134};
135
136static GncMainWindow *gnc_main_window = NULL;
137
138/************************************************************
139 * Object Implementation *
140 ************************************************************/
141
143{
144 GncPlugin gnc_plugin;
145};
146
147G_DEFINE_TYPE(GncPluginAqBanking, gnc_plugin_aqbanking, GNC_TYPE_PLUGIN)
148
149GncPlugin *
151{
152 return GNC_PLUGIN(g_object_new(GNC_TYPE_PLUGIN_AQBANKING, (gchar*) NULL));
153}
154
155static void
156gnc_plugin_aqbanking_class_init(GncPluginAqBankingClass *klass)
157{
158 GncPluginClass *plugin_class = GNC_PLUGIN_CLASS(klass);
159
160 /* plugin info */
161 plugin_class->plugin_name = GNC_PLUGIN_AQBANKING_NAME;
162
163 /* widget addition/removal */
164 plugin_class->actions_name = PLUGIN_ACTIONS_NAME;
165 plugin_class->actions = gnc_plugin_actions;
166 plugin_class->n_actions = gnc_plugin_n_actions;
167 plugin_class->ui_filename = PLUGIN_UI_FILENAME;
168 plugin_class->ui_updates = gnc_plugin_load_ui_items;
169 plugin_class->add_to_window = gnc_plugin_aqbanking_add_to_window;
170 plugin_class->remove_from_window = gnc_plugin_aqbanking_remove_from_window;
171}
172
173static void
174gnc_plugin_aqbanking_init(GncPluginAqBanking *plugin)
175{
176}
177
182static void
183gnc_plugin_aqbanking_add_to_window(GncPlugin *plugin, GncMainWindow *window,
184 GQuark type)
185{
186 GAction *action;
187
188 gnc_main_window = window;
189
190 g_signal_connect (window, "page_added",
191 G_CALLBACK(gnc_plugin_ab_main_window_page_added),
192 plugin);
193 g_signal_connect (window, "page_changed",
194 G_CALLBACK(gnc_plugin_ab_main_window_page_changed),
195 plugin);
196
197 action = gnc_main_window_find_action_in_group (window, PLUGIN_ACTIONS_NAME,
198 MENU_TOGGLE_ACTION_AB_VIEW_LOGWINDOW);
199
200 if (action)
201 {
202 GVariant *state = g_action_get_state (G_ACTION(action));
203 g_action_change_state (G_ACTION(action), g_variant_new_boolean (FALSE));
204 g_variant_unref (state);
205 }
206}
207
208static void
209gnc_plugin_aqbanking_remove_from_window(GncPlugin *plugin, GncMainWindow *window,
210 GQuark type)
211{
212 g_signal_handlers_disconnect_by_func(
213 window, G_CALLBACK(gnc_plugin_ab_main_window_page_changed), plugin);
214 g_signal_handlers_disconnect_by_func(
215 window, G_CALLBACK(gnc_plugin_ab_main_window_page_added), plugin);
216}
217
218/************************************************************
219 * Object Callbacks *
220 ************************************************************/
221
226static void
227gnc_plugin_ab_main_window_page_added(GncMainWindow *window, GncPluginPage *page,
228 gpointer user_data)
229{
230 const gchar *page_name;
231
232 ENTER("main window %p, page %p", window, page);
233 if (!GNC_IS_PLUGIN_PAGE(page))
234 {
235 LEAVE("no plugin_page");
236 return;
237 }
238
239 page_name = gnc_plugin_page_get_plugin_name(page);
240 if (!page_name)
241 {
242 LEAVE("no page_name of plugin_page");
243 return;
244 }
245
246 if (strcmp(page_name, GNC_PLUGIN_PAGE_ACCOUNT_TREE_NAME) == 0)
247 {
248 DEBUG("account tree page, adding signal");
249 g_signal_connect(page, "account_selected",
250 G_CALLBACK(gnc_plugin_ab_account_selected), NULL);
251 }
252
253 gnc_plugin_ab_main_window_page_changed(window, page, user_data);
254
255 LEAVE(" ");
256}
257
260static void update_inactive_actions(GncPluginPage *plugin_page)
261{
262 GncMainWindow *window;
263 GSimpleActionGroup *simple_action_group;
264
265 // We are readonly - so we have to switch particular actions to inactive.
266 gboolean is_readwrite = !qof_book_is_readonly(gnc_get_current_book());
267
268 // We continue only if the current page is a plugin page
269 if (!plugin_page || !GNC_IS_PLUGIN_PAGE(plugin_page))
270 return;
271
272 window = GNC_MAIN_WINDOW(plugin_page->window);
273 g_return_if_fail (GNC_IS_MAIN_WINDOW(window));
274 simple_action_group = gnc_main_window_get_action_group (window, PLUGIN_ACTIONS_NAME);
275 g_return_if_fail (G_IS_SIMPLE_ACTION_GROUP(simple_action_group));
276
277 /* Set the action's sensitivity */
278 gnc_plugin_set_actions_enabled (G_ACTION_MAP(simple_action_group), readonly_inactive_actions,
279 is_readwrite);
280}
281
282
287static void
288gnc_plugin_ab_main_window_page_changed (GncMainWindow *window,
289 GncPluginPage *page, gpointer user_data)
290{
291 Account *account = main_window_to_account (window);
292
293 /* Make sure not to call this with a NULL GncPluginPage */
294 if (page)
295 {
296 // Update the menu items according to the selected account
297 gnc_plugin_ab_account_selected (page, account, user_data);
298
299 // Also update the action sensitivity due to read-only
300 update_inactive_actions (page);
301 }
302}
303
308static void
309gnc_plugin_ab_account_selected (GncPluginPage *plugin_page, Account *account,
310 gpointer user_data)
311{
312 GncMainWindow *window;
313 GSimpleActionGroup *simple_action_group;
314 const gchar *bankcode = NULL;
315 const gchar *accountid = NULL;
316
317 g_return_if_fail(GNC_IS_PLUGIN_PAGE(plugin_page));
318 window = GNC_MAIN_WINDOW(plugin_page->window);
319 g_return_if_fail(GNC_IS_MAIN_WINDOW(window));
320 simple_action_group = gnc_main_window_get_action_group (window, PLUGIN_ACTIONS_NAME);
321 g_return_if_fail (G_IS_SIMPLE_ACTION_GROUP(simple_action_group));
322
323 if (account)
324 {
325 bankcode = gnc_ab_get_account_bankcode(account);
326 accountid = gnc_ab_get_account_accountid(account);
327
328 gnc_plugin_set_actions_enabled (G_ACTION_MAP(simple_action_group), need_account_actions,
329 (account && bankcode && *bankcode
330 && accountid && *accountid));
331 gnc_main_window_set_vis_of_items_by_action (window, need_account_actions,
332 TRUE);
333
334#if (AQBANKING_VERSION_INT < 60400)
335 gnc_plugin_set_actions_enabled (G_ACTION_MAP(simple_action_group),
336 inactive_account_actions, FALSE);
337 gnc_main_window_set_vis_of_items_by_action (window, inactive_account_actions,
338 FALSE);
339#endif
340 }
341 else
342 {
343 gnc_plugin_set_actions_enabled (G_ACTION_MAP(simple_action_group),
344 need_account_actions, FALSE);
345 gnc_main_window_set_vis_of_items_by_action (window, need_account_actions,
346 FALSE);
347 }
348
349}
350
351/************************************************************
352 * Auxiliary Functions *
353 ************************************************************/
354
366static Account *
367main_window_to_account(GncMainWindow *window)
368{
369 GncPluginPage *page;
370 const gchar *page_name;
371 Account *account = NULL;
372 const gchar *account_name;
373
374 ENTER("main window %p", window);
375 if (!GNC_IS_MAIN_WINDOW(window))
376 {
377 LEAVE("no main_window");
378 return NULL;
379 }
380
382 if (!GNC_IS_PLUGIN_PAGE(page))
383 {
384 LEAVE("no plugin_page");
385 return NULL;
386 }
387 page_name = gnc_plugin_page_get_plugin_name(page);
388 if (!page_name)
389 {
390 LEAVE("no page_name of plugin_page");
391 return NULL;
392 }
393
394 if (strcmp(page_name, GNC_PLUGIN_PAGE_REGISTER_NAME) == 0)
395 {
396 DEBUG("register page");
398 GNC_PLUGIN_PAGE_REGISTER(page));
399 }
400 else if (strcmp(page_name, GNC_PLUGIN_PAGE_ACCOUNT_TREE_NAME) == 0)
401 {
402 DEBUG("account tree page");
404 GNC_PLUGIN_PAGE_ACCOUNT_TREE(page));
405 }
406 else
407 {
408 account = NULL;
409 }
410 account_name = account ? xaccAccountGetName(account) : NULL;
411 LEAVE("account %s(%p)", account_name ? account_name : "(null)", account);
412 return account;
413}
414
415void
417{
418 GAction *action = gnc_main_window_find_action_in_group (gnc_main_window, PLUGIN_ACTIONS_NAME,
419 MENU_TOGGLE_ACTION_AB_VIEW_LOGWINDOW);
420
421 if (action)
422 {
423 GVariant *state = g_action_get_state (G_ACTION(action));
424 g_action_change_state (G_ACTION(action), g_variant_new_boolean (logwindow_visible));
425 g_variant_unref (state);
426 }
427}
428
429/************************************************************
430 * Command Callbacks *
431 ************************************************************/
432
433static void
434gnc_plugin_ab_cmd_setup (GSimpleAction *simple,
435 GVariant *parameter,
436 gpointer user_data)
437{
438 GncMainWindowActionData *data = user_data;
439 ENTER("action %p, main window data %p", simple, data);
440 gnc_main_window = data->window;
442 LEAVE(" ");
443}
444
445static void
446gnc_plugin_ab_cmd_get_balance (GSimpleAction *simple,
447 GVariant *parameter,
448 gpointer user_data)
449{
450 GncMainWindowActionData *data = user_data;
451 Account *account;
452
453 ENTER("action %p, main window data %p", simple, data);
454 account = main_window_to_account(data->window);
455 if (account == NULL)
456 {
457 PINFO("No AqBanking account selected");
458 LEAVE("no account");
459 return;
460 }
461
462 gnc_main_window = data->window;
463 gnc_ab_getbalance(GTK_WIDGET(data->window), account);
464
465 LEAVE(" ");
466}
467
468static void
469gnc_plugin_ab_cmd_get_transactions (GSimpleAction *simple,
470 GVariant *parameter,
471 gpointer user_data)
472{
473 GncMainWindowActionData *data = user_data;
474 Account *account;
475
476 ENTER("action %p, main window data %p", simple, data);
477 account = main_window_to_account(data->window);
478 if (account == NULL)
479 {
480 PINFO("No AqBanking account selected");
481 LEAVE("no account");
482 return;
483 }
484
485 gnc_main_window = data->window;
486 gnc_ab_gettrans(GTK_WIDGET(data->window), account);
487
488 LEAVE(" ");
489}
490
491static void
492gnc_plugin_ab_cmd_issue_sepatransaction (GSimpleAction *simple,
493 GVariant *parameter,
494 gpointer user_data)
495{
496 GncMainWindowActionData *data = user_data;
497 Account *account;
498
499 ENTER("action %p, main window data %p", simple, data);
500 account = main_window_to_account(data->window);
501 if (account == NULL)
502 {
503 PINFO("No AqBanking account selected");
504 LEAVE("no account");
505 return;
506 }
507
508 gnc_main_window = data->window;
509 gnc_ab_maketrans(GTK_WIDGET(data->window), account, SEPA_TRANSFER);
510
511 LEAVE(" ");
512}
513
514#if (AQBANKING_VERSION_INT >= 60400)
515static void
516gnc_plugin_ab_cmd_issue_sepainternaltransaction (GSimpleAction *simple,
517 GVariant *parameter,
518 gpointer user_data)
519{
520 GncMainWindowActionData *data = user_data;
521 Account *account;
522
523 ENTER("action %p, main window data %p", simple, data);
524 account = main_window_to_account(data->window);
525 if (account == NULL)
526 {
527 PINFO("No AqBanking account selected");
528 LEAVE("no account");
529 return;
530 }
531
532 gnc_main_window = data->window;
533 gnc_ab_maketrans(GTK_WIDGET(data->window), account, SEPA_INTERNAL_TRANSFER);
534
535 LEAVE(" ");
536}
537#else
538static void
539gnc_plugin_ab_cmd_issue_sepainternaltransaction (GSimpleAction *simple,
540 GVariant *parameter,
541 gpointer user_data)
542{
543 GncMainWindowActionData *data = user_data;
544
545 ENTER("action %p, main window data %p", simple, data);
546 PINFO("Sepa Internal Transfer not supported by your aqbanking version!");
547 LEAVE("Sepa Internal Transfer not supported!");
548}
549#endif
550
551static void
552gnc_plugin_ab_cmd_issue_inttransaction (GSimpleAction *simple,
553 GVariant *parameter,
554 gpointer user_data)
555{
556 GncMainWindowActionData *data = user_data;
557 Account *account;
558
559 ENTER("action %p, main window data %p", simple, data);
560 account = main_window_to_account(data->window);
561 if (account == NULL)
562 {
563 PINFO("No AqBanking account selected");
564 LEAVE("no account");
565 return;
566 }
567
568 gnc_main_window = data->window;
569 gnc_ab_maketrans(GTK_WIDGET(data->window), account,
570 SINGLE_INTERNAL_TRANSFER);
571
572 LEAVE(" ");
573}
574
575static void
576gnc_plugin_ab_cmd_issue_sepa_direct_debit (GSimpleAction *simple,
577 GVariant *parameter,
578 gpointer user_data)
579{
580 GncMainWindowActionData *data = user_data;
581 Account *account;
582
583 ENTER("action %p, main window data %p", simple, data);
584 account = main_window_to_account(data->window);
585 if (account == NULL)
586 {
587 PINFO("No AqBanking account selected");
588 LEAVE("no account");
589 return;
590 }
591
592 gnc_main_window = data->window;
593 gnc_ab_maketrans(GTK_WIDGET(data->window), account, SEPA_DEBITNOTE);
594
595 LEAVE(" ");
596}
597
598static void
599gnc_plugin_ab_cmd_view_logwindow (GSimpleAction *simple,
600 GVariant *parameter,
601 gpointer user_data)
602{
603 GVariant *state = g_action_get_state (G_ACTION(simple));
604 gboolean toggle = g_variant_get_boolean (state);
605 g_variant_unref (state);
606
607 gboolean new_toggle = !toggle;
608 g_action_change_state (G_ACTION(simple), g_variant_new_boolean (new_toggle));
609
610 if (new_toggle)
611 {
613 {
614 /* Log window could not be made visible */
615 g_action_change_state (G_ACTION(simple), g_variant_new_boolean (FALSE));
616 }
617 }
618 else
619 {
621 }
622}
623
624static void
625gnc_plugin_ab_cmd_aqb_import (GSimpleAction *simple,
626 GVariant *parameter,
627 gpointer user_data)
628{
629 GncMainWindowActionData *data = user_data;
630 gnc_main_window = data->window;
631 gnc_file_aqbanking_import_dialog (GTK_WINDOW (gnc_main_window));
632}
633
634/************************************************************
635 * Plugin Bootstrapping *
636 ************************************************************/
637
638void
Account handling public routines.
AqBanking setup functionality.
Dialog for AqBanking transaction data.
AqBanking getbalance functions.
AqBanking KVP handling.
Dialog for AqBanking transaction data.
AqBanking utility functions.
GUI callbacks for AqBanking.
Functions for adding content to a window.
Plugin registration of the AqBanking module.
Plugin management functions for the GnuCash UI.
Functions providing a chart of account page.
Functions providing a register page for the GnuCash UI.
Generic api to store and retrieve preferences.
utility functions for the GnuCash UI
const char * xaccAccountGetName(const Account *acc)
Get the account's name.
Definition Account.cpp:3289
const gchar * gnc_ab_get_account_bankcode(const Account *a)
Return the bankcode string in the Account a.
Definition gnc-ab-kvp.c:59
gboolean gnc_GWEN_Gui_show_dialog()
Unhides Online Banking Connection Window (Make log visible)
void gnc_plugin_aqbanking_create_plugin(void)
Create a new GncPluginAqBanking object and register it.
void gnc_ab_initial_assistant(void)
Create and show an assistant for the aqbanking setup.
GncPlugin * gnc_plugin_aqbanking_new(void)
void gnc_ab_getbalance(GtkWidget *parent, Account *gnc_acc)
Execute a GetBalance job, show the resulting balance and offer to reconcile the GnuCash account.
void gnc_ab_maketrans(GtkWidget *parent, Account *gnc_acc, GncABTransType trans_type)
Create SEPA transfers.
void gnc_GWEN_Gui_hide_dialog()
Hides Online Banking Connection Window (Close log window)
const gchar * gnc_ab_get_account_accountid(const Account *a)
Return accountid string in the Account a.
Definition gnc-ab-kvp.c:39
void gnc_plugin_aqbanking_set_logwindow_visible(gboolean logwindow_visible)
Set MENU_TOGGLE_ACTION_AB_VIEW_LOGWINDOW.
void gnc_ab_gettrans(GtkWidget *parent, Account *gnc_acc)
Execute a GetTransactions job.
void gnc_file_aqbanking_import_dialog(GtkWindow *parent)
Import files via AQBanking's Import Dialog.
gboolean qof_book_is_readonly(const QofBook *book)
Return whether the book is read only.
Definition qofbook.cpp:497
const gchar * gnc_plugin_page_get_plugin_name(GncPluginPage *plugin_page)
Retrieve the textual name of a plugin.
GAction * gnc_main_window_find_action_in_group(GncMainWindow *window, const gchar *group_name, const gchar *action_name)
Find the GAction in a specific action group for window.
GncPluginPage * gnc_main_window_get_current_page(GncMainWindow *window)
Retrieve a pointer to the page that is currently at the front of the specified window.
GSimpleActionGroup * gnc_main_window_get_action_group(GncMainWindow *window, const gchar *group_name)
Retrieve a specific set of user interface actions from a window.
void gnc_main_window_set_vis_of_items_by_action(GncMainWindow *window, const gchar **action_names, gboolean vis)
Show or hide menu and toolbar items based on a NULL terminated list of action names.
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).
#define PINFO(format, args...)
Print an informational note.
Definition qoflog.h:256
#define DEBUG(format, args...)
Print a debugging message.
Definition qoflog.h:264
#define LEAVE(format, args...)
Print a function exit debugging message.
Definition qoflog.h:282
#define ENTER(format, args...)
Print a function entry debugging message.
Definition qoflog.h:272
void gnc_plugin_set_actions_enabled(GActionMap *action_map, const gchar **action_names, gboolean enable)
This function sets the sensitivity of a GAction in a specific group.
Definition gnc-plugin.c:250
void gnc_plugin_manager_add_plugin(GncPluginManager *manager, GncPlugin *plugin)
Add a plugin to the list maintained by the plugin manager.
GncPluginManager * gnc_plugin_manager_get(void)
Retrieve a pointer to the plugin manager.
Account * gnc_plugin_page_register_get_account(GncPluginPageRegister *page)
Get the Account associated with this register page.
STRUCTS.
The instance data structure for a content plugin.
GtkWidget * window
The window that contains the display widget for this plugin.