48 #include <glib/gi18n.h> 54 #include "dialog-sx-editor.h" 56 #include "dialog-sx-editor2.h" 58 #include "dialog-utils.h" 60 #include "gnc-component-manager.h" 62 #include "gnc-dense-cal.h" 66 #include "gnc-icons.h" 68 #include "gnc-plugin-page-sx-list.h" 69 #include "gnc-session.h" 70 #include "gnc-sx-instance-dense-cal-adapter.h" 72 #include "gnc-sx-list-tree-model-adapter.h" 79 #define G_LOG_DOMAIN "gnc.gui.plugin-page.sx-list" 81 G_GNUC_UNUSED
static QofLogModule log_module = GNC_MOD_GUI_SX;
83 #define PLUGIN_PAGE_SX_LIST_CM_CLASS "plugin-page-sx-list" 84 #define STATE_SECTION "SX Transaction List" 91 gint gnc_component_id;
93 GncSxInstanceDenseCalAdapter *dense_cal_model;
97 GtkTreeView* tree_view;
102 G_DEFINE_TYPE_WITH_PRIVATE(
GncPluginPageSxList, gnc_plugin_page_sx_list, GNC_TYPE_PLUGIN_PAGE)
104 #define GNC_PLUGIN_PAGE_SX_LIST_GET_PRIVATE(o) \ 105 ((GncPluginPageSxListPrivate*)gnc_plugin_page_sx_list_get_instance_private((GncPluginPageSxList*)o)) 107 static GObjectClass *parent_class = NULL;
115 static void gnc_plugin_page_sx_list_dispose (GObject *
object);
116 static void gnc_plugin_page_sx_list_finalize (GObject *
object);
118 static GtkWidget *gnc_plugin_page_sx_list_create_widget (
GncPluginPage *plugin_page);
119 static void gnc_plugin_page_sx_list_destroy_widget (
GncPluginPage *plugin_page);
120 static void gnc_plugin_page_sx_list_save_page (
GncPluginPage *plugin_page, GKeyFile *file,
const gchar *group);
121 static GncPluginPage *gnc_plugin_page_sx_list_recreate_page (GtkWidget *window, GKeyFile *file,
const gchar *group);
123 static void gppsl_row_activated_cb (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data);
125 static void gnc_plugin_page_sx_list_cmd_new (GtkAction *action,
GncPluginPageSxList *page);
126 static void gnc_plugin_page_sx_list_cmd_edit (GtkAction *action,
GncPluginPageSxList *page);
127 #ifdef REGISTER2_ENABLED 129 static void gnc_plugin_page_sx_list_cmd_new2 (GtkAction *action,
GncPluginPageSxList *page);
130 static void gnc_plugin_page_sx_list_cmd_edit2 (GtkAction *action,
GncPluginPageSxList *page);
133 static void gnc_plugin_page_sx_list_cmd_delete (GtkAction *action,
GncPluginPageSxList *page);
134 static void gnc_plugin_page_sx_list_cmd_refresh (GtkAction *action,
GncPluginPageSxList *page);
137 static GtkActionEntry gnc_plugin_page_sx_list_actions [] =
139 {
"SxListAction", NULL, N_(
"_Scheduled"), NULL, NULL, NULL },
141 "SxListNewAction", GNC_ICON_NEW_ACCOUNT, N_(
"_New"), NULL,
142 N_(
"Create a new scheduled transaction"), G_CALLBACK(gnc_plugin_page_sx_list_cmd_new)
144 #ifdef REGISTER2_ENABLED 147 "SxListNewAction2", GNC_ICON_NEW_ACCOUNT, N_(
"_New 2"), NULL,
148 N_(
"Create a new scheduled transaction 2"), G_CALLBACK(gnc_plugin_page_sx_list_cmd_new2)
153 "SxListEditAction", GNC_ICON_EDIT_ACCOUNT, N_(
"_Edit"), NULL,
154 N_(
"Edit the selected scheduled transaction"), G_CALLBACK(gnc_plugin_page_sx_list_cmd_edit)
156 #ifdef REGISTER2_ENABLED 159 "SxListEditAction2", GNC_ICON_EDIT_ACCOUNT, N_(
"_Edit 2"), NULL,
160 N_(
"Edit the selected scheduled transaction 2"), G_CALLBACK(gnc_plugin_page_sx_list_cmd_edit2)
165 "SxListDeleteAction", GNC_ICON_DELETE_ACCOUNT, N_(
"_Delete"), NULL,
166 N_(
"Delete the selected scheduled transaction"), G_CALLBACK(gnc_plugin_page_sx_list_cmd_delete)
172 "ViewRefreshAction",
"view-refresh", N_(
"_Refresh"),
"<primary>r",
173 N_(
"Refresh this window"), G_CALLBACK(gnc_plugin_page_sx_list_cmd_refresh)
177 static guint gnc_plugin_page_sx_list_n_actions = G_N_ELEMENTS(gnc_plugin_page_sx_list_actions);
184 if (
object && GNC_IS_PLUGIN_PAGE_SX_LIST (object->data))
185 plugin_page = GNC_PLUGIN_PAGE_SX_LIST (object->data);
190 return GNC_PLUGIN_PAGE(plugin_page);
199 gnc_plugin_page_sx_list_focus_widget (
GncPluginPage *sx_plugin_page)
201 if (GNC_IS_PLUGIN_PAGE_SX_LIST(sx_plugin_page))
204 GtkTreeView *tree_view = priv->tree_view;
206 if (GTK_IS_TREE_VIEW(tree_view))
208 if (!gtk_widget_is_focus (GTK_WIDGET(tree_view)))
209 gtk_widget_grab_focus (GTK_WIDGET(tree_view));
218 GObjectClass *object_class = G_OBJECT_CLASS(klass);
221 parent_class = g_type_class_peek_parent(klass);
223 object_class->dispose = gnc_plugin_page_sx_list_dispose;
224 object_class->finalize = gnc_plugin_page_sx_list_finalize;
226 gnc_plugin_class->
tab_icon = GNC_ICON_ACCOUNT;
227 gnc_plugin_class->
plugin_name = GNC_PLUGIN_PAGE_SX_LIST_NAME;
228 gnc_plugin_class->
create_widget = gnc_plugin_page_sx_list_create_widget;
229 gnc_plugin_class->
destroy_widget = gnc_plugin_page_sx_list_destroy_widget;
230 gnc_plugin_class->
save_page = gnc_plugin_page_sx_list_save_page;
231 gnc_plugin_class->
recreate_page = gnc_plugin_page_sx_list_recreate_page;
239 GtkActionGroup *action_group;
243 parent = GNC_PLUGIN_PAGE(plugin_page);
244 #ifdef REGISTER2_ENABLED 245 g_object_set(G_OBJECT(plugin_page),
246 "page-name", _(
"Scheduled Transactions"),
247 "page-uri",
"default:",
248 "ui-description",
"gnc-plugin-page-sx-list2-ui.xml",
251 g_object_set(G_OBJECT(plugin_page),
252 "page-name", _(
"Scheduled Transactions"),
253 "page-uri",
"default:",
254 "ui-description",
"gnc-plugin-page-sx-list-ui.xml",
261 "GncPluginPageSxListActions");
262 gtk_action_group_add_actions (action_group,
263 gnc_plugin_page_sx_list_actions,
264 gnc_plugin_page_sx_list_n_actions,
271 gnc_plugin_page_sx_list_dispose (GObject *
object)
276 page = GNC_PLUGIN_PAGE_SX_LIST(
object);
277 g_return_if_fail (GNC_IS_PLUGIN_PAGE_SX_LIST(page));
278 priv = GNC_PLUGIN_PAGE_SX_LIST_GET_PRIVATE(page);
279 g_return_if_fail (priv != NULL);
281 g_return_if_fail (!priv->disposed);
282 priv->disposed = TRUE;
284 g_object_unref (G_OBJECT(priv->dense_cal_model));
285 priv->dense_cal_model = NULL;
286 g_object_unref (GTK_WIDGET(priv->gdcal));
288 g_object_unref (G_OBJECT(priv->instances));
289 priv->instances = NULL;
291 G_OBJECT_CLASS(parent_class)->dispose (
object);
296 gnc_plugin_page_sx_list_finalize (GObject *
object)
301 page = GNC_PLUGIN_PAGE_SX_LIST(
object);
302 g_return_if_fail (GNC_IS_PLUGIN_PAGE_SX_LIST(page));
303 priv = GNC_PLUGIN_PAGE_SX_LIST_GET_PRIVATE(page);
304 g_return_if_fail (priv != NULL);
306 G_OBJECT_CLASS(parent_class)->finalize (
object);
312 gnc_plugin_page_sx_list_refresh_cb (GHashTable *changes, gpointer user_data)
317 g_return_if_fail (GNC_IS_PLUGIN_PAGE_SX_LIST(page));
323 priv = GNC_PLUGIN_PAGE_SX_LIST_GET_PRIVATE(page);
324 gtk_widget_queue_draw (priv->widget);
329 gnc_plugin_page_sx_list_close_cb (gpointer user_data)
337 gppsl_selection_changed_cb (GtkTreeSelection *selection, gpointer user_data)
340 GtkAction *edit_action, *delete_action;
341 gboolean selection_state = TRUE;
343 page = GNC_PLUGIN_PAGE(user_data);
347 = gtk_tree_selection_count_selected_rows (selection) == 0
350 gtk_action_set_sensitive (edit_action, selection_state);
351 gtk_action_set_sensitive (delete_action, selection_state);
360 if (reset && priv->selected_list)
362 g_list_free (priv->selected_list);
363 priv->selected_list = NULL;
366 priv->selected_list = g_list_prepend (priv->selected_list, sx);
374 GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(priv->tree_view));
375 gboolean found = FALSE;
377 if (priv->selected_list)
380 for (GList *list = priv->selected_list; list != NULL; list = list->next)
382 SchedXaction *sx = list->data;
383 GtkTreePath *path = gtk_tree_path_new_first ();
386 while (gnc_tree_view_path_is_valid (GNC_TREE_VIEW(priv->tree_view), path))
388 SchedXaction *sx_tmp = gnc_tree_view_sx_list_get_sx_from_path (
389 GNC_TREE_VIEW_SX_LIST(priv->tree_view), path);
395 gtk_tree_path_next (path);
398 gtk_tree_selection_select_path (selection, path);
400 gtk_tree_path_free (path);
406 GtkTreePath *path = gtk_tree_path_new_first ();
407 gtk_tree_selection_select_path (selection, path);
408 gtk_tree_path_free (path);
414 gnc_plugin_page_sx_list_create_widget (
GncPluginPage *plugin_page)
423 page = GNC_PLUGIN_PAGE_SX_LIST(plugin_page);
424 priv = GNC_PLUGIN_PAGE_SX_LIST_GET_PRIVATE(page);
425 if (priv->widget != NULL)
429 widget = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
430 priv->widget = widget;
431 gtk_widget_show (priv->widget);
434 gtk_widget_set_name (GTK_WIDGET(priv->widget),
"gnc-id-sx-page");
437 vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
438 gtk_box_set_homogeneous (GTK_BOX(vbox), FALSE);
439 gtk_paned_pack1 (GTK_PANED(widget), vbox, TRUE, FALSE);
441 label = gtk_label_new (_(
"Transactions"));
442 gnc_widget_style_context_add_class (GTK_WIDGET(label),
"gnc-class-strong");
443 gtk_widget_set_margin_start (GTK_WIDGET(label), 6);
444 gnc_label_set_alignment (label, 0.0, 0);
445 gtk_widget_show (label);
446 gtk_box_pack_start (GTK_BOX(vbox), label, FALSE, FALSE, 0);
447 gtk_widget_show (vbox);
450 swin = gtk_scrolled_window_new (NULL, NULL);
451 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW(swin),
452 GTK_POLICY_AUTOMATIC,
453 GTK_POLICY_AUTOMATIC);
454 gtk_box_pack_start (GTK_BOX(vbox), swin, TRUE, TRUE, 5);
455 gtk_widget_show (swin);
461 gtk_paned_set_position (GTK_PANED(priv->widget), 160);
466 g_date_clear (&end, 1);
468 g_date_add_years (&end, 1);
473 GtkAction *edit_action, *delete_action;
476 gtk_action_set_sensitive (edit_action, FALSE);
477 gtk_action_set_sensitive (delete_action, FALSE);
481 GtkTreeSelection *selection;
482 GtkTreePath *path = gtk_tree_path_new_first ();
484 priv->tree_view = GTK_TREE_VIEW(gnc_tree_view_sx_list_new (priv->instances));
485 g_object_set (G_OBJECT(priv->tree_view),
486 "state-section", STATE_SECTION,
487 "show-column-menu", TRUE,
489 gtk_container_add (GTK_CONTAINER( swin ), GTK_WIDGET(priv->tree_view));
491 selection = gtk_tree_view_get_selection (priv->tree_view);
492 gtk_tree_selection_set_mode (selection, GTK_SELECTION_MULTIPLE);
493 gtk_tree_selection_select_path (selection, path);
494 gtk_tree_path_free (path);
496 g_signal_connect (G_OBJECT(selection),
"changed", (GCallback)gppsl_selection_changed_cb, (gpointer)page);
497 g_signal_connect (G_OBJECT(priv->tree_view),
"row-activated", (GCallback)gppsl_row_activated_cb, (gpointer)page);
498 g_signal_connect (G_OBJECT(gtk_tree_view_get_model (GTK_TREE_VIEW(priv->tree_view))),
499 "model-populated", (GCallback)gppsl_model_populated_cb, (gpointer)page);
503 vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
504 gtk_box_set_homogeneous (GTK_BOX(vbox), FALSE);
505 gtk_paned_pack2 (GTK_PANED(widget), vbox, TRUE, FALSE);
507 label = gtk_label_new (_(
"Upcoming Transactions"));
508 gnc_widget_style_context_add_class (GTK_WIDGET(label),
"gnc-class-strong");
509 gtk_widget_set_margin_start (GTK_WIDGET(label), 6);
510 gnc_label_set_alignment (label, 0.0, 0);
511 gtk_widget_show (label);
513 gtk_box_pack_start (GTK_BOX(vbox), label, FALSE, FALSE, 0);
514 gtk_widget_show (vbox);
517 swin = gtk_scrolled_window_new (NULL, NULL);
518 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW(swin),
519 GTK_POLICY_AUTOMATIC,
520 GTK_POLICY_AUTOMATIC);
521 gtk_box_pack_start (GTK_BOX(vbox), swin, TRUE, TRUE, 5);
522 gtk_widget_show (swin);
525 priv->dense_cal_model = gnc_sx_instance_dense_cal_adapter_new (GNC_SX_INSTANCE_MODEL(priv->instances));
526 priv->gdcal = GNC_DENSE_CAL(gnc_dense_cal_new_with_model (GNC_DENSE_CAL_MODEL(priv->dense_cal_model)));
527 g_object_ref_sink (priv->gdcal);
529 gnc_dense_cal_set_months_per_col (priv->gdcal, 4);
530 gnc_dense_cal_set_num_months (priv->gdcal, 12);
532 gtk_container_add (GTK_CONTAINER(swin), GTK_WIDGET(priv->gdcal));
535 priv->gnc_component_id = gnc_register_gui_component (
"plugin-page-sx-list",
536 gnc_plugin_page_sx_list_refresh_cb,
537 gnc_plugin_page_sx_list_close_cb,
539 gnc_gui_component_set_session (priv->gnc_component_id,
540 gnc_get_current_session ());
542 g_signal_connect (G_OBJECT(plugin_page),
"inserted",
551 gnc_plugin_page_sx_list_destroy_widget (
GncPluginPage *plugin_page)
556 page = GNC_PLUGIN_PAGE_SX_LIST(plugin_page);
557 priv = GNC_PLUGIN_PAGE_SX_LIST_GET_PRIVATE(page);
563 g_idle_remove_by_data (plugin_page);
567 g_object_unref (G_OBJECT(priv->widget));
571 if (priv->selected_list)
572 g_list_free (priv->selected_list);
574 if (priv->gnc_component_id)
576 gnc_unregister_gui_component (priv->gnc_component_id);
577 priv->gnc_component_id = 0;
590 gnc_plugin_page_sx_list_save_page (
GncPluginPage *plugin_page,
592 const gchar *group_name)
597 g_return_if_fail (GNC_IS_PLUGIN_PAGE_SX_LIST(plugin_page));
598 g_return_if_fail (key_file != NULL);
599 g_return_if_fail (group_name != NULL);
601 page = GNC_PLUGIN_PAGE_SX_LIST(plugin_page);
602 priv = GNC_PLUGIN_PAGE_SX_LIST_GET_PRIVATE(page);
604 g_key_file_set_integer (key_file, group_name,
"dense_cal_num_months",
605 gnc_dense_cal_get_num_months (priv->gdcal));
607 g_key_file_set_integer (key_file, group_name,
"paned_position",
608 gtk_paned_get_position (GTK_PANED(priv->widget)));
621 gnc_plugin_page_sx_list_recreate_page (GtkWidget *window,
623 const gchar *group_name)
628 g_return_val_if_fail (key_file, NULL);
629 g_return_val_if_fail (group_name, NULL);
633 priv = GNC_PLUGIN_PAGE_SX_LIST_GET_PRIVATE(page);
640 gint num_months = g_key_file_get_integer (key_file, group_name,
"dense_cal_num_months", &err);
642 gnc_dense_cal_set_num_months (priv->gdcal, num_months);
649 gint paned_position = g_key_file_get_integer (key_file, group_name,
650 "paned_position", &err);
652 gtk_paned_set_position (GTK_PANED(priv->widget), paned_position);
657 return GNC_PLUGIN_PAGE(page);
665 SchedXaction *new_sx;
666 gboolean new_sx_flag = TRUE;
674 g_date_clear (&now, 1);
676 recurrenceSet (r, 1, PERIOD_MONTH, &now, WEEKEND_ADJ_NONE);
678 schedule = g_list_append (schedule, r);
681 gnc_ui_scheduled_xaction_editor_dialog_create (window, new_sx, new_sx_flag);
682 gppsl_update_selected_list (page, TRUE, new_sx);
685 #ifdef REGISTER2_ENABLED 691 SchedXaction *new_sx;
692 gboolean new_sx_flag = TRUE;
700 g_date_clear (&now, 1);
702 recurrenceSet (r, 1, PERIOD_MONTH, &now, WEEKEND_ADJ_NONE);
704 schedule = g_list_append (schedule, r);
707 gnc_ui_scheduled_xaction_editor_dialog_create2 (window, new_sx, new_sx_flag);
717 g_return_if_fail (GNC_IS_PLUGIN_PAGE_SX_LIST(page));
719 priv = GNC_PLUGIN_PAGE_SX_LIST_GET_PRIVATE(page);
720 gtk_widget_queue_draw (priv->widget);
724 _edit_sx(gpointer data, gpointer user_data)
726 gnc_ui_scheduled_xaction_editor_dialog_create (GTK_WINDOW(user_data),
727 (SchedXaction*)data, FALSE);
730 #ifdef REGISTER2_ENABLED 733 _edit_sx2 (gpointer data, gpointer user_data)
735 gnc_ui_scheduled_xaction_editor_dialog_create2 (GTK_WINDOW(user_data),
736 (SchedXaction*)data, FALSE);
742 _argument_reorder_fn (GtkTreePath* list_path_data,
GncTreeViewSxList* user_tree_view)
744 return gnc_tree_view_sx_list_get_sx_from_path (user_tree_view, list_path_data);
753 GtkTreeSelection *selection;
754 GList *selected_paths, *to_edit;
757 selection = gtk_tree_view_get_selection (priv->tree_view);
758 selected_paths = gtk_tree_selection_get_selected_rows (selection, &model);
761 g_warning (
"no selection edit.");
766 (GncGMapFunc)_argument_reorder_fn,
769 gppsl_update_selected_list (page, TRUE, NULL);
770 for (GList *list = to_edit; list != NULL; list = list->next)
772 DEBUG (
"to-edit [%s]\n", xaccSchedXactionGetName ((SchedXaction*)list->data));
773 gppsl_update_selected_list (page, FALSE, list->data);
776 g_list_foreach (to_edit, (GFunc)_edit_sx, window);
777 g_list_free (to_edit);
778 g_list_foreach (selected_paths, (GFunc)gtk_tree_path_free, NULL);
779 g_list_free (selected_paths);
782 #ifdef REGISTER2_ENABLED 789 GtkTreeSelection *selection;
790 GList *selected_paths, *to_edit;
793 selection = gtk_tree_view_get_selection (priv->tree_view);
794 selected_paths = gtk_tree_selection_get_selected_rows (selection, &model);
797 g_warning (
"no selection edit.");
802 (GncGMapFunc)_argument_reorder_fn,
804 g_list_foreach (to_edit, (GFunc)_edit_sx2, window);
805 g_list_free (to_edit);
806 g_list_foreach (selected_paths, (GFunc)gtk_tree_path_free, NULL);
807 g_list_free (selected_paths);
813 gppsl_row_activated_cb (GtkTreeView *tree_view,
815 GtkTreeViewColumn *column,
822 SchedXaction *sx = gnc_tree_view_sx_list_get_sx_from_path (
823 GNC_TREE_VIEW_SX_LIST(priv->tree_view), path);
824 gnc_ui_scheduled_xaction_editor_dialog_create (window, sx, FALSE);
825 gppsl_update_selected_list (page, TRUE, sx);
830 _destroy_sx(gpointer data, gpointer user_data)
833 SchedXaction *sx = (SchedXaction*)data;
835 book = gnc_get_current_book ();
836 sxes = gnc_book_get_schedxactions (book);
837 gnc_sxes_del_sx (sxes, sx);
838 gnc_sx_begin_edit (sx);
847 GtkTreeSelection *selection;
848 GList *selected_paths, *to_delete = NULL;
851 gchar *message = NULL;
854 selection = gtk_tree_view_get_selection (priv->tree_view);
855 selected_paths = gtk_tree_selection_get_selected_rows (selection, &model);
858 g_warning (
"no selection for delete.");
863 (GncGMapFunc)_argument_reorder_fn,
868 length = g_list_length (to_delete);
871 message = g_strdup_printf (ngettext (
"Do you really want to delete this scheduled transaction?",
872 "Do you really want to delete %d scheduled transactions?",
875 if (gnc_verify_dialog (window, FALSE,
"%s", message))
877 gppsl_update_selected_list (page, TRUE, NULL);
878 for (GList *list = to_delete; list != NULL; list = list->next)
880 DEBUG(
"to-delete [%s]\n", xaccSchedXactionGetName ((SchedXaction*)list->data));
881 gppsl_update_selected_list (page, FALSE, list->data);
883 g_list_foreach (to_delete, (GFunc)_destroy_sx, NULL);
887 g_list_free (to_delete);
888 g_list_foreach (selected_paths, (GFunc)gtk_tree_path_free, NULL);
889 g_list_free (selected_paths);
GtkWidget * gnc_plugin_page_get_window(GncPluginPage *page)
Retrieve a pointer to the GncMainWindow (GtkWindow) containing this page.
void gnc_sx_set_schedule(SchedXaction *sx, GList *schedule)
GList * gnc_g_list_map(GList *list, GncGMapFunc fn, gpointer user_data)
const gchar * tab_icon
The relative name of the icon that should be shown on the tab for this page.
gboolean(* focus_page_function)(GncPluginPage *plugin_page)
This function performs specific actions to set the focus on a specific widget.
GList * gnc_sx_get_schedule(const SchedXaction *sx)
The instance data structure for a content plugin.
const GList * gnc_gobject_tracking_get_list(const gchar *name)
Get a list of all known objects of a specified type.
Date and Time handling routines.
utility functions for the GnuCash UI
GncTreeView implementation for Scheduled Transaction List.
GncPluginPage *(* recreate_page)(GtkWidget *window, GKeyFile *file, const gchar *group)
Create a new page based on the information saved during a previous instantiation of gnucash...
#define DEBUG(format, args...)
Print a debugging message.
Functions that are supported by all types of windows.
void gnc_gdate_set_today(GDate *gd)
Set a GDate to the current day.
API for Transactions and Splits (journal entries)
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.
void(* destroy_widget)(GncPluginPage *plugin_page)
Function called to destroy the display widget for a particular type of plugin.
The class data structure for a content plugin.
void gnc_plugin_page_disconnect_page_changed(GncPluginPage *page)
Disconnect the page_changed_id signal callback.
Anchor Scheduled Transaction info in a book.
const gchar * plugin_name
The textual name of this plugin.
GtkWidget *(* create_widget)(GncPluginPage *plugin_page)
Function called to create the display widget for a particular type of plugin.
Additional event handling code.
All type declarations for the whole Gnucash engine.
void(* save_page)(GncPluginPage *page, GKeyFile *file, const gchar *group)
Save enough information about this page so that it can be recreated next time the user starts gnucash...
GtkAction * gnc_plugin_page_get_action(GncPluginPage *page, const gchar *name)
Retrieve a GtkAction object associated with this page.
GncSxInstanceModel * gnc_sx_get_instances(const GDate *range_end, gboolean include_disabled)
Allocates a new SxInstanceModel and fills it with generated instances for all scheduled transactions ...
void gnc_plugin_page_inserted_cb(GncPluginPage *page, gpointer user_data)
Set up the page_changed callback for when the current page is changed.
void gnc_main_window_close_page(GncPluginPage *page)
Remove a data plugin page from a window and display the previous page.
#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 gnc_plugin_page_add_book(GncPluginPage *page, QofBook *book)
Add a book reference to the specified page.
SchedXaction * xaccSchedXactionMalloc(QofBook *book)
Creates and initializes a scheduled transaction.
GtkActionGroup * gnc_plugin_page_create_action_group(GncPluginPage *page, const gchar *group_name)
Create the GtkActionGroup object associated with this page.
gint gnc_list_length_cmp(const GList *list, size_t len)
Scans the GList elements the minimum number of iterations required to test it against a specified siz...
API for Transactions and Splits (journal entries)
void xaccSchedXactionDestroy(SchedXaction *sx)
Cleans up and frees a SchedXaction and its associated data.
Commodity handling public routines.