GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
gnc-plugin-basic-commands.c
Go to the documentation of this file.
1 /*
2  * gnc-plugin-basic-commands.c --
3  *
4  * Copyright (C) 2005 David Hampton <[email protected]>
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; either version 2 of
9  * the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, contact:
18  *
19  * Free Software Foundation Voice: +1-617-542-5942
20  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
21  * Boston, MA 02110-1301, USA [email protected]
22  */
23 
33 #include "config.h"
34 
35 #include <gtk/gtk.h>
36 #include <glib/gi18n.h>
37 #include <string.h>
38 
40 #include "gnc-ui-util.h"
41 
42 #include "dialog-book-close.h"
43 #include "dialog-file-access.h"
44 #include "dialog-fincalc.h"
45 #include "dialog-find-transactions.h"
46 #include "dialog-find-transactions2.h"
47 #include "dialog-sx-since-last-run.h"
48 #include "dialog-totd.h"
49 #include "assistant-acct-period.h"
50 #include "assistant-loan.h"
51 #include "gnc-engine.h"
52 #include "gnc-file.h"
53 #include "gnc-gui-query.h"
54 #include "gnc-main-window.h"
55 #include "gnc-ui.h"
56 #include "gnc-window.h"
57 #include "gnc-session.h"
58 #include "gnc-plugin-page-sx-list.h"
60 
61 /* This static indicates the debugging module that this .o belongs to. */
62 G_GNUC_UNUSED static QofLogModule log_module = GNC_MOD_GUI;
63 
64 static void gnc_plugin_basic_commands_class_init (GncPluginBasicCommandsClass *klass);
65 static void gnc_plugin_basic_commands_init (GncPluginBasicCommands *plugin);
66 static void gnc_plugin_basic_commands_finalize (GObject *object);
67 
68 static void gnc_plugin_basic_commands_add_to_window (GncPlugin *plugin, GncMainWindow *window, GQuark type);
69 static void gnc_plugin_basic_commands_main_window_page_changed(GncMainWindow *window, GncPluginPage *page, gpointer user_data);
70 
71 /* Command callbacks */
72 static void gnc_main_window_cmd_file_new (GtkAction *action, GncMainWindowActionData *data);
73 static void gnc_main_window_cmd_file_open (GtkAction *action, GncMainWindowActionData *data);
74 static void gnc_main_window_cmd_file_save (GtkAction *action, GncMainWindowActionData *data);
75 static void gnc_main_window_cmd_file_save_as (GtkAction *action, GncMainWindowActionData *data);
76 static void gnc_main_window_cmd_file_revert (GtkAction *action, GncMainWindowActionData *data);
77 static void gnc_main_window_cmd_file_export_accounts (GtkAction *action, GncMainWindowActionData *data);
78 static void gnc_main_window_cmd_edit_tax_options (GtkAction *action, GncMainWindowActionData *data);
79 static void gnc_main_window_cmd_actions_mortgage_loan (GtkAction *action, GncMainWindowActionData *data);
80 static void gnc_main_window_cmd_actions_scheduled_transaction_editor (GtkAction *action, GncMainWindowActionData *data);
81 static void gnc_main_window_cmd_actions_since_last_run (GtkAction *action, GncMainWindowActionData *data);
82 
83 #if CLOSE_BOOKS_ACTUALLY_WORKS
84 static void gnc_main_window_cmd_actions_close_books (GtkAction *action, GncMainWindowActionData *data);
85 #endif /* CLOSE_BOOKS_ACTUALLY_WORKS */
86 
87 static void gnc_main_window_cmd_tools_financial_calculator (GtkAction *action, GncMainWindowActionData *data);
88 static void gnc_main_window_cmd_tools_close_book (GtkAction *action, GncMainWindowActionData *data);
89 static void gnc_main_window_cmd_tools_find_transactions (GtkAction *action, GncMainWindowActionData *data);
90 static void gnc_main_window_cmd_tools_price_editor (GtkAction *action, GncMainWindowActionData *data);
91 static void gnc_main_window_cmd_tools_commodity_editor (GtkAction *action, GncMainWindowActionData *data);
92 static void gnc_main_window_cmd_help_totd (GtkAction *action, GncMainWindowActionData *data);
93 
94 
95 
96 #define PLUGIN_ACTIONS_NAME "gnc-plugin-basic-commands-actions"
97 #define PLUGIN_UI_FILENAME "gnc-plugin-basic-commands-ui.xml"
98 
101 static GtkActionEntry gnc_plugin_actions [] =
102 {
103 
104  /* File menu */
105 
106  {
107  "FileNewAction", GTK_STOCK_NEW, N_("New _File"), "<control>n",
108  N_("Create a new file"),
109  G_CALLBACK (gnc_main_window_cmd_file_new)
110  },
111  {
112  "FileOpenAction", GTK_STOCK_OPEN, N_("_Open..."), "<control>o",
113  N_("Open an existing GnuCash file"),
114  G_CALLBACK (gnc_main_window_cmd_file_open)
115  },
116  {
117  "FileSaveAction", GTK_STOCK_SAVE, N_("_Save"), "<control>s",
118  N_("Save the current file"),
119  G_CALLBACK (gnc_main_window_cmd_file_save)
120  },
121  {
122  "FileSaveAsAction", GTK_STOCK_SAVE_AS, N_("Save _As..."), "<shift><control>s",
123  N_("Save this file with a different name"),
124  G_CALLBACK (gnc_main_window_cmd_file_save_as)
125  },
126  {
127  "FileRevertAction", GTK_STOCK_REVERT_TO_SAVED, N_("Re_vert"), NULL,
128  N_("Reload the current database, reverting all unsaved changes"),
129  G_CALLBACK (gnc_main_window_cmd_file_revert)
130  },
131  {
132  "FileExportAccountsAction", GTK_STOCK_CONVERT,
133  N_("Export _Accounts"), NULL,
134  N_("Export the account hierarchy to a new GnuCash datafile"),
135  G_CALLBACK (gnc_main_window_cmd_file_export_accounts)
136  },
137 
138  /* Edit menu */
139 
140  {
141  "EditFindTransactionsAction", GTK_STOCK_FIND, N_("_Find..."), "<control>f",
142  N_("Find transactions with a search"),
143  G_CALLBACK (gnc_main_window_cmd_tools_find_transactions)
144  },
145  {
146  "EditTaxOptionsAction", NULL,
147  N_("Ta_x Report Options"), NULL,
148  /* Translators: currently implemented are *
149  * US: income tax and *
150  * DE: VAT *
151  * So adjust this string */
152  N_("Setup relevant accounts for tax reports, e.g. US income tax"),
153  G_CALLBACK (gnc_main_window_cmd_edit_tax_options)
154  },
155 
156  /* Actions menu */
157 
158  { "ActionsScheduledTransactionsAction", NULL, N_("_Scheduled Transactions"), NULL, NULL, NULL },
159  {
160  "ActionsScheduledTransactionEditorAction", NULL, N_("_Scheduled Transaction Editor"), NULL,
161  N_("The list of Scheduled Transactions"),
162  G_CALLBACK (gnc_main_window_cmd_actions_scheduled_transaction_editor)
163  },
164  {
165  "ActionsSinceLastRunAction", NULL, N_("Since _Last Run..."), NULL,
166  N_("Create Scheduled Transactions since the last time run"),
167  G_CALLBACK (gnc_main_window_cmd_actions_since_last_run)
168  },
169  {
170  "ActionsMortgageLoanAction", NULL, N_("_Mortgage & Loan Repayment..."), NULL,
171  N_("Setup scheduled transactions for repayment of a loan"),
172  G_CALLBACK (gnc_main_window_cmd_actions_mortgage_loan)
173  },
174  { "ActionsBudgetAction", NULL, N_("B_udget"), NULL, NULL, NULL },
175 #ifdef CLOSE_BOOKS_ACTUALLY_WORKS
176  {
177  "ActionsCloseBooksAction", NULL, N_("Close _Books"), NULL,
178  N_("Archive old data using accounting periods"),
179  G_CALLBACK (gnc_main_window_cmd_actions_close_books)
180  },
181 #endif // CLOSE_BOOKS_ACTUALLY_WORKS
182 
183  /* Tools menu */
184 
185  {
186  "ToolsPriceEditorAction", NULL, N_("_Price Editor"), NULL,
187  N_("View and edit the prices for stocks and mutual funds"),
188  G_CALLBACK (gnc_main_window_cmd_tools_price_editor)
189  },
190  {
191  "ToolsCommodityEditorAction", NULL, N_("_Security Editor"), NULL,
192  N_("View and edit the commodities for stocks and mutual funds"),
193  G_CALLBACK (gnc_main_window_cmd_tools_commodity_editor)
194  },
195  {
196  "ToolsFinancialCalculatorAction", NULL, N_("_Loan Repayment Calculator"), NULL,
197  N_("Use the loan/mortgage repayment calculator"),
198  G_CALLBACK (gnc_main_window_cmd_tools_financial_calculator)
199  },
200  {
201  "ToolsBookCloseAction", NULL, N_("_Close Book"), NULL,
202  N_("Close the Book at the end of the Period"),
203  G_CALLBACK (gnc_main_window_cmd_tools_close_book)
204  },
205 
206  /* Help menu */
207 
208  {
209  "HelpTipsOfTheDayAction", NULL, N_("_Tips Of The Day"), NULL,
210  N_("View the Tips of the Day"),
211  G_CALLBACK (gnc_main_window_cmd_help_totd)
212  },
213 };
215 static guint gnc_plugin_n_actions = G_N_ELEMENTS (gnc_plugin_actions);
216 
217 
221 static const gchar *gnc_plugin_important_actions[] =
222 {
223  "FileSaveAction",
224  NULL,
225 };
226 
231 static const gchar *readonly_inactive_actions[] =
232 {
233  "ToolsBookCloseAction",
234  NULL
235 };
236 
240 {
241  gpointer dummy;
243 
244 #define GNC_PLUGIN_BASIC_COMMANDS_GET_PRIVATE(o) \
245  (G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_PLUGIN_BASIC_COMMANDS, GncPluginBasicCommandsPrivate))
246 
248 static GObjectClass *parent_class = NULL;
249 
250 
251 /* Get the type of the basic commands menu plugin. */
252 GType
254 {
255  static GType gnc_plugin_basic_commands_type = 0;
256 
257  if (gnc_plugin_basic_commands_type == 0)
258  {
259  static const GTypeInfo our_info =
260  {
262  NULL, /* base_init */
263  NULL, /* base_finalize */
264  (GClassInitFunc) gnc_plugin_basic_commands_class_init,
265  NULL, /* class_finalize */
266  NULL, /* class_data */
267  sizeof (GncPluginBasicCommands),
268  0, /* n_preallocs */
269  (GInstanceInitFunc) gnc_plugin_basic_commands_init
270  };
271 
272  gnc_plugin_basic_commands_type = g_type_register_static (GNC_TYPE_PLUGIN,
273  "GncPluginBasicCommands",
274  &our_info, 0);
275  }
276 
277  return gnc_plugin_basic_commands_type;
278 }
279 
280 
282 GncPlugin *
284 {
285  GncPluginBasicCommands *plugin;
286 
287  /* We just need to mention it, so the GType is registered and will be
288  * reflected during plugin-page restore. */
290 
291  plugin = g_object_new (GNC_TYPE_PLUGIN_BASIC_COMMANDS, NULL);
292 
293  return GNC_PLUGIN (plugin);
294 }
295 
310 static void
311 gnc_plugin_basic_commands_add_to_window (GncPlugin *plugin,
312  GncMainWindow *window,
313  GQuark type)
314 {
315  g_signal_connect(window, "page_changed",
316  G_CALLBACK(gnc_plugin_basic_commands_main_window_page_changed),
317  plugin);
318 }
319 
322 static void update_inactive_actions(GncPluginPage *plugin_page)
323 {
324  GncMainWindow *window;
325  GtkActionGroup *action_group;
326  GtkAction *file_save_action;
327 
328  // We are readonly - so we have to switch particular actions to inactive.
329  gboolean is_readwrite = !qof_book_is_readonly(gnc_get_current_book());
330  gboolean is_dirty = qof_book_session_not_saved (gnc_get_current_book ());
331 
332  // We continue only if the current page is a plugin page
333  if (!plugin_page || !GNC_IS_PLUGIN_PAGE(plugin_page))
334  return;
335 
336  window = GNC_MAIN_WINDOW(plugin_page->window);
337  g_return_if_fail(GNC_IS_MAIN_WINDOW(window));
339  g_return_if_fail(GTK_IS_ACTION_GROUP(action_group));
340 
341  /* Set the action's sensitivity */
342  gnc_plugin_update_actions (action_group, readonly_inactive_actions,
343  "sensitive", is_readwrite);
344  /* FileSaveAction needs to be set separately because it has *two* conditions */
345  file_save_action = gtk_action_group_get_action (action_group,
346  "FileSaveAction");
347  gtk_action_set_sensitive (file_save_action, is_readwrite && is_dirty);
348 }
349 
350 static void
351 gnc_plugin_basic_commands_main_window_page_changed(GncMainWindow *window,
352  GncPluginPage *page,
353  gpointer user_data)
354 {
355  /* Make sure not to call this with a NULL GncPluginPage */
356  if (page)
357  {
358  // Update the action sensitivity due to read-only
359  update_inactive_actions(page);
360  }
361 }
362 
370 static void
371 gnc_plugin_basic_commands_class_init (GncPluginBasicCommandsClass *klass)
372 {
373  GObjectClass *object_class = G_OBJECT_CLASS (klass);
374  GncPluginClass *plugin_class = GNC_PLUGIN_CLASS (klass);
375 
376  parent_class = g_type_class_peek_parent (klass);
377 
378  object_class->finalize = gnc_plugin_basic_commands_finalize;
379 
380  /* plugin info */
381  plugin_class->plugin_name = GNC_PLUGIN_BASIC_COMMANDS_NAME;
382 
383  /* function overrides */
384  plugin_class->add_to_window = gnc_plugin_basic_commands_add_to_window;
385 
386  /* widget addition/removal */
387  plugin_class->actions_name = PLUGIN_ACTIONS_NAME;
388  plugin_class->actions = gnc_plugin_actions;
389  plugin_class->n_actions = gnc_plugin_n_actions;
390  plugin_class->important_actions = gnc_plugin_important_actions;
391  plugin_class->ui_filename = PLUGIN_UI_FILENAME;
392 
393  g_type_class_add_private(klass, sizeof(GncPluginBasicCommandsPrivate));
394 }
395 
396 
402 static void
403 gnc_plugin_basic_commands_init (GncPluginBasicCommands *plugin)
404 {
405 }
406 
407 
416 static void
417 gnc_plugin_basic_commands_finalize (GObject *object)
418 {
419  g_return_if_fail (GNC_IS_PLUGIN_BASIC_COMMANDS (object));
420 
421  G_OBJECT_CLASS (parent_class)->finalize (object);
422 }
423 
424 /************************************************************
425  * Command Callbacks *
426  ************************************************************/
427 
428 static void
429 gnc_main_window_cmd_file_new (GtkAction *action, GncMainWindowActionData *data)
430 {
432  return;
433 
434  gnc_file_new ();
435  /* FIXME GNOME 2 Port (update the title etc.) */
436 }
437 
438 static void
439 gnc_main_window_cmd_file_open (GtkAction *action, GncMainWindowActionData *data)
440 {
441  g_return_if_fail (data != NULL);
442 
444  return;
445 
446  gnc_window_set_progressbar_window (GNC_WINDOW(data->window));
447 #ifdef HAVE_DBI_DBI_H
448  gnc_ui_file_access_for_open();
449 #else
450  gnc_file_open ();
451 #endif
452  gnc_window_set_progressbar_window (NULL);
453 }
454 
455 static void
456 gnc_main_window_cmd_file_save (GtkAction *action, GncMainWindowActionData *data)
457 {
458  g_return_if_fail (data != NULL);
459 
461  return;
462 
463  gnc_window_set_progressbar_window (GNC_WINDOW(data->window));
464  gnc_file_save ();
465  gnc_window_set_progressbar_window (NULL);
466  /* FIXME GNOME 2 Port (update the title etc.) */
467 }
468 
469 static void
470 gnc_main_window_cmd_file_save_as (GtkAction *action, GncMainWindowActionData *data)
471 {
472  g_return_if_fail (data != NULL);
473 
475  return;
476 
477  gnc_window_set_progressbar_window (GNC_WINDOW(data->window));
478 #ifdef HAVE_DBI_DBI_H
479  gnc_ui_file_access_for_save_as();
480 #else
481  gnc_file_save_as ();
482 #endif
483  gnc_window_set_progressbar_window (NULL);
484  /* FIXME GNOME 2 Port (update the title etc.) */
485 }
486 
487 static void
488 gnc_main_window_cmd_file_revert (GtkAction *action, GncMainWindowActionData *data)
489 {
490  g_return_if_fail (data != NULL);
491 
493  return;
494 
495  gnc_window_set_progressbar_window (GNC_WINDOW(data->window));
496 
497  {
498  gchar *filename = gnc_history_get_last();
499  // And actually open the current file again
500  gnc_file_open_file (filename, qof_book_is_readonly(gnc_get_current_book()));
501  g_free(filename);
502  }
503 
504  gnc_window_set_progressbar_window (NULL);
505 }
506 
507 static void
508 gnc_main_window_cmd_file_export_accounts (GtkAction *action, GncMainWindowActionData *data)
509 {
510  g_return_if_fail (data != NULL);
511 
512  gnc_window_set_progressbar_window (GNC_WINDOW(data->window));
513 #ifdef HAVE_DBI_DBI_H
514  gnc_ui_file_access_for_export();
515 #else
516  gnc_file_export ();
517 #endif
518  gnc_window_set_progressbar_window (NULL);
519  /* FIXME GNOME 2 Port (update the title etc.) */
520  /* gnc_refresh_main_window_info (); */
521 }
522 
523 static void
524 gnc_main_window_cmd_edit_tax_options (GtkAction *action, GncMainWindowActionData *data)
525 {
526  g_return_if_fail (data != NULL);
527 
528  gnc_tax_info_dialog (GTK_WIDGET (data->window));
529 }
530 
531 static void
532 gnc_main_window_cmd_actions_scheduled_transaction_editor (GtkAction *action, GncMainWindowActionData *data)
533 {
535  gnc_main_window_open_page(NULL, page);
536 }
537 
538 static void
539 gnc_main_window_cmd_actions_since_last_run (GtkAction *action, GncMainWindowActionData *data)
540 {
541  GncMainWindow *window;
542  GncSxInstanceModel *sx_instances;
543  GncSxSummary summary;
544  GList *auto_created_txns = NULL;
545  const char *nothing_to_do_msg =
546  _( "There are no Scheduled Transactions to be entered at this time." );
547 
548  g_return_if_fail (data != NULL);
549 
550  window = data->window;
551 
552  if (qof_book_is_readonly(gnc_get_current_book()))
553  {
554  /* Is the book read-only? Then don't change anything here. */
555  return;
556  }
557 
558  sx_instances = gnc_sx_get_current_instances();
559  gnc_sx_instance_model_summarize(sx_instances, &summary);
560  gnc_sx_instance_model_effect_change(sx_instances, TRUE, &auto_created_txns, NULL);
561  if (summary.need_dialog)
562  {
563  gnc_ui_sx_since_last_run_dialog(sx_instances, auto_created_txns);
564  auto_created_txns = NULL;
565  }
566  else
567  {
568  if (summary.num_auto_create_no_notify_instances == 0)
569  {
570  gnc_info_dialog(GTK_WIDGET(&window->gtk_window), "%s", nothing_to_do_msg);
571  }
572  else
573  {
574  gnc_info_dialog(GTK_WIDGET(&window->gtk_window), ngettext
575  /* Translators: %d is the number of transactions. This is a
576  ngettext(3) message. */
577  ("There are no Scheduled Transactions to be entered at this time. "
578  "(%d transaction automatically created)",
579  "There are no Scheduled Transactions to be entered at this time. "
580  "(%d transactions automatically created)",
583  }
584  }
585  g_list_free(auto_created_txns);
586  g_object_unref(G_OBJECT(sx_instances));
587 }
588 
589 static void
590 gnc_main_window_cmd_actions_mortgage_loan (GtkAction *action, GncMainWindowActionData *data)
591 {
592  gnc_ui_sx_loan_assistant_create ();
593 }
594 #ifdef CLOSE_BOOKS_ACTUALLY_WORKS
595 static void
596 gnc_main_window_cmd_actions_close_books (GtkAction *action, GncMainWindowActionData *data)
597 {
598  gnc_acct_period_dialog();
599 }
600 #endif /* CLOSE_BOOKS_ACTUALLY_WORKS */
601 
602 static void
603 gnc_main_window_cmd_tools_price_editor (GtkAction *action, GncMainWindowActionData *data)
604 {
605  gnc_set_busy_cursor(NULL, TRUE);
606  gnc_prices_dialog (NULL);
607  gnc_unset_busy_cursor(NULL);
608 }
609 
610 static void
611 gnc_main_window_cmd_tools_commodity_editor (GtkAction *action, GncMainWindowActionData *data)
612 {
613  gnc_set_busy_cursor(NULL, TRUE);
614  gnc_commodities_dialog (NULL);
615  gnc_unset_busy_cursor(NULL);
616 }
617 
618 static void
619 gnc_main_window_cmd_tools_financial_calculator (GtkAction *action, GncMainWindowActionData *data)
620 {
621  gnc_ui_fincalc_dialog_create();
622 }
623 
624 static void
625 gnc_main_window_cmd_tools_close_book (GtkAction *action, GncMainWindowActionData *data)
626 {
627  gnc_ui_close_book(gnc_get_current_book());
628 }
629 
630 static void
631 gnc_main_window_cmd_tools_find_transactions (GtkAction *action, GncMainWindowActionData *data)
632 {
633 
634 #ifdef REGISTER2_ENABLED
635  /*################## Added for Reg2 #################*/
636  gnc_ui_find_transactions_dialog_create2 (NULL);
637  /*################## Added for Reg2 #################*/
638 #else
639  gnc_ui_find_transactions_dialog_create (NULL);
640 #endif
641 }
642 
643 static void
644 gnc_main_window_cmd_help_totd (GtkAction *action, GncMainWindowActionData *data)
645 {
646  g_return_if_fail (data != NULL);
647 
648  gnc_totd_dialog(GTK_WINDOW(data->window), FALSE);
649 }
650 
gint num_auto_create_no_notify_instances
utility functions for the GnuCash UI
Functions that are supported by all types of windows.
GtkWidget * window
void gnc_sx_instance_model_summarize(GncSxInstanceModel *model, GncSxSummary *summary)
void gnc_sx_instance_model_effect_change(GncSxInstanceModel *model, gboolean auto_create_only, GList **created_transaction_guids, GList **creation_errors)
const gchar * ui_filename
Definition: gnc-plugin.h:137
void gnc_main_window_open_page(GncMainWindow *window, GncPluginPage *page)
Functions for adding content to a window.
GType gnc_plugin_basic_commands_get_type(void)
GtkActionEntry * actions
Definition: gnc-plugin.h:122
char * gnc_history_get_last(void)
Functions providing the file history menu.
const gchar ** important_actions
Definition: gnc-plugin.h:134
GncPlugin * gnc_plugin_basic_commands_new(void)
gboolean qof_book_session_not_saved(const QofBook *book)
All type declarations for the whole Gnucash engine.
const gchar * actions_name
Definition: gnc-plugin.h:119
GtkActionGroup * gnc_main_window_get_action_group(GncMainWindow *window, const gchar *group_name)
gboolean qof_book_is_readonly(const QofBook *book)
const gchar * plugin_name
Definition: gnc-plugin.h:112
void gnc_plugin_update_actions(GtkActionGroup *action_group, const gchar **action_names, const gchar *property_name, gboolean value)
Definition: gnc-plugin.c:313
#define PLUGIN_ACTIONS_NAME
GncSxInstanceModel * gnc_sx_get_current_instances(void)
#define GNC_TYPE_PLUGIN_PAGE_SX_LIST
Functions providing a list of scheduled transactions as a plugin page.
GncPluginPage * gnc_plugin_page_sx_list_new(void)
void(* add_to_window)(GncPlugin *plugin, GncMainWindow *window, GQuark type)
Definition: gnc-plugin.h:155
GtkWindow gtk_window
struct GncPluginBasicCommandsPrivate GncPluginBasicCommandsPrivate
gboolean gnc_main_window_all_finish_pending(void)
void gnc_ui_close_book(QofBook *book)
Functions providing a basic set of menu items.
#define PLUGIN_UI_FILENAME
const gchar * QofLogModule
Definition: qofid.h:89