GnuCash  5.6-150-g038405b370+
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 <hampton@employees.org>
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 gnu@gnu.org
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 #include "gnc-component-manager.h"
42 
43 #include "dialog-doclink.h"
44 #include "dialog-book-close.h"
45 #include "dialog-file-access.h"
46 #include "dialog-fincalc.h"
47 #include "dialog-find-transactions.h"
48 #include "dialog-imap-editor.h"
49 #include "dialog-sx-since-last-run.h"
50 #include "dialog-totd.h"
51 #include "assistant-acct-period.h"
52 #include "assistant-loan.h"
53 #include "gnc-engine.h"
54 #include "gnc-file.h"
55 #include "gnc-gui-query.h"
56 #include "gnc-main-window.h"
57 #include "gnc-ui.h"
58 #include "gnc-window.h"
59 #include "gnc-session.h"
60 #include "gnc-plugin-page-sx-list.h"
62 
63 /* This static indicates the debugging module that this .o belongs to. */
64 G_GNUC_UNUSED static QofLogModule log_module = GNC_MOD_GUI;
65 
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 (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
73 static void gnc_main_window_cmd_file_open (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
74 static void gnc_main_window_cmd_file_save (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
75 static void gnc_main_window_cmd_file_save_as (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
76 static void gnc_main_window_cmd_file_revert (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
77 static void gnc_main_window_cmd_file_export_accounts (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
78 static void gnc_main_window_cmd_edit_tax_options (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
79 static void gnc_main_window_cmd_actions_mortgage_loan (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
80 static void gnc_main_window_cmd_actions_scheduled_transaction_editor (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
81 static void gnc_main_window_cmd_actions_since_last_run (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
82 
83 #if CLOSE_BOOKS_ACTUALLY_WORKS
84 static void gnc_main_window_cmd_actions_close_books (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
85 #endif /* CLOSE_BOOKS_ACTUALLY_WORKS */
86 
87 static void gnc_main_window_cmd_tools_financial_calculator (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
88 static void gnc_main_window_cmd_tools_close_book (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
89 static void gnc_main_window_cmd_tools_find_transactions (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
90 static void gnc_main_window_cmd_tools_price_editor (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
91 static void gnc_main_window_cmd_tools_imap_editor (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
92 static void gnc_main_window_cmd_tools_trans_doclink (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
93 static void gnc_main_window_cmd_tools_commodity_editor (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
94 static void gnc_main_window_cmd_help_totd (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
95 
96 
97 
98 #define PLUGIN_ACTIONS_NAME "gnc-plugin-basic-commands-actions"
99 #define PLUGIN_UI_FILENAME "gnc-plugin-basic-commands.ui"
100 
103 static GActionEntry gnc_plugin_actions [] =
104 {
105  { "FileNewAction", gnc_main_window_cmd_file_new, NULL, NULL, NULL },
106  { "FileOpenAction", gnc_main_window_cmd_file_open, NULL, NULL, NULL },
107  { "FileSaveAction", gnc_main_window_cmd_file_save, NULL, NULL, NULL },
108  { "FileSaveAsAction", gnc_main_window_cmd_file_save_as, NULL, NULL, NULL },
109  { "FileRevertAction", gnc_main_window_cmd_file_revert, NULL, NULL, NULL },
110  { "FileExportAccountsAction", gnc_main_window_cmd_file_export_accounts, NULL, NULL, NULL },
111  { "EditFindTransactionsAction", gnc_main_window_cmd_tools_find_transactions, NULL, NULL, NULL },
112  { "EditTaxOptionsAction", gnc_main_window_cmd_edit_tax_options, NULL, NULL, NULL },
113  { "ActionsScheduledTransactionsAction", NULL, NULL, NULL, NULL },
114  { "ActionsScheduledTransactionEditorAction", gnc_main_window_cmd_actions_scheduled_transaction_editor, NULL, NULL, NULL },
115  { "ActionsSinceLastRunAction", gnc_main_window_cmd_actions_since_last_run, NULL, NULL, NULL },
116  { "ActionsMortgageLoanAction", gnc_main_window_cmd_actions_mortgage_loan, NULL, NULL, NULL },
117  { "ActionsBudgetAction", NULL, NULL, NULL, NULL },
118 #ifdef CLOSE_BOOKS_ACTUALLY_WORKS
119  { "ActionsCloseBooksAction", gnc_main_window_cmd_actions_close_books, NULL, NULL, NULL },
120 #endif // CLOSE_BOOKS_ACTUALLY_WORKS
121  { "ToolsPriceEditorAction", gnc_main_window_cmd_tools_price_editor, NULL, NULL, NULL },
122  { "ToolsCommodityEditorAction", gnc_main_window_cmd_tools_commodity_editor, NULL, NULL, NULL },
123  { "ToolsFinancialCalculatorAction", gnc_main_window_cmd_tools_financial_calculator, NULL, NULL, NULL },
124  { "ToolsBookCloseAction", gnc_main_window_cmd_tools_close_book, NULL, NULL, NULL },
125  { "ToolsImapEditorAction", gnc_main_window_cmd_tools_imap_editor, NULL, NULL, NULL },
126  { "ToolsTransLinkedDocsAction", gnc_main_window_cmd_tools_trans_doclink, NULL, NULL, NULL },
127  { "HelpTipsOfTheDayAction", gnc_main_window_cmd_help_totd, NULL, NULL, NULL },
128 };
130 static guint gnc_plugin_n_actions = G_N_ELEMENTS(gnc_plugin_actions);
131 
133 static const gchar *gnc_plugin_load_ui_items [] =
134 {
135  "FilePlaceholder0",
136  "FilePlaceholder2",
137  "FilePlaceholder3",
138  "FilePlaceholder5",
139  "EditPlaceholder3",
140  "EditPlaceholder5",
141  "ActionsPlaceholder2",
142  "ToolsPlaceholder1",
143  "HelpPlaceholder1",
144  NULL,
145 };
146 
149 static const gchar *gnc_plugin_initially_insensitive_actions[] =
150 {
151  "FileSaveAction",
152  NULL,
153 };
154 
159 static const gchar *readwrite_only_active_actions[] =
160 {
161  "ToolsBookCloseAction",
162  NULL
163 };
164 
171 static const gchar *dirty_only_active_actions[] =
172 {
173  "FileSaveAction",
174  "FileRevertAction",
175  NULL
176 };
177 
180 {
182  GncPlugin gnc_plugin;
183 };
184 
186 GncPlugin *
188 {
189  GncPluginBasicCommands *plugin;
190 
191  /* We just need to mention it, so the GType is registered and will be
192  * reflected during plugin-page restore. */
194 
195  plugin = g_object_new (GNC_TYPE_PLUGIN_BASIC_COMMANDS, NULL);
196 
197  return GNC_PLUGIN (plugin);
198 }
199 
214 static void
215 gnc_plugin_basic_commands_add_to_window (GncPlugin *plugin,
216  GncMainWindow *window,
217  GQuark type)
218 {
219  GSimpleActionGroup *simple_action_group =
221 
222  gnc_plugin_set_actions_enabled (G_ACTION_MAP(simple_action_group),
223  gnc_plugin_initially_insensitive_actions,
224  FALSE);
225 
226  g_signal_connect (window, "page_changed",
227  G_CALLBACK(gnc_plugin_basic_commands_main_window_page_changed),
228  plugin);
229 }
230 
233 static void update_inactive_actions (GncPluginPage *plugin_page)
234 {
235  GncMainWindow *window;
236  GSimpleActionGroup *simple_action_group;
237 
238  // We are readonly - so we have to switch particular actions to inactive.
239  gboolean is_readwrite = !qof_book_is_readonly(gnc_get_current_book());
240  gboolean is_dirty = qof_book_session_not_saved (gnc_get_current_book ());
241 
242  // We continue only if the current page is a plugin page
243  if (!plugin_page || !GNC_IS_PLUGIN_PAGE(plugin_page))
244  return;
245 
246  window = GNC_MAIN_WINDOW(plugin_page->window);
247  g_return_if_fail(GNC_IS_MAIN_WINDOW(window));
248  simple_action_group = gnc_main_window_get_action_group(window, PLUGIN_ACTIONS_NAME);
249  g_return_if_fail (G_IS_SIMPLE_ACTION_GROUP(simple_action_group));
250 
251  /* Set the action's sensitivity */
252  gnc_plugin_set_actions_enabled (G_ACTION_MAP(simple_action_group), readwrite_only_active_actions,
253  is_readwrite);
254  gnc_plugin_set_actions_enabled (G_ACTION_MAP(simple_action_group), dirty_only_active_actions,
255  is_dirty);
256 }
257 
258 static void
259 gnc_plugin_basic_commands_main_window_page_changed (GncMainWindow *window,
260  GncPluginPage *plugin_page,
261  gpointer user_data)
262 {
263  /* Make sure not to call this with a NULL GncPluginPage */
264  if (plugin_page)
265  {
266  // Update the action sensitivity due to read-only
267  update_inactive_actions (plugin_page);
268  }
269 }
270 
271 G_DEFINE_TYPE(GncPluginBasicCommands, gnc_plugin_basic_commands, GNC_TYPE_PLUGIN)
272 
273 
280 static void
281 gnc_plugin_basic_commands_class_init (GncPluginBasicCommandsClass *klass)
282 {
283  GObjectClass *object_class = G_OBJECT_CLASS (klass);
284  GncPluginClass *plugin_class = GNC_PLUGIN_CLASS (klass);
285 
286  object_class->finalize = gnc_plugin_basic_commands_finalize;
287 
288  /* plugin info */
289  plugin_class->plugin_name = GNC_PLUGIN_BASIC_COMMANDS_NAME;
290 
291  /* function overrides */
292  plugin_class->add_to_window = gnc_plugin_basic_commands_add_to_window;
293 
294  /* widget addition/removal */
295  plugin_class->actions_name = PLUGIN_ACTIONS_NAME;
296  plugin_class->actions = gnc_plugin_actions;
297  plugin_class->n_actions = gnc_plugin_n_actions;
298  plugin_class->ui_filename = PLUGIN_UI_FILENAME;
299  plugin_class->ui_updates = gnc_plugin_load_ui_items;
300 }
301 
302 
308 static void
309 gnc_plugin_basic_commands_init (GncPluginBasicCommands *plugin)
310 {
311 }
312 
313 
322 static void
323 gnc_plugin_basic_commands_finalize (GObject *object)
324 {
325  g_return_if_fail (GNC_IS_PLUGIN_BASIC_COMMANDS(object));
326 
327  G_OBJECT_CLASS(gnc_plugin_basic_commands_parent_class)->finalize (object);
328 }
329 
330 /************************************************************
331  * Command Callbacks *
332  ************************************************************/
333 
334 static void
335 gnc_main_window_cmd_file_new (GSimpleAction *simple,
336  GVariant *parameter,
337  gpointer user_data)
338 {
339  GncMainWindowActionData *data = user_data;
340 
342  return;
343 
344  gnc_file_new (GTK_WINDOW(data->window));
345 }
346 
347 static void
348 gnc_main_window_cmd_file_open (GSimpleAction *simple,
349  GVariant *parameter,
350  gpointer user_data)
351 {
352  GncMainWindowActionData *data = user_data;
353 
354  g_return_if_fail (data != NULL);
355 
357  return;
358 
359  /* Reset the flag that indicates the conversion of the bayes KVP
360  * entries has been run */
362 
363  gnc_window_set_progressbar_window (GNC_WINDOW(data->window));
364 #ifdef HAVE_DBI_DBI_H
365  gnc_ui_file_access_for_open (GTK_WINDOW(data->window));
366 #else
367  gnc_file_open (GTK_WINDOW(data->window));
368 #endif
369  gnc_window_set_progressbar_window (NULL);
370 }
371 
372 static void
373 gnc_main_window_cmd_file_save (GSimpleAction *simple,
374  GVariant *parameter,
375  gpointer user_data)
376 {
377  GncMainWindowActionData *data = user_data;
378 
379  g_return_if_fail (data != NULL);
380 
382  gnc_file_save_in_progress())
383  return;
384 
385  gnc_window_set_progressbar_window (GNC_WINDOW(data->window));
386  gnc_file_save (GTK_WINDOW(data->window));
387  gnc_window_set_progressbar_window (NULL);
388 }
389 
390 static void
391 gnc_main_window_cmd_file_save_as (GSimpleAction *simple,
392  GVariant *parameter,
393  gpointer user_data)
394 {
395  GncMainWindowActionData *data = user_data;
396 
397  g_return_if_fail (data != NULL);
398 
400  gnc_file_save_in_progress())
401  return;
402 
403  gnc_window_set_progressbar_window (GNC_WINDOW(data->window));
404 #ifdef HAVE_DBI_DBI_H
405  gnc_ui_file_access_for_save_as (GTK_WINDOW(data->window));
406 #else
407  gnc_file_save_as (GTK_WINDOW(data->window));
408 #endif
409  gnc_window_set_progressbar_window (NULL);
410 }
411 
412 static void
413 gnc_main_window_cmd_file_revert (GSimpleAction *simple,
414  GVariant *parameter,
415  gpointer user_data)
416 {
417  GncMainWindowActionData *data = user_data;
418 
419  g_return_if_fail (data != NULL);
420 
422  return;
423 
424  gnc_window_set_progressbar_window (GNC_WINDOW(data->window));
425  gnc_file_revert (GTK_WINDOW(data->window));
426  gnc_window_set_progressbar_window (NULL);
427 }
428 
429 static void
430 gnc_main_window_cmd_file_export_accounts (GSimpleAction *simple,
431  GVariant *parameter,
432  gpointer user_data)
433 {
434  GncMainWindowActionData *data = user_data;
435 
436  g_return_if_fail (data != NULL);
437 
438  gnc_window_set_progressbar_window (GNC_WINDOW(data->window));
439 #ifdef HAVE_DBI_DBI_H
440  gnc_ui_file_access_for_export (GTK_WINDOW(data->window));
441 #else
442  gnc_file_export (GTK_WINDOW(data->window));
443 #endif
444  gnc_window_set_progressbar_window (NULL);
445 }
446 
447 static void
448 gnc_main_window_cmd_edit_tax_options (GSimpleAction *simple,
449  GVariant *parameter,
450  gpointer user_data)
451 {
452  GncMainWindowActionData *data = user_data;
453 
454  g_return_if_fail (data != NULL);
455 
456  gnc_tax_info_dialog (GTK_WIDGET(data->window), NULL);
457 }
458 
459 static void
460 gnc_main_window_cmd_actions_scheduled_transaction_editor (GSimpleAction *simple,
461  GVariant *parameter,
462  gpointer user_data)
463 {
465  gnc_main_window_open_page (NULL, page);
466 }
467 
468 static void
469 gnc_main_window_cmd_actions_since_last_run (GSimpleAction *simple,
470  GVariant *parameter,
471  gpointer user_data)
472 {
473  GncMainWindowActionData *data = user_data;
474  GtkWindow *window;
475  GncSxInstanceModel *sx_instances;
476  GncSxSummary summary;
477  GList *auto_created_txns = NULL;
478  GList *creation_errors = NULL;
479  const char *nothing_to_do_msg =
480  _( "There are no Scheduled Transactions to be entered at this time." );
481 
482  g_return_if_fail (data != NULL);
483 
484  window = GTK_WINDOW(data->window);
485 
486  if (qof_book_is_readonly (gnc_get_current_book()))
487  {
488  /* Is the book read-only? Then don't change anything here. */
489  return;
490  }
491 
492  sx_instances = gnc_sx_get_current_instances();
493  gnc_sx_instance_model_summarize(sx_instances, &summary);
494  gnc_sx_instance_model_effect_change(sx_instances, TRUE, &auto_created_txns,
495  &creation_errors);
496 
497  if (auto_created_txns)
498  gnc_gui_refresh_all();
499 
500  if (summary.need_dialog)
501  {
502  gnc_ui_sx_since_last_run_dialog (window, sx_instances, auto_created_txns);
503  auto_created_txns = NULL;
504  }
505  else
506  {
507  if (summary.num_auto_create_no_notify_instances == 0)
508  {
509  gnc_info_dialog (window, "%s", nothing_to_do_msg);
510  }
511  else
512  {
513  gnc_info_dialog (window, ngettext
514  /* Translators: %d is the number of transactions. This is a
515  ngettext(3) message. */
516  ("There are no Scheduled Transactions to be entered at this time. "
517  "(%d transaction automatically created)",
518  "There are no Scheduled Transactions to be entered at this time. "
519  "(%d transactions automatically created)",
522  }
523  }
524  g_list_free (auto_created_txns);
525  g_object_unref (G_OBJECT(sx_instances));
526 
527  if (creation_errors)
528  gnc_ui_sx_creation_error_dialog (&creation_errors);
529 }
530 
531 static void
532 gnc_main_window_cmd_actions_mortgage_loan (GSimpleAction *simple,
533  GVariant *parameter,
534  gpointer user_data)
535 {
536  gnc_ui_sx_loan_assistant_create ();
537 }
538 #ifdef CLOSE_BOOKS_ACTUALLY_WORKS
539 static void
540 gnc_main_window_cmd_actions_close_books (GSimpleAction *simple,
541  GVariant *parameter,
542  gpointer user_data)
543 {
544  GncMainWindowActionData *data = user_data;
545  gnc_acct_period_dialog ();
546 }
547 #endif /* CLOSE_BOOKS_ACTUALLY_WORKS */
548 
549 static void
550 gnc_main_window_cmd_tools_imap_editor (GSimpleAction *simple,
551  GVariant *parameter,
552  gpointer user_data)
553 {
554  GncMainWindowActionData *data = user_data;
555  gnc_set_busy_cursor (NULL, TRUE);
556  gnc_imap_dialog (GTK_WIDGET(data->window));
557  gnc_unset_busy_cursor (NULL);
558 }
559 
560 static void
561 gnc_main_window_cmd_tools_trans_doclink (GSimpleAction *simple,
562  GVariant *parameter,
563  gpointer user_data)
564 {
565  GncMainWindowActionData *data = user_data;
566  gnc_set_busy_cursor (NULL, TRUE);
567  gnc_doclink_trans_dialog (GTK_WINDOW(data->window));
568  gnc_unset_busy_cursor (NULL);
569 }
570 
571 static void
572 gnc_main_window_cmd_tools_price_editor (GSimpleAction *simple,
573  GVariant *parameter,
574  gpointer user_data)
575 {
576  GncMainWindowActionData *data = user_data;
577  gnc_set_busy_cursor (NULL, TRUE);
578  gnc_prices_dialog (GTK_WIDGET(data->window));
579  gnc_unset_busy_cursor (NULL);
580 }
581 
582 static void
583 gnc_main_window_cmd_tools_commodity_editor (GSimpleAction *simple,
584  GVariant *parameter,
585  gpointer user_data)
586 {
587  GncMainWindowActionData *data = user_data;
588  gnc_set_busy_cursor (NULL, TRUE);
589  gnc_commodities_dialog (GTK_WIDGET(data->window));
590  gnc_unset_busy_cursor (NULL);
591 }
592 
593 static void
594 gnc_main_window_cmd_tools_financial_calculator (GSimpleAction *simple,
595  GVariant *parameter,
596  gpointer user_data)
597 {
598  GncMainWindowActionData *data = user_data;
599  gnc_ui_fincalc_dialog_create (GTK_WINDOW(data->window));
600 }
601 
602 static void
603 gnc_main_window_cmd_tools_close_book (GSimpleAction *simple,
604  GVariant *parameter,
605  gpointer user_data)
606 {
607  GncMainWindowActionData *data = user_data;
608  gnc_ui_close_book (gnc_get_current_book(), GTK_WINDOW(data->window));
609 }
610 
611 static void
612 gnc_main_window_cmd_tools_find_transactions (GSimpleAction *simple,
613  GVariant *parameter,
614  gpointer user_data)
615 {
616  GncMainWindowActionData *data = user_data;
617 
618  gnc_ui_find_transactions_dialog_create (GTK_WINDOW(data->window), NULL);
619 }
620 
621 static void
622 gnc_main_window_cmd_help_totd (GSimpleAction *simple,
623  GVariant *parameter,
624  gpointer user_data)
625 {
626  GncMainWindowActionData *data = user_data;
627 
628  g_return_if_fail (data != NULL);
629 
630  gnc_totd_dialog (GTK_WINDOW(data->window), FALSE);
631 }
632 
The instance data structure for a content plugin.
utility functions for the GnuCash UI
gint num_auto_create_no_notify_instances
The number of automatically-created instances that do no request notification.
This file contains the functions to present a GUI to select a book closing date and accounts into whi...
Functions that are supported by all types of windows.
The instance data structure for an basic commands menu plugin.
GtkWidget * window
The window that contains the display widget for this plugin.
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)
Really ("effectively") create the transactions from the SX instances in the given model...
void gnc_ui_close_book(QofBook *book, GtkWindow *parent)
Create and run the dialog to close the book.
void gnc_main_window_open_page(GncMainWindow *window, GncPluginPage *page)
Display a data plugin page in a window.
Functions for adding content to a window.
Functions providing the file history menu.
void gnc_account_reset_convert_bayes_to_flat(void)
Reset the flag that indicates the function imap_convert_bayes_to_flat has been run.
Definition: Account.cpp:5915
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
GncPlugin * gnc_plugin_basic_commands_new(void)
Create a new basic commands menu plugin.
gboolean qof_book_session_not_saved(const QofBook *book)
qof_book_not_saved() returns the value of the session_dirty flag, set when changes to any object in t...
Definition: qofbook.cpp:375
All type declarations for the whole Gnucash engine.
gboolean qof_book_is_readonly(const QofBook *book)
Return whether the book is read only.
Definition: qofbook.cpp:497
#define PLUGIN_ACTIONS_NAME
The label given to the main window for this plugin.
GncSxInstanceModel * gnc_sx_get_current_instances(void)
Shorthand for get_instances(now, FALSE);.
#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)
This file contains the functions to present a GUI to select a file or a database connection.
GncPlugin gnc_plugin
The parent object for this widget.
GSimpleActionGroup * gnc_main_window_get_action_group(GncMainWindow *window, const gchar *group_name)
Retrieve a specific set of user interface actions from a window.
The instance data structure for a main window object.
gboolean gnc_main_window_all_finish_pending(void)
Tell all pages in all windows to finish any outstanding activities.
gboolean need_dialog
If the dialog needs to be displayed.
Functions providing a basic set of menu items.
#define PLUGIN_UI_FILENAME
The name of the UI description file for this plugin.